Knowledge Representation Knowledge Representation and Reasoning using and Reasoning using
Description LogicDescription Logic
PresenterPresenterShamima MithunShamima Mithun
OverviewOverview Introduction to Description Logics (DL)Introduction to Description Logics (DL) DL Syntax and SemanticDL Syntax and Semantic DL Systems ArchitectureDL Systems Architecture Reasoning TechniquesReasoning Techniques KB Construction and Access using PowerLoomKB Construction and Access using PowerLoom
IntroductionIntroduction Description Logics are a family of logic based knowledge Description Logics are a family of logic based knowledge
representation formalisms based on representation formalisms based on conceptsconcepts and and rolesroles:: ConceptsConcepts (classes) are interpreted as sets of (classes) are interpreted as sets of
objects objects e.g. person.e.g. person. Roles Roles are interpreted as binary relations on are interpreted as binary relations on
objects objects e.g. has-child.e.g. has-child. Key featuresKey features of DLs are of DLs are
a well defined semantics a well defined semantics Inference servicesInference services
BackgroundBackgroundDescription Logics:Description Logics: Introduced to resolve the ambiguities of Introduced to resolve the ambiguities of Semantic Semantic
NetworksNetworks Descendants of Semantic Networks, Descendants of Semantic Networks, frame based frame based
systemssystems and and KL-ONEKL-ONE Decidable fragment of FOLDecidable fragment of FOL [2] [2] Useful for Semantic Web Language (DAML +OIL) [4]Useful for Semantic Web Language (DAML +OIL) [4]
DL Applications & SystemsDL Applications & SystemsApplication AreasApplication Areas Terminological KR and OntologiesTerminological KR and Ontologies Semantic WebSemantic Web Software Information SystemsSoftware Information Systems Database ApplicationsDatabase Applications
SystemsSystems LOOM/PowerLoom, RACER, CLASSIC, and othersLOOM/PowerLoom, RACER, CLASSIC, and others
DL ConstructorsDL Constructors
DLs are characterized by a DLs are characterized by a set of constructorsset of constructors. . These are used to construct complex concepts These are used to construct complex concepts and roles from simple ones.and roles from simple ones.
Common constructors:Common constructors:
ConjunctionConjunction ((ПП), ), disjunction disjunction ((),), negationnegation (())
Restricted forms of quantification (Restricted forms of quantification (, , ) ) Example in ALC: the concept Happy-FatherExample in ALC: the concept Happy-Father
Happy-FatherHappy-Father ManMan ПП has- child. Malehas- child. Male
DL Syntax and SemanticDL Syntax and Semantic
Figure is taken from Ian Horrocks [2]Ian Horrocks [2]
Other DL ConstructorsOther DL Constructors
DL and Other Logical DL and Other Logical Formalism: FOPLFormalism: FOPL
Syntactic feature of DL: Syntactic feature of DL: variable free notationvariable free notation. . Most DLs are fragments of FOL, e.g. ACL.Most DLs are fragments of FOL, e.g. ACL. ACL expressions can be translated into FOL: ACL expressions can be translated into FOL:
A unary predicate A unary predicate ΦΦA A is introducedis introduced for each concept C, for each concept C, and a binary relation and a binary relation ρρRR for each role R. for each role R.
Translation ACL →FOL:Translation ACL →FOL:
artist artist ПП (( CREATES. song ) → CREATES. song ) →
xx y: artist ( x ) y: artist ( x ) ΛΛ (CREATES ( x, y ) (CREATES ( x, y ) ΛΛ song ( y )) song ( y ))
Why not use FOL?Why not use FOL?The expressive power is too high for having good The expressive power is too high for having good computational properties and efficient inference computational properties and efficient inference procedures.procedures.
DL and Other Logical Formalism:DL and Other Logical Formalism: Modal LogicsModal Logics
DLs are notational DLs are notational variants of Modal Logicsvariants of Modal Logics ALC ALC multi-modal K: multi-modal K:
C C ПП D D C C ΛΛ D, D, C C D D C C νν D D C C C, C, R.C R.C <R>C, <R>C, R.C R.C [R]C [R]C
transitive roles transitive roles transitive frames (e.g., K4) transitive frames (e.g., K4) inverse roles inverse roles converse programs (e.g., C-PDL) converse programs (e.g., C-PDL) number restrictions number restrictions deterministic programs (e.g., D-PDL) deterministic programs (e.g., D-PDL)
No TBoxesNo TBoxes available in modal logics: available in modal logics:internalise" axioms using a universal role u: C internalise" axioms using a universal role u: C D D [u] (C [u] (CD)D)
No ABoxesNo ABoxes available in modal logics: Use nominals available in modal logics: Use nominals
DL Systems ArchitectureDL Systems Architecture
Knowledge BaseKnowledge Base
TBox (schema)TBox (schema)
Man ≡ Human ПП Male
Happy-Father ≡ Man П П has-child. Female
ABox (data)ABox (data)
John : Happy-Father
John, Mary> : has-child
Infe
ren
ce S
yste
m
Inte
rface
Inte
rface
Figure after Horrocks [3] Figure after Horrocks [3]
DL TBoxDL TBox
DL ABoxDL ABox
Knowledge to ReasoningKnowledge to Reasoning
Knowledge BaseKnowledge Base
TBoxTBox
ABoxABox
ReasoningReasoning
Reasoning about theReasoning about the
knowledgeknowledge Add new knowledge to Add new knowledge to
the KB that follows the KB that follows logically. logically.
Ask KB if a statement is Ask KB if a statement is valid.valid.
Figure is taken from Ian Horrocks [3]Ian Horrocks [3]
Reasoning / InferenceReasoning / InferenceBasic Inference Problems, Basic Inference Problems, for TBox T:
Consistency:Consistency:
““A concept C is consistent with respect to T, if there exists A concept C is consistent with respect to T, if there exists a model a model II of T with C of T with CII . [. [II is a model of C]”. is a model of C]”.
Inconsistent:Inconsistent:
songwriter songwriter artist artist ПП ((CREATES. song )CREATES. song )
song song IS _ CREATED _ BY. songwriter IS _ CREATED _ BY. songwriter
Subsumption:Subsumption:
““A concept C is subsumed by a concept D with respect to A concept C is subsumed by a concept D with respect to T if CT if CII D DII for every model for every model II of T”.of T”.
male male personperson
Definitions taken from [6], p. 66.Definitions taken from [6], p. 66.
ClassificationClassification““ClassificationClassification is the task ofis the task ofinserting new concepts or inserting new concepts or instances in a taxonomy” [ 3].instances in a taxonomy” [ 3].
Classification of conceptsClassification of concepts allows to structure the allows to structure the
terminology in the form of a terminology in the form of a subsumption hierarchysubsumption hierarchy
Classification of instances Classification of instances determines whether an determines whether an
individual is an instance of a individual is an instance of a certain concept.certain concept.
Fixed-Furniture
Movable-Furniture
Furniture
Door Window Chair Sofa
Is-a
Reasoning AlgorithmsReasoning Algorithms Structural subsumption algorithms
Subsumption of concepts can be computed.Subsumption of concepts can be computed. They are complete for simple languages with little They are complete for simple languages with little
expressivity.expressivity. Used by KL-ONE, LOOM and other systems.Used by KL-ONE, LOOM and other systems.
Tableau–based algorithms Turned out to be very efficient reasoning algorithms.Turned out to be very efficient reasoning algorithms. Sound, complete and decidable.Sound, complete and decidable. Used e.g. in RACER.Used e.g. in RACER.
Structural Subsumption Structural Subsumption AlgorithmAlgorithm
Proceed in two phasesProceed in two phases
1)1) The descriptions to be tested for subsumption are The descriptions to be tested for subsumption are normalized.normalized.
2)2) Then the syntactic structure of the normal forms is Then the syntactic structure of the normal forms is compared with each other.compared with each other.
An FLAn FLoo- concept description is in - concept description is in normal formnormal form iff iff it is of the form it is of the form
AA11 ПП… … ППAAmm ПП RR11.C.C11 ПП… … П П RRnn.C.Cnn
Where Where AA11,.., ,.., AAmm are distinct concept names, are distinct concept names, RR11,..., R,..., Rn n are are
distinct roles names, and Cdistinct roles names, and C11,…,…, , CCn n are concept are concept
descriptions in normal from.descriptions in normal from.
Structural Subsumption Structural Subsumption
AlgorithmAlgorithm (contd.)(contd.)
Given is the normal form of the concept description CGiven is the normal form of the concept description C
AA11 ПП… … ППAAmm ПП RR11.C.C11 ПП… … П П RRnn. C. Cnn
and the normal form of the concept description Dand the normal form of the concept description D
BB11 ПП… … ППBBkk ПП SS11.D.D11 ПП… … П П SSll. D. Dll
D subsumes C: C D iff
i, 1≤ i ≤k, j, 1 ≤j ≤m: Bi = Aj
i, 1≤ i ≤l, j, 1 ≤j ≤n: Si = Rj and Cj Di
Tableau-based AlgorithmsTableau-based Algorithms Construct a Construct a modelmodel for the input concept description for the input concept description
CC0.0.
Model is represented by Model is represented by tree formtree form.. The formula has been translated into The formula has been translated into Negation Negation
Normal FormNormal Form (NNM). (NNM). To decide satisfiability of the concept CTo decide satisfiability of the concept C0 0 , start with , start with
the initial tree (root node).the initial tree (root node). Repeatedly apply expansion rules until find Repeatedly apply expansion rules until find
contradiction or expansion completed.contradiction or expansion completed. Satisfiable Satisfiable iff iff a complete and contradiction-free tree a complete and contradiction-free tree
is found.is found.
Tableau-based Algorithms - Tableau-based Algorithms - ExampleExample
Determine the satisfiability of the concept-definition:Determine the satisfiability of the concept-definition:
( (( ( CHILD. Male ) CHILD. Male ) ПП ( ( CHILD. CHILD. Male ) ) Male ) )
( (( ( CHILD. Male ) CHILD. Male ) ПП ( ( CHILD. CHILD. Male ) ) <x> Male ) ) <x>(( CHILD. Male ) <x> CHILD. Male ) <x> ПП -rule -rule(( CHILD. CHILD. Male ) <x> Male ) <x> ПП –rule –ruleCHILD <x, y > CHILD <x, y > -rule -rule Male < y> Male < y> -rule -ruleMale <y > Male <y > -rule -rule<CLASH ><CLASH >
ReasoningReasoning (contd.)(contd.)
Reasoning services like subsumption and consistencyReasoning services like subsumption and consistency Speed-upSpeed-up the inference procedures for query. the inference procedures for query. Help to infer implicitly represented knowledge from the Help to infer implicitly represented knowledge from the
explicitly contained knowledge of KB.explicitly contained knowledge of KB.
T-BoxT-Box A-BoxA-Box
Female Female Male Male Human Human Mary: MotherMary: MotherMother Mother Female Female John: FatherJohn: FatherFather Father Male Male Mary: Mary: parent.Childparent.ChildChild Child has.Mother has.Mother ПП has.Father has.Father John: John: parent.Childparent.Child
Able to deduce implicit knowledge, like Mary is a Human.Able to deduce implicit knowledge, like Mary is a Human.
Reasoning: Decidability vs. Reasoning: Decidability vs. ExpressivityExpressivity
KR system should KR system should answer queries in a reasonable time.answer queries in a reasonable time. The reasoning procedures should terminate.The reasoning procedures should terminate.
Trade-off between the Trade-off between the expressivity of DLsexpressivity of DLs and the and the complexity of their reasoningcomplexity of their reasoning.. Very expressive DLs can have inference problems of Very expressive DLs can have inference problems of
high complexity, they may even be undecidable.high complexity, they may even be undecidable. Very Weak DLs my not be sufficiently expressive to Very Weak DLs my not be sufficiently expressive to
represent the important concepts of an application. represent the important concepts of an application. Quest for a highly expressive DL with decidable/ Quest for a highly expressive DL with decidable/
practical inference problems.practical inference problems.
ConclusionConclusion DL are logic based knowledge representation formalisms.DL are logic based knowledge representation formalisms. DL systems provide efficient inference services like DL systems provide efficient inference services like
consistency, subsumption.consistency, subsumption. DLs are effective in a range of applications.DLs are effective in a range of applications.
PowerLoomPowerLoom
PowerLoom CommandsPowerLoom Commands Defines concept, relation, function and rules using Defines concept, relation, function and rules using
defconcept, defrelation, deffunction, defrule.defconcept, defrelation, deffunction, defrule. Add/Remove facts from KB withAdd/Remove facts from KB with
assert and retractassert and retract Query KBQuery KB
ask, retrieveask, retrieve
NoteNote: Relations have to defined, before they are used in : Relations have to defined, before they are used in assertions or queries.assertions or queries.
Model DomainModel Domain
Color
Fixed-Furniture
Movable-Furniture
Furniture
Age
Size
BigSmall
GreenRed NewOld
IS-A
Door Window Chair Sofa
Define ConceptDefine Concept|=(defconcept furniture) |=(defconcept furniture) |c| FURNITURE|c| FURNITURE
|= (defconcept movable-furniture (?f furniture))|= (defconcept movable-furniture (?f furniture))|c| MOVABLE-FURNITURE|c| MOVABLE-FURNITURE
|= (defconcept fixed-furniture (?f furniture))|= (defconcept fixed-furniture (?f furniture))|c| FIXED-FURNITURE|c| FIXED-FURNITURE
|=(defconcept chair (?f movable-furniture)) |=(defconcept chair (?f movable-furniture)) |c| CHAIR|c| CHAIR
|= (defconcept sofa (?f movable-furniture)) |= (defconcept sofa (?f movable-furniture)) |c| SOFA|c| SOFA
Define ConceptDefine Concept (contd.)(contd.)
|= (defconcept window (?ff fixed-furniture))|= (defconcept window (?ff fixed-furniture))|c| WINDOW|c| WINDOW
|= (defconcept door (?ff fixed-furniture))|= (defconcept door (?ff fixed-furniture))|c| DOOR|c| DOOR
|= (defconcept age (?a) :<=> (member-of ?a (setof new old))) |= (defconcept age (?a) :<=> (member-of ?a (setof new old))) |c| AGE|c| AGE
|= (defconcept color (?c) :<=> (member-of ?c (setof green red |= (defconcept color (?c) :<=> (member-of ?c (setof green red blue)))blue)))
|c| COLOR|c| COLOR
|= (defconcept size (?s) :<=> (member-of ?s (setof small big)))|= (defconcept size (?s) :<=> (member-of ?s (setof small big)))|c| SIZE|c| SIZE
Model DomainModel Domain
Color
Fixed-Furniture
Movable-Furniture
Furniture
Age
Size
BigSmall
GreenRed NewOld
IS-A
Door Window Chair Sofa
has-colorhas-age
has-size
Define Relation and Define Relation and FunctionFunction
|= (defrelation has-age ((?f furniture) (?a age))) |= (defrelation has-age ((?f furniture) (?a age))) |r| HAS-AGE|r| HAS-AGE
|= (defrelation has-color ((?f furniture) (?c color))) )|= (defrelation has-color ((?f furniture) (?c color))) )|r| HAS-COLOR|r| HAS-COLOR
|= (defrelation has-size ((?f furniture) (?s size)))|= (defrelation has-size ((?f furniture) (?s size)))|r| HAS-SIZE|r| HAS-SIZE
|= (deffunction has-price ((?f furniture)):-> (?n INTEGER))|= (deffunction has-price ((?f furniture)):-> (?n INTEGER))|r| HAS-PRICE|r| HAS-PRICE
Model DomainModel Domain
Color
Fixed-Furniture
Movable-Furniture
Furniture
Age
Size
has-size
has-age
has-color
BigSmall
GreenRed NewOld
IS-A
Door Window Chair Sofa
Value AssertionValue Assertion|= (assert (has-size chair big))|= (assert (has-size chair big))|P|(HAS_SIZE CHAIR BIG) |P|(HAS_SIZE CHAIR BIG)
|= (assert (has-color sofa red))|= (assert (has-color sofa red))|P|(HAS_COLOR SOFA RED) |P|(HAS_COLOR SOFA RED)
|= (assert (has-age chair new))|= (assert (has-age chair new))|P|(HAS_AGE CHAIR NEW) |P|(HAS_AGE CHAIR NEW)
|= (assert (has-age door old))|= (assert (has-age door old))|P|(HAS_AGE DOOR OLD) |P|(HAS_AGE DOOR OLD)
|= (assert (forall (?x ?y) (=> (has-color ?x ?y) (and (furniture ?x) |= (assert (forall (?x ?y) (=> (has-color ?x ?y) (and (furniture ?x) (color ?y)))))(color ?y)))))
Query the KB: Retrieve, Query the KB: Retrieve, Retract, and AskRetract, and Ask
|=(retrieve (has-color sofa ?x))|=(retrieve (has-color sofa ?x))There is 1 solution so far:There is 1 solution so far: #1: ?X=RED#1: ?X=RED
|= (retract (has-color sofa red)) |= (retract (has-color sofa red)) |P?|(HAS-COLOR SOFA RED) |P?|(HAS-COLOR SOFA RED)
|= (retrieve (has-color sofa ?x))|= (retrieve (has-color sofa ?x)) No solutions. No solutions.
|= (ask (has-size chair big))|= (ask (has-size chair big))TRUETRUE
|= (ask (has-color door red))|= (ask (has-color door red))UNKNOWNUNKNOWN
ReferencesReferences1.1. PowerLoom HomepagePowerLoom Homepage
http://www.isi.edu/isd/LOOM/PowerLoom/http://www.isi.edu/isd/LOOM/PowerLoom/2. 2. Ian Horrocks and Ulrike Sattler: Ian Horrocks and Ulrike Sattler: Description Logics - Basics, Description Logics - Basics,
Applications, and More. Applications, and More. Aavilable atAavilable at http://www.cs.man.ac.ukhttp://www.cs.man.ac.uk3.3. Ian Horrocks: Ian Horrocks: Reasoning with Expressive Description Logics: Reasoning with Expressive Description Logics:
Theory and Practice. Available at: Theory and Practice. Available at: http://www.cs.man.ac.uk/~horrocks/Slideshttp://www.cs.man.ac.uk/~horrocks/Slides
4.4. Christel Kemke. Lecture Notes on Artificial Intelligence. Christel Kemke. Lecture Notes on Artificial Intelligence. Available at http://www.cs.umanitoba.ca/~ckemke/74.419-AI/Available at http://www.cs.umanitoba.ca/~ckemke/74.419-AI/
5.5. Daniele Nardi and Ronald J. Brachman. An introduction to Daniele Nardi and Ronald J. Brachman. An introduction to Description Logics. In Baader, Calvanese, McGuinnes Nardi Description Logics. In Baader, Calvanese, McGuinnes Nardi and Patel-Schneider, (eds). The Description Logics Handbook, and Patel-Schneider, (eds). The Description Logics Handbook, chapter 1. Cambridge University Press, 2003.chapter 1. Cambridge University Press, 2003.
6.6. Franz Baader and Werner Nutt. Franz Baader and Werner Nutt. Basic Description Logics. In Basic Description Logics. In Baader, Calvanese, McGuinnes Nardi and Patel-Schneider, Baader, Calvanese, McGuinnes Nardi and Patel-Schneider, (eds). The Description Logics Handbook, chapter 2. (eds). The Description Logics Handbook, chapter 2. Cambridge University Press, 2003.Cambridge University Press, 2003.
ThanksThanks
Top Related