# Modeling with words

Post-publication activity

Curator: Vilém Novák

Figure 1:

The term modeling with words means construction of mathematical models of systems and processes on the basis of special expert knowledge expressed using words of natural language. The main mathematical tool for such purpose is Fuzzy Natural Logic (FNL) which continues the older program of fuzzy logic in a broader sense (FLb).

## Fuzzy Natural Logic

Mathematical fuzzy logic, sometimes called fuzzy logic in narrow sense (FLn), is a formal fuzzy logic which is a special many-valued logic generalizing classical mathematical logic. It has a clearly distinguished syntax and semantics. There are several possible calculi of FLn. Properties of each of these calculi are determined by a structure of truth values which must be given in the beginning. All the calculi of FLn developed till now have truth values which form a residuated lattice.

FNL is an extension of FLn which aims at developing a mathematical model of special human reasoning schemes that employ natural language. The model should be independent of a concrete language as much as possible. Therefore, FNL includes also a model of the semantics of some parts of natural language. FNL follows the concept of natural logic, which was initiated by G. Lakoff in 1970.

The main consitutents of FNL are (till now) the following formal theories:

• Theory of evaluative linguistic expressions,
• formal theory of fuzzy/linguistic IF-THEN rules and logical inference from them,
• Theory of fuzzy generalized quantifiers with emphasis on intermediate quantifiers, generalized Aristotle syllogisms and square of opposition.

The basic mathematical tool used in all these theories is the fuzzy type theory (FTT) - a higher-order fuzzy logic which is a many-valued generalization of the classical type theory and which belongs to FLn.

## Evaluative linguistic expressions

### Basic concepts

Evaluative linguistic expressions are natural-language expressions such as small, medium, big, about twenty five, roughly one hundred, very short, more or less deep, not very tall, roughly warm or medium hot, roughly strong, roughly medium important, and many other ones. They form a small, but very important constituent of natural language. Their role in commonsense speech is essential because they are used by people for evaluation of many kinds of phenomena and situations. Such evaluations are subsequently used in decision-making and classification, in learning, in control, and in many other human activities.

A general structure of simple evaluative expressions is

$\langle \text{linguistic hedge} \rangle \text{ TE-adjective}$

where $$\langle \text{linguistic hedge} \rangle$$ is a word such as very, extremely, significantly, roughly, etc. and $$\text{TE-adjective}$$ is an evaluative adjective such as small, medium, big, and also many other kinds of evaluative expressions, for example long, shallow, intelligent, strong, great, nice, etc. The TE-adjectives small, medium, big should be taken as canonical. Of course, they can be replaced by other proper adjectives depending on the context.

Evaluative expressions should be distinguished from evaluative predications which are special natural-language expressions such as "temperature is very high", "speed is extremely low", "quality is more or less medium", etc. Because the noun is unimportant in applications, it can be replaced by numbers (sizes, measures, distances, etc.). Hence, a general form of evaluative predications considered in FNL is the following$\tag{1} X \text{ is } \mathcal{A}$

where $$\mathcal{A}$$ is an evaluative expression and $$X$$ is a variable whose values are usually numbers.

Figure 2: Naive model of the meaning of the word categories very small (VS), small (SM), medium (Me), big (BI), very big (VB) using triangular fuzzy sets.

### Naive model of the meaning of evaluative linguistic expressions

According to this model, the meaning of an evaluative expression $$\mathcal{A}$$ is identified with a simple fuzzy set $$A: U\to L$$ where $$U$$ is a universe and $$L$$ is a set of truth values (usually the interval [0, 1] of real numbers). The universe is not specified, but quite often it is a set of real numbers. Shapes of fuzzy sets are often simplified to triangles. In applications, they can be further modified, usually in arbitrary way.

A standard example of this model is depicted in Figure 2 where the triangular fuzzy sets characterize certain typical values for "very small", "small", "medium", "big", and "very big" which thus determine the corresponding categories. The used natural-language expressions are only labels of these categories because the depicted triangular fuzzy sets cannot represent their linguistic meaning. This can be easily seen when considering, for example, 0, which is clearly a small number. According to the model in Figure 2, however, 0 is very small, but not small at all. This contradicts the linguistic meaning of the considered evaluative expressions.

