Artificial Intelligence - PowerPoint PPT Presentation

1 / 68
About This Presentation
Title:

Artificial Intelligence

Description:

Syntax development has hit a wall. Current computational approaches to syntax don't handle ... dresser. What happens when frame instantiation fails? ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 69
Provided by: imsUnist
Category:

less

Transcript and Presenter's Notes

Title: Artificial Intelligence


1
Seminar The Interface between Linguistics and
Knowledge Representation
Nov. 8, 2004
Artificial Intelligence
2
Today's topics
  • Classical artificial intelligence
  • Basic knowledge representation
  • Frames and scripts
  • Semantic networks

3
Premises of seminar
  • Syntax development has hit a wall.
  • Current computational approaches to syntax don't
    handle constructions well.
  • The answer to these challenges is the
    incorporation of pragmatics.
  • Language use
  • World knowledge
  • We will use these terms interchangeably.

4
Premises of seminar
  • Inspiration Question answering
  • QA systems
  • Integrate all levels of linguistic processing
    from the word level up
  • Integrate world knowledge
  • Are broad coverage (not custom imple- mentations
    for a specific technical problem)
  • By abstracting away from the particulars of QA,
    can we learn how linguistics and knowledge
    representation might interact?

5
Topics of seminar
  • How do we represent knowledge?
  • How do we create knowledge bases?
  • How do we use knowledge bases?
  • One approach use knowledge bases to define
    coherence, plausibility, etc.
  • Coherent interpretations are preferred.
  • In this approach, the challenge is the
    formalization of coherence.
  • Data about language use (corpora) may be used
    here.

6
Today
  • How do we represent knowledge?
  • How do we create knowledge bases?
  • How do we use knowledge bases?
  • One approach use knowledge bases to define
    coherence, plausibility, etc.
  • Coherent interpretations are preferred.
  • In this approach, the challenge is the
    formalization of coherence.
  • Data about language use (corpora) may be used
    here.

7
Today's goal
  • Understand classical knowledge representation
  • Frames
  • Scripts
  • Semantic networks

8
Questions?
9
Credit
  • Most slides authored by Bruce R. Maxim,
    University of Michigan

10
Representation
  • Set of syntactic and semantic conventions which
    make it possible to describe things
  • Syntax
  • specific symbols allowed and rules allowed
  • Semantics
  • how meaning is associated with symbol
    arrangements allowed by syntax

11
Representation Types
  • Relational databases
  • Constraints
  • Predicate logic
  • Concept hierarchies
  • Semantic networks
  • Frames
  • Scripts

12
Types of Knowledge
  • Objects
  • both physical concepts
  • Events
  • usually involve time
  • maybe cause effect relationships
  • Performance
  • how to do things
  • META Knowledge
  • knowledge about how to use knowledge

13
Stages of Knowledge Use
  • Acquisition
  • structure of facts
  • integration of old new knowledge
  • Retrieval (recall)
  • roles of linking and chunking
  • means of improving recall efficiency

14
Stages of Knowledge Use
  • Reasoning
  • Formal reasoning
  • deductive theorem proving
  • Procedural Reasoning
  • expert system
  • Reasoning by Analogy
  • very hard for machines
  • Generalization
  • reasoning from examples

15
Knowledge Representation Issues
  • Grain size or resolution detail
  • Scope or domain
  • Modularity
  • Understandability
  • Explicit versus implicit knowledge
  • Procedural versus declarative knowledge

16
Advantages
  • Declarative representation
  • Store each fact once
  • Easy to add new facts
  • Procedural representation
  • Easy to represent "how to do things"
  • Easy to represent any knowledge not fitting
    declarative format
  • Relatively easy to implement heuristics on doing
    things efficiently

17
Attributes of Good KR Schemes
  • Representational Adequacy
  • works for all knowledge in problem domain
  • Inferential Adequacy
  • provides ability to manipulate structures to
    create new structures

18
Attributes of Good KR Schemes
  • Acquisitional Efficiency
  • easy to add new knowledge
  • Semantic Power
  • Supports truth theory
  • Can cope with incomplete or uncertain knowledge
  • Contains some commonsense reasoning capability

19
Broad KR Questions
  • Are there properties of objects so basic that
    they occur in every domain? If so what are they?
  • Is there a good set of primitives into which all
    knowledge can be broken down?

20
Multiple objects
  • How do you combine individual object descriptions
    to form a representation of the complete problem
    state?
  • Time How can sequences of states be represented
    efficiently?

21
Two Approaches
  • Use complete object descriptions that include
    relations to other objects in the environment
  • Use predicate logic to express these kind of
    relations
  • on(plant,table).
  • under(table,window).
  • in(table,room).

22
Frame Problem
  • What (or how much) should be stored at each
    node?
  • How do you distinguish between facts that change
    from facts that do not change between frames?
  • Stated another way, how do you decide how much
    information to record as you move from problem
    state to problem state?

