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

owl underlying logics and what this reasoning is all about
SMART_READER_LITE
LIVE PREVIEW

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:


slide-1
SLIDE 1

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

slide-2
SLIDE 2

In this course:

  • An introduction to OWL ontologies:

– what they are – what they mean, incl entailments, reasoners, …

  • Use cases for OWL ontologies

– terminology design/maintenance – ontology-based data access

  • Modelling in OWL: how to describe your domain

– multi-dimensional modelling – closure axioms

  • Back to use cases: how to exploit rich ontologies

– post-coordination & the OWL API

  • Trouble shooting

– what if all goes red? – what if performance becomes an issue? – options for re-using other ontologies

slide-3
SLIDE 3

In this course:

  • I will try cover a lot of material
  • with many interesting opportunities for digression/deviations
  • some of which requires some time for
  • thinking &
  • working through examples

  • I hope you are happy to
  • join in with many questions
  • bring/work through some examples
  • How many laptops to we have?
  • with Protégé installed?
  • protege.stanford.edu/products.php
slide-4
SLIDE 4

OWL Motivation

slide-5
SLIDE 5

What’s the Problem?

  • Typical web page markup consists of:

– Rendering information (e.g., font size and colour) – Hyper-links to related content

  • Content is accessible to humans but not (easily) to computers…

5

slide-6
SLIDE 6

Information we can see

  • University of Manchester

– The Business School

  • Consultancy

– Gain a broader perspective and solve complex business problems

  • Commercialisation

– From idea to marketplace -- bringing our ground-breaking inventions into the commercial world

  • Manchester Business School

– MBS is redefiing business education to meet the challenges of a fast- evolving global landscape

  • Recruit our graduates

– Attend careers fairs or arrange your own dedicated event on campus

  • Contact the Business Engagement Support Team

– +44 161 275 2227 – business@manchester.ac.uk

  • ....

6

slide-7
SLIDE 7

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 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 7-11 may 2002 1 location 5 days learn interact 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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

  • 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 Tim berners-lee 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 ,…

Information a machine can see…

slide-8
SLIDE 8

Solution: XML markup with “meaningful” tags?

<university>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</university> <school>7-11 may 2002</school> <address>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</address> <topic>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</topic> <topic>Tim berners-lee <details>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,</details>… </topic> <topic>Tim berners-lee <details>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,</details>… </topic> <contact>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<contact>

slide-9
SLIDE 9

But what about....?

<university>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</university> <department>7-11 may 2002</department> <address>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</address> <activity>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</activity> <activity>Tim berners-lee <details>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,</details>… </activity> <activity>Tim berners-lee <details>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,</details>… </activity> <contact>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<contact>

slide-10
SLIDE 10

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>

slide-11
SLIDE 11

Need to Add “Semantics”

  • External agreement on meaning of annotations

– e.g., Dublin Core for annotation of library/bibliographic information

  • agree on the meaning of a set of annotation tags

– problems with this approach

  • inflexible
  • limited number of things can be expressed


(only terms, we can’t build expressions!)

  • Use vocabularies or ontologies to specify meaning of annotations

– ontologies provide a vocabulary of terms – new terms can be described by combining existing ones

  • “Conceptual Lego”

– Meaning (semantics) of such terms is formally specified

  • not just on the web, but in other information systems

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

Machine Processable not Machine Understandable

slide-12
SLIDE 12

Four principles towards a Semantic Web of Data*

* With thanks to Frank van Harmelen

12

α ωεβ παγε' ιν Ενγλιση' αβουτ ' Φρανκ' ' ' ' Ανδ τηισ' παγε ισ' αβουτ ' ΛαρΚΧ' ανδ ανοτηερ' ωεβ παγε' αβουτ' Φρανκ' Ανδ τηισ' παγε ισ ' αβουτ ' Στεφανο' ' ' Τηισ παγε' ισ αβουτ' τηε ςριϕε' Υνιερσιτει '

