Previously... We started the acquisition process... We elicited - - PowerPoint PPT Presentation

previously
SMART_READER_LITE
LIVE PREVIEW

Previously... We started the acquisition process... We elicited - - PowerPoint PPT Presentation

Previously... We started the acquisition process... We elicited tacit knowledge Moving toward formalisation In a variety of ways about a set of terms (or concepts) COMP60421 But even there we could get more explicit


slide-1
SLIDE 1

Moving toward formalisation COMP60421

(Slides by) Bijan Parsia bparsia@cs.man.ac.uk

Previously...

  • We started the acquisition process...

– We elicited tacit knowledge – In a variety of ways – about a set of terms (or concepts)

  • But even there we could get more explicit

– Normalising terms (e.g., “symmetry or symmetric”?) – Hierarchy (and other direct relations between terms) – Categorizing terms (e.g., as modifiers or self-standing) – Constraining and defining terms

  • 2 important next steps

– Getting even more explicit and precise

  • Refining our proto-represntation

– Getting actionable

  • Building a representation

Term extraction

  • Let’s consider a simple text passage:

– There are several sorts of domesticated animals, though by far the most are mammals (like us!). For example, our faithful pets, cats and dogs, are clearly domesticated (or we would not keep such dangerous carnivores in our homes), as is the delicious cow which is farmed in ever increasing numbers.

Term extraction

  • Highlighting!

– There are several sorts of domesticated animals, though by far the most are mammals (like us!). For example, our faithful pets, cats and dogs, are clearly domesticated (or we would not keep such dangerous carnivores in our homes), as is the delicious* yet docile cow which is farmed in ever increasing numbers.

*Note that Bijan is a vegetarian! But he does remember some exceeding delicious cows.

slide-2
SLIDE 2

Term extraction

  • We pull these out

– domesticated – animals – mammals – us – pets – cats – dogs – dangerous – carnivores – homes – delicious – cow – farmed – increasing – numbers

Term extraction

  • We pull these out

– domesticated – animals – mammals – us – pets – cats – dogs – dangerous – carnivores – homes – delicious – cow – farmed – increasing – numbers

These are quite odd but in different ways

Term extraction

  • We pull these out

– domesticated – animals – mammals – us – pets – cats – dogs – dangerous – carnivores – homes – delicious – cow – farmed – increasing – numbers

These are similar but have different levels

  • f generality, and non-

standard spelling

Grouping

  • Base animal categories (nouny terms)

– animals – cats – dogs – mammals – cow – us

  • Ways an animal can be (adjectivally terms)

– domesticated – pets – dangerous – carnivores – delicious – farmed

  • Stuff

– homes – increasing – numbers

slide-3
SLIDE 3

Grouping

  • Base animal categories (nouny terms)

– animals – cats – dogs – mammals – cow – us

  • Ways an animal can be (adjectivally terms)

– domesticated – pets – dangerous – carnivores – delicious – farmed

  • Stuff

– homes – increasing – numbers

Should we care about these?

A key slogan

  • Representations are

– context sensitive, and – interest relative

  • Context sensitive?

– Application or kind of application

  • Interests?

– Application needs

  • Teaching, categorising, data acquisition

– Audience

  • Children, lay people, different disciplines, clinicians vs. researchers
  • Establish context and relevant interests

– In this case the context is this class and my interests are working up a reasonable example

Grouping

  • Base animal categories (nouny terms)

– animals – cats – dogs – mammals – cow – us

  • Ways an animal can be (adjectivally terms)

– domesticated – pets – dangerous – carnivores – delicious – farmed

  • Stuff

– homes – increasing – numbers

Should we care about these? No! (Why?)

Normalise Terms!

  • Base animal categories (nouny terms)

– animals – cats – dogs – mammals – cow – us

  • Ways an animal can be (adjectivally terms)

– domesticated – pets – dangerous – carnivores – delicious – farmed

Standardise number

slide-4
SLIDE 4

Normalise Terms!

  • Base animal categories (nouny terms)

– Animal – Cat – Dog – Mammal – Cow – us

  • Ways an animal can be (adjectivally terms)

– domesticated – pets – dangerous – carnivores – delicious – farmed

Make explicit

Normalise Terms!

  • Base animal categories (nouny terms)

– Animal – Cat – Dog – Mammal – Cow – Human

  • Ways an animal can be (adjectivally terms)

– domesticated – pets – dangerous – carnivores – delicious – farmed

These seem extra (not of interest), and we can adjectivize the rest

Normalise Terms!

  • Base animal categories (nouny terms)

– Animal – Cat – Dog – Mammal – Cow – Human

  • Ways an animal can be (adjectivally terms)

– Domesticated – Pet – Carnivorous – Farmed

We have some background knowledge we can use to “round out” these terms

Normalise Terms!

  • Base animal categories (nouny terms)

– Animal – Cat – Dog – Mammal – Cow – Human

  • Ways an animal can be (adjectivally terms)

– Domesticated – Pet – Farmed – Wild – Carnivorous – Herbivorous – Omnivorous

We have some background knowledge we can use to “round out” these terms (using elicitation techniques)

slide-5
SLIDE 5

Organise terms

  • Base animal categories (nouny terms)

– General

  • Animal
  • Mammal

– Specific

  • Cat
  • Dog
  • Cow
  • Human
  • Ways an animal can be (adjectivally terms)

– General

  • Domesticated
  • Wild
  • Carnivorous
  • Herbivorous
  • Omnivorous

– Specific

  • Pet
  • Farmed

Both General and Specific Contraries! Contraries?

Organise terms

  • Self-Standing (nouny terms)

– General

  • Animal
  • Mammal

– Specific

  • Cat
  • Dog
  • Cow
  • Human
  • Modifiers (adjectivally terms)

– General

  • Domesticated
  • Wild
  • Carnivorous
  • Herbivorous
  • Omnivorous

– Specific

  • Pet
  • Farmed

What terms are definable?

