Wang, Zhe, Peng Xiao, Kewen Wang, Zhiqiang Zhuang, and Hai Wan.
1
Presented by Rucha Save for CSE 645: Seminar in Languages
Overview
2
Introduction
3
Ontology-mediated query answering
4
OMQA techniques in medicine -
Patient has Hodgkin’s lymphoma, and takes a drug for hypertension
Query to find cancer patients being treated for high-blood pressure
Ontology
Cancer : Hodgkin’s lymphoma,....
high-blood pressure : hypertension,...
No results
OMQA systems will perform the necessary inferences in order to obtain all (deducible) answers to the query.
Ontology contains a hierarchy of terms, from highly specialized to generic, and the semantic relationships
Constraint on a relational database
TGD σ over a schema R
∀X.∀Y.[∃Z.φ(X, Z) ← ψ(X, Y)]
Where,
X,Y,Z are pairwise disjoint vectors of variables X∪Y∪Z⊂V
φ(X,Z)andψ(X,Y)are conjunctions of atoms over R containing only variables from respectively X ∪ Z and X ∪ Y
Query answering over ontologies expressed by means of tuple-generating dependencies (TGDs)
5
Tgds are used to define schema mappings in data exchange, to describe how data structured under one schema (the source schema) is to be transformed into data structured under a second schema (the target schema).
Query Rewriting
Step 1:
Encode the relevant information from ontology into the query.
Step 2:
Evaluate query over the data using a database system.
6
Original Query
Database
Ontology
Encode the relative information
Evaluate query over the database
Query rewriting Algo
Motivation
7
8
Conjunctive query:
q(x) = ∃y.ancestor(y,x)
Ontology with existential rules:
∃y.ancestor(y,x)← man(x),
ancestor(x,y)←ancestor(x,z)⋀ ancestor(z,y)
Datalog rewriting q
Q(x)←ancestor(y,x), Q(x)←man(x),
Q(x) ←man(z)^ancestor(z,x),
ancestor(x,y)←ancestor(x,z) ∧ ancestor(z,y)
First-order rewriting q
∃y.ancestor(y,x) v man(x) v ∃y∃z.[ancestor(y,z)^ancestor(z,x)] ν ∃z.[man(z) ^ancestor(z,x)] v . . . . .
Every man X has ancestor Y
Person x who has ancestor Y
Ref : https://www.ijcai.org/proceedings/2020/video/26707 around 1.42 mins
Contributions
9
Compact Datalog rewriting
head(ρ)τ ← Λ(body(ρ) \ B)τ ∧ Λ body(σ)τ.
Splitting the datalog rules into two:
head(ρ)τ ← Λ(body(ρ) \ B)τ ∧ P(X), (1)
P(X) ← Λ body(σ)τ, (2)
where X = (Xρ ∪ Vbody(ρ)\B )τ ∩ Xσ τ , and P is a fresh predicate with arity |X|, called a separating predicate. Here the separating predicate is a unary one.
10
Compact Datalog rewriting
P(X) ← Λ body(σ)τ,
head(ρ)τ ← Λ(body(ρ) \ B)τ ∧ P(X)
By: ancestor(z,x) ← ancestor(z,w)⋀ ancestor(w,x)
Results: Q(x) ←man(z) ⋀ ancestor(z,w)⋀ ancestor(w,x)
Results: Q(x) ← man(z) ⋀ P(z,x), and
P(z,x) ← ancestor(z,w)⋀ ancestor(w,x)
Ref : https://www.ijcai.org/proceedings/2020/video/26707 around 4.16 mins
11
Compact Datalog rewriting
By: r1 : ∃y.A(y,z) ← B(y), and r2:B(y)← A(w,y),
Results: r3:Q(x,y)←A(x,y) ⋀ P(y), r4:P(y)← B(y),
r5:Q(x,y) ← A(x,y) ⋀ B(y),
r6:Q(x,y) ← A(x,y) ⋀ P’(y), r7:P’(y)← A(w,y),
r8:Q(x,y) ← A(x,y) ⋀ A(w,y),
r9:Q(x,y) ← P(x), r10:P(x)← B(x),
r11:Q(x,y) ← B(x).
Note: P is reused for termination.
Note: auxiliary rules can be removed at the end.
Ref : https://www.ijcai.org/proceedings/2020/video/26707 around 6.44 mins
12
A New Rewritable Class
Correctness: For an OMQ Σq , rew(Σq ) is a Datalog rewriting of Σq whenever rew(Σq) is finite.
13
The Finite unification sets(FUS)
For an OMQ Σq whose ontology is FUS, rew(Σq ) is finite.
14
The Separable Class
15
The Shy Class
16
The Block Finite Class
head(ρ)← Λ PB (XB), B is a block in body(ρ)
PB (XB ) ←Λ B, for each block B in body(ρ)
17
Comparison with State-of-the-art Systems
18
Graal - A first-order rewriting systems for general TGDs,
Rapid, Grind - Datalog rewriting systems for description logic ontologies. In particular,
Iqaros - A first-order rewriting system for OWL2 ontologies featuring in its rewriting minimisation.
Comparison with State-of-the-art Systems
19
Compared with existing query answering system for evaluation on overall Query answering
20
Comparison with State-of-the-art Systems
Conclusions
21
References
22
Thank you.
23