AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual...

33
AI – CS289 AI – CS289 Knowledge Representation Knowledge Representation Lectures on Artificial Intelligence Lectures on Artificial Intelligence – CS289 – CS289 Conceptual Graphs Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias [email protected]

Transcript of AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual...

Page 1: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Lectures on Artificial Intelligence – CS289Lectures on Artificial Intelligence – CS289

Conceptual GraphsConceptual Graphs

18th September 2006

Dr Bogdan L. [email protected]

Page 2: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 2

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

ContentsContents• Definition of Conceptual Graphs

• Basic building blocks

• Concept node representation

• Exercise

Page 3: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 3

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Definition of Conceptual GraphsDefinition of Conceptual Graphs• John Sowa, formerly of IBM, is one of the key proponents of

conceptual graphs (CG). Sowa’s project is to create "a system of logic for representing natural language semantics".

• Conceptual graphs form a knowledge representation language based on the one hand in linguistics, psychology and philosophy, and data structures and data processing techniques on the other.

Page 4: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 4

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Definition of Conceptual GraphsDefinition of Conceptual Graphs• The main aim is mapping perception onto an abstract representation

and reasoning system.

• A conceptual graph consists of concept nodes and relation nodes– The concept nodes represent entities, attributes, states, and events

–  The relation nodes show how the concepts are interconnected

Page 5: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 5

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Conceptual Graphs: Basic StructureConceptual Graphs: Basic Structure

CAT SIT MATSTAT LOC

Percepts

Rules for assembling percepts

Words

Grammar Rules

("The cat sat on the mat")

PS: percepts are fragments of images that fit together like pieces of a jigsaw puzzle

Page 6: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 6

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Conceptual Graphs: Basic StructureConceptual Graphs: Basic Structure• Alternative notation for text based representation:

[cat] --> (stat) --> [sit] --> (loc) --> [mat]

• Square brackets denote concept nodes.

• Parentheses denote relation nodes.

Page 7: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 7

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

A Graph-Theoretic DefinitionA Graph-Theoretic Definition• Conceptual Graphs are finite, connected, bipartite graphs.

– Finite: because any graph (in 'human brain' or 'computer storage') can only have a finite number of concepts and conceptual relations.

– Connected: because two parts that are not connected would simply be called two conceptual graphs.

– Bipartite: because there are two different kinds of nodes: concepts and conceptual relations, and every arc links a node of one kind to a node of another kind

Page 8: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 8

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

PerceptionPerception• ‘Perception is the process of building a working model that represents

and interprets sensory input’.

• The reception of sensory input, ‘a mosaic of percepts’, is converted into concepts:

– Concrete concepts – that have associated percepts

– Abstract concepts – that do not have any associated percepts.

Page 9: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 9

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

PerceptionPerception• For Sowa, a sensory icon is matched in an ideal brain to a single

percept or to a collection of percepts, which are combined to form a complete image: an interconnected set of percepts.

• Percepts are combined in the brain and their interconnections stored as a conceptual graph.

Page 10: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 10

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Conceptual Graphs ExampleConceptual Graphs Example• Consider the sentence: "A cat sitting on a mat"

• This sentence can be interpreted at different levels:

1. There are concrete concepts: cat, mat and sitting which enable us to experience the external word and motor mechanism to react to it.

2. The words of our natural language, arranged in accordance with the grammar of the language, is one way of articulating and disseminating the experience.

Page 11: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 11

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Conceptual Graphs ExampleConceptual Graphs Example3. Each of the concepts in the sentence belongs to, or can be related

to, a category or class:

Animal>Cat; Furniture>Mat; Posture>Sit;Living Being>Animal; Household Objects>Furniture; Act>Posture

Thus

Cat – Sit – Mat Animal – Posture – Furniture Living Being – Act – Household Object

A hierarchy of concept type defines the relationship between concepts at different levels of generality

Increasing Abstraction

Page 12: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 12

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Conceptual Graphs ExampleConceptual Graphs Example4. The concepts cat-sit-mat are related to each other in that:

– It is a common observation that some animate objects do sit on certain concrete objects

– Even if we had never seen a cat sitting on a mat, we may derive the conceptual graph on the basis of observation

– The order of the concrete concepts is important in that were we to say that mat-sit-cat, it would be difficult to match this stated percept with a conceptual graph in the ideal brain.

– Formation rules determine how each type of concept may be linked to conceptual relations.

Page 13: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 13

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Conceptual Graphs ExampleConceptual Graphs Example5. The above sentence relates to an episode or to some context to

which it is relevant.

6. Each episode may have some deeper mental associations, like emotions.

7. When we ask the question: what is the cat doing?, the answer is that the cat is sitting and that its current location is the mat. The cat’s STATe, its current ACTivity, its LOCation may each be related to a procedure of some type.

Page 14: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 14

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Conceptual RelationsConceptual Relations• Concepts are linked by conceptual relations to form a conceptual

graph.

• If a conceptual relation has n-arcs, then it is said to be n-adic, and its arcs are labelled 1, 2, …..n

Page 15: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 15

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

ExampleExample• Consider the sentence:

– Mary gave John the boring book authored by Tom & Jerry

• There are three main parts: (1), (2), and (3)

(1) (2) (3)

Page 16: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 16

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

ExampleExample(1): Mary gave John the boring book authored by Tom & Jerry

Person: Mary agent give

Person: John recipient