Organise terms

  • Self-Standing (nouny terms)

– General

  • Animal
  • Mammal

– Specific

  • Cat
  • Dog
  • Cow
  • Human
  • Modifiers (adjectivally terms)

– General

  • Domesticated
  • Wild
  • Carnivorous
  • Herbivorous
  • Omnivorous

– Specific

  • Pet
  • Farmed

“An animal which eats only meat”

What terms are definable?

Existing term New terms

Capturing in an actionable form

  • We can capture what we’ve done

– in a structured way – and get some benefits!

slide-6
SLIDE 6

Iterative process

  • Building the representation is informative

– Definitions elicit new terms – Interests and Context tell us when a fixed point is reached

  • Fatigue! Fatigue works...
  • Until now, entirely human process

– Having the structured form helps a little

  • Easier search/browsing

– But no “content” feedback – For this, we need to understand

  • what we want to represent
  • what we can represent!

Toward Definitions COMP60421

(Slides by) Bijan Parsia bparsia@cs.man.ac.uk

Recap...

  • We are well into KA

– Term extraction – Initial regimentation

  • Normalisation
  • Hierarchical organisation
  • Categorisation

– Started additional capture

  • Adding definitions
  • Ready to consider the next step

– Proto-Formalisation!

  • Remember:

– Interest sensitive and context relative – We’re looking for benefits (to way against costs)

  • But first...

23

Remember our passage

  • With highlighting!

– There are several sorts of domesticated animals, though by far the most are mammals (like us!). For example, our faithful pets, cats and dogs, are clearly domesticated (or we would not keep such dangerous carnivores in our homes), as is the delicious* yet docile** cow which is farmed in ever increasing numbers.

  • Why not:

– There are several sorts of domesticated animals, though by far the most are mammals (like us!). For example, our faithful pets, cats and dogs, are clearly domesticated (or we would not keep such dangerous carnivores in our homes), as is the delicious* yet docile** cow which is farmed in ever increasing numbers.

*Keep Bijan’s vegetarianism firmly in mind! **”Docile” never makes it in. 24

slide-7
SLIDE 7

What terms should go in?

  • It depends!

– Interests and context – Resources, including

  • Time
  • Energy
  • Representational capabilities
  • Skill, etc.
  • Fewer than all

– A generally good rule of thumb

  • Other than what’s there

– Another good rule of thumb! – “Fleshing out”

  • Organisational needs (e.g., “LivingThing”)
  • Representational needs (e.g., “eats”)
  • Coverage, “completeness” (e.g., “omnivore”)

25

What matters? How do we tell?

Symmetry in biology is the balanced distribution of duplicate body parts or shapes. The body plans of most multicellular organisms exhibit some form of symmetry, either radial symmetry orbilateral symmetry or "spherical symmetry". A small minority exhibit no symmetry (are asymmetric). In nature and biology, symmetry is approximate. For example, plant leaves, while considered symmetric, will rarely match up exactly when folded in half.

26

What terms are definable?

  • Self-Standing (nouny terms)

– General

  • Animal
  • Mammal

– Specific

  • Cat
  • Dog
  • Cow
  • Human
  • Modifiers (adjectivally terms)

– General

  • Domesticated
  • Wild
  • Carnivorous
  • Herbivorous
  • Omnivorous

– Specific

  • Pet
  • Farmed
  • New Terms

27

What terms are definable?

  • Self-Standing (nouny terms)

– General

  • Animal
  • Mammal

– Specific

  • Cat = only eats dogs
  • Dog = eats cats
  • Cow = vegetarian like Bijan
  • Human = eats anything (but not cats and dogs)
  • Modifiers (adjectivally terms)

– General

  • Domesticated
  • Wild
  • Carnivorous = eats meat
  • Herbivorous = eats plants
  • Omnivorous = eats plans and meat

– (= is both a carnivore and an herbivore)

– Specific

  • Pet
  • Farmed
  • New Terms

????

  • nly?

eats? both? Bijan?

28

slide-8
SLIDE 8

First Regiment!

  • Self-Standing (nouny terms)

– General

  • Animal
  • Mammal

– Specific

  • Cat = eats dogs
  • Dog = eats cats
  • Cow = eats plants
  • Human = eats both plants and meat
  • Modifiers (adjectivally terms)

– General

  • Domesticated
  • Wild
  • Carnivorous = eats meat
  • Herbivorous = eats plants
  • Omnivorous = both a carnivore and an herbivore)

– Specific

  • Pet
  • Farmed

  • New Terms

????

  • nly?

eats? both? Bijan?

29

Regimented?

  • Self-Standing (nouny terms)

– General

  • Animal
  • Mammal

– Specific

  • Cat = eats dogs
  • Dog = eats cats
  • Cow = eats plants
  • Human = eats both plants and meat
  • Modifiers (adjectivally terms)

– General

  • Domesticated
  • Wild
  • Carnivorous = eats meat
  • Herbivorous = eats plants
  • Omnivorous = both a carnivore and an herbivore)

– Specific

  • Pet
  • Farmed

  • New Terms

????

  • nly?

eats? both? Bijan? Ambiguous! Are these really definitions? Normalise!

30

Regimented!

  • Self-Standing (nouny terms)

– General

  • Animal
  • Mammal

– Specific

  • Cat = eats only Dog
  • Dog = eats Cat
  • Cow = eats Plant
  • Human = eats Plants and Meat
  • Modifiers (adjectivally terms)

– General

  • Domesticated
  • Wild
  • Carnivorous = eats only Meat
  • Herbivorous = eats only Plants
  • Omnivorous = Carnivorous and Herbivorous

– Specific

  • Pet
  • Farmed

  • New Terms

eats

  • nly

Plant and Meat Are all these necessary?

31

Pruned!

  • Self-Standing (nouny terms)

– General

  • Animal
  • Mammal

– Specific

  • Cat = eats only Dog
  • Dog = eats Cat
  • Cow = eats not Animal
  • Human = eats not Animal and Animal
  • Modifiers (adjectivally terms)

