Schema-Mem: How Structured Memory Helps Conversational Agents Stop 'Forgetting'

Schema-Mem builds evolvable structured memory from fact-level schema units to improve the factual reliability of long-term conversational agents.
Schema-Mem is a long-term conversational memory framework inspired by schema theory from cognitive psychology, designed to address limited LLM context windows and the redundancy and fact drift of flat-text and coarse-grained summary memory. It extracts key facts from each conversation turn into independent schema units, links new facts with historical units into a memory graph through hybrid lexical and semantic retrieval, and uses LLM verification to decide whether to update, supplement, or annotate temporal order when conflicts arise, enabling incremental construction and continuous evolution of memory. In generation, multi-source retrieval provides focused evidence to improve factual reliability. Experiments on the LoCoMo and LongMemEval benchmarks validate its effectiveness, but the additional inference overhead from fact extraction and verification and the efficiency of graph maintenance remain trade-offs for future engineering.
Long-term conversational agents face a fundamental tension: users expect assistants to remember personal information and historical details across many turns, while large language models (LLMs) have limited context windows, and memory schemes based on flat text or coarse-grained summaries are prone to redundancy and fact drift. A paper titled Schema-Mem: Structured and Evolving Memory for Long-term Conversational Knowledge proposes a memory framework inspired by schema theory from cognitive psychology. It organizes conversational knowledge into fact-level "schema units" and maintains the reliability of long-term memory through incremental construction and continuous refinement.

