Knowledge Representation
Knowledge Representation Hypothesis
Knowledge representation is an essential problem of symbolic-based artificial intelligence
• Knowledge Representation Hypothesis (Smith):Any mechanically embodied intelligent process will comprise of structural ingredients, that – will represent the propositional account of knowledge
the overall process exhibits– independently of such a formal semantics will
play formal and causal role in performing the behavior that manifests the knowledge
Knowledge Representation
• In symbolic functionalism we represent intelligence via manipulation of our beliefs about the surrounding world and knowledge we know.
• Therefore we have to address two fundamental issues– how to represent knowledge
– how to implement the process of reasoning
• State space is a space of possible courses of inference when combining – actual beliefs about current world– general knowledge – rules of inference
The Knowledge Level
• Three levels of the Knowledge-based System conceptualization:- system engineering level – physical realization of the system- symbol level – symbol system (program ) specification- knowledge level – knowledge (to be represented)
specification
• Knowledge Level Hypothesis
– There is a distinct computer level lying immediately above the program (symbol level), which is characterized by knowledge as the medium and principle of rationality as the law of behavior.
AI research × Software Engineering
Knowledge Level
Symbol LevelSystem Level
Intelligent Behaviour
Requirements Specification
Functional Specification
System Implementation
What is Knowledge?
• data – primitive verifiable facts, of any representation. Data reflects current world,often voluminous frequently changing.
• information – interpreted data• knowledge – relation among sets of data (information), that
is very often used for further information deduction. Knowledge is (unlike data) general. Knowledge contains information about behavior of abstract models of the world.
• Knowledge Classification:
– according to source: empirical, theoretical– according to orientation: domain, heuristic, inference– according to type: declarative, procedural
Knowledge Representation Schemas
• Logic based representation – first order predicate logic, Prolog
• Procedural representation – rules, production system• Network representation – semantic networks, conceptual
graphs• Structural representation – scripts, frames, objects
Mathematical Logic
• Propositional Logic – – syntactical primitives: , , , , symbols, true, false– rule of inference: de Morgan rule, modus ponens, … – semantic interpretation
rains blows-wind sun-will-shine
• First Order Predicate Logic – – enriched by variables, predicates, functions– quantifiers ,
friends(father(david),father(andrew)) Y friends(Y, petr) X likes(X,ice_cream) X Y Z parent(X,Y) parent(X,Z) siblings(Y,Z)
Mathematical Logic cont’
• inference representation – proof system• rules of inference – example: modus ponens
– if p is true and p q is true, then mp infers q to be true
X(man(X) mortal(X))man(socrates)(man(socrates) mortal(socrates))mortal(socrates)
• rules of inference can be – sound if all conclusions the rule infers logically follows– complete if it infers all conclusions that logically follows
modus ponens is sound but not complete
Mathematical Logic cont’
• inference representation – resolution theorem proving– transform the knowledge system into clausal
normal form (conjunction of disjunction of literals)– add negation of what has to be proved– keep resolve new disjuncts unless you produce an
empty set
dog(X) animal(X) dog(X) animal(X)
(dog(X) animal(X)) (animal(Y) die(Y)) (dog(fido)))(die(fido) 4
-----------------------(dog(Y) die(Y)) 1+2
(die(fido)) 1+2+3
1+2+3+4
1 2 3
Logic Based Financial Advisor
• savings(inadequate) investment(savings)• savings(adequate) income(adequate) investment(stocks)• savings(adequate) income(inadequate) investment(combined) X saved(X) Y dependents(Y) greater(X,5000*Y)
savings(adequate) X saved(X) Y dependents(Y) greater(X, 5000*Y)
savings(inadequate) X earnings(X,steady) Y dependents(Y) greater(X,
(15000+(4000*X)) income(adequate) X earnings(X,steady) Y dependents(Y) greater(X,
(15000+(4000*X)) income(inadequate) X earnings(X,unsteady) income(inadequate)
• saved(22000)• earnings(25000,steady)• dependents(3)
prolog code example
Production System
• procedural representation of knowledge• in the form of if – then rules• inference mechanism is firing the rules• subject of Expert System lecture
‘jug problem’ exampleif small=0 then
small=3
if big=0 and small=3 then
big=3 and small= 0
5l 3l
Conceptual Graphs
• network knowledge representation schema• rooted in association theory of meaning• very much used in the problem of natural language
processing
Conceptual Graph is complete bipartite oriented graph, where each node is either a concept or a relation
between two concepts, there is one or two edges
each going to concepts, and each concept may represent another conceptual graph dog browncolour
Conceptual Graphs
A monkey scratches its ear with a pawn
monkey scratchagent object ear
instrument
pawpart of
part of
Conceptual Graphs
• each concept has got its type and an instance general concept – a concept with a wildcard instance
specific concept – a concept with a concrete instance
• there exists a hierarchy of types subtype:
• concept w is specialisation of concept v iftype(v)>type(w) or instance(w)::type(v)
dog:Emma browncolour
dog:*X browncolour
animal
dog cat
Conceptual Graphs
• canonic conceptual graph is sensible representation of knowledge that can be but does not necessary need to be true
• canonic formation rules formalise rules of inference between two graph for while preserving canonicity – copy – identical cloning of a graph– restriction – substituting a concept in a graph with
its specialisation
– join – joining two graphs via shared concept– simplification – deleting identical relations
Restriction of Concepts
person eatagent object piepiepiepiepiepiepie
girl eatagent object piepiepiepiepiepiepie
person:Sue eatagent object piepiepiepiepiepiepie
girl:Sue eatagent object piepiepiepiepiepiepie
person
Joining Concepts
person eatagent object piepiepiepiepiepiepiegirl:Sue
person eatagent manner piepiepiepiepiepiefastgirl:Sue
person eat
agent object piepiepiepiepiepiepie
agentmanner fast
Simplification of Concepts
person eat
agent object piepiepiepiepiepiepie
agentmanner fast
person eatagent
object piepiepiepiepiepiepie
manner fast
Conceptual Graphs
• FOPL transformation to CG– for each node predicate– general concept variable, specific concept atom
type:instance type(instance) – relation n-ary predicat relation(in1, in2, …, inn)
with arguments conncecting neighbouring concepts– CG is existencionally quantified conjunction of these
predicates
X (dog(emma) color(emma,X) brown(X))
dog:Emma browncolour
Frames
• instance of structured representation (schemes)• static data-structure representing stereotyped
situation • predecessor of object-oriented systems
hotel bedsuperclass:beduse:sleepingsize:kingpart:mattress frame
mattresssuperclass:cushionfirmness:firm
hotel roomspecial of:roomlocation:hotelcontains: hotel chair hotel phone hotel bed hotel phone
special of:phoneuse: calling room servicebilling: through room
hotel chairspecial of:chairlegs:fouruse:sitting
• default slots• daemons – procedural
attachment (infoseek)
Scripts
• Schank’s formalisation of stereotyped sequence of events in a particular context
• knowledge base representation in terms of the situations that the system is supposed to understand
• a restaurant script