– General

  • Domesticated
  • Wild
  • Carnivorous = eats only Animal
  • Herbivorous = eats only not Animal
  • Omnivorous = Carnivorous and Herbivorous

– Specific

  • Pet
  • Farmed
  • New Terms

eats

  • nly

and not

Domain specific “Logicy”

Still too strong! Repetitive!

32

slide-9
SLIDE 9

Pruned!

  • Self-Standing (nouny terms)

– General

  • Animal
  • Mammal

– Specific

  • Cat = eats only Dog
  • Dog = eats Cat
  • Cow SubClassOf eats not Animal
  • Human SubClassOf eats not Animal and Animal
  • Modifiers (adjectivally terms)

– General

  • Domesticated
  • Wild
  • Carnivorous = eats only Animal
  • Herbivorous = eats only not Animal
  • Omnivorous = Carnivorous and Herbivorous

– Specific

  • Pet
  • Farmed
  • New Terms

eats

  • nly

and not SubClassOf

Domain specific “Logicy”

33

We’re ready to formalise!

34

Underlying Language

Class: Cat Annotations: rdfs:comment "eats only Dog", rdfs:comment "Definable", rdfs:comment "SelfStanding" EquivalentTo: eats only Dog SubClassOf: Mammal

(There are many possible syntaxes!)

35

Formalising Definitions COMP60421

(Slides by) Bijan Parsia bparsia@cs.man.ac.uk

slide-10
SLIDE 10

Recall the regimentation

  • Self-Standing (nouny terms)

– General

  • Animal

– Mammal » Cat = eats only Dog » Dog = eats only Cat » Cow SubClassOf eats only not Animal » Human SubClassOf eats

  • nly not Animal and Animal
  • Modifiers (adjectivally terms)

– Domesticated

  • Pet
  • Farmed

– Wild – Carnivorous = eats only Animal – Herbivorous = eats only not Animal – Omnivorous = Carnivorous and Herbivorous

  • New Terms

eats

  • nly

and not SubClassOf

Domain specific “Logicy”

37

Recall the (Proto)Formalisation

Class: Cat Annotations: rdfs:comment "eats only Dog", rdfs:comment "Definable", rdfs:comment "SelfStanding" EquivalentTo: eats only Dog SubClassOf: Mammal

38

(don’t look here)

Kind and Name of Term “Mere” Comments

(Their content is significant, but outside our formalism.)

(Hierarchical) Relation to Another Term

“Minimal”

Meaning? (Semantics)

Class: Cat Annotations: rdfs:comment "eats only Dog", rdfs:comment "Definable", rdfs:comment "SelfStanding" EquivalentTo: eats only Dog SubClassOf: Mammal

39

(don’t look here)

A set of entites Nothing! A sub-super set relation (The set of cats is a subset of the set of mammals.)

These are just intuitions!

Benefits?

Class: Cat Annotations: rdfs:comment "eats only Dog", rdfs:comment "Definable", rdfs:comment "SelfStanding" EquivalentTo: eats only Dog SubClassOf: Mammal

40

(don’t look here)

  • Some structure

– We can retrieve classes – We can search for “comments” – We can represent hierarchy in a number of ways

  • Some stuff is not built in!
slide-11
SLIDE 11

Side note: A “Computer View”

Class: G1 Annotations: rdfs:comment «65 61 74 73 20 6F 6E 6C 79 20 44 6F 67» rdfs:comment «44 65 66 69 6E 61 62 6C 65», rdfs:comment «53 65 6C 66 53 74 61 6E 64 69 6E 67» EquivalentTo: eats only Dog SubClassOf: G2

41

(don’t look here) We can do better! (Don’t let what you read fool you!)

Doing Better (in a simple way)!

Class: Cat Annotations: definition "eats only Dog", isDefinable True, grammaticalType SelfStanding EquivalentTo: eats only Dog SubClassOf: Mammal

42

(don’t look here)

This is still unstructured! Add structure! (ease data entry, retrieval) (We’ll ignore this for now!)

Doing Better!

Class: Cat Annotations: rdfs:comment "eats only Dog", isDefinable True, grammaticalType SelfStanding EquivalentTo: eats only Dog SubClassOf: Mammal

43

(don’t look here)

Pull this out!

Doing Better

Class: Cat Annotations: rdfs:comment "eats only Dog", rdfs:comment "Definable", rdfs:comment "SelfStanding" EquivalentTo: eats only Dog SubClassOf: Mammal

44

And put it here!

slide-12
SLIDE 12

Meaning? (Semantics)

Class: Cat Annotations: rdfs:comment "eats only Dog", rdfs:comment "Definable", rdfs:comment "SelfStanding" EquivalentTo: eats only Dog SubClassOf: Mammal

45

A set of entites Still Nothing! A sub-super set relation EquivalentTo is easy... What about the expression?

We Need a Syntax!

  • A simple grammar for expressions (aka, descriptions)
  • Examples

– Animal that eats only Animal – eats some (not Animal) – not (eats only Animal and some Animal)

46

atomicClass ::= [A-Z][a-zA-Z]* (in camel case) atomicProperty ::= [a-z][a-zA-Z]* (in camel case) description ::= conjunction 'or' conjunction { 'or' conjunction } | conjunction conjunction ::= classIRI 'that' [ 'not' ] restriction { 'and' [ 'not' ] restriction } | primary 'and' primary { 'and' primary } | primary primary ::= [ 'not' ] ( restriction | atomic ) restriction ::= property 'some' primary | property 'only' primary

Grammar is a slightly modified subset of the one given in: http://www.w3.org/TR/owl2-manchester-syntax/

Bit More Syntax!

  • A simple grammar for axioms (aka propositions)
  • Examples

– Class: CarnivorousAnimal EquivalentTo: Animal that eats only Animal – Class: Cow SubClassOf: eats some (not Animal) – ConfusedCow SubClassOf: not (eats only Animal and some Animal)

  • (I omit the leading “Class:” where unambiguous.)
  • What does it all mean!?