Figure 3: Scheme of intensions of basic evaluative expressions extremely small, very small, small, medium and big.

### Sophisticated model of Evaluative Linguistic Expressions

This model is based on a careful logical analysis of the meaning of the whole class of evaluative linguistic expressions. Its core concepts are context, intension, and extension.

First, we must consider a universe $$U$$ which is usually the set of real numbers. A context is an ordered triple of numbers $$w= \langle v_L, v_S, v_R\rangle\quad v_L < v_S < v_R$$ where $$v_L \in U$$ is a left bound, $$v_S \in U$$ is a central point, and $$v_R\in U$$ is a right bound. The interval $$[v_L, v_S]$$ contains all kinds of small values and $$[v_S, v_R]$$ all kinds of big values. The element $$v_S$$ is a typical medium value (it needs not lay in the precise center of the interval $$[v_S, v_R]$$).

For example, when speaking about age of people, the context can be $$w= \langle 0, 45, 100\rangle$$ where people below 45 years are surely young, those around 45 are middle aged, and those over 100 are surely old. Ages below 45 are young in various degrees, those around 45 are middle aged in various degrees, and those over 45 are old in various degrees.

An element $$u \in U$$ belongs to a context $$w=\langle v_L, v_S, v_R\rangle$$ if $$u\in [v_L, v_R] \ .$$ A set of all considered contexts is denoted by $$W \ .$$

Let $$\mathcal{F}(U)$$ be a set of all fuzzy sets over the universe $$U\ .$$ Intension is the principal characteristics of a property and, therefore, it represents the meaning of an evaluative expression. It is mathematically modeled by a function $$W\to \mathcal{F}(U) \ .$$

The following functions are intensions of evaluative expressions:

 $$\text{Intension}(\langle \text{linguistic hedge}\rangle \text{small}): W \to \mathcal{F}(U)$$ which assigns a fuzzy set in $$[v_L, v_S]$$ to each context $$\langle v_L, v_S, v_R\rangle\in W$$ $$\text{Intension}(\langle \text{linguistic hedge}\rangle \text{medium}): W \to \mathcal{F}(U)$$ which assigns a fuzzy set in $$[v_L, v_R]$$ to each context $$\langle v_L, v_S, v_R\rangle\in W$$ $$\text{Intension}(\langle \text{linguistic hedge}\rangle \text{big}): W \to \mathcal{F}(U)$$ which assigns a fuzzy set in $$[v_S, v_R]$$ to each context $$\langle v_L, v_S, v_R\rangle\in W$$

Scheme of the model of intensions of evaluative expressions is depicted in Figure 3. Each value of intension (i.e., of a function) in a context $$\langle v_L, v_S, v_R\rangle\in W$$ is a special fuzzy set called extension of the corresponding evaluative expression in a given context $$w\in W \ .$$ Fuzzy sets representing extensions of the corresponding evaluative expressions in various contexts have typical shapes depicted in Figure 4.

Figure 4: Extensions of evaluative expressions extremely small, very small,small, medium, big in the context $$\langle 0, 50, 100\rangle$$ and their comparison with categories.

## Fuzzy IF-THEN rules

These rules are the main tool making it possible to express knowledge using words of natural-language and utilize it when developing appropriate models. Fuzzy IF-THEN rules are, in general, conditional linguistic clauses of the form

$\tag{2} \text{IF } X \text{ is } \mathcal{A} \text{ THEN } Y \text{ is } \mathcal{B}$

where $$\mathcal{A,B}$$ are evaluative linguistic expressions. The linguistic predication $$X \text{ is }\mathcal{A}$$ is called antecedent and $$X\text{ is }\mathcal{B}$$ is called consequent. The antecedent may consist of more evaluative predications joined by "AND". The antecedent variable $$X$$ attains values from some universe $$U$$ and the consequent variable $$Y$$ from some universe $$V\ .$$

