0% found this document useful (0 votes)
26 views61 pages

Knowledge Representation Scheme

Uploaded by

Jovan Jacob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views61 pages

Knowledge Representation Scheme

Uploaded by

Jovan Jacob
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 61

1

Knowledge Representation
Problem: represent human knowledge into
computationally acceptable language

Desired Features
 Exhaustiveness  All needed information is in KB.
 Modifiability  new information can be added without sacrificing
consistency.
 Homomorphic mapping of objects  information organized in a
natural and intuitive fashion
 Computational Efficiency

2
Knowledge Representation
Slot and filler structures are a way of representing information
in knowledge representation systems, which are used in artificial
intelligence and cognitive science to store and process
information in a structured format.
 In a slot and filler structure, information is organized into
pairs of slots and fillers, where each slot corresponds to a
specific attribute or property, and the filler is the value
associated with that attribute or property.
This structure is particularly useful for representing structured
information about entities or objects.

3
Knowledge Representation
Slot: A slot represents a specific attribute or property of an
object or entity. It defines the type of information that is being
stored or represented. Slots can have names such as "color,"
"size," "weight," "name," "age," etc. These names indicate what
aspect of the object's description or properties is being captured.
Filler: The filler is the actual value or information associated
with a particular slot. It provides the specific data or content
related to the attribute represented by the slot. Fillers can be
values like text, numbers, dates, or references to other objects in
the knowledge representation system. For example, if we have a
slot "color," the filler might be "red."

4
Knowledge Representation
Here's a simple example to illustrate slot and filler structures:
Object: Car

Slot 1: Make
Filler: Toyota
Slot 2: Model
Filler: Camry
Slot 3: Year
Filler: 2022
Slot 4: Color
Filler: Blue
5
Knowledge Representation
Strong Slot and Filler Structures:
In strong slot and filler structures, there are strict constraints and
expectations regarding the types of fillers that can be associated
with each slot.
The types of fillers are predetermined and enforced rigorously.
This means that a slot can only be filled with a specific type of
value or object.
Strong slot and filler structures are often used in formal knowledge
representation systems, such as ontologies and databases, where
data integrity and consistency are crucial.
These structures ensure that the data is well-defined and adhere to
a strict schema or ontology.
6
Knowledge Representation
Strong Slot and Filler Structures:
Example of strong slot and filler structure:

Slot: Age
Filler: Numeric value (e.g., 35)
Slot: Name
Filler: Textual value (e.g., "John Smith")
Slot: Date of Birth
Filler: Date format (e.g., "1990-05-15")

7
Knowledge Representation
Weak Slot and Filler Structures:
In weak slot and filler structures, there are fewer constraints on
the types of fillers associated with slots.
The system allows for more flexibility, allowing a wider range of
data types or values to be associated with slots.
Weak slot and filler structures are often used in more flexible and
dynamic knowledge representation systems, such as natural
language processing applications or systems that need to handle
heterogeneous data sources.
These structures are less strict and adaptable to a broader variety
of data.

8
Knowledge Representation
Example of weak slot and filler structure:

