29
Extending NoHR for OWL 2 QL Nuno Costa Matthias Knorr Jo˜ ao Leite Universidade Nova de Lisboa

Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Extending NoHR for OWL 2 QL

Nuno Costa Matthias Knorr Joao Leite

Universidade Nova de Lisboa

Page 2: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Motivation: OWA vs. CWA

I Open World Assumption (OWA)I Model taxonomic knowledgeI Ontologies (in Description Logics (DL), such as EL, DL-LiteR)I Example: results of clinical tests

I Closed World Assumption (CWA)I Model defaults and exceptionsI Non-monotonic rules well-suitedI Example: patient’s medication

Integration for benefits of both approaches

Page 3: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Motivation: OWA vs. CWA

I Open World Assumption (OWA)I Model taxonomic knowledgeI Ontologies (in Description Logics (DL), such as EL, DL-LiteR)I Example: results of clinical tests

I Closed World Assumption (CWA)I Model defaults and exceptionsI Non-monotonic rules well-suitedI Example: patient’s medication

Integration for benefits of both approaches

Page 4: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Motivation: OWA vs. CWA

I Open World Assumption (OWA)I Model taxonomic knowledgeI Ontologies (in Description Logics (DL), such as EL, DL-LiteR)I Example: results of clinical tests

I Closed World Assumption (CWA)I Model defaults and exceptionsI Non-monotonic rules well-suitedI Example: patient’s medication

Integration for benefits of both approaches

Page 5: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Requirements for Integration

1. Flexible frameworkI Expressive language, yet simple to useI Full two-way interaction between ontologies and rulesI As little restrictions as possible

2. Low complexityI Large amount of data (on the Web; in applications, e.g., patient

records)I Interactive response time on reasoning

3. Top-down queryingI Avoid up-front computation of the entire modelI Restrict computation to the relevant part

Page 6: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Requirements for Integration

1. Flexible frameworkI Expressive language, yet simple to useI Full two-way interaction between ontologies and rulesI As little restrictions as possible

2. Low complexityI Large amount of data (on the Web; in applications, e.g., patient

records)I Interactive response time on reasoning

3. Top-down queryingI Avoid up-front computation of the entire modelI Restrict computation to the relevant part

Page 7: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Requirements for Integration

1. Flexible frameworkI Expressive language, yet simple to useI Full two-way interaction between ontologies and rulesI As little restrictions as possible

2. Low complexityI Large amount of data (on the Web; in applications, e.g., patient

records)I Interactive response time on reasoning

3. Top-down queryingI Avoid up-front computation of the entire modelI Restrict computation to the relevant part

Page 8: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

NoHR: EL Ontologies and Non-Monotonic Rules

1. Hybrid MKNF [Motik and Rosati, J. ACM 2010]

2. Its Well-Founded Semantics (WFS) [Knorr et al., AI 2011]

3. Top-down procedure SLG(O) [Alferes et al., ACM TOCL 2013]

XSBJava Virtual MachineProtégé

NoHR Plugin

GUI

ELK

Query Processor

InterProlog

NoHR Rules Tab

OWL File

NM RulesFile

XSB Knowledge

Base

Query Answering

Tables

Tracer/Debugger

NoHR Query Tab

Translator

Ontology

NM Rules

ProtégéOntology

NM Rules Base

Page 9: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Motivation: Extension to QL

I Applications require DL language features (e.g., inverses)[Calvanese et al., 2011] not covered by OWL EL

I OWL QL based on DL-LiteR would serveI Covers basic DL languages, the entity relationship model, and

basic UML class diagramsI Query-answering by rewriting queries by means of the ontology s.t.

SQL engines can be used over the dataI Very low data complexityI Tailored towards huge data sets

Page 10: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Motivation: Extension to QL

I Applications require DL language features (e.g., inverses)[Calvanese et al., 2011] not covered by OWL EL

I OWL QL based on DL-LiteR would serveI Covers basic DL languages, the entity relationship model, and

basic UML class diagramsI Query-answering by rewriting queries by means of the ontology s.t.

SQL engines can be used over the dataI Very low data complexityI Tailored towards huge data sets

Page 11: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Problem

I Negation present in OWL QL requires classification of negatedconcepts