A finite set of $$m$$ fuzzy IF-THEN rules with common $$X$$ and $$Y$$ is called a linguistic description, i.e. it takes the form

$\text{IF } X \text{ is } \mathcal{A}_1 \text{ THEN } Y \text{ is } \mathcal{B}_1$ $\tag{3} ............................................$

$\text{IF } X \text{ is } \mathcal{A}_m \text{ THEN } Y \text{ is } \mathcal{B}_m$

One or more linguistic descriptions may form a knowledge base which gathers knowledge about some situation (decision, control, etc.).

Two possible interpretations of fuzzy IF-THEN rules are introduced:

(a) Relational interpretation according to which fuzzy IF-THEN rules are codes of special fuzzy relations.

(b) Logical/linguistic interpretation according to which fuzzy IF-THEN rules are conditional clauses of natural language.

### Relational interpretation

According to this interpretation, each rule in Eq. (2) is assigned a fuzzy relation $$R: U\times V\to L\ .$$ This relation is constructed from the corresponding fuzzy set $$A: U\to L$$ interpreting the antecedent and $$B: V\to L$$ interpreting the consequent. These fuzzy sets are usually obtained on the basis of naive model of the meaning of evaluative expressions.

The linguistic description consisting of m rules of the form Eq. (2) is assigned one of two special fuzzy relations which are called normal forms:

• Disjunctive normal form: $$\tag{4} R(u, v) = \bigvee_{j=1}^m (A(u)\otimes B(v)), \qquad u\in U, v\in V$$

where the operation $$\otimes$$ is a proper kind of a t-norm that is, a special operation such as product, minimum, and many others. In many applications, the chosen t-norm $$\otimes$$ is the operation of minimum $$\otimes=\wedge \ .$$

• Conjunctive normal form: $$\tag{5} R(u, v) = \bigwedge_{j=1}^m (A(u)\rightarrow B(v)), \qquad u\in U, v\in V$$

where $$\rightarrow$$ is a fuzzy implication (it can be, for example, the Lukasiewicz implication $$a\rightarrow b = 1\wedge (1-a+b),\quad a,b \in [0, 1]$$)

### Logical/linguistic interpretation

In this case, two sets of contexts are considered$W_X$ for values of antecedent and $$W_Y$$ for values of consequent. Then each rule in Eq. (3) is assigned an intension which is a function

$$\tag{6} \text{Intension}(\text{IF } X \text{ is } \mathcal{A}_j \text{ THEN } Y \text{ is } \mathcal{B}_j): W \times W \to \mathcal{F}(U\times V) \ .$$

This function assigns to each couple of contexts $$w_X\in W_X, w_Y\in W_Y$$ an extension which is a fuzzy relation of the form

$A_j(u)\rightarrow B_j(v), \qquad u\in w_X, v\in w_Y, j=1, \ldots,m$

where $$\rightarrow$$ is a fuzzy implication. Consequently, interpretation of the linguistic description is a set of intensions.

## Inference methods

Linguistic descriptions provide essential information for further reasoning. A general approximate reasoning scheme is the following:

 Condition: $$\text{IF } X \text{ is } \mathcal{A}_j \text{ THEN } Y \text{ is } \mathcal{B}_j, \qquad j=1, ..., m \text{ }$$ Observation: $$X \text{ is }\mathcal{A}'$$ Conclusion: $$Y\text{ is }\mathcal{B}'$$

The condition is formed by a linguistic description. The observation is a linguistic predication $$X \text{ is } \mathcal{A}'$$ which can be slightly different from any of $$X \text{ is } \mathcal{A}_j\ ,$$ $$j=1, ..., m$$ occurring in the given linguistic description. From it follows that also conclusion is, in general, a linguistic predication $$Y \text{ is } \mathcal{B}'$$ which may differ a little from any of $$Y \text{ is } \mathcal{B}_j\ ,$$ $$j=1, ..., m\ .$$ There are two possibilities to realize the inference depending on the interpretation of fuzzy IF-THEN rules.

