Existential Rules Combined approach for EL Micha el Thomazo - - PowerPoint PPT Presentation

existential rules
SMART_READER_LITE
LIVE PREVIEW

Existential Rules Combined approach for EL Micha el Thomazo - - PowerPoint PPT Presentation

Existential Rules Existential Rules Combined approach for EL Micha el Thomazo November 22nd, 2013 Dresden 1 / 30 Existential Rules Flow of the course What has been seen until now: forward chaining approach backward chaining


slide-1
SLIDE 1

Existential Rules

Existential Rules

Combined approach for EL Micha¨ el Thomazo November 22nd, 2013 Dresden

1 / 30

slide-2
SLIDE 2

Existential Rules

Flow of the course

What has been seen until now:

◮ forward chaining approach ◮ backward chaining approach

Today’s topic: a case where none of the already presented approaches are applicable.

2 / 30

slide-3
SLIDE 3

Existential Rules

Reference for today’s course

Conjunctive Query Answering in the Description Logic EL Using a Relational Database System, Lutz, Toman, Wolter, IJCAI 09

3 / 30

slide-4
SLIDE 4

Existential Rules

ELHdr

NC and NR disjoint sets of (atomic) concept and role names.

EL concept

An EL concept is built as follows:

◮ an atomic concept C ∈ NC ◮ top concept ⊤ ◮ the intersection of two concepts C1 ⊓ C2 ◮ ∃r.C, where r is a role name and C an EL concept

An ELHdr TBox is a set of concept inclusions C1 ⊑ C2 and of role inclusions r1 ⊑ r2, as well as a set of domain and range restrictions ( dom(r) ⊑ C and ran(r) ⊑ C ′).

4 / 30

slide-5
SLIDE 5

Existential Rules

EL and existential rules

Any EL ontology can be expressed thanks to a set of existential rules. → consider the standard translation into first-order logic

5 / 30

slide-6
SLIDE 6

Existential Rules

EL and rule applications

Let us consider the following EL concept inclusion: C ⊑ ∃r.C, and the following ABox: C(a).

6 / 30

slide-7
SLIDE 7

Existential Rules

EL and query rewriting

Let us consider the following EL concept inclusion: ∃r.C ⊑ C and the following query: ∃xC(x) ∧ D(x).

7 / 30

slide-8
SLIDE 8

Existential Rules

The combined approach (1)

In the combined approach, both the query and the data are

  • modified. We look for F ′ and q′ such that:

F, R | = q ⇔ F ′ | = q′.

8 / 30

slide-9
SLIDE 9

Existential Rules

The combined approach (2)

It has been applied for

◮ ELHdr ⊥ (today’s course) ◮ DL-Lite ◮ generalizations of guarded rules

Advantages:

◮ allow to deal with more expressive ontologies ◮ avoid some blow up inherent to query rewriting approaches

Main limitation:

◮ the data is modified

9 / 30

slide-10
SLIDE 10

Existential Rules

Some technical assumptions

  • 1. queries contain only individual names that occur in the KB
  • 2. TBoxes do not contain domain restrictions
  • 3. TBoxes contain exactly one range restriction per role name
  • 4. if K |

= r ⊑ s and ran(r) ⊑ C, ran(s) ⊑ D are in T , then C ⊑T D

  • 5. there are no r, s ∈ NR with r = s such that K |

= r ⊑ s and K | = s ⊑ r All these assumptions can be made without loss of generality.

10 / 30

slide-11
SLIDE 11

Existential Rules

Some notations

sub(T ): subconcepts appearing in T

rol(R): roles appearing in T

Ind(A): individuals appearing in A

ranT (r): unique concept C such that ran(r) ∈ T

ran(T ) = { ranT (r) | r ∈ rol(T )}

NIaux = {xC,D | C ∈ ran(T ) and D ∈ sub(T )}

11 / 30

slide-12
SLIDE 12

Existential Rules

Enriching the data

12 / 30

