practical non-monotonic reasoning
TRANSCRIPT
Practical Non-monotonic Reasoning
Guido Governatori
Knowledge Techniques Week 2012
NICTA Members
NICTA Partners
www.nicta.com.au From imagination to impact
Part I
Introduction: Knowledge Representation
2/67
Artificial Intelligence
The design and study of systems that behave intelligentlyFocus on hard problems, often with no, or very ine�cient fullalgorithmic solutionFocus on problems that require “reasoning” (“intelligence”)and a large amount of knowledge about the world
CriticalRepresent knowledge about the worldReason with these representations to obtain meaningfulanswers/solutions
2/67
Symbolic Knowledge Representation
Important objects (collections of objects) and theirrelationships are represented explicitly by internal symbols
Symbolic manipulation of internal symbolic representationsachieves results meaningful in the real world
3/67
Goals of Knowledge Representation
Find representation that are:
Rich enough to express the important knowledge relevant tothe problem at hand
Close to problem at hand: compact, natural, maintainable
Amenable to e�cient computation
4/67
Representational Adequacy
Consider the following facts:Most children believe in Santa.John will have to finish his assignment before he can startworking on his project
Can all be represented as a string! But hard then tomanipulate and draw conclusions
How do we represent these formally in a way that can bemanipulated in a computer program?
5/67
Well-defined Syntax and Semantics
Precise syntax: what can be expressed in the languageFormal language, unlike natural languagePrerequisite for precise manipulation through computation
Precise semantics: formal meaning of expression
6/67
Naturalness of expression
Also helpful if our representation scheme is quite intuitive andnatural for human readers!
Could represent the fact that my car is red using the notation:
“xyzzy ! Zing”where xyzzy refers to redness, Zing refers to by car, and !used in some way to assign properties
But this would not be very helpful. . .
7/67
Inferential Adequacy
Representing knowledge not very interesting unless you canuse it to make inferences:
Draw new conclusions from existing facts.“If its raining John never goes out” + “It is raining today”so. . .Come up with solutions to complex problems, using therepresented knowledge.
Inferential adequacy refers to how easy it is to draw inferencesusing represented knowledge.
8/67
Inferential E�ciency
You may be able, in principle, to make complex deductions, but itmay be just too ine�cient.
The basic tradeo↵ of all KRGenerally the more complex the possible deductions,the less e�cient will be the reasoning process (in theworst case).
The eternal quest of KRNeed representation and inference system su�cientfor the task, without being hopelessly ine�cient
9/67
Inferential Adequacy (2)
Representing everything as natural language strings has goodrepresentational adequacy and naturalness, but very poorinferential adequacy
10/67
Requirements for KR Languages
Representational Adequacy
Clear syntax/semantics
Inferential adequacy
Inferential e�ciency
Naturalness
In practice no one language is perfect, and di↵erent languages aresuitable for di↵erent problems.
11/67
Why Reasoning?
Patient x is allergic to medication m
Anybody allergic to medication m is also allergic tomedication n
Is it ok to prescribe n for x?
Reasoning uncovers implicit knowledge not represented explicitly.Beyond database systems technology
12/67
Syntactic vs Semantic Reasoning
Semantic Reasoning
Sentences P1 . . . ,Pn entail sentence P i↵ thetruth of P is implicit in the truth of P1 . . . ,Pn
Or: if the world satisfies P1 . . . ,Pn then it mustalso satisfy PReasoning usually done by humans
Syntactic Reasoning
Sentences P1 . . . ,Pn infer sentence P i↵ there isa syntactic manipulation of P1 . . . ,Pn thatresults in PReasoning done by humans and machines
13/67
Reasoning: Soundness and Completeness
Sound (syntactic) reasoning:If P is inferred by P1 . . . ,Pn then it is also entailed semanticallyOnly semantically valid conclusions are drawn
Complete (syntactic) reasoningIf P is entailed semantically by P1 . . . ,Pn then it can also beinferredAll semantically valid conclusions can be drawn
Usually interested in sound and complete reasoningBut sometimes we have to give up one for the sake of e�ciency(usually completeness)
14/67
Main KR Approaches
Logic BasedFocus on clean, mathematical semantics: declarativelyExplainability
Frames / Semantic Networks / ObjectsFocus on structure of objects
Rule-based systemsFocus on e�ciencyA) B in logic and rule-based systems
15/67
The Landscape of KR
Predicate logic (first order logic) and its sublanguagesLogic programming, (pure) PrologDescription logicsWeb ontology languages
Predicate logic (first order logic) extensionsModal and epistemic logicsTemporal logicsSpatial logics
Inconsistency-tolerant logics:ParaconsistencyNonmonotonic reasoning
Representing vaguenessProbabilistic logicsBayesian networksMarkov chains
16/67
Part II
Defeasible Reasoning
17/67
Being Lazy: Reasonable Results with Minimum E↵ort
Factual omniscience and (non-)monotonic reasoning
PhD ! Uni
Weekend ! ¬UniPublicHoliday ! ¬Uni
Sick ! ¬UniWeekend ^VICdeadline ! Uni
VICdeadline ^PartnerBirthday ! ¬Uni
Phd ^ (¬Weekend _ (Weekend ^VICdeadline ^¬PartnerBirthday))^¬Sick . . .! Uni
VIC= Very Important Conference
17/67
Inconsistent Information
Classical logics “collapse” in the face of inconsistenciesEverything can be derived
But inconsistencies do happen in real settingsCommon when integrating knowledge from various Websources
Nonmonotonic reasoning is inconsistency tolerant reasoning
18/67
Rules with Exceptions
Natural representation for policies and business rules.
Priority information is often implicitly or explicitly available toresolve conflicts among rules.
Potential applicationsNormative reasoningSecurity policiesBusiness rulesPersonalizationBrokeringBargaining, automated agent negotiations
19/67
Nonmonotonic Reasoning Options
Sceptical vs Credulous
Ambiguity Blocking vs Ambiguity Propagation
Team Defeats vs No Team Defeat
20/67
Basic Reasoning
Suppose you have one pieces of evidence, Evidence A suggestingthat the defendant is responsible.
Given: EvidenceA and the rule
EvidenceA) Responsible
Sceptical: ResponsibleCredulous: Responsible
21/67
Conflict
Suppose that your legal system is based on presumption ofinnocence, and the somebody is guilty if responsibility is proved.
Given the rules
r1 : Responsible ) Guilty
r2 : ) ¬Guilty
Sceptical: ¬GuiltyCredulous: ¬GuiltyWhat about if we have r1 > r2 (same conclusions)
22/67
Sceptical vs Credulous
Suppose you have two pieces of evidence. Evidence A suggestingthat the defendant is responsible, and Evidence A suggesting thatthe defendant is not responsible.
Given: EvidenceA, and EvidenceB and the rules
EvidenceA) Responsible
EvidenceB ) ¬Responsible
Sceptical: no conclusionsCredulous: both conclusions
23/67
Sceptical vs Credulous and preference
Suppose you have two pieces of evidence. Evidence A suggestingthat the defendant is responsible, and Evidence A suggesting thatthe defendant is not responsible. However, Evidence A is morereliable than Evidence B.
Given: EvidenceA, and EvidenceB and the rules
r1 : EvidenceA) Responsible
r2 : EvidenceB ) ¬Responsibler1 > r2
Sceptical: ResponsibleCredulous: Responsible
24/67
Ambiguity Propagation vs Ambiguity Blocking
Suppose you have two pieces of evidence. Evidence A suggestingthat the defendant is responsible, and Evidence A suggesting thatthe defendant is not responsible. If the defendant is responsible,then he is guilty. and we have presupposition of innocence.
Given: EvidenceA, and EvidenceB and the rules
EvidenceA) Responsible
EvidenceB ) ¬ResponsibleResponsible ) Guilty
) ¬GuiltyAmbiguity blocking concludes ¬GuiltyAmbiguity propagation does not concludes ¬Guilty and fails toconclude Guilty .
25/67
Ambiguity Propagation vs Ambiguity Blocking
Suppose you have two pieces of evidence. Evidence A suggesting that thedefendant is responsible, and Evidence A suggesting that the defendant isnot responsible. If the defendant is responsible, then he is guilty. and wehave presupposition of innocence. If the defendant was wrongly accusedthen he is entitled to compensation.
Given: EvidenceA, and EvidenceB and the rules
EvidenceA) Responsible
EvidenceB ) ¬ResponsibleResponsible ) Guilty
) ¬Guilty¬Guilty ) Innocent
Innocent ) Compensation
Ambiguity blocking concludes Compensation
Ambiguity propagation does not conclude Compensation
26/67
Team Defeat vs No Team Defeat
r1 :General ) Attack
r2 :Captain) ¬Attackr1 > r2
r3 :Bishop ) Attack
r4 :Priest ) ¬Attackr3 > r4
Team Defeat concludes AttackNo Team Defeat does not conclude Attack
27/67
Weak and Strong Support
Suppose that a drunk person testify that the accused (not known to him)was in location di↵erent from the crime scene at the time of the crime.Secure footage from high definition camera shows the accused at thecrime scene at the time of the crime.
r1 :drunk ) ¬CrimeScene
r2 :camera) CrimeScene
r3 :¬CrimeScene ) Alibi
r2 > r1
Do we have scintilla of evidence to claim that the accuse was at thecrime scene at the time of the crime?
Is it reasonable to say that we have substantial evidence supporting forthe same claim?
Is it reasonable to claim that beyond any reasonable doubts the accused
has an alibi?
28/67
Why Defeasible Logic?
Rule-based non-monotonic formalism
Flexible
E�cient (linear complexity)
Directly skeptic semantics
Argumentation semantics
Constructive proof theory
Optimised/e�cient implementations (1.700.000 rules)
Extensible
29/67
Defeasible Logic: Strength of Conclusions
Derive (plausible) conclusions with the minimum amount ofinformation.
Definite conclusionsDefeasible conclusions
Defeasible TheoryFactsStrict rules (A! B)Defeasible rules (A) B)Defeaters (A; B)Superiority relation over rules
30/67
Conclusions in Defeasible Logic
A proof is a finite sequence P = (P(1), . . . ,P(n)) of tagged literalssatisfying four conditions
+∂p (-∂p): p is (not) derivable using ambiguity blocking,team defeat
+∂ ⇤p: p is derivable using ambiguity blocking, no team defeat
+dp: p is derivable using ambiguity propagation, team defeat
+d ⇤p p is derivable using ambiguity propagation, no teamdefeat
+sp: p is a credulous conclusion using team defeat
+sp: p is a credulous conclusion using no team defeat
+s�p: p is a credulous weak conclusion
31/67
Proving Conclusions in Defeasible Logic
1 Give an argument for the conclusion you want to prove
2 Consider all possible counterarguments to it3 Rebut all counterarguments
Defeat the argument by a stronger oneUndercut the argument by showing that some of the premisesdo not hold
32/67
Example
Facts: A1, A2, B1, B2
Rules: r1:A1 ) Cr2:A2 ) Cr3:B1 ) ¬Cr4:B2 ) ¬Cr5:B3 ) ¬C
Superiority relation:r1 > r3r2 > r4r5 > r1
Phase 1: Argument for CA1 (Fact), r1 : A1 ) CPhase 2: Possible counterargumentsr3 : B1 ) ¬Cr4 : B2 ) ¬Cr5 : B3 ) ¬CPhase 3: Rebut the counterargumentsr3 weaker than r1r4 weaker than r2r5 is not applicable
33/67
Derivations in Defeasible Logics: Ambiguity blocking
+∂p
1) 9 an applicable rule r pro p2) 8 rule t con p either:
2.1) t is not applicable2.2) t is defeated by an applicable rule s pro p stronger than t
+∂ ⇤p
1) 9 an applicable rule r pro p2) 8 rule t con p either:
2.1) t is not applicable2.2) t is defeated by r where r is stronger than t
34/67
Derivations in Defeasible Logics: Ambiguity propagation
+∂p
1) 9 an applicable rule r pro p2) 8 rule t con p either:
2.1) t is not applicable2.2) t is defeated by an applicable rule s pro p stronger than t
+dp
1) 9 an applicable rule r pro p2) 8 rule t con p either:
2.1) t is not applicable2.2) t is defeated by a supported rule s pro p stronger than s
35/67
Derivations in Defeasible Logics: Support
+sp
1) 9 a supported rule r pro p2) 8 rule s con p either
2.1) s is not applicable using ambiguity propagation (i.e., �d ,�d ⇤)2.2) s is not stronger than r
+s�p
9 a supported rule r pro p
36/67
Properties of Defeasible Logic
Theorem
Defeasible logic is consistent. +∂a and +∂¬a cannot be bothderived, unless they are already known as certain knowledge (facts)
Theorem
Defeasible logic is coherent. +#a and �#a cannot be derivedfrom the same knowledge base.
Theorem
Defeasible logic has linear complexity.
37/67
Part III
Modal Defeasible Logic
38/67
Modal Logic
Guido gives a tutorial KTW 2012
Normal Modal Logic1 propositional logic2 2(A! B)! (2A!2B)3 ` A/ `2A or A ` B/2A `2B4 2A! A (2A ` A)5 2A! ¬2¬A (2A ` ¬2¬A)6 2A!22A (2A `22A)7 2A! ¬2¬2A (2A ` ¬2¬2A)
1 + 2 + 3 = Logical omniscience (and expected side-e↵ects)1 = monotonic
38/67
What is a rule?
A rule is a binary relationship between a set of ‘expressions’ and an‘expression’
What’s the strength of the relationship?
What’s the type of the relationship?
39/67
Modal Defeasible Logic: Mode and Strength
1 The strength describes how strong is the relationshipsbetween the antecedent and the consequent of a rule.
A1, . . . ,An ! B (B is an indisputable consequence ofA1, . . . ,An)A1, . . . ,An ) B (normally B if A1, . . . ,An)
2 The mode qualifies the conclusion of a rule.A1, . . . ,An )BEL B (an agent forms the belief B whenA1, . . . ,An are the case)A1, . . . ,An )INT B (an agent has the intention B whenA1, . . . ,An are the case)A1, . . . ,An )OBL B (an agent has the obligation B whenA1, . . . ,An are the case)
40/67
Conclusions in Basic Modal Defeasible Logic
+�2iq, which is intended to mean that q is definitelyprovable (i.e., using only facts and strict rules of mode 2i );
��2iq, which is intended to mean that we have proved thatq is not definitely provable in D;
+∂2iq, which is intended to mean that q is defeasiblyprovable in D using rules of mode 2i ;
�∂2iq which is intended to mean that we have proved that qis not defeasibly provable in D using rules of mode 2i .
We obtain 2ip i↵ +∂2ip.
41/67
Recipe for Modal Defeasible Logics
Choose the appropriate modalitiesCreate a defeasible consequence relation for each modalityIdentify relationships between modalities:
inclusion21f !22f
conflicts21f ,22¬f !?
conversions from one modality to another modality
A1, . . . ,An )21 B
22A1, . . . ,22An `22B
Put in a mixer and shake well!
42/67
Proofs for Modal Defeasible Logic
Conflict 21 ! ¬22¬1 Give an argument for the conclusion you want to prove
2 Consider all possible counterarguments to it using rules forboth 21 and 22
3 Rebut all counterargumentsDefeat the argument by a stronger oneUndercut the argument by showing that some of the premisesdo not hold
43/67
Proofs for Modal Defeasible Logic
Conversion 21 to 22
1 Give an argument for the conclusion you want to prove usingrules for either 22 or rules of mode 21 st all premises areprovable with mode 22
2 Consider all possible counterarguments to it3 Rebut all counterarguments
Defeat the argument by a stronger one (same as 1)Undercut the argument by showing that some of the premisesdo not hold (for rules of mode 21 show that the premises arenot provable with mode 22)
43/67
DL for cognitive agents
D = (F ,RBEL,RDES,R INT,ROBL,>)
RBEL rules for belief !BEL, )BEL, ;BEL
RDES rules for desire !DES, )DES, ;DES
R INT rules for intention !INT, )INT, ;INT
ROBL rules for obligation !OBL, )OBL, ;OBL
For X 2 {INT,DES,OBL}D ` XA i↵ D `+∂XAD ` A i↵ D `+∂BELA
44/67
Interactions
OBLa! ¬INT¬a social
INTa! ¬DES¬a stable
(INTa^OBL(a! b))! INTb conversion
(OBLa^ INT(a! b))! OBLb conversion
45/67
Conversions
What do we conclude from
A1,A2 )OBL C
and INTA1 and INTA2?What about
A1, INTA2 )OBL C
and INTA1 and INTA2?
47/67
Social Agents
Definition (Social agent)
An agent is social if in case of a conflict between an obligationand an intention, the agent prefers the obligation to her intention
IJCAIdeadline )OBL Uni
SoccerWorldCup )INT ¬Uni
49/67
BIO Logical Agents
A set of rules for beliefs:
a1, . . . ,an )BEL c
The agent derives BELc from a1, . . . ,anA set of rules for intentions:
a1, . . . ,an )INT c
The agent derives INTc from a1, . . . ,anA set of rules for :
a1, . . . ,an )OBL c
The agent derives OBLc from a1, . . . ,anBelief rules are stronger than obligation rules which in turns arestronger than intention rules
50/67
From Beliefs to Intentions
If we want to model realistic agents, the model must conform withthe real world. According to current legal theories:If an agent knows/beliefs that B is a consequence of A, and theagent intends A, then the agent intends B (unless she has somejustifications for not intending it).
From a1, . . . ,an )BEL c , and
INTa1, . . . , INTan derive
INTc
If an agent believes that dropping a glass will break it, and sheintends to drop the glass, she intends to break it.
51/67
Good News
Why should we use BIO Logical agents
Theorem
The complexity of defeasible logic for BIO logical agents is linear
52/67
Part IV
Adding Time
53/67
Temporalised Defeasible Logic
Temporalised Defeasible Logic is an umbrella expression for a zooof variants of logics.
time points: A : t (A holds at time t)
intervals: A[ts , te ] (A holds from ts to te)
durations: A : d (A holds for d time units)
. . .
A temporalised defeasible theory
(F ,R ,>,T )
T discrete total order of instants
53/67
Persistent and Transient Conclusions
linear discrete time line with a fixed granularitypropositions (literals) are associated with instants of time
C : t is persistent at time t, if C continues to hold after tunless some event occurs to terminate it.C : t is transient at time t, if C is guaranteed to hold at time tonly.
partition the rules into persistent rules and transient rules
ClapHands : t !t MakeSomeNoise : t
TearPaper : t !p ShreddedPaper : t
A1 : t1, . . .An : tn )x C : t
no constraints over t1, . . . , tn and t.
54/67
Proving Persistence
1 Generate an argument for the persistent conclusion now usingpersistent rules.
Take a rule for the conclusion that is applicable now orShow the there is a time in the past where the persistentconclusion obtains.
2 Consider all possible counterarguments for the conclusionTake all rules for its negation that obtain nowTake all rules for its negation that have obtained since thetime in the past.
3 rebut the counterargumentsshow that the rules have been discarded (not applicable ordefeated).
55/67
Example
Facts: A : t0, B : t2,C : t2, D : t3
Rules: r1 : A : t )p E : tr2 : B : t )p ¬E : tr3 : C : t ;p E : tr4 : D : t )t ¬E : t
Superiority relation:r3 > r2r1 > r4
Conclusions at time t0A, E using r1 (E is persistent)Conclusions at time t1EConclusions at time t2B , C , EConclusions at time t3D, ¬E
56/67
Linear Time
Theorem
The extension of a temporalised defeasible theory D can becomputed in O(|R |⇤ |H|⇤ |T |)
R is the set of rules in D
H is the Herbrandt base of D, i.e., the set of distinctpropositional atoms
T is the set of distinct instant of time explicitly occurring inD.
57/67
Running out of time: Deadlines
Many kinds of deadlines; di↵erent functions
Research ProblemHow to represent deadlines (in contracts)?What happens after the deadline?Characterise types of deadlines
Approach:Identify key parameters; template formulasTemporalised Defeasible Deontic Logic
58/67
Modelling Intervals
interval (set of instants) [ts , te ]
) A[ts , te ] shorthand for
)p A : ts
;t ¬A : te
59/67
Basic Deadline
+ Sanction
Basic Deadline
+ Sanction
Customers must pay within 30 days after receiving the invoice.
¬payinvoice
viol(inv)
OBLfine
t1 t1+31OBLpay
invinit invoice : t1 )OBL pay : [t1,max]invterm OBLpay : t2,pay : t2 ;OBL ¬pay : t2+1invviol invoice : t1,OBLpay : t1+31) viol(inv) : t1+31
invsanc viol(inv) : t )OBL fine : [t,max]
60/67
Basic Deadline + Sanction
Basic Deadline + Sanction
Customers must pay within 30 days after receiving the invoice.Otherwise, a fine must be paid.
¬payinvoice
viol(inv)OBLfine
t1 t1+31OBLpay
invinit invoice : t1 )OBL pay : [t1,max]invterm OBLpay : t2,pay : t2 ;OBL ¬pay : t2+1invviol invoice : t1,OBLpay : t1+31) viol(inv) : t1+31invsanc viol(inv) : t )OBL fine : [t,max]
60/67
Maintenance
Maintenance Deadlines
Customers must keep a positive balance, for 30 days after openingan bank account.
¬positiveopenAccount
vio(pos)
t1 t1+30
t2
OBLpositive
posinit openAccount : t1 )OBL positive : [t1, t1+30]postermposviol ¬positive : t2,OBLpositive : t2 ) viol(pos) : t2
61/67
Persistent
Persistent Obligation after Deadline
Customers must pay within 30 days after receiving the invoice.
¬payinvoice
vio(pos)
t1 t1+31OBLpay
invinit invoice : t1 )OBL pay : [t1,max]invterm OBLpay : t2,pay : t2 ;OBL ¬pay : t2+1invviol invoice : t1,OBLpay : t1+31) viol(inv) : t1+31
62/67
Non-persistent
Non-persistent Obligation after Deadline
A wedding cake must be delivered, before the wedding party.
¬cakeorder
wedding
viol(wed)
OBLcake
t1 t2
wedinit order : t1,wedding : t2 )OBL cake : [t1,t2 ]wedterm OBLcake : t3,cake : t3 ;OBL ¬cake : t3+1wedviol wedding : t2,OBLcake : t2 ) viol(wed) : t2
63/67
References for Defeasible Logic
Grigoris Antoniou, David Billington, Guido Governatori, and Michael J.Maher.Representation results for defeasible logic.ACM Transactions on Computational Logic, 2(2):255–287, April 2001.
Grigoris Antoniou, David Billington, Guido Governatori, and Michael J.Maher.Embedding defeasible logic into logic programming.Theory and Practice of Logic Programming, 6(6):703–735, November2006.
David Billington, Grigoris Antoniou, Guido Governatori, and Michael J.Maher.An inclusion theorem for defeasible logic.ACM Transactions in Computational Logic, 12(1):article 6.
Ho-Pun Lam and Guido Governatori.The making of SPINdle.In Guido Governatori, John Hall, and Adrian Paschke, editors, RuleML
2009, pages 315–322, Springer, 2009.65/67
References for Modal Defeasible Logic
Guido Governatori and Antonino Rotolo.BIO logical agents: Norms, beliefs, intentions in defeasible logic.Journal of Autonomous Agents and Multi Agent Systems, 17(1):36–69,2008.
Duy Hoang Pham, Guido Governatori, Simon Raboczi, Andrew Newman,and Subhasis Thakur.On extending RuleML for modal defeasible logic.In Nick Bassiliades, Guido Governatori, and Adrian Paschke, editors,RuleML 2008, pages 89–103, Springer, 2008.
66/67
References for Temporal Defeasible Logic
Guido Governatori and Antonino Rotolo.Changing legal systems: legal abrogations and annulments in defeasiblelogic.Logic Journal of IGPL, 18(1):157–194, 2010.
Guido Governatori, Antonino Rotolo, and Giovanni Sartor.Temporalised normative positions in defeasible logic.In Anne Gardner, editor, 10th International Conference on Artificial
Intelligence and Law (ICAIL05), pages 25–34. ACM Press, June 6–112005.
67/67