Why Flat Memory Isn't Enough
Existing LLM memory approaches fall roughly into two categories: one directly concatenates historical conversations or stores them as vectorized flat text chunks, and the other generates coarse-grained summaries. The former rapidly expands in long conversations, and during retrieval it tends to hit semantically similar but factually conflicting fragments. The latter loses details and struggles to support question answering that requires precise facts. The paper points out that both approaches lack "fact-level" structured representations, which makes it difficult for agents to reason reliably as information evolves over time.
The core insight of Schema-Mem comes from schema theory in cognitive psychology: human memory is not stored verbatim; rather, experience is organized into structured units, and new information is assimilated into or accommodated by existing schemas. Mapped to conversational memory, this means extracting the key facts from each conversation turn into independent schema units and letting these units form a retrievable and updatable connection graph.
Schema Theory is one of the core theories in cognitive psychology that explains how human knowledge is organized. It was proposed by Bartlett in 1932 and later developed and refined by researchers such as Rumelhart. The theory holds that human memory is not a verbatim reproduction of experience; instead, information is organized and stored in "schemas"—structured knowledge units. Schemas act as cognitive templates that help individuals understand, categorize, and predict new experiences. When new information is consistent with an existing schema, it is absorbed into the original structure through "assimilation"; when new information conflicts with a schema, the schema is adjusted or rebuilt through "accommodation." Schema-Mem borrows this framework, treating the key facts in each conversation turn as independently operable schema units, and allowing new facts and historical units to evolve the memory structure through assimilation (merging similar information) and accommodation (conflict resolution and updating). This simulates the dynamic organizational characteristics of human memory rather than simply stacking text fragments.
Schema-Mem's Three-Step Memory Mechanism
Fact Extraction and Schema Unit Construction
The system performs key fact extraction on each conversation turn, transforming unstructured conversation history into fact-level schema units. Each unit carries one verifiable piece of specific information rather than a fuzzy embedding of an entire conversation. This choice of granularity directly targets the redundancy problem: similar information is not repeatedly stacked as multiple text chunks but is merged or linked as facts.
Hybrid Retrieval Establishes Historical Connections
Newly extracted schema units do not exist in isolation. Schema-Mem uses hybrid lexical and semantic search to link current facts with relevant historical units, gradually forming a connected memory graph. Lexical matching ensures precise correspondence of entities and keywords, while semantic search captures the same fact under different phrasing. Combining the two mitigates the weakness of pure vector retrieval in factual grounding.
Hybrid Retrieval refers to an information retrieval strategy that combines lexical retrieval and semantic retrieval paradigms. Lexical retrieval (such as BM25 and TF-IDF) is based on exact keyword matching and is good at capturing exact correspondences of entity names, proper nouns, and terminology, but it cannot handle synonymous expressions or different phrasings with equivalent meaning. Semantic retrieval relies on dense vector embeddings and recalls semantically similar content by computing similarity in vector space, enabling it to find the same fact across phrasing differences, but it is prone to false recalls that are "semantically similar but factually different" in exact matching and factual grounding. Hybrid retrieval usually fuses and ranks the results from both paths (for example, using strategies such as Reciprocal Rank Fusion) to balance precision and recall breadth. Schema-Mem adopts this strategy when constructing the memory graph precisely to ensure connection quality in both entity alignment and semantic association dimensions, mitigating the inherent weakness of pure vector retrieval in factual consistency.
LLM Verification and Conflict Resolution
In long-term conversations, user information changes and may even contradict itself. Schema-Mem introduces an LLM-based verification step to refine memory: when a new fact conflicts with a historical unit, the system determines whether to update the old unit, supplement new details, or retain both and annotate their temporal relationship. This mechanism gives memory an "evolving" capability rather than a stack of static snapshots.
Fact Drift is a typical failure mode in long-term conversational memory systems. It refers to the phenomenon in which, during multiple rounds of summarization, compression, or retrieval concatenation, facts in memory gradually deviate from the original conversation content, producing distorted details, disordered temporal order, or mixed information. Its cause is that each round of summarization or vectorization is a lossy compression, and errors accumulate and amplify over multiple iterations. At the same time, flat text chunks may mix in semantically similar but actually conflicting fragments during retrieval concatenation, causing the model to reason from false premises during generation. Schema-Mem anchors memory in fact-level verifiable units and, in case of conflict, has the LLM explicitly determine the update strategy. In essence, this performs "fact calibration" on memory at each incremental step, thereby suppressing the accumulation of drift. This design idea is consistent with the "grounding" principle emphasized in retrieval-augmented generation (RAG), but it refines the calibration granularity from the document level to the fact level.
Evidence Support in the Generation Stage
When generating responses, Schema-Mem performs multi-source retrieval, pulling multiple schema units relevant to the current question from the memory graph as evidence, and then hands them to the LLM to generate an answer. Compared with concatenating context from flat text chunks, the evidence provided by multi-source retrieval is more focused and contains fewer conflicts, thereby improving the factual reliability of answers. The paper emphasizes that the goal of this design is to make responses in long-term interactions "evidence-based" rather than relying on the model's free interpretation of fuzzy summaries.
Experimental Performance and Significance
The paper conducts extensive experiments on two long-term memory benchmarks, LoCoMo and LongMemEval. The results show that Schema-Mem is effective in both maintaining long-term memory and producing reliable responses. It should be noted that the original material does not disclose specific performance numbers or details of comparison baselines, so only a qualitative description is provided here.
From a broader perspective, Schema-Mem represents a shift in thinking: the bottleneck of long-term memory is not only storage capacity or retrieval speed, but also the representational structure of memory. Breaking conversational knowledge into verifiable, linkable, and evolvable fact units may be more effective at solving the problem of agents that "remember but do not remember accurately" than simply expanding the context window. For building personal assistants, customer service agents, or long-term companion applications, this structured memory framework offers a noteworthy engineering direction.
However, structured memory also introduces new costs: fact extraction and LLM verification both require additional inference overhead, and how to maintain efficiency of the graph structure in ultra-long interactions remains a question for future research. The paper itself focuses on framework design and benchmark validation, and these engineering trade-offs await further exploration by the community.
One-line Summary
Schema-Mem uses fact-level schema units to build evolvable structured memory, improving the factual reliability of long-term conversational agents.
Paragraph Summary
Schema-Mem is a long-term conversational memory framework inspired by schema theory in cognitive psychology. It aims to solve the problems of limited LLM context windows and the tendency of flat-text and coarse-grained summary memory to produce redundancy and fact drift. It extracts the key facts from each conversation turn into independent schema units, links new facts with historical units into a memory graph through hybrid lexical and semantic retrieval, and uses an LLM verification step to decide whether to update, supplement, or annotate temporal order when conflicts arise, thereby achieving incremental construction and continuous evolution of memory. In the generation stage, multi-source retrieval provides focused evidence for answers, improving factual reliability. Experiments on the LoCoMo and LongMemEval benchmarks validate its effectiveness, but the additional inference overhead from fact extraction and verification and the efficiency of graph maintenance remain trade-offs to be addressed in future engineering.
Related articles

Jensen Huang Testifies Before Congress: Key Takeaways on Chip Export Controls
NVIDIA CEO Jensen Huang faces questioning from the U.S. House Foreign Affairs Committee on AI chip export controls, commercial interests, and national security.

Tencent WorkBuddy in Practice: Building an AI Automated Testing Workbench with SKILL Capabilities
Based on Bilibili creator Baili Yang's sharing, this article analyzes how Tencent WorkBuddy AI agent desktop workbench can be used for automated testing: the shift from AI-assisted to AI-led, the relationship among large models, agents, and SKILL capabilities, zero-configuration installation and permission control, and practical ideas for building a personal AI automated testing workbench.

Adding Authentication to Remix SaaS Apps: A Practical Guide to WorkOS AuthKit
Based on the official WorkOS AuthKit guide, this article covers the full approach to integrating authentication in Remix or React Router SaaS apps, including session management, protected routes, multi-tenant organizations, enterprise SSO, and SCIM sync, and analyzes its engineering value for SaaS teams.