Title: STRUCTURED OBJECTS Knowledge Representation
1STRUCTURED OBJECTS -Knowledge Representation
2STRUCTURED OBJECTS -Knowledge Representation
- Two types of structured objects common in AI
- semantic networks
- frames
- These knowledge representation schemes were
developed primarily from efforts to build systems
that understand natural language.
3Semantic Networks
- Quillian conducted original work.
- Based on psychological theory.
- Popular because of the graphical nature of the
representation, people find it easy to
understand.
4Semantic Net Representation - Example 1
operation
hole
is_a
machined_by
is_a
drilling
feature
5Semantic Networks
- Use graphs (the term is used in its mathematical
sense) to describe the domain in terms of - objects
- indicated with nodes
- represents facts
- binary relationships
- indicated with lines (arcs) that link the nodes
- represents the relationships between objects
6Overview of Semantic Nets
- The term "semantic" net implies that we are
interested in the meaning of the things we are
representing. - Part of the power comes from objects connecting
with a "is-a" relationship. - Through is-a connections, a particular instance
of an object "inherits" the characteristics of
the more general object.
7Semantic Net - Example 2
is_a
Joe
Boy
is_a
goes to
Human Being
has_a_child
School
is_a
Woman
Kay
is_a
has_a_child
is_a
needs
is_married_to
Man
Car
Food
is_a
is_a
Sam
Mercedes Benz
is_a
is_a
VP
color
works_for
plays
ACME
Silver
made_in
Golf
is_a
subsidary_of
Germany
Sport
AJAX
8Example - is_a connections
- Kay is-a woman, and a woman is-a human being, and
human beings need food. - Through the network, we can infer that Kay need
foods, without an explicit arc from Kay to food. - Semantic networks allow "implicit" relationships.
9Semantic Network -Example 3
John
donor
age
blue
7
giving-1
recipient
color
object
Mary
age
book-1
6
object
selling-1
age
Jane
buyer
10Semantic Net - Example 3
- Illustrations representation of
entity-attribute-values triples. - Arcs - correspond to the attributes in the triple
- Nodes - correspond to the entities and values
- To represent general concepts
- EAV triples (in production rules), used variables
to represent general concepts. - In semantic networks, node represents the general
case and link the nodes.
11Important Differences Semantic Nets and Rules
- EAVs can use variables to represent general terms
- Thus, can represent general information with a
production rule - IF (X is-a bicycle) THEN (X no-of-wheels 2)
- Nets have neither variables or rules
- nodes represent general terms
- links express generally applicable information as
well as facts - reduced need for rules for generalizations
12Semantic Net - Example 4
Mode of transport
is_a
is_a
is_a
car
bicycle
ship
part_of
part_of
part_of
wheels
part_of
wheels
handle bars
4
engine
brakes
2
part_of
part_of
brake- cable
grips
13Semantic Network - Example 4
- Illustrates the ability to build up complicated
relationships and share information between
nodes.
14Inference in Semantic Networks
- Recall production rules
- IF (X is-a bicycle) THEN (X no-wheels 2)
- (giving-1 donor John)
- (giving-1 recipient Mary)
- (giving-1 gift bicycle)
- (bicycle_1 is-a bicycle)
- (giving-1 is-a giving)
- (bicycle-1 color blue)
- If we ask the question (bicycle-1 no-wheels)?
- Instantiate bicycle-1 to X
- Fire the rule
- Conclude bicycle-1 no-wheels is 2
15Semantic Network - Example 5
blue
John
color
donor
bicycle-1
gift
is_a
giving
giving-1
is_a
bicycle
recipient
wheels
Mary
2
16Inference in Semantic Networks (continued)
- The same situation as was described with
production rules and EVA triples is represented
in semantic network - Example 5. - Follow the is-a link from bicycle-1 to the
general object bicycle. - Follow the no-wheels link from bicycle to 2
- Conclude that bicycle-1 has 2 wheels
17Inference in Semantic Networks (continued)
- The basic technique is to traverse the links
between nodes to find particular values for
things - In practice, use pointers and lists
- LISP was very good for this, which was part of
the attraction of Sementic Nets to early AI
researchers. - Traverse links in both directions
18Transitive Links in Semantic Net Inference
- Traverse (follow) as many links as necessary and
the relationships (conclusions) are still valid - "Is-a" is transitive
19Inference in Semantic Networks
- Consider the relationship "near"
- maysville" is near purcell".
- purcell" is near norman".
- norman is near moore.
- moore" is near oklahoma city".
- oklahoma city is near edmond
- Can we conclude that maysville" is near
edmond"? - Near" is not transitive.
20Inference in Semantic Networks
- Not all relationships are transitive
- Different types of relationships may require
different inference mechanisms - Therefore, the inference engine for semantic nets
is more complicated than for production rules - What we gain by requiring fewer rules is at the
cost of a more complex inference mechanism
21Strengths of Semantic Nets
- Offer flexibility in adding new nodes and links
to a definition as needed. - The visual representation is easy to understand
- Economical because a node can inherit
characteristics from other nodes via an "is-a"
relationship. - It is similar to how human beings represent
information - Since nodes inherit relationships from other
nodes, it can support the ability to reason and
create definition statements between non-linked
entities.
22Weaknesses of Semantic Nets
- No standards exist for the definition of nodes or
relationships between and among nodes. - "Inheritance" of properties from one node to
another results in difficulties when it become
necessary to handle exceptions. - Perception of the situation by the domain expert
can place relevant facts at inappropriate points
in the network. - Procedural knowledge is difficult to represent,
as sequence and time are not explicitly
represented.
23Frames
- Used to represent stereotypical situations.
- Attached to each frame are several kinds of
information. - Things like how to use the frame, what should
happen next, etc. Use slots and fillers.
24Frame - Example 1
fillers
slots
25Relationship to Semantic Nets
- Some references indicate that frames developed
from semantic networks. - Semantic nets become large, very quickly and can
be difficult to manage. - Each frame represents an object.
- Think of a frame as a semantic net, with the
attributes moved "inside" each node, instead of
attaching nodes to each attribute.
26Frame - Example 2a
27Frame - Example 2b
28Frame - Example 2c
29Example 2 Discussion
- With the knowledge that "bicycle-1" is a bicycle,
we know that it has two wheels and is used as a
mode of transport. - We do not save this information with each
instance of the object bicycle - Instead, save general information once and
indicate when particular objects are instances of
the class of objects, bicycle.
30Example 2 Discussion (cont.)
- Simpler than semantic networks.
- we do not link every entity to each attribute
- using frames the values for certain attributes
are included. - Empty slots (attributes) act has place holders
- if a value particular value is unknown at this
time, this indicates that the entity should have
particular attributes - Empty frames for types of objects can be filled
in.
31Inference when using Frames
- As with semantic networks, the inference
mechanism is implemented with pointers. - Will not have to traverse as many nodes (fewer
pointers to follow), because much of the
information relevant to each object is stored
within each instance of an object.
32Inheritance in Frames
- Is-a properties allow the linking of frames in a
hierarchy - frames on lower levels inherit the general
properties of the more abstract entity on the
higher level
33Frame - Example 3
34Example 3b - Child Frames
- Name Compact Car
- Owner check registration
- Color list per manufacturer
- No cylinders
- range 4-6
- if needed ask owner
- Make use frame
- Vintage
- range 1950-2001
- if needed ask owner
- Name Jans car
- Instance of compact car
- Owner Jan
- Color blue
- No cylinders 6
- Make Honda
- Vintage 1992
-
35Inheritance - Example 3
- Therefore, anything known about passenger-cars
applies to compact cars and mid-sized cars, and - Everything we know about cars applies to
passenger cars.
36Positive Features of Inheritance
- A method to organize knowledge
- General term is abstract and has certain
characteristics. - The lower level instance is then described using
only those attributes that distinguish it from
the more abstract term - Focus only on the added information.
37Positive Features of Inheritance
- Very economical method to represent information
- Only represent information once at it's highest
level. - General information is then "inherited" by the
less abstract, lower level frames.
38Strengths of Frames
- Generic sets of rules can be built from the
representation with a lessened risk of
redundancy, and consequently with economy of
rules - A visual display of frames aids in the
understanding the knowledge and the
interrelations of the structure. - Provides a working base for adjusting and
maintaining a knowledge base.
39Weaknesses of Frames
- Computer languages are not equipped to work with
entire frames, and encounter efficiency problems
caused by increasing search time. - Knowledge engineers and others seem to experience
difficulty in limiting the size and components of
the frame so that they match the reasoning
process or search techniques of the system.
40Weaknesses of Frames (continued)
- Frames can overlap too much for the sake of
efficiency. A lack of understanding of where to
stop often requires restructuring the
representation, which can be costly.
41Default values
- Inheritance can be taken further to include
default value, things that are generally true,
but perhaps not always true.
42Summary of Semantic Nets and Frames
- New hybrid techniques are being developed to
combine frames with rules and with logic - Use frames to represent the static information
(frames are good at this) - Use production rules or logic provide the
processing and procedural knowledge - Knowledge engineers typically do not have
experience with this KR scheme so it has not been
used that often.
43Example System That Uses Frames
- INTERNIST/CADUCEUS an expert system to diagnosis
diseases. - Unlike MYCIN, INTERNIST is meant to emulate
"internists" who diagnosis a wide range of
internal diseases. - Exhaustive depth-first searches, like MYCIN,
would not be practical. - The developer used structured objects and
abduction (forward reasoning).
44Example (continued)
- INTERNIST is expected to
- eventually be in clinical use
- diagnosis at an expert level about 85 of
internal medicine - has a large knowledge base consisting of over 500
diseases.