Adding Similarity to Possibilistic Logic with Fuzzy ... - Semantic Scholar

2 downloads 0 Views 102KB Size Report
general fuzzy possibilistic logic (called PGL) based on. Gِdel infinitely-valued logic,and in [2] the Horn-rule sublogic of PGL was extended with fuzzy constants.
Adding Similarity to Possibilistic Logic with Fuzzy Constants  Teresa Alsinet Computer Science Dept. Universitat de Lleida (UdL) 25001 Lleida, Spain

Llu´ıs Godo AI Research Inst. (IIIA) CSIC 08193 Bellaterra, Spain

[email protected]

[email protected]

Abstract

Horn-rules.

In this paper we propose an extension of a Horn-rule sublogic of PLFC (a first-order Possibilistic logic programming language dealing with fuzzy constants and fuzzily restricted quantifiers) with similarity-based unification of object constants. At the semantic level, we equip each sort with a fuzzy similarity relation, and at the syntactic level, we replace each precise object constant in the antecedent of a Horn-rule by a variable weight fuzzily “enlarged” by means of a fuzzy similarity relation.

In both PLFC and PGL, fuzzy constants can be seen as (flexible) restrictions on an existential quantifier. For instance, in both systems, the fuzzy statement

1. Introduction Possibilistic logic [8] is a logic of uncertainty to reason with classical propositions under incomplete information and partially inconsistent knowledge. Formulas of the necessity-valued fragment of Possibilistic logic are of the form ('; ) where ' is a classical (propositional or first-order) formula and 2 [0; 1] is understood as a lower bound for the necessity degree of '. To enhance the knowledge representation power, Dubois et al. [9, 10] defined a syntactic extension of first-order Possibilistic logic (called PLFC) to deal with fuzzy constants and fuzzily restricted quantifiers inside the language, for which Alsinet et al. [3] defined a formal semantics and a sound resolution-style calculus by refutation. In PLFC, the resolution rule includes an implicit fuzzy unification mechanism between fuzzy constants. Alternatively, Alsinet and Godo defined in [1] a general fuzzy possibilistic logic (called PGL) based on G¨odel infinitely-valued logic,and in [2] the Horn-rule sublogic of PGL was extended with fuzzy constants and a modus ponens-style calculus based on an explicit fuzzy unification mechanism between fuzzy constants was shown to be complete for a restricted class of  This research was partially supported by the project SMASH (TIC96-1038-C04-01/03) funded by the CICYT.

“it is almost sure that Peter is about

35 years old”

can be represented by a certainty-weighted formula of the form

(age P eter(about 35); 0:9) ; where age P eter is a classical predicate and about 35 is a fuzzy constant defined over the domain [0; 120] (years). In the case about 35 denotes a crisp interval of ages, say [34; 36], the certainty-weighted formula (age P eter(about 35); 0:9) is to be interpreted in possibilistic terms as “9 x 2 [34; 36] such that age P eter(x)” is certain with a necessity of at least 0:9 .

In the case about 35 denotes a fuzzy interval with a membership function  about 35 : [0; 120] ! [0; 1], the formula is to be interpreted for each 2 [0; 1] as “9 x 2 [about 35] such that age P eter(x)” is certain with a necessity of at least min(0:9; 1 ) ,

where [about 35] denotes the -cut of  about 35.

In PLFC, the use of variable weights [6, 7] is a suitable technique for modeling statements of the form “the more x is A (or x belongs to A), the more certain is p(x)”, where A is a fuzzy set with membership function A (x). This is formalized in PLFC as, “for all x, p(x) is certain with a necessity of at least A (x)”, and is represented as (p(x); A(x)). When A is imprecise but not fuzzy, the interpretation of such a formula is just “for all x 2 A, p(x)”. So variable weights in PLFC act as (flexible if they are fuzzy) restrictions on an uni-

versal quantifier, or if you prefer, as a kind conjunctive constants. Notice that the notion of variable weight has not been introduced in PGL since all fuzzy constants in that system are interpreted disjunctively. Concerning the unification mechanism, the matching degree between two object (fuzzy) constants is computed in terms of a necessity measure for fuzzy sets in both PLFC and PGL. As a consequence, the unification degree between two different and precise constants is null in both systems. Sometimes this is a rather unpleasant behavior, specially if we are trying to model approximate knowledge. To remedy this situation, in this paper we equip each basic sort with a fuzzy proximity relation in order to allow a kind of similarity-based unification [4, 5, 11] between precise constants. For instance, if 34 and 35 are two precise object constants of a given sort price EUR, from the set of certaintyweighted formulas

f(price book(34); 1); (price book(35) ! buy book; 1)g;

A (x), where ) is the reciprocal of G¨odel’s manyvalued implication. Hence, N (A j B ) 6= 0 iff the core of B is contained in the core of A, and thus, in the above example, we would have N (around(35) j 34) = N (35 j 34) = 0 in the usual case around(35)(x) < 1 for x 6= 35. However, in PLFC, N (A j B ) is computed as inf x max(A (x); 1 B (x)), and thus, in general, we would have that N (around(35) j 34) = around(35) (34) > 0. Therefore, rather than extending PGL, in this paper we extend PLFC with a similaritybased unification. Finally, let us comment that when extending PLFC (or according with (i) a Horn-rule sublogic of PLFC) with similarity-based unification we are introducing two minor changes. On the semantic level, we are equipping each sort with a fuzzy proximity relation. On the syntactic level, we are replacing each precise object constant in the antecedent of a Horn-rule (or more generally, in the tail of a clause) by a variable weight fuzzily “enlarged” by means of some fuzzy proximity relation. For instance, the previously considered set of PLFC clauses