### Relational inference

In this case, the principal inference method is forming an image under a fuzzy relation, which can also be understood as a composition of fuzzy relations. Let interpretation of $$X \text{ is }\mathcal{A}'$$ be a fuzzy set $$A': U\to L \ .$$ Then the conclusion is a fuzzy set $$B': V\to L$$ with the membership function

$$\tag{7} B'(v)= \bigvee_{u\in U} (A'(u)\otimes R(u, v)),\qquad v\in V$$


where $$R: U\times V\to L$$ is a fuzzy relation obtained either as a disjunctive normal form from Eq. (4) or as a conjunctive normal form from Eq. (5) and $$\otimes$$ is a special t-norm which quite often is the minimum operation $$\wedge \ .$$

The formula in Eq. (7) mathematically represents the inference scheme above in the frame of relational theory of approximate reasoning.

Figure 5: Demonstration of the behavior of perception-based logical deduction on the basis of linguistic description characterizing drive control when approaching junction with green switching to red. The figure also shows how the approximate reasoning scheme is realized.

### Perception-based logical deduction

This is a specific inference method which is convenient if logical/linguistic interpretation of fuzzy IF-THEN rules is considered. The method takes the real meaning of evaluative linguistic expressions into consideration. The main idea of perception-based logical deduction can be best explained on an example.

Figure 6: Behavior of perception-based logical deduction characterizing driving control on a traffic junction with green switching to red when fuzzy-transform filter is on.

Let us consider a control strategy of a driver who approaches a traffic junction with the green light on which suddenly switches to red. To simplify the problem, we will consider only distance of the car from the junction (without considering its speed) to clarify the way how PbLD acts. The strategy is the following: if the distance is medium or big then do nothing (i.e., we easily finish the ride and stop without problems). If the distance is small then quickly brake. If, however, the distance is very small then accelerate very much because this is much safer than the rapid brake. If the distance is even extremely small then accelerate much but it needs not be very much because we still cross the junction safely. This strategy can be expressed using the following linguistic description$R_1 \ :$= IF Distance is extremely small THEN Brake is - big

$$R_2 \ :$$= IF Distance is very small THEN Brake is - very big

$$R_3 \ :$$= IF Distance is small THEN Brake is + big

$$R_4 \ :$$= IF Distance is medium or big THEN Brake is zero

where brake is -very big means acceleration is very big. Note that such linguistic description characterizes general driver's behavior independently on the concrete place and so, people are able to apply it in a signalized intersection of arbitrary size.

Each rule provides a certain knowledge (related to a specific application). Now, if one sees that the distance from the junction is around 10-15 m (and smaller) then his/her perception is is that the junction is very near (the distance is very small). Therefore, it is necessary to accelerate very much which might correspond to values about 0.8-0.9. On the other hand, if the distance is around 20-28 m then the perception of the distance of the junction is near and so, it is necessary to break strongly. Note that we can distinguish between the rules despite the fact that their meaning is vague.

Figure 7: Result of algorithm for determination of rock sequences using evaluative linguistic expressions. Second column contains codes of rock strata. The third and fourth columns contain thickness of each rock stratum (in m) and its evaluation using evaluative expression (rather small (RaSm), extremely small (ExSm), significantly small (SiSm), more or less small (MLSm), big (Bi)), respectively. Then follow number of a sequence, its total thickness, and possibly its end which denoted by "E".

The procedure is schematically depicted in Figure 5. The upper left corner contains Observation both as a numerical value and also as a perception (i.e. as an evaluative predication). After the perception is assigned, the deduction process may proceed. This is realized using the logical rule of modus ponens on the basis of the Observation and the Condition. The latter is the currently firing rule from the linguistic description displayed in the middle of the right side of Figure 5. The upper right corner displays computation of the Conclusion which consists of the corresponding numerical value and also of its linguistic form as an evaluative predication.

