Upload
others
View
5
Download
0
Embed Size (px)
Citation preview
Description Logics and OWL
Antoine Zimmermann
École des mines de Saint-Étienne
20th January 2014, EMSE
1
Outline
History and Applications
Basic DLSyntaxSemantics
Reasoning and Reasoners
Advanced DL (OWL and more)
Tools
Knowledge Representation
General goal of knowledge representation:“develop formalisms for providing high-level descriptions of theworld that can be effectively used to build intelligentapplications.”
“formalisms”: syntax + well-defined semantics + reasoningservices“high-level descriptions”: which aspects should berepresented, which left out?“intelligent applications”: are able to infer new knowledgefrom given knowledge“effectively use”: reasoning techniques should allow“usable” implementation
Early formalisms
DLs inherit from previous KR languages:Semantic networks (1966)Frame-based languages (1970s)KL-One (1st “DL-like” system 1985)
Why not FOL? With unrestricted FOL. . .. . . structure of knowledge is destroyed⇒ cannot beexploited for driving the inference. . . expressive power too high for obtaining decidable andefficient inference problems. . . inference power may be too low for expressinginteresting, but still decidable theories
What are Description Logics?
A family of logic based Knowledge Representation formalismsDescendants of semantic networks and KL-ONEDescribe domain in terms of concepts (classes), roles(properties, relationships) and individuals (instances)
Distinguished by:Formal semantics (typically model theoretic)
Decidable fragments of FOLProvision of inference services
Decision procedures for key problems (satisfiability,subsumption, etc)Implemented systems (highly optimised)
Applications
The fields where DL were applied / had an impact areMedical informatics e.g., SNOMED, 450000 conceptsabout anatomy, diseases, etc.Bioinformatics e.g., the Gene Ontology, 17000 concepts.Semantic Web (thousands of DL ontologies available)Code management (Lassie, 1990s)ConfigurationDigital LibrariesPlanningData miningDB integrationSchema mapping
Applications
The fields where DL were applied / had an impact areMedical informatics e.g., SNOMED, 450000 conceptsabout anatomy, diseases, etc.Bioinformatics e.g., the Gene Ontology, 17000 concepts.Semantic Web (thousands of DL ontologies available)Code management (Lassie, 1990s)ConfigurationDigital LibrariesPlanningData miningDB integrationSchema mapping
Vocabulary
The DL vocabulary consists of:Concepts (classes / unary predicates)
E.g., Person, Doctor, HappyParentRoles (relations / properties / binary predicates)
E.g., hasChild, loves, etc...Individuals (instances / constants)
E.g., Antoine, DERI, Galway
Building complex concepts
There are constructs for building complex concepts
Constructor Syntax Exampleatomic concept A Humanbottom concept ⊥ —top concept > —atomic role R hasFriendconjunction C u D Human u Maledisjunction C t D Nice t Richnegation ¬C ¬Meatexists restrict. ∃R.C ∃hasChildPersonvalue restrict. ∀R.C ∀hasChildBlond
(for C and D any concept, R atomic role)
TBox / ABox
DLs Knowledge Base usually the terminological knowledge(universal knowledge) from the assertional (factual) knowledge:
TBox / AboxTBox: concept definition and subsumption axioms:
Concept definition
A .= C
e.g., Father .= Man u ∃hasChild.Human
Subsumption axioms
C1 v C2e.g., ∃hasFavourite.Brewery v ∃drinks.Beer
ABox: facts about individuals:
Concept assertions
a : Ce.g., Antoine : Human u Male
Role assertions
〈a1,a2〉 : Re.g., 〈Antoine,DERI〉 : worksIn
Interpretation
Given a vocabulary (set of atomic terms), a (model-theoretic)interpretation is defined by:
Interpretation
Given a vocabulary (set of atomic terms), a (model-theoretic)interpretation is defined by:
Interpretation
Given a vocabulary (set of atomic terms), a (model-theoretic)interpretation is defined by:
Interpretation
Given a vocabulary (set of atomic terms), a (model-theoretic)interpretation is defined by:
Interpretation
Given a vocabulary (set of atomic terms), a (model-theoretic)interpretation is defined by:
Interpreting complex concepts
Given an interpretation 〈∆I , I〉 of terms only, interpretations ofcomplex concepts are built recursively:
Construct Interpretationa aI ∈ ∆I
A AI ⊆ ∆I
⊥ ⊥I = ∅> >I = ∆I
R RI ⊆ ∆I ×∆I
C u D CI ∩ DI
C t D CI ∪ DI
¬C ∆I \ CI
∃R.C {x ∈ ∆I | ∃y , 〈x , y〉 ∈ RI ∧ y ∈ CI}∀R.C {x ∈ ∆I | ∀y , 〈x , y〉 ∈ RI ⇒ y ∈ CI}
Satisfaction relation
The satisfaction relation |= is a relation between interpretationsand axioms and assertions:
I |= C v D iff CI ⊆ DI
(read I satisfies C v D)I |= a : C iff aI ∈ CI
I |= 〈a1,a2〉 : R iff 〈aI1 ,aI2 〉 ∈ RI
If I satisfies all axioms and assertions, it is a model of theKnowledge Base.
Translation into FOL
DL axioms can be expressed in FOL:
Father v Human u Male u ∃hasChild.Human
translates into:
∀x .Father(x)⇒ Human(x)
∧ Male(x)
∧ ∃y .hasChild(x , y)
∧ Human(y)
Inference problems
Consistency (check if ontology meaningful)O consistent⇔ there exists a model of OC consistent⇔ there is a model I for which CI 6= ∅
Subsumption (structure knowledge, compute taxonomy)O implies C v D? ⇔ CI ⊆ DI for all models of O
Instantiation (check if a instance of C)O implies a : C? ⇔ aI ∈ CI for all models of O
Retrieval (retrieve individuals a that instantiate C)set of a s.t. aI ∈ CI for all models of O
All problems reducible to consistency.
Properties of reasoning and reasoners
Soundness: when the system gives an answer, it iscorrect wrt the KB (but it may not give all answers)Completeness: the system can provide all the correctanswers (but it may also provide additional wrong answers)Complexity: Complexity of the problem and/or of thereasoner in function of the size of the input (usually, a classof complexity)
The general architecture
New constructors
How to express that a Person has exactly 2 parents, 1 who isMale, 1 who is Female?
Constructor Syntax Examplenominals (O) {a1, . . . , an} week days {Monday,Tuesday, . . . }max cardinality (N ) ≤ n.R ≤ 1hasChildmin cardinality (N ) ≥ n.R ≥ 2hasParentqualified max card. (Q) ≤ n.RC ≤ 1hasParentMalequalified min card. (Q) ≥ n.RC ≥ 1hasParentFemaleSelf concept (?) ∃R.Self ∃regulateSelfinverse role (H) R− hasParent− is hasChildrole chain (·◦) R ◦ S hasParent ◦ Brothercartesian product (?) C × D Elephant ◦ Miceother role const. (·u,t,¬) R u C and t, ¬, identity, etc.subrole axiom (H) R v S hasFriend v knowstransitive role (·R+) Trans(R) Trans(hasAncestor)
New constructors: semantics
Constructor Syntax{a1, . . . , an} {aI1 , . . . , anI}≤ n.R {x ∈ ∆I | #{y ∈ ∆I | 〈x , y〉 ∈ RI} ≤ n}≥ n.R {x ∈ ∆I | #{y ∈ ∆I | 〈x , y〉 ∈ RI} ≥ n}≤ n.RC {x ∈ ∆I | #{y ∈ ∆I | 〈x , y〉 ∈ RI ∧ y ∈ CI} ≤ n}≥ n.RC {x ∈ ∆I | #{y ∈ ∆I | 〈x , y〉 ∈ RI ∧ y ∈ CI} ≥ n}∃R.Self {x ∈ ∆I | 〈x , x〉 ∈ RI}R− {〈x , y〉 | 〈y , x〉 ∈ RI}R ◦ S {〈x , y〉 ∈ ∆I ×∆I | ∃t ∈ ∆I , 〈x , t〉 ∈ RI ∧ 〈t , y〉 ∈ SI}C × D CI × DI
R u C RI ∩ SI
R v S RI ⊆ SI
Trans(R) RI is transitively closed
Complexity
More DL
High complexity of DL is worrying... New forms of DLEL and extensions;DL-Lite and extensions;DLP and variants.
that restrictconstructs;axioms;left/right side of subclass/subproperty axioms;datatypes.
EL and extensions
EL Restricts constructs to:
Constructor Syntaxatomic concept Atop concept >atomic role Rconjunction C u Dexists restrict. ∃R.Cproperty chains R1 ◦ R2 v R
EL+ + adds the following constructs:
bottom concept ⊥nominal {a}concrete domain p(f1, . . . , fn)
Polynomial complexity. Any other typical construct added to ELleads to intractability.
The DL-Lite family
DL-Litecore is based on the following grammar:
B ::= A | ∃RC ::= B | ¬BR ::= P | P−
E ::= R | ¬R
TBox is restricted to B v C.DL-LiteR extends it with R v E .Reasoning is polynomial in size of TBox. Conjunctive queryanswering in LogSpace in the size of ABox (Polynomial in sizeof TBox).
DLP and variants
OWL 2 RL is roughly based on the following grammar:
B ::= A | B u B | B t B | {a} | ∃R.BC ::= A | C u C | ¬B | ∀R.C | ∃R.{a} |≤ 1.B |≤ 1R ::= P | P−
TBox is restricted to B v C.Reasoning is polynomial in size of TBox.
OWL 1
OWL Lite corresponds to DL SHIQ(D), OWL DL toSHOIN (D)
Constructor DL SyntaxintersectionOf C1 u · · · u CnunionOf C1 t · · · t CncomplementOf ¬ConeOf {a1, . . . ,an}allValuesFrom ∀R.CsomeValuesFrom ∃R.CmaxCardinality ≤ nRminCardinality ≥ nR
+ XMLS datatypes as well as classes in ∀R.C and ∃R.C +nesting of constructors
OWL in RDF
Person v ∀hasParent.Person needs 5 triples::Person a owl:Class;
rdfs:subClassOf [a owl:Restriction;owl:onProperty :hasParent;owl:allValuesFrom :Person
] .Person=̇Man t Woman needs 7 triples::Person owl:equivalentClass [
a owl:Class;owl:unionOf (:Man :Woman)] .
OWL 2
OWL 2 corresponds to DL SROIQ(D)
max/maxCardinality (qualified and datatypes)hasSelfReflexiveProperty, IrreflexiveProperty, AsymmetricPropertypropertyDisjointWithpropertyChainAxioms with restrictionshasKey (multiple keys, including datatype keys... allows tosimulate datatype IFPs)top/bottom propertiesmore datatype capabilitiesmetamodelling & “punning”, more annotations, versioning,etc.
OWL 2 Profiles
OWL 2 DL has 3 sublanguages:OWL 2 ELOWL 2 QLOWL 2 RL
Reasoners and API
DL Reasoners are usually made for (a fragment of) OWLPellet: in Java, open source, for SROIQ, i.e., OWL2FaCT++: in C++, open source, for SROIQRacerPro: commercial, for SHIQ, i.e., OWL-LiteKAON2: in Java, free for non-commercial use, for SHIQHermiT: in Java, LGPL, for SHIQCEL: in LISP, free for non-commercial use, for EL(light-weight ontologies)
These reasoners implement the OWL Api. Quite easy to usewhen one knows Jena, Sesame, etc.See an up to date list at http://www.cs.man.ac.uk/~sattler/reasoners.html
Ontology editors
Protégé: in Java, open source, very popular (v.4 is not anextension of v.3, it is a new branch)SWOOP: Java, open source, lighter than ProtégéNeOn toolkit: some parts owned by OntoPrise, lots of stuff
Thank you
Questions and comments?