Vous êtes sur la page 1sur 58

Defeasible

Logic
Based on slides from Dr. Nadeem
Introduction
 An obvious usage for Ontologies is as a tool for visualising (and therefore
understanding) how systems and processes work and how their
components function together.
 With the advent of the Semantic Web, formal ontologies (those that can be
represented by a set of logical statements about the domain) started to
look like an attractive means for developing a semantically enriched World
Wide Web. The Web Ontology Language (OWL) was developed and the
latest specification OWL 2 became a World Wide Web Consortium (W3C)
recommended standard in 2009 for representing SemanticWeb ontologies.
The OWL family of languages are precise, logic-based formalisms.
 Because of their precise syntax, ontologies expressed using these
languages are machine-readable. Moreover, because of the logical basis
of the language, it becomes possible to build automated reasoning
systems to extract implicit information (knowledge) from these ontologies
which is not explicitly stated. A typical reasoning task in such systems is
logical inference. For example, if we are given the two statements: “all birds
fly" and “tweety is a bird" then a reasoner could infer that “tweety flies".
Introduction
 Description Logics (DLs) are another widely accepted and appropriate
class of knowledge representation languages to represent and reason
about ontologies. Although they are distinct from the OWL family of
languages (also called fragments), from a purely logical perspective they
actually form the basis of most OWL fragments.
 Description Logics as a family of ontology languages provide a good
balance between expressive power (the type of knowledge you can
represent in the language) and computational complexity of reasoning.
Since these languages have a precise syntax and semantics (like OWL),
they allow one to represent an ontology purely as a set of logical
statements about the domain.
 Such a view of an ontology is called a knowledge base (KB). Again it is
possible to build inference engines (DL reasoners) for inferring implicit
information from these KBs.
Introduction

Introduction

Introduction
 The broad approach to reasoning with KBs that contain defeasible
information is known as defeasible reasoning and is a popular way to
introduce nonmonotonic reasoning behaviour into knowledge
representation and reasoning systems.
 It would also be useful to have a robust system in the DL setting that uses
a purely logical approach but is also capable of catering for exceptions as
demonstrated above. Lehmann and Magidor [19] provided such an
approach in the propositional logic context and Britz et al. provided an
extension thereof for DLs.
 The main goal of this paper is to demonstrate a preliminary version of a
Protégé plug-in which demonstrates our algorithms and approach for
defeasible reasoning with OWL ontologies.
 The plug-in is called RaMP. Most of the theoretical notions presented in
this paper are extensions of the techniques adopted by Lehmann and
Magidor [19] who developed their approach for an extension of
propositional logic. We use the semantic foundation by Britz et al. [8] as a
basis for our approach.
PRELIMINARIES
Description Logic and defeasible reasoning
We begin and focus on giving the syntax and semantics of the popular DL
known as ALC. because it has a good trade-off between expressivity and
computational complexity and is therefore appropriate for most application
domains.
 The Description Logic ALC:
• DLs are decidable fragments of first-order logic with interesting properties
and a variety of applications, notably the formalization of ontologies. There
is a whole family of description logics, an example of which is ALC.
PRELIMINARIES
Description Logic and defeasible reasoning

 ALC concept syntax:


 The language of ALC is built upon a finite set of atomic concept names Nl
and a finite set of role names NR such that Nl ∩ NR = Φ. An atomic concept
is denoted by A, possibly with subscripts, and a role name by r, possibly
with subscripts.
 ┬ denotes the top concept and ┴ the bottom concept. Complex concepts
are denoted by C,D,…, possibly with subscripts, and are built using the
constructors ∏ (concept conjunction), Ư(concept disjunction), ¬
(complement), ᴟ (existential restriction) and Ұ (universal restriction)
according to the rule C ::= A | ┬ | ┴ | ¬ C | C ∏ C | C Ư C | ᴟr.C | Ұr.C

 We let L denote the set of all ALC concepts. For example, in a medical
domain if we are interested in viral diseases and bacterial infections we
can use concept names such as Meningitis, BacterialMeningitis,
ViralDisease and FatalInfection.
‫التهاب السحايا‬
PRELIMINARIES
Description Logic and defeasible reasoning
PRELIMINARIES
Description Logic and defeasible reasoning

For example, MeningitisI can denote the set of all instances of the meningitis
infection in the domain. Intuitively, this may represent all the strains of
meningitis that we know of. Similarly, (Meningitis u ViralDisease)I denotes
the set of all objects in our domain which belong to both MeningitisI and
ViralDiseaseI.
Intuitively this may represent all those strains of meningitis that are also viral
diseases. We can give the intuitive meanings for the other ALC concepts in
a similar way.
ALC axiom syntax:
Given C, D ϵ L, C  D is a subsumption statement, and it is read “C is
subsumed by D”.
C ≡ D (called an equivalence statement) is an abbreviation for both C  D
and D  C .
 An ALC TBox T is a finite set of subsumption statements. An example of an
