csc411artificial intelligence1 chapter 7 knowledge representation contents issues in knowledge...

40
CSC411 CSC411 Artificial Intelligence Artificial Intelligence 1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks Scripts Frames Conceptual Graphs

Post on 21-Dec-2015

218 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 11

Chapter 7

Knowledge Representation

Contents

Issues in Knowledge RepresentationAI Representational SystemsSemantic NetworksScriptsFramesConceptual Graphs

Page 2: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 22

Issues in Knowledge RepresentationIssues in Knowledge RepresentationRepresentation IssuesRepresentation Issues– Generality and specificityGenerality and specificity– Definitions, exception, defaultDefinitions, exception, default– Causality, uncertaintyCausality, uncertainty– TimesTimes– Scheme and mediumScheme and medium

Representation SchemesRepresentation Schemes– Scheme – data/knowledge structureScheme – data/knowledge structure– Semantic networkSemantic network– Conceptual dependenciesConceptual dependencies– ScriptsScripts– FramesFrames– Stochastic methodsStochastic methods– Connectionist (neural networks)Connectionist (neural networks)

Implementation mediaImplementation media– Medium – implementation languages Medium – implementation languages – Prolog, Lisp, Scheme, even C and JavaProlog, Lisp, Scheme, even C and Java

Page 3: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 33

Semantics of CalculusSemantics of CalculusPredicate calculus representationPredicate calculus representation– Formal representation languagesFormal representation languages– Sound and complete inference rulesSound and complete inference rules– Truth-preserving operationsTruth-preserving operations

Meaning – semanticsMeaning – semantics– Logical implication is a relationship Logical implication is a relationship

between truth values: pbetween truth values: pqq

Associationist theoryAssociationist theory– Attach semantics to logical symbols and Attach semantics to logical symbols and

operatorsoperators

Page 4: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 44

Semantic NetworksSemantic NetworksDefinition– Represent knowledge as a graph– Nodes correspond to facts or concepts– Arcs correspond to relations or associations

between concepts– Nodes and arcs are labeledNodes and arcs are labeled

PropertiesProperties– Labeled arcs and linksLabeled arcs and links– Inference is to find a path between nodesInference is to find a path between nodes– Implement inheritanceImplement inheritance– Variations – conceptual graphsVariations – conceptual graphs

Page 5: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 55

A Semantic Network on Human Information A Semantic Network on Human Information Storage and Response TimesStorage and Response Times

• Different inferences with given questions

Page 6: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 66

A Semantic Network Representation of A Semantic Network Representation of Properties of Snow and IceProperties of Snow and Ice

Page 7: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 77

Semantic Network in Natural Semantic Network in Natural Language UnderstandingLanguage Understanding

First implementation of semantic networks First implementation of semantic networks in machine translationin machine translation

Quillian’s semantic network Quillian’s semantic network – Influential programInfluential program– Define English words in a dictionary-like, but Define English words in a dictionary-like, but

no basic axiomsno basic axioms– Each definition leads to other definitions in an Each definition leads to other definitions in an

unstructured and sometimes circular fashionunstructured and sometimes circular fashion– When look up a word, traverse the networkWhen look up a word, traverse the network

Page 8: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 88

Three planes representing three definitions of the word “plant”

Page 9: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 99

Inferences in Semantic NetworksInferences in Semantic Networks

Inference along associational linksInference along associational linksFind relationships between pairs of Find relationships between pairs of wordswords– Search graphs outward from each word Search graphs outward from each word

in a breath-first fashionin a breath-first fashion– Search for a common concept or Search for a common concept or

intersection nodeintersection node– The path between the two given words The path between the two given words

passing by this intersection node is the passing by this intersection node is the relationship being looked forrelationship being looked for

Page 10: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1010

Find the relationship (intersection path) between “cry” and “comfort”

Page 11: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1111

Standardized RelationshipsStandardized Relationships

Standardized links’ labels Standardized links’ labels

Define a rich set of labelsDefine a rich set of labels

Domain knowledge to capture the Domain knowledge to capture the deep semantic structuredeep semantic structure

Case structure of English verbsCase structure of English verbs

Page 12: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1212

Case FrameCase FrameVerb-oriented approachVerb-oriented approach

Links define the roles of nouns/phrases in the action of the Links define the roles of nouns/phrases in the action of the sentencesentence

Case relationships: agent, object, instrument, location, time, Case relationships: agent, object, instrument, location, time, etc.etc.Case frame representation of the sentence “Sarah fixed the chair with glue.”

Page 13: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1313

Conceptual DependencyConceptual DependencySchank’s theorySchank’s theory

