Part D
Approximate reasoning on tableaux
Holger Wache
Overview of the Course
A. Semantic Web in general and OWL syntax
B. OWL Semantics (DLs) and tableaux reasoning
C. Approximate reasoning in general
D. Approximate reasoning on tableaux
E. Approximate resolution for OWL
ReasoningDL- Reasoning Ontology
Semantic Web Systems in General
Input Output
Description Logics
C
u
D C
t
D
¬
C
∃ R.C
…
C:=D
Human := MantWoman
Man := ¬Woman
Father := Manu
∃ hasChild.Human CvD
Father v Human
Father v Woman
DL- Reasoning
Problem
Input Output
t
Toy Examples
Real World
Performance
DL-Reasoning in EXPTIME (OWL DL
in NEXPTIME) Ontology
Answers Query
Reasoning Method Knowledge
Base
DL- Reasoning
Ontology
Problem
Robustness
For example during query answering Possible
Answers
Input Output
DL- Reasoning
Ontology
Input DL- Output
Reasoning Ontology
Input Output
Approximation Approaches
Language Weakening
Language Weakening
Approximate Deduction
Approximate Deduction
Theory
Approximation
Theory
Approximation
+ +
Approximate Input
Approximate Input
DL- Reasoning
Ontology
Input DL- Output
Reasoning Ontology
Input Output
Approximation Approaches
Language Weakening
Language Weakening
Approximate Deduction
Approximate Deduction
Theory
Approximation
Theory
Approximation
+ +
Approximate Input
Approximate
Input
Approximation through Language Weakening
Input Reasoning Output
Method Knowledge
Base
DL- Reasoning
Ontology
OWL-FULL
OWL-DLP
A-Box
Role- free DataBase
Queries
T-Box
DLP- Reasoning
Approximation on A-Boxes
Normal A-Box
Role-Free A-Box
Querying in Role-Free A-Boxes
Query
Instances contained in the query
Instances to be tested if contained
Instance retrieval
For role-free A-Boxes a:Q↔ Iav Q; Iaconcept description of instance a
Try to replace DL reasoning as much as possible with
(scalable) DB retrieval
Classify Q [DL REASONING]
For all C v Q: a:C→a:Q [DATABASE RETRIEVAL]
If needed check border instances
[DL REASONING]
Q
DL- Reasoning
Ontology
Input DL- Output
Reasoning Ontology
Input Output
Approximation Approaches
Language Weakening
Language Weakening
Approximate Deduction
Approximate Deduction
Theory Approximation
Theory Approximation
+ +
Approximate Input
Approximate Input
Approximate Entailment by Cadoli- Schaerf
S-1-entailment:
interpret everything outside of S as false
S-3-entailment:
interpret everything outside of S as true (or normal)
S
L
x ¬x
S1 S3
0/0 1/0 1/1
0/1
Cadoli-Schaerf for DL
Description Logic is subset of First Order Logic
Cadoli Schaerf can directly be applied
Needs to implement a specialized reasoner ….
² S
Approximate Reasoning
Description Logic (DL) = Tableaux Reasoning
{((C u ¬E) t (D u F)) u E}
{(C u ¬E) t (D u F), E}
{D u F, E}
{C u ¬E, E}
{C, ¬E, E} {D, F, E}
Approximating Inference Rule
x
{((C u ¬E) t(D u F)) u E}
{(C u ¬E) t(D u F), E}
{D u F, E}
{C u ¬E, E}
{C, ¬E, E} {D, F, E}
Approximating Query
x
{((C u ¬E) t (D u F)) u E}
OR
Same effect when query is modified
Approximate Reasoning through modification of the query
Cadoli-Schaerf for DL
Instead of using a different entailment
Modify the query
Existing reasoners can be used
(C u ¬E) t (D u F)
Cadoli-Schaerf for DL
Cadoli-Schaerf
Modify Query (C u ¬E) t (D u F)
=
PROPROOFEOFED² S D
DL- Reasoning
Ontology
Input DL- Output
Reasoning Ontology
Input Output
Approximation Approaches
Language Weakening
Language Weakening
Approximate Deduction
Approximate Deduction
Theory
Approximation
Theory
Approximation
+ +
Approximate Input
Approximate Input
Query
Approximate Deduction through Simplification
Simplify query
Simple query ⇒ fast query answering
Simple query ⇒
approximated answers
Continuously complete query
Anytime behavior
t Simplified Query
Reasoner
Quality
How to simplify?
Query = … u Φ u … u ( …t Ψ t …)
First Idea:
Omit some parts (e.g. Φ, Ψ) First Idea:
Omit some parts (e.g. Φ, Ψ)
Q
I⊆ Q
IQ
I⊆ Q
IQ
IQ
IQuery = … u Φ u … u ( …t Ψ t …)
How to simplify? (II)
Second Idea:
Rewrite some parts (e.g. Φ, Ψ) Second Idea:
Rewrite some parts (e.g. Φ, Ψ)
Q
I⊆ Q
I>
Q
I⊆ Q
I>
Q
I⊆ Q
ICadoli-Schaerf Approximation for DLs
Well-founded theory with (theoretical) nice results
BUT:How to increase the complexity?
Levels i = nested quantifiers
Ci= Ommit all exist qantifiers greater or equal level i
S3-Approximation for Description Logics (ALE)
C0
C1
C2 L1 L0
Application
Application: Classification
Central process Classify Query Q
Contained in
Generating the subsumption hierarchy
Instance Retrieval
Generates a sequence of subsumption tests
9
9 9
8 9
8 8
Q
Approximating the Classification
Cadoli-Schaerf ensures:
Level := 0 Compute
Level := Level+1 Unsatifyable?
Max Level?
t
f
f t
TRUE
FALSE
?
Implementation
RACER
DIG Interface
FACT FACT
subsumes/satisfy Taxonomy Classify
Approximate Query
Mixed Results:
Classifying in TAMBIS
Application: Classification of Concepts
⇒ sequence of subsumption test: C v D
8 181
157 32
≈24 ≈0
≈0 ≈279
157 32
8 149
Further Results
Query = … u Φ u … u ( …t Ψ t …) Problem: Term Collapsing
Term D
From the subsumption hierarchy
Very often also conjunction of subterms
Term C
to be classified;
very often conjunction of subterms
e.g. conjunctive queries
Queries have very often this structure
Query = … u Φ u … u ( …t Ψ t …) Problem: Term Collapsing
Term D
From the subsumption hierarchy
Very often also conjunction of subterms
> > >
Term C
to be classified;
very often conjunction of subterms
e.g. conjunctive queries
Query = … u Φ u … u ( …t Ψ t …) Problem: Term Collapsing
Term D
From the subsumption hierarchy
Very often also conjunction of subterms
> >
Term C
to be classified;
very often conjunction of subterms
e.g. conjunctive queries
>
Classifying in TAMBIS (IV)
65 = 35,9%
157 = 100% 190 = 62,1%
Term Collapsing:
Approximation and Proof Reuse
Proof for Approximation
Proof for Normal Case
Proof for Approximation + Extension
≤ ≤
No Time may be saved
No Time may be saved
Proofs can only be extended at the leaves Proofs can only be extended at the leaves
Lessons learned
Avoid Term Collapsing
Replace ψ with something else than > or ⊥
Find better places to rewrite
Ontology-adapted φ?
Heuristic to select the rewriting places?
Special Case: Instance Retrieval
Focused Case: Instance Retrieval
Find all instances a which belongs to a query Q:
a:Q
Tool InstanceStore:
Try to replace DL reasoning as much as possible with (scalable) DB retrieval
Only applyable to role-free A-Boxes
a:Q↔Iav Q; Iaconcept description of instance a
Boolean Conjunctive Queries
q1∧...∧qn, where q1,...,qnare of the form x:C or hx,yi:R
Restrict to those which can be converted to a concept expression C
New Approximation Method:
Heuristic Ordering of Conjuncts
Compute a ranking value for each conjunct
Order the conjuncts q1,Λ,qn according to their value
Complete approximated query with more and more expensive conjuncts
Reasoner
Φ(q1)
qn q1 qi Φ(qi) Φ(qn) Φ(q1) Φ(qi) Φ(qn) < <
Query qn qi q1∧..∧ ∧..∧
∧..∧ ∧
How to order conjuncts?
Recall
Node expansion
Depth-First and Breadth-First Search
Furthermore
According to the needed computation time for each conjunction
Estimate the computation time a priori
According to the possible search space reduction
Prefer conjuncts which eliminate a lot of instances
father-of Female degree father-of
Female
father-of Female
works-at degree
father-of Female
works-at degree
awarded-by {vu}
How to estimate the computation
costs
Effects of Cadoli-Schaerf for Subsumption
C v D
Semantics
(C v D) ⊥
C v D ↔ ² C u ¬D
Effects of Cadoli-Schaerf for Subsumption
C v D
Semantics
(C v D) ⊥
(C v D) ⊥ ↔ ² ( C u ¬D ) ⊥
C v D
(C v D) ⊥
Effects of CS for Subsumption:
Term Collapsing
Semantics
Term collapsing
Effects of new Approximation
Semantics
not
changed;
C v D
(C (I a v v Q) D) Δ Δ (I a v Q)
only
Q changedEvaluation Scenario
DB Instance
Store Gene Ontology
DL Rasoner:
FACT++
Aproxx Server Q1, …, Q8
Q9, …, Q18
Results: Subsumption tests
More LevelsResults: Time
Summary
Achieving scalability through approximation and modularization/distribution
S1&S3 approximation seems not to work in practical situations
Heuristic approximation seems to be better
Performance improvements (only) in restricted cases?!
What’s about Robustness?
Answers Query
Reasoning Method Knowledge
Base
DL- Reasoning
Ontology
Problems tackled in KWEB
Robustness
For example during query answering Possible
Answers
WP1.1 Use-Case 1 “Human Resources” and WP2.1
Collaborative Answering for supporting users
Approximation as a basic technology
Feature: Distributed reasoning possible Feature: Matching of different ontologies
Job request:
Semantic Web professional with 10 years business experiences, solid background in Trust and Security, finished studying with a excellent grade, not married, and not older than 21 years
Job request:
Semantic Web professional with 10 years business experiences, solid background in Trust and Security, finished studying with a excellent grade, not married, and not older than 21 years
L3S Use-Case “E-learning”
(KWEB portal: REASE)
Ressource request (somehow completed):
I’m looking for a lecture with subject
“approximation for the Semantic Web”
hold in Slovak. I have experiences in propositional logics and I followed a course about Timbuktu.
Ressource request (somehow completed):
I’m looking for a lecture with subject
“approximation for the Semantic Web”
hold in Slovak. I have experiences in propositional logicsand I followed a course about Timbuktu.
Ressource:
Lecture with “approximation for the Semantic Web” in the description (only a part of that talks) hold in Danish. It needs experiences in description logics and OWL.
Ressource:
Lecture with “approximation for the Semantic Web” in the description (only a part of that talks) hold in Danish. It needs experiences in description logicsand OWL.
Collaborative Query Answering
Assisting users in formulating their query
Technically: Query reformulation
How to transform?
Technologically similar to
approximation
Query
Transformation
Answers Answers
Logic Approximation
Idea: Rewriting rules
Rewrite
Rewrite
Rewrite
Rewrite Rewrite Rewrite
Rewrite Re
write
User- Centric Domain-
Centric
Rewrite Rule
Three parts
Invocation:
1. If “Pattern” matches (part-of) query, …
2. … replace matched pattern with
“replaced-by” …
3. … if “Condition” is satisfied
Pattern
Replaced-By
Condition
Rewriting rules: Example
PATTERN
{Resource} subject {Subject}
WHERE
Subject Like Value^^xsd:string,
WITH
NEWTitle = concat("*",concat(Value,"*")) REPLACE-BY
{Resource} subject {Subject}, {Resource} title {TMPTitle}
WHERE
TMPTitle Like NEWTitle
Rewrite Rule Example Applied
SELECT * FROM
{Resource} subject {Subject}, {Resource} title {TMPTitle},
{Resource} title {Title},
… WHERE
SELECT * FROM
{Resource} subject {Subject}, {Resource} title {Title},
… WHERE
Subject Like "inference engines",
…
DL- Reasoning
Ontology
Input DL- Output
Reasoning Ontology
Input Output
Approximation Approaches
Language Weakening
Language Weakening
Approximate Deduction
Approximate Deduction
Theory
Approximation
Theory
Approximation
+ +
Approximate Input
Approximate Input
Ontology
Output Reasoning
Method
Approximation through Knowledge Compilation
Input
Ontology (optimized)
Reasoning (optimized)