For example, if the perception of the given distance is very near (the distance is very small) then the result of deduction is accelerate very much (i.e. break is -very big). Then a special fuzzy set can be constructed which characterizes all values of the break/acceleration pedal position which can be characterized as very big provided that such dependence between distance and break/acceleration exists. The final step is finding a corresponding value which together with the output evaluative expression is the output of PbLD. This is obtained using a special defuzzification method DEE (Defuzzification of Evaluative Expressions).

The lower right corner of Figure 5 contains recapitulation of the deduction process for all numerical inputs. Note that the bigger is the value of distance the smaller is the value of acceleration and vice-versa, because such kind of knowledge is contained in the given linguistic description. Note also that the course of all control actions is partially continuous. To make it continuous, it can be filtered using a special filter based on fuzzy transform (Perfilieva-transform). This is depicted in Figure 6.

## Applications

### Evaluative expressions in special algorithms

We can effectively apply the theory of evaluative linguistic expressions in special models without using fuzzy IF-THEN rules. The role of evaluative expressions is to provide branching inside a more complex algorithm. One of such examples is determination of rock sequences by the geologist: the goal is to merge together several kinds of rock strata into sequences. The geologist follows rules which may be quite complex, for example:

Check whether the obtained sequences are sufficiently
thick. If the given sequence is too thin then it
is merged with the following one, provided that
the resulting sequence does not become too thick.


The problem is non-trivial because the real rock strata appear in various combinations and thickness, and so, putting them into meaningful sequences is a kind of an "art" based on the geologist's experience. Figure 7 shows a result of an algorithm which reached 88% of success in comparison with the solution provided by the geologist.

### Evaluative expressions in control

Figure 8: Result of control of a process using genuine linguistic description. The figure also contains example of a currently firing rule "IF Error is +big AND Error change is -big THEN Change of control action is +very small"

Fuzzy control can be understood as an application of the above mentioned reasoning to control of processes. It can be realized in the case when a knowledge of the control strategy is available but it is only rough, expressed in natural language. Note that such a situation is quite frequent because many processes are controlled or supervised by a human operator who knows the control strategy and who is able to express it using linguistic descriptions, though he does not know the controlled process itself.

In the most practical applications of fuzzy control, the relational interpretation of fuzzy IF-THEN rules and relational inference are applied. Less known but very effective and successful is control on the basis of linguistic descriptions consisting of the logically and linguistically interpreted fuzzy IF-THEN rules together with the perception-based logical deduction. The main idea is to describe a control strategy using words of natural language without thinking of their representation using fuzzy sets (we may speak about linguistic control). The controller thus takes the role of a "human" partner understanding natural language and realizing what is described using it. The essential advantage is that the control strategy is clear at first sight because the used linguistic description(s) is well understandable to people, even after years. Figure 8 shows simulation of a linguistic control of a simple nonlinear process in a closed feedback loop realized on the basis of a linguistic description consisting of genuine linguistic rules.

It should be noted that the linguistic control requires higher number of rules in comparison with the ordinary fuzzy control. The reason is that in the latter case, the used fuzzy sets have no real meaning and are independently modified according to the process itself. On the other hand, the genuine linguistic rules provide well understandable human-friendly knowledge about the control strategy and it is easy to modify them since the user changes only words of natural language. The control is very robust and stable. Powerful learning and adaptation algorithms have also been developed for linguistic control.

### Evaluative expressions in decision-making

Figure 9: Scheme of decomposition of a decision-making problem.

Linguistic IF-THEN rules enable to distinguish sufficiently subtly and, at the same time, aptly various degrees of fulfilling of the respective criteria, their various importance and, moreover, they may also overcome possible discrepancies. Degrees of importance are naturally included in the linguistic characterization and so, the classical problem of assigning weights to the criteria disappears. This method effectively combines the possibility to include quantified and non-quantified criteria together. Therefore, linguistic descriptions are very convenient tool for managers.

The decision problem is usually decomposed into several subproblems, each of which can be described using some linguistic description - see Figure 9. The final decision is obtained as an output of the summarizing linguistic description and it can be expressed both numerically as well as linguistically.

