Source-linked AI summary
StructMem: Structured Memory for Long-Horizon Behavior in LLMs
Buqiang Xu, Yijun Chen, Jizhan Fang, Ruobin Zhong, Yunzhi Yao, Yuqi Zhu, Lun Du, Shumin Deng
TL;DR
Long-term conversational memory must support temporal and multi-hop reasoning, but flat memory loses relational structure while graph memory is costly and fragile. StructMem uses hierarchical event-centric representations with temporal anchoring and periodic semantic consolidation, achieving stronger reasoning and lower resource use on LoCoMo. Its scope remains limited by prompt-dependent extraction and the lack of explicit conflict resolution or memory updating.
Problem
Long-horizon agents need memory that preserves temporal and relational dependencies, whereas flat and graph-based systems respectively sacrifice structure or efficiency and robustness.
Method
StructMem hierarchically binds dual-perspective factual and relational entries to timestamps and periodically consolidates semantically related events into cross-event structure.
Results
StructMem achieves better LoCoMo performance in multi-hop and temporal reasoning while substantially reducing token consumption, API calls, and runtime versus prior memory systems.
Takeaways & Limitations
Hierarchical event-level binding and cross-event consolidation provide structure-enriched memory without the computational overhead of continuous graph maintenance.
Takeaways & Limitations
StructMem depends on instruction quality for dual-perspective extraction and lacks explicit conflict resolution and memory updating for evolving user information.
Abstract
from arXiv · showhide
Long-term conversational agents need memory systems that capture relationships between events, not merely isolated facts, to support temporal reasoning and multi-hop question answering. Current approaches face a fundamental trade-off: flat memory is efficient but fails to model relational structure, while graph-based memory enables structured reasoning at the cost of expensive and fragile construction. To address these issues, we propose \textbf{StructMem}, a structure-enriched hierarchical memory framework that preserves event-level bindings and induces cross-event connections. By temporally anchoring dual perspectives and performing periodic semantic consolidation, StructMem improves temporal reasoning and multi-hop performance on \texttt{LoCoMo}, while substantially reducing token usage, API calls, and runtime compared to prior memory systems, see https://github.com/zjunlp/LightMem .
1 Introduction
Long-horizon dialogue requires memory that preserves temporal and relational structure beyond isolated factual recall. StructMem addresses the efficiency–structure trade-off with hierarchical event-centric memory and improves reasoning while reducing computational overhead.
- Long-term agents need memory representations that organize events into temporally grounded and relational structures for temporal, causal, and multi-hop reasoning.
- Flat memory stores independent facts or summaries, while graph memory preserves relations but incurs construction cost, cascaded inference, and extraction errors.
- StructMem treats temporally grounded relational events as the fundamental memory unit, preserving causal and interpersonal context without rigid schemas.
- StructMem extracts dual perspectives at the event level and periodically consolidates semantically related events to induce higher-level relational structure.
- StructMem improves long-horizon reasoning on LoCoMo while significantly reducing computational overhead compared with prior memory systems.
2 Related Work
Prior work progresses from flat retrieval toward graph and hierarchical memory structures, but explicit graphs trade semantic fidelity and robustness for relational reasoning. Structure-enriched alternatives seek consolidation without rigid schemas or continuous per-turn overhead.
- Flat vector databases efficiently support semantic matching but treat interaction history as an unordered set, severing temporal, causal, and relational dependencies.
- Graph-based systems support global sense-making, multi-hop traversal, and evolving interaction schemas through static and dynamic knowledge-graph approaches.
- Explicit graph structures can cause semantic loss, propagate hallucinated relations, and introduce latency through continuous graph maintenance.
- Hierarchical text segmentation and reflective per-turn reasoning offer structured consolidation, but their designs respectively depend on session boundaries or continuous overhead.
3 Method
StructMem builds hierarchical memory by binding factual and relational information within timestamped events, then connecting related events through periodic semantic consolidation. Its synthesis layer forms cross-event relational hypotheses while preserving raw episodic memory.
- 3 Method: StructMem has two levels: event-level structure preserves relational bindings within utterances, while cross-event structure connects information across temporal boundaries.
- 3.1 Event-Level Binding: Event-level binding extracts factual content and interpersonal, causal, and temporal relations from each utterance using complementary perspectives.
- 3.1 Event-Level Binding: Entries remain natural-language representations rather than rigid triplets, preserving contextual nuance while avoiding entity-resolution overhead.
- 3.1 Event-Level Binding: All factual and relational entries are anchored to their originating timestamp, enabling complete event reconstruction during retrieval.
- 3.2 Cross-Event Consolidation: Cross-event consolidation buffers entries, retrieves semantically similar historical seeds, reconstructs their timestamp-matched event contexts, and combines them with buffered events.
- 3.2 Cross-Event Consolidation: Synthesis operates on semantically reconstructed event clusters to form cross-event relational hypotheses while preserving raw episodic memory fidelity.
4 Experiments
Experiments on LoCoMo compare StructMem with multiple memory paradigms and analyze both its efficiency and hierarchical reasoning mechanisms. StructMem improves performance across task types while reducing resource costs through periodic consolidation and cross-event structure.
- Experimental Setup: StructMem is evaluated on LoCoMo using LLM-as-a-judge effectiveness metrics and token usage, API calls, and runtime for construction efficiency.The comparison includes RAG-based, flat-memory, and structural-memory baselines using the same backbone and embedding model.
- Results: StructMem achieves state-of-the-art overall LoCoMo performance, with substantial gains in multi-domain and temporal reasoning.The reported gains are attributed to cross-event connections that support causal relationships across dialogue sessions.
- Results: StructMem reduces token consumption and API calls compared with existing memory systems by avoiding expensive post-hoc graph construction.The results remain consistent across multiple judge models.
- Paradigm Comparison: Event-level structure improves temporal reasoning and single-session performance, while cross-event structure yields further gains by capturing cross-temporal causal relationships.The paradigm comparison finds these improvements consistent across task types, unlike graph memory's decrease on temporal reasoning.
- Efficiency Analysis: Graph construction uses four cascading LLM operations per event with quadratically growing deduplication overhead, whereas StructMem batches related events during periodic synthesis.Buffered consolidation exploits temporal locality to replace per-event cross-event organization with periodic batch processing.
- Internal Mechanisms: Flat retrieval performance peaks at 60 entries and plateaus, while cross-event synthesis produces substantial gains beyond the flat-retrieval ceiling.The internal analysis links the plateau to a reasoning bottleneck rather than insufficient retrieval coverage and reports grounded synthesized connections.
5 Conclusion
StructMem organizes memory hierarchically to preserve event-level bindings and enable cross-event consolidation. On LoCoMo, it delivers stronger multi-hop and temporal reasoning while reducing resource use relative to prior memory systems.
- Conclusion: StructMem preserves temporal and relational structures through event-level bindings and cross-event consolidation without continuous graph-maintenance overhead.Its hierarchical design provides structure-enriched organization across events and temporal boundaries.
- Conclusion: StructMem achieves better multi-hop and temporal reasoning performance while substantially reducing token consumption, API calls, and runtime compared with prior memory systems.The conclusion reports both reasoning gains and lower computational overhead.
Limitations
StructMem's extraction quality depends on instruction prompts, and the framework lacks explicit conflict resolution and memory updating for evolving user information.
- Extraction Robustness: Dual-perspective extraction depends heavily on instruction prompts, so suboptimal prompts may produce incomplete or inaccurate relational information.The paper suggests automated prompt optimization as a future robustness direction.
- Memory Updating: StructMem lacks an explicit conflict-resolution and memory-updating mechanism, which may leave historical summaries inconsistent with newer user facts or preferences.The paper proposes memory decay or updating strategies for future iterations.
A.1 License
The work uses the publicly available LoCoMo benchmark under the dataset authors' academic-research usage terms.
- License: The LoCoMo benchmark is publicly available for academic research, and the work follows the dataset authors' usage terms.The statement concerns the dataset license and usage conditions.
A.2 Dataset
The evaluation uses LoCoMo’s long-term conversations and question-answering benchmark statistics to assess memory systems across four reasoning types.
- LoCoMo contains 10 long-term conversations averaging 588 turns and 16,618 tokens per conversation.
- The evaluation focuses on question answering across four reasoning types, with question statistics summarized in Table 3.
- Performance is evaluated using an LLM-as-a-judge protocol.
A.3 Implementation Details
StructMem uses threshold-based consolidation and bounded retrieval during memory construction and question answering.
- Consolidation is triggered when the time window reaches 1 hour.
- Cross-event consolidation retrieves the top-15 semantically similar seed entries from historical memory.
- Question answering retrieves 60 memory entries and 5 synthesis results to provide generation context.
A.4 Baseline Configurations
The configurations compare retrieval and memory architectures while auditing evaluation reliability, extraction fidelity, grounding constraints, and temporal reasoning behavior.
- Baseline Configurations: FullContext scans the entire raw dialogue in reverse chronological order, whereas OpenAI concatenates all turns as flat unordered text without retrieval.
- Baseline Configurations: MiniRAG and LightRAG retrieve top-20 entries, A-MEM and LangMem retrieve top-40 entries, and API systems retrieve top-10 memories per speaker.
- Baseline Configurations: MemoryOS combines exhaustive short-term recall with staged mid-term selection and top-10 long-term retrieval.
- Robustness of Evaluation: Fleiss’ κ reaches 0.8341, while judge-pair correlations exceed r > 0.81 with p < 10^-300, supporting stable automated evaluation.
- Fidelity and Hallucination Study: Event-level extraction has a mean hallucination rate of 2.36%, supporting fidelity to the source context.
- Fidelity and Hallucination Study: Removing timestamp citations and concrete dependency requirements increases hallucination rates across judge models, whereas constrained synthesis preserves source grounding.
- Case Study: StructMem’s relational entries and synthesis recover implicit temporal connections that graph construction leaves isolated, enabling the correct temporal inference in the case study.