Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·...

19
R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at Bremen, Germany D. Toman, University of Waterloo, Canada F.Wolter, University of Liverpool, UK M. Zakharyaschev, Birkbeck College London, UK Presented By : Nikhil Agarwal

Transcript of Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·...

Page 1: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

R. Kontchakov, Birkbeck College London, UK

C. Lutz, Universit¨at Bremen, Germany

D. Toman, University of Waterloo, Canada

F.Wolter, University of Liverpool, UK

M. Zakharyaschev, Birkbeck College London, UK

Presented By : Nikhil Agarwal

Page 2: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Problem and Motivation

φ(x) = ∃y, z (city(x) ∧ has_airport(x, y) ∧ located_in(x, US)∧ named_for(y, z) ∧ ww2_ hero(z))

“Can you give me all the US cities which has an airport named after a WW2 hero.”

Assumptions

• Database containing tables for φ(x)

• Doesn't contain concept ww2_hero

• Contains ww2_deco (WW2 Decoration)

2

Page 3: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Problem and Motivation

• Atoms constructed for the query :

city(Chicago)

has_airport(Chicago,ORD)

located_in(Chicago, US)

named_for(ORD,Ohare)

recipient_of(O’Hare, ww2_medal_of_honor)

ww2_deco(ww2_medal_of_honor)

• But doesn’t contain any data for ww2_hero

• New Ontology for rewritten queries

3

Page 4: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Problem and Motivation

∀x, y (recipient_of(x, y) ∧ ww2_deco(y) → ww2_hero(x))

• answers iff answers

• Reduction can be done by

• construct DB’ with ww2_hero

• ww2_hero has all names with ww2_decoration

• rewrite φ(x) to φ’(x) and ww2_hero(z) as

ww2_hero(z) ∨ ∃v (recipient_of(z, v) ∧ ww2_deco(v))

• For this reduction, conditions considered are

4

Page 5: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Problem and Solution

• D’ computable in polynomial time in D and not dependent on

• doesn’t depend on D

• Query Rewriting doesn’t allow D’=D

• Alternative approach

• D’ is computable in polynomial time in and D

• is polynomial in and

• More transparent query rewritings

5

Page 6: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

DL-Lite Horn

• Concept C from concept name Ai

• Roles R from role name Pi

• Tbox has concept inclusions of form

• Interpretations are

6

Page 7: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

DL-Lite Horn

• As usual

• are all individual names in

• KB is PTIME-complete

7

Page 8: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

DL-Lite Horn

• ans(q, ) – set of all answers to q in

• cert(q, ) – set of all certain answers to q over

8

Page 9: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Canonical Model • is not finite in this case

• Start with and apply CI (Concept inclusion) to

9

Page 10: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Canonical Model

10

Page 11: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Canonical Model • contains a homomorphic image of

• This helps in reduction using canonical model

• An example showing q’ depends only on q and

11

Page 12: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Canonical Model

• is an answer iff

• R(a,y) is entailed by and

• R(a,y) is entailed by B(a) or T(z,a)

• so a is answer to q(x) iff a is answer to

12

Page 13: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Finite FO Generating Model

• contains all answers of

14

Page 14: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Finite FO Generating Model • Consider a fork shape query

• Models obtained will be

14

Page 15: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Conjunctive Query Answering

• Consider a CQ

• rewrite q to q+ in such a way that

• q+ becomes

• φ1, φ2 and φ3 are Boolean connectives of equalities t1 = t2 (terms or constants)

15

Page 16: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Conjunctive Query Answering

• φ1 is the first filter/eliminator/rewritten portion

• eliminates all cR since those are implicit

• labeled nulls and hidden from user

• φ2 implements the matching from tree witness

16

Page 17: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Conjunctive Query Answering

• φ3 prevents cyclic triangle situation

• Can’t be mapped into a tree

17

Page 18: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Experimental and Extension

• Query rewriting implemented in QuoOnto

• q rewritten into unions of Q and CQ

• In Worst case the size of is

• Experiments show 5-10 fold increase on data

• More concept hierarchy more data size

• Can be applied to for medical terminologies

• CQ for is PTIME so can’t be used for rewrite

• Applies to extended called

18

Page 19: Presented By : Nikhil Agarwal - David R. Cheriton School of …gweddell/cs848/presentations/... ·  · 2013-11-26R. Kontchakov, Birkbeck College London, UK C. Lutz, Universit¨at

Conclusion

• Query rewriting can be done on OBDA

• How DL-Lite Horn is used in combined approach

• Canonical model over given ontology

• Constructing Generating model from canonical model

• Relation of answers in both the models

• Conjunctive query answering using these models

• Refining CQ through Boolean combinations

• Some experimental facts

19