slide-13
SLIDE 13

Principle 1: Give all things a name

13

slide-14
SLIDE 14

Principle 2: Relationships form a graph between things

14

slide-15
SLIDE 15

Principle 3: The names are addresses on the Web

15

x T [<x>%IsOfType%<T>]%

different%

  • wners%&%loca;ons%

<analgesic>%

slide-16
SLIDE 16

P1 + P2 + P3 = Giant Global Graph

16

slide-17
SLIDE 17

Principle 4: Explicit, Formal Semantics

So we all agree on

  • meaning of statements in this graph/ontology
  • entailments of statements
  • hierarchies
  • query answers

17

This is the focus of this course: using OWL ontologies to provide this meaning

slide-18
SLIDE 18

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

  • f 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

18

Davis, Shrobe & Szolovits

http://groups.csail.mit.edu/medg/ftp/psz/k-rep.html

slide-19
SLIDE 19

Sushi SubClassOf 
 Food and 
 contains some Rice

Ontology O Our view of

  • ur domain

World

Z123: Sushi Z123 contains Z234 Z243: Chocolate ChSushi EquivalentTo 
 Sushi and 
 contains some Chocolate

….

slide-20
SLIDE 20

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

slide-21
SLIDE 21

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?

slide-22
SLIDE 22

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
slide-23
SLIDE 23

Introduction to OWL

  • E. Shepard,

Winnie-the-Pooh [A. A. Milne]

slide-24
SLIDE 24

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 – ...

slide-25
SLIDE 25

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 AC0 via polynomial – to ExpTime and NExpTime

slide-26
SLIDE 26

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

slide-27
SLIDE 27

OWL Axioms - an Example

  • 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

Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart 
 Endocarditis EquivalentClass Inflammation and 
 hasLoc some Endocardium

slide-28
SLIDE 28

Example Axioms in Protégé:

Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and
 hasLoc some Heart Endocarditis EquivalentClass Inflammation and 
 hasLoc some Endocardium

slide-29
SLIDE 29

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
slide-30
SLIDE 30

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))

slide-31
SLIDE 31

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

slide-32
SLIDE 32

Entities in OWL

Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart 
 Endocarditis EquivalentClass Inflammation and 
 hasLoc some Endocardium Bob Types Person and 
 (suffersFrom some 
 (Inflammation and (hasLoc some Endocardium)))

Class Name Property Name Axiom Class Expression

slide-33
SLIDE 33

<?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"/>

Entities in OWL - the Truth (in RDF/XML)

slide-34
SLIDE 34

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#"

  • ntologyIRI="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>

slide-35
SLIDE 35

OWL Syntaxes

From the OWL 2 Primer

D

  • c

u m e n t s O n t

  • l
  • g

i e s S e m a n t i c s

We concentrate on this

slide-36
SLIDE 36

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
slide-37
SLIDE 37

OWL entailments & reasoning

slide-38
SLIDE 38

Back to Semantics…

OWL provides

  • class axioms

Inflammation SubClassOf Disease HeartDisease EquivalentClass Disease and hasLoc some Heart hasDaughter SubPropertyOf hasChild hasPart InversePropertyOf isPartOf

  • property axioms

Bob Types Person and (suffersFrom some Inflammation) Bob Facts hasDaughter Mary

  • individual axioms

What do these mean?

slide-39
SLIDE 39

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
  • ntology
  • 3. what does it mean for an
  • ntology to entail an axiom
  • ntology to be consistent
  • ntology to be coherent
  • …or what is the inferred class hierarchy
slide-40
SLIDE 40

OWL Semantics: Interpretations (1a)

40

An interpretation is a pair <Δ, I>, where

  • Δ is the domain (a non-empty set)
  • I is an interpretation function that maps each

▪ class name A to a set AI ⊆ Δ ▪ property name R to a binary relation RI ⊆ Δ x Δ ▪ individual name i to an element iI ∈ Δ 
 …and we can draw interpretations!