I Currently no classifier for OWL QL including negated conceptsI Naive adaptation inefficient due to large number of created

axioms

ObjectiveAdapt NoHR to OWL QL

I Direct translation (no prior classification)I Ensure identical derivation of ground queriesI Implement and evaluate its performance

Page 12: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Problem

I Negation present in OWL QL requires classification of negatedconcepts

I Currently no classifier for OWL QL including negated conceptsI Naive adaptation inefficient due to large number of created

axioms

ObjectiveAdapt NoHR to OWL QL

I Direct translation (no prior classification)I Ensure identical derivation of ground queriesI Implement and evaluate its performance

Page 13: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

DL-LiteR

B → A | ∃Q C → B | ¬B Q→ P | P− R→ Q | ¬Q

A ∈ NC concept name, P ∈ NR role name, and P− its inverseI GCIs B v C and RIs Q v R

I Standard DL semantics based on interpretations I = (∆I , ·I)

∃HasArtist− v Artist Piece v ∃HasArtist∃HasComposed− v Piece Artist v ¬PieceHasComposed− v HasArtist

Page 14: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

DL-LiteR

B → A | ∃Q C → B | ¬B Q→ P | P− R→ Q | ¬Q

A ∈ NC concept name, P ∈ NR role name, and P− its inverseI GCIs B v C and RIs Q v R

I Standard DL semantics based on interpretations I = (∆I , ·I)

∃HasArtist− v Artist Piece v ∃HasArtist∃HasComposed− v Piece Artist v ¬PieceHasComposed− v HasArtist

Page 15: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Direct Translation

Piece v ∃HasArtist cannot be translated naivelyI HasArtist(x , y)← Piece(x ) would yield HasArtist(x , y) for any

Piece(x ) and y

I HasArtist(x , c)← Piece(x ) would yield HasArtist(x , c) for anyPiece(x ) for the same c

I Skolemization would cause difficulties for termination

Special predicates for domain and rangeDHasArtist(x )← Piece(x ) with DHasArtist the domain of HasArtist(and RHasArtist its range)

Page 16: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Direct Translation

Piece v ∃HasArtist cannot be translated naivelyI HasArtist(x , y)← Piece(x ) would yield HasArtist(x , y) for any

Piece(x ) and y

I HasArtist(x , c)← Piece(x ) would yield HasArtist(x , c) for anyPiece(x ) for the same c

I Skolemization would cause difficulties for termination

Special predicates for domain and rangeDHasArtist(x )← Piece(x ) with DHasArtist the domain of HasArtist(and RHasArtist its range)

Page 17: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Direct Translation (2)

I DHasArtist(x )← HasArtist(x , y) associating domains (andranges) to binary atoms

I For inverses HasComposed− v HasArtist , translate to

HasArtist(x , y)← HasComposed(y , x )

also link both auxiliary predicates via

DHasArtist(x )← RHasComposed(x )

RHasArtist(x )← DHasComposed(x )

Page 18: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Direct Translation (2)

I DHasArtist(x )← HasArtist(x , y) associating domains (andranges) to binary atoms

I For inverses HasComposed− v HasArtist , translate to

HasArtist(x , y)← HasComposed(y , x )

also link both auxiliary predicates via

DHasArtist(x )← RHasComposed(x )

RHasArtist(x )← DHasComposed(x )

Page 19: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Graph Representation Including Negation

Nodes all general concepts and roles, edges GCIs and RIs (including,e.g., implicit contrapositives)

Artist

HasComposed–HasComposed

¬HasArtist–

¬HasComposed

¬HasArtist

HasArtist– HasArtist

∃HasComposed

¬∃HasComposed–

¬Piece

∃HasArtist–

∃HasComposed–

¬∃HasArtist–

¬∃HasComposed

∃HasArtist

Piece

¬Artist

¬HasComposed–

¬∃HasArtist

HasComposed irreflexive: ∃HasComposed v ¬∃HasComposed−

Computing irreflexive roles and unsatisfiable roles and (atomic)concepts necessary

Page 20: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Graph Representation Including Negation

Nodes all general concepts and roles, edges GCIs and RIs (including,e.g., implicit contrapositives)

Artist

