Upload
federico-cerutti
View
999
Download
1
Embed Size (px)
DESCRIPTION
Citation preview
University of BresciaDepartment of Information Engineering
Knowledge Engineering and Human-Computer Interaction Research Group
Knowledge Representation andReasoning: an (extremely short)
Overview
Federico Cerutti
Gestione dei Sistemi Informativi AziendaliFriday 1st June, 2012
c© 2012 Federico Cerutti <[email protected]>
The Basic Concepts
Knowledge: some information about the world:
medical information about some particular set of diseases: whatcauses them, how to diagnose them;geographical data: which city is the capital of which country,population statistics, . . . ;common sense physics: bodies cannot go through solid walls, . . .
Representation: how/in which language do we represent thisinformation;
Reasoning: how to extract more information from what isexplicitly represented (because we cannot represent every singlefact explicitly as in a database).
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 2
The Basic Concepts
We want to be able to talk about some AI programs in terms ofwhat they �know�;
. . . and not just talk about what they know but also havesomething to point to in those systems corresponding to�knowledge� and determining their behaviour, namely explicitlyrepresented symbolic knowledge.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 2
Why Knowledge Representation and Reasoning isSO Important
Expert Systems:
MYCYN (1970s, Stanford University)XCON (1978, Carnegie Mellon University)
Ontologies:
CYC (1980s-today Cycorp, Austin, Texas)WordNetSemantic Web applications
Reasoning about uncertainty:
GoogleAmazonFacebook (ads)
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 3
KRR in Classical LogicKRR in Description Logics
KRR in Non-Monotonic LogicsConclusions
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 4
Classical Logic: the First Order Logic
A signature is a set of symbols of two kinds: function constantsand predicate constants with a non-negative integer called thearity assigned to each symbol: function constants of arity 0 arecalled object constants, while predicate constants of arity 0 arecalled propositional constants;
Object variables are elements of some �xed in�nite sequence ofsymbols (e.g. x, y, z, x1, x2, . . .);
Terms of a signature σ are formed from object variables and fromfunction constants of σ;
An atomic formula of σ is an expression of the form P (t1, . . . , tn)or t1 = t2 where P is a predicate constant of arity n and each ti isa term of σ;
Formulas are formed from atomic formulas using propositionalconnectives (>,⊥,¬,∧ or &,∨,→ or ⊃,↔ or ≡) and thequanti�ers ∃, ∀.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 5
Variable Scope
Like variables in programming languages, the variables in FOL have ascope determined by the quanti�ers.
P (x) ∧ ∃y[P (y) ∨Q(y)]
x is a free variable, y is a bound variable
A closed formula, or a sentence, is a formula without freevariables;
The universal closure of a formula F is the sentence ∀v1, . . . , vnF ,where v1, . . . , vn are the free variables of F ;
The result of the substitution of a term t for a variable v in aformula F (or F [v/t]) is the formula obtained from F bysimultaneously replacing each free occurrence of v by t.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 6
Semantics
An interpretation or structure of a signature σ consists of:
a nonempty set |I| called the universe (or domain) of I;
for every object constant c of σ, an element cI of |I|;for every function constant f of σ of arity n > 0, a function f I
from |I|n to |I|;for every propositional constant P of σ, an element P I of{FALSE,TRUE};for every predicate constant R of σ of arity n > 0, a function RI
from |I|n to |I|.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 7
Semantics
For any element ξ of its universe |I|, select a new symbol ξ∗ called the name
of ξ. By σI we denote the signature obtained from σ adding all names ξ∗ asobject constants. The interpretation I can be extended to the new signatureσI by de�ning (ξ∗)I = ξ for all ξ ∈ |I|.
If t is an object constant, then tI is part of the interpretation I;
For all function constants f of arity n > 0,f(t1, . . . , tn)I = f I(tI1, . . . , t
In);
For any propositional constant P , P I is part of the interpretation I,otherwise we de�ne:
R(t1, . . . , tn) = RI(tI1, . . . , tIn),
⊥I = FALSE,>I = TRUE,(¬F )I = ¬(F I),(F �G)I = �(F I , GI) for every binary connective �,∀wF (w)I = TRUE if F (ξ∗)I = TRUE for all ξ ∈ |I|,∃wF (w)I = TRUE if F (ξ∗)I = TRUE for some ξ ∈ |I|.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 7
Semantics
An interpretation I satis�es a sentence F , or is a model of F(I � F ) if F I = TRUE;
A sentence F is logically valid if every interpretation satis�es F ;
Two sentences are equivalent to each other if they are satis�ed bythe same interpretations;
A formula with free variables is said to be logically valid if itsuniversal closure is logically valid;
Formulas F and G that may contain free variables are equivalentto each other if F ↔ F is logically valid;
A set Γ of sentences is satis�able if there exists an interpretationsatisfying all sentences in Γ;
A set Γ of sentences entails a formula F (F � F ) if everyinterpretation satisfying Γ satis�es the universal closure of F .
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 7
Knowledge Representation and Reasoning withFOL
Example
Tony, Mike and John belong to the Alpine Club. Every member of theAlpine Club who is not a skier is a mountain climber. Mountain climbers donot like rain, and anyone who does not like snow is not a skier. Mike dislikeswhatever Tony likes, and likes whatever Tony dislikes. Tony likes rain andsnow.Prove that the given sentences logically entail that there is a member ofAlpine Club who is a mountain climber but not a skier.
KB = {member(tony), member(cmike), member(john),∀ x (member(x) ∧ ¬skier(x))→ climber(x),
∀ x climber(x)→ ¬like(x, rain),∀ x ¬like(x, snow)→ −skier(x),∀ x like(tony, x)→ ¬like(mike, x),∀ x ¬like(tony, x)→ like(mike, x),like(tony, rain), like(tony, snow)}
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 8
Knowledge Representation and Reasoning withFOL
To prove if KB � ∃ x member(x) ∧ climber(x) ∧ ¬skier(x), let us considerthe Prover9 tool [McCune, 2010] fromhttp://www.cs.unm.edu/~mccune/prover9/.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 8
Knowledge Representation and Reasoning withFOL
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 8
Knowledge Representation and Reasoning withFOLReduction ad absurdum.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 8
KRR in Classical Logic
KRR in Description LogicsKRR in Non-Monotonic Logics
Conclusions
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 9
Description Logics
Family of logic-based knowledge representation formalisms well-suitedfor the representation of, and reasoning about:
terminological knowledge;
con�gurations;
ontologies;
database schemata:
schema design, evolution, and query optimisationsource integration in heterogeneous databases/data warehousesconceptual modelling of multidimensional aggregation. . .
. . .
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 10
DL Syntax
A description logic is mainly characterised by a set of constructorsthat allow to build complex:
concepts correspond to classes (are interpreted as set of objects);
roles correspond to relations (are interpreted as binary relationson objects).
The DL ALC (Attributive concept Language with Complements):
NC set of concept names, NR set of role names;
>,⊥, and every concept name A ∈ NC is an ALC-conceptdescription;
if C and D are ALC-concept descriptions, and r ∈ NR, thenC uD,C tD,¬C,∀r.C, ∃r.C are ALC-concept descriptions.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 11
DL Syntax
Example (from [Horrocks and Sattler, 2002]).
Man u (∃has-child.Blue) u (∃has-child.Green) u(∀has-child.Happy tRich)
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 11
DL Semantics
Semantics given by means of an interpretation I = (∆I , ·I), with∆I 6= ∅ the domain of I, and ·I that maps every ALC-concept to asubset of ∆I , and every role name to a subset of ∆I ×∆I s.t.
>I = ∆I , ⊥I = ∅;(C uD)I = CI ∩DI ;
(C tD)I = CI ∪DI ;
(¬C)I = ∆I \ CI ;
(∃r.C)I = {x ∈ ∆I |∃y ∈ ∆I , 〈x, y〉 ∈ rI ∧ y ∈ CI};(∀r.C)I = {x ∈ ∆I |∀y ∈ ∆I , 〈x, y〉 ∈ rI → y ∈ CI};
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 12
DL Knowledge Bases: TBoxes
The TBox contains (Terminological Knowledge):
Concept de�nitions, A.= C, where A is a concept name and C is
a ALC-concept (e.g. Father .= Man u ∃has-child.Human);
Axioms, C1 v C2, where Ci are ALC-concepts(∃favourite.Brewery v ∃drinks.Beer).
An interpretation I satis�es:
a concept de�nition A.= C i� AI = CI ;
an axiom C1 v C2 i� CI1 ⊆ CI
2 ;
a TBox T i� I satis�es all de�nitions and axioms in T . In thiscase, I is a model of T (I � T ).
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 13
DL Knowledge Bases: ABoxes
The ABox contains (Assertional knowledge):
Concept assertions a : C, where a is an individual name, C aALC-concept (John : Man u ∀has-child.(Male uHappy));
Role assertions 〈a1, a2〉 : r, where ai are individual names, r is arole (〈John,Bill〉 : has-child)
An interpretation I satis�es:
a concept assertion a : C i� aI ∈ CI ;
a role assertion 〈a1, a2〉 : r i� 〈aI1 , aI2 〉 ∈ rI ;an ABox A i� I satis�es all assertions in A. In this case, I is amodel of A (I � A).
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 14
DL Entailment
Entailment in DL is de�ned as in FOL.A DL KB entails a concept c (KB � c) i� for every I, if I � KB,then I � c.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 15
Semantic Web
I have a dream for the Web [in which computers] becomecapable of analyzing all the data on the Web � the content,links, and transactions between people and computers. A'Semantic Web', which should make this possible, has yet toemerge, but when it does, the day-to-day mechanisms oftrade, bureaucracy and our daily lives will be handled bymachines talking to machines. The 'intelligent agents' peoplehave touted for ages will �nally materialize.[Berners-Lee and Fischetti, 2000]
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 16
Resource Description Framework (RDF): anexample
Title Artist Country Company Price YearEmpire Burlesque Bob Dylan USA Columbia 10.90 1985Hide your heart Bonnie Tyler UK CBS Records 9.90 1988
<rd f :D e s c r i p t i o nrd f : about=" ht tp : //www. recshop . fake /cd/Empire Burlesque "><c d : a r t i s t>Bob Dylan</ c d : a r t i s t><cd:country>USA</ cd :country><cd:company>Columbia</cd:company><cd : p r i c e>10 .90</ cd : p r i c e><cd :yea r>1985</ cd :yea r>
</ rd f :D e s c r i p t i o n>
<rd f :D e s c r i p t i o nrd f : about=" ht tp : //www. recshop . fake /cd/Hide your heart "><c d : a r t i s t>Bonnie Tyler</ c d : a r t i s t><cd:country>UK</ cd:country><cd:company>CBS Records</cd:company><cd : p r i c e>9 .90</ cd : p r i c e><cd :yea r>1988</ cd :yea r>
</ rd f :D e s c r i p t i o n>
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 17
Applications May Want More
Complex applications may want more possibilities:
characterisation of properties
identi�cation of objects with di�erent URIs
disjointness or equivalence of classes
construct classes, not only name them
more complex classi�cation schemes
reason about some terms, e.g. if �Person� resources �A� and �B�have the same �foaf:email� property, then �A� and �B� areidentical. . .
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 18
OWL (Lite or DL)
A semantic web ontology language developed by the W3C;Design goal: mapping from OWL to an expressive DL (exploitDL results);An OWL ontology can be seen to correspond to a DL TBoxtogether with a role hierarchy, describing the domain in terms ofclasses (corresponding to concepts) and properties (correspondingto roles).
Human uMale
<owl :C la s s><ow l : i n t e r s e c t i o nO f rd f :parseType=" Co l l e c t i on ">
<owl :C la s s rd f : abou t="#Human"/><owl :C la s s rd f : abou t="#Male"/>
</ ow l : i n t e r s e c t i o nO f></ owl :C la s s>
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 19
OWL Constructors and Axioms (partial)
Constructor DL syntax
instersectionOf C1 u · · · u Cn
unionOF C1 t · · · t Cn
complementOf ¬CallValuesFrom ∀P.CsomeValuesFrom ∃P.C
Axiom DL syntax
subClassOf C1 v C2
equivalentClass C1.= C2
disjointWith C1 v ¬C2
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 20
Protege Ontology Editor
People ontology fromhttp://owl.man.ac.uk/2005/07/sssw/people.owl
An old lady is an eldery, female person, who has some animalsbut only cats.
A cat is an animal.
Minnie is an eldery female, and she has a pet, Tom.
Who has a pet, is a person.
Since Minnie has a pet, she is a person.
Since Minnie is an eldery, female person, she is a old lady.
Since Minnie is an old lady, and she has a pet, Tom, and since oldladies have only cats, Tom is a cat.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 21
DL and Other Formalisms
Most DLs are decidable fragments of FOL (ALC-concepts can bemapped into �rst order formulae);
DLs far more expressive than ALC:number restrictions: �people having at most 2 cats and exactly 1dog�complex roles:
inverse (�has-child�, �child-of �);transitive closure (�offspring�, �has-child�);role inclusion (�has-daughter�, �has-child�);. . .
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 22
A More Expressive Logic: the Second-Order Logic
Richer syntax than FOL because, along with object variables, weassume now an in�nite sequence of function variables of arity n > 0,and an in�nite sequence of predicate variables of arity n ≥ 0. Objectvariables are viewed as function variables of arity 0.
∀α, β ∃γ ∀x (γ(x) = α(β(x)))Sentence expressing the possibility of composing any two functions
∀x, y (Q(x, y)↔ ∀q (F (q)→ q(x, y)))where F (q) stands for
∀x1, y1 (P (x1, y1)→ q(x1, y1))∧∀x1, y1, z1 ((q(x1, y1) ∧ q(y1, z1))→ q(x1, z1))
Q is the intersection of all transitive relations containing P
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 23
Cyc
The Cyc Knowledge Server is a very large knowledge base andinference engine
Developed by Cycorp http://www.cyc.com/
It aims to provide a deep layer of �common sense knowledge� tobe used by other knowledge-intensive programs
Contains terms and assertions in formal language CycL, basedsecond order logic
Knowledge base contains classi�cation of things, facts, rules ofthumb, heuristics for reasoning about everyday objects.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 24
Cyc Example of Opposite Relationships
c r e a t e constant k1c r e a t e constant k2(#$ i s a #$k1 #$Sca l a r I n t e r v a l )(#$ i s a #$k2 #$Sca l a r I n t e r v a l )(#$muchLessThan #$k1 #$k2 )
Query : (#$muchGreaterThan ?X ?Y)
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 25
KRR in Classical LogicKRR in Description Logics
KRR in Non-MonotonicLogicsConclusions
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 26
Non Monotonic Logics
Classical logic is monotonic: whenever a sentence A is a logicalconsequence of a set of sentences T (T � A), then A is also aconsequence of an arbitrary superset of T ;
Commonsense reasoning is di�erent: we often draw plausibleconclusions based on the assumption that the world is normaland as expected;
This is farm from being irrational: it is the best we can do insituations in which we have only incomplete information;
It can happen that our normality assumptions turn out to bewrong: in this case we may have to revise our conclusions.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 27
The Tweety Example
Birds �ies, in Prolog: assert((flies(X) :- bird(X))).
Tweety is a bird. . . (assert(bird(tweety)).)
. . . then Tweety �ies.
Tux is a penguin (penguin(tux).)
Every penguin is a bird (bird(X) :- penguin(X).)
Then Tux �ies (?!?!)
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 28
The Tweety Example
Birds �ies, in Prolog: assert((flies(X) :- bird(X))).
Tweety is a bird. . . (assert(bird(tweety)).)
. . . then Tweety �ies.
Tux is a penguin (penguin(tux).)
Every penguin is a bird (bird(X) :- penguin(X).)
Then Tux �ies (?!?!)
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 28
The Tweety Example
Birds �ies, in Prolog: assert((flies(X) :- bird(X))).
Tweety is a bird. . . (assert(bird(tweety)).)
. . . then Tweety �ies.
Tux is a penguin (penguin(tux).)
Every penguin is a bird (bird(X) :- penguin(X).)
Then Tux �ies (?!?!)
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 28
The Tweety Example
Birds �ies, in Prolog: assert((flies(X) :- bird(X))).
Tweety is a bird. . . (assert(bird(tweety)).)
. . . then Tweety �ies.
Tux is a penguin (penguin(tux).)
Every penguin is a bird (bird(X) :- penguin(X).)
Then Tux �ies (?!?!)
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 28
The Tweety Example
Birds �ies, in Prolog: assert((flies(X) :- bird(X))).
Tweety is a bird. . . (assert(bird(tweety)).)
. . . then Tweety �ies.
Tux is a penguin (penguin(tux).)
Every penguin is a bird (bird(X) :- penguin(X).)
Then Tux �ies (?!?!)
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 28
The Tweety Example
Birds �ies, in Prolog: assert((flies(X) :- bird(X))).
Tweety is a bird. . . (assert(bird(tweety)).)
. . . then Tweety �ies.
Tux is a penguin (penguin(tux).)
Every penguin is a bird (bird(X) :- penguin(X).)
Then Tux �ies (?!?!)
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 28
The Tweety Example Revisited
Birds �ies unless they are �abnormal�(flies(X) :- bird(X), \+ abnormalbird(X).)\+ means negation as failure, equivalent to:not(P) :- call(P), !, fail. if P, then not(P) failsnot(P). else not(P) holds
We know that penguin are �abnormal� birds(abnormalbird(X) :- penguin(X). andbird(X) :- penguin(X).)
Tweety is a bird (we do not know if normal or abnormal). . . (bird(tweety).)
Tux is a penguin. . . (penguin(tux).)
. . . Tweety �ies, Tux does not.
What would happen if we know that also Tweety is a penguin?(penguin(tweety).)
Tweety does not �y.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 29
The Tweety Example Revisited
Birds �ies unless they are �abnormal�(flies(X) :- bird(X), \+ abnormalbird(X).)\+ means negation as failure, equivalent to:not(P) :- call(P), !, fail. if P, then not(P) failsnot(P). else not(P) holds
We know that penguin are �abnormal� birds(abnormalbird(X) :- penguin(X). andbird(X) :- penguin(X).)
Tweety is a bird (we do not know if normal or abnormal). . . (bird(tweety).)
Tux is a penguin. . . (penguin(tux).)
. . . Tweety �ies, Tux does not.
What would happen if we know that also Tweety is a penguin?(penguin(tweety).)
Tweety does not �y.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 29
The Tweety Example Revisited
Birds �ies unless they are �abnormal�(flies(X) :- bird(X), \+ abnormalbird(X).)\+ means negation as failure, equivalent to:not(P) :- call(P), !, fail. if P, then not(P) failsnot(P). else not(P) holds
We know that penguin are �abnormal� birds(abnormalbird(X) :- penguin(X). andbird(X) :- penguin(X).)
Tweety is a bird (we do not know if normal or abnormal). . . (bird(tweety).)
Tux is a penguin. . . (penguin(tux).)
. . . Tweety �ies, Tux does not.
What would happen if we know that also Tweety is a penguin?(penguin(tweety).)
Tweety does not �y.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 29
The Tweety Example Revisited
Birds �ies unless they are �abnormal�(flies(X) :- bird(X), \+ abnormalbird(X).)\+ means negation as failure, equivalent to:not(P) :- call(P), !, fail. if P, then not(P) failsnot(P). else not(P) holds
We know that penguin are �abnormal� birds(abnormalbird(X) :- penguin(X). andbird(X) :- penguin(X).)
Tweety is a bird (we do not know if normal or abnormal). . . (bird(tweety).)
Tux is a penguin. . . (penguin(tux).)
. . . Tweety �ies, Tux does not.
What would happen if we know that also Tweety is a penguin?(penguin(tweety).)
Tweety does not �y.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 29
The Tweety Example Revisited
Birds �ies unless they are �abnormal�(flies(X) :- bird(X), \+ abnormalbird(X).)\+ means negation as failure, equivalent to:not(P) :- call(P), !, fail. if P, then not(P) failsnot(P). else not(P) holds
We know that penguin are �abnormal� birds(abnormalbird(X) :- penguin(X). andbird(X) :- penguin(X).)
Tweety is a bird (we do not know if normal or abnormal). . . (bird(tweety).)
Tux is a penguin. . . (penguin(tux).)
. . . Tweety �ies, Tux does not.
What would happen if we know that also Tweety is a penguin?(penguin(tweety).)
Tweety does not �y.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 29
The Tweety Example Revisited
Birds �ies unless they are �abnormal�(flies(X) :- bird(X), \+ abnormalbird(X).)\+ means negation as failure, equivalent to:not(P) :- call(P), !, fail. if P, then not(P) failsnot(P). else not(P) holds
We know that penguin are �abnormal� birds(abnormalbird(X) :- penguin(X). andbird(X) :- penguin(X).)
Tweety is a bird (we do not know if normal or abnormal). . . (bird(tweety).)
Tux is a penguin. . . (penguin(tux).)
. . . Tweety �ies, Tux does not.
What would happen if we know that also Tweety is a penguin?(penguin(tweety).)
Tweety does not �y.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 29
The Tweety Example Revisited
Birds �ies unless they are �abnormal�(flies(X) :- bird(X), \+ abnormalbird(X).)\+ means negation as failure, equivalent to:not(P) :- call(P), !, fail. if P, then not(P) failsnot(P). else not(P) holds
We know that penguin are �abnormal� birds(abnormalbird(X) :- penguin(X). andbird(X) :- penguin(X).)
Tweety is a bird (we do not know if normal or abnormal). . . (bird(tweety).)
Tux is a penguin. . . (penguin(tux).)
. . . Tweety �ies, Tux does not.
What would happen if we know that also Tweety is a penguin?(penguin(tweety).)
Tweety does not �y.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 29
A Logic for Default Reasoning (sketched)[Reiter, 1980]
A default theory is a pair (D,W ) where W is a set of sentences in�rst order logic, and D is a set of defaults.
A default is an expression:
A : B1, . . . , Bn
C
Recalling Tweety example:
Bird(x) : MFly(x)
Fly(x)MFly ' �it is consistent to assume that �ies�
∀x, Penguin(x)→ ¬Fly(x)
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 30
Answer Set Programming
Answer Set Programming is a recent problem solving approach;
It has roots in KR, logic programming, and nonmonotonicreasoning;
The idea: stop trying to prove something, represent solutions, ormodels (Answer Sets)!
Normal logic program P is a �nite set of rules of the form:
a← b1, . . . , bm, not c1, . . . , not cn
where a, bi, cj are literals of the form p or ¬p (strong negation,also written as �-�) where p is a �rst-order atom from a classicalFOL signature.
An answer set is a set of ground atoms that are �collectivelyacceptable�
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 31
Answer Set Programming: the Tweety Example
f l i e s (X) :− bi rd (X) , not abnormal (X) .abnormal (X) :− penguin (X) .b i rd (X) :− penguin (X) .b i rd ( tweety ) .penguin ( tux ) .
Resulting Answer Sets:
{penguin ( tux ) , f l i e s ( tweety ) , b i rd ( tweety ) ,b i rd ( tux ) , abnormal ( tux )}
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 32
Answer Set Programming: the Nixon Diamond
Usually, Quakers are paci�st
Usually, Republicans are not paci�st
Richard Nixon is both a Quaker and a Republican
quaker ( nixon ) .r epub l i can ( nixon ) .p a c i f i s t (X) :− quaker (X) , not −p a c i f i s t (X) .−p a c i f i s t (X) :− r epub l i can (X) , not p a c i f i s t (X) .
Resulting Answer Sets:
{ quaker ( nixon ) , r epub l i can ( nixon ) , p a c i f i s t ( nixon )}{quaker ( nixon ) , r epub l i can ( nixon ) , −p a c i f i s t ( nixon )}
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 33
Argumentation: an Informal Example (Courtesyof Prof. Massimiliano Giacomin)
The reason
The conclusion
We are justified in believing that we should run LHC
We should run Large Hadron Collider
LHC allows us to understand the Laws
of the Universe
Understandingthe Laws of the Universe is good
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 34
Argumentation: an Informal Example (Courtesyof Prof. Massimiliano Giacomin)
The reason
The conclusion
We are justified in believing that we should run LHC
We should run Large Hadron Collider
LHC allows us to understand the Laws
of the Universe
Understandingthe Laws of the Universe is good
In Argumentation (and in real life as well):
- reasons are not necessary “conclusive”
(they don’t logically entail conclusions)
- arguments and conclusions can be “retracted”
in front of new information, i.e. counterarguments
BUT
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 34
Argumentation: an Informal Example (Courtesyof Prof. Massimiliano Giacomin)
We should run Large Hadron Collider
LHC allows us to understand the Laws
of the Universe
Understandingthe Laws of the Universe is good
We should not run LHC
LHC will generate black holes
destroying Earth
Destroying Earth is bad
Now we are justified in believing that we should not run LHC
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 34
Argumentation: an Informal Example (Courtesyof Prof. Massimiliano Giacomin)
We should run Large Hadron Collider
LHC allows us to understand the Laws
of the Universe
Understandingthe Laws of the Universe is good
We should not run LHC
LHC will generate black holes
destroying Earth
Destroying Earth is bad
Black holes will not destroy Earth
Black holes will evaporate because
of Hawking radiation
Now we are again justified in believing that we should run LHC
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 34
Argumentation: an Informal Example (Courtesyof Prof. Massimiliano Giacomin)
We should run Large Hadron Collider
LHC allows us to understand the Laws
of the Universe
Understandingthe Laws of the Universe is good
We should not run LHC
LHC will generate black holes
destroying Earth
Destroying Earth is bad
Black holes will not destroy Earth
Black holes will evaporate because
of Hawking radiation
Hawking radiationdoes not exist
Dr Azzeccagarbuglisays so
Now we are again justified in believing that we should not run LHC
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 34
Argumentation: an Informal Example (Courtesyof Prof. Massimiliano Giacomin)
We should run Large Hadron Collider
LHC allows us to understand the Laws
of the Universe
Understandingthe Laws of the Universe is good
We should not run LHC
LHC will generate black holes
destroying Earth
Destroying Earth is bad
Black holes will not destroy Earth
Black holes will evaporate because
of Hawking radiation
Hawking radiationdoes not exist
Dr Azzeccagarbuglisays so
Dr Azzeccagarbugliis not expert in physics
He is a lawyer
Now we are again justified in believing that we should
run LHC
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 34
What is Argumentation?
[Prakken, 2011] Argumentation is the process of supportingclaims with grounds and defending them against attack.
[van Eemeren et al., 1996] Argumentation is a verbal and socialactivity of reason aimed at increasing (or decreasing) theacceptability of a controversial standpoint for the listener orreader, by putting forward a constellation of propositionsintended to justify (or refute) the standpoint before a rationaljudge.
A framework for practical and uncertain reasoning able to copewith partial and inconsistent knowledge.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 35
The Elements of an Argumentation System[Prakken and Vreeswijk, 2001]
1 The de�nition of an argument (possibly including an underlyinglogical language + a notion of logical consequence)
2 The notion of attack and defeat (successful attack) betweenarguments;
3 An argumentation semantics selecting acceptable (justi�ed)arguments
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 36
Arguments and Attacks: Assumption-BasedArgumentation [Bondarenko et al., 1993]
An Assumption-Based Argumentation (ABA) system is a tuple〈L,R,A, ·〉 s.t.
L is a set of sentences;R is a set of rules of the form s1 ← s2, . . . sn where each si is asentence;A ⊆ L is a set of candidate assumptions, and each assumptioncannot be the head of any rule;a is the contrary of assumption a;
An argument is a deduction supported by a set of assumptions;
An argument A attacks another argument A′ if the conclusion ofA is the contrary of one of the assumptions supporting A′.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 37
Arguments and Attacks: ABA Example (from[Gaertner and Toni, 2008])
Assumptions: {all_likes(adrian),mom_hates(adrian)}Rules:{acceptable(adrian)←all_like(adrian), easy_to_remember(adrian)easy_to_remember(adrian)← short(adrian)some_dislike(adrian)← mom_hates(adrian)some_dislike(adrian)← dad_hates(adrian)dad_hates(adrian)← too_common(adrian)dad_hates(adrian)← uncle_has(adrian)mom_not_hate(adrian)← mom_said_ok(adrian)mom_said_ok(adrian)short(adrian)}Contraries: all_like(adrian) = some_dislike(adrian),mom_hates(adrian) = mom_not_hate(adrian).
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 38
Arguments and Attacks: Argument Schemes[Walton, 1996]
An argument scheme is a reasoning pattern giving us thepresumption in favour of its conclusion.
A critical question is a question that can be posed by an opponentin order to undermine the validity of the stated argument.
There are several argument schemes in literature.
Expert testimony
Premise 1: E is expert on DPremise 2: E says PPremise 3: P is in DConclusion: P is the case
Critical questions:
1 Is E biased?
2 Is P consistent with what other experts say?
3 Is P consistent with known evidence?c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 39
Argumentation Semantics: AbstractArgumentation [Dung, 1995]
1 The de�nition of an argument (possibly including an underlyinglogical language + a notion of logical consequence)
2 The notion of attack and defeat (successful attack) betweenarguments;
3 An argumentation semantics selecting acceptable (justi�ed)arguments
Abstract argumentation focuses on the third aspect.
An abstract argumentation framework AF is a tuple 〈A,R〉, where Ais a set of argument (whose origin and structure is not speci�ed), andR ⊆ A×A is a set of attack (or defeat) relations.
Argument evaluation: given an argumentation framework, determinethe justi�cation state (defeat status) of arguments. In particular, whatargument emerge undefeated from the con�ict, i.e. are acceptable?
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 40
Nixon Diamond
AFN = 〈AN , RN 〉, where AN = {A1, A2}, RN = {〈A1, A2〉, 〈A2, A1〉},and
A1: since Nixon is a quaker, then he is also a paci�st;
A2: since Nixon is a republican, he is not a paci�st.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 41
Argumentation Semantics (Courtesy of Prof.Massimiliano Giacomin)
• Specification of a method for argument evaluation, or of
criteria to determine, given a set of arguments, their “defeat status”
Argumentation Framework
Semantics
Defeat status
Defeat status
Undefeated
Defeated
Provisionally Defeated
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 42
Extension-based Semantics (Courtesy of Prof.Massimiliano Giacomin)
Set of extensions ℰS(AF) Argumentation framework AF
Semantics S
Defeat/Justification Status
Skeptically justi�ed argument: belongs to all the extensions;Credulously justi�ed argument: belongs to at least one;Indefensible argument: does not belong to any extension.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 43
Complete Semantics (Courtesy of Prof.Massimiliano Giacomin)
Acceptability
α acceptable w.r.t. (“defended by”) S
• all attackers of α are attacked by S
Admissible set S
• conflict-free
• every element acceptable w.r.t. S
(defends all of its elements)
α
S
IF
also includes allacceptable elementsw.r.t. itself
Completeextension
Complete semantics
All traditional semanticsselect complete extensions
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 44
Complete Semantics Examples (Courtesy of Prof.Massimiliano Giacomin)
α β γ
ChainAdmissible sets:
ø, {α}, {α, γ}
Only one complete extension:
ℰCO(AF) = {{α, γ}}
Nixon Diamond
βα
βα
βα
βα
All admissible sets
are complete
ℰCO(AF) =
{ ø, {α}, {β} }
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 45
Complete Semantics Examples (Courtesy of Prof.Massimiliano Giacomin)
Nixon Diamond + node
βα
βα
βα
Admissible sets:
ø, {α}, {β}, {α, γ}
ℰCO(AF) = {
ø
{α, γ},
{β} }
βα γ
ℰCO(AF)
γ
γ
γ
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 45
Grounded Semantics (Courtesy of Prof.Massimiliano Giacomin)
Undefeated
Defeated
Provisionally Defeated
Grounded extension GE(AF):
Least complete extension
Defeat status
included in all extensions
of any traditional semantics
Grounded semantics is
the “most skeptical” one
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 46
Grounded Semantics Examples (Courtesy of Prof.Massimiliano Giacomin)
α β γ
Chain
GE(AF) = {α, γ}
Nixon Diamond
βα GE(AF) = ø
Nixon Diamond + node
βα γ GE(AF) = ø
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 47
Grounded Semantics Problem (Courtesy of Prof.Massimiliano Giacomin)
β
α
γ δ
β
α
γ δ VS
What we (may) wantGrounded Semantics
• Actually, grounded semantics is polynomially computable
• But sometimes a more discriminative behavior is desirable
THE CASE OF FLOATING ARGUMENTS
• A problem for all possible unique status approaches
Let us consider multiple status approaches!
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 48
Preferred Semantics (Courtesy of Prof.Massimiliano Giacomin)
Preferred semantics
Preferred extension
Maximal complete extension = max Set:
• is conflict-free
• defends all of its elements
[P.M. Dung, ’95]
Stable extensions are maximal complete extensions
• conflict-free: by definition• admissible: every argument attacking an extension is outside
⇒ attacked by the extension itself• maximal: no argument can be included!
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 49
Preferred Semantics Examples (Courtesy of Prof.Massimiliano Giacomin)
β
α
γ δ
β
α
γ δ
β
α
γ δ
β
α
γ δ
β
α
γ δ
Grounded semantics:
ℰPR(AF) = ℰST(AF) = { {α, δ}, {β, δ} } ⇒ δ is justified
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 50
KRR in Classical LogicKRR in Description Logics
KRR in Non-Monotonic Logics
Conclusions
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 51
Conclusions
Knowledge: some information about the world;
Representation: how to represent this information:
Classical Logic;Description Logics;Nonmonotonic Logics;
Reasoning: how to extract more information from what isexplicitly represented:
logic inference;representing solutions (or models).
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 52
What is Not Covered in This Presentation(among the others)
SAT Solver;
CSP;
Conceptual Graphs;
Autoepistemic Reasoning;
Belief revision;
Modal logic;
Deontic logic;
Temporal reasonnig;
Spatial reasoning;
Physical reasoning;
Event calculus;
Temporal action logic;
Multi-agent systems;
Bayesian Networks;
Neural Networks;
Markovian Chains;
. . .
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 53
Suggested Readings
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 54
Suggested Readings
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 54
Suggested Readings
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 54
Suggested Readings
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 54
Suggested Readings
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 54
Suggested Readings
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 54
Suggested Readings
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 54
References I
[Alechina, 2011] Alechina, N. (2011).Knowledge representation and reasoning 2011-2012: G53KRR course slides.http://www.cs.nott.ac.uk/~nza/G53KRR/.
[Berners-Lee and Fischetti, 2000] Berners-Lee, T. and Fischetti, M. (2000).Weaving the Web.HarperBusiness.
[Bondarenko et al., 1993] Bondarenko, A., Toni, F., and Kowalski, R. (1993).An assumption-based framework for non-monotonic reasoning.In Nerode, A. and Pereira, L., editors, Proceedings Second International Workshop on Logic
Programming and Non-Monotonic Reasoning. MIT Press.
[Brachman and Levesque, 2004a] Brachman, R. and Levesque, H. (2004a).Knowledge Representation and Reasoning.Elsevier.
[Brachman and Levesque, 2004b] Brachman, R. and Levesque, H. (2004b).Knowledge representation and reasoning: Overhead slides.http://www.cs.toronto.edu/~hector/PublicKRSlides.pdf.
[Dung, 1995] Dung, P. M. (1995).On the acceptability of arguments and its fundamental role in nonmonotonic reasoning, logicprogramming, and n-person games.Arti�cial Intelligence, 77(2):321�357.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 55
References II
[Gaertner and Toni, 2008] Gaertner, D. and Toni, F. (2008).Hybrid argumentation and its properties.In Proceedings of COMMA 2008.
[Herman, 2011] Herman, I. (2011).Introduction to the semantic web.http://www.w3.org/2011/Talks/0606-SemTech-Tut-IH/Talk.pdf.
[Horrocks and Sattler, 2002] Horrocks, I. and Sattler, U. (2002).Description logics - basics, applications, and more (tutorial at ecai-2002).http://www.cs.man.ac.uk/~horrocks/Slides/ecai-handout.pdf.
[McCune, 2010] McCune, W. (2005�2010).Prover9 and mace4.http://www.cs.unm.edu/~mccune/prover9/.
[Prakken, 2011] Prakken, H. (2011).An overview of formal models of argumentation and their application in philosophy.Studies in Logic, 4:65�86.
[Prakken and Vreeswijk, 2001] Prakken, H. and Vreeswijk, G. A. W. (2001).Logics for defeasible argumentation.In Gabbay, D. M. and Guenthner, F., editors, Handbook of Philosophical Logic, Second Edition.Kluwer Academic Publishers, Dordrecht.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 56
References III
[Reiter, 1980] Reiter, R. (1980).A logic for default reasoning.Arti�cial Intelligence, 13(1-2):81 � 132.
[van Eemeren et al., 1996] van Eemeren, F. H., Grootendorst, R., Johnson, R. H., Plantin, C., Walton,D. N., Willard, C. A., Woods, J., and Zarefsky, D. (1996).Fundamentals of Argumentation Theory. A Handbook of Historical Backgrounds and
Contemporary Developments.Lawrence Erlbaum Associates.
[van Harmelen et al., 2007] van Harmelen, F., van Harmelen, F., Lifschitz, V., and Porter, B. (2007).Handbook of Knowledge Representation.Elsevier Science, San Diego, USA.
[W3C, 2012] W3C (2012).Rdf tutorial.http://www.w3schools.com/rdf/default.asp.
[Walton, 1996] Walton, D. N. (1996).Argumentation Schemes for Presumptive Reasoning.Lawrence Erlbaum Associates.
c© 2012 Federico Cerutti <[email protected]> GSIA :: Friday 1st June, 2012 57