• No results found

The ranking-based inference framework

5.3 Ranking facts in inconsistent knowledge bases

5.3.1 The ranking-based inference framework

We introduce the Ranking-based Inference Framework (RIF) and its three main components: the inconsistency value, the lifting function and the inconsistency-tolerant inference. It is similar to the work in argumenta- tion by Konieczny et al. [2015], where only the best extensions are used for reasoning. The section is organised as follows: in Section 5.3.1.1, we recall the notion of Drastic and MI Shapley inconsistency values, in Section 5.3.1.2, we give examples of lifting functions and in Section 5.3.1.3, we show how inconsistency-tolerant inferences are modified in order to be used in the framework.

An inconsistency measure according to Grant and Hunter [2011] is a function that, given a knowledge baseKB = (F, R, N), associates a number to each set of facts.

Definition 5.22 (Inconsistency measure). An inconsistency measure is a functionI : KBs×2L→ R such that for every KB = (F, R, N) ∈ KBs and C,C0 2L:

• I (KB,C) = 0 if and only if C is R-consistent • I (KB,C ∪ C0) ≥ I (C)

• if α is a free fact of KB, then I (KB, F) = I (KB, F\{α}).

For readability purposes, we will use the notation IKB(C) instead of I (KB,C) and I (C) if the working knowledge base KB is obvious.

An inconsistency value is a function that associates a number to each fact of a knowledge base KB. Many inconsistency values were defined by Hunter and Konieczny [2010] using existing inconsistency measures and the Shapley value from coalitional game theory. We introduce a framework that makes use of these inconsistency values together with a lifting function and an inconsistency-tolerant inference relation to improve the productivity of query answering for an inconsistent knowledge base.

Our framework is based on three layers. First, an inconsistency value is used to calculate the score of each fact of KB. We previously mentioned Shapley inconsistency values, but any function returning a score for each fact of KB can be used.

Definition 5.23 (Inconsistency value). An inconsistency value is a func- tion V :KBs×L → R. Let VL be the total, reflexive and transitive binary order on L with respect to KB and V defined as: for every a,b ∈ L, a V

Lb if and only if V(KB, a) ≤ V(KB,b).

For readability purposes, we write Va(KB) instead of V(KB, a). More- over, we write  instead of V

L when L and V are obvious.

Second, we need a lifting function, i.e. a function that compares the set of repairs, based on the individual scores of facts with respect to an inconsistency value. A criterion of comparison would be to evaluate the “strongest” fact of each set. A generalisation of this criterion is the so- called leximax which, in the case where the best facts are equally strong, proceeds to compare the next best fact of each set. Please note that the set of all total, reflexive and transitive binary orders onX is denoted by X. Definition 5.24 (Lifting function). A lifting function is a function L : 2L× L→2L.

For readability purposes, we use the notation L(X ) for L(X, ). Fur- thermore, (E, E0) ∈ L(X ) means that E is better than or equal to E0.

Third, we use an inconsistency-tolerant inference relation restricted to the best repairs sets ranked by the lifting function to answer the query. At this step, one can use the usual inconsistency-tolerant inference relations such as AR, IAR, ICR or any of the modifier-based semantics of Baget et al. [2016a]

Definition 5.25 (Inference). An inconsistency-tolerant inference relation is a function |=: KBs ×Q →{True, False}.

Based on the previous notions, we define our framework (see Figure 5.6). Definition 5.26 (RIF). A ranking-based inference framework (RIF) is a tuple RIF = (V, L, |=) where V is an inconsistency value, L is a lifting function and |= is an inconsistency-tolerant inference. The top result of RIF = (V, L, |=) on a knowledge base KB = (F, R, N) is OUTRIF(KB) ={E ∈ repairs(KB) | for all E0repairs(KB), (E, E0) ∈ LVF(F)}.

5.3.1.1 RIF inconsistency value

An inconsistency value is a function that associates a value to each fact of the knowledge base. This value is supposed to be higher the more a fact is conflicting with the other facts. In this thesis, we make the choice to focus on the Shapley inconsistency value introduced by Hunter and Konieczny [2010] because it possesses many desirable properties as will be shown in Propo- sition 5.17 below. The Shapley inconsistency value uses notions from game theory to measure the responsibility of each fact to the overall inconsistency of the knowledge base.

KB INC .... 1 0.9 0.7 0 L .... r1 r2 rn Set of Repairs Ranking on Facts ... r1 r2 rn Ranking on Repairs

Set of Best Repairs

r2

Query

?

Answer

Repair Generation

Definition 5.27 (Shapley inconsistency value). Let I be an inconsis- tency measure, KB = (F, R, N) a knowledge base and f ∈ F, the Shapley inconsistency value corresponding toI, noted VI is defined as:

VfI(KB) = X C ⊆F

(|C| − 1)!(|F| − |C|)!

|F|! (I

KB(C) − IKB(C\{f}))

Note that if one considers F as the vector (f1, f2, . . . , fn), then VI(KB) is the vector of corresponding Shapley inconsistency values, i.e. VI(KB) = (VI f1(KB), V I f2(KB), . . . , V I fn(KB)).

LetKB = (F, R, N) be a knowledge base, the inconsistency values inves- tigated in this thesis are the following:

• The drastic Shapley inconsistency value is computed by using the fol- lowing inconsistency measure:

IdKB(X ) =     

0 ifX is R-consistent with respect to KB 1 otherwise

• The MI Shapley inconsistency value is computed by using the following inconsistency measure:

IKB

MI (X ) = |MI ((X, R, N))|

We now show that every Shapley inconsistency value satisfies Distribu- tion, Symmetry and Minimality. The result and its proof are similar to that of Hunter and Konieczny [2010].