ALC subsumption is BacterialMeningitis  Meningitis.
PRELIMINARIES
Description Logic and defeasible reasoning

 For more details on Description Logics, reader is encouraged to read the


Description Logic handbook [F. Baader, et al].
PRELIMINARIES
2.2 Defeasible Reasoning

PRELIMINARIES
3. DEFEASIBLE REASONING FOR DLS
1. Overview of the defeasible subsumption operator [8] and the issue of what entailment
means in the context of defeasible KBs.
2. Britz et al [8], proposed a defeasible extension of ALC. through a defeasible
subsumption operator ( ). This operator is ‘supraclassical’ ‫ فوق الكالسيكي‬to the classical
subsumption operator () in the sense that any pair of DL concepts that are related via
, are also necessarily related via .
3. Intuitively, the semantics for  states that given a defeasible subsumption axiom C 
D (where C and D may be complex ALC concepts), then this statement means that the
most typical C’s are also D’s (as opposed to all C’s being D’s in the classical case).
4. Only a semantics for defeasible subsumption is explicitly provided by the approach
(although defeasible equivalence follows trivially as well) and the approach is currently
applied to ALC TBoxes but we intend to extend the approach for ALC ABoxes as well.
 We take a more proof theoretic approach in this paper to describe how we can build a
reasoning system which behaves according to the defined semantics by Britz et al.

 The remainder of the section is concerned with our contributions of algorithms (based
on the semantic adaptations that were required to move to DLs) for computing or
performing defeasible reasoning for DLs.
Introduction
 To understand what is Defeasible logic is let us give
an example:
 Instead it seeks to resolve differences. In cases
where there is some support for concluding A but
also support for concluding not A, the logic does not
conclude either of them (thus the name “sceptical”).
If the support for A has priority over the support for
not A then A would be concluded. Sceptical
reasoning is appropriate for the study of regulations.
Users of regulations are mostly interested in getting
correct advice without being confronted with
conflicting views. Drafters of regulations can detect
an anomaly of the regulations from a conflict that
Semantic Web and Logic
 Defeasible logic is a sceptical formalism, meaning
that it does not support contradictory conclusions.
 Instead it seeks to resolve differences. In cases
where there is some support for concluding A but
also support for concluding not A, the logic does not
conclude either of them (thus the name “sceptical”).
If the support for A has priority over the support for
not A then A would be concluded. Sceptical
reasoning is appropriate for the study of regulations.
Users of regulations are mostly interested in getting
correct advice without being confronted with
conflicting views. Drafters of regulations can detect
an anomaly of the regulations from a conflict that
Semantic Web and Logic

 Defeasible Logic (Nute, [24]) has been


shown in [3] to deal with several intuitions
of non-monotonic reasoning It has been
applied to legal reasoning [2,16],
automated negotiation [14,12], contracts
[27], business rules [20], and multi-agent
systems [18,17,15,16].
 For more detailed discussion, the reader to
[24, 10,4].
Semantic Web and Logic

 The key ideas in nonmonotonic reasoning


is to specify
1. how to represent a knowledge base and
2. the inference mechanism.
A defeasible theory contains facts, strict
rules, defeasible rules, defeaters, and an
ordering relation between the rules. We
shall consider only propositional rules.
Rules containing free variables are
interpreted as the set of their variable-free
We need both structure and rules

 Facts are unquestionable statements such as


Lecturer(Sam).
 Strict rules are rules in the classical sense such as
Lecturer(x) → FacultyMember(x)
 If Lecturer(Sam) holds then so does
FacultyMember(Sam).

 Defeasible rules are rules that can be defeated by
contrary evidence. For example:

A common approach

High Expressiveness

Rules
Layer
SWRL

Ontology
Layer
OWL-DL

Conceptualization
of the domain
LP and classical logic overlap

(1)

(2) (4) (5) (6)

(3)
(7)

FOL: (All except (6)), (2)+(3)+(4): DLs


(4): Description Logic Programs (DLP), (3): Classical Negation
(4)+(5): Horn Logic Programs, (4)+(5)+(6): LP
(6): Non-monotonic features (like NAF, etc.) (7): ^head and, ∨body
Description Logics vs. Horn Logic

 Neither of them is a subset of the other


 It is impossible to assert that persons who
study and live in the same city are “home
students” in OWL
– This can be done easily using rules:
studies(X,Y), lives(X,Z), loc(Y,U), loc(Z,U) 
homeStudent(X)
 Rulescannot assert the information that a
person is either a man or a woman
– This information is easily expressed in OWL
using disjoint union
Basic Difficulties
Classical Logic vs. Logic Programming

 Monotonic vs. Non-monotonic Features