considering that 34 is very close to 35, we would like to infer something of the form

(buy book; N (around(35) j 34)); where N ( j ) is a necessity measure of matching between fuzzy events and around() would be a fuzzy proximity relation attached to the sort price EUR, i.e. a fuzzification relation. In this framework, we tackle two main problems. (i) We address the problem of similarity-based unification involving fuzzy constants in systems where a separation between general and specific patterns can be made [12]. The patterns classified in the first context are part of general information, like rules in expert systems, or ungrounded clauses in logic programming languages. The ones classified in the second context come from specific information about a problem, like facts in expert systems, or grounded clauses in logic programming languages. In this frame, the fuzzification mechanism should be only performed on object constants appearing in general patterns, otherwise, we would be adding vagueness to the specific patterns of the knowledge base, and thus, we would be reducing the unification degree between fuzzy events. Notice that in the example above we only fuzzify the constant 35 and not the constant 34. (ii) Advantages of incorporating such fuzzification mechanism clearly depend on the kind of necessity measures used for computing the partial matching between fuzzy events. Namely, given two fuzzy sets A and B , N (A j B ) is computed in PGL as inf x B (x) )

f(price book(34); 1); (price book(35) ! buy book; 1)g ; should be transformed into

f(price book(34); 1); (price book(x) ! buy book; around 35(x))g ; where we take around 35(x) = S (35; x), with

S : Dprice

EUR

 Dprice EUR ! [0; 1]

being a fuzzy proximity (i.e. reflexive) relation on the domain Dprice EUR of the sort price EUR. Now, applying the PLFC resolution rule [3], we would infer

(buy book; N (around 35 j 34)); and in this case we have

N (around 35 j 34) = around 35 (34) = S (35; 34): Hence,

(buy book; S (35; 34))

would be the derived clause after using the proposed similarity-based unification mechanism. The paper is organized as follows. In Section 2 we define a Horn-rule sublogic with only disjunctive fuzzy constants of PLFC. In Section 3 we extend this sublogic with fuzzy proximity relations. In Section 4 we provide this extension with a simple an efficient version of the PLFC refutation proof method.

2. A Horn sublogic of PLFC PLFC provides a powerful framework for reasoning under possibilistic uncertainty and representing disjunctive and conjunctive vague knowledge. Following [3], a general PLFC clause is a pair of the form

