L02 - Knowledge-Rep - Part 1
L02 - Knowledge-Rep - Part 1
Representation
1
Outline
• Part 1 (in this slide)
– Knowledge & Knowledge Representation
– Object-Attribute-Value
– Semantic Network
– Frame
• Part 2
– Propositional Logic
– First Order Predicate logic
2
Knowledge
• KNOWLEDGE is a familiarity with
someone or something, which can
include information, facts, description,
and/or skills acquired through
experience or education.
State of
Familiarity Understanding Body of facts
knowing
3
3
Hierarchy (data to knowledge)
(Activities)
Decision making
Knowledge
Synthesizing
Analysing
Information
Summarizing
Organizing
Data
Collecting
4
4
Types of Knowledge
Knowledge about Facts/statements describing
knowledge object, people, place,
event etc. Describes
Meta- Declarative ‘knowing that’
knowledge
Experience-based,
mental short cut Heuristic Procedural Describes how
to ease cognitive learners use/apply their
load declarative knowledge.
Describes
Structural ‘knowing how’
Understanding of domain /
discipline. Describes ‘knowing why’
5
5
Example of Declarative Knowledge
She is beautiful.
6
6
Procedural Knowledge
E.g., “to make half-cooked egg, first boil some
water ….”
8
8
Source of Knowledge
Non-
Documented
documented
Tacit Explicit
9
9
Knowledge Representation?
• A science of translating actual knowledge
into a format that can be used by the
computer
• The study of ;
o How knowledge and facts about the world can be
represented &
o Example of representations: Semantic networks
& Logical representations
o What kinds of reasoning can be done with that
knowledge
10
10
Knowledge Representation
REAL
WORLD
Translate into internal
representation
Inference:
deduction, INTERNAL
search, planning, REPRESENTATION
learning, Translate back into
explanation terms
REAL understandable
WORLD
by humans
11
11
Approaches to KR
• Relational knowledge
– storing facts and its relation (e.g. a relational database)
• Inheritable knowledge
– represented in hierarchy of classes, has object, attribute
and value, apply inheritance (e.g. hierarchy of animals)
• Inferential Knowledge
– In the form of logics, used to derive facts and resolutions
• Procedural knowledge
– Focus on how to do, apply rules, heuristics, e.g. (how to
prepare food, how to diagnose car problem, etc.)
12
Requirements for KR
• Representational Accuracy - KR system should have the
ability to represent all kind of required knowledge.
• Inferential Adequacy - KR system should have ability to
manipulate the representational structures to produce new
knowledge corresponding to existing structure.
• Inferential Efficiency - The ability to direct the inferential
knowledge mechanism into the most productive directions by
storing appropriate guides.
• Acquisitional efficiency - The ability to acquire the new
knowledge easily using automatic methods.
13
Knowledge Representation
• Main approaches:
– Object-Attribute-Value
– Semantic Network
– Frame
– Logic
14
KR methods in focus
Object- • Associative network: Object-
Attribute-Value, Semantic
based Network
• Physical,
Object
abstract
OAV
• Numerical,
Property string, Boolean
values • Single, multi-
value
17
Knowledge Representation: OAV
• Most objects will have many attributes.
Nike White
Brand Color
Shirt
Size
Made of
Cotton L (Large)
18
OAV
19
19
OAV
Blue
color Round
shape
Cute
appearance
appearance
Funny
hobby
20
20
KR: Associative/Semantic Network
Blue
Not
real
Round
Cartoon
Cute
Kids
isa
Funny
Sings
… … … 2
21
21
OAV Exercise
22
22
Advantage of OAV
• Simple and easy to understand
• Flexible – represent various types of
knowledge
• Compact – represent large amount of
knowledge
• Compatible with relational databases
23
Disadvantages of OAV
• Limited expressiveness – unable to
represent complex relationship
• Limited inference power – limited to
answer characteristics/attribute of an
object only
24
Semantic Network
• Alternative to OAV for complex
associative network of object and its
attribute values.
• Categorize objects of different types and
link them with relationship, e.g.,:
– IS-A (inheritance)
25
KR: Semantic Network
Method of knowledge
representation that uses graph
made up of nodes and arcs
• Nodes - objects / properties
• Arcs – relationship between objects
26
26
Parrot is a bird. Typically, bird has wings and
travel by flying. Bird category falls under animal
kingdom. All animal requires air to breathe.
Ostrich is a bird but travels by walking.
Wings
is-a is-a
Parrot Bird Animal breathe Air
Fly
Ostrich
Walk
NOTE: This is an exceptional handling
value. It overwrites the property ‘flying’ of birds (as ostrich doesn’t fly). 27
27
… …
fly
…
… Clown
…
Plants
Birds
Fish …
motile
multi
cellular
Living breathe
Animal
… things
Reptiles
Amphibians
…
Mammals … Bacteria
…
… …
…
28
28
Inheritance !!
Important concept in semantic
network
29
29
Semantic Network
Specific
Short sharp
attribute tail claw
liketo
“comel” is a cat
scratch
33
33
Exercise 2
James is a seagull. Like all birds, seagulls have
two wings and can fly. They love to eat fish.
James has a friend named Sean, a penguin.
Even though penguins are also birds, they
cannot fly. Instead, they walk. Penguins can
only survive at places with cold temperature.
Just like seagulls, their major source of food is
fish which they caught in the icy cold water
where they live.
34
34
Advantage of Semantic Network
• Natural representation of knowledge
• Extendable to accommodate more
relationship
• Meaning of the structure is easy to
understand
35
Disadvantage
• Computational expensive – if the
network gets large, then traversing the
tree/representation takes time.
• Do not have standard definition of the
relationship (link) names
36
Knowledge Representation: Rules
• A knowledge structure that relates some
known information to other information
and that can be concluded or inferred to
be known.
• Type of: Procedural knowledge
• Structure: IF <antecedent> THEN
<consequent>
37
Rules - Structure
Premise / Antecedents / Condition
• IF CGPA is “high” THEN ….
• IF engine_sound is “strange” OR car_body is
“fair” THEN ….
Action / Consequence
• ….. THEN approve admission
• ….. THEN check the engine part
38
38
Knowledge Representation: Rules
• A knowledge structure that relates some
known information to other information
and that can be concluded or inferred to
be known.
• Type of: Procedural knowledge
• Structure: IF <condition> THEN <action>
• Used by Rule-based Systems & Expert
Systems
39
Structure of Rule-Based Systems
• Rules-Based Systems has
– Set of production rules
– Working memory
• Set of production rules
– describe the knowledge about a problem domain
– Rules will be used to set of facts or data to derive
new information (inference)
• Working memory - a list of known facts/data
and new derived information that are true
40
Example of production rules
• Example:
IF the temperature is high
THEN turn on the air conditioner
• In the rule:
– “temperature is high” is the condition
– “tun on the air conditioner” is the action
41
Rules - Examples
Rule 2:
IF patient temperature is > 37°C (P2)
THEN patient has a fever (SG1)
Rule 3:
IF patient has been sick > a month (P3)
AND patient has a fever (SG1)
THEN suspect bacterial infection (SG2)
43
Advantages of Rules
• Clarity: expressed in natural language
and easy to understand
• Flexible: Highly modular, thus the rules
can be easily modified, removed or
adding new rules
• Efficient: Decision can be quick, which
only the specific rules will be evaluated
44
Disadvantages of Rules
• Difficulty in getting the rules: may be difficult
to acquire and formalize the knowledge from
experts into rules.
• Difficult to maintain rules: number of rules
can grow and may lead to inconsistency.
• Limited scope: only for specific domain
knowledge and not suitable for complex
reasoning
45
Summary
• Knowledge - information or data that can be used to
solve a problem or produce a decision
• Knowledge representation - process of representing
a knowledge in a form that can be used by a
computer program to reason, learn, or make
decisions.
• Each technique has its own advantage and
disadvantage
• Choice of technique depends on the problem and
the type of knowledge that needs to be represented.
46
References
• Alison Cawsey, Essence of Artificial
Intelligence.
47