Hybrid Logics and Ontology Languages Ian Horrocks horrockscs
Hybrid Logics and Ontology Languages Ian Horrocks <horrocks@cs. man. ac. uk> Information Management Group School of Computer Science University of Manchester
Introduction to Description Logics
What Are Description Logics? • A family of logic based Knowledge Representation formalisms – Descendants of semantic networks and KL-ONE – Describe domain in terms of concepts (classes), roles (properties, relationships) and individuals • Distinguished by: – Formal semantics (typically model theoretic) • Decidable fragments of FOL (often contained in C 2) • Closely related to Propositional Modal, Hybrid & Dynamic Logics • Closely related to Guarded Fragment – Provision of inference services • Decision procedures for key problems (satisfiability, subsumption, etc) • Implemented systems (highly optimised)
DL Basics • Concepts (formulae) – E. g. , Person, Doctor, Happy. Parent, (Doctor t Lawyer) • Roles (modalities) – E. g. , has. Child, loves • Individuals (nominals) – E. g. , John, Mary, Italy • Operators (for forming concepts and roles) restricted so that: – Satisfiability/subsumption is decidable and, if possible, of low complexity – No need for explicit use of variables • Restricted form of 9 and 8 (direct correspondence withhii and [i]) – Features such as counting (graded modalities) succinctly expressed
The DL Family (1) • Smallest propositionally closed DL is ALC (equivalent to. K(m)) – Concepts constructed using booleans u, t, : , plus restricted quantifiers 9, 8 – Only atomic roles E. g. , Person all of whose children are either Doctors or have a child who is a Doctor: Person u 8 has. Child. (Doctor t 9 has. Child. Doctor)
The DL Family (1) • Smallest propositionally closed DL is ALC (equivalent to. K(m)) – Concepts constructed using booleans u, t, : , plus restricted quantifiers 9, 8 – Only atomic roles E. g. , Person all of whose children are either Doctors or have a child who is a Doctor: Person Æ [has. Child](Doctor Ç hhas. Childi. Doctor)
The DL Family (2) • S often used for ALC extended with transitive roles – i. e. , the union of K(m) and K 4(m) • Additional letters indicate other extensions, e. g. : – H for role hierarchy (e. g. , has. Daughter v has. Child) – O for nominals/singleton classes (e. g. , {Italy}) – I for inverse roles (converse modalities) – Q for qualified number restrictions (graded modalities, e. g. , hiim ) – N for number restrictions (graded modalities, e. g. , hiim>) • S + role hierarchy (H) + nominals (O) + inverse (I) + NR (N) = SHOIN • SHOIN is the basis for W 3 C’s OWL Web Ontology Language
DL Knowledge Base • A TBox is a set of “schema” axioms (sentences), e. g. : {Doctor v Person, Happy. Parent ´ Person u 8 has. Child. (Doctor t 9 has. Child. Doctor)} – i. e. , a background theory(a set of non-logical axioms) • An ABox is a set of “data” axioms (ground facts), e. g. : {John: Happy. Parent, John has. Child Mary} – i. e. , non-logical axioms including (restricted) use of nominals
DL Knowledge Base • A TBox is a set of “schema” axioms (sentences), e. g. : {Doctor ! Person, Happy. Parent $ Person Æ [has. Child](Doctor Ç hhas. Childi. Doctor)} – i. e. , a background theory(a set of non-logical axioms) • An ABox is a set of “data” axioms (ground facts), e. g. : {John ! Happy. Parent, John ! hhas. Childi. Mary} – i. e. , non-logical axioms including (restricted) use of nominals • A Knowledge Base (KB) is just a TBox plus an Abox
Ontologiesand OWL
The Web Ontology Language OWL • Semantic Web led to requirement for a “web ontology language” • set up Web-Ontology (Web. Ont) Working Group – Web. Ont developed OWL language – OWL based on earlier languages OIL and DAML+OIL – OWL now a W 3 C recommendation(i. e. , a standard) • OIL, DAML+OIL and OWL based on Description Logics – OWL effectively a “Web-friendly” syntax for SHOIN
OWL RDF/XML Exchange Syntax E. g. , Person u 8 has. Child. (Doctor t 9 has. Child. Doctor): <owl: Class> <owl: intersection. Of rdf: parse. Type=" collection"> <owl: Class rdf: about="#Person"/> <owl: Restriction> <owl: on. Property rdf: resource="#has. Child"/> <owl: all. Values. From> <owl: union. Of rdf: parse. Type=" collection"> <owl: Class rdf: about="#Doctor"/> <owl: Restriction> <owl: on. Property rdf: resource="#has. Child"/> <owl: some. Values. From rdf: resource="#Doctor"/> </owl: Restriction> </owl: union. Of> </owl: all. Values. From> </owl: Restriction> </owl: intersection. Of> </owl: Class>
Class/Concept Constructors • C is a concept (class); P is a role (property); xi is an individual/nominal • XMLS datatypes as well as classes in 8 P. C and 9 P. C – Restricted form of DL concrete domains
Ontology Axioms • OWL ontology equivalent to DL KB (Tbox + Abox)
Why (Description) Logic? • OWL exploits results of 15+ years of DL research – Well defined (model theoretic) semantics
Why (Description) Logic? • OWL exploits results of 15+ years of DL research – Well defined (model theoretic) semantics – Formal propertieswell understood (complexity, decidability) I can’t find an efficient algorithm, but neither can all these famous people. [Garey & Johnson. Computers and Intractability: A Guide to the Theory of NP-Completeness. Freeman, 1979. ]
Why (Description) Logic? • OWL exploits results of 15+ years of DL research – Well defined (model theoretic) semantics – Formal propertieswell understood (complexity, decidability) – Known reasoning algorithms
Why (Description) Logic? • OWL exploits results of 15+ years of DL research – Well defined (model theoretic) semantics – Formal propertieswell understood (complexity, decidability) – Known reasoning algorithms – Implemented systems(highly optimised) Pellet
Why (Description) Logic? • Foundational research was crucial to design of OWL – Informed Working Group decisions at every stage, e. g. : • “Why not extend the language with feature x, which is clearly harmless? ” • “Adding x would lead to undecidability - see proof in […]”
Applications of. Ontologies • e-Science, e. g. , Bioinformatics – Open Biomedical Ontologies Consortium (GO, MGED) – Used e. g. , for “in silico” investigations relating theory and data • E. g. , relating data on phosphatases to (model of) biological knowledge
Applications of. Ontologies • Medicine – Building/maintaining terminologies such as Snomed, NCI & Galen Central Sulcus Parietal Lobe Frontal Lobe Occipital Lobe Temporal Lobe Lateral Sulcus
Applications of. Ontologies • Organising complex and semi-structured information – UN-FAO, NASA, Ordnance Survey, General Motors, Lockheed Martin, …
Nominals in Ontologies • Used in extensionally definedclasses – e. g. , class EU might be defined as {Austria, …, United. Kingdom} • Written in OWL as one. Of(Austria … United. Kingdom) • Equivalent to a disjunction of nominals: Austria Ç … Ç United. Kingdom – Allows inferences such as: • EU contains 25 countries (assuming UNA/axioms) • If in the EU and not in one. Of(Austria … Sweden) ! in United. Kingdom • Used in extended OWL Abox axioms – e. g. , individual(Jim value(friend individual(value(friend Jane)))) • Equivalent to {Jim} v 9 friend. (9 friend. {Jane}) • i. e. , Jim ! hfriendi(hfriendi. Jane) • Widely used in ontologies – e. g. in Wine ontology used for colours, grape types, regions, etc.
Ontology Reasoning: How do we do it?
Using Standard DL Techniques • Key reasoning tasks reducible to KB (un)satisfiability – E. g. , C v D w. r. t. KB K iff K [ {x: (C u : D)} is not satisfiable • State of the art DL systems typically use (highly optimised) tableaux algorithms to decide satisfiability (consistency) of KB • Tableaux algorithms work by trying to construct a concrete example (model) consistent with KB axioms: – Start from ground facts (ABox axioms) – Explicate structure implied by complex concepts and TBox axioms • Syntactic decomposition using tableaux expansion rules • Infer constraints on (elements of) model
Tableaux Reasoning (1) • E. g. , KB: {Happy. Parent ´ Person u 8 has. Child. (Doctor t 9 has. Child. Doctor), John: Happy. Parent, John has. Child Mary, Mary: : Doctor Wendy has. Child Mary, Wendy married. To John} Person 8 has. Child. (Doctor t 9 has. Child. Doctor)
Tableaux Reasoning (2) • Tableau rules correspond to constructors in logic (u, 9 etc) – E. g. , John: (Person u Doctor) --! John: Person and John: Doctor • Stop when no more rules applicable or clash occurs – Clash is an obvious contradiction, e. g. , A(x), : A(x) • Some rules are nondeterministic (e. g. , t, 6) – In practice, this means search • Cycle check (blocking) often needed to ensure termination – E. g. , KB: {Person v 9 has. Parent. Person, John: Person}
Tableaux Reasoning (3) • In general, (representation of) model consists of: – Named individuals forming arbitrary directed graph – Trees of anonymous individuals rooted in named individuals
Decision Procedures • Algorithms are decision procedures, i. e. , KB is satisfiable iff rules can be applied such that fully expanded clash free graph is constructed: Sound – Given a fully expanded and clash-free graph, we can trivially construct a model Complete – Given a model, we can use it to guide application of non-deterministic rules in such a way as to construct a clash-free graph Terminating – Bounds on number of named individuals, out-degree of trees (rule applications per node), and depth of trees (blocking) • Crucially depends on (some form of) tree model property
Reasoning with. Nominals: A Tableaux Algorithm for SHOIQ
Recall Motivation for OWL Design • Exploit results of DL research: – … – Known tableaux decision proceduresand implemented systems But not for. SHOIN (until recently)! So why is/was SHOIN so hard?
SHIQ is Already Tricky • Does not have finite model property, e. g. : {ITN v 61 edge– u 9 edge. ITN, R: (ITN u 60 edge–)} – Double blocking – Block interpreted as infinite repetition
SHIQ is Already Tricky • Does not have finite model property, e. g. : {ITN v 61 edge– u 9 edge. ITN, R: (ITN u 60 edge–)} – Double blocking – Block interpreted as infinite repetition • Termination problem due to > and 6, e. g. : {John: 9 has. Child. Doctor u >2 has. Child. Lawyer u 62 has. Child} – Add inequalities between nodes generated by > rule – Clash if 6 rule only applicable to nodes
SHOIQ: Loss (almost) of TMP • Interactions between O, I, and Q lead to new termination problems – Anonymous branches can loop back to named individuals (O) • E. g. , 9 r. {Mary} – Number restrictions (Q) on incoming edges (I) lead to non-tree structure • E. g. , Mary: 61 r– – Result is anonymous nodes that act like named individual nodes – Blocking sequence cannot include such nodes • Don’t know how to build a model from a graph including such a block
Intuition: Nominal Nodes • Nominal nodes (N-nodes) include: – Named individual nodes – Nodes affected by number restriction via outgoing edge to N-node • Blocking sequence cannot include N -nodes • Bound on number of N-nodes – Must initially have been on a path between named individual nodes – Length of such paths bounded by blocking – Number of incoming edges at an N-node is limited by number restrictions
Generate & Merge Problem is Back! E. g. , KB: {VMP ´ Person u 9 loves. {Mary} u 9 has. Friend. VMP, John: 9 has. Friend. VMP Mary: 62 loves–} • Blocking prevented by N-nodes • Repeated generation and merging of nodes leads to non-termination
Intuition: Guess Exact Cardinality • New Ro? -rule guesses exact cardinality constraint on N-nodes {VMP ´ Person u 9 loves. {Mary} u 9 has. Friend. VMP, John: 9 has. Friend. VMP Mary: 62 loves–} • Inequality between resulting N-nodes fixes generate & merge problem • Introduces new source of non-determinism – But only if nominals used in a “nasty” way • Usage in ontologies typically “harmless” – Otherwise behaves as for SHIQ
Conjunctive Query Answering: Using binders (maybe)
Conjunctive Queries • Want to query KB using DB style conjunctive query language – e. g. , hx, zi à Winehxi Æ drunk. Withhx, yi Æ Dishhyi Æ from. Regionhy, zi • How to answer such queries? – Reduce to boolean queries w. r. t. candidate answer tuples • e. g. , hi à Wineh. Chiantii Æ drunk. Withh. Chianti, yi Æ Dishhyi Æ from. Regionhy, Venetoi – Transform query into concept Cq by “rolling up” • e. g. , Cq = {Chianti} u 9 drunk. With. (Dish u 9 from. Region. {Veneto}) – such that query can be reduced to KB satisfiabilitytest • h. T, Ai ² q iff h. T [ {> v : Cq}, Ai is not satisfiable
Rolling Up (1) • View query as a labeled graph and “roll up” from leaves to root – e. g. , hi à Ahwi Æ Rhw, xi Æ Bhxi Æ Phx, yi Æ Chyi Æ Shx, zi Æ Chyi B A u 9 R. (B u 9 P. C u 9 S. D) Bu u 9 P. C u 9 S. D
Cyclical Queries • Problems arise when trying to roll up cyclical queries – e. g. , hi à Ahwi Æ Rhw, xi Æ Bhxi Æ Phx, yi Æ Chyi Æ Shx, zi Æ Chyi Æ Rhy, zi
Rolling Up with Binders (1) • Problem could be solved by extending DL with binder: – e. g. , hi à Ahwi Æ Rhw, xi Æ Bhxi Æ Phx, yi Æ Chyi Æ Shx, zi Æ Chyi Æ Rhy, zi C u 9 P-. . x -. (C u 9 P-. . x)))) A u 9 R. ( x. (B u 9 S. (D u 9 R x. B x. (B u 9 S. (D u 9 R-. (C u 9 P-. . x))) D u 9 R-. (C u 9 P-. . x)
Rolling Up with Binders (2) • Unfortunately, already known that ALC + binder is undecidable [Blackburn and Seligman] • But, when used in rolling up, only occurs in very restricted form: – Only intersection, existential and positive state variables – and when negated (in sat test), only union, universal and negated vars – in form 8 R. : x • Now known that SHIQ conjunctive query answering is decidable – Binders would potentially lead to a more “practical” algorithm
SHIQ Conjunctive Queries
Rolling Up with Binders (2) • Unfortunately, already known that ALC + binder is undecidable [Blackburn and Seligman] • But, when used in rolling up, only occurs in very restricted form: – Only intersection, existential and positive state variables – and when negated (in sat test), only union, universal and negated vars – in form 8 R. : x • Now known that SHIQ conjunctive query answering is decidable – Binders would potentially lead to a more “practical” algorithm • But not trivial to extend tableaux algorithmto SHIQ + binder – Blocking is difficult because binder introduces new concepts • Decidability of SHOIQ conjunctive query answering still open – Although believe we now have a solution
Summary • DLs are a family of logic based KR formalisms – Describe domain in terms of concepts, roles and individuals – Closely related to Modal & Hybrid Logics • DLs are the basis for ontology languagessuch as OWL – Nominals widely used in ontologies – Reasoning with SHOIQ is tricky, but now reasonalby well understood • Binders potentially useful for conjunctive query answering – Allow for rolling up of arbitrary queries – Required extensions known to be decidable – But reasoning with extended languages still an open problem
Acknowledgements Thanks to: – Birte Glimm – Uli Sattler
Resources • Slides from this talk – http: //www. cs. man. ac. uk/~horrocks/Slides/Hy. Lo 06. ppt • Fa. CT++ system (open source) – http: //owl. man. ac. uk/factplus/ • Protégé – http: //protege. stanford. edu/plugins/owl/ • W 3 C Web-Ontology (Web. Ont) working group (OWL) – http: //www. w 3. org/2001/sw/Web. Ont/ • DL Handbook, Cambridge University Press – http: //books. cambridge. org/0521781760. htm
Thank you for listening Any questions?
- Slides: 49