– Open-world vs. Closed-world assumption
– Negation-as-failure vs. classical negation
 Non-ground entailment
 Strong negation vs. classical negation
 Equality
 Decidability
What’s Horn clause logic

 Prolog
and most ‘logic’-oriented rule
languages use horn clause logic
– Cf. UCLA mathematician Alfred Horn
 Hornclauses are a subset of FOL where
every sentence is a disjunction of literals
(atoms) where at most one is positive
~P V ~Q V ~R V S
~P V ~Q V ~R
An alternate formulation
 Horn clauses can be re-written using the
implication operator
– ~P V Q = PQ
– ~P V ~Q V R = P ∧ Q  R
– ~P V ~Q = P ∧ Q 
 What we end up with is ~ “pure prolog”
– Single positive atom as the rule conclusion
– Conjunction of positive atoms as the rule
antecedents (conditions)
– No not operator
– Atoms can be predicates (e.g., mother(X,Y))
Where are the quantifiers?

 Quantifiers (forall, exists) are implicit


– Variables in head are universally quantified
– Variables only in body are existentially
quantified
 Example:
– isParent(X) ← hasChild(X,Y)
– forAll X: isParent(X) if Exisits Y: hasChild(X,Y)
We can relax this a bit

 Head can contain a conjunction of atoms


– P ∧Q ← R is equivalent to P←R and Q←R
 Body can have disjunctions
– P←R∨Q is equivalent to P←R and P←Q
 But something are just not allowed:
– No disjunction in head
– No negation operator, i.e. NOT
Facts & rule conclusions are definite

A fact is just a rule with the trivial true


condition
 Consider these true facts:
– P∨Q
– PR
– QR
 What can you conclude?
 Can this be expressed in horn logic?
Facts & rule conclusions are definite

 Consider these true facts:


– not(P)  Q, not(Q) P
– PR
– QR
A horn clause reasoner (e.g., Prolog) will
be unable to prove that either P or Q is
necessarily true or false
 And can not show that R must be true
Open- vs. closed-world assumption

 Logic Programming – CWA


– If KB |= a, then KB = KB a
 Classical Logic – OWA
– It keeps the world open.
– KB:
Man ⊑ Person, Woman ⊑ Person
Bob ∈ Man, Mary ∈ Woman
Query: “find all individuals that are not women”
Non-ground entailment
 The LP-semantics is defined in terms of
minimal Herbrand model, i.e. sets of ground
facts
 Because of this, Horn clause reasoners can
not derive rules, so that can not do general
subsumption reasoning
Decidability

 The largest obstacle!


– Tradeoff between expressiveness and decidability.

 Facing decidability issues from 2 different angles


– In LP: Finiteness of the domain
– In classical logic (and thus in DL ): Combination of
constructs

 Problem:
Combination of “simple” DLs and Horn Logic are
undecidable. (Levy & Rousset, 1998)
Rules + Ontologies

 Still a challenging task!


 A number of different approaches exists: SWRL,
DLP (Grosof), dl-programs (Eiter), DL-safe rules,
Conceptual Logic Programs (CLP), AL-Log,
DL+log
 Two main strategies:
– Tight Semantic Integration (Homogeneous
Approaches)
– Strict Semantic Separation (Hybrid Approaches)
Homogeneous Approach
 Interaction with tight semantic integration.
 Both ontologies and rules are embedding in a
common logical language.
 No distinction between rule predicates and
ontology predicates.
 Rules may be used for defining classes and
properties of the ontology.
 Example: SWRL, DLP

Ontologies Rules

RDFS
Hybrid Approach
 Integration with strict semantic separation between the
two layers.
 Ontology is used as a conceptualization of the domain.
 Rules cannot define classes and properties of the
ontology, but some application-specific relations.
 Communication via a “safe interface”.
 Example: Answer Set Programming (ASP)

Ontologies

RDFS
Rules
?
The Essence of DLP

 Simplestapproach for combining DLs


with Horn logic: their intersection
– the Horn-definable part of OWL, or
equivalently
– the OWL-definable part of Horn logic
Advantages of DLP

 Modeling: Freedom to use either OWL or


rules (and associated tools and
methodologies)
 Implementation: use either description
logic reasoners or deductive rule systems
– extra flexibility, interoperability with a variety of
tools
 Expressivity: existing OWL ontologies
frequently use very few constructs outside
DLP
RDFS and Horn Logic

Statement(a,P,b) P(a,b)
type(a,C) C(a)
C subClassOf D C(X)  D(X)
P subPorpertyOf Q P(X,Y)  Q(X,Y)
domain(P,C) P(X,Y)  C(X)
range(P,C) P(X,Y)  C(Y)
OWL in Horn Logic

C sameClassAs D C(X)  D(X)


D(X)  C(X)

P samePropertyAs Q P(X,Y)  Q(X,Y)