Proposition 5.17 (Shapley I.V. property satisfaction). Let I be an arbitrary inconsistency measure and KB = (F, R, N) a knowledge base, the Shapley inconsistency value corresponding to I satisfies:

• (Distribution) P a ∈FV

I

a(KB) = IKB(F)

• (Symmetry) If a,b ∈ F such that for all X0 F, a,b < X0 we have IKB(X0{a}) = IKB(X0{b}) then it holds that VI

a(KB) = VbI(KB) • (Minimality) If a is a free fact of KB then VIa(KB) = 0

In Example 5.12, we show how the MI and drastic Shapley inconsistent values are computed from a simple knowledge base.

Example 5.12 (MI and drastic Shapley inconsistency values). Let us consider the knowledge baseKB = (F, R, N) where F ={d (m), a(m), c(m),b(m, s)}, R = {∀X (c(X ) ∧ b(X, s) → u(X ))} and N = {∀X (d (X ) ∧ a(X ) → ⊥), ∀X

(u(X ) ∧ d (X ) → ⊥), ∀X (u(X ) ∧ a(X ) → ⊥)}. We have that VId d (m)(KB) = 4 × 121 = 1 3 and V IM I d (m)(KB) = 4 × 121+ 1 4 × 2 = 5

6. Thus, here we have that F = {d (m), a(m), c(m),b(m, s)} and VId(KB) = (1 3, 1 3, 1 6, 1 6) and V IM I(KB) = (5 6, 5 6, 2 3, 2

3). Since a higher score means being more inconsistent, the resulting ranking on facts, for both in- consistency values, isc(m) ∼ b(m, s)  d (m) ∼ a(m).

We recall that we work with the total, reflexive and transitive ranking V

F on F extracted from the inconsistency value. 5.3.1.2 RIF lifting

A lifting function L compares sets of elements with respect to the ranking  and returns a total order on the sets.

Let us first introduce the sort relation that will be used in order to define the Lleximax notion below. Given a set of elements X ={x1, x2, . . . , xn}and a total, reflexive and transitive binary relation  onX , sort(X, ) returns a sorted vector (x1, x2, . . . , xn) such that for every xi, xj, we have thatxi  xj if and only ifi ≤ j. The element at position i in the vector sort(X, ) is denoted by sorti(X, ). Note that the returned vector is not necessarily unique due to the fact that some elements might be equivalent, i.e. xi ∼xj. In this thesis, we consider two possible instantiations of the lifting func- tion L. The Lmax lifting function compares the subsets with respect to their maximal elements and Lleximax compares the elements after sorting them in decreasing order.

LetY be a set of elements,  be a ranking on Y, E, E0∈2Y, sort(E, ) = (x1, x2, . . . , xn) and sort(E0, ) = (x10, x20, . . . , xm0 ). We say that:

• (E, E0) ∈ L

max(Y ) if and only if max (E)  max (E0), where max (X ) = sort1(X, ).

• (E, E0) ∈ L

leximax(Y ) if and only if one of the following holds: (1) m = n and for every i ∈ {1, . . . , n}, xi ∼ xi0, (2) there exists i ∈

{1, . . . ,min(m, n)}such thatxi xi0and for everyj ∈{1, . . . , i − 1}, xj ∼ x0

j or (3)n > m and for every i ∈{1, . . . ,m},xi ∼xi0.

Example 5.13 (Example 5.12 cont’d). Let RIF = (VId, Lleximax , |=) be a RIF. It holds that for every R ∈ repairs(KB) \{c(m),b(m, s)}, we have ({c(m),b(m, s)}, R) ∈ L

leximax(F) but (R,{c(m),b(m, s)}) < Lleximax (F) and thus, OUTRIF(KB) ={{c(m),b(m, s)}}

5.3.1.3 RIF inference

Inconsistency-tolerant query answering is a challenging problem that re- ceived a lot of attention recently. We recall that we place ourselves in the context of OBDA, where the ontology is assumed to be satisfiable and fully reliable. In the following, we recall some of the most well-known inconsistency-tolerant inferences that have been proposed in the literature. Let KB = (F, R, N) be a knowledge base and q be a boolean conjunctive query. Then:

• q is said to be AR entailed by KB denoted by KB |=AR q if and only if for everyR ∈ repairs(KB), C`R(R) |= q

• q is said to be IAR entailed by KB denoted by KB |=I ARq if and only ifC`R* , T R ∈r epair s (KB)R+ - |= q

• q is said to be ICR entailed by KB denoted by KB |=ICRq if and only

if T

R ∈r epair s (KB)C`R(R) |= q

Example 5.14 (Example 5.12 cont’d). A queryq = ∃x (c(x)) is not AR, IAR nor ICR entailed. Indeed, we cannot entail q from the closure of all the repairs, the intersection of the closure of all the repairs nor the closure of the intersection of all repairs.

We propose here to reuse AR, IAR, ICR by restricting them to the top result of aRIF instead of the whole set of repairs.

Definition 5.28 (Restricted inference). Let x ∈ {AR, IAR, ICR}. We denote the restriction of |=x to the top result ofRIF instead of the whole set of repairs by |=RIFx .

For instance, the restricted version of AR will be denoted by |=RIFAR and defined asKB |=RIFAR q if and only if for every R ∈ OUTRIF(KB), C`R(R) |= q. Example 5.15 (Example 5.13 cont’d). Let us consider the query q = ∃X (c(X )). The query q is AR, IAR and ICR entailed with respect to RIF since OUTRIF(KB) ={{c(m),b(m, s)}}.