23
Frame Problem
  • The naive approach is to store complete state
    descriptions and make changes to them each time a
    node is updated
  • Disadvantage
  • takes time to do
  • descriptions can become large
  • what happens when algorithm needs to backtrack
    and undo changes?

24
Frame problem Example
  • color(x,c) holds after paint(x,c)
  • position(x,p) holds after move(x,p)
  • A vase
  • Initially color(A,Red), position(A,House)
  • What is the state of A after
  • Paint(A,Blue) followed by Move(A, Garden)

25
  • Frames and Scripts

26
Frame Attributes
  • Based on stereotypes
  • Slot filler type static representation
  • Make use of if-needed inheritance or procedural
    attachment (demons) to fill in missing values
  • Allow us to use current explanation provided by
    frame until the current view is proven to be
    incorrect

27
How are frames used?
  • People select a frame from a list of proposed
    frame candidates based on a small amount of
    partial evidence (e.g. Soccer player)
  • The attributes of a selected frame are
    instantiated with observed attributes from the
    current object or event description

28
Frame Example
  • David Beckham
  • Is-a soccer player
  • Date of birth May 2, 1975
  • Height 180 cm
  • Weight 71 kg
  • Club Manchester United
  • etc.

29
How are frames used?
  • As values for slots are found they are copied to
    the evolving frame description
  • If slot values contradict slot constraints, a new
    frame candidate may need to be selected

30
What happens when frame instantiation fails?
  • One option is to select fragments of the current
    frame that do match the object or event and try
    to match them against new frame candidates
  • Another option is to make an excuse for the
    failure and use the frame any way (e.g.
    three-legged cat)

31
What happens when frame instantiation fails?
  • You may be able to follow pre-defined links
    between frames in a frame system

bench
table
no back, too big
no back, too wide
drawers
chair
no back, too high
desk
stool
dresser
no kneehole
32
What happens when frame instantiation fails?
  • Another option to follow the inheritance links in
    the hierarchical structure formed by the frames
    (e.g. dog ? mammal ? animal) until a sufficiently
    general frame that does not conflict with the
    evidence is found
  • If a general frame found using inheritance is
    not specific enough, consider creating a new
    frame just below that matching frame that
    contains the missing knowledge

33
Summary of problems
  • Frames are stereotypes, but stereotypes are
    rarely instantiated as such (e.g. there are more
    atypical mammals than typical mammals)
  • Cancellation of default properties is a tricky
    business

34
Scripts
  • A script can be viewed as a series of related
    frames that represent a sequence of stereotypic
    events in a common context

35
Script Attributes
  • Entry conditions
  • When does the script apply?
  • Result
  • What will be true once script is completed
  • Props
  • Roles
  • Track
  • Variation or specialization of usual script
    pattern
  • Scenes
  • Actual events within the sequence

36
Restaurant Script
  • Track Coffee Shop
  • Props Tables, menu, food (F), check, money
  • Roles Customer (S), waiter (W), cook (C),
    cashier (M), owner (O)
  • Entry conditions
  • S is hungry, S has money
  • Results
  • S has less money, O has more money, S not hungry,
    S happy (optional)

37
Restaurant Script
  • Scene 1 Entering
  • S PTRANS into restaurant
  • S ATTEND eyes to tables
  • S MBUILD where to sit
  • S PTRANS S to table
  • S move S to sitting position

38
Restaurant Script
  • Scene 2 Ordering
  • Scene 3 Eating
  • C ATRANS F to W
  • W ATRANS F to S
  • S INGEST F
  • Option Return to scene ordering and order
    more otherwise go to scene pay bill

39
Challenges
  • C atrans F to W, W atrans F to S does not apply
    to fast food restaurants.
  • Without such an explicit representation, we
    cannot interpret the following sentence.
  • I had to leave without eating because the owner
    fired the cook right after I arrived
  • Difficult tradeoff between coverage and limiting
    the number of defaults we need to override.

40
Scripts
  • Are useful because they record patterns of the
    occurrence of events from the real world
  • These patterns are based on causal relationships
    between events (e.g. agents perform one action to
    be able to perform another action)
  • The sequence of script events defines a causal
    chain that will facilitate reasoning about
    unobserved events

41
Scripts
  • When a script is known to be appropriate for a
    given situation it can be used to predicate the
    occurrence of future events
  • Example
  • I went to a restaurant, ordered food
  • What did I do next?

42
Scripts
  • When activating a large script, we may have to
    fill a large number of slots by complex inference
    mechanisms
  • The alternative is to wait to fill a slot until
    information is required (e.g. using if-needed
    inheritance or the equivalent)

43
Scripts
  • Can be used in question answering (e.g. story
    comprehension)
  • Why did a waiter bring John a menu?
  • Scripts can also help to focus attention on
    unusual events as script departures
  • John went to a restaurant, was shown to a table,
    ordered a large steak waited for a long time, got
    angry, and left.
  • Why did John get angry?

44
Strengths of Scripts
  • Scripts provide scheme for detecting unusual
    events and missing events
  • Can be used to answer questions