47

classFrame ::= 'Class:' atomicClass { 'Annotations:' annotation { ',' annotation } | 'SubClassOf:' description { ',' annotation } | 'EquivalentTo:' description { ',' annotation }

Semantics (semi-formal)!

  • Expressions

– atomic classes name sets of entities – properties describe binary relations – descriptions describe sets of entities

  • desc1 and desc2 ☞ the set s.t. both desc1 and desc2 are true
  • desc1 or desc2 ☞ the set s.t. either desc1 or desc2 are true
  • property some desc ☞ the set s.t. they are related by the property to at

least one desc

  • property only desc ☞ the set s.t. all the things they are related to by the

property are desc

  • not desc ☞ the set s.t. desc is not true
  • Axioms are true or false

– A SubClassOf: desc ☞ is true iff every member of A is desc – A EquivalentTo: desc ☞ is true iff A is the same set as desc

48

slide-13
SLIDE 13

Exploring Benefits

  • Omnivorous

– Annotations: comment "Carnivorous and Herbivorous"

  • Annotations have no meaning! (to the renderer)

49

Exploring Benefits

  • Omnivorous

– EquivalentTo: Carnivorous and Herbivorous

  • Expressions have meaning! (to the renderer)

50

Is this right?

Can We Get More?

  • Given

– Carnivorous EquivalentTo eats only Animal – Dog EquivalentTo: eats only Cat – Cat EquivalentTo: eats only Dog

  • What “should” happen?

51

Clearly wrong!

  • Consider:

– Human SubClassOf: eats

  • nly (not Animal and Animal)

– What’s wrong with this?

Oh, the Humanity!

52

Bad, but not as bad as one might expect

slide-14
SLIDE 14
  • Consider:

– Human SubClassOf: eats some (not Animal and Animal) – What’s wrong with this?

  • BONKERS!

An alternative definition

53

Benefits!

  • Links for “free”

– Tools make implicit links explicit – We don’t have to encode every link ourselves – Different modality

  • Instead of generalisation relations...focus on meanings
  • Local rather than global
  • Verification

– Definitions have consequences

  • Wrong links
  • Detectable bonkerosity

– Links so wrong they are never right

– Cross mode checks

  • More to come

54

Reading!!!

  • “Modeling a description logic vocabulary for cancer

research”

– Frank W. Hartel, Sherri de Coronado, Robert Dionne, Gilberto Fragoso, Jennifer Golbeck

  • http://citeseerx.ist.psu.edu/viewdoc/download?

doi=10.1.1.100.6588&rep=rep1&type=pdf&ei=MNg8T5 iIBZHsOer1vcEK&usg=AFQjCNFx3y_oMTt1cmrSp6H OfRHtMAB-rw

– or

  • http://bit.ly/ModelingNCI2004
  • Please at least skim before next class!

55

slide-15
SLIDE 15

OWL Semantics

COMP60421 Sean Bechhofer University of Manchester sean.bechhofer@manchester.ac.uk

1

Technologies for the Semantic Web

  • Metadata

– Resources are marked-up with descriptions of their content. No good unless everyone speaks the same language;

  • Terminologies

– provide shared and common vocabularies of a domain, so search engines, agents, authors and users can communicate. No good unless everyone means the same thing;

  • Ontologies

– provide a shared and common understanding of a domain that can be communicated across people and applications, and will play a major role in supporting information exchange and discovery.

2

Building a Semantic Web

  • Annotation

– Associating metadata with resources

  • Integration

– Integrating information sources

  • Inference

– Reasoning over the information we have. – Could be light-weight (taxonomy) – Could be heavy-weight (logic-style)

  • Interoperation and Sharing are key goals

3

Ontology

  • A representation of the shared background knowledge for a community
  • Providing the intended meaning of a formal vocabulary used to describe a

certain conceptualisation of objects in a domain of interest

  • In CS, ontology taken to mean an engineering artefact
  • A vocabulary of terms plus explicit characterisations of the assumptions

made in interpreting those terms

  • Nearly always includes some notion of hierarchical classification (is-a)
  • Richer languages allow the definition of classes through description of their

characteristics – Introduce the possibility of using inference to help in management and deployment of the knowledge.

4

slide-16
SLIDE 16

Toward Formalization

  • Acquisition Process

– Elicit tacit knowledge – A Set of terms/concepts

  • More explicit information

– Hierarchy and other relations – Categorizing (modifiers) – Constraints and definitions

  • Hierarchical Relations

– Nodes/Arcs representing a relationship (default IS-A) – What IS-A Is and Isn’t: An Analysis of Taxonomic Links in Semantic Networks (Brachman)

5

What is a Taxonomy?

  • An organisation of entities

– Typically hierarchical – subclass relationships

  • Organisationally Rigid

– Things must be put in their proper place. – Multiple places for things?

  • Impoverished descriptions

– Cats are carnivores

  • Why?
  • What is it to be a Carnivore?
  • What if we say something is a Carnivore and a Herbivore?

Animal Mammal Domestic Cat Dog Cow Person Pet Farmed Cat Dog Cow

6

More Expressivity

  • Not just term-term relationships
  • Definitions

– A carnivore is an an animal that eats only meat

  • Constraints

– Carnivores are not herbivores (and vice versa)

  • What Entailments can we make?

– Carnivores eat only Meat – Cats eat only Mice – Mice are Meat – Thus Cats are Carnivores!

7

Structure of an Ontology

  • Ontologies typically have two distinct components:
  • Names for important concepts in the domain

– Paper is a concept whose members are papers. – Person is a concept whose members are persons

  • Background knowledge/constraints on the domain

– A Paper is a kind of ArgumentativeDocument – All participants in a Workshop must be Persons. – No individual can be both an InProceedings and a Journal

  • Syntax required to allow us to state/express/write down this information

– Operators that allow us to describe complex expressions

8

slide-17
SLIDE 17

Object Oriented Models

  • Many languages use an “object oriented model” with
  • Objects/Instances/Individuals

– Elements of the domain of discourse – Possibly allowing descriptions of classes

  • Types/Classes/Concepts

– Sets of objects sharing certain characteristics

  • Relations/Properties/Roles

– Sets of pairs (tuples) of objects

  • Such languages are/can be:

– Well understood – Formally specified – (Relatively) easy to use – Amenable to machine processing

9

Formal Languages

  • The degree of formality of ontology languages varies widely
  • Increased formality makes languages more amenable to machine

processing (e.g. automated reasoning).

  • The formal semantics provides an unambiguous interpretation of the

descriptions.

10

Why Semantics?

  • What does an expression in an ontology language mean?
  • The semantics of a language can tell us precisely how to interpret a

complex expression.

  • Well defined semantics are vital if we are to support machine interpretability

– They remove ambiguities in the interpretation of the descriptions.

Black Telephone

?

11

OWL: The Web Ontology Language

The W3C OWL 2 Web Ontology Language (OWL) is a Semantic Web language designed to represent rich and complex knowledge about things, groups of things, and relations between things. OWL is a computational logic- based language such that knowledge expressed in OWL can be reasoned with by computer programs either to verify the consistency of that knowledge or to make implicit knowledge explicit. OWL documents, known as ontologies, can be published in the World Wide Web and may refer to

  • r be referred from other OWL ontologies. OWL is part of

the W3C's Semantic Web technology stack, which includes RDF [RDF Concepts] and SPARQL [SPARQL].

http://www.w3.org/TR/owl-primer/

12

slide-18
SLIDE 18

OWL Ontologies

  • Classes, Properties and Individuals
  • Individuals

– Elements in the domain – Things, objects

  • Classes

– Collections of things – Primitive, named classes – Class descriptions built up from other classes using class forming

  • perators.
  • Properties

– (Binary) Relations between objects

  • Axioms represent background knowledge/constraints

13

Diversion: Semantics and Model Theories

  • Ontology/KR languages aim to model (part of) world
  • Terms in language correspond to entities in world
  • Meaning given by, e.g.:

– Mapping to another formalism, such as FOL, with own well defined semantics – or a bespoke Model Theory (MT)

  • MT defines relationship between syntax and interpretations

– Can be many interpretations (models) of one piece of syntax – Models supposed to be analogue of (part of) world ! E.g., elements of model correspond to objects in world – Formal relationship between syntax and models ! Structure of models reflect relationships specified in syntax – Inference can then be defined in terms of this Model Theory

14

Set Based Model Theory

  • Many logics (including standard First Order Logic) use a model theory

based on Zermelo-Frankel set theory

  • The domain of discourse (i.e., the part of the world being modelled) is

represented as a set (often referred to as !)

  • Objects in the world are interpreted as elements of !

– Classes/concepts (unary predicates) are subsets of ! – Properties/roles (binary predicates) are subsets of ! ! ! (i.e., !2) – Ternary predicates are subsets of !3 etc.

  • The sub-class relationship between classes can be interpreted as set

inclusion

15

Set Based Model Theory Example

World Interpretation Daisy:Cow Cow kindOf Animal Mary: Person Person kindOf Animal Z123ABC: Car ! {"a,b#,…} $ ! ! !

a b

Model Mary drives Z123ABC

16

slide-19
SLIDE 19

Set Based Model Theory Example

  • Formally, the vocabulary is the set of names we use in our model of (part
  • f) the world

– {Daisy, Cow, Animal, Mary, Person, Z123ABC, Car, drives, …}

  • An interpretation I is a tuple <!,I>

– ! is the domain (a set)

– I is a mapping that maps ! Names of objects to elements of ! ! Names of unary predicates (classes/concepts) to subsets of ! ! Names of binary predicates (properties/roles) to subsets of ! X ! ! And so on for higher arity predicates (if any)

17

Direct OWL Semantics

  • OWL semantics defined by interpretations: <!,I>, where

– ! is the domain (a non-empty set)

– I is an interpretation function that maps: ! Class name A % subset AI of ! ! Property name R % binary relation RI over ! ! Individual name i % iI element of !

  • Interpretation function I tells us how to interpret atomic classes, properties

and individuals. – The semantics of class operators is given by extending the interpretation function in an obvious way.

18

OWL Class Constructors

Constructor Example Interpretation Atomic Class Human HumanI and Human and Male HumanI & MaleI

  • r

Doctor or Lawyer DoctorI ' LawyerI not not Male ! \ MaleI

19

OWL Class Constructors

Constructor Example Interpretation some hasChild some Lawyer {x|(y."x,y#)hasChildI* y)LawyerI}

  • nly

hasChild only Doctor {x|+y."x,y#)hasChildI , y)DoctorI} min hasChild min 2 {x|#"x,y#)hasChildI - 2} max hasChild max 2 {x|#"x,y#)hasChildI . 2}

20

slide-20
SLIDE 20

Interpretation Example

! = {v, w, x, y, z}

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

  • not B =
  • A and B =
  • not A or B =
  • R some B =
  • R only B =
  • R some (R some A) =
  • R some not(A or B) =
  • R min 1 =
  • R max 1 =

AI

v x y z w

BI

21

OWL Knowledge Bases (Ontologies)

  • An OWL ontology is a collection of axioms that describe the model.

– Axioms allow us to add further statements about arbitrary concept expressions and properties

  • An Ontology/Knowledge Base is often split into two parts

– T-box is a set of axioms of the form: ! C SubClassOf: D (subclass) ! C EquivalentTo: D (class equivalence) ! R SubPropertyOf: S (subproperty) ! R EquivalentTo: S (property equivalence) ! ... – A-box is a set of axioms of the form ! x Type: C (concept instantiation) ! "x,y# ) R (role instantiation) – OWL doesn’t formally make this distinction

22

Ontology Semantics

  • The interpretation function I can be extended to axioms.
  • An interpretation I then satisfies (models) an axiom A iff the interpretation
  • f the axiom holds in the interpretation
  • I satisfies an ontology O iff I satisfies every axiom A in O
  • The collection of axioms constrain the possible interpretations that can be

made.

23

Axiom Example Interpretation SubClassOf Human subClassOf: Animal HumanI $ AnimalI EquivalentTo Man EquivalentTo: Human and Male ManI = HumanI & MaleI DisjointWith Animal DisjointWith: Plant AnimalI & PlantI = /

OWL Class Axioms

24

slide-21
SLIDE 21

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

– Must hold if an object is to be an instance of the class – SubClassOf axioms

  • Sufficient conditions

– Those properties an object must have in order to be recognised as a member

  • f the class.

– EquivalentTo axioms

  • Allows us to perform automated classification.

25

If it looks like a duck and walks like a duck, then it’s a duck!

Constraints Definitions

OWL Individual Axioms

Axiom Example Interpretation Types Sean Types: Human SeanI ) HumanI Facts Sean Facts: worksWith Bijan "SeanI,BijanI#)worksWithI DifferentFrom Sean DifferentFrom: Bijan SeanI " BijanI SameAs GeorgeWBush SameAs: PresidentBush GeorgeWBushI = PresidentBushI

26

OWL Property Axioms

Axiom Example Interpretation SubPropertyOf: hasMother SubPropertyOf: hasParent hasMotherI $ hasParentI functional employedBy Characteristics: Functional +x,y,z. ("x,y#)employedByI * "x,z#)employedByI) , y = z domain

  • wns Domain: Person

+x."x,y#)ownsI , x)PersonI range employs Range: Person +y."x,y#)employsI , y)PersonI transitivity hasPart Characteristics: Transitive +x,y,z. ("x,y#)hasPartI * "y,z#)hasPartI) , "x,z#)hasPartI

27

Multiple Models -v- Single Model

  • An OWL Ontology doesn’t define a single model, it is a set of

constraints that define a set of possible models – No constraints (empty Ontology) means any model is possible – More constraints means fewer models – Too many constraints may mean no possible model (inconsistent Ontology)

  • In contrast, DBs (and frame/rule KR systems) make assumptions such

that DB/KB defines a single model – Unique name assumption ! Different names always interpreted as different individuals – Closed world assumption ! Domain consists only of individuals named in the DB/KB – Minimal models ! Extensions are as small as possible

28

slide-22
SLIDE 22

I2: ! = {v, w, x, y, z} CI = {v, w, y} DI = {x, y} EI = {z} aI = v bI = x cI = w dI = z I3: ! = {v, w, x, y, z} CI = {v, w, y} DI = {x, y} EI = {z} aI = v bI = y cI = w dI = z I4: ! = {v, w, x, y, z} CI = {v, w, x, y} DI = {x, y} EI = {z} aI = v bI = x cI = y dI = z

Example of Multiple Models

KB = {} KB = {a:C, b:D, c:C, d:E} KB = {a:C, b:D, c:C, d:E, b:C} KB = {a:C, b:D, c:C, d:E, b:C D subClassOf C} KB = {a:C, b:D, c:C, d:E, b:C D subClassOf C, E subClassOf C} KB = {a:C, b:D, c:C, d:E, b:C D subClassOf C E subClassOf C, d: not C}

I1: ! = {v, w, x, y, z} CI = {v, w, y} DI = {x, y} EI = {z} aI = v bI = x cI = w dI = y

29

Example of Single Model

KB = {} KB = {a:C, b:D, c:C, d:E} KB = {a:C, b:D, c:C, d:E, b:C} KB = {a:C, b:D, c:C, d:E, b:C E subClassOf C}

I: ! = {} I: ! = {a, b, c, d} CI = {a, b, c} DI = {b} EI = {d} aI = a bI = b cI = c dI = d I: ! = {a, b, c, d} CI = {a, c} DI = {b} EI = {d} aI = a bI = b cI = c dI = d I: ! = {a, b, c, d} CI = {a, b, c, d} DI = {b} EI = {d} aI = a bI = b cI = c dI = d

30

Single Model -v- Multiple Model

Multiple models:

  • Expressively powerful

– Boolean connectives, including not and or

  • Can capture incomplete

information – E.g., using or and some

  • Monotonic

– Adding information preserves truth

  • Reasoning (e.g., querying) is

hard/slow

  • Queries may give counter-

intuitive results in some cases Single model:

  • Expressively weaker (in most

respects) – No negation or disjunction

  • Can’t capture incomplete

information

  • Nonmonotonic

– Adding information does not preserve truth

  • Reasoning (e.g., querying) is

easy/fast

  • Queries may give counter-

intuitive results in some cases

31

Inference

  • An OWL Ontology is a set of constraints that define a set of possible models
  • We may be able to determine that particular properties must hold of this set of

models.

  • This allows us to draw inferences.
  • Knowledge is correct (captures intuitions)

– D subsumes C w.r.t. O iff for every model I of O, CI $ DI

  • Knowledge is minimally redundant (no unintended synonyms)

– C is equivalent to D w.r.t. O iff for every model I of O, CI = DI

  • Knowledge is meaningful (classes can have instances)

– C is satisfiable w.r.t. O iff there exists some model I of O s.t. CI " /

  • Querying knowledge

– x is an instance of C w.r.t. O iff for every model I of O, xI ) CI – <x,y> is an instance of R w.r.t. K iff for, every model I of O, (xI,yI) ) RI

  • Ontology consistency

– An ontology O is consistent iff there exists some model I of O

32

slide-23
SLIDE 23

Reasoning

  • Tableau algorithms used to test satisfiability (consistency)
  • Try to build a tree-like model I of the input concept C
  • Decompose C syntactically

– Apply tableau expansion rules – Infer constraints on elements of model

  • Tableau rules correspond to constructors in logic (and, or etc)

– Some rules are nondeterministic (e.g., or, min) – In practice, this means search

  • Stop when no more rules applicable or clash occurs

– Clash is an obvious contradiction, e.g., A(x), not A(x)

  • Cycle check (blocking) may be needed for termination
  • C satisfiable iff rules can be applied such that a fully expanded clash free

tree is constructed

33

Defining OWL

  • OWL is defined via a Structural Specification

http://www.w3.org/TR/owl2-syntax/

  • Defines language independently of concrete syntaxes
  • Conceptual structure and abstract syntax

– UML diagrams and functional-style syntax used to define the language – Mappings to concrete syntaxes then given.

  • The structural specification provides the foundation for implementations

(e.g. OWL API as discussed later)

34

OWL Resources

  • The OWL Technical Documentation is all available online from the W3C site.

http://www.w3.org/TR/owl2-overview/

  • All the OWL documents are relevant, but in particular the Overview, Primer,

Reference Guide and Manchester Syntax Guide will help you in the initial stages.

35

slide-24
SLIDE 24

Description Logic Reasoning!

COMP60421! Sean Bechhofer! sean.bechhofer@manchester.ac.uk!

2!

DL Semantics!

  • Recall that our semantics was defined in terms of Interpretations!

– Domain of discourse !! – Function I mapping:! – Individuals names x, y, z to elements of !! – Class names A, B, C to subsets of !! – Property names R, S, to sets of pairs of elements of !!

AI

v x y z w

BI

3!

DL Semantics!

  • Interpretations then extended to cover concept expressions!

– (A ! B)I = AI " BI!

  • Interpretation is a model of an axiom A iff the interpretation of the

axiom holds! – I ! A # B iff AI $ BI!

  • Interpretation is a model of an ontology O iff it is a model of all the

axioms in O! Note use of logical (“German syntax”) ! here rather than Manchester Syntax.!

4!

Inference!

  • What can we infer from an Ontology O?!

– And what do we mean by infer?!

  • The semantics describe the conditions under which an interpretation

is a model of a Ontology O.!

  • It can be the case that due to the constraints that O places on the

interpretations, there are consequences that also hold in all the interpretations.!

  • Recall, an Ontology doesn’t define a single model, it is a set of

constraints that define a set of possible models! – No constraints (empty Ontology) means any model is possible! – More constraints means fewer models! – Too many constraints may mean no possible model (inconsistent Ontology)!

slide-25
SLIDE 25

5!

Basic Inference Problems!

  • Subsumption!

– C #O D !iff !CI $ DI in all models I of O !

  • Equivalence!

– C %O D !iff !CI = DI in all models I of O !

  • Satisfiability!

– C %O ⊥ !iff !CI non empty in some model I of O !

  • Instantiation!

– i &O C !iff !i & CI in all models I of O !

  • Problems reducible to satisfiability:!

– e.g., C #O D iff (C ! ¬D) not satisfiable w.r.t. O !

6!

Example Inferences!

  • O = {C # A ! B }!

– C #O A!

  • O = {}!

– A #O A ' B!

  • O = { C % (R.A, B # A }!

‒ (R.A #O C !

7!

Consistency and Unsatisfiability!

  • Note the difference between class satisfiability and ontology

consistency!

  • A class C is unsatisfiable if there are no models such that its

interpretation is non-empty!

  • An Ontology O is inconsistent if there are no models of O!
  • A consistent Ontology may contain unsatisfiable classes. !
  • O = {C # A ! B, D # C ! ¬ B }!

– D unsatisfiable…!

  • O = {C # )R.¬A, x:C, y:A, <x,y>:R}!

– Inconsistent Ontology!

8!

Why are these useful?!

  • Subsumption: check knowledge is correct!
  • Equivalence: check knowledge is minimally redundant!
  • Satisfiability: check knowledge is meaningful!
  • Instantiation: check if individual i instance of class C. !

– Supporting query.!

slide-26
SLIDE 26

9!

Structural Approaches!

  • Early implementations used structural approaches!
  • E.g. to check subsumption!
  • 1. Normalise expressions!
  • 2. Compare the structure of the expressions to see if there is

“overlap”.!

  • This is effective, but hard to get complete results, particularly in the

face of GCIs.!

  • An alternative is to use an approach based on the underlying

semantics, e.g. tableaux. !

10!

Tableaux Algorithms: Basics!

  • Tableaux algorithms used to test satisfiability!
  • Try to build tree-like model I of input class C!
  • Work on classes in negation normal form!

– Rewrite and push in negation using de Morgan’s laws! – E.g. ¬(R.C to )R.¬C!

  • Break down C syntactically, inferring constraints on elements of I!
  • Decomposition uses tableau rules corresponding to constructors in

the logic (e.g !, ()! – Some rules are nondeterministic, e.g. they involve some choice!

! ', *!

– In practice, this means search.!

11!

Tableaux Algorithms: Basics!

  • Stop when a clash occurs or when no rules are applicable. !
  • Blocking (cycle check) used to guarantee termination!
  • Returns “C is consistent” iff C is consistent!

– Tree model property!

12!

Tableaux Algorithms: Details!

  • Work on tree T representing model I of class C!

– Nodes represent elements of domain !! – Nodes labelled with sub-expressions of C! – Edges represent role-successorships between elements of !!

  • T initialised with single root node labelled {C}!
  • Tableau rules repeatedly applied to node labels.!

– Extend labels of a node or extend/modify the tree structure! – Rules can be blocked, e.g. if a predecessor node has superset label! – Nondeterministic rules mean we may need to search for possible extensions!

  • T contains a Clash if there is an obvious contradiction in some node

label! – E.g. {A, ¬ A} $ L(x) for some class A and node x!

slide-27
SLIDE 27

13!

Tableaux Algorithms: Details!

  • T fully expanded if no rules are applicable!
  • C satisfiable iff fully expanded clash-free tree T found!

– There is then a trivial correspondence between T and a model of C.!

  • Thus the tableaux algorithm helps us by finding a witness for the

consistency of C! – There is some model.!

14!

ALC!

  • Propositional constructors!

– !, ', ¬!

  • Role Quantifiers!

– (, )!

  • Top and Bottom!

– +, ,!

  • Concept names, +, , are
  • Concepts. Role names are

Roles!

  • For C, D concepts and R a

role, the following are Concepts:! – ¬ C! – C ! D! – C ' D! – ( R.C! – ) R.C!

15!

ALC and OWL!

ALC! OWL!

!

and!

'

  • r!

¬

not!

(

some!

)

  • nly!

+

thing!

,

nothing!

16!

Tableaux Rules for ALC!

{C1 ! C2,… }!

x!

{C1 ! C2, C1, C2,… }!

x!

  • !!

{C1 ' C2,… }!

x!

{C1 ' C2, C,… }! For C & {C1, C2}!

x!

  • '!

{(R.C,… }!

x!

{(R.C,… }!

x!

  • (!

{C}!

y!

{)R.C,… }!

x!

  • )!

{C,…}!

y!

{)R.C,… }!

x!

{…}!

y! R! R! R!

slide-28
SLIDE 28

17!

Algorithm Examples!

  • Test the satisfiability of!

(R.A ! )R.B! (R.A ! )R.¬A! (R.(A ' (R.B) ! )R.¬A ! )R.()R.¬B)!

18!

Tableau Rule for Transitive Roles!

  • We can also consider ALC plus transitive roles !

– i.e. allowing assertions about the transitivity of a role (rather than allowing us to talk about the transitive closure!

  • This then requires an additional rule for transitive role R!
  • No longer naturally terminating (e.g. if C = (R.+)!
  • We need a blocking strategy!

– Simple blocking is enough for ALC + transitive roles! – Do not expand the node label if the ancestor has superset label! – Need more for more expressive logics.! {)R.C,… }!

x!

  • )+!

{)R.C,…}!

y!

{)R.C,… }!

x!

{…}!

y! R! R!

19!

Algorithm Examples!

  • Test the satisfiability of!

(S.C ! )S.(¬C ' ¬D) ! (R.C ! )R((R.C)!

Where R is a transitive role!

20!

Satisfiability w.r.t Axioms!

  • For each axiom C # D in O, add ¬C ' D to every node label!

– Can rewrite Ontology in terms of #!

  • Potentially very expensive!!

– Adding a disjunction to every node in the graph!

slide-29
SLIDE 29

21!

Unfolding!

  • Unfolding allows us to deal with particular forms of Ontology.!
  • Consider a Ontology O that only contains definitions!

– E.g. C % D or C # D, where C is a concept name.!

  • For any concept A occurring in D, we say A directly uses D and

define uses as the transitive closure of directly uses. !

  • O contains a cycle if there is an atomic concept that uses itself. !

– {A # B, B # C, C % D}! – {A # B, B % (R.C, C # A}!

  • If O is acyclic, we can expand and unfold the Ontology. !

22!

Unfolding!

  • To test satisfiability of concept description C w.r.t. acyclic Ontology

O!

  • 1. For any axiom!

A % B! – Replace all occurrences of A in C with B.!

  • 2. For any axiom !

A # B! – Replace all occurrences of A in C with A’ ! B, where A’ is a new concept name. !

  • 3. Then proceed with tableaux as normal on the new description. !

23!

Unfolding Examples!

  • Test satisfiability of !

¬ (¬A ' ( R.C)!

  • 1. w.r.t the axioms!

{A # C ! (R.C}!

  • 2. w.r.t. the axioms!

{A % ¬ C}!

24!

More Expressive DLS!

  • Basic technique can be extended to deal with!

– Role inclusion axioms! – Number restrictions! – Inverse Roles! – Concrete domains! – Aboxes!

  • Extend expansion rules and use more sophisticated blocking strategy.!
  • Forest instead of tree for Individual Facts!

– Root nodes correspond to individuals in Ontology.!

slide-30
SLIDE 30

25!

Scalability!

  • Reasoning with DL languages is hard!

– Ontologies on the web may grow large! – Particularly with Instance data. !

  • Space usage!

– Storage required for tableaux datastructures! – Rarely serious problem in practice! – But problems with inverse roles and cyclical Ontologies!

  • Time usage!

– Non-deterministic rules lead to search! – Serious problem in practice! – Mitigated by!

! Careful choice of algorithm! ! Highly optimised implementations!

26!

Choice of Algorithm!

  • Transitive roles rather than transitive closure!

– Deterministic expansion of (R.C even when R in R+! – Relatively simple blocking conditions!

  • Direct algorithm/implementation instead of encodings!

– GCI axioms can be used to encode additional operators/axioms! – E.g. domain and range!

! (domain R C) % (R.T # C!

– But even simple domain encoding yields terrible performance with large numbers of roles. !

27!

Additional Reasoning Tasks!

  • Querying!

– Basic logical inference services insufficient! – DB style query languages! – Supporting applications!

  • Explanation!

– Why do concepts subsume?! – Supporting ontology design process!

  • Non-Standard Inferences!

– Least Common Subsumer! – Matching! – Supporting ontology design process!

28!

Extra Logical Services!

  • It’s not just about logic!!

– We also need services that are not directed related to the underlying formal semantics of the representation!

  • Annotation Services!

– Associating information with concepts.! – Facilitating the use of an ontology within an application! – “Conceptual Coatrack”!

  • Lexical Services!

– Associating words, terms or symbols with concepts! – Facilitating understanding and use in applications! – Rendering definitions!

slide-31
SLIDE 31

29!

Summary!

  • Tableaux Reasoning provides implementations for basic inference

problems! – Satisfiability! – Subsumption! – Classification!

  • Tableaux rules applied to try and build a treelike model of a concept

(and this demonstrate satisfiability)!

  • Further Reading:!

– Baader et.al. The Description Logic Handbook, Cambridge University Press, 2003!