Q(X,Y) 
P(X,Y)
OWL in Horn Logic (2)

transitiveProperty(P) P(X,Y), P(Y,Z)  P(X,Z)

inverseProperty(P,Q) Q(X,Y)  P(Y,X)


P(X,Y)  Q(Y,X)

functionalProperty(P) P(X,Y), P(X,Z)  Y=Z


OWL in Horn Logic (3)

(C1  C2) subClassOf D


C1(X), C2(X)  D(X)

C subClassOf (D1  D2)


C(X)  D1(X)
C(X)  D2(X)
OWL in Horn Logic (4)

(C1 C2) subClassOf D


C1(X)  D(X)
C2(X)  D(X)

C subClassOf (D1  D2)


Translation not possible!
OWL in Horn Logic (5)

C subClassOf AllValuesFrom(P,D)
C(X), P(X,Y)  D(Y)

AllValuesFrom(P,D) subClassOf C
Translation not possible!
OWL in Horn Logic (6)

C subClassOf SomeValuesFrom(P,D)
Translation not possible!

SomeValuesFrom(P,D) subClassOf C
D(X), P(X,Y)  C(Y)
OWL in Horn Logic (7)

 MinCardinality cannot be translated due to


existential quantification
 MaxCardinality 1 may be translated if
equality is allowed
 Complement cannot be translated, in
general
The Essence of SWRL

 Combines OWL DL (and thus OWL


Lite) with function-free Horn logic.
 Thus it allows Horn-like rules to be
combined with OWL DL ontologies.
Rules in SWRL

B1, . . . , Bn  A1, . . . , Am

A1, . . . , Am, B1, . . . , Bn have one of the forms:


– C(x)
– P(x,y)
– sameAs(x,y) differentFrom(x,y)
where C is an OWL description, P is an OWL
property, and x,y are variables, OWL individuals or
OWL data values.
Drawbacks of SWRL

 Main source of complexity:


– arbitrary OWL expressions, such as
restrictions, can appear in the head or body of
a rule.
 Adds significant expressive power to OWL,
but causes undecidability
– there is no inference engine that draws exactly
the same conclusions as the SWRL semantics.
SWRL Sublanguages

 SWRL adds the expressivity of DLs and


function-free rules.
 One challenge: identify sublanguages of
SWRL with right balance between
expressivity and computational viability.
 A candidate OWL DL + DL-safe rules
– every variable must appear in a non-
description logic atom in the rule body.
Non-monotonic rules

 Non-monotonic rules exploit an


“unprovable” operator
 This can be used to implement default
reasoning, e.g.,
– assume P(X) is true for some X unless you can
prove hat it is not
– Assume that a bird can fly unless you know it
can not
monotonic

canFly(X) :- bird (X)


bird(X) :- eagle(X)
bird(X) :- penguin(X)
eagle(sam)
penguin(tux)
Non-monotonic

canFly(X) :- bird (X), \+ not(canFly(X))


bird(X) :- eagle(X)
bird(X) :- penguin(X)
not(canFly(X)) :- penguin(X)
eagle(sam)
penguin(tux)
Rule priorities

 This approach can be extended to


implement systems where rules have
priorities
 This seems to be intuitive to people – used
in many human systems
– E.g., University policy overrules Department
policy
– The “Ten Commandments” can not be
contravened
Two Semantic Webs?
Limitations
 The rule inference support is not integrated with an OWL
classifier
 New assertions by rules may violate existing restrictions
in ontology
 New inferred knowledge from classification may in turn
produce knowledge useful for rules.
Inferred
Knowledge
1 2

Ontology
Rule Inference
Classification

4 3
Inferred
Knowledge
Limitations

 Existing solution:
Solve these possible conflicts manually.
 Ideal solution:
Have a single module for both ontology classification
and rule inference.
 What if we want to combine non-monotonic features with
classical logic?
– Partial Solutions:
 Answer set programming
 Externally (through the use of appropriate rule
engines)
Limitations
 The rule inference support not integrated with OWL
classifier.
 New assertions by rules may violate existing restrictions
in ontology. New inferred knowledge from classification
may in turn produce knowledge useful for rules.

Inferred
Knowledge
1 2

Ontology
Rule Inference
Classification

4 3
Inferred
Knowledge
Summary
 Horn logic is a subset of predicate logic that
allows efficient reasoning, orthogonal to
description logics
 Horn logic is the basis of monotonic rules
 DLP and SWRL are two important ways of
combining OWL with Horn rules.
– DLP is essentially the intersection of OWL and
Horn logic
– SWRL is a much richer language
Summary (2)

 Nonmonotonic rules are useful in situations


where the available information is
incomplete
 They are rules that may be overridden by
contrary evidence
 Priorities are used to resolve some conflicts
between rules
 Representation XML-like languages is
straightforward

Vous aimerez peut-être aussi