45
Weaknesses of Scripts
  • Less general than frames, so not appropriate for
    some knowledge types
  • If scripts can only account for all details in a
    restricted domain they are not very interesting
  • It is unlikely that scripts can account for every
    real life scenario (even if restricted to
    restaurant visits only)

46
Semantic Networks
47
Decomposition
  • Most complex sets of objects can be decomposed
    into smaller subsets
  • These decompositions often contain two types of
    relations isa and ispart
  • dog isa pet isa animal isa living
    thing
  • finger ispart hand ispart body

48
Inheritance
  • These relations form a partial ordering of the
    network
  • This allows us to use transitivity relations to
    aid in search
  • Storage of information is more efficient since
    inheritance can be used to copy information
    from a class to its subclasses

49
Abstraction
  • Choosing a level of abstraction can be tricky
    since you need to choose between a small number
    of low-level primitives or a large number of
    broader labels
  • Advantage of low-level primitives
  • allows inferences rules to be written very
    succinctly
  • not concerned with the many ways that knowledge
    may have appeared orginally

50
Abstraction
  • Disadvantages of low-level primitives
  • takes a lot of work to convert each high level
    fact to its primitive form
  • not always clear which low-level primitives are
    important (e.g. how do you represent cousin using
    primitives like mom, dad, son, daughter)
  • simple high-level facts require lots of storage
    when broken down into primitives

51
Semantic Networks
  • A declarative representation in which complex
    entities are described as collections of
    attributes and associated values
  • Sometimes called a slot and filler type
    structure
  • To assist in there implementation AI languages
    provide for some type of associative memory in
    which objects can be stored as OAV triples

52
OAV Triples in Lisp
  • An object could be represented using a symbol and
    its attributes and values could be stored as
    properties
  • (putprop dog animal isa)
  • (putprop animal living-thing isa)
  • (putprop finger hand ispart)

53
Associative Memory
  • Takes lots of storage
  • Fast and very flexible

54
Animal Hierarchy
55
Searching Hierarchy
  • is x related to y with n or fewer links
  • (defun isatest (x y n)
  • (cond ((eq x y) T)
  • ((zerop n) nil)
  • ((member y (get x isa)) T)
  • (T (any mapcar lambda (xx)
  • (isatest xx y) (1 n))
  • (get x isa))))
  • (defun any (lst)
  • (cond ((null lst) nil)
  • ((car lst) T)
  • (T (any (cdr lst))))

56
Semantic Nets
  • How do semantic networks differ from ordinary
    directed graphs?
  • In semantic networks there must be some
    underlying meaning associated with the
    representation (especially the edge or link
    labels)

57
Semantic Network
has
has
feathers
wings
bird
isa
isa
eagle
falcon
58
Graph representation
59
Inheritance
60
Value Inheritance
  • Form a queue consisting of node F and
  • all class nodes found in Fs isa slot
  • Until queue is empty or value found
  • if queue front has value in slot S then
  • value found
  • else
  • remove first queue element and
  • add nodes related by isa slot
  • If value found then
  • report value found in slot S
  • else
  • announce failure.

61
Exceptions
  • How do you deal with exceptions (e.g. Jumbo has 1
    tusk)?
  • One strategy is to record the exception on the
    instance node

62
Comparisons
  • Sometimes difficult to represent unambiguously
  • But Kanada ist groesser als China.

Dumbo
Jumbo
weight
weight
less than
1.5 tons
2 tons
63
If-needed Inheritance
  • Rather than checking for a value in a slot, there
    may be times when a procedure would be called if
    needed
  • For example, you would rarely store all three
    values (mass, volume, and density) on a node
    since one value could be computed from the other
    two

64
If-needed Inheritance
  • Form a queue consisting of node F and
  • all class nodes found in Fs isa slot
  • Until queue is empty or if-needed procedure found
  • if procedure exist and value produced then
  • value found
  • else
  • remove first queue element and
  • add nodes related by isa slot
  • If procedure found then
  • report value found for Fs slot S
  • else
  • announce failure.

65
Default Inheritance
  • Form a queue consisting of node F and
  • all class nodes found in Fs isa slot
  • Until queue is empty or value found
  • if queue front has default value for S then
  • value found
  • else
  • remove first queue element and
  • add nodes related by isa slot
  • If value found then
  • report default value found for slot S
  • else
  • announce failure.

66
Combination
  • Use value inheritance procedure to search entire
    network
  • Use if-needed inheritance procedure to search
    entire network
  • Use default inheritance procedure to search
    entire network

67
Semantic Net Considerations
  • Which slot facets (value, if-needed, default) are
    to be used?
  • Which inheritance strategies (if any) are to be
    used?

68
Problems with Semantic Nets
  • When do you have enough semantic primitives?
  • How do you know the selected primitives are
    correct?
  • What is the smallest number of link types needed
    to span all human knowledge?
  • Is-a
  • Has-part
  • Is located close to
  • How do you represent quantified knowledge?
Write a Comment
User Comments (0)
About PowerShow.com