Slot: Description
Filler: Textual value (e.g., "The car is blue and seats five
people.")
Slot: Price
Filler: Numeric value (e.g., 25000)
Slot: Owner
Filler: Reference to a person object (e.g., "John Smith")

9
Semantic Networks
Define objects in terms of their association with other objects
 e.g. snow, white, snowman, ice, slippery.
The nodes correspond to facts or concepts, and the arcs to
relations or associations between concepts.
Both nodes and links are generally labeled.
Represent knowledge as a graph: Concepts

Relations

Concepts at lower levels inherit characteristics from their


parent concepts.
10
Semantic Networks Example

•This network can be


used to answer a range
of questions about snow,
ice, and snowman.

•These inferences are


made by following the
links to related concepts.

•Semantic networks also


implement inheritance;
•for example, frosty
inherits all the
properties of
snowman.

Fig 7.2 Network representation of properties of snow and ice 11


Semantic Networks
Well designed semantic networks are a form of logic.

female
Persons

memberOf

mary

memberOf(femalePersons, mary)

12
Semantic Networks
Example
mammals

subsetOf
legs
Persons 2
subsetOf
subsetOf
female male
Persons Persons

memberOf memberOf
sisterOf legs
mary john 1

13
Semantic Networks
Inference Mechanism
Inheritance
e.g. Persons by default have 2 legs. How many legs does
Mary have? John?
Use of Inverse Links
e.g. hasSister(p, s) and sisterOf(s, p)

hasSister

inverseOf

sisterOf

14
Semantic Networks
Example
mammals

subsetOf
legs
hasMother Persons 2
subsetOf
subsetOf
female male
Persons Persons

memberOf memberOf
sisterOf legs
mary john 1
hasSister
15
Examples of Semantic Net (2)
 My car is tan and John’s car is green

I
owner
color
car1 tan
is-a

car
is-a color
car2 green
owner

john
Inference in a Semantic Net (1)
Inheritance
the is-a and instance-of representation provide a
mechanism to implement this.
Inheritance also provides a means of dealing with
default reasoning

IS-A IS-A IS-A


A B C A C

IS-A can can


clyde bird bird fly clyde fly
18
Semantic Networks Advantages
Simple and transparent inference processes.

Ability to assign default values for categories.

Ability to include procedural attachment.

19
Semantic Networks - Disadvantages
Simple query language may be too limiting to express
complex queries.

Does not represent full FOL since it does not provide


means to use negation, disjunction, and existential
quantification.

n-ary functions must be mapped onto binary functions.

20
Standardization of Network Relationships

Simmons addressed the need for standard relationships by


focusing on the case structure of English verbs.

In this verb-oriented approach, links define the roles


played by nouns and noun phrases in the action of the
sentence.

Case relationships include agent, object, instrument,


location, and time.

21
A sentence is represented as a verb node, with various case
links to nodes representing other participants in the
action.
This structure is called a case frame.

 In parsing a sentence, the program finds the verb and


retrieves the case frame for that verb from its knowledge
base.
It then binds the values of the agent, object, etc., to the
appropriate nodes in the case frame.

Example:
Sarah fixed the chair with glue

22
Fig 7.5 Case frame representation of the sentence “Sarah fixed the chair with
glue.”

•These built-in relationships indicate that Sarah is the person doing the fixing
and that glue is used to put the chair together.
•These linguistic relationships are stored in a fashion that is independent of the
actual sentence or even the language in which the sentence was
expressed.
Conceptual Dependency (CD) theory

● CD theory was developed by Schank in 1973 to represent


the meaning of NL sentences.
− It helps in drawing inferences
− It is independent of the language

● CD representation of a sentence is not built using words


in the sentence rather built using conceptual primitives
which give the intended meanings of words.

● CD provides structures and specific set of primitives


from which representation can be built.
Conceptual category

● There are four primitive conceptual categories

− ACT Actions {one of the CD primitives}


− PP Objects {Picture Producers}
− AA Modifiers of actions {Action Aiders}
− PA Modifiers of PP’s {Picture Aiders}
Conceptual Dependency (CD) theory

ACT (Actions):
Think of this as things people or things do. For example, running, jumping, eating -
these are all actions.

PP (Objects - Picture Producers):


These are the things you can picture or imagine in your mind. Examples include a
cat, a tree, a house - they are objects you can visualize.

AA (Modifiers of actions - Action Aiders):


These are words or concepts that describe how actions are done. For instance,
"quickly" describes how fast an action is performed.

PA (Modifiers of PP's - Picture Aiders):


These are words or ideas that provide more details about the objects you can picture.
For example, "green" describes the color of an object.
Primitive ACTs of CD theory
● ATRANS Transfer of an abstract relationship (i.e. give)
● PTRANS Transfer of the physical location of an object (e.g., go)
● PROPEL Application of physical force to an object (e.g. push)
● MOVE Movement of a body part by its owner (e.g. kick)

● GRASP Grasping of an object by an action (e.g. throw)

● INGESTIngesting of an object by an animal (e.g. eat)

● EXPEL Expulsion of something from the body of an animal (e.g. cry)

● MTRANS Transfer of mental information (e.g. tell)


● MBUILD Building new information out of old (e.g decide)
● SPEAK Producing of sounds (e.g. say)

● ATTEND Focusing of a sense organ toward a stimulus (e.g. listen)


Conceptual Dependency theory:
Primitives of meaning
1. Actions
2. Objects
3. Modifiers of actions
4. Modifiers of objects

Conceptual syntax rules


 Built using these primitives
 Constitute a grammar of meaningful semantic
relationships.

Conceptual dependency relationships


 Are defined using the conceptual syntax rules
 Can be used to construct an internal representation of an
english sentence.
•The first conceptual
dependency
describes the
relationship between
a subject and its verb

•The third describes


the verb-object
relation.

Fig : Basic Conceptual dependencies 29


Few conventions
● Arrows indicate directions of dependency
● Double arrow indicates two way link between
actor and action.
O – for the object case relation
R – for the recipient case relation
P – for past tense
D – destination
 Tense and mode are added.
 Example: past, future, transition etc.
 Schank supplies a list of attachments or modifiers to
the relationships.
 A partial list of these includes:

31
Semantic Networks
Conceptual Dependency Example

Example:
“John throws the ball”
O
John Ball
*PROPEL*

“John threw the ball”

P O
John Ball
*PROPEL*

32
Fig 7.8 Some bacis conceptual dependencies and their use in representing more
complex English sentences, adapted from Schank and Colby (1973).

•The symbols have the following meanings:


Conceptual dependency representing “John ate the egg”

Conceptual dependency representation of the sentence “John prevented Mary from


giving a book to Bill”

34
Example
● I gave a book to the man. CD representation is as follows:

P O R man (to)
I  ATRANS  book
I (from)

● It should be noted that this representation is same for


different saying with same meaning. For example
− I gave the man a book,
− The man got book from me,
− The book was given to man by me etc.
Rule 1:PP  ACT
● It describes the relationship between an actor and
the event he or she causes.
− This is a two-way dependency, since neither actor nor
event can be considered primary.
− The letter P in the dependency link indicates past
tense.
● Example: John ran
P
CD Rep: John  PTRANS
Rule 2: ACT  PP
● It describes the relationship between a ACT and a
PP (object) of ACT.
− The direction of the arrow is toward the ACT since
the context of the specific ACT determines the
meaning of the object relation.

● Example: John pushed the bike


O
CD Rep: John  PROPEL  bike
Rule 3:PP  PP
● It describes the relationship between two PP’s, one
of which belongs to the set defined by the other.

● Example: John is doctor

CD Rep: John  doctor


Rule 4:PP  PP
● It describes the relationship between two PP’s, one of
which provides a particular kind of information about
the other.
− The three most common types of information to be
provided in this way are possession ( shown as POSS-BY),
location (shown as LOC), and physical containment
(shown as CONT).
− The direction of the arrow is again toward the concept
being described.

● Example: John’s dog


poss-by
CD Rep dog  John
Rule 5:PP  PA
● It describes the relationship between a PP and a PA
that is asserted to describe it.
− PA represents states of PP such as height, health etc.

● Example: John is fat

CD Rep John  weight (> 80)


Rule 6:PP  PA
● It describes the relationship between a PP and an
attribute that already has been predicated of it.
− Direction is towards PP being described.

● Example: Smart John

CD Rep John  smart


R PP (to)
Rule 7: ACT 
 PP (from)
● It describes the relationship between an ACT and
the source and the recipient of the ACT

● Example: John took the book from Mary

R  John
CD Rep: John  ATRANS 
O Mary
book
 PA
Rule 8: PP
 PA
● It describes the relationship that describes the
change in state.

● Example: Tree grows

 size > C
CD Rep: Tree 
 size = C
 {x}
Rule 9:
 {y}
● It describes the relationship between one
conceptualization and another that causes it.
− Here {x} causes {y} i.e., if x then y

● Example: Bill shot Bob


{x} : Bill shot Bob

{y} : Bob’s health is poor


 {x}
Rule 10: 
 {y}
● It describes the relationship between one
conceptualization with another that is happening at
the time of the first.
− Here {y} is happening while {x} is in progress.

● Example: While going home I saw a snake


I am going home

I saw a snake
Conceptual Dependency theory
Advantages
 Provides a formal theory of natural language semantics
 Reduces problems of ambiguity.

 Representation directly captures much of the natural language

semantics
 Sentences with similar meaning will have similar

representations (canonical form).

Disadvantages:
 No program exists that can reliably reduce sentences to
canonical form.
 Primitives not sufficient to represent more subtle concepts.

46
Scripts
A script is a structured representation describing a
stereotyped sequence of events in a particular context.(i.e.
if the system isn't told some detail of what's going on, it
assumes the "default" information is true).

Scripts are used in natural language understanding


systems to organize a knowledge base in terms of the
situations that the system is to understand.
Why scripts?
1. Because real-world events do follow stereotyped
patterns. Human beings use previous experiences to
understand verbal accounts; computers can use scripts
instead.

2. Because people, when relating events, do leave large


amounts of assumed detail out of their accounts.
People don't find it easy to converse with a system that
can't fill in missing conversational detail.
Why scripts?
Scripts predict unobserved events.

Scripts can build a coherent account from disjointed


observations.

Applications
 This sort of knowledge representation has been used in intelligent
front-ends, for systems whose users are not computer specialists.
 It has been employed in story-understanding and news-report-
understanding systems.
Components of Scripts
Restaurant Example cont.

51
Restaurant Example cont.

52
Advantages / Disadvantages of Script
● Advantages
− Capable of predicting implicit events
− Single coherent interpretation may be build up from a collection of
observations.
● Disadvantage
− More specific (inflexible) and less general than frames.
− Not suitable to represent all kinds of knowledge.

● To deal with inflexibility, smaller modules called memory


organization packets (MOP) can be used.

● MOPs represent knowledge as smaller components along


with rules for dynamically combining them to form a
schema that is appropriate to the current situation.
Frames
Another representational scheme, in many ways similar to
scripts, used to capture the implicit connections of
information in a problem domain, was called frames.

Frames support the organization of knowledge into more


complex units reflecting the organization of objects in the
domain.

Can be viewed as a static data structure with values


attached.

54
Frames Example
Fig: Part of a
frame
description of a
hotel room.

“Specialization”
indicates a
pointer to a
superclass.
Each individual frame may be seen as a data structure,
similar to the traditional "record", that contains
information relevant to stereotyped entities.

The slots in the frame contain information such as:


1. Frame identification information.
2. Relationship of this frame to other frames.
3. Descriptors of requirements for a frame.
4. Procedural information on use of the structure
described – attaches procedural code to a slot
5. Frame default information – slot values taken as true when
no evidence is found. Eg:- chair has 4 legs
6. New instance information – slots may be left unspecified
until needed. Eg:- color of bedspread
56
Advantages
 Frames add power and clarity to semantic nets by allowing complex
objects to be represented as a single frame.

 Frames provide an easier framework to organize information


hierarchically than semantic nets.
 Frames allow for procedural attachment which runs a demon (piece of
code) as a result of another action in the KB (this has also been done to
some semantic nets).
 Both frames and semantic nets support class inheritance.

57
Formal Logic
• Advantages • Disadvantages
– Facts asserted – Separation of
independently of use representation and
processing
– completeness
– Inefficient with large data
sets
– Very slow with large
knowledge bases

58
Production Rules
Advantages Disadvantages
Simple syntax Hard to follow hierarchies

Easy to understand Poor at representing


structured descriptive
Simple interpreter
knowledge
Flexible (easy to add Ineffective search strategy
or modify)
Not all knowledge can be
expressed as rules

59
Semantic Networks
• Advantages • Disadvantages
– Easy to follow hierarchy • Meaning attached to
nodes might be
– Easy to trace association
ambiguous
– flexible • Exception handling is
difficult
• Difficult to program

60
Frames
• Advantages • Disadvantages
– Expressive power – Difficult to
program
– Easy to set up
– Difficult for
slots for new
inference
properties and
– Lack of
relations
inexpensive
– Easy to include software
default information

61

You might also like