Explaining Query Answers in Lightweight Ontologies: The DL-Lite Case Giorgio Stefanoni Supervisor: Prof. T. Eiter Co-Supervisors: Dr. M. Ortiz Dr. M. Šimkus Scientific Advisor: D. Calvanese Department of Computer Science University of Oxford, UK February 20, 2012 Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 1 / 34
Foundations Outline Foundations 1 Explaining Positive Answers 2 Explaining Negative Answers 3 Conclusions 4 Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 2 / 34
Foundations Query Answering in Description Logics Query q Logical cert(q,T,A) Reasoning Ontology T Data A Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 3 / 34
Foundations Conjunctive Queries Formal counterpart of Select-Project-Join Queries in RA. q ( � x ) ← ∃ � y.ψ ( � x, � y ) ψ is a conjunction of atoms over constants and variables of the form: R ( t, t ′ ) A ( t ) A Union of CQs (UCQ) is a disjunction of CQs, corresponding to a union of SPJs. Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 4 / 34
Foundations DL-Lite A Lightweight Description Logic tailored for accessing large data sources. Concepts and roles model set of objects and relationships among them. R → P | P − C → A | ∃ R A DL-Lite A ontology O = �T , A� is composed of: TBox T Specifying constraints at the conceptual level. C ⊑ D C ⊑ ¬ D ( funct R ) R 1 ⊑ R 2 R 1 ⊑ ¬ R 2 ABox A Specifying the facts that hold in the domain. A ( b ) P ( a, b ) Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 5 / 34
Foundations FO-Rewritability The perfect reformulation embeds terminological information into r q, T . Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 6 / 34
Foundations Mock Ontology Professor Course teaches Student is-a is-a is-a is-a PostGrad UnderGrad Tutor Advanced is-a hasTutor PartTime P ostGrad ⊑ Student T utor ⊑ P rofessor Advanced ⊑ Course UnderGrad ⊑ Student ∃ hasT utor ⊑ P artT ime ∃ teaches ⊑ P rofessor UnderGrad ⊑ ¬ P ostgrad ∃ hasT utor − ⊑ T utor ∃ teaches − ⊑ Course P artT ime ⊑ Student Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 7 / 34
Foundations Query (1) University Database: Query: teaches ( craig, SWT ) q 1 ( x ) ← Professor ( x ) hasTutor ( peter, craig ) cert ( q 1 , T , A ) = { craig } In the database there is no information on Professors, how did the system retrieve the answer? Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 8 / 34
Foundations Query (2) Query: University Database: teaches ( craig, SWT ) q 2 ( x ) ← teaches ( x, y ) , Advanced ( y ) , hasTutor ( z, x ) hasTutor ( peter, craig ) cert ( q 2 , T , A ) = ∅ Why is craig not an answer? Is SWT an Advanced course? Does craig teach a course not listed in the database? Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 9 / 34
Explaining Positive Answers Outline Foundations 1 Explaining Positive Answers 2 Explaining Negative Answers 3 Conclusions 4 Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 10 / 34
Explaining Positive Answers Aim Provide explanations of the following form: Axiom Reason craig tutors hasTutor ( peter, craig ) ∃ hasTutor − ⊑ Tutor craig is a Tutor craig is a Professor Tutor ⊑ Professor Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 11 / 34
Explaining Positive Answers Aim Provide explanations of the following form: Axiom Reason craig tutors hasTutor ( peter, craig ) ∃ hasTutor − ⊑ Tutor craig is a Tutor craig is a Professor Tutor ⊑ Professor Strategy: Gather information on how TBox axioms are used to generate the perfect reformulation. Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 11 / 34
Explaining Positive Answers PerfectRef ( q, T ) in a (non-rigorous) Nutshell { q } ⊆ PerfectRef ( q, T ) . For each r ∈ PerfectRef ( q, T ) , we consider different cases: r ( x ) ← Professor ( x ) and Tutor ⊑ Professor ∈ T . Then, 1 r ′ ( x ) ← Tutor ( x ) Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 12 / 34
Explaining Positive Answers PerfectRef ( q, T ) in a (non-rigorous) Nutshell { q } ⊆ PerfectRef ( q, T ) . For each r ∈ PerfectRef ( q, T ) , we consider different cases: r ( x ) ← Professor ( x ) and Tutor ⊑ Professor ∈ T . Then, 1 r ′ ( x ) ← Tutor ( x ) r ( x ) ← hasTutor ( x, y ) and PartTime ⊑ ∃ hasTutor . Then, 2 r ′ ( x ) ← PartTime ( x ) Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 12 / 34
Explaining Positive Answers PerfectRef ( q, T ) in a (non-rigorous) Nutshell { q } ⊆ PerfectRef ( q, T ) . For each r ∈ PerfectRef ( q, T ) , we consider different cases: r ( x ) ← Professor ( x ) and Tutor ⊑ Professor ∈ T . Then, 1 r ′ ( x ) ← Tutor ( x ) r ( x ) ← hasTutor ( x, y ) and PartTime ⊑ ∃ hasTutor . Then, 2 r ′ ( x ) ← PartTime ( x ) r ( x ) ← Professor ( x ) and ∃ teaches ⊑ Professor . Then, 3 r ′ ( x ) ← teaches ( x, _ ) Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 12 / 34
Explaining Positive Answers Computing Positive Explanations Maintain a graph G of rewritings. ( r, r ′ ) ∈ G means that r ′ has been generated from r . Label ( r, r ′ ) with the axiom justifying the rewriting. Let π be a match for r ∈ PerfectRef ( q 1 , T ) in A witnessing craig . IDEA: Traverse backwards the trace of rewritings from r until q 1 is reached. Suitably extend π to be a match for intervening queries. Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 13 / 34
Explaining Positive Answers Example q 1 ( x ) ← Professor ( x ) teaches ( craig , SWT ) Database hasTutor ( peter , craig ) Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 14 / 34
� Explaining Positive Answers Example q 1 ( x ) ← Professor ( x ) r 1 ( x ) ← Tutor ( x ) teaches ( craig , SWT ) hasTutor ( peter , craig ) Database Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 14 / 34
� � Explaining Positive Answers Example q 1 ( x ) ← Professor ( x ) r 1 ( x ) ← Tutor ( x ) r 2 ( x ) ← hasTutor ( y, x ) teaches ( craig , SWT ) hasTutor ( peter , craig ) Database π matches x on craig and y on peter . Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 14 / 34
� � Explaining Positive Answers Example q 1 ( x ) ← Professor ( x ) r 1 ( x ) ← Tutor ( x ) r 2 ( x ) ← hasTutor ( peter, craig ) teaches ( craig , SWT ) hasTutor ( peter , craig ) Database π matches x on craig and y on peter . Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 14 / 34
� �� Explaining Positive Answers Example q 1 ( x ) ← Professor ( x ) r 1 ( x ) ← Tutor ( craig ) r 2 ( x ) ← hasTutor ( peter, craig ) teaches ( craig , SWT ) hasTutor ( peter , craig ) Database π matches x on craig and y on peter . Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 14 / 34
Explaining Positive Answers Algorithmic Solution Modify PerfectRef to maintain rewriting graph. At explanation time, use Dijkstra algorithm to find shortest path between generating rewriting and user query. Extend match on generating rewriting for intervening queries. Return shortest path and extended match. Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 15 / 34
Explaining Positive Answers Complexity Dijkstra runs in O ( | V | 2 ) . In our case, the number of vertexes is the number of conjunctive queries in PerfectRef ( q, T ) . Worst-case: a CQ q admits exponentially many rewritings w.r.t. DL-Lite A TBox T . Our explanation algorithm runs in exponential time w.r.t. the query. Data-complexity is still low. Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 16 / 34
Explaining Negative Answers Outline Foundations 1 Explaining Positive Answers 2 Explaining Negative Answers 3 Conclusions 4 Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 17 / 34
Explaining Negative Answers Query (2) Query: University Database: teaches ( craig, SWT ) q 2 ( x ) ← teaches ( x, y ) , Advanced ( y ) , hasTutor ( z, x ) hasTutor ( peter, craig ) cert ( q 2 , T , A ) = ∅ Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 18 / 34
Explaining Negative Answers Method Abductive Reasoning : solutions are assertions to be added to the ontology leading the given tuple to be returned by the system. Solutions should be non-redundant: study minimality conditions! Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 19 / 34
Explaining Negative Answers Abductive Reasoning A form of non-sequitor argument, in which Γ �| = B but B is assumed to follow from the premises. Solutions are set of formulae E such that Γ ∪ E | = B Natural conditions over solutions: Consistency Γ ∪ E �| = ⊥ Minimality E is minimal wrt. some criterion. Giorgio Stefanoni (Oxford) Explanation of Query Answers February 20, 2012 20 / 34
Recommend
More recommend