1
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Knowledge Representation IIIOntologies and Applications
Vasant HonavarArtificial Intelligence Research Laboratory
Department of Computer ScienceBioinformatics and Computational Biology Program
Center for Computational Intelligence, Learning, & DiscoveryIowa State University
[email protected]/~honavar/
www.cild.iastate.edu/www.bcb.iastate.edu/www.igert.iastate.edu
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Ontology...
• Philosophical origins dating back to Aristotle– “The metaphysical study of the nature of being
and existence”
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Ontology...
• In Artificial Intelligence,– “an ontology is a formal, explicit specification of a
shared conceptualization ”• Conceptualization
– What does our world consist of?– Entities, Properties, Relationships
• Formal – Machine interpretable – Syntax, semantics, proof theory
• Shared– Within a domain of inquiry (e.g., physics), a
community (e.g., fans of Madonna) etc.
2
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
What does our world consist of?• Objects or instances or individuals
– Correspond to constants in FOL• Classes or concepts usually organized in taxonomies
– Sets of objects sharing certain characteristics– Equivalent to unary predicates in FOL– e.g. a university ontology, might include the concepts
student and professor• Relations, roles between concepts (often limited to binary)
– Binary relations define sets of pairs (tuples) of objects– Binary relations are equivalent to binary predicates in
FOL– e.g., subclass-of, is-a
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
What does our world consist of?• Functions:
– Can be modeled by relations in which the n th element of the relation is unique given the n-1 preceding elements
– Price-of-a-used-car function can calculate the price of the second-hand car given the car model, and mileage
• Axioms – Sentences that are always true in our world– Definitions that restrict the use of concepts and
relationships– e.g., every CS major should have a 3.0 or better GPA
in the CS pre-major
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Kinds of ontologies• General ontologies
– vocabulary of things, events, time, space, units, etc.• Domain ontologies
– Ontology reusable within a domain– e.g., gene ontology, e-commerce ontology
Functional Genomics
Structural GenomicsTissue
Disease
Clinical Data
Clinical TrialsGenome Sequence
3
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Kinds of ontologies• Task ontologies
– a systematic vocabulary of the terms used to solve problems associated with tasks that may or may not be from a single domain
– e.g., scheduling task ontology• Domain-Task ontology
– Task ontology reusable in specific domains– e.g., airline scheduling task ontology; meeting scheduling
task ontology
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Ontology Applications
• Semantic search– search for news on high tech stocks should
return news on Intel, Yahoo, etc.• e-commerce • Querying multiple data sources• Enterprise Application Integration• e-science• Semantic web• …
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
e-commerce
.251.25SquareXAB035
.751.5RoundXAB023
…Price ($US)
Size (in)ShapeCatalog No.
.4531S550298
.3537R550296
…Price ($US)
Diam(mm)Geom.Part No.
Washer
Catalog No.Shape Size Price
iMetal Corp.
E-Machina
iMetal Corp.
E-Machina
Manufacturer
.451.25Square550298
.351.5Round550296
.751.5RoundXAB023
.251.25SquareXAB035
…Price ($US)Size (in)ShapeMfr No.
Supplier A Supplier B
Buyer
Ontology
4
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
e-science
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
URI, HTML, HTTPStaticWWW
500 million usermore than 3 billion pages
Current Web
1992
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
The Web• The World Wide Web has been a success beyond
anyone had dreamed of at the time of its invention in terms of – of the amount of information available– the rate of increase in the number of users
• This success is based on– its simplicity
• simple protocol HTTP• simple markup language HTML
– Network effect• But.. HTML is primarily for formatting information for
presentation to human readers• The current web is impoverished in terms of semantics
5
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
The current web is not enough!
• Homogeneous resources• Semantically empty• Needs human interpretation
Identified resourcesMeaningful linksMachine processable
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Semantic technologies and semantic web
• Semantic Web Vision – machine-interpretable data and knowledge grounded in
domain specific, task specific, or even user-specific semantics
– specialized reasoning services– services of querying, integrating, and analyzing, and
acting on information• The semantic Web needs ontologies for
– formal and consensual specifications of conceptualizations…
– providing a shared and common understanding of a domain
– Communicating data and knowledge between humans and computers
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Semantic Web Technology
• Ontologies – establish a formal semantics for data and knowledge
making it possible for computers to process information– establish a real-world semantics allowing communication
of machine interpretable content between humans, between machines, and between humans and machines
6
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Semantic web
• URIs– You must name something before you can use it
• Triples: – subject, predicate, object as a basis for all
communication• RDF Model:
– Nodes and arcs• RDF serialization:
– Graph, RDF/XML, N3• Ontologies:
– RDF Schema, OWL
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Semantic Web - Language tower
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
XML
• Tags define the semantics of the data<name>Oksy Yakhnenko</name>
• XML provides arbitrary DAGs as data structures<person>
<name>Oksy Yakhnenko</name><phone>5152944377</phone>
</person>• XML allows the definition of application-specific
tagshttp://www.w3.org/XML/
7
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
XML Schema• DTDs allow to define a grammar and meaningful tag for
documents• XML schema provides similar service and add:
– XML schemas definition are themselves XML documents
– XML schemas provide a rich set of data types that can be used to define the values of elementary tags
– XML schemas provide much richer means for defining nested tags (such as tags with subtags)
– XML schemas provide the namespace mechanism to combine XML documents with heterogeneous vocabulary
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
XML Schema
• XML provides semantic information as a by-product of defining the structure of the document
• XML prescribes a tree structure for documents and the different leaves of the tree have a well-defined tag and context the information can be understood with.
• In XML, the structure and semantics of documents are interwoven
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Web “Schema” Languages• Existing Web languages extended to facilitate content
description– XML → XML Schema (XMLS)– XMLS not an ontology language– Changes format of DTDs (document schemas) to be
XML– Adds an extensible type hierarchy
• Integers, Strings, etc.• Can define sub-types, e.g., positive integers
8
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Web “Schema” Languages• Existing Web languages extended to facilitate content
description– RDF → RDF Schema (RDFS)
• RDFS is recognisable as an ontology language– Classes and properties– Sub/super-classes (and properties)– Range and domain (of properties)
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
RDF and RDFS
• RDF stands for Resource Description Framework• It is a W3C candidate recommendation
(http://www.w3.org/RDF)• RDF is graphical formalism ( + XML syntax + semantics)
– for representing metadata– for describing the semantics of information in a machine-
accessible way• RDFS extends RDF with “schema vocabulary”, e.g.:
– Class, Property– type, subClassOf, subPropertyOf– range, domain
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
The RDF Data Model
Oksy AdrianhasColleague
• Statements – Are <subject, predicate, object> triples:– Can be serialized in XML
<Ian,hasColleague,Uli>• Describe properties of resourcesA resource is a URI representing a (class of) object(s):
– a document, a picture, a paragraph on the Web– a book in the library, a person
• Properties themselves are also resources (URIs)
9
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
URIs
• URI – Uniform Resource Identifier– "The generic set of all names / addresses that are short
strings that refer to resources“– Typically look like “normal” URLs, often with fragment
identifiers to point at a specific part of a document:• URLs (Uniform Resource Locators) are a particular type of
URI, used for resources that can be accessed on the web (e.g., web pages)
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Linking Statements
• The subject of one statement can be the object of another• Such collections of statements form a directed, labelled
graph
Oksy AdrianhasColleague
Jie http://www.cs.iastate.edu/~silvescu
hasColleaguehasHomePage
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
RDF Syntax
• RDF has an XML syntax that has a specific meaning:• Every Description element describes a resource• Every attribute or nested element inside a Description is
a property of that Resource with an associated object resource
• Resources are referred to using URIs
10
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
RDF Syntax<Description about="some.uri/person/yakhnenko">
<hasColleagueresource="some.uri/person/silvescu"/></Description><Description about="some.uri/person/silvescu"><hasHomePage>http://www.cs.iastate.edu/~silvescu</hasHomePage></Description></Description>
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
RDF Schema
• RDF schema provides a simple and basic modeling language for ontologies
• RDF schema can express– concepts– properties– is-a hierarchy and– simple domain and range restrictions
• More complex ontologies can be built on top of RDF schema
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
RDF Schema (RDFS)• RDF gives a formalism for meta data annotation, and a way
to write it down in XML, but it does not give any special meaning to vocabulary such as subClassOf or type– Interpretation is an arbitrary binary relation– I.e., <Person,subClassOf,Animal> has no special
meaning• RDF Schema defines “schema vocabulary” that supports
definition of ontologies– gives “extra meaning” to particular RDF predicates and
resources (such as subClasOf)– this “extra meaning”, or semantics, specifies how a term
should be interpreted
11
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
RDFS Examples
• RDF Schema terms– Class– Property– type– subClassOf– range– domain
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
RDFS Examples
• RDF Schema terms are the RDF Schema building blocks (constructors) used to create vocabularies:<Person,type,Class><hasColleague,type,Property><Professor,subClassOf,Person><Carole,type,Professor><hasColleague,range,Person><hasColleague,domain,Person>
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
RDF/RDFS “Liberality”• No distinction between classes and instances (individuals)
<Species,type,Class><Lion,type,Species><Leo,type,Lion>
• Properties can themselves have properties<hasDaughter,subPropertyOf,hasChild><hasDaughter,type,familyProperty>
• No distinction between language constructors and ontology vocabulary, so constructors can be applied to themselves/each other<type,range,Class><Property,type,Class><type,subPropertyOf,subClassOf>
12
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
RDF/RDFS Semantics
• RDF has “Non-standard” semantics • Semantics given by RDF Model Theory (MT)
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
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)
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Semantics and Model Theories
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 (e.g., subsumption) defined in terms of MT– E.g., T ² A v B iff in every model of T, ext(A) µ ext(B)
13
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
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 referedas Δ)
• 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.
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Set Based Model Theory
• The sub-class relationship between classes can be interpreted as set inclusion in Zermelo-Frankel set theory
• Doesn’t work for RDF, because in RDF a class (set) can be a member (element) of another class (set)– In Z-F set theory, elements of classes are atomic
(no structure)
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Set Based Model Theory Example
World Interpretation
Daisy isA Cow
Cow kindOf Animal
Mary isA Person
Person kindOf Animal
Z123ABC isA Car
Δ
{(a,b⇒,…} ∈Δ xΔ
a
b
Model
Mary drives Z123ABC
14
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Set Based Model Theory Example• Formally, the vocabulary is the set of names we use in our
model of (part of) 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)
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
• Semantics given by RDF Model Theory (MT)• In RDF MT, an interpretation I of a vocabulary V consists
of: – IR, a non-empty set of resources (corresponds to Δ)– IS, a mapping from V into IR (corresponds to ¢I )– IP, a distinguished subset of IR (the properties)
• A vocabulary element v ∈ V is a property iff IS(v) ∈ IP– IEXT, a mapping from IP into the powerset of IR×IR
• I.e., property elements mapped to subsets of IR×IR– IL, a mapping from typed literals into IR
RDF Semantics
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Example RDF Simple Interpretation
15
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
• RDF Imposes semantic conditions on interpretations, e.g.:– x is in IP if and only if <x, IS(rdf:Property)> is in
IEXT(I(rdf:type))• All RDF interpretations must satisfy certain axiomatic
triples, e.g.:– rdf:type rdf:type rdf:Property– rdf:subject rdf:type rdf:Property– rdf:predicate rdf:type rdf:Property– rdf:object rdf:type rdf:Property– rdf:first rdf:type rdf:Property– rdf:rest rdf:type rdf:Property– rdf:value rdf:type rdf:Property– …
RDF Semantic Conditions
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Example RDF Interpretation
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
• RDFS simply adds semantic conditions and axiomatic triples that give meaning to schema vocabulary
• Class interpretation ICEXT simply induced by rdf:type, i.e.:– x is in ICEXT(y) if and only if <x,y> is in IEXT(IS(rdf:type))
• Other semantic conditions include:– If <x,y> is in IEXT(IS(rdfs:domain)) and <u,v> is in IEXT(x) then u is in
ICEXT(y)– If <x,y> is in IEXT(IS(rdfs:subClassOf)) then x and y are in IC and
ICEXT(x) is a subset of ICEXT(y)– IEXT(IS(rdfs:subClassOf)) is transitive and reflexive on IC
• Axiomatic triples include:– rdf:type rdfs:domain rdfs:Resource– rdfs:domain rdfs:domain rdf:Property
RDFS Semantics
16
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
RDFS Interpretation Example
• If RDFS graph includes triples<Species,type,Class> <Lion,type,Species> <Leo,type,Lion><Lion,subClassOf,Mammal> <Mammal,subClassOf,Animal>
• Interpretation conditions imply existence of triples<Lion,subClassOf,Animal> <Leo,type,Mammal> <Leo,type,Animal>
…
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Problems with RDFS• RDFS too weak to describe resources in sufficient detail
– No localised range and domain constraints• Can’t say that the range of hasChild is person when
applied to persons and elephant when applied to elephants
– No existence/cardinality constraints• Can’t say that all instances of person have a mother
that is also a person, or that persons have exactly 2 parents
– No transitive, inverse or symmetrical properties• Can’t say that isPartOf is a transitive property, that
hasPart is the inverse of isPartOf or that touches is symmetrical
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Web Ontology Language Requirements
Desirable features identified for Web Ontology Language:
• Extends existing Web standards – Such as XML, RDF, RDFS
• Easy to understand and use– Should be based on familiar KR idioms
• Formally specified • Of “adequate” expressive power• Possible to provide automated reasoning support
17
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
From RDF to OWL• Two languages developed to satisfy above requirements
– OIL: developed by group of (largely) European researchers (several from EU OntoKnowledge project)
– DAML-ONT: developed by group of (largely) US researchers (in DARPA DAML programme)
• Efforts merged to produce DAML+OIL– Extends (“Description logic subset” of) RDF
• DAML+OIL submitted to W3C as basis for standardisation– WebOnt group developed OWL language based on
DAML+OIL– OWL language now a W3C Recommendation (i.e., a
standard like HTML and XML)
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
OIL
• OIL adds a simple Description Logic to RDF Schema
• OIL is expressive enough to– Specify axioms that logically describe
classes, properties and their hierarchies– Specify the necessary and sufficient
conditions that define class membership of instances
www.ontoknowledge.org
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
OIL
OIL
Description Logic:Formal Semantics &
Reasoning support
Description Logic:Formal Semantics &
Reasoning support
Web languages:XML- and RDF-based
syntax
Web languages:XML- and RDF-based
syntax
Frame-based systems:Modeling PrimitivesFrame-based systems:Modeling Primitives
18
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
OWL Language• Three species of OWL
– OWL full is union of OWL syntax and RDF– OWL DL restricted to FOL fragment (¼ DAML+OIL)– OWL Lite is “easier to implement” subset of OWL DL – DL semantics officially definitive
• OWL DL based on Description Logic• OWL DL Benefits from many years of DL research
– Well defined semantics– Formal properties well understood (complexity,
decidability)– Known reasoning algorithms– Implemented systems (highly optimised)
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Semantic Web - Language tower
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Static
Dynamic
URI, HTML, HTTP RDF, RDF(S), OWLWWW Semantic Web
UDDI, WSDL, SOAPWeb Services
Web Services
19
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Web Services
Web services • Are self-contained, self-describing, modular
applications that can be published, located, and invoked across the Web.
• Perform functions, which can be anything from simple requests to complicated business processes. …
• once deployed, can be discovered and invoked by other services
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Web Services
• Web Services connect computers and devices with each other using the Internet to exchange data and combine data in new ways.
• The key to Web Services is on-the-fly software creation through composition of loosely coupled, reusable software components.
• Software composition can be reduced to theorem proving –finding a proof that there exists a composition that meets the specifications
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Web Services
• UDDI provides a mechanism for clients to find web services.
• WSDL defines services as collections of network endpoints or ports. A port is defined by associating a network address with a binding; a collection of ports define a service.
20
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Realizing the full potential of web services
Static
Dynamic UDDI, WSDL, SOAPWeb Services
URI, HTML, HTTP RDF, RDF(S), OWLWWW Semantic Web
Intelligent WebServices
Semantic Web Service
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Semantic Web Services
• Semantic Web Services combine Semantic Web and Web Service Technology
• Automating Web Service Discovery, Composition, and Invocation needed to the technology scalable
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Summary
• The semantic web
– is based on machine-interpretable semantics of data
– Ontologies form the backbone of the semantic web
– Needs knowledge representation languages RDF, and OWL, and tools that make use of these languages
21
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
An Introduction to Description Logics
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
What Are Description Logics?• A family of logic based Knowledge Representation
formalisms– Descendants of semantic networks and KL-ONE– Describe domain in terms of concepts (classes), roles
(relationships) and individuals• Distinguished by:
– Formal semantics (typically model theoretic)• Decidable fragments of FOL
– Provision of inference services• Sound and complete decision procedures for key
problems• Implemented systems (highly optimized)
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
DL knowledge base
• Atomic concepts (unary predicates)• Atomic roles (binary predicates)• Complex concepts built using constructors
22
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
A “Family” Knowledge Base
• Man is a Male Person• A Woman is a Female Person• A Man is not a Woman• A Father is a Man who has a Child• A Mother is a Woman who has a Child• Both Father and Mother are Parents• Grandmother is a Mother of a Parent• A Mother Without Daughter is a Mother without female Children
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
DL for Family KB
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Value restrictions
• All individuals in relationship that have children are persons
• Individuals with a female child
• Individuals with at most 3 children and two dogs
PersonhasChild.∀
FemalehasChild.∃
( ) ( )hasDoghasChild 23 ≤Π≥
23
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
DL Basics
• Concepts (unary predicates/formulae with one free variable)– E.g., Person, Father, Mother
• Roles (binary predicates/formulae with two free variables)– E.g., hasChild, hasHudband
• Individual names (constants)– E.g., Alice, Bob, Cindy
• Subsumption (relations between concepts)– E.g. Female ⊆ Person
• Operators (for forming concepts and roles) – And(Π) , Or(U), Not (¬)– Universal quantifier (∀), Existential quantifier(∃)– Number restiction : ≤, ≥, =
Inverse role (-), transitive role (+), Role hierarchy
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
More for “Family” Ontology
• (Inverse Role) hasParent = hasChild-
– hasParent(Bob,Alice) -> hasChild(Alice, Bob)• (Transitive Role)hasBrother
– hasBrother(Bob,David), hasBrother(David, Mack) -> hasBrother(Bob,Mack)
• (Role Hierarchy) hasMother ⊆ hasParent– hasMother(Bob,Alice) -> hasParent(Bob, Alice)
• HappyFather ⊆ Father Π ≥1 hasChild.Woman Π ≥1 hasChild.Man
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
DL Architecture
Knowledge Base
Tbox (schema)
Abox (data)
Man ≡ Human u Male
Happy-Father ≡ Man u ∃ has-child Female u …
John : Happy-Father
hJohn, Maryi : has-child Infe
ren
ce S
yst
em
Inte
rface
24
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
DL Representives
ALC: the smallest DL that is propositionally closed
Constructors include booleans (and, or, not), Restrictions on role successors
SHOIQ = OWL DLS=ALCR+: ALC with transitive roleH = role hierarchyO = nomial .e.g WeekEnd = {Saturday, Sunday}I = Inverse roleQ = qulified number restriction e.g. >=1 hasChild.Man
N = number restriction e.g. >=1 hasChild
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Interpretations
• DL Ontology: is a set of terms and their relations• Interpretation of a DL Ontology: A possible world ("model") that
materalizes the ontology
People
Student
Jie Bao
present
Description Logic
DL reasoning
Knowledge Representation
Topic
Ontology:
Student ⊆ PeopleStudent ⊆ ∃Present.TopicKR ⊆ TopicDL ⊆ KR
Interpretation
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
DL Semantics
• DL semantics defined by interpretations: I = (ΔI, .I), where– ΔI is the domain (a non-empty set) – .I is an interpretation function that maps:
• Concept (class) name A -> subset AI of ΔI
• Role (property) name R -> binary relation RI over ΔI
• Individual name i -> iI element of ΔI
• Interpretation function .I tells us how to interpret atomic concepts, properties and individuals. – The semantics of concept forming operators is given by extending
the interpretation function in an obvious way.
25
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
DL Semantics: example
• I = (ΔI, .I)
• ΔI = {Jie_Bao, DL_Reasoning}• PeopleI=StudentI={Jie_Bao}• TopicI=KRI=DLI={DL_Reasoning}• PresentI={(Jie_Bao, DL_Reasoning)}
An interpretation that satisifies all axioms in an DLontology is also called a model of the ontology.
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Source: Description Logics Tutorial, Ian Horrocks and Ulrike Sattler, ECAI-2002,
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Source: Description Logics Tutorial, Ian Horrocks and Ulrike Sattler, ECAI-2002,
26
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Short History of Description LogicsPhase 1:
– Incomplete systems (Back, Classic, Loom, . . . )– Based on structural algorithms
Phase 2:– Development of tableau algorithms and complexity results– Tableau-based systems for Pspace logics– Investigation of optimisation techniques
Phase 3:– Tableau algorithms for very expressive DLs– Highly optimised tableau systems for ExpTime logics (e.g., FaCT,
DLP, Racer)– Relationship to modal logic and decidable fragments of FOL
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Latest Developments
Phase 4:– Mature implementations– Mainstream applications and Tools
• Databases– Consistency of conceptual schemata (EER, UML etc.)– Schema integration– Query subsumption (w.r.t. a conceptual schema)
• Ontologies and Semantic Web (and Grid)– Ontology engineering (design, maintenance, integration)– Reasoning with ontology-based markup (meta-data)– Service description and discovery
– Commercial implementations• Cerebra system from Network Inference Ltd
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Description Logic Family• DLs are a family of logic based KR formalisms• Particular languages mainly characterised by:
– Set of constructors for building complex concepts and roles from simpler ones
– Set of axioms for asserting facts about concepts, roles and individuals
• ALC is the smallest DL that is propositionally closed– Constructors include booleans (and, or, not), and– Restrictions on role successors– E.g., concept describing “happy fathers” could be written
as:Man ∧ ∃hasChild.Female ∧ ∃hasChild.Male∧ ∀hasChild.(Rich ∨Happy)
27
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
DL Concept and Role Constructors
• Range of other constructors found in DLs, including:– Number restrictions (cardinality constraints) on roles,
e.g., ≥3 hasChild, ≤1 hasMother– Qualified number restrictions, e.g., ,
≤ 1hasChild.Female, , ≤ hasParent.Male– Nominals (singleton concepts), e.g., {Italy}– Concrete domains (datatypes), – Inverse roles, e.g., hasChild- (hasParent)– Transitive roles, e.g., hasChild* (descendant)– Role composition, e.g., hasParent o hasBrother (uncle)
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
DL Knowledge Base
• DL Knowledge Base (KB) normally separated into 2 parts:– TBox is a set of axioms describing structure of domain
(i.e., a conceptual schema), e.g.:• HappyFather ⊆ Man ∧∃hasChild.Female ∧…• Elephant Animal ∧ Large ∧ Grey• transitive(ancestor)
– ABox is a set of axioms describing a concrete situation (data), e.g.:
• John:HappyFather• <John,Mary>:hasChild
• Separation has no logical significance– But may be conceptually and implementationally
convenient
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
OWL as DL: Class Constructors
• XMLS datatypes as well as classes in ∀P.C and ∃P.C– E.g., ∃hasAge.nonNegativeInteger
• Arbitrarily complex nesting of constructors– E.g., Person u ∀hasChild.(Doctor t ∃hasChild.Doctor)
28
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
RDFS Syntax
<owl:Class><owl:intersectionOf rdf:parseType=" collection"><owl:Class rdf:about="#Person"/><owl:Restriction>
<owl:onProperty rdf:resource="#hasChild"/><owl:toClass><owl:unionOf rdf:parseType=" collection">
<owl:Class rdf:about="#Doctor"/><owl:Restriction><owl:onProperty rdf:resource="#hasChild"/><owl:hasClass rdf:resource="#Doctor"/>
</owl:Restriction></owl:unionOf>
</owl:toClass></owl:Restriction>
</owl:intersectionOf></owl:Class>
E.g., Person u ∀hasChild.(Doctor t ∃hasChild.Doctor):
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
OWL as DL: Axioms
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
XML Schema Datatypes in OWL
• OWL supports XML Schema primitive datatypes– E.g., integer, real, string, …
• Strict separation between “object” classes and datatypes
29
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Why Separate Classes and Datatypes?
• Philosophical reasons:– Datatypes structured by built-in predicates– Not appropriate to form new datatypes using ontology
language• Practical reasons:
– Ontology language remains simple and compact– Semantic integrity of ontology language not compromised– Implementability not compromised — can use hybrid
reasoner
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
OWL DL Semantics• Mapping OWL to equivalent DL (SHOIN(Dn)):
– Facilitates provision of reasoning services (using DL systems)
– Provides well defined semantics• DL semantics defined by interpretations: I = (ΔI, .I), where
– ΔI is the domain (a non-empty set) – .I is an interpretation function that maps:
• Concept (class) name A → subset AI of ΔI
• Role (property) name R → binary relation RI over ΔI
• Individual name i → iI element of ΔI
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
DL Semantics
• Interpretation function ¢I extends to concept expressions in the obvious way, i.e.:
30
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Interpretation ExampleΔ = {v, w, x, y, z}AI = {v, w, x}BI = {x, y}RI = {(v, w), (v, x), (y, x), (x, z)}
• ¬ B =• A u B =• ¬ A t B =• ∃ R B =• ∀ R B =• ∃ R (∃ R A) = • ∃ R ¬ (A t B) =• 6 1 R A =• > 1 R A =
AI
v
x
yz
w
BI
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
DL Knowledge Bases (Ontologies)• An OWL ontology maps to a DL Knowledge Base K = hT , Ai
– T (Tbox) is a set of axioms of the form:• C v D (concept inclusion)• C ≡ D (concept equivalence)• R v S (role inclusion)• R ≡ S (role equivalence)• R+ v R (role transitivity)
– A (Abox) is a set of axioms of the form • x ∈ D (concept instantiation)• hx,yi ∈ R (role instantiation)
• Two sorts of Tbox axioms often distinguished– “Definitions”
• C v D or C ≡ D where C is a concept name– General Concept Inclusion axioms (GCIs)
• C v D where C in an arbitrary concept
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Multiple Models -v- Single Model• DL KB doesn’t define a single model, it is a set of constraints
that define a set of possible models– No constraints (empty KB) means any model is possible– More constraints means fewer models– Too many constraints may mean no possible model
(inconsistent KB)• 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
31
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Reasoning Tasks
• Knowledge is correct (captures intuitions)– C subsumes D w.r.t. K iff for every model I of K, CI µ DI
• Knowledge is minimally redundant (no unintended synonyms)– C is equivallent to D w.r.t. K iff for every model I of K, CI = DI
• Knowledge is meaningful (classes can have instances)– C is satisfiable w.r.t. K iff there exists some model I of K s.t. CI ≠
∅∅• Querying knowledge
– x is an instance of C w.r.t. K iff for every model I of K, xI ∈ CI
– hx,yi is an instance of R w.r.t. K iff for, every model I of K, (xI,yI) ∈RI
• Knowledge base consistency– A KB K is consistent iff there exists some model I of K
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Reasoning Tasks
• Knowledge is correct (captures intuitions)• Knowledge is minimally redundant (no unintended
synonyms)• Knowledge is meaningful (classes can have instances)
– C is satisfiable w.r.t. K iff there exists some model I of Ks.t. CI ≠ ∅∅
• Querying knowledge– x is an instance of C w.r.t. K iff for every model I of K, xI
∈ CI
– hx,yi is an instance of R w.r.t. K iff for, every model I of K, (xI,yI) ∈ RI
• Knowledge base consistency– A KB K is consistent iff there exists some model I of K
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Reasoning Tasks(2)
• Many inference tasks can be reduced to subsumption reasoning
• Subsumption can be reduced to satisfiability
32
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Tableau Algorithm
• Tableau Algorithm is the de facto standard reasoning algorithm used in DL
• Basic intuitions– Reduces a reasoning problem to concept
satisfiability problem– Finds an interpretation that satisfies concepts in
question.– The interpretation is incrementally constructed as
a "Tableau"
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Short Example
• given: Wife⊆ Woman, Woman⊆ Personquestion: if Wife⊆ Person
• Reasoning process– Test if there is a individual that is a Woman but not a
Person, i.e. test the satisfiability of concept C0=(WifeЬPerson)
– C0(x) -> Wife(x), (¬Person)(x)– Wife(x)->Woman(x)– Woman(x) ->Person(x)– Conflict!– C0 is unsatisfiable, therefore Wife⊆ Person is true with
the given ontology.
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
General Process
• Transform C into negation normal form(NNF), i.e. negation occurs only in front of concept names.
• Denote the transformed expression as C0, the algorithm starts with an ABox A0 = {C0(x0)}, and apply consistency-preserving transformation rules (tableaux expansion) to the ABox as far as possible.
• If one possible ABox is found, C0 is satisfiable.• If not ABox is found under all search pathes, C0 is
unsatisfiable.
33
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
NNF
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Tableaux Expansion(Selected)
Clash
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Termination Rules
• An ABox is called complete if none of the expansion rules applies to it.
• An ABox is called consistent if no logic clash is found. • If any complete and consistent ABox is found, the initial
ABox A0 is satisfiable• The expansion terminates, either when finds a complete
and consistent ABox, or try all search pathes ending with complete but inconsistent ABoxes.
34
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Internalisation
• Embed the TBox in the initial ABox concept• C⊆D is equivalent T⊆ ¬C U D (T is the "top" concept. It
imeans ¬C U D is the super concept for ANY concepts)• E.g.
– Given ontology: Mother ⊆ Woman Π Parent, Woman ⊆Person
– Query: Mother ⊆ Person– The intitial ABox is : ¬Mother U(Woman Π Parent) Π
(¬Woman U Person) Π (Mother Π ¬Person)
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
A Expansion Example
Search
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Tree Model
• Another explanation of tableaux algorithm is that it works on a finite completion tree whose – individuals in the tableau correspond to nodes – and whose interpretation of roles is taken from the edge
labels.
35
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Requirments for Tab. Alg.
• Similar tableaux expansions can be designed for more expressive DL languages.
• A tableau algorithm has to meet three requirements– Soundness: if a complete and clash-free ABox is
found by the algorithm, the ABox must satisfies the initial concept C0.
– Completeness: if the initial concept C0 is satisfiable, the algorithm can always find an complete and clash-free ABox
– Termination: the algorithm can terminate in finite steps with specific result.
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
Advanced Tableau Alg.
• Rich literatures in the past decade.• Advanced techniques
– Blocking (Subset Blocking,Pair Locking, Dynamic Blocking)
– For more expressive languages: number restriction, transitive role, inverse role, nomial, data type
– Detailed analysis of complexities.• Refer to references at the end of this presentation for
details
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research LaboratorySHIQ Expansion Rules
36
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory
References
• F. Baader, W. Nutt. Basic Description Logics. In the Description Logic Handbook, edited by F. Baader, D. Calvanese, D.L. McGuinness, D.Nardi, P.F. Patel-Schneider, Cambridge University Press, 2002, pages 47-100.
• Ian Horrocks and Ulrike Sattler. Description Logics Tutorial, ECAI-2002, Lyon, France, July 23rd, 2002.
• Ian Horrocks and Ulrike Sattler. A tableaux decision procedure for SHOIQ. In Proc. of the 19th Int. Joint Conf. on Artificial Intelligence (IJCAI 2005), 2005.
• I. Horrocks and U. Sattler. A description logic with transitive and inverse roles and role hierarchies. Journal of Logic and Computation, 9(3):385-410, 1999.
Vasant Honavar, 2006.
Iowa State University Department of Computer ScienceArtificial Intelligence Research Laboratory