## References

• Dvořák, A., Habiballa, H., Novák, V. and Pavliska, V. (2003) The concept of LFLC 2000 - its specificity, realization and power for applications. Computers in industry 51, pp. 269-280.
• Lakoff, G. (1970), Linguistics and natural logic. Synthese 22, pp. 151-271.
• Novák V. (2008), A comprehensive theory of trichotomous evaluative linguistic expressions, Fuzzy Sets and Systems 159, pp. 2939-2969.
• Novák V. (2013), On Modelling With Words. Int. Journal of General Systems 42, pp. 21-40.
• Novák V., Lehmke S. (2006) Logical structure of fuzzy IF-THEN rules, Fuzzy Sets and Systems 157, pp. 2003-2029.
• Novák, V., Perfilieva, I. (2004) On the Semantics of Perception-Based Fuzzy Logic Deduction, Int. Journal of Intelligent Systems 19, pp. 1007-1031
• Novák V., Fuzzy logic deduction with words applied to ancient sea level estimation, in: R. Demicco, G. Klir (Eds.), Fuzzy logic in geology, Academic Press, Amsterdam, 2003, pp. 301-336. ISBN 0124151469
• Perfilieva, I., Lehmke, S. (2006) Correct Models of Fuzzy If-Then Rules are Continuous. Fuzzy Sets and Systems. 157, pp.3188-3197
• Zadeh, L.A. (1975 The concept of a linguistic variable and its application to approximate reasoning I, II, III, Inf. Sci., 8, pp. 199-257, pp. 301-357; 9, pp. 43-80.
• Zadeh, L.A. (2004) Precisiated Natural Language (PNL), AI Magazine, 25, pp. 74-91

Internal references

• Lotfi A. Zadeh (2008) Fuzzy logic. Scholarpedia, 3(3):1766.
• Milan Mares (2006) Fuzzy sets. Scholarpedia, 1(10):2031.
• Mark Aronoff (2007) Language. Scholarpedia, 2(5):3175.
• James Murdock (2006) Normal forms. Scholarpedia, 1(10):1902.
• Philip Holmes and Eric T. Shea-Brown (2006) Stability. Scholarpedia, 1(10):1838.

• Bělohlávek, R. (2002) Fuzzy Relational Systems: Foundations and Principles, Kluwer Academi/Plenum Press, New York. ISBN 0306467771
• Hájek, P. (1998) Metamathematics of Fuzzy Logic, Kluwer, Dordrecht. ISBN 0792352386
• Klir, G.J. and Yuan Bo (1995) Fuzzy Set Theory: Foundations and Applications Prentice Hall, Upper Saddle River. ISBN 0131011715
• Michels, K., Klawonn, F., Kruse, R. and Nurnberger, A. (2006) Fuzzy Control: Fundamentals, Stability And Design of Fuzzy Controllers. ISBN: 3540317651
• Murinová, P. and Novák V. (2012) A Formal Theory of Generalized Intermediate Syllogisms. Fuzzy Sets and Systems 186, 47-80.
• Novák, V. (1989) Fuzzy Sets and Their Applications, Adam Hilger, Bristol. ISBN 0-85274-583-4
• Novák V., Perfilieva I. and Močkoř, J. (1999) Mathematical Principles of Fuzzy Logic, Kluwer, Boston. ISBN 0-7923-8595-0
• Novák V. and Perfilieva I. (2000) Discovering the World With Fuzzy Logic. Springer-Verlag, Heidelberg. ISBN 3-7908-1330-3
• Novák V., Perfilieva I. and Dvořák, A. (to appear) Insight into Fuzzy Modeling, J. Wiley & Sons.
• Perfilieva I. (2006) Fuzzy transforms: theory and applications. Fuzzy Sets and Systems 157, 993-1023.
• Wang, P., Ruan, D. and Kerre, E.E., Eds. (2007), Fuzzy Logic - A Spectrum of Theoretical & Practical Issues, Elsevier, Berlin. ISBN 3540712577