slide-13
SLIDE 13

Existential Rules

First step: canonical model for instance queries

◮ ∆IK := Ind(A) ∪ NIaux ◮ aIK := a for all a ∈ Ind(A) ◮ AIK := {a ∈ Ind(A) | K |

= A(a)} ∪ {xC,D ∈ NIaux | C ⊓ D ⊑ A}

◮ r IK = r IK

1

∪ r IK

2

∪ r IK

3

◮ r IK

1

:= {(a, b) ∈ Ind(A) × Ind(A) | s(a, b) ∈ A and K | = s ⊑ r}

◮ r IK

2

:= {(a, xC,D) ∈ Ind(A) × NIaux | K | = ∃s.D(a), ran(s) = C, K | = s ⊑ r}

◮ r IK

3

:= {(xC,D, xC′,D′) ∈ NIaux × NIaux | K | = C ⊓ D ⊑ ∃r.D′, ran(s) = C ′, K | = s ⊑ r}

13 / 30

slide-14
SLIDE 14

Existential Rules

First problem

Consider K1 = (T1, A1) with T1 = {A ⊑ A}, and A1 = {B(a)}. Let q1 = ∃u(B(v) ∧ A(u)). x⊤,A ∈ AIK1 and IK1 | = q1[a] but a is not a certain answer. Solved by considering only the “connected” part → Ik

R.

14 / 30

slide-15
SLIDE 15

Existential Rules

Second problem