HasComposed–HasComposed

¬HasArtist–

¬HasComposed

¬HasArtist

HasArtist– HasArtist

∃HasComposed

¬∃HasComposed–

¬Piece

∃HasArtist–

∃HasComposed–

¬∃HasArtist–

¬∃HasComposed

∃HasArtist

Piece

¬Artist

¬HasComposed–

¬∃HasArtist

HasComposed irreflexive: ∃HasComposed v ¬∃HasComposed−

Computing irreflexive roles and unsatisfiable roles and (atomic)concepts necessary

Page 21: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Results

I Sound and complete translation w.r.t. answering (ground)queries

I Data complexity in PI Extension of classification on graphs to negated concepts a

contribution in its own rightI Implementation as an alternative translator module in NoHR for

OWL QL

Page 22: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Evaluation Settings

LUBM benchmark

I Small TBoxI Data generator for creating instance data of large sizesI 14 test queries

Here:

I TBox slightly simplified to match the OWL profile(s)I Three queries omitted whose results are affected by the

simplifications

Page 23: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Evaluation: Preprocessing

Direct translation approach vs. classification-based – LUBM reducedto fit OWL QL and EL to compare NoHR QL and EL approaches

0

100

200

300

400

1 5 10 15 20 1 5 10 15 20

Tim

e (s

)

EL - LUBM QL - LUBM

XSB Processing

Ontology Processing

Initialization

QL considerably faster (up to 80s for LUBM20) – due to avoidingclassification and a smaller rule file being created

Page 24: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Evaluation: Preprocessing

Direct translation approach vs. classification-based – LUBM reducedto fit OWL QL and EL to compare NoHR QL and EL approaches

0

100

200

300

400

1 5 10 15 20 1 5 10 15 20

Tim

e (s

)

EL - LUBM QL - LUBM

XSB Processing

Ontology Processing

Initialization

QL considerably faster (up to 80s for LUBM20) – due to avoidingclassification and a smaller rule file being created

Page 25: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Evaluation: Querying

11 queries of the LUBM queries tested, representatives shown

0  

50  

100  

150  

200  

250  

1   5   10   15   20  

Time  (s)  

LUBM  

EL:q5  

EL:q9  

EL:q14  

QL:q5  

QL:q9  

QL:q14  

I Often interactive response time with slight advantage for EL (q5)I Few take a considerable amount of time

I Some with slight advantage for OWL QL (q14)I One with notable difference in favor of EL (q9)

Page 26: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Evaluation: Querying

11 queries of the LUBM queries tested, representatives shown

0  

50  

100  

150  

200  

250  

1   5   10   15   20  

Time  (s)  

LUBM  

EL:q5  

EL:q9  

EL:q14  

QL:q5  

QL:q9  

QL:q14  

I Often interactive response time with slight advantage for EL (q5)I Few take a considerable amount of time

I Some with slight advantage for OWL QL (q14)I One with notable difference in favor of EL (q9)

Page 27: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Evaluation: Lipid with Rules

749 subclass axioms, 1, 486 class disjointness axioms and 20 inverseobject properties in combination with non-monotonic rules

0

0.5

1

1.5

2

2.5

0 1 2 3 4 5 6 7 8 9 10

Tim

e (s

)

LIPID with 100 rules and 1k*facts

Query 1

Query 2

Query 3

Query 4

Query 4'

I Preprocessing very fast and only linearly increasingI Four atomic queries in different levels of the hierarchy with

interactive response timeI 4’ – query 4 without the other queries beforehand (tabling)

Page 28: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Conclusions

I NoHR extended to OWL 2 QL based on direct translationI Theoretically sound and complete including novel extension of

graph-based reasoning with negated conceptsI Evaluation results of implementation encouraging as all

previously observed results (for EL) persistI QL is even faster on pre-processing and only slightly slower on

average when answering queries

Page 29: Extending NoHR for OWL 2 QLontolp.lsis.org/ontolp/files/pdf/ontolp2015-slides-knorr.pdf · Motivation: Extension to QL I Applications require DL language features (e.g., inverses)

Future Work

I Further comparisons to alternative versions for QL based on,e.g., ontop, Konclude

I OWL RLI Paraconsistent Semantics