Integrating Semantic Memory in Soar Yongjia Wang John E. Laird 1 Outline • Background & Motivation • Implementations and Experiments 2 What is Semantic Memory • Definition – ‘Your memory for meanings and general (impersonal) facts.’ [from WordNet] • Episodic memory and Semantic memory distinction – Episodic memory • Tied to a specific learning episode or experience • What you remember – Semantic memory • General knowledge not tied to a learning experience • What you know 3 Memory Systems Memory Long Term Memory Declarative Semantic Memory Episodic Memory Short Term Memory Procedural Perceptual Representation System Procedural Memory Working Memory 4 Related Fields and Motivation Focus Feature Limitations Architectures Cognitive Psychology (ACT-R) To model human Long-term Haven’t been used behavior declarative memory to build functional and learning agents AI Agent Architectures (Soar) To build Efficient domain intelligent agents knowledge engineering No long-term semantic memory, limited learning Knowledge Representation Systems (CYC) To represent common sense semantic knowledge Representational model, not learning model Declarative knowledge representation To build Efficient domain Our Approach (Soar + semantic memory) intelligent agents knowledge engineering and more learning capabilities Constrained by Soar 5 Research Goals • To improve general functionality of Soar by semantic memory – Explore new cognitive capabilities – Characterize computational functionalities • To understand semantic memory in the context of a general cognitive architecture – How to use semantic memory in specific tasks? – How semantic memory interacts with other mechanisms in Soar? – What are the computational implications of semantic memory and episodic memory distinction? 6 Distinction Between Semantic Memory and Episodic Memory in Soar Semantic Memory Storage & retrieval Single level objects in working memory unit Episodic Memory Entire working memory snapshot (episode) (declarative chunks) Temporal information No architectural temporal information Architectural temporal information (ex: next episode) Main purposes Store general knowledge Category learning Store specific events Case-based reasoning 7 Outline • Background & Motivation • Implementations and Experiments Task: Cognitive Arithmetic 8 Overview of Experiment • Purpose: – Integrate a declarative semantic memory component – Demonstrate related functional advantage of declarative representation • Implementation: – Semantic memory with declarative representation – Deliberate and automatic semantic learning • Task: Cognitive arithmetic – Easy to understand – Universally performed – Multiple types of learning 0 9 5 2 +0 0 6 3 1 0 1 5 9 Working Memory Representation of an Arithmetic Problem 0 9 5 2 state S1 + 0 0 6 3 --------------------- arithmetic-problem 1 0 1 5 A1 operation addition one-column NIL next-column digit1 9 next-column next-column C3 C2 digit2 0 digit1 5 C1 digit2 6 digit1 2 digit2 3 10 Problem Space process-column next-column If last column and carry=0 If last column and carry=1 new-column stop get-digit1 get-digit2 compute-result write-result If carry = 1 compute-result write-digit1 11 Solving One Column An unknown sub-problem Chunking learns a rule Compare General procedural knowledge Semantic learning 12 Soar Storage: Long-Term Memories Declarative structure consist of triplet elements Semantic Procedural Reinforcement Chunking Learning Retrieval: Episodic Semantic Learning Encoding: Deliberate retrieval Episodic Learning Option1: Deliberately encode structure specified by task knowledge Cue is created under ‘cue-link’ Hash based exact match Option2: Automatically encode all structures Short-Term Memory Use: Decision Procedure Task specific strategies Action Perception Body 13 Underlying Storage Structure Declarative Chunks Identifier – attribute – value hash sum A1 A1 digit1 digit2 A2 …H Cue …H sum digit1 digit2 …H A1 digit2 sum 5 2 digit2 sum digit1 5 …H 2 …H 3 …H 6 …H 3 …H 3 …H digit1 3 ? 2 Array of elements A2 (A1, sum, 5) (A1, digit1, 2) (A1, digit2, 3) (A2, sum, 6) (A2, adigit1, 3) (A2, digit2, 3) …A digit2 sum digit1 6 3 3 A1 …H A2 …H 5 6 Attribute – value - identifier hash A1 …H sum …H 2 digit1 A2 3 …H A1 …H 3 digit2 …H A2 …H …H 14 3 Transfer Learning Effect from Semantic Learning ^digit1 5 ^digit2 6 ^operation addition ^sum 1 ^sum 1 ^digit1 5 ^digit2 6 ^carry-borrow 1 ^operation subtraction ^carry-borrow 1 Retrieval Semantic learning sub-state S1 Counting: 5,6,7,8,9,(1)0, (1)1 carry-borrow sum 1 1 Counting once and learn 1 declarative chunk digit2 digit1 5 6 15 Procedural Representation Cannot be Transferred ^sum 1 ^digit1 5 ^digit2 6 ^operation addition ^digit1 5 ^sum 1 ^digit2 6 ^carry-borrow 1 ^operation subtraction1 ^carry-borrow 1 chunking chunking sub-state sub-state Counting: 5,6,7,8,9,(1)0, (1)1 Counting: 1,0,(-1)9,(-1)8,(-1)7,(-1)6, (-1)5 Counting twice and learn 2 rules 16 Comparison of Different learning Configurations 234 + 345 = 579 579 – 345 = 234 579 – 345 = 234 72 33 9 17 Decision Cycles Breakdown Situations All computations With arithmetic facts After chunking operators in top-state (initialization, process-column, next-column) 9 9 9 get-digits (from top-state) 3×3=9 9 0 write-result (to top-state) 3×1=3 3 0 retrieve 3×4=12 12 0 counting 39 0 0 Total 72 33 9 Decision Cycles Operators 18 Summary • Nuggets – Implemented a semantic memory with declarative representation – Demonstrated the functional advantage of declarative representation over procedural representation – Demonstrated transfer learning effect by semantic learning – Demonstrated the functional Interaction between semantic learning and chunking • Coals – Cognitive arithmetic is an internal mental task – The task is completely deterministic 19 Thank You 20