Consider K2 = (T2, A2) with T2 = {A ⊑ ∃r.B ⊓ ∃s.B} and A2 = {A(a)}. Let consider q2 = ∃u(r(v, u) ∧ s(v, u). IK2 | = q2[a], but a is not a certain answer. Question: why does IK2 | = q2[a] hold?

15 / 30

slide-16
SLIDE 16

Existential Rules

Solving them by unraveling (1)

We define Ind(A)I = {aI | a ∈ Ind(A)}. A path in I is a finite sequence d0r1d1 . . . rndn such that:

◮ d0 ∈ Ind(A)I; ◮ (di, di+1) ∈ rI i+1 for all i < n.

Denoted by pathsA(I).

16 / 30

slide-17
SLIDE 17

Existential Rules

Solving them by unraveling (2)

Let R be the set of role inclusion in K. The (A, R)-unraveling J

  • f I is defined as follows:

◮ ∆J = pathsA(I) ◮ aJ = aI for all a ∈ Ind(A) ◮ AJ = {p | tail(p) ∈ AI} ◮ rJ = rJ 1 ∪ rJ 2 ◮ rJ 1 = {(d, e) | d, e ∈ Ind(A) ∧ (d, e) ∈ rI} ◮ rJ 2 = {(p, p · se) | p, p · se ∈ ∆J and R |

= s ⊑ r} The unraveling of Ir

K is denoted by UK.

17 / 30

slide-18
SLIDE 18

Existential Rules

Motivation for the second step

We want to represent the canonical model thanks to a relational database. We thus need a finite canonical model. The unraveling is infinite in general. We rewrite the query in order to regain soundness.

18 / 30

slide-19
SLIDE 19

Existential Rules

Rewriting the query

19 / 30

slide-20
SLIDE 20

Existential Rules

Recognizing errors

The aim is to exclude some of the answer provided with the canonical model for instance queries. We make use of the following equivalence relation:

The equivalence relation ∼q

∼q is the smallest relation on terms(q) that include identity, is transitive and satisfies the following closure relation: If r1(s, t), r2(s′, t′) ∈ q and t ∼q t′, then s ∼q s′

20 / 30

slide-21
SLIDE 21

Existential Rules

pre and in

For an equivalence class ζ of ∼q, we define the following two sets:

pre(ζ) = {t | r(t, t′) ∈ q for some r ∈ NR and t′ ∈ ζ}

in(ζ) = {r | r(t, t′) ∈ a for some t ∈ term(q) and t′ ∈ ζ}

21 / 30

slide-22
SLIDE 22

Existential Rules

Implicant and prime implicant

For R ⊆ NR and r ∈ NR, r is an implicant of NR if for any s ∈ R, R | = r ⊑ s. It is called a prime implicant if for all implicant r′ of R such that r′ = r, R | = r ⊑ r′,

22 / 30

slide-23
SLIDE 23

Existential Rules

Some relevant situations

We define:

Fork= us the set if pairs ( pre(ζ), ζ), where pre(ζ) is of cardinality at least two;

23 / 30

slide-24
SLIDE 24

Existential Rules

Some relevant situations

We define:

Fork= us the set if pairs ( pre(ζ), ζ), where pre(ζ) is of cardinality at least two;

Fork= is the set of variables v ∈ qvar(q) such that there is no implicant of in([v]);

24 / 30

slide-25
SLIDE 25

Existential Rules

Some relevant situations

We define:

Fork= us the set if pairs ( pre(ζ), ζ), where pre(ζ) is of cardinality at least two;

Fork= is the set of variables v ∈ qvar(q) such that there is no implicant of in([v]);

ForkH is the set of pairs (I, ζ) such that pre(ζ) = ∅, there is a prime implicant of in(ζ) that is not contained in in(ζ) and I is the set of all prime implicants of in(ζ)

25 / 30

slide-26
SLIDE 26

Existential Rules

Some relevant situations

We define:

Fork= us the set if pairs ( pre(ζ), ζ), where pre(ζ) is of cardinality at least two;

Fork= is the set of variables v ∈ qvar(q) such that there is no implicant of in([v]);

ForkH is the set of pairs (I, ζ) such that pre(ζ) = ∅, there is a prime implicant of in(ζ) that is not contained in in(ζ) and I is the set of all prime implicants of in(ζ)

Cyc is the set of variables v ∈ qvar(q) such that there are r0(t0, t′

0), . . . , rm(tm, t′ m), . . . , rn(tn, t′n) ∈ q, n, m ≥ 0 with

v ∼q ti for some i ≤ n, T ′

i ∼q ti+1 for all i < n and t′ n ∼q tm.

26 / 30

slide-27
SLIDE 27

Existential Rules

The rewriting

We rewrite q = ∃u(ψ) into ∃u(ψ ∧ ϕ1 ∧ ϕ2 ∧ ϕ3), where:

◮ ϕ1 = v∈ avar(q)∪ Fork=∪ Cyc ¬ Aux(v) ◮ ϕ2 = ({t1,...,tk},ζ)∈ Fork=( Aux(tζ) → 1≤i<k ti = ti+1) ◮ ϕ3 = (I,ζ)∈ ForkH( Aux(tζ) → r∈I r(tpre ζ

, tζ)) where tζ is a representative of ζ and t

pre

ζ

is an arbitrary element of pre(tζ)

27 / 30

slide-28
SLIDE 28

Existential Rules

Formalization of the goal

We prove the following equivalence: Ir

K |

= q∗

R[a1, . . . , ak] ⇔ UK |

= a[a1, . . . , ak]

28 / 30

slide-29
SLIDE 29

Existential Rules

Two properties of models

Let A be an ABox. Let I be a model where AuxI = ∆I \ Ind(A)I.

◮ I is A-connected if every d ∈ ∆I equals tail(p) for some

p ∈ pathsA(I)

◮ I is split if d ∈ AuxI and (d, d′) ∈ rI imply d′ ∈ AuxI, for

all r ∈ NR and d, d′ ∈ ∆I

29 / 30

slide-30
SLIDE 30

Existential Rules

The theorem

Let I be split and A-connected and let I′ be the (A, R)-unraveling of I. Let q be a k-ary conjunctive query. Then the following holds for all a1, . . . , ak ∈ Ind(A): I | = q∗

R[a1, . . . , ak] ⇔ I′ |

= q[a1, . . . , ak]

30 / 30