owl underlying logics and what this reasoning is all about
play

OWL, underlying logics, and what this reasoning is all about Uli - PowerPoint PPT Presentation

OWL, underlying logics, and what this reasoning is all about Uli Sattler sattler@cs.man.ac.uk Information Management Group School of Computer Science University of Manchester In this course: An introduction to OWL ontologies:


  1. Still the Machine only sees … < conf > WWW2002 The eleventh international world wide webco n < conf > < date > 7-11 may 2002 </ date > < place > Sheraton waikiki hotel Honolulu, hawaii, USA < place > < introduction > Register now On the 7 th May Honolulu will provide the b ackdrop of the eleventh international worl d wide web conference. This prestigious eve nt … Speakers confirmed </ introduction > < speaker > Tim berners-lee < bio > Tim is the well known inventor of the W eb, </ bio > … </ speaker > < speaker > Tim berners-lee < bio > Tim is the well known inventor of the W eb, </ bio > … </ speaker > < registration > Registered participants coming from australia, canada, chile denmark, france , germany, ghana, hong kong, india, ir eland, italy, japan, malta, new zealand, the netherlands, norway, singapore, switze rland, the united kingdom, the united sta tes, vietnam, zaire < registration >

  2. Need to Add “Semantics” shoulder_catches_during_movement • External agreement on meaning of annotations shoulder_feels_like_it_will_slip_out_of_place – e.g., Dublin Core for annotation of library/bibliographic information shoulder_joint_feels_like_it_may_slip_out_of_place • agree on the meaning of a set of annotation tags shoulder_joint_pain_better_after_rest – problems with this approach • inflexible shoulder_joint_pain_causes_difficulty_lying_on_affected_side Machine Processable • limited number of things can be expressed 
 shoulder_joint_pain_causing_inability_to_sleep not (only terms, we can’t build expressions!) shoulder_joint_pain_difficult_to_localize • Use vocabularies or ontologies to specify meaning of annotations Machine Understandable shoulder_joint_pain_feels_better_after_normal_movement – ontologies provide a vocabulary of terms shoulder_joint_pain_first_appears_at_night – new terms can be described by combining existing ones • “Conceptual Lego” shoulder_joint_pain_improved_by_medication – Meaning (semantics) of such terms is formally specified shoulder_joint_pain_improves_during_exercise__returns_later shoulder_joint_pain_incr_by_raising_arm_above_shoulder_level • not just on the web, but in other information systems shoulder_joint_pain_increased_by shoulder_joint_pain_increased_by_lifting shoulder_joint_pain_increased_by_moving_arm_across_chest

  3. Four principles towards a Semantic Web of Data* ' ανδ ανοτηερ' ' ωεβ παγε' Τηισ παγε' α ωεβ παγε' αβουτ' ισ αβουτ' ιν Ενγλιση' Φρανκ' τηε ςριϕε' αβουτ ' Υνιερσιτει ' Φρανκ' ' ' ' Ανδ τηισ' Ανδ τηισ' παγε ισ ' παγε ισ' αβουτ ' αβουτ ' Στεφανο' ΛαρΚΧ' * With thanks to Frank van Harmelen 12

  4. Principle 1: Give all things a name 13

  5. Principle 2: Relationships form a graph between things 14

  6. Principle 3: The names are addresses on the Web [<x>%IsOfType%<T>]% x T different % <analgesic>% owners%&%loca;ons% 15

  7. P1 + P2 + P3 = Giant Global Graph 16

  8. Principle 4: Explicit, Formal Semantics So we all agree on • meaning of statements in this graph/ ontology • entailments of statements • hierarchies • query answers • … This is the focus of this course: using OWL ontologies to provide this meaning 17

  9. An ontology is a knowledge base is a surrogate … A knowledge base/ontology is a 
 1.Surrogate That is, a representation 2.Expression of ontological commitment of the world 3.Theory of intelligent reasoning and our knowledge of it 4.Medium of efficient computation that is accessible to programs 5.Medium of human expression and usable Davis, Shrobe & Szolovits http://groups.csail.mit.edu/medg/ftp/psz/k-rep.html 18

  10. Our view of World Ontology O our domain Sushi SubClassOf 
 Food and 
 contains some Rice ChSushi EquivalentTo 
 Sushi and 
 contains some Chocolate Z123: Sushi Z123 contains Z234 Z243: Chocolate … .

  11. An ontology is a knowledge base is a surrogate … • Representations are not/cannot be completely accurate – Necessarily abstractions – Simplifying assumptions will be present • How close is the representation? – What’s there? – What’s missing? • Representation are subjective: dependent on the – designer – application domain Imperfect representation means that incorrect conclusions are inevitable • – but we can still assess quality of our ontology: – is it suitable/fit for purpose? – can experts agree on the way it models the domain? 20

  12. A Spectrum of Representation • Controlled Vocabulary = {terms for concepts} • Taxonomy = CV + hierarchy • Classification system = Taxonomy + principles • Thesaurus = Taxonomy + more labels • Terminology = … + glossary/explanations • Ontology = … + logical axioms 
 + well-defined semantics 
 + reasoning 
 + … . Why? 
 When? 
 What for?

  13. Ontology Languages • English – ontologies similar to dictionary/encyclopedia – easy for domain experts to read/write – hard to process in computer • Formal Language – e.g. KRSS, FOF, CNF, DAML+OIL, OWL, … – built-in operators • and, or, is-a – to combine user vocabulary • Human, Animal, Mammal, hasParent, … – well-defined semantics and entailment relation • often based on logic

  14. Introduction to OWL E. Shepard, Winnie-the-Pooh [A. A. Milne]

  15. OWL is based on logic • precise semantics • decades of research on – automated reasoning techniques • to base tool support on • to help domain expert with 
 design, maintenance,... – computational complexity 
 to understand trade-offs – model theory 
 to understand what can/can’t be said – ...

  16. OWL is based on Description Logics • decidable fragments of First Order Logic – more expressive than Boolean Logic – less than FOL • closely related to – modal logics, guarded fragments – hybrid logics • capture monotonic aspects of – frame-based systems – semantic networks • complexity of reasoning ranges – from AC 0 via polynomial – to ExpTime and NExpTime

  17. OWL is a Web Ontology Language • entity names are IRIs • various web friendly syntaxes – RDF/XML – OWL/XML – … – Manchester syntax • import mechanism • version mechanism • annotations of – entities – axioms • …

  18. OWL Axioms - an Example Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart 
 Endocarditis EquivalentClass Inflammation and 
 hasLoc some Endocardium • NCI Thesaurus • ~300K terms/classes • since 2000 • since 2003 in OWL, monthly version, +800 terms/month • … in OWL, published both • as a thesaurus ~ inferred concept hierarchy • in OWL, including underlying logical axioms, see BioPortal

  19. Example Axioms in Protégé: Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and 
 hasLoc some Heart Endocarditis EquivalentClass Inflammation and 
 hasLoc some Endocardium

  20. Example Axioms in Protégé: Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart 
 Endocarditis EquivalentClass Inflammation and 
 hasLoc some Endocardium Protégé is an OWL editor • in its 5th version • built on the OWL API • with direct access to OWL reasoners • see http://protege.stanford.edu/products.php

  21. Example Axioms in OWL & FOL Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart 
 Endocarditis EquivalentClass Inflammation and 
 hasLoc some Endocardium ∀ x.Inflammation(x) ⇒ Disease(x) ∀ x.HeartDisease(x) ⇔ Disease(x) ⋀ 
 ∃ y.(hasLoc(x,y) ⋀ Heart(y)) ∀ x.Endocarditis(x) ⇔ Inflammation(x) ⋀ 
 ∃ y.(hasLoc(x,y) ⋀ Endocardium(y))

  22. Example Axioms in OWL & DL Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart 
 Endocarditis EquivalentClass Inflammation and 
 hasLoc some Endocardium Inflammation ⊑ Disease HeartDisease ≡ Disease ⊓ ∃ hasLoc . Heart 
 Endocarditis ≡ Inflammation ⊓ 
 ∃ hasLoc.Endocardium

  23. Entities in OWL Class Class Name Expression Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and Axiom hasLoc some Heart 
 Endocarditis EquivalentClass Inflammation and 
 hasLoc some Endocardium Bob Types Person and 
 (suffersFrom some 
 (Inflammation and (hasLoc some Endocardium))) Property Name

  24. Entities in OWL - the Truth (in RDF/XML) <?xml version="1.0"?> <rdf:RDF xmlns="http://www.cs.man.ac.uk/~sattler/ontologies/WebST2016/RunningExamp xml:base="http://www.cs.man.ac.uk/~sattler/ontologies/WebST2016/RunningExample" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <owl:Ontology rdf:about="http://www.cs.man.ac.uk/~sattler/ontologies/WebST2016/ RunningExample"/> <!-- /////////////////////////////////////////////////////////////////////////////////////// // // Object Properties // /////////////////////////////////////////////////////////////////////////////////////// --> <owl:ObjectProperty rdf:about="http://www.cs.man.ac.uk/~sattler/ontologies/WebST2016 RunningExample#isPartOf"/>

  25. Entities in OWL - the Truth (in OWL/XML) <?xml version="1.0"?> <Ontology xmlns="http://www.w3.org/2002/07/owl#" xml:base="http://www.cs.man.ac.uk/~sattler/ontologies/WebST2016/ RunningExample" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" ontologyIRI="http://www.cs.man.ac.uk/~sattler/ontologies/WebST2016/ RunningExample"> <Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/> <Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/> <Prefix name="xml" IRI="http://www.w3.org/XML/1998/namespace"/> <Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/> <Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/> <Declaration> <ObjectProperty IRI="#isPartOf"/> </Declaration> <Declaration>

  26. OWL Syntaxes s t n e m u c o D s e i g o l o t n O We concentrate on this s c i t n a m e S From the OWL 2 Primer

  27. Do we care? Not for now: we use • Protégé to build/extend our ontology manually • (and interact with the reasoner) or • the OWL API programmatically • it knows about different syntaxes • has parsers/serialisers for them

  28. OWL entailments & reasoning

  29. Back to Semantics … What do these mean? OWL provides • class axioms Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart • property axioms hasDaughter SubPropertyOf hasChild hasPart InversePropertyOf isPartOf • individual axioms Bob Types Person and (suffersFrom some Inflammation) Bob Facts hasDaughter Mary

  30. OWL Semantics … here we concentrate on “Direct Semantics”, “semantics” for short • Is defined in terms of an interpretation • like in First Order Logic • and comes in 3 stages: • 1. what do classes/properties/individuals stand for a. for names b. for expressions 2. what does it mean for an interpretation to satisfy an axiom • ontology • 3. what does it mean for an ontology to entail an axiom • ontology to be consistent • ontology to be coherent • … or what is the inferred class hierarchy •

  31. A I is the 
 OWL Semantics: Interpretations (1a) extension of A An interpretation is a pair < Δ , I>, where • Δ is the domain (a non-empty set) • I is an i nterpretation function that maps each if (e,f) ∈ R I , then 
 f is an R- filler of e ▪ class name A to a set A I ⊆ Δ ▪ property name R to a binary relation R I ⊆ Δ x Δ ▪ individual name i to an element i I ∈ Δ 
 if i I ∈ A I , then A I i is an instance of A v … and we can draw interpretations! w x Δ = {v, w, x, y, z} • • A I = {v, w, x} • B I = {x, y} y z • C I = {w, y} B I • R I = {(v, w), (v, x), (y, x), (x, z)} 40

  32. OWL Semantics: Interpretations (1a) An interpretation is a pair < Δ , I>, where • Δ is the domain (a non-empty set) • I is an i nterpretation function that maps each ▪ class name A to a set A I ⊆ Δ ▪ property name R to a binary relation R I ⊆ Δ x Δ ▪ individual name i to an element i I ∈ Δ 
 A v A, C … and we can draw interpretations! w x A, B Δ = {v, w, x, y, z} • • A I = {v, w, x} B, C • B I = {x, y} y B z • C I = {w, y} • R I = {(v, w), (v, x), (y, x), (x, z)} 41

  33. Interlude: Drawing Interpretations An interpretation is a pair < Δ , I>, where • is really important for understanding • Δ is the domain (a non-empty set) • • I is an interpretation function that maps interpretations and hence • each semantics of OWL ▪ class name A to a set A I ⊆ Δ • ▪ property name R to a 
 make sure you understand that • binary relation R I ⊆ Δ x Δ you need arrows 
 ▪ individual name i to an 
 • element i I ∈ Δ (not just lines) possibly with labels 
 • A for property names v A, C R what nodes and their labels mean • w R check/re-read the definition: • what size can the domain have? x • A, B what size are extensions? • R B, C R which restrictions are on them? • y B what’s a really small interpretation? z • what’s a really big interpretation? • 42

  34. OWL 2 Semantics: an interpretation (1b) Interpretation of class expressions: Constructor Example Interpretation Class name Human Human I ⊆ Δ Δ Thing n/a Nothing n/a ∅ and Human and Male Human I ∩ Male I or Doctor or Lawyer Doctor I ∪ Lawyer I not not Male Δ \ Male I 43

  35. OWL 2 Semantics: an interpretation (1b) Interpretation of more class expressions: Constructor Example Interpretation some hasChild some Lawyer {e ∈ Δ | there is some f: 
 (e,f) ∈ hasChild I and f ∈ Lawyer I } only hasChild only Doctor {e ∈ Δ | for all f ∈ Δ : if 
 (e,f) ∈ hasChild I then f ∈ Doctor I } min hasChild min 2 Tall {e ∈ Δ | there are at least 2 f ∈ Δ 
 with (e,f) ∈ hasChild I and f ∈ Tall I } max hasChild max 2 Tall {e ∈ Δ | there are at most 2 f ∈ Δ 
 with (e,f) ∈ hasChild I and f ∈ Tall I } 44

  36. Interpretation of Classes - Examples Δ = {v, w, x, y, z} • A I • A I = {v, w, x} v • B I = {x, y} • R I = {(v, w), (v, x), (y, x), (x, z)} w (not B) I = • x (A and B) I = • ((not A) or B) I = • (R some B) I = • y (R only B) I = • z (R some (R some A)) I = • B I (R some not(A or B)) I = • (R min 1.Thing) I = • (R max 1.Thing) I = • 45

  37. OWL 2 Semantics: an interpretation (2) An interpretation I satisfies an axiom α if • α = C SubClassOf: D and C I ⊆ D I • α = C EquivalentTo: D and C I = D I • α = P SubPropertyOf: S and P I ⊆ S I • Check 
 α = P EquivalentTo: S and P I = S I • OWL 2 Direct Semantics 
 … • for more!!! α = x Type: C and x I ∈ C I • α = x R y and (x I ,y I ) ∈ R I • I satisfies an ontology O if I satisfies every axiom A in O • If I satisfies O, we call I a model of O 
 • See how the axioms in O constrain interpretations: • ✓ the more axioms you add to O, the fewer models O has … they do/don’t hold/are(n’t) satisfied in an ontology • in contrast, a class expression C describes a set C I in I • 46

  38. 
 
 
 
 
 
 
 
 Draw & Match Models to Ontologies! O1 = {} I 1 : I 2 : Δ = {v, w, x, y, z} Δ = {v, w, x, y, z} O2 = {a:C, b:D, c:C, d:C} C I = {v, w, y} C I = {v, w, y} O3 = {a:C, b:D, c:C, d:C, d:E} D I = {x, y} E I = {} 
 D I = {x, y} E I = {y} 
 O4 = {a:C, b:D, c:C, d:C, d:E R I = {(v, w), (v, y)} R I = {(v, w), (v, y)} D SubClassOf C} S I = {} S I = {} a I = v b I = x a I = v b I = x O5 = {a:C, b:D, c:C, d:C, d:E c I = w d I = y c I = w d I = y a R d, 
 D SubClassOf C, I 3 : I 4 : D SubClassOf 
 Δ = {v, w, x, y, z} Δ = {v, w, x, y, z} S some C} C I = {x, v, w, y} C I = {x, v, w, y} D I = {x, y} E I = {y} 
 D I = {x, y} E I = {y} 
 O6 = {a:C, b:D, c:C, d:C, d:E R I = {(v, w), (v, y)} R I = {(v, w), (v, y)} a R d, 
 S I = {} S I = {(x,x), (y,x)} D SubClassOf C, D SubClassOf 
 a I = v b I = x a I = v b I = x c I = w d I = y c I = w d I = y S some C, C SubClassOf R only C } 47

  39. The world in an ontology: ontology as surrogate Should Should agree with our agree with our view view Our view of World Ontology O Model of O our domain Δ Daisy:Cow Cow SubClassOf 
 Animal Daisy Mary: Person Person SubClassOf 
 Animal drives Mary Z123ABC: Car Z123ABC Mary drives Z123ABC 48

  40. OWL 2 Semantics: Entailments etc. (3) Let O be an ontology, α an axiom, and A, B classes, b an individual name: O is consistent if there exists some model I of O • i.e., there is an interpretation that satisfies all axioms in O • i.e., O isn’t self contradictory • O entails α (written O ⊨ α ) if α is satisfied in all models of O • i.e., α is a consequence of the axioms in O • A is satisfiable w.r.t. O if O ⊨ A SubClassOf Nothing • i.e., there is a model I of O with A I ≠ {} • b is an instance of A w.r.t. O (written O ⊧ b:A) if 
 • b I ∈ A I in every model I of O … let’s see this in Protégé! 49

  41. Example Entailments: Patient EquivalentClass Person and suffersFrom some Disease Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart Endocarditis EquivalentClass Inflammation and hasLoc some Endocardium Endocardium SubClassOf Bodypart and isPartOf some Heart hasLoc o isPartOf SubPropertyOf hasLoc ⊨ Endocarditis SubClassOf HeartDisease

  42. Example Entailments: Patient EquivalentClass Person and suffersFrom some Disease Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart Endocarditis EquivalentClass Inflammation and hasLoc some Endocardium Endocardium SubClassOf Bodypart and isPartOf some Heart hasLoc o isPartOf SubPropertyOf hasLoc Bob Type (Person and 
 suffersFrom some (Inflammation and hasLoc some Endocardium)) ⊨ Bob Type Patient

  43. Example Entailments: Patient EquivalentClass Person and suffersFrom some Disease Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart Endocarditis EquivalentClass Inflammation and hasLoc some Endocardium Endocardium SubClassOf Bodypart and isPartOf some Heart hasLoc o isPartOf SubPropertyOf hasLoc Bob Type (Person and 
 suffersFrom some (Inflammation and hasLoc some Endocardium)) ⊨ Bob:Patient and suffersFrom some HeartDisease

  44. OWL 2 Semantics: Entailments etc. (3) Let O be an ontology, α an axiom, and A, B classes, b an individual name: O is consistent if there exists some model I of O • O entails α (written O ⊨ α ) if α is satisfied in all models of O • A is satisfiable w.r.t. O if O ⊨ A SubClassOf Nothing • b is an instance of A w.r.t. O (written O ⊨ b:A) if 
 • b I ∈ A I in every model I of O Theorem : 1. O is consistent iff O ⊨ Thing SubClassOf Nothing 2. A is satisfiable w.r.t. O iff O ∪ {n:A} is consistent 
 (where n doesn’t occur in O) 3. b is an instance of A in O iff O ∪ {b:not(A)} is not consistent 4. O entails A SubClassOf B iff O ∪ {n:A and not(B)} is inconsistent 53

  45. OWL 2 Semantics: Entailments etc. (3) ctd O is coherent if every class name that occurs in O is 
 • satisfiable w.r.t O In Protégé, unsatisfiable 
 classes are red! Classifying O is a reasoning service consisting of • 1. testing whether O is consistent; if yes, then 2. checking, for each pair A,B of class names in 
 O ∪ {Thing, Nothing} 
 whether O ⊨ A SubClassOf B 3. checking, for each individual name b and class name A in O, 
 whether O ⊨ b:A … and returning the result in a suitable form: 
 O’s inferred class hierarchy 54

  46. OWL Reasoners and Protégé OWL reasoners • implement decision procedures for 
 • consistency/entailments, and classify ontologies Protégé • interacts with reasoners via the OWL API • shows results as • inferred class hierarchy where • unsatisfiable classes are red and you get a • warning (red triangle) if O is inconsistent • OWL reasoners • implement highly optimised algorithms which decide • complex logical decision problems: • between PTime for OWL 2 EL profile to • N2ExpTime-hard for OWL 2 … • via (hyper)-tableau algorithm or other • … later more • 55

  47. Complete details about OWL here, we have concentrated on some core features of OWL, e.g., no • domain, range axioms • SubPropertyOf, InverseOf • datatype properties • … • look others up: 
 OWL is defined via a Structural Specification • • http://www.w3.org/TR/owl2-syntax/ also ceck out the OWL Primer • https://www.w3.org/TR/owl2-primer/ • 56

  48. Some Observations • Reasoning vs Entailments vs Inferences: – entailments (of O) are axioms α such that O ⊨ α 
 (defined via models, etc.) – reasoning is a process to determine what is/isn’t entailed – inference is an axiom that a reasoner has found to be entailed 
 (if the reasoner isn’t buggy, then this is an entailment) • What is a “reasoned ontology” or “inferred ontology” ? the ontology together with all its entailed axioms? – No: this is always infinite! ? the ontology that has been found to be consistent? - No: there can be many more entailments ? the ontology together with all its entailed axioms involving only names (no expressions)? – No: there can be many more entailments – Yes: this is the inferred class hierarchy

  49. Two Use Cases for Reasoning

  50. Use Case 1: Taxonomy Building • NCI Thesaurus • ~300K terms/classes • since 2000 • since 2003 in OWL, monthly version, +800 terms/month • … in OWL, published both • as a thesaurus ~ inferred concept hierarchy • in OWL, including underlying logical axioms, see BioPortal ➡ why use OWL to build/maintain 
 a thesaurus? ➡ how much logic should I use?

  51. Use Case 1: Taxonomy Building build & maintain a terminology/taxonomy – with reasoner support so that – terms are placed at the 
 right place into class hierarchy, and – (unintended, missed) relationships are found – taking all given information into account – SubClass/Subsumption/implication/is-a: – Inflammation SubClassOf Disease ✔ – Endocarditis EquivalentClass … ., and therefor 
 Endocarditis SubClassOf HeartDisease ! ➡ the inferred class hierachy!

  52. Use Case 1: Taxonomy Building reasoning support to detect these relationships is relevant – even if only the class-hierarchy is • exported and • used to label/tag documents • SKOS! – e.g., NCIt, GO – to maintain consistency – to avoid redundancy – to ensure correct structure – ...

  53. Use Case 1: Taxonomy Building Patient EquivalentClass Person and suffersFrom some Disease Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart Endocarditis EquivalentClass Inflammation and hasLoc some Endocardium Endocardium SubClassOf Bodypart and isPartOf some Heart hasLoc o isPartOf SubPropertyOf hasLoc ⊨ Endocarditis SubClassOf HeartDisease searching is cool: – we can build expressions and classify these – ...jump rather than browse, even with only partial knowledge

  54. Class-level ontology acts as lens to your data Use Case 2: Querying Data TBox Query Endocarditis = 
 C(x) Answerer Inflammation and 
 locatedIn Heart { a | TBox ∪ Data ⊨ C(a)} Data Healthcare Record Name: Bob • OBDA History: • Well understood • sophisticated algorithms & specialised reasoners • (data & combined) complexity results • also for more complex query languages, e.g., (U)CQs • Highly challenging in practice

  55. Use Case 2: Querying Data TBox Query Endocarditis = 
 C(x) Answerer Inflammation and 
 locatedIn Heart { a | TBox ∪ Data ⊨ C(a)} Data Healthcare Record Name: Bob History: use terms from ontology to describe data – if Ind1234 looks, walks, and talks like a duck , 
 reasoner will let us know – answer queries against ontology: • give me all instances of 
 Patient and (suffersFrom some HeartDisease), 
 regardless of how Bob is described … flexible!

  56. Modelling in OWL

  57. A side note: Necessary and Sufficient Conditions • Classes can be described in terms of necessary and sufficient conditions. – This differs from some frame-based languages where we only have necessary conditions. Constraints/Background knowledge • Necessary conditions – SubClassOf axioms – C SubClassOf: D … any instance of C must be an instance of D Definitions • Necessary & Sufficient conditions – EquivalentTo axioms – C EquivalentTo: D … any instance of C must be an instance of D 
 and vice versa, any instance of D must be an instance of C • Allows us to perform automated recognition of individuals, 
 i.e. O ⊨ b:C 66

  58. A first Axiom Pattern: the Covering Axiom • Say we have Class X with subclasses Yi Class : Y1 SubClassOf X 
 • e.g., UG, MSc, MRes, PhD are all 
 Class : Y2 SubClassOf X subclasses of Student 
 … Class : Yk SubClassOf X • Now we may want to say that 
 “any individual of class X has to be an individual of some class Yi” • i.e., class X is covered by classes Y1, … ,Yk • e.g., every Student is • To ensure this coverage of X by Y1, … Yk, we use the covering axiom: Class : Y1 SubClassOf X 
 Class : Y2 SubClassOf X … Class : Yk SubClassOf X Class : X SubClassOf : (Y1 or … or Yk) • Quick exercise: translate the above axioms into FOL! 67

  59. Modelling in OWL: Multi-Dimensional Modelling

  60. Ontology Normalisation (or Untangling) • An ontology covers different kinds of things • each kind can come with its (class) hierarchy! ➡ poly-hierarchies are the norm • “Cool stuff about Cats” is a book, a • children’s book (readers!), • work of fiction (literature category!) • written in English (language!) • available in paperback (form of printing/binding) • Poly-hierarchies allow knowledge to be captured and appropriately queried • They are difficult to build by hand • do we have “EnglishChildFictionPaperback” or 
 “EnglishChildPaperbackFiction” or … . • Essentially impossible to get right and maintain • combinatorial explosion of terms! • We can use OWL and automated reasoners to do the work for us • … but how does one manage this and get it right? 69

  61. 70

  62. … that was just a toy example, this one isn’t: shoulder_catches_during_movement shoulder_feels_like_it_will_slip_out_of_place shoulder_joint_feels_like_it_may_slip_out_of_place shoulder_joint_pain_better_after_rest shoulder_joint_pain_causes_difficulty_lying_on_affected_side shoulder_joint_pain_causing_inability_to_sleep shoulder_joint_pain_difficult_to_localize shoulder_joint_pain_feels_better_after_normal_movement shoulder_joint_pain_first_appears_at_night shoulder_joint_pain_improved_by_medication shoulder_joint_pain_improves_during_exercise__returns_later shoulder_joint_pain_incr_by_raising_arm_above_shoulder_level shoulder_joint_pain_increased_by shoulder_joint_pain_increased_by_lifting shoulder_joint_pain_increased_by_moving_arm_across_chest shoulder_joint_pain_increased_by_reaching_around_the_back shoulder_joint_pain_relieved_by_putting_arm_over_head shoulder_joint_pain_sudden_onset shoulder_joint_pain_unrelenting shoulder_joint_pain_worse_on_rising shoulder_joint_pain_worsens_with_extended_activity shoulder_joint_popping_sound_heard shoulder_joint_suddenly_gives_way shoulder_seems_out_of_place 71 shoulder_seems_out_of_place__recollection_of_the_event

  63. ..let’s “untangle” this ontology of amino acids: 72

  64. There are several dimensions of classification here • Identifiable dimensions are: • amino acids themselves – they have side chains • the size of the amino acids side chain • the charge on the side chain • the polarity of the side chain • The hydrophobicity of the side chain • We can normalise these into separate hierarchies then put them back together again • Our goal is to put entities into separate trees all formed on the same basis 73

  65. Untangling 1: separate dimensions Amino Acids Alanine • Arginine • Charge Polarity Asparagine • Polar • Cysteine Negative • • • Glutamate • • Neutral Nonpolar Glutamine • • Positive Glycine • • Histidine Isoleucine • • Leucine Lysine • Size Hydrophobicity Methionine • Hydrophobic • Tiny • Phenylalanine • • • Small Hydrophilic • Proline • Medium Serine • • Threonine • Large Tryptophan • Tyrosine • • Valine 74

  66. Untangling: separate dimensions • Each separate dimension includes the same kind of thing • Within a dimension, we don’t mix • self-standing things, processes, modifiers (qualities) • our classification by, for instance, structure and then charge • We do that compositionally via defined classes and reasoners 75

  67. Untangling 2: relate dimensions using properties Amino Acids Class : AminoAcid 
 Alanine SubClassOf : hasSize some Size, 
 • Arginine hasPolarity some Polar, 
 • Asparagine hasCharge some Charge, 
 • Cysteine hasHydrophobicity some Hydrophobicity • • Class : Lysine Glutamate SubClassOf : AminoAcid, hasSize some Large, Polarity hasCharge some Positive, Polar • • hasPolarity some Polar, Nonpolar hasHydrophobicity some Hydrophilic Size Charge Hydrophobicity • Tiny • Negative Hydrophobic • • Small • Neutral • • Medium Hydrophilic • Positive • Large 76

  68. Untangling 3: Describe relevant terms Class : LargeAminoAcid EquivalentTo : AminoAcid and hasSize some Large Class : PositiveAminoAcid EquivalentTo : AminoAcid and hasCharge some Positive Class : LargePositiveAminoAcid EquivalentTo : LargeAminoAcid and PositiveAminoAcid • … but don’t do this for all combinations - just those relevant to micro-bio! 77

  69. … let’s do this again, for this domain: shoulder_catches_during_movement shoulder_feels_like_it_will_slip_out_of_place shoulder_joint_feels_like_it_may_slip_out_of_place shoulder_joint_pain_better_after_rest shoulder_joint_pain_causes_difficulty_lying_on_affected_side shoulder_joint_pain_causing_inability_to_sleep shoulder_joint_pain_difficult_to_localize shoulder_joint_pain_feels_better_after_normal_movement shoulder_joint_pain_first_appears_at_night shoulder_joint_pain_improved_by_medication shoulder_joint_pain_improves_during_exercise__returns_later shoulder_joint_pain_incr_by_raising_arm_above_shoulder_level shoulder_joint_pain_increased_by shoulder_joint_pain_increased_by_lifting shoulder_joint_pain_increased_by_moving_arm_across_chest shoulder_joint_pain_increased_by_reaching_around_the_back shoulder_joint_pain_relieved_by_putting_arm_over_head 78 shoulder_joint_pain_sudden_onset shoulder_joint_pain_unrelenting

  70. … let’s do this again, for this domain (2): shoulder_joint_pain_unrelenting shoulder_joint_pain_worse_on_rising shoulder_joint_pain_worsens_with_extended_activity shoulder_joint_popping_sound_heard shoulder_joint_suddenly_gives_way shoulder_seems_out_of_place shoulder_seems_out_of_place__recollection_of_the_event shoulder_seems_out_of_place_recurrent shoulder_seems_out_of_place_which_resolved shoulder_suddenly_locked_up which dimensions? which properties? which axioms? 79

  71. Modelling in OWL: Multi-Dimensional Modelling & Post-Coordination via OWL API

  72. Post-Coordination • This poly-hierarchical/multi-dimensional modelling style in OWL allows us to use post-coordination • we can build expressions and • use them like names • i.e., we can ask a reasoner (via the OWL API) • for instances of (AminoAcid and (hasSize some Large) 
 and (hasCharge some Positive)) • whether (AminoAcid and (hasSize some Large) 
 and (hasCharge some Neutral)) 
 is satisfiable w.r.t O • this saves us from having to give names to all combinations: • we can give names to some expressions • but we don’t have to • since the reasoner can understand expressions! 81

  73. Use Case 1: Taxonomy Building agree on – naming scheme – relevant dimensions – properties linking dimensions – … then define relevant terms to use such a taxonomy • use terms and expressions for non-core concepts or • generate codes automatically from these in a systematic way

  74. The OWL API • Java API • Protégé is based on it • http://owlapi.sourceforge.net/ • with additional tools https://github.com/owlcs • reference implementation for • parsing • serialising • creating • manipulating • interaction with DL reasoners • …

  75. The OWL API Your A nice OWL Implementation O.owl Hard : implement OWL parser, etc Suboptimal : you only get explicit information

  76. The OWL API Easier : OWL parser, etc for free Clever : you get implicit & explicit information via reasoner! Your A nice OWL OWL API Implementation O.owl OWL Reasoner

  77. The OWL API Very Clever : ask whether O ⊨ Endocarditis ⊑ Disease ⊓ 
 ∃ hasLoc.Heart Your A nice OWL OWL API Implementation O.owl OWL Reasoner

  78. The OWL API Very Clever : ask whether O ⊨ Bob:( ∃ suffersFrom. ∃ hasLoc.Heart) Your A nice OWL OWL API Implementation O.owl OWL/OWL API supports OWL post-coordination : handle expressions Reasoner like terms !

  79. Modelling in OWL: Property Closure

  80. Another Axiom Pattern: Property Closure Class : Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish • Does Nigiri contain rice? • Does Nigiri contain fish? • Does Nigiri contain beef? 89

  81. Another Axiom Pattern: Property Closure Class : Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish Which of these interpretations 
 is a model of the above axiom? I 1 I 2 VinegaredRice VinegaredRice Nigiri Nigiri Fish Fish Beef Beef hasIngredient 90

  82. Another Axiom Pattern: Property Closure Class : Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish, hasIngredient only (Fish or VinegaredRice) Use property closure pattern to avoid unintended models! I 1 I 2 VinegaredRice VinegaredRice Nigiri Nigiri Fish Fish Beef Beef hasIngredient 91

  83. The Open World Assumption Unless we have ‘constrained’ something it may be possible • • e.g., for Nigiri to have ingredients other than rice & fish This behaviour is as “open world assumption”, OWA • • OWL adopts OWA: a model only has to satisfy axioms in ontology ⊭ Nigiri SubClassOf 
 • Class : Nigiri (hasIngredient only not Beef) SubClassOf Sushi, hasIngredient some VinegaredRice, • ⊭ Nigiri SubClassOf 
 hasIngredient some Fish (hasIngredient some Beef) Nigiri contains DisjointClasses : VinegaredRice, Fish, Beef no Beef! Class : Nigiri SubClassOf Sushi, • ⊨ Nigiri SubClassOf 
 hasIngredient some VinegaredRice, (hasIngredient only not Beef) hasIngredient some Fish, hasIngredient only (Fish or VinegaredRice) 92

  84. Another Axiom Pattern: Property Closure In summary, the property closure pattern for a property P is of the • form 
 Class : A SubClassOf … P some B1, 
 … . , 
 P some Bn, P only (B1 or … or Bn) 93

  85. Modelling in OWL: Partonomies

  86. Beyond Axiom Patterns: Composition, Parts and Wholes 95

  87. Composition or Aggregation • Describing a whole object by means of its parts • treating complex things as a single object • What are the primary composition relationships? • What inferences can we make? • What might we have in our representation 
 languages to support this? • Mereonomy is the study 
 of parts, wholes, and their relations • … we skip this here, but for … http://www.flickr.com/photos/hartini/2429653007/ 96

  88. Parts & Wholes: Some Examples of the Diversity • Bristles are part of a toothbrush • Wheels are part of a shopping trolley • A car is partly iron • Milk is part of a cappuccino • A meter is part of a kilometer • Manchester is part of England • A tree is part of a forest • A slice of pie is part of the pie http://www.flickr.com/photos/aramisfirefly/4585596077 • A book chapter is part of a book • I am part of the University of Manchester • These are different kinds of composition, with different characteristics and properties. • Confusing them may result in incorrect (or undesirable) inferences. 97

  89. Relations Easily Confused with Partonomic Ones • Topological inclusion – I am in the lecture theatre - not a part of it • Instance of – Catch 22 is a Book - not a part of it • Attribution – Height of a Lighthouse is an attribute/feature of it - not a part of it • Attachment – Earrings aren’t part of Ears - not a part of it – But toes are part of Feet • Ownership – A bicycle has wheels – I own a bicycle - and thus its wheels 98

  90. 
 
 Transitivity X is part of Y, Y is part of Z, 
 thus X is part of Z • We might expect part-whole or composition relationships to behave transitively. – But this is generally only true with the same kind of composition. • Engine part of the Car • Pistons part of the Engine ➡ Pistons part of the Car 
 • Sean’s arm part of Sean • Sean part of School of Computer Science ➡ Sean’s arm part of School of Computer Science 99

  91. 
 
 Transitivity X is part of Y, Y is part of Z, 
 thus X is part of Z • We might expect part-whole or composition relationships to behave transitively. – But this is generally only true with the same kind of composition. Property : isPartOf 
 • Engine part of the Car Characteristics : Transitive • Pistons part of the Engine Property : isComponentOf 
 ➡ Pistons part of the Car 
 SubPropertyOf : isPartOf Property : isPortionOf 
 SubPropertyOf : isPartOf 
 Characteristics : Transitive • Sean’s arm part of Sean • Sean part of School of Computer Science ➡ Sean’s arm part of School of Computer Science 100

Recommend


More recommend