Both relation nodes have two arcs each and are referred to as expressing a 2-ary or binary relation between the two concepts

Page 17: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 17

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

ExampleExample(2): Mary gave John the boring book authored by Tom & Jerry

book boring

The relation node has only one arc and thus refers to a 1-ary or unary relation

Page 18: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 18

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

ExampleExample(3): Mary gave John the boring book authored by Tom & Jerry

book

Person: Tom

author

Person: Jerry

The relation node has 3-arcs and is referred to as expressing 3-ary or ternary relation

Page 19: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 19

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Formal Conceptual RelationsFormal Conceptual Relations

Concept 1 Concept 2 Relation

Entity:*x Entity*y accompaniment (ACCM)

    attribute (ATTR)

    characteristic (CHRC)

    content (CONT)

    part (PART)

    possession (POSS)

support (SUPP)

Event(Act) Attribute manner (MANR)

Page 20: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 20

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Formal Conceptual RelationsFormal Conceptual Relations

Concept 1 Concept 2 Relation

Event(Act) Entity result (RSLT)

    source (SOUR)

Event(Act) Entity (Animate) agent (AGNT)

    recipient (RCPT)

Event(Act) Entity (Place) destination (DEST)

    path (PATH)

  Entity (Substance) material (MATR)

Function Data argument (ARG)

State*x State*y causation (CAUS)

Page 21: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 21

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Concept NodesConcept Nodes• Recall that in the discussion of Collins and Quillian’s semantic

networks, we have found that these networks were logically inadequate!

• This situation was not resolved in some of the subsequent formulations of semantic networks. Specifically, it was difficult in a typical semantic network notation to distinguish between nodes describing:– classes and subclasses

– classes and members

Page 22: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 22

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Concept NodesConcept Nodes• In the sentence:

– Tom is a cat, a feline mammal

Tom is_a cat is_a feline is_a mammal

individual species subclass class

• The relation "is_a" is used to describe relationships between concepts that are mildly different.

Page 23: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 23

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Concept NodesConcept Nodes• A good representation should allow us to distinguish between:

– Individuals and species

– Species and classes

– Classes and subclasses

• Individuals may have properties that may not influence their belonging to a subclass:– Tom is a brown tabby

• Should not influence the observation that:– A tabby cat is a kind of cat

Page 24: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 24

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Concept NodesConcept Nodes• In CG theory, 'every concept is a unique individual of a particular

type'.

• Concept nodes are labelled with descriptors or names like "dog", "cat", "gravity", etc. The labels refer to the class or type of individual represented by the node.

• Each concept node is used to refer to an individual concept or a generic concept.

• In CG theory we have a relation called: name

Page 25: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 25

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Concept NodesConcept Nodes• CG allows nodes to be labelled simultaneously with the name of the

individual the node represents and its type. The two are separated by a colon (":")

• Consider the example:– Tom, a cat, is brown

cat: "Tom" colour brown

Page 26: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 26

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Concept Nodes: Unnamed IndividualsConcept Nodes: Unnamed Individuals• Consider the example that we do not know the name of a cat that is

brown:

• Each concept node in a CG may be used to represent specific but unnamed individuals by a unique prescribed number.

cat: #12345 colour brown

Page 27: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 27

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Concept Nodes: Multiple NamesConcept Nodes: Multiple Names• We subsequently found out that the cat is called by different names:

"Sylvester", "Sugar Pie" and "Squidgy Bod":

cat: #12345 name "Sugar Pie"

name "Sylvester"

name "Squidgy Bod"

Page 28: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 28

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Concept Nodes: Unspecified IndividualsConcept Nodes: Unspecified Individuals• General markers can also be used to refer to an unspecified individual.

The CG:

• Refers to an unspecified cat. Notationally, unspecified individuals are shown by the existence of an asterisk ("*")

• BUT… this is usually omitted (cat = cat:*).

cat colour brown

cat: * colour brown

Page 29: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 29

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Concept Nodes: Named VariablesConcept Nodes: Named Variables• Named variables can also be used to refer to an individual. These are

represented by an asterisk followed by the variable name.

• This is useful to indicate nodes that are the same unspecified individual.

dog:*X agent scratch object ear

paw part dog:*X

instrument part

Page 30: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 30

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Canonical GraphsCanonical Graphs• A conceptual graph is a combination of concept nodes and relation

nodes where every arc of every conceptual relation is linked to a concept. This could lead sometimes to sensible statements like– "a bunny sitting on a mat"

and at time will lead to nonsense like:– "colourless green ideas sleep furiously"

• Sowa distinguishes the nonsensical graphs from those that represent real or possible situations in the external world by declaring the later as canonical.

• Certain conceptual graphs are canonical. New graphs may become canonical or be canonised by perception, formation rules, or through "insight".

Page 31: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 31

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

ExercisesExercises• Please create the conceptual graph of the following sentence:

– John is between a rock and a hard place

Page 32: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 32

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

Solution 1Solution 1• "John is between a rock and a hard place"

person: John

rock

between

place

hardattribute

Page 33: AI – CS289 Knowledge Representation Lectures on Artificial Intelligence – CS289 Conceptual Graphs 18 th September 2006 Dr Bogdan L. Vrusias b.vrusias@surrey.ac.uk.

18th September 2006 Bogdan L. Vrusias © 2006 33

AI – CS289AI – CS289Knowledge RepresentationKnowledge Representation

ClosingClosing

• Questions???

• Remarks???

• Comments!!!

• Evaluation!