('(x); f (y )); where x  and y denote sets of free and implicitly universally quantified variables each having its sort such that y  x ; '(x), called base formula, is a disjunction of (positive and negative) literals with typed classical predicates and possibly with fuzzy constants, each one having its sort; and f ( y ) is a valid valuation function which expresses the certainty of '( x) in terms of necessity measures. Basically, valuation functions f ( y) are either constant values in the real interval [0; 1], or membership functions of fuzzy sets (fuzzy constants), or max-min combinations of them, or necessity measures on them. For instance,

(:s(A) _ :p(x) _ q(C ); min( ; B (x))) is a general PLFC clause with (fuzzy) constants A and C in the logical part and with a fuzzy constant B in the valuation function. On the one hand, as variable valuation functions in PLFC act as a (flexible) restrictions on the universal quantifier, the above general PLFC clause is understood as the following collection of instantiated clauses with constant weights:

f(:s(A) _ :p(b) _ q(C ); min( ; B (b))) j b 2 X g where b varies on the set of precise object constants X (of the corresponding sort). On the other hand, as fuzzy constants of the the logical part of PLFC clauses express disjunctive (vague) knowledge, in case A and C are imprecise but not fuzzy, :s(A) and q(C ) are respectively interpreted in PLFC as “9 y

2 A; :s(y)”

and “9 y

2 C; q(y)”.

Therefore, when representing the above general PLFC clause in a Horn-rule syntax-style we get

(s(A) ^ p(x) ! q(C ); min( ; B (x))); which, if A and C are imprecise but not fuzzy, has to be interpreted as

([8y 2 A; s(y)] ^ [9x 2 B; p(x)] ! [9y 2 C; q(y)]; ): Thus, it is clear that when we transform PLFC clauses into a Horn-rule syntax-style, (fuzzy) constants are interpreted as conjunctive information if they appear in the antecedent of a Horn-rule and, as disjunctive information otherwise.

Our aim in this paper is to extend a Horn-rule sublogic of PLFC with a similarity-based unification mechanism of precise constants, thus we shall focus on the fragment of PLFC clauses with only disjunctive fuzzy constants. In the rest of this paper we shall refer to this sublogic as Horn PLFC.

x); f (y )) A Horn PLFC clause is a PLFC clause ('( such that in the base formula '( x) there exists at most one positive literal and negative literals do not involve imprecise and fuzzy constants. From now on, for the sake of a simpler and more standard notation, we write a Horn PLFC clause (:p1 _    _ :pk _ q; f ) as (p1 ^    ^ pk ! q; f ). For instance, the statements “it is more or less sure that Mary is young”and “it is almost sure young people have low salaries”, can be represented in this framework respectively as

(age(Mary; young); 0:7) and

(age(x; y) ! salary(x; low); min(0:9; young(y))), where age(; ) and salary(; ) are classical predicates of type (person name; years old) and (person name; salary EUR), respectively; Mary is an object constant of sort person name; young is a fuzzy constant of sort years old; and low is a fuzzy constant of sort salary EUR.

3. Adding fuzzy proximity relations In this section we formally extend Horn PLFC with a similarity-based unification mechanism of precise constants. First of all, let us briefly recall PLFC semantics. A many-valued interpretation w = (U; i; m) maps: 1. each sort  into a non-empty domain U  of U ; 2. a predicate p of type (1 ; : : :; n) into a crisp relation i(p)  U 1  : : :  Un ; and 3. an object constant A (precise or fuzzy constant) of sort  into a normalized fuzzy set m(A) with membership function  m(A) : U ! [0; 1]. We denote by m(A) the membership function of m(A). When A is a precise constant c, then m(A) will represent the singleton m(c) An evaluation of variables is a mapping e associating to each variable x of sort  an element e(x) 2 U , and the truth value of an atomic formula p(: : :; x; : : :; A; : : :) under an interpretation w = (U; i; m) and an evaluation of variables e is defined as we (p(: : : ; x; : : :; A)) =

sup(u;:::;v) i(p) min(: : : ; e(x)(u); : : :; m(A) (v)). 2

This truth value extends to Horn-rules with only disjunctive fuzzy constants in the following way: w e (p1 ^    ^ pk ! q) = max(1 min(we (p1 ); : : :; we(pk )); we(q)): Finally, the truth-value under the interpretation w is defined as w(p1 ^    ^ pk ! q) = inf e we(p1 ^    ^ pk ! q). In order to define the possibilistic semantics, we need to fix a context. Basically a context is the set of interpretations sharing a common domain U and an interpretation of object constants m. So, given U and m, its associated context U;m is just the set fwinterpretation j w = (U; i; m)g. Now, for each possibility distribution on the context  : U;m ! [0; 1], and each Horn PLFC rule ('; ), we define

 j= ('; ) iff N (['] j )  where N ( j ) is the necessity measure induced by  on fuzzy sets interpretations. Namely, ['] is the fuzzy set of interpretations of , defined as  ['] = w('), and N (['] j ) = w inf max(1 (w); w(')):

2

U;m

Here, we have considered rules with a constant weight . If the Horn PLFC rule has a variable weight, e.g. ('(x); A(x)), then the above definition, always in the same context, extends to

 j= ('(x); A(x)) iff  j= ('(c); m(A) (m(c)) for all precise object constants c. Indeed, our intention in extending Horn PLFC with fuzzy proximity relations is to interpret a clause of the form (p(a) ! q(B ); ), where a is a precise constant, as (p(x) ! q(B ); min( ; around a(x))), where around a is the result of fuzzifying a by means of some fuzzy similarity relation. Hence, at the syntactic level, we are lead to an extra-logical transformation of Horn PLFC clauses with precise constants in the antecedents to Horn PLFC clauses with variable weights. Thus, in general, for each precise object constant a we shall assume there exists a fuzzy constant ^ a corresponding to the fuzzification of a by means of some fuzzy proximity relation. At the semantic level, in each context U;m , we need to introduce a collection S of fuzzy similarity relations S : U  U ! [0; 1], one into each domain U , in order to provide the meaning of the new fuzzy constants ^ a’s. Summarizing, given an initial set of Horn PLFC clauses K , a context U;m and a collection of similarity relations S , to perform possibilistic reasoning extended with similarity-based unification (of precise constants) we propose the following steps: 1. Define a syntactical transformation of Horn PLFC

rules

 : K 7! K

0

which substitutes any precise constant a in the antecedent of a Horn PLFC rule by a variable x and adds a corresponding variable weight ^ a(x) in the valuation part. For instance ((p(a) ! q(B ); )) = (p(x) ! q(B ); min( ; ^a(x))). 2. Define a new extended context U;mS , where mS is like m but further mapping each new fuzzy constant a ^ to a to a fuzzy set mS (^a) : U ! [0; 1] defined as mS (^a) (u) = S (u; m(a)), for each precise constant a of sort . 3. Use the usual logical deduction machinery of PLFC to K 0 under the new context U;mS .

4. Resolution and refutation in Horn PLFC extended with fuzzy proximity relations According to Sections 2 and 3, at the syntactic level, a Horn PLFC knowledge base extended with fuzzy proximity relations corresponds to a particular set of PLFC clauses such that negative literals do not involve neither fuzzy constants nor precise constants and with at most one positive literal. Therefore, although the general resolution by refutation proof method of PLFC can be used for this particular class of clauses, we can develop a simpler and more efficient refutation proof method oriented to queries, and based on a particularization of the resolution and merging PLFC inference rules [3]. Given a context U;mS , for this restricted class of Horn PLFC rules, the PLFC resolution rule can be particularized as follows:

(p ^ s ! q(B ); ) (q(y) ^ t ! r; A(y)) (p ^ s ^ t ! r; min( ; N (mS (A) j [mS (B )] )))) ; where

N (mS (A) j [mS (B )] ) =

inf  (u); u2[mS (B) ] mS (A)

with [mS (B )] denoting the -cut of m S (B ). The resolution rule produces conclusions which are all the stronger as mS (A) is large and mS (B) is small. Therefore, in order to get higher necessity degrees during the refutation proof procedure, it is interesting to have Horn clauses with larger variable weights. Then, given a context U;mS , for our restricted class of Horn

PLFC rules, the PLFC merging rule can be formulated in the following way:

(p(x) ^ s ! q(B1 ); f1(x)) (p(y ) ^ t ! q(B2 ); f2 (y)) (p(x) ^ s ^ t ! q(B ); max(f1 (x); f2 (x))) ; if mS (B)  max(mS (B ) ; mS (B ) ). 1

2

In classical Horn-based systems, the proof method is oriented to queries, i.e. existentially quantified atomic formulas. Hence, in our current framework, the refutation-based proof method should be oriented to clauses of the form (q(B1 ; : : :; Bn ); ), where B1 ; : : :; Bn should be object (fuzzy) constants and should be understood as a proof threshold. In doing so, in contrast to PLFC, the proof mechanism for this restricted class of clauses can be divided into two different and sequential phases: 1) a completion algorithm which, like in the PGL system [2], ensures that a fuzzy knowledge base is extended with all hidden clauses, i.e. Horn PLFC clauses are extended with possible larger variable weights; and 2) a resolution proof algorithm by refutation. Namely, let U;m be a context and S a set of fuzzy proximity relations. Further, let U;mS the extended context and let K 0 = (K ) be a set of Horn PLFC clauses with fuzzified precise constants. Finally, let E K 0 be the result of extending K 0 by applying resolution and merging rules, with possibly larger variable weights. Then, in order to check whether K 0 entails, in the context U;mS , a query q(B ) with a necessity of at least , we apply the following sequential steps: 1. Negate the query q(B ), where

: [q(B )] = (q(x) ! ?; B (x)): 2. Search for a deduction of (?; ), with  , by repeatedly applying the resolution rule to K 00 = E K 0 [ f(q(x) ! ?; B (x))g. Finally, let us briefly discuss the interest of this extension by means of one example. Let K be the following set of Horn clauses modeling an student evaluation assessment: r1: r2: r3:

(solve(x) ! interest(8:5); exercice(x)) (exam grade(4) ^ interest(y) ! ! final grade(5); high(y)) (exam grade(4) ^ solve(y) ! ! final grade(6); experiment(y))

where 4, 5 and 6 denote precise object constants of sort grade; and let m be the following interpretation of object constants:

    

m(experiment) = fe1; e2 g, m(exercice) = fx1; x2; x3g, m(exp [ exer) = m(experiment) [ m(exercice), m(high) = [8 9] (on a scale form 1 to 10), and m(pass) = [5:1 6:5] (on a scale form 1 to 10).

Suppose now that somebody did not pass the exam, with a grade 3:9, and he is interested in checking whether he can get an improved final grade with either developing one experiment or one exercise. This data can represented in this framework as: f1:

(exam grade(3:9); 1)

f2:

(solve(exp [ exer); 1)

Obvioulsy, the query

final grade(pass) can be proved from K [ ff1, f2g, by refutation and fusion, only at the degree 0. However, if the student assumes that professors make use of the above rules in an approximate rather than crisp way, he can extend the knowledge base K with some fuzzy proximity relation S for the sort grade to see what can happen. Then r2 and r3 are transformed respectively into

(exam grade(x) ^ interest(y) ! ! final grade(5); min(^4(x); high(y))) r3’: (exam grade(x) ^ solve(y) ! ! final grade(6); min(^4(x); experiment(y))) r2’:

4 depends on the definition and the interpretation of ^ of Sgrade . For instance, assume Sgrade (u; v) = max(0; 1 4  ju vj). Then, completing the extended knowledge base, r1 can be chained with r2’ and the new Horn clause is r1-2’:

(exam grade(x) ^ solve(y) ! ! final grade(5); min(^4(x); exercise(y))),

and merging r1-2’ and r3’, the new Horn clause is r1-2’-3’:

(exam grade(x) ^ solve(y) ! ! final grade(f5; 6g); f (x; y))

with f (x; y) = max(min(^ 4(x); exercise(y));

min(^4(x); experiment(y))).

Hence, r1-2’-3’ can be seen as a valid (hidden) clause of the extended knowledge base and can be obtained

through the resolution and fusion inference rules. Finally, applying repeatly the resolution rule to f1, f2, r12’-3’ and the Horn clause that results of negating the query, i.e.

(final grade(x) ! ?; pass(x)); we deduce (?; 0:6), (since under the current interpretation  ^4 (3:9) = 0:6) and thus, the student can have

[3] T. Alsinet, L. Godo, and S. Sandri. On the semantics and automated deduction for PLFC, a logic of possibilistic uncertainty and fuzziness. In Proceedings of UAI’99 Conference, pages 3–12, Stockholm, Sweden, 1999. Extended version as IIIA Tech. Report 99-09. Available at http://www.iiia.csic.es/Publications/Reports/1999.

some hope to finally pass the subject when extending the rule-based mechanism assessment with the above fuzzy proximity relation of grades.

[4] F. Arcelli, F. Formato, and G. Gerla. Extending unification through similarity relations. BUSEFAL, 70:3–12, 1997. IRIT, Toulouse, France.

5

[5] F. Arcelli, F. Formato, and G. Gerla. Fuzzy unification as a foundation of fuzzy logic programming. In F. Arcelli and T.P. Martin, editors, Logic Programming and Soft Computing, chapter 3, pages 51–68. Research Studies Press, 1998.

Conclusions

Within the framework of Possibilistic logic programming, in this paper we have addressed the issue of extending the (graded) unification of fuzzy constants to cope with a similarity-based unification of precise object constants. For simplicity and practical reasons, we have focused on the sublogic of Horn-like PLFC clauses expressing disjunctive information, hence fuzzy constants are only allowed in the head of a clause. Then, each precise object constant appearing in the body of a clause is fuzzified by means a similarity relation, and the fuzzified constant is placed as a variable weight. With this we enlarge the applicability of the clause to constants close to the original ones. The similarity-based fuzzification of precise constants can be easily extended to fuzzy constants themselves. On the other hand, the proposed methodology can be used solely as a pure similarity-based reasoning with classical (precise) constants (that is, with no fuzzy constants at all). The comparison of the resulting system with the ones proposed by Arcelli, Formato, Gerla and Sessa [5, 11] on the one hand, and the one proposed by Vinaˇr and Vojt´asˇ [13], in different frameworks, will be a matter of high interest.

References [1] T. Alsinet and L. Godo. A complete calculus for possibilistic logic programming with fuzzy propositional variables. In Proceedings of UAI’2000 Conference, pages 1–10, Stanford, CA, 2000. [2] T. Alsinet and L. Godo. A complete proof method for possibilistic logic programming with semantical unification of fuzzy constants. In Proceedings of ESTYLF’2000 Conference, pages 279– 284, Sevilla, Spain, 2000. Extended version as DIEI-UdL Tech. Report 00-2. Available at http://fermat.eup.udl.es/tracy/report002.ps.

[6] D. Dubois, J. Lang, and H. Prade. Automated Reasoning Using Possibilistic Logic: Semantics, Belief Revision and Variable Certainty Weights. IEEE Trans. on Data and Knowledge Engineering, 1(6):64–71, 1994. [7] D. Dubois, J. Lang, and H. Prade. Handling uncertainty, contex vague predicates and partial inconsistency in possibilistic logic. In P.W. Eklund D. Driankov and A.L. Ralescu, editors, Fuzzy Logic and Fuzzy Control, pages 45–55. SpringerVerlag, LNAI 833, 1994. [8] D. Dubois, J. Lang, and H. Prade. Possibilistic logic. In D.M. Gabbay, C.J. Hogger and J.A. Robinson, editor, Handbook of Logic in Artificial Intelligence and Logic Programming, pages 439– 513. Oxford University Press, 1994. [9] D. Dubois, H. Prade, and S. Sandri. Possibilistic logic augmented with fuzzy unification. In Proceedings of IPMU’96 Conference, pages 1009– 1014, Granada, Spain, 1996. [10] D. Dubois, H. Prade, and S. Sandri. Possibilistic logic with fuzzy constants and fuzzily restricted quantifiers. In F. Arcelli and T.P. Martin, editors, Logic Programming and Soft Computing, chapter 4, pages 69–90. Research Studies Press, 1998. [11] F. Formato, G. Gerla, and M. Sessa. Similaritybased unification. Fundamenta Informaticae, 40:1–22, 2000. [12] L.G. Rios-Filho and S. Sandri. Contextual fuzzy unification. In Proceedings IFSA’95 Conference, pages 81–84, S˜ao Paulo, Brazil, 1995. [13] J. Vinaˇr and P. Vojt´asˇ. A formal model for fuzzy knowledge based systems with similarities. Neural Network World, 10(5):891–905,2000.