Offers a set of four equal and Offers a set of four equal and independent primitive conceptualizations independent primitive conceptualizations

From the primitives the word of meaning From the primitives the word of meaning is builtis built

Page 14: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1414

Conceptual dependency theory: An ExampleConceptual dependency theory: An Example

Page 15: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1515

• The primitives are used to define conceptual dependency relationships• Conceptual syntax rules

Page 16: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1616

Some basic conceptual dependencies and their use in representing more complex English sentences

Page 17: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1717

Conceptual dependency representing “John ate the egg”Conceptual dependency representing “John ate the egg”

the direction of dependencythe direction of dependency The agent-verb relationshipThe agent-verb relationshipPP past tensepast tenseINGEST INGEST a primitive act of the theorya primitive act of the theoryO O object relationobject relationD D the direction of the object in the actionthe direction of the object in the action

Page 18: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1818

Conceptual dependency representation of the sentence “John Conceptual dependency representation of the sentence “John prevented Mary from giving a book to Bill”prevented Mary from giving a book to Bill”

More tenses and modesMore tenses and modespp pastpastff futurefuturet t transitiontransitionk k continuingcontinuingcc conditionalconditional// negativenegative? ? InterrogativeInterrogativepilpil presentpresent

Page 19: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 1919

ScriptsScripts

Designed by Schank in 1974Designed by Schank in 1974

A structured representation A structured representation describing a stereotyped sequence of describing a stereotyped sequence of events in a particular contextevents in a particular context

A means of organizing conceptual A means of organizing conceptual dependency structuresdependency structures

Used in natural language Used in natural language understanding for knowledge baseunderstanding for knowledge base

Page 20: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2020

Script ComponentsScript ComponentsEntry conditionsEntry conditions or descriptors of the world or descriptors of the world that must be true for the script to be that must be true for the script to be called.called.

ResultsResults or facts that are true once the or facts that are true once the script has terminated.script has terminated.

PropsProps or the “things” that support the or the “things” that support the content of the script.content of the script.

RolesRoles are actions that the individual are actions that the individual participants performparticipants perform

ScenesScenes are a sequence of what represents are a sequence of what represents a temporal aspect of the script.a temporal aspect of the script.

Page 21: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2121

A Restaurant

Script

Page 22: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2222

FramesFramesCapture the implicit connections of Capture the implicit connections of information from the explicitly organized information from the explicitly organized data structuredata structureSupport the organization of knowledge Support the organization of knowledge into more complex unitsinto more complex unitsSimilar to classes in Object-orientedSimilar to classes in Object-orientedProposed by Minsky in 1975Proposed by Minsky in 1975

Here is the essence of the frame theory: When one Here is the essence of the frame theory: When one

encounters a new situation (or makes a substantial encounters a new situation (or makes a substantial

change in one’s view of a problem) one selects from change in one’s view of a problem) one selects from

memory a structure called a “frame”. This is a memory a structure called a “frame”. This is a

remembered framework to be adapted to fit reality by remembered framework to be adapted to fit reality by

changing details as necessary.changing details as necessary.

Page 23: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2323

Frame SlotsFrame SlotsA frame is a set of slots (similar to a set of fields in a class A frame is a set of slots (similar to a set of fields in a class in OO)in OO)The slots may contain the following informationThe slots may contain the following information

Page 24: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2424

Frame: An ExampleFrame: An Example• Part of a frame description of a hotel room. • “Specialization” indicates a pointer to a superclass

Page 25: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2525

Spatial frame for viewing a cubeSpatial frame for viewing a cube

Page 26: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2626

Conceptual GraphsConceptual Graphs

Conceptual graphConceptual graph– A finite, connected, bipartite graphA finite, connected, bipartite graph– No arc labels No arc labels – NodesNodes

concept nodes – box nodesconcept nodes – box nodes– Concrete concepts: cat, telephone, classroomConcrete concepts: cat, telephone, classroom– Abstract objects: love, beauty, loyaltyAbstract objects: love, beauty, loyalty

conceptual relation nodes – ellipse nodesconceptual relation nodes – ellipse nodes– Relations involving one or more conceptsRelations involving one or more concepts– Arity – number of box nodes linked toArity – number of box nodes linked to

Page 27: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2727

Conceptual relations of different aritiesConceptual relations of different arities

Page 28: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2828

Types, Individual, and NamesTypes, Individual, and NamesTypeType– A class, a conceptA class, a concept– Types are organized into hierarchyTypes are organized into hierarchyIndividual -- Individual -- Concrete entityConcrete entityName – Name – Identifier of type and individualIdentifier of type and individual

Conceptual GraphConceptual Graph– Concept box with type label indicating the class Concept box with type label indicating the class

or type of individual represented by a nodeor type of individual represented by a node– Label consists of type, :, and individualLabel consists of type, :, and individual– Unnamed individual labeled as marker: Unnamed individual labeled as marker:

#<number>#<number>– Marker can separate an individual from nameMarker can separate an individual from name

Page 29: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 2929

Graph of “Mary gave John the book”Graph of “Mary gave John the book”

Page 30: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 3030

Conceptual graph indicating that the dog named Emma is brown.

Conceptual graph indicating that a particular (but unnamed) dog is brown.

Conceptual graph indicating that a dog named Emma is brown.

Page 31: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 3131

Conceptual graph of a person with three namesConceptual graph of a person with three names

Page 32: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 3232

Conceptual graph of the sentence “The dog scratches Conceptual graph of the sentence “The dog scratches its ear with its paw.”its ear with its paw.”

Page 33: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 3333

The Type HierarchyThe Type HierarchyA partial ordering of types: ≤A partial ordering of types: ≤Represent inheritance relationship between types Represent inheritance relationship between types (sub-super)(sub-super)Type hierarchy forms a latticeType hierarchy forms a latticeCommon subtypeCommon subtype– If s, t and u are types, with t≤s and t≤u, then t is a If s, t and u are types, with t≤s and t≤u, then t is a

common subtype of s and ucommon subtype of s and u– Maximum common subtype: if t is a common subtype of Maximum common subtype: if t is a common subtype of

s and u, and for any common subtype w of s and u, t≤w s and u, and for any common subtype w of s and u, t≤w

Common supertypeCommon supertype– If s, t and u are types, with s≤t and u≤t, then t is a If s, t and u are types, with s≤t and u≤t, then t is a

common supertype of s and ucommon supertype of s and u– Minimum common supertype: if t is a common Minimum common supertype: if t is a common

supertype of s and u, and for any common supertype w supertype of s and u, and for any common supertype w of s and u, w≤t.of s and u, w≤t.

Page 34: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 3434

A type lattice illustrating subtypes, supertypes, the universal type, and the absurd type. Arcs represent the relationship.

Page 35: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 3535

Generalization and SpecificationGeneralization and SpecificationGeneralizing and specializing graphsGeneralizing and specializing graphsOperations to create new graphs from Operations to create new graphs from existing graphs:existing graphs:– Copy: for a new graph exactly copiedCopy: for a new graph exactly copied– Restrict: replace nodes by a node representing Restrict: replace nodes by a node representing

their specificationtheir specificationReplace generic marker by individual markerReplace generic marker by individual markerReplace a type by its subtypeReplace a type by its subtype

– Join: combine two graphs into a single graphJoin: combine two graphs into a single graphThis is a special restrictionThis is a special restriction

– Simplify: delete duplicate relationsSimplify: delete duplicate relations

Page 36: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 3636

Examples of restrict, join, and simplify operations

Page 37: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 3737

Inheritance: Join and RestrictInheritance: Join and RestrictInheritance can be implemented as Inheritance can be implemented as join and restrictjoin and restrict– Replace a generic marker by an Replace a generic marker by an

individual: implement the inheritance of individual: implement the inheritance of properties of a type by individualproperties of a type by individual

– Replace a type by a subtype: implement Replace a type by a subtype: implement inheritance between a type and subtypeinheritance between a type and subtype

– Join one graph to another and then Join one graph to another and then restrict certain nodes: implement restrict certain nodes: implement inheritance of various propertiesinheritance of various properties

Page 38: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 3838

Inheritance in conceptual graphs

Page 39: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 3939

Propositional NodesPropositional NodesRelations between Relations between propositionspropositionsProposition -- A Proposition -- A concept typeconcept typePropositional Propositional concept node concept node contains another contains another conceptual graphconceptual graphConceptual graph of the statement “Tom believes that Jane likes pizza,” showing the use of a propositional concept.

Page 40: CSC411Artificial Intelligence1 Chapter 7 Knowledge Representation Contents Issues in Knowledge Representation AI Representational Systems Semantic Networks

CSC411CSC411 Artificial IntelligenceArtificial Intelligence 4040

Conceptual Graphs and LogicConceptual Graphs and LogicCan represent conjunctive conceptsCan represent conjunctive conceptsNegation – propositional concept an a unary Negation – propositional concept an a unary operation: operation: negnegDisjunctive – converted to conjunctive and Disjunctive – converted to conjunctive and negationnegationConceptual graph of the proposition “There are no pink dogs.”