To Know is to Construct: Schema-Constrained Generation for Agent Memory
SCG-MEM uses schema-constrained generation to significantly improve LoCoMo benchmark performance.
Key Findings
Methodology
SCG-MEM employs schema-constrained generation to avoid structural hallucinations. It uses a dynamic Prefix Trie to restrict generation and an Associative Graph for multi-hop reasoning, ensuring valid memory keys.
Key Results
- On the LoCoMo benchmark, SCG-MEM achieved a 126.6% F1 improvement in multi-hop reasoning on Qwen2.5 3B, and a 146.7% improvement in single-hop tasks.
- In temporal tasks, F1 improved by 111.5%, validating the assimilation-accommodation mechanism.
- In adversarial tasks, F1 improved by 88.6%, proving the accuracy of semantic mapping.
Significance
SCG-MEM addresses the structural hallucination issue of traditional retrieval systems, enhancing memory access accuracy and efficiency. Its multi-hop reasoning capability offers new solutions for complex problems.
Technical Contribution
SCG-MEM shifts memory access from retrieval to generation, using a dynamic Prefix Trie and Associative Graph, providing new theoretical guarantees and engineering possibilities, surpassing existing methods.
Novelty
First to apply cognitive schema to generative memory access, distinguishing itself from traditional retrieval methods by eliminating structural hallucinations through dynamic constraints.
Limitations
- May still encounter errors in extremely complex contexts, requiring further algorithm optimization.
- High computational resource demands limit large-scale applications.
Future Work
Future exploration could focus on more efficient schema update mechanisms, reducing computational costs, and expanding to more application scenarios.
AI Executive Summary
Existing memory systems often rely on dense retrieval, susceptible to semantic noise, leading to structural hallucinations. SCG-MEM avoids this issue through schema-constrained generation. Its core lies in the combination of a dynamic Prefix Trie and an Associative Graph, ensuring valid memory keys. Experiments show SCG-MEM significantly outperforms retrieval baselines on the LoCoMo benchmark, especially in multi-hop reasoning and adversarial tasks. This method not only improves memory access accuracy but also offers new solutions for complex problems. However, SCG-MEM's high computational demands necessitate optimization for broader application.
Deep Analysis
Background
Memory systems are crucial for autonomous agents, with traditional methods relying on dense retrieval, susceptible to semantic noise. Recent graph-based approaches have improved but not solved structural hallucination issues.
Core Problem
Dense retrieval methods rely on semantic overlap, failing to distinguish contextually different similar instances, leading to retrieval noise. Open-ended generation avoids this but risks generating non-existent memory keys, causing lookup failures.
Innovation
SCG-MEM uses schema-constrained generation to avoid structural hallucinations. It employs a dynamic Prefix Trie to restrict generation and an Associative Graph for multi-hop reasoning, ensuring valid memory keys.
Methodology
- �� Uses a dynamic Prefix Trie to restrict generation, ensuring valid memory keys.
- �� Implements multi-hop reasoning through an Associative Graph, enhancing semantic understanding.
- �� Employs assimilation and accommodation mechanisms to dynamically update the schema, maintaining long-term adaptability.
Experiments
SCG-MEM was evaluated on the LoCoMo benchmark using Qwen2.5 3B and Llama 3.2, comparing performance in multi-hop, temporal, and adversarial tasks.
Results
SCG-MEM achieved a 126.6% F1 improvement in multi-hop reasoning, a 111.5% improvement in temporal tasks, and an 88.6% improvement in adversarial tasks, significantly outperforming baselines.
Applications
SCG-MEM is suitable for scenarios requiring high-precision memory access, such as intelligent assistants and autonomous driving, requiring robust computational capabilities.
Limitations & Outlook
SCG-MEM demands high computational resources and may encounter errors in extremely complex contexts, requiring further algorithm optimization.
Plain Language Accessible to non-experts
Imagine a library where traditional methods are like finding books by title, prone to errors. SCG-MEM is like having a smart librarian who finds the most relevant books based on your description. It uses something called a schema to remember book locations, ensuring no mistakes. Even if you mention a new book, it quickly updates the shelves for future searches.
ELI14 Explained like you're 14
Imagine you're playing a massive online game, and your character needs to remember lots of quests and items. Traditional methods are like remembering quest names, easy to mix up. SCG-MEM is like a super helper that finds the right items based on quest content. Even with new quests, it quickly updates memory, ensuring no mistakes.
Glossary
Structural Hallucination
Occurs when generative models produce non-existent memory keys, leading to lookup failures.
SCG-MEM avoids structural hallucination through schema-constrained generation.
Cognitive Schema
A dynamic structure used to organize and constrain the memory generation process.
SCG-MEM uses a cognitive schema to ensure valid memory keys.
Assimilation
Integrating new information into existing schemas.
SCG-MEM updates schemas through assimilation.
Accommodation
Expanding schemas to incorporate new concepts.
SCG-MEM expands schemas through accommodation.
Associative Graph
A graph structure used for multi-hop reasoning, enhancing semantic understanding.
SCG-MEM uses an Associative Graph for multi-hop reasoning.
Open Questions Unanswered questions from this research
- 1 How to maintain efficiency while reducing computational costs?
- 2 How to further improve accuracy in complex contexts?
Applications
Immediate Applications
Intelligent Assistants
Enhance dialogue systems' memory accuracy with SCG-MEM, improving user experience.
Long-term Vision
Autonomous Driving
Use SCG-MEM to enhance vehicle environment perception and decision-making, ensuring driving safety.
Abstract
Constructivist epistemology argues that knowledge is actively constructed rather than passively copied. Despite the generative nature of Large Language Models (LLMs), most existing agent memory systems are still based on dense retrieval. However, dense retrieval heavily relies on semantic overlap or entity matching within sentences. Consequently, embeddings often fail to distinguish instances that are semantically similar but contextually distinct, introducing substantial noise by retrieving context-mismatched entries. Conversely, directly employing open-ended generation for memory access risks "Structural Hallucination" where the model generates memory keys that do not exist in the memory, leading to lookup failures. Inspired by this epistemology, we posit that memory is fundamentally organized by cognitive schemas, and valid recall must be a generative process performed within these schematic structures. To realize this, we propose SCG-MEM, a schema-constrained generative memory architecture. SCG-MEM reformulates memory access as Schema-Constrained Generation. By maintaining a dynamic Cognitive Schema, we strictly constrain LLM decoding to generate only valid memory entry keys, providing a formal guarantee against structural hallucinations. To support long-term adaptation, we model memory updates via assimilation (grounding inputs into existing schemas) and accommodation (expanding schemas with novel concepts). Furthermore, we construct an Associative Graph to enable multi-hop reasoning through activation propagation. Experiments on the LoCoMo benchmark show that SCG-MEM substantially improves performance across all categories over retrieval-based baselines.