Approximation Abilities of Perception-based Logical Deduction Vil´ em Nov´ ak University of Ostrava Institute for Research and Applications of Fuzzy Modeling 30. dubna 22, 701 03 Ostrava 1, Czech Republic e-mail:
[email protected] and Institute of Information and Automation Theory Academy of Sciences of the Czech Republic Pod vod´ arenskou vˇeˇz´ı 4, 186 02 Praha 8, Czech Republic
Abstract A perception-based logical deduction is formulated in the frame of fuzzy intensional logic. We will show that under certain conditions, this kind of deduction is also a universal approximator. Keywords: Evaluating linguistic expression, intension, extension, fuzzy intensional logic.
1
Introduction
This paper∗) is a contribution to the theory of approximate reasoning. Its objective is presentation of the theory of logical deduction based on genuine linguistically characterized sets of fuzzy IFTHEN rules, which are called linguistic descriptions. These can be taken as part of a text which characterizes some situation, strategy of behavior, control of some process, etc., and which provides rules (instructions) what to do. People are able to understand such text and if a concrete context is given then they are able to follow the rules to realize practically, what is described in the text. An interesting problem arises if our task is to “teach computer” to do the same. For this task, we cannot avoid a narrow but important part of natural language which consists of the evaluating linguistic expressions and simple conditional statements ∗)
The paper is a shortened version of a full paper which contains all precise definitions and full proofs. A copy of the paper can be obtained from the author upon request. It has been partly supported by grant No A1075301 of ˇ and project MSM 179000002 of MSMT ˇ the GA AV CR ˇ CR.
formed of the latter (as widely accepted, we will speak about fuzzy IF-THEN rules). Each rule is taken as a conditional clause of natural language, i.e. as a linguistically characterized logical implication between evaluating linguistic expressions. Furthermore, we use them in logical deduction coming out of some observation. But the latter is always made in a concrete context (world, situation) and then transformed into perception (in the sense discussed by L. A. Zadeh [10]), which can be understood as a linguistic characterization of some measurement. A formal framework within fuzzy logic with evaluated syntax (see [9]) for analysis of evaluating expressions and deduction have been already formulated in [2, 4]. Further development can be found in [4, 8, 9]. This led us to the fuzzy intensional logic (FIL) which is an extension of the fuzzy type theory (FTT) (see [5, 6]) and which provides a consistent formal basis for the theory of the meaning of linguistic expressions. Consequently, a natural formalization of a perception is a formula of FIL. Then the perception and linguistic description provide us enough information for logical deduction, which we will call preceptionbased.
2
The Theory of Evaluating Linguistic Expressions
These are specific, grammatically simple expressions of natural language characterizing position on a bounded ordered scale (various measuring units such as meters, degrees, etc.). The basic component are atomic evaluating expressions of the type “small”, “medium”, or
“big”†) . Special are also fuzzy quantities, namely “approximately x0 ” where x0 is a name of some number. Atomic evaluating expressions usually form pairs of antonyms and when completed by a middle term, such as “medium”, “average”, etc., they form the so called fundamental evaluating trichotomy. Simple evaluating expressions have the surface form hlinguistic hedgeihatomic evaluating expressioni, for example very thin, more or less medium, roughly thick, etc. Linguistic hedges introduced by L. A. Zadeh are special adverbs modifying the meaning of the expressions before which they stand. We can distinguish hedges with narrowing effect (very, significantly, etc.) and hedges with widening effect (more or less, roughly, etc.). Absence of a linguistic hedge is taken as presence of an empty linguistic hedge. If hatomic evaluating expressioni := ‘small’ then we say that the simple evaluating expression is of type small. Similarly for the types medium and big. Evaluating linguistic expressions will be denoted by by script letters A, B, . . .. Evaluating linguistic predication is an expression X is A.
(1)
where A is an evaluating linguistic expression and X is a variable replacing some noun. A fuzzy IFTHEN rule is a conditional linguistic clause
where the latter is a state of the world at given time moment and place. Intension is identified with the property; it leads to different truth values in various possible worlds but is invariant with respect to them. Extension is a class of elements determined by an intension, which fall into the meaning of a linguistic expression in the given possible world. It depends on the particular context of use and changes whenever the possible world (context, time, place) is changed. For example, the expression “deep” is a name of an intension being a certain property of depth, which in concrete context (i.e. possible world) may mean 1 cm when a beetle needs to cross a puddle, 3 m in a small lake, but 3 km or more in the ocean. Global characteristics of the meaning of evaluating expressions is the following. (i) Intension of evaluating expression is independent on concrete scale, while its extension is a class of elements taken from a nonempty, ordered and bounded scale. Various scales are possible worlds. (ii) Each scale is vaguely partitioned by the fundamental evaluating trichotomy. Any element from the scale is contained in the extension of at most two neighbouring expressions from this trichotomy. Each scale is determined by three distinguished points: leftmost, rightmost and central.
We treat this rule as a simple sentence and analyze its linguistic meaning.
(iii) Evaluating expressions form pairs of antonyms, which characterize opposite sides of scales. For each pair there exist elements of the scale which do not fall in an extension of any of its members.
A set {R1 , . . . , Rm } of fuzzy IF-THEN rules is called a linguistic description.
(iv) Each evaluating expression can be made more or less specific using linguistic hedges.
R := IF X is A THEN Y is B.
2.1
(2)
Semantics of evaluating linguistic expressions
As usual in the theory of linguistic meaning, we distinguish between intension of a linguistic expression and its extension in some possible world †) These should be taken as canonical and can be replaced by any other cases such as “thin”, “thick”, “old”, “new”, etc.
(v) There are sets of simple evaluating expressions differing only in hedges, which are linearly ordered in the following sense: if an element of the scale falls in the extension of the “smaller” evaluating expression then it falls in the extension of all “larger” ones (provided that they exist). (vi) For each evaluating expression and in each possible world there exists a limit typical el-
ement. Extension of the expression falls inside a horizon running from it in the sense of the ordering of the scale. At the very latest, the horizon vanishes by the next distinguished point considered in (ii). The horizon can be obtained using analogous reasoning as the sorites paradox (cf. [3]). 2.1.1
Formalization of the semantics of evaluating expressions
A formal language J EV for the theory of evaluating linguistic expressions consists of types ω (possible worlds), (elements) and o (truth values). Higher types are formed by iteration. Further, it contains special constants (formulas) LH , RH of type (o)ω and a set of constants Hf where each constant ν ∈ Hf is of type oo and represents an abstract (linguistic) hedge. Among them, we designate one constant and denote it by ν¯. Description operator ι(o) will play the role of the defuzzification operation. Other special constants are a0 of type o for a designated nonzero truth value and a special constant ≤ of type (o) for linear ordering of elements. Recall that interpretation of a formula Aαβ is a function Mβ −→ Mα where Mα , Mβ are sets assigned to the types α, β, respectively. Thus, a formula Ao is interpreted by a fuzzy set. By w (possibly completed by some indexes) we denote a variable of type ω (a possible world). Similarly, x, y, . . . are variables of type (objects). ¬(∆ ∆(¬ ¬o )) determines a The formula Υoo := λzo (¬ nonzero truth value. The formula MH := ¬ LH ∧ ¬ RH is of type (o)ω and it represents a middle horizon. Formal theory of evaluating expressions. We consider a formal logical theory T EV of evaluating expressions (details are omitted due to the lack of space). Note that within predicate fuzzy logic (with evaluated syntax) this has been done in [4]. . We choose a specific canonical model of T EV and define for each ν ∈ Hf: S-formula is a formula Sm ν := λwλx(ν((LH w)x)), M-formula is Me ν := λwλx(ν((MH w)x)) and B-formula is Bi ν := λwλx(ν((RH w)x)). All the above de-
fined formulas are called E-formulas. To simplify notation, we will use a general variable Ev of type (o)ω for an E-formula which, when reading, should be replaced by one of the special formulas Sm ν , Me ν , or Bi ν . Basic E-formulas are (Sm ν¯ w)x, (Me ν¯ w)x and (Bi ν¯ w)x where ν¯ is the above mentioned designated hedge. We suppose them to fulfil special axioms with respect to covering of the universe, i.e. that, in each possible world all elements are evaluated by one of the three basic evaluating expressions and that no element belongs to all three types of evaluating expressions with nonzero degree. 2.1.2
Intension
Let hlinguistic hedgei be formally represented by an abstract hedge ν ∈ Hf. Then intensions of evaluating expressions are the following formulas: Int(hlinguistic hedgei small) := λw Sm ν w. (3) Int(hlinguistic hedgei medium) := λw Me ν w. (4) Int(hlinguistic hedgei big) := λw Bi ν w. (5) Interpretation of (3)–(5) is a function assigning to each possible world a fuzzy set of elements having a property named by A. Intension of the evaluating linguistic predication (1) is Int(X is A) := λw (Ev w)x.
(6)
Interpretation of (6) is a function assigning to each possible world a truth value of the proposition that “x has the property named by A”. For two E-formulas we put Ev1 Ev2 if Ev1 is Sformula and Ev2 is not, or Ev1 is M-formula and Ev2 is B-formula, or both are formulas of the same kind and T EV ` (∀w)(∀x)((Ev1 w)x ⇒ (Ev2 w)x).
(7)
Let A, B be two simple evaluating expressions with intensions Ev1 and Ev2 , respectively. Then A is narrower than B (the latter is wider than the former) if both Ev1 and Ev2 are E-formulas of the same kind and (7) holds for them. The expression A is more specific than B if Ev1 Ev2 holds true.
2.1.3
Extension
The canonical model of T EV is specified as follows. We construct a frame M = h(Mα , =α )α∈Types , L∆ i. The algebra L∆ is Lukasiewicz algebra with ∆ (i.e. the set Mo = [0, 1]). The set M of the elements which may fall into the meaning of the linguistic expressions is assumed to be a set M = R ∪ {ζ} where ζ 6∈ R is a specific element. The set of possible worlds is
The abstract hedges ν ∈ Hf are interpreted by 1, c ≤ y, 2 1 − (c−y) , b ≤ y < c, (c−b)(c−a) νa,b,c (y) = (12) 2 (y−a) , a ≤ y < b, (b−a)(c−a) 0, y < a.
The explicit formulas for extensions of simple evaluating expressions in the canonical model can be easily derived from the (9)–(12). Their construction is depicted on Figure 1. 1................................................................................... .. . . . . ... .. .. .. .. ....................................................................................................... .. c ... .. ... .. ... .. ¬L .. .. .. w ¬R...w .. .. .. quad . . . . b .. .. .. R..w L.. w .. νa,b,c .. . . . . .. . . . . a. . ............................................................................. . . . .. . . . . . . . . . . . . 0 vL 6 vS 66 1 6 66 66vR cSm aSm aBi cBi a1M e a1M e c1M e c2M e
Mω = {hvL , vS , vR i | vL , vS , vR ∈ R and vL < vS < vR } where vL , vS , vR represent left limit, horizon, and right limit of possible values which may fall into the meaning of the expressions in concern, respectively. The elements of Mω will be denoted by symbols w0 . A special role will be played by the constant a0 which will be interpreted by a certain chosen truth value a0 ∈ (0, 1] (usually close to 1). The extension of (1) in the given possible world w0 ∈ Mω is an interpretation I M for the assignment p(w) = w0 of an instance of formula (6) Extw0 (A) := IpM (A w) ⊂ [vL , vR ] ⊂ M , ∼
(8)
i.e. it is a fuzzy set in the set of elements M which fall in the interval [vL , vR ] determined by the possible world w0 . In the canonical model, we will always suppose that the membership function (8) is continuous. We will explicitly put vS − x ∗ , vS − vL x − vS ∗ RH w0 (x) = , vR − vS x − vL ∗ vR − x ∗ MH w0 (x) = ∧ vS − vL vR − vS LH w0 (x) =
(9) (10)
Figure 1:
Description operator. For dealing with evaluating expressions, a special defuzzification operation DEE (Defuzzification of Evaluating Expressions) is necessary. If A ⊂ M is a fuzzy ∼ set then we put DEE(A) = LOM(Sm ν,w0 ) = c vL + (1 − c)vS if A is of type small, DEE(A) = SOM(Me ν,w0 ) = (c1M e + c2M e )/2, if it is of type medium and DEE(A) = FOM(Bi ν,w0 ) = c vR + (1 − c)vS if it is of type big where c is the parameter of the corresponding linguistic hedge ν. The description operator ι(o) is interpreted using this operation. It can be understood as a prototype, or a typical element of type α representing the given formula of type oα.
3
Linguistic Description and Perception-based Logical Deduction
(11)
where “∗” means cut of the values to the interval [0, 1]. These functions characterize the above discussed horizon.
Let us consider a linguistic description R1 := IF X is small THEN Y is big R2 := IF X is big THEN Y is small.
Let the linguistic context (possible worlds) for the 0 variables X, Y be w0 = w0 = h0, 0.5, 1i. Then small values are some values around 0.3 (and smaller) and big ones some values around 0.7 (and bigger). We know from the linguistic description that small input values correspond to big output ones and vice-versa. Therefore, given an input, say X = 0.3, we expect the result Y ≈ 0.7 due to the rule R1 since we evaluate the input value as being small, and thus, in this case the output should be big. Similarly, for X = 0.75 we expect the result Y ≈ 0.25 due to the rule R2 . This is a typical example of perception-based reasoning, which is formally described below. Syntactic characterization. Let R be a fuzzy IF-THEN rule of the form (2), EvA , EvS be intensions of A, B, respectively. Then intension of R is Int(R) := λw1 λw2 ((EvA w1 )x ⇒ (EvS w2 )y) (13) where w1 , w2 are possible worlds corresponding to the variables X and Y in (2), respectively. Extension of (13) in a couple of possible worlds w10 , w20 ∈ Mω is a fuzzy relation with the membership function S Exthw10 ,w20i (R)(u, v) := EvA w 0 (u) → Evw 0 (v) (14)
SuitF (w0 , u0 ) = ((x ≡ u0 ) & (Ev w)x)
Let a linguistic description {R1 , . . . , Rm } be given, and let the rules occurring in it have intensions (15)
Then the set (15) defines for each couple of possible worlds w1 , w2 a theory T LD = T EV ∪ S ∪ {(∀x)(∃y)((EvA 1 w1 )x ⇒ (Ev1 w2 )y), . . . , S (∀x)(∃y)((EvA m w1 )x ⇒ (Evm w2 )y)}. (16)
The T LD is a formal theory determined by the linguistic description.
(17)
where u0 = IpM (u0 ) for each assignment p such that p(w) = w0 and Ev ∈ F is the most specific formula (the least in the sense of ), which fulfils T ` (∀w)(∃zo )(Υzo & (zo ⇒ (Ev w)B )) and there is no formula Ev 0 ∈ F such that Ev 0w0 (u0 ) > Evw0 (u0 ) ∧ a0 . Perception-based logical deduction. In general, logical deduction leads to firing of one fuzzy IF-THEN rule. Let T LD be a theory (16) and F = {EvA i | i = 1, . . . , m} be a set of antecedents of the fuzzy IFTHEN rules forming the theory T LD . Further, let an observation u0 ∈ w10 be given so that SuitF (w10 , u0 ) = ((x ≡ u0 ) &(EvA i w1 )x).
2
S for all u, v ∈ M where EvA w1 , Evw2 are fuzzy sets in M .
LD = {Int(R1 ), . . . , Int(Rm )}.
Let M be a canonical model of T EV , w0 ∈ Mω be a possible world and u0 ∈ M an element. Let F ⊂ Formo be a set of formulas representing evaluating expressions partially ordered by the ordering relation . Then the perception of u0 in the possible world w0 is given by the function
Put Tu0 = T LD ∪ {SuitF (w10 , u0 ), 0 (∀w)(∃zo )(Υzo & (zo ⇒ (EvA i w1 )u ))}. (18)
Theorem 1 Let Tu0 be a theory from (18) and denote b0 := 0 0 (EvA i w1 )u . Then Tu0 ` Υb and Tu0 ` (∀w2 )(b0 ⇒ (EvSi w2 ) y(b0 ⇒ (EvSi w2 )y)). ι
1
Assignment of perception. By perception of u0 , we will understand an evaluating linguistic expression A such that its intension is Ev and its interpretation I M (Ev) comprises u0 in some appropriate sense.
Thus, the perception-based deduction based on the perception of the observation u0 is derivation of the conclusion in the theory Tu0 temporarily obtained from T LD when extending it by the result of SuitF (w10 , u0 ).
Semantic characterization. Let us fix possible worlds w10 , w20 ∈ Mω . If the linguistic description consists of one fuzzy IF-THEN rule only then repetition of a logical deduction due to Theorem 1 for all u0 ∈ Supp(EvA ) gives a function w0 1
0 S fR (u0 ) = DEE(EvA w 0 (u ) → Evw 0 )) 1
2
(19)
where EvA (u0 ) → EvSw0 is a fuzzy set obw0 1
2
tained from (14) when fixing u = u0 . Depending on the evaluating expressions occurring in the rule (2) (or (13)), we will write fSS if fR is obtained from the rule of the form R := IF X is Small THEN Y is Small, and similarly for other combinations If the expression can be arbitrary then we write the subscript E instead.
which of course, is unrealistic. The theorem only principally characterizes power of the perceptionbased logical deduction stemming from genuine linguistic descriptions. On the other hand, our goal is not approximation of a function but to have at disposal a procedure well understandable to people and behaving according to their general intuition. Our theory seems to have a wide potential for further development and for applications on when developing robots which understand our language.
References [1] Andrews, P., An Introduction to Mathematical Logic and Type Theory: To Truth Through Proof. Kluwer, Dordrecht, 2002.
Theorem 2 Let M be the canonical model of T EV , w10 , w20 ∈ Mω possible worlds and R be a fuzzy IF-THEN rule (13). Then the function fR in (19) is continuous. Moreover, fSS and fBB are nondecreasing, fSB and fBS are nonincreasing.
[2] Dvoˇr´ ak, A. and Nov´ ak, V. (in press), “Fuzzy Logic Deduction with Crisp Observations.” Soft Computing
The function fM S is nonincreasing for u < c1M e , fM S (u) = vS −(vS −vL )c2 for u ∈ [c1M e , c2M e ] (c2 is the parameter of νa,b,c in Sm Sν ) and nondecreasing for u > c2M e .
[4] Nov´ ak, V. (2001), “Antonyms and Linguistic Quantifiers in Fuzzy Logic.” Fuzzy Sets and Systems, 124, pp. 335–351.
The function fM B is opposite with respect to fM S ; the constant part is fM B (u) = vS + (vR − vS )c2 for u ∈ [c1M e , c2M e ]. The perception-based logical deduction leads in general to a piecewise continuous and monotonous function (in the canonical model M). The points of discontinuity may occur at points in which the perceptions switch from one to another. Theorem 3 Let a real, bounded, continuous and finitely piecewise monotonous function g : [p1 , p2 ] −→ [q1 , q2 ] be given. Then for arbitrary precision ε > 0 there is a set of linguistic descriptions consisting of the fuzzy IF-THEN rules and a class of possible worlds such that the perception-based logical deduction leads to a piecewise continuous function which approximates g with the precision ε. Clearly, that we had to assume that the number of evaluating expression at our disposal is unlimited,
[3] H´ ajek, P. and Nov´ ak, V. (2003), The Sorites paradox and fuzzy logic. Int. J. of General Systems (to appear).
[5] Nov´ ak, V. (2003a), “On Fuzzy Type Theory.” Fuzzy Sets and Systems, (submitted). [6] Nov´ ak, V. (2003b), “From Fuzzy Type Theory to Fuzzy Intensional Logic”, EUSFLAT 2003, Zittau. [7] Nov´ ak, V. (2003c), “Descriptions in Full Fuzzy Type Theory” (submitted). [8] Nov´ ak, V. and Demicco, R. (2003), “Fuzzy logic deduction with words applied to ancient sea level estimation”, in: Demicco, R. and Klir, G.J. (Eds), Fuzzy logic in geology. Academic Press (to appear). [9] Nov´ ak, V., Perfilieva I. and J. Moˇckoˇr (1999), Mathematical Principles of Fuzzy Logic. Kluwer, Boston/Dordrecht. [10] Zadeh, L.A. (1975), “Toward a Logic of Perceptions Based on Fuzzy Logic”, in: Nov´ ak, V. and I. Perfilieva (eds.) (2000), Discovering the World With Fuzzy Logic. SpringerVerlag, Heidelberg (Studies in Fuzziness and Soft Computing, Vol. 57), 4–28.