AI

v x y z w

BI

  • Δ = {v, w, x, y, z}
  • AI = {v, w, x}
  • BI = {x, y}
  • CI = {w, y}
  • RI = {(v, w), (v, x), (y, x), (x, z)}

if (e,f) ∈ RI, then 
 f is an R-filler of e if iI ∈ AI, then i is an instance of A AI is the 
 extension of A

slide-41
SLIDE 41

41

  • Δ = {v, w, x, y, z}
  • AI = {v, w, x}
  • BI = {x, y}
  • CI = {w, y}
  • RI = {(v, w), (v, x), (y, x), (x, z)}

A

v x y z w

B B, C A, B A, C

OWL Semantics: Interpretations (1a)

An interpretation is a pair <Δ, I>, where

  • Δ is the domain (a non-empty set)
  • I is an interpretation function that maps each

▪ class name A to a set AI ⊆ Δ ▪ property name R to a binary relation RI ⊆ Δ x Δ ▪ individual name i to an element iI ∈ Δ 
 …and we can draw interpretations!

slide-42
SLIDE 42

42

Interlude: Drawing Interpretations

  • is really important for understanding
  • interpretations and hence
  • semantics of OWL
  • make sure you understand that
  • you need arrows 


(not just lines)

  • possibly with labels


for property names

  • what nodes and their labels mean
  • check/re-read the definition:
  • what size can the domain have?
  • what size are extensions?
  • which restrictions are on them?
  • what’s a really small interpretation?
  • what’s a really big interpretation?

A

v x y z w

B B, C A, B A, C

  • An interpretation is a pair <Δ, I>, where
  • Δ is the domain (a non-empty set)
  • I is an interpretation function that maps

each ▪ class name A to a set AI ⊆ Δ ▪ property name R to a 
 binary relation RI ⊆ Δ x Δ ▪ individual name i to an 
 element iI ∈ Δ

R R R R

slide-43
SLIDE 43

43

Constructor Example Interpretation Class name Human HumanI ⊆ Δ Thing n/a

Δ

Nothing n/a ∅ and Human and Male HumanI ∩ MaleI

  • r

Doctor or Lawyer DoctorI ∪ LawyerI not not Male Δ \ MaleI

OWL 2 Semantics: an interpretation (1b)

Interpretation of class expressions:

slide-44
SLIDE 44

44

OWL 2 Semantics: an interpretation (1b)

Constructor Example Interpretation some hasChild some Lawyer

{e ∈ Δ | there is some f: 
 (e,f) ∈ hasChildI and f ∈ LawyerI}

  • nly

hasChild only Doctor

{e ∈ Δ | for all f ∈ Δ: if 
 (e,f) ∈ hasChildI then f ∈ DoctorI}

min hasChild min 2 Tall

{e ∈ Δ | there are at least 2 f ∈ Δ
 with (e,f) ∈ hasChildI and f ∈ TallI }

max hasChild max 2 Tall

{e ∈ Δ | there are at most 2 f ∈ Δ
 with (e,f) ∈ hasChildI and f ∈ TallI }

Interpretation of more class expressions:

slide-45
SLIDE 45

45

Interpretation of Classes - Examples

  • Δ = {v, w, x, y, z}
  • AI = {v, w, x}
  • BI = {x, y}
  • RI = {(v, w), (v, x), (y, x), (x, z)}
  • (not B)I =
  • (A and B)I =
  • ((not A) or B)I =
  • (R some B)I =
  • (R only B)I =
  • (R some (R some A))I =
  • (R some not(A or B))I =
  • (R min 1.Thing)I =
  • (R max 1.Thing)I =

AI

v x y z w

BI

slide-46
SLIDE 46

46

OWL 2 Semantics: an interpretation (2)

  • An interpretation I satisfies an axiom α if
  • α = C SubClassOf: D and CI ⊆ DI
  • α = C EquivalentTo: D and CI = DI
  • α = P SubPropertyOf: S and PI ⊆ SI
  • α = P EquivalentTo: S and PI = SI
  • α = x Type: C and xI ∈ CI
  • α = x R y and (xI ,yI) ∈ RI
  • 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 CI in I

Check 
 OWL 2 Direct Semantics 
 for more!!!

slide-47
SLIDE 47

47

Draw & Match Models to Ontologies!

O1 = {}

I1: Δ = {v, w, x, y, z} 
 CI = {v, w, y} DI = {x, y} EI = {}
 RI = {(v, w), (v, y)} SI = {} 
 aI = v bI = x cI = w dI = y

O2 = {a:C, b:D, c:C, d:C} O3 = {a:C, b:D, c:C, d:C, d:E} O4 = {a:C, b:D, c:C, d:C, d:E D SubClassOf C} O5 = {a:C, b:D, c:C, d:C, d:E a R d, 
 D SubClassOf C, D SubClassOf 
 S some C} O6 = {a:C, b:D, c:C, d:C, d:E a R d, 
 D SubClassOf C, D SubClassOf 
 S some C, C SubClassOf R only C }

I2: Δ = {v, w, x, y, z} 
 CI = {v, w, y} DI = {x, y} EI = {y}
 RI = {(v, w), (v, y)} SI = {} 
 aI = v bI = x cI = w dI = y I3: Δ = {v, w, x, y, z} 
 CI = {x, v, w, y} DI = {x, y} EI = {y}
 RI = {(v, w), (v, y)} SI = {} 
 aI = v bI = x cI = w dI = y I4: Δ = {v, w, x, y, z} 
 CI = {x, v, w, y} DI = {x, y} EI = {y}
 RI = {(v, w), (v, y)} SI = {(x,x), (y,x)} 
 aI = v bI = x cI = w dI = y

slide-48
SLIDE 48

48

The world in an ontology: ontology as surrogate

Model of O

Daisy:Cow Cow SubClassOf
 Animal Mary: Person Person SubClassOf 
 Animal Z123ABC: Car

Δ Ontology O

Mary drives Z123ABC

Our view of

  • ur domain

World

Daisy Mary Z123ABC drives

Should agree with our view Should agree with our view

slide-49
SLIDE 49

49

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 AI ≠ {}
  • b is an instance of A w.r.t. O (written O ⊧ b:A) if 


bI ∈ AI in every model I of O …let’s see this in Protégé!

OWL 2 Semantics: Entailments etc. (3)

slide-50
SLIDE 50

Example Entailments:

⊨ Endocarditis SubClassOf HeartDisease

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

slide-51
SLIDE 51

Bob Type (Person and 
 suffersFrom some (Inflammation and hasLoc some Endocardium))

⊨ Bob Type Patient

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

slide-52
SLIDE 52

⊨ Bob:Patient and suffersFrom some HeartDisease

Example Entailments:

Bob Type (Person and 
 suffersFrom some (Inflammation and hasLoc some Endocardium))

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

slide-53
SLIDE 53

53

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 


bI ∈ AI 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

OWL 2 Semantics: Entailments etc. (3)

slide-54
SLIDE 54

54

  • O is coherent if every class name that occurs in O is 


satisfiable w.r.t O

  • 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

OWL 2 Semantics: Entailments etc. (3) ctd

In Protégé, unsatisfiable 
 classes are red!

slide-55
SLIDE 55

55

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
slide-56
SLIDE 56

56

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/
slide-57
SLIDE 57

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

slide-58
SLIDE 58

Two Use Cases for Reasoning

slide-59
SLIDE 59

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?

slide-60
SLIDE 60

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!

Use Case 1: Taxonomy Building

slide-61
SLIDE 61

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 – ...

Use Case 1: Taxonomy Building

slide-62
SLIDE 62

searching is cool:

– we can build expressions and classify these – ...jump rather than browse, even with only partial knowledge

Use Case 1: Taxonomy Building

⊨ Endocarditis SubClassOf HeartDisease

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

slide-63
SLIDE 63

TBox

Endocarditis =
 Inflammation and
 locatedIn Heart

Data

Healthcare Record Name: Bob History:

C(x) { a | TBox ∪ Data ⊨ C(a)} Query Answerer

  • OBDA
  • Well understood
  • sophisticated algorithms & specialised reasoners
  • (data & combined) complexity results
  • also for more complex query languages, e.g., (U)CQs
  • Highly challenging in practice

Use Case 2: Querying Data

Class-level ontology acts as lens to your data

slide-64
SLIDE 64

TBox

Endocarditis =
 Inflammation and
 locatedIn Heart

Data

Healthcare Record Name: Bob History:

C(x) { a | TBox ∪ Data ⊨ C(a)} Query Answerer

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!

Use Case 2: Querying Data

slide-65
SLIDE 65

Modelling in OWL

slide-66
SLIDE 66

66

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.

  • Necessary conditions

– SubClassOf axioms – C SubClassOf: D…any instance of C must be an instance of D

  • 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 Constraints/Background knowledge Definitions

slide-67
SLIDE 67

A first Axiom Pattern: the Covering Axiom

  • Say we have Class X with subclasses Yi
  • e.g., UG, MSc, MRes, PhD are all 


subclasses of Student


  • 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:
  • Quick exercise: translate the above axioms into FOL!

67 Class: Y1 SubClassOf X
 Class: Y2 SubClassOf X … Class: Yk SubClassOf X

Class: Y1 SubClassOf X
 Class: Y2 SubClassOf X … Class: Yk SubClassOf X Class: X SubClassOf: (Y1 or … or Yk)

slide-68
SLIDE 68

Modelling in OWL: Multi-Dimensional Modelling

slide-69
SLIDE 69

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

slide-70
SLIDE 70

70

slide-71
SLIDE 71

…that was just a toy example, this one isn’t:

71 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 shoulder_seems_out_of_place__recollection_of_the_event

slide-72
SLIDE 72

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

72

slide-73
SLIDE 73

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

slide-74
SLIDE 74

Untangling 1: separate dimensions

Amino Acids

  • Alanine
  • Arginine
  • Asparagine
  • Cysteine
  • Glutamate
  • Glutamine
  • Glycine
  • Histidine
  • Isoleucine
  • Leucine
  • Lysine
  • Methionine
  • Phenylalanine
  • Proline
  • Serine
  • Threonine
  • Tryptophan
  • Tyrosine
  • Valine

Charge

  • Negative
  • Neutral
  • Positive

Size

  • Tiny
  • Small
  • Medium
  • Large

Polarity

  • Polar
  • Nonpolar

Hydrophobicity

  • Hydrophobic
  • Hydrophilic

74

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

75

Untangling: separate dimensions

slide-76
SLIDE 76

Class: AminoAcid
 SubClassOf: hasSize some Size,
 hasPolarity some Polar,
 hasCharge some Charge,
 hasHydrophobicity some Hydrophobicity Class: Lysine SubClassOf: AminoAcid, hasSize some Large, hasCharge some Positive, hasPolarity some Polar, hasHydrophobicity some Hydrophilic

76

Untangling 2: relate dimensions using properties

Charge

  • Negative
  • Neutral
  • Positive

Size

  • Tiny
  • Small
  • Medium
  • Large

Polarity

  • Polar
  • Nonpolar

Hydrophobicity

  • Hydrophobic
  • Hydrophilic

Amino Acids

  • Alanine
  • Arginine
  • Asparagine
  • Cysteine
  • Glutamate
slide-77
SLIDE 77

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

77

  • …but don’t do this for all combinations - just those relevant to micro-bio!
slide-78
SLIDE 78

…let’s do this again, for this domain:

78

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

slide-79
SLIDE 79

…let’s do this again, for this domain (2):

79

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?

slide-80
SLIDE 80

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

slide-81
SLIDE 81
  • 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!

Post-Coordination

81

slide-82
SLIDE 82

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

slide-83
SLIDE 83

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
slide-84
SLIDE 84

The OWL API

Your Implementation A nice OWL O.owl

Hard: implement OWL parser, etc Suboptimal: you only get explicit information

slide-85
SLIDE 85

The OWL API

Your Implementation A nice OWL O.owl

Easier: OWL parser, etc for free Clever: you get implicit & explicit information via reasoner!

OWL API OWL Reasoner

slide-86
SLIDE 86

The OWL API

Your Implementation A nice OWL O.owl

Very Clever: ask whether O ⊨ Endocarditis ⊑ Disease ⊓ 
 ∃hasLoc.Heart

OWL API OWL Reasoner

slide-87
SLIDE 87

The OWL API

Your Implementation A nice OWL O.owl

Very Clever: ask whether O ⊨ Bob:(∃suffersFrom.∃hasLoc.Heart)

OWL API OWL Reasoner

OWL/OWL API supports post-coordination: handle expressions like terms!

slide-88
SLIDE 88

Modelling in OWL: Property Closure

slide-89
SLIDE 89

Class: Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish

  • Does Nigiri contain rice?
  • Does Nigiri contain fish?
  • Does Nigiri contain beef?

89

Another Axiom Pattern: Property Closure

slide-90
SLIDE 90

90

Fish Beef VinegaredRice Nigiri

I1 Class: Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish

Fish Beef VinegaredRice Nigiri

I2 hasIngredient Which of these interpretations 
 is a model of the above axiom?

Another Axiom Pattern: Property Closure

slide-91
SLIDE 91

91

Fish Beef VinegaredRice Nigiri

I1 Class: Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish, hasIngredient only (Fish or VinegaredRice)

Fish Beef VinegaredRice Nigiri

I2 hasIngredient Use property closure pattern to avoid unintended models!

Another Axiom Pattern: Property Closure

slide-92
SLIDE 92

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

92

Class: Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish DisjointClasses: VinegaredRice, Fish, Beef Class: Nigiri SubClassOf Sushi, hasIngredient some VinegaredRice, hasIngredient some Fish, hasIngredient only (Fish or VinegaredRice)

  • ⊭ Nigiri SubClassOf 


(hasIngredient only not Beef)

  • ⊭ Nigiri SubClassOf 


(hasIngredient some Beef)

  • ⊨ Nigiri SubClassOf 


(hasIngredient only not Beef) Nigiri contains no Beef!

slide-93
SLIDE 93
  • In summary, the property closure pattern for a property P is of the

form 


93

Class: A SubClassOf … P some B1,
 …. ,
 P some Bn, P only (B1 or … or Bn)

Another Axiom Pattern: Property Closure

slide-94
SLIDE 94

Modelling in OWL: Partonomies

slide-95
SLIDE 95

Beyond Axiom Patterns: Composition, Parts and Wholes

95

slide-96
SLIDE 96

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 

  • f parts, wholes, and their relations
  • …we skip this here, but for…

96

http://www.flickr.com/photos/hartini/2429653007/

slide-97
SLIDE 97

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
  • 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

http://www.flickr.com/photos/aramisfirefly/4585596077

slide-98
SLIDE 98

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

slide-99
SLIDE 99

Transitivity

  • 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

X is part of Y, Y is part of Z, 
 thus X is part of Z

slide-100
SLIDE 100

Transitivity

  • 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

100

X is part of Y, Y is part of Z, 
 thus X is part of Z

Property: isPartOf
 Characteristics: Transitive Property: isComponentOf
 SubPropertyOf: isPartOf Property: isPortionOf
 SubPropertyOf: isPartOf
 Characteristics: Transitive

slide-101
SLIDE 101

Transitivity

  • In partonomies, we may want to identify direct parts

– Piston directPartOf Engine; Engine directPartOf Car – Piston is not directPartOf Car, but is a partOf Car

  • I want to query for all the direct parts of the Car, but 


not the direct parts of its direct parts. – So directPartOf shouldn’t be transitive

  • Solution: provide a transitive superproperty
  • Queries can use the superproperty to query transitive closure
  • Assertions use the direct part of relationship
  • A standard ontology design pattern, sometimes referred to as transitive

reduction.

101

Property: isPartOf Characteristics: Transitive Property: isDirectPartOf SubPropertyOf: isPartOf

slide-102
SLIDE 102

Aside: Transitivity and Subproperties

  • Transitive property R is one s.t. for 


any I model of O, any x,y,z in ∆: – if (x,y) ∈ RI and (y,z) ∈ RI, 
 then (x,z) ∈ RI – A superproperty of a transitive property 
 is not necessarily transitive – A subproperty of a transitive property 
 is not necessarily transitive

102

Property: knows Property: hasFriend SubPropertyOf: knows Characteristics: Transitive Property: hasBestFriend SubPropertyOf: hasFriend

slide-103
SLIDE 103

Aside: A note on Inverses

  • OWL allows us to define inverse relationships
  • If P is the inverse of Q in O, then for 


any I model of O, any x,y in ∆: (x,y) ∈ PI iff (y,x) ∈ QI

  • Be careful about what you can infer about inverse relationships:



 
 
 


  • …are all engines part of cars?
  • does this ontology entail that 


Engine SubClassOf (isPartOf some Car)?

103 Property: knows Property: hasFriend SubPropertyOf: knows Characteristics: Transitive Property: isFriendOf InverseOf: hasFriend Property: hasPart InverseOf: isPartOf Class: Car SubClassOf: Vehicle and 
 (hasPart some Engine)
 (hasPart exactly 4 Wheel)

slide-104
SLIDE 104

Trouble-Shooting:
 what if it all goes red?

slide-105
SLIDE 105

Protégé, reasoning, and ?s

  • Protégé gives direct access to reasoners
  • 1. displays entailments in yellow
  • 2. makes unsatisfiable class names red
  • i.e., if O ⊨ A SubClassOf Nothing
  • 3. gives a big warning if O is inconsistent
  • …how to fix unwanted (1), and (2-3)?
  • Check the ? in
slide-106
SLIDE 106

Protégé, reasoning, and ?s

  • The ? gives you a justification for the entailment O ⊨ α
  • a minimal subset J of the axioms from O such J ⊨ α
  • i.e., for all J’ ⊊ J: J’ ⊭ α
  • you can then modify
  • the justification presented to be laconic or
  • to show more justifications
slide-107
SLIDE 107

Justifications: an example

C SubClassOf D and E (1) D SubClassOf A and r some B1 (2) E SubClassOf A and r only B2 (3) B1 SubClassOf not B2 (4) D SubClassOf not E (5) G SubClassOf B and s some C (6)

⊨ C SubClassOf Nothing Which are the justifications?

slide-108
SLIDE 108

Understand Entailments with Justifications

  • To understand why O ⊨ α given a justification J for it,

– we need to consider all axioms in J: they are all needed! – if J is laconic, then you need to look at all parts in J
 i.e., all sub-expressions

  • To fix an entailment you need to modify each justification:

– as long as on justification is left intact, entailment will be preserved

Let’s fix some entailments!

slide-109
SLIDE 109

Trouble-Shooting:
 what if it all goes slow?

slide-110
SLIDE 110

Why Reasoning is Complex

  • Remember: 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 plus 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

Test whether 
 O has a model. Test whether 
 A and not B is unsatisfiable w.r.t. O Test whether 
 O ∪ {b:¬A} is inconsistent

If O has n class names, m individual names

1 test n2 tests mn tests

each test can be 
 very complex

slide-111
SLIDE 111

Complexity of Entailment Tests

Name Meaning Undecidable no sound, complete & terminating algorithm … …. NExpTime non-det. exponential time ExpTime exponential time PSpace polynomial space NP non-det. polynomial time P polynomial time L logarithmic space

Boolean Logic

First Order Logic

EL

DL-lite

ALC SHIQ

SROIQ

ALC(D)

KL-One

ALCI ALCIQ ALCt

OWL 2 OWL 2 EL OWL 2 QL

OWL 2 profiles

slide-112
SLIDE 112

Performance vs Worst Case Complexity

  • These complexity results are worst case

– modern reasoners are highly optimised, – often behave much better – no clear winner among those supporting OWL API – …try who is fast on your ontology!

  • If classification/… is too slow, try changing

– reasoner

  • to a comparable one

– ontology

  • to make it easier…how?
  • various wrong rumours as to what slows down reasoners:

– DisjointWith axioms…wrong! – InverseProperty…sometimes! – …

slide-113
SLIDE 113

Do All Reasoners do the same?

  • Yes, if they support OWL 2 Direct Semantics
  • Yes, if they implement a decision procedure for entailment

tests

– sound, complete, terminating

  • No, some

– may only support a profile,

  • e.g., ELK is very fast for OWL 2 EL, but may miss entailments

from richer ontologies

– may only support most aspects of OWL 2

  • e.g., Fact++ does not support all datatypes

– don’t support the OWL API, so you

  • have to interact directly with it
  • can’t use it in Protégé

– may have bugs (but only very rarely!)

  • they are pieces of software!
slide-114
SLIDE 114

One Way of Cutting Down O

  • Is your ontology O re-using existing ontologies Oi?

– great: much better than re-inventing the wheel

  • helps to make systems inter-operable

– how? Did you import the other ontology?

  • great: this is how you re-use the terms defined there incl. their

meaning!

  • not so great: it may vastly blow up size of your ontology!

O O1 O2 O3

How much does O need from Oi?

imports

slide-115
SLIDE 115

One Way of Cutting Down O

  • Is your ontology O re-using existing ontologies Oi?

– great: much better than re-inventing the wheel – how? Did you import the other ontology? – How much does O need from Oi? – very little from O3 and O2

O O1 O2 O3

imports

slide-116
SLIDE 116

One Way of Cutting Down O

  • Is your ontology O re-using existing ontologies Oi?

– great: much better than re-inventing the wheel – how? Did you import the other ontology? – How much does O need from Oi? – very little from O3 and O2 - ➡ can’t we cut these ‘parts’ out?

O O1

imports

slide-117
SLIDE 117

Modules of Ontologies

  • Consider a set S of terms 


(e.g., those class & property names that O uses from O2):

– then M ⊆ O2 is a module for S if, for every axiom α over S: 
 
 
 i.e., M knows as much about the terms in S as O2 does
 i.e., if we import M rather than O2, we don’t see a difference
 but for size!

O O1 O2 O3

imports

M

M ⊨ α if and only if O2 ⊨ α

slide-118
SLIDE 118
  • This is a very interesting, logical problem
  • with some solutions being implemented

– and made available in OWL API tools at
 https://github.com/owlcs

  • simply taking all axioms that mention terms of S will

not suffice:

– we may end up with some M ⊆ O2, such that O2 ⊨ α 
 but M ⊭ α – e.g., for S = {Endocarditis, HeartDisease}, a module for S from our running example contains

How to get Modules of Ontologies?

Inflammation SubClassOf Disease

slide-119
SLIDE 119

That’s it…

slide-120
SLIDE 120

Things Left Out

  • Elements of OWL

– property axiom – datatype properties – keys

  • Reasoning techniques, complexity, optimisations
  • Other reasoning problems

– query answering & OBDA – module extraction and conservative extensions – ontology alignment – entailment explanation – similarity measures

  • More ontology engineering methodologies/patterns
slide-121
SLIDE 121

Things to do

  • For me:
  • update the web site with the material
  • add the complete slide set
  • For you:
  • email me in case you have further questions
slide-122
SLIDE 122

Thank You!