SLIDE 1 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Data Repair of Inconsistent DL-Programs
Thomas Eiter Michael Fink Daria Stepanova
Knowledge-Based Systems Group, Institute of Information Systems, Vienna University of Technology http://www.kr.tuwien.ac.at/
IJCAI 2013 –August 6, 2013
1 / 18
SLIDE 2 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Motivation
- DL-program: ontology + rules
(loose coupling combination approach);
- DL-atoms serve as query interfaces to
- ntology;
- Possibility to add information from the rule
part to ontology prior to querying it allows for bidirectional information flow. However, information exchange between rules and ontology can have unforeseen effects and cause inconsistency of the DL-program (absence of answer sets).
1 / 18
SLIDE 3 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Motivation
- DL-program: ontology + rules
(loose coupling combination approach);
- DL-atoms serve as query interfaces to
- ntology;
- Possibility to add information from the rule
part to ontology prior to querying it allows for bidirectional information flow. However, information exchange between rules and ontology can have unforeseen effects and cause inconsistency of the DL-program (absence of answer sets). In this work: Repair data part of the ontology (DL-LiteA), i.e. change
- ntology ABox s.t. the resulting DL-program is consistent.
1 / 18
SLIDE 4 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Overview
Motivation DL-programs Repair answer sets Computation Conclusion
2 / 18
SLIDE 5 Motivation Overview DL-programs Repair answer sets Computation Conclusion
DL-LiteA
- Lightweight Description Logic for accessing large data sources.
- Concepts and roles model sets of objects and their relationships.
C → A | ∃R R → P|P−
- A DL-LiteA ontology O = T , A consists of:
- TBox T specifying constraints at the conceptual level.
C1 ⊑ C2, C1 ⊑ ¬C2, R1 ⊑ R2, R1 ⊑ ¬R2, (funct R).
- ABox A specifying the facts that hold in the domain.
A(b) P(a, b)
3 / 18
SLIDE 6 Motivation Overview DL-programs Repair answer sets Computation Conclusion
DL-LiteA
- Lightweight Description Logic for accessing large data sources.
- Concepts and roles model sets of objects and their relationships.
C → A | ∃R R → P|P−
- A DL-LiteA ontology O = T , A consists of:
- TBox T specifying constraints at the conceptual level.
C1 ⊑ C2, C1 ⊑ ¬C2, R1 ⊑ R2, R1 ⊑ ¬R2, (funct R).
- ABox A specifying the facts that hold in the domain.
A(b) P(a, b)
Example
T =
Female ⊑ ¬Male
Male(john)
SLIDE 7 Motivation Overview DL-programs Repair answer sets Computation Conclusion
DL-LiteA
- Lightweight Description Logic for accessing large data sources.
- Concepts and roles model sets of objects and their relationships.
C → A | ∃R R → P|P−
- A DL-LiteA ontology O = T , A consists of:
- TBox T specifying constraints at the conceptual level.
C1 ⊑ C2, C1 ⊑ ¬C2, R1 ⊑ R2, R1 ⊑ ¬R2, (funct R).
- ABox A specifying the facts that hold in the domain.
A(b) P(a, b)
Example
T =
Female ⊑ ¬Male
Male(john)
- Conjunctive query answering in DL-LiteA is tractable [Calvanese et al., 2007].
3 / 18
SLIDE 8 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Example: DL-program
Π = O, P is a DL-program. O = (1) Child ⊑ ∃hasParent (4) Male(pat)
(2) Adopted ⊑ Child (5) Male(john) (3) Female ⊑ ¬Male (6) hasParent(john, pat)
SLIDE 9 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Example: DL-program
Π = O, P is a DL-program. O = (1) Child ⊑ ∃hasParent (4) Male(pat)
(2) Adopted ⊑ Child (5) Male(john) (3) Female ⊑ ¬Male (6) hasParent(john, pat)
(7) ischildof(john, alex); (8) boy(john); (9) hasfather(john, pat) ← DL[Male ⊎ boy; Male](pat), DL[; hasParent](john, pat)
- interpretation: I = {ischildof(john, alex), boy(john), hasfather(john, pat)};
- satisfaction relation: I |
=O boy(john); I | =O DL[; hasParent](john, pat);
- semantics is given in terms of answer sets, which are x-founded models;
- flp and weak semantics are relevant in this work;
- I is both weak- and flp-founded model.
4 / 18
SLIDE 10 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Example: Inconsistent DL-program
Π = O, P O = (1) Child ⊑ ∃hasParent (4) Male(pat)
(2) Adopted ⊑ Child (5) Male(john) (3) Female ⊑ ¬Male (6) hasParent(john, pat)
(7) ischildof(john, alex); (8) boy(john); (9) hasfather(john, pat) ← DL[; Male ⊎ boy; Male](pat), DL[; hasParent](john, pat); (10) ⊥ ← not DL[; Adopted](john), pat = alex, hasfather(john, pat), ischildof(john, alex), not DL[Child ⊎ boy; ¬Male](alex)
5 / 18
SLIDE 11 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Example: Inconsistent DL-program
Π = O, P O = (1) Child ⊑ ∃hasParent (4) Male(pat)
(2) Adopted ⊑ Child (5) Male(john) (3) Female ⊑ ¬Male (6) hasParent(john, pat)
(7) ischildof(john, alex); (8) boy(john); (9) hasfather(john, pat) ← DL[; Male ⊎ boy; Male](pat), DL[; hasParent](john, pat); (10) ⊥ ← not DL[; Adopted](john), pat = alex, hasfather(john, pat), ischildof(john, alex), not DL[Child ⊎ boy; ¬Male](alex)
5 / 18
SLIDE 12 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Example: Inconsistent DL-program
Π = O, P O = (1) Child ⊑ ∃hasParent (4) Male(pat)
(2) Adopted ⊑ Child (5) Male(john) (3) Female ⊑ ¬Male (6) hasParent(john, pat)
(7) ischildof(john, alex); (8) boy(john); (9) hasfather(john, pat) ← DL[; Male ⊎ boy; Male](pat), DL[; hasParent](john, pat); (10) ⊥ ← not DL[; Adopted](john), pat = alex, hasfather(john, pat), ischildof(john, alex), not DL[Child ⊎ boy; ¬Male](alex)
5 / 18
SLIDE 13 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Example: Inconsistent DL-program
Π = O, P is inconsistent! O = (1) Child ⊑ ∃hasParent (4) Male(pat)
(2) Adopted ⊑ Child (5) Male(john) (3) Female ⊑ ¬Male (6) hasParent(john, pat)
(7) ischildof(john, alex); (8) boy(john); (9) hasfather(john, pat) ← DL[; Male ⊎ boy; Male](pat), DL[; hasParent](john, pat); (10) ⊥ ← not DL[; Adopted](john), pat = alex, hasfather(john, pat), ischildof(john, alex), not DL[Child ⊎ boy; ¬Male](alex)
No answer sets.
5 / 18
SLIDE 14 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Example: Inconsistent DL-program
Π = O, P is consistent! O = (1) Child ⊑ ∃hasParent (4) Male(pat)
(2) Adopted ⊑ Child (5) Male(john) (3) Female ⊑ ¬Male
(7) ischildof(john, alex); (8) boy(john); (9) hasfather(john, pat) ← DL[; Male ⊎ boy; Male](pat), DL[; hasParent](john, pat); (10) ⊥ ← not DL[; Adopted](john), pat = alex, hasfather(john, pat), ischildof(john, alex), not DL[Child ⊎ boy; ¬Male](alex)
I1 = {ischildof(john, alex), boy(john)}
5 / 18
SLIDE 15 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Example: Inconsistent DL-program
Π = O, P is consistent! O = (1) Child ⊑ ∃hasParent (4) Female(pat)
(2) Adopted ⊑ Child (5) Male(john) (3) Female ⊑ ¬Male (6) hasParent(john, pat)
(7) ischildof(john, alex); (8) boy(john); (9) hasfather(john, pat) ← DL[; Male ⊎ boy; Male](pat), DL[; hasParent](john, pat); (10) ⊥ ← not DL[; Adopted](john), pat = alex, hasfather(john, pat), ischildof(john, alex), not DL[Child ⊎ boy; ¬Male](alex)
I1 = {ischildof(john, alex), boy(john)}
5 / 18
SLIDE 16 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Repair Answer Sets
Definition
Let Π = O, P, O = T , A be a DL-program,
- an ABox A′ is an x-repair of Π if
- O′ = T , A′ is consistent;
- Π′ = O′, P has some x-answer set.
repx(Π) is the set of all x-repairs of Π.
- I is an x-repair answer set of Π, if I ∈ ASx(Π′), where
Π′ = O′, P, O′ = T , A′, and A′ ∈ repx(Π). RASx(Π) is the set of all x-repair AS of Π. repI
x(Π) is the set of all A′ under which I is an x-repair answer set of Π.
6 / 18
SLIDE 17 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Repair Answer Sets
Definition
Let Π = O, P, O = T , A be a DL-program,
- an ABox A′ is an x-repair of Π if
- O′ = T , A′ is consistent;
- Π′ = O′, P has some x-answer set.
repx(Π) is the set of all x-repairs of Π.
- I is an x-repair answer set of Π, if I ∈ ASx(Π′), where
Π′ = O′, P, O′ = T , A′, and A′ ∈ repx(Π). RASx(Π) is the set of all x-repair AS of Π. repI
x(Π) is the set of all A′ under which I is an x-repair answer set of Π.
Example
I1 = {ischildof(john, alex), boy(john)} is an flp-repair answer set with repair A′
1 = {Male(pat), Male(john)}; A′ 1 ∈ repI flp(Π).
6 / 18
SLIDE 18 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Complexity of Repair Answer Sets
Theorem
Deciding ASx(Π) = ∅ and deciding RASx(Π) = ∅ have in all cases the same complexity.
Π
RASFLP(Π) = ∅ RASweak(Π) = ∅ normal ΣP
2 -complete
NP-complete
disjunctive
ΣP
2 -complete
ΣP
2 -complete
Membership:
- guess repair A′ together with I and proceed with the check as usual;
- deciding I |
=O a is feasible in polynomial time if O is in DL-LiteA;
Hardness: for normal FLP AS hardness proof of ordinary disjunctive LP can be adapted, for other cases hardness is inherited from ordinary ASP .
7 / 18
SLIDE 19 Motivation Overview DL-programs Repair answer sets Computation Conclusion
DL-program Evaluation
Π is Π with all DL-atoms a substituted by ordinary atoms ea plus
additional guess rules for values of ea;
I, Π) is a compatibility check, i.e. check whether the values of DL-atoms coincide with the values of their replacement atoms in ˆ I;
I, Π) is x-foundedness check;
I|Π is a restriction of ˆ I to original language of Π.
8 / 18
SLIDE 20 Motivation Overview DL-programs Repair answer sets Computation Conclusion
DL-program Evaluation
Reasons for inconsistency:
Π does not have any answer sets;
I ∈ AS(Π):
- a. compatibility check failed or
- b. x-foundedness check failed.
8 / 18
SLIDE 21 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Ontology Repair Problem
To address the compatibility check issue we introduce:
Definition
A ontology repair problem (ORP) is a triple P = O, D1, D2, where
O = T , A is an ontology and Di = {Ui
j , Qi j |1 ≤ j ≤ mi}, i = 1, 2 are
sets of pairs where Ui
j is any ABox and each Qi j is a DL-query.
A repair (solution) for P is any ABox A′ s.t.
- O′ = T , A′ is consistent;
- τ(T , A′ ∪ U1
k ) |
= Q1
j holds for 1 ≤ j ≤ m1;
k ) |
= Q2
j holds for 1 ≤ j ≤ m2.
9 / 18
SLIDE 22 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Ontology Repair Problem
To address the compatibility check issue we introduce:
Definition
A ontology repair problem (ORP) is a triple P = O, D1, D2, where
O = T , A is an ontology and Di = {Ui
j , Qi j |1 ≤ j ≤ mi}, i = 1, 2 are
sets of pairs where Ui
j is any ABox and each Qi j is a DL-query.
Example
Π = O, P, where P = p(c); r(c); q(c) ← DL[C − ∪ r; D](c)
; ⊥ ← DL[D ⊎ p, E
−
∪ r; ¬C](c)
.
I = {p(c), r(c), q(c), ea1}: a1 is guessed true, a2 is guessed false;
- P = O, D1, D2, where
- D1 = {{¬C(c)}; D(c)};
- D2 = {{D(c), ¬E(c)}; ¬C(c)}.
9 / 18
SLIDE 23 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Ontology Repair Problem
A repair (solution) for P is any ABox A′ s.t.
- O′ = T , A′ is consistent;
- τ(T , A′ ∪ U1
k ) |
= Q1
j holds for 1 ≤ j ≤ m1;
k ) |
= Q2
j holds for 1 ≤ j ≤ m2.
Example
Let O =
T
A
¬C(c);
- P = O, D1, D2, where
- D1 = {{¬C(c)}; D(c)};
- D2 = {{D(c), ¬E(c)}; ¬C(c)}.
9 / 18
SLIDE 24 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Ontology Repair Problem
A repair (solution) for P is any ABox A′ s.t.
- O′ = T , A′ is consistent;
- τ(T , A′ ∪ U1
k ) |
= Q1
j holds for 1 ≤ j ≤ m1;
k ) |
= Q2
j holds for 1 ≤ j ≤ m2.
Example
Let O =
T
A
¬C(c);
- P = O, D1, D2, where
- D1 = {{¬C(c)}; D(c)};
- D2 = {{D(c), ¬E(c)}; ¬C(c)}.
A′ = {A(c)} is a solution for P.
9 / 18
SLIDE 25 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Ontology Repair Problem
A repair (solution) for P is any ABox A′ s.t.
- O′ = T , A′ is consistent;
- τ(T , A′ ∪ U1
k ) |
= Q1
j holds for 1 ≤ j ≤ m1;
k ) |
= Q2
j holds for 1 ≤ j ≤ m2.
Example
Let O =
T
A
¬C(c);
- P = O, D1, D2, where
- D1 = {{¬C(c)}; D(c)};
- D2 = {{D(c), ¬E(c)}; ¬C(c)}.
ORP is NP-complete in general, even if O = ∅.
A′ = {A(c)} is a solution for P.
9 / 18
SLIDE 26 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Selection Preferences
Consider a set AB of all possible ABoxes. Function σ : 2ABxAB → 2AB is a selection function.
σ(S, A) ⊆ S is a set of preferred ABoxes.
A selection σ : 2ABxAB → 2AB is independent if
σ(S, A) = σ(S′, A) ∪ σ(S\S′, A), whenever S′ ⊆ S. Example
- deletion repair is independent;
- set-minimal change repair is not independent;
- cardinality minimal change repair is not independent.
10 / 18
SLIDE 27 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Tractable Cases of ORP
- C1. bounded δ±-change: σδ±,k(S, A) = {A′ | |A′∆A| ≤ k}, for some k;
- C2. deletion repair: σdel(S, A) = {A′ | A′ ⊆ A};
- C3. deletion δ+: first apply σdel and get µ(O) s.t. for all 1 ≤ j ≤ m2
τ(T , A′ ∪ U2
j ) |
= Q2
j , then further compute σδ+(S, µ(O));
- C4. addition under bounded opposite polarity:
σbop(S, A) = {A′ ⊇ µ(O)||A′+\A| ≤ k or |A′−\A| ≤ k}
C1 - C4 are independent.
Applicability of results for independent selections:
- deciding whether repair A′ is selected by σ
does not require looking at other repairs;
- without major complexity increase σs can be combined with
- DB-style factorization and localization techniques;
- local search.
11 / 18
SLIDE 28 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Repair Answer Set Computation
I, Π, σ) computes σ repairs for ˆ I, Π;
I, T , A′, P) checks whether ˆ I is compatible w.r.t. Π′;
I, T , A′, P) checks whether ˆ I is x-founded w.r.t. Π′. RepAnsSet outputs ˆ I if the result of RepAns is nonempty.
12 / 18
SLIDE 29 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Repair Answer Set Computation
I, Π, σ) computes σ repairs for ˆ I, Π;
I, T , A′, P) checks whether ˆ I is compatible w.r.t. Π′;
I, T , A′, P) checks whether ˆ I is x-founded w.r.t. Π′. RepAnsSet outputs ˆ I if the result of RepAns is nonempty. RepAns and RepAnsSet are sound and complete for independent σ.
12 / 18
SLIDE 30 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Related Work
- Repairing ontologies
- consistent query answering over DL-Lite ontologies
based on repair technique [Lembo et al., 2010], [Bienvenu, 2012];
- QA to DL-LiteA ontologies that miss expected tuples
(abductive explanations corresponding to repairs) [Calvanese et al., 2012].
- Repairing nonmonotonic logic programs
- extended abduction for deleting minimal sets of rules
(in reality addition is also possible) [Sakama and Inoue, 2003].
- Repairing inconsistent combination of rules and ontologies
- paraconsistent semantics, based on the HT logic [Fink, 2012];
- inconsistency tolerance in DL-programs [P¨
uhrer et al., 2010].
13 / 18
SLIDE 31 Motivation Overview DL-programs Repair answer sets Computation Conclusion
Conclusion and Future Work
Conclusions:
- consideration of repair answer sets (RAS);
- same complexity as ordinary AS (for O in DL-LiteA);
- RAS computation by extending the existing evaluation algorithm;
- involvement of a generalized ontology repair problem (ORP);
- tractable cases for independent selections.
Future work:
- extending the work to other DLs (EL++, RL);
- DL-programs with richer queries (unions of conjunctive queries);
- further σ-selections;
- optimization and implementation.
14 / 18
SLIDE 32
References I
Meghyn Bienvenu. On the complexity of consistent query answering in the presence of simple ontologies. In Proceedings of the 26th AAAI Conference on Artificial Intelligence, pages 705–711, Toronto, Ontario, Canada, July 2012. American Association for Artificial Intelligence. Diego Calvanese, Domenico Lembo, Maurizio Lenzerini, and Riccardo Rosati. Tractable reasoning and efficient query answering in description logics: The DL-Lite family. Journal of Automated Reasoning, 39(3):385–429, October 2007.
SLIDE 33
References II
Diego Calvanese, Magdalena Ortiz, Mantas Simkus, and Giorgio Stefanoni. The complexity of explaining negative query answers in DL-Lite. In Proceedings of the 13th International Conference on the Principles of Knowledge Representation and Reasoning, Rome, Italy, June 2012. American Association for Artificial Intelligence. Michael Fink. Paraconsistent hybrid theories. In Principles of Knowledge Representation and Reasoning: Proceedings of the 13th International Conference, KR, pages 141–151, Rome, Italy, June 2012. American Association for Artificial Intelligence.
SLIDE 34 References III
Domenico Lembo, Maurizio Lenzerini, Riccardo Rosati, Marco Ruzzi, and Domenico Fabio Savo. Inconsistency-tolerant semantics for description logic ontologies. In Proceedings of the 19th Italian Symposium on Advanced Database Systems, pages 103–117, Bressanone/Brixen, Italy, September 2010. Springer. J¨
uhrer, Stijn Heymans, and Thomas Eiter. Dealing with inconsistency when combining ontologies and rules using DL-programs. In Proceedings of 7th Extended Semantic Web Conference, part I, pages 183–197, Heraklion, Crete, Greece, May-June 2010. Springer. Chiaki Sakama and Katsumi Inoue. An abductive framework for computing knowledge base updates. Theory and Practice of Logic Programming, 3(6):671–713, May 2003.
SLIDE 35 DL-program: syntax
Signature: Σ = C, I, P, C, R, where
- Σ0 = I, C, R is a DL signature;
- C ⊇ I is a set of constant symbols;
- P is a finite set of predicate symbols of arity ≥ 0, s.t. P ∩ {C ∪ R} = ∅.
DL-atom is of the form DL[S1op1p1, . . . , Smopmpm; Q](t), m ≥ 0, where
∪, − ∩};
- pi ∈ P (unary or binary);
- Q(t) is a DL-query:
- C(t1), ¬C(t1), t = t1, where C ∈ C;
- R(t1, t2), ¬R(t1, t2), t = t1, t2, where R ∈ R.
- C ⊑ D, C ⊑ D, t = ǫ, where C, D ∈ C ∪ {⊤, ⊥};
DL-program: Π = O, P, O is a DL ontology, P is a set of DL-rules: a1 ∨ . . . ∨ an ← b1, . . . bk, not bk+1, . . . , not bm, m ≥ k ≥ 0, ai is a classical literal; bi is a classical literal or a DL-atom.
17 / 18
SLIDE 36 DL-program: semantics
Consider grounding grd(Π)= O, grd(P) of Π = O, P over C and P. Interpretation I is a consistent set of ground literals over C and P.
- for ground literal ℓ: I |
=O ℓ iff ℓ ∈ I;
- for ground DL-atom a = DL[S1op1p1, . . . , Smopmpm; Q](c):
I | =O a iff τ(T , A ∪ λI(a)) | = Q(c), where τ(O) is a modular translation of O to FOL, λI(a) = m
i=1 Ai(I) is a DL-update of O under I by a:
- Ai(I) = {Si(t) | pi(t) ∈ I}, for opi = ⊎;
- Ai(I) = {¬Si(t) | pi(t) ∈ I}, for opi = −
∪;
- Ai(I) = {¬Si(t) | pi(t) ∈ I}, for −
∩. FLP-reduct ρflpPI of P is a set of ground DL-rules r s.t. I | = b+(r), I | = b−(r). Weak-reduct ρweakPI of P: removes all DL-atoms bi, 1 ≤ i ≤ k and all not bj, k < j ≤ m from the rules of ρflpPI. I is an x-answer set of P iff I is a minimal model of its x-reduct.
18 / 18