Source-linked AI summary

From Retrieval to Reconstruction: Constructing Evolvable Cognitive Memory for Long-Term Dialogue

Zirui Liao, Zhengxian Wu, Zhuohong Chen, Yunyao Yu, Xiaoyu Liu, Yifan Xu, Haoqian Wang

arXiv:2610.11314v1cs.CL

TL;DR

Long-term dialogue agents need memory that can distinguish attributed beliefs from event and fact records and connect evidence across interactions. CogMem combines a provenance-aware graph, consolidation, and agentic graph retrieval; it performs particularly well on multi-hop, temporal, and knowledge-update tasks across two benchmarks.

  • Problem

    Flat retrieval can blur subjective opinions with event records, while static pipelines lack the flexibility to connect information across time.

    Source: §1 · p. 1
  • Method

    CogMem uses a PEC2F graph to separate attributed claims from events and facts, consolidate episodic evidence into semantic knowledge, and retrieve context through agentic graph operations.

    Source: §1 · pp. 1–2, §3.1 · p. 4, §3.3 · p. 6
  • Results

    CogMem outperforms strong baselines on LoCoMo and LongMemEval, particularly on multi-hop, temporal, and knowledge-update tasks.

    Source: §1 · p. 2
  • Takeaways & Limitations

    The findings suggest that long-term dialogue memory depends on preserving provenance and reconstructing evidence, not only storing more context.

    Source: §5 · p. 9

    Evaluation covers two English dialogue benchmarks and two LLM backbones, so it does not establish generalization to multilingual dialogue, noisy real-world conversations, or continuously deployed assistants.

    Source: §6 · pp. 9–10

Abstract

from arXiv · show

Large Language Models (LLMs) serving as long-term dialogue agents require memory systems that support reliable reasoning over extended interactions. However, existing Retrieval-Augmented Generation (RAG) frameworks typically treat memory as passive storage, making it difficult to distinguish source-attributed beliefs from unattributed event/fact records and to connect evidence dispersed across sessions. We introduce CogMem, a cognitive memory architecture based on the PEC$^2$F (Person-Event-Concept-Claim-Fact) graph schema. Dedicated Claim nodes preserve the source and target of subjective statements, while Fact and Event nodes represent semantic and episodic knowledge. Dialogue turns are incrementally converted into provenance-aware graph records, consolidated into higher-level facts, and reconciled into temporally scoped Claim views when the same source provides conflicting updates. For retrieval, a rule-based controller driven by LLM intent parsing composes four deterministic graph operators---anchoring, traversal, intersection, and evidence grounding---to reconstruct query-relevant context. Experiments on LoCoMo and LongMemEval show strong performance, especially on multi-hop, temporal, and knowledge-update tasks. Ablations and a semantic-collapse probe support complementary contributions from epistemic separation, consolidation, and agentic retrieval. Code: https://github.com/Silent-Rain02/CogMem.

1 Introduction

CogMem recasts long-term dialogue memory as active reconstruction, addressing the limits of flat retrieval for preserving attribution and connecting evidence across time. It combines a provenance-aware schema, memory consolidation, and graph-based active recall.

  • Flat retrieval can blur subjective opinions with event records and cannot adapt its search strategy to connect evidence across time.The paper calls opinion-record confusion Semantic Collapse and links it to risks for Theory-of-Mind reasoning.Source: §1 · p. 1
  • A Cognitive Search Agent uses graph operators, including intersection and temporal scanning, to navigate memory and reconstruct answers through dynamic reasoning paths.This shifts retrieval from static matching toward agentic active recall.Source: §1 · p. 2
  • CogMem outperforms strong baselines on LoCoMo and LongMemEval, particularly on multi-hop, temporal, and knowledge-update tasks.The paper frames its novelty as architectural and representational, within a unified training-free retrieval system.Source: §1 · p. 2
  • CogMem uses the PEC2F schema to distinguish source-attributed Claims from Event and Fact records, with Concepts providing semantic grounding.This separation is intended to address Semantic Collapse.Source: §1 · p. 2
  • Memory consolidation turns sparse episodic traces into dense semantic knowledge while retaining links to granular source evidence.The authors describe these semantic shortcuts as reducing reasoning overhead.Source: §1 · p. 2

2 Related Work

The related work spans retrieval-augmented generation, persistent agent memory, and cognitive architectures. It positions CogMem as a dialogue-reconstruction system combining provenance, consolidation, and explicit graph operations.

2 Related Work

  • The paper integrates insights from Retrieval-Augmented Generation, Agentic Memory, and Cognitive Science.Source: §2 · p. 2

2.1 Retrieval-Augmented Generation (RAG)

  • RAG can ground generation in retrieved context, but retrieval quality depends on surfacing the needed evidence and static ranking does not itself perform compositional reasoning.The cited graph-based approaches also do not explicitly distinguish source-attributed claims from event and fact records.Source: §2.1 · pp. 2–3

2.2 Memory Systems for Autonomous Agents

  • Agent memory systems address context management, structured storage, efficiency, or iterative recall, while CogMem targets long-term dialogue reconstruction through provenance, consolidation, and set intersection.The authors distinguish their system from another system also named CogMem.Source: §2.2 · p. 3

2.3 Cognitive Architectures and Theory of Mind

  • CogMem draws on Complementary Learning Systems and proposition-level attribution, targeting incremental dialogue ingestion, consolidation, and query-adaptive retrieval.It provides architectural support for Theory of Mind by separating source-attributed claims from unattributed event and fact records.Source: §2.3 · p. 3

3 Methodology

CogMem combines a person-centric PEC2F graph with agentic retrieval and offline consolidation to support epistemic separation, dynamic recall, and stable semantic memory.

3.1 Epistemic Completeness: The PEC2F Schema

  • PEC2F separates people, concepts, events, facts, and claims; Events represent specific interactions tied to time and place, while Facts record observed or self-reported attributes and habits.Claims represent subjective beliefs with explicit source and target, separating them from unattributed records.Source: §3.1 · pp. 3–4
  • In a 150-pair probe, flat RAG selected an attributed claim for a record query in 42.7% of cases, versus 6.0% with type-constrained PEC2F retrieval.The paired statements had mean cosine similarity 0.8231 with BGE-M3.Source: §3.1 · p. 4, Table 1 · p. 4

3.2 Active Plasticity: Agentic Retrieval via Cognitive Operators

  • A rule-based controller uses LLM-parsed intent to select graph operators after anchoring, then stops when evidence is sufficient or five controller steps are reached.The operators include traversal, intersection, and evidence grounding; routing varies for comparison, belief, temporal, and verification queries.Source: §3.2 · p. 5

3.3 Dynamic Stability via Memory Consolidation

  • Offline consolidation abstracts clusters of episodic interactions into Fact nodes with computed temporal envelopes, compressing semantic patterns while preserving their time boundaries.Synthesized Facts are linked to source episodes, enabling direct retrieval for high-level questions and episode-level lookup for specifics.Source: §3.3 · p. 6
  • Claim reconciliation orders updates only when source, target, and predicate match, marking views CURRENT, SUPERSEDED, or CONFLICTING while retaining original Claims and disagreements across speakers.Source: §3.3 · p. 6

4 Experiments

Experiments compare CogMem with memory and graph-retrieval baselines on LoCoMo and LongMemEval, finding strengths in multi-hop, temporal, and knowledge-update tasks. Ablations report complementary contributions from agentic navigation, Claim nodes, and consolidation, alongside trade-offs and remaining error sources.

4.2 Main Results

  • 48.42% F1 on Qwen2.5-14B Multi-Hop queries exceeds GAM (42.96%), RoG (41.80%), and HippoRAG (34.78%).The reported gains are consistent with intersection and traversal identifying shared concepts or events across entities and sessions.Source: Table 3 · p. 7, §4.2 · p. 8

4.1 Experimental Setup

  • Evaluation spans 10 LoCoMo conversations with about 1.5K question–answer pairs and 500 LongMemEval questions, using F1/BLEU-1 and judge accuracy, respectively.Experiments use GPT-4o-mini and Qwen2.5-14B-Instruct backbones.Source: §4.1 · p. 7
  • In blind human preference judgments on 50 LoCoMo Multi-Hop and Temporal queries, CogMem wins 68% of comparisons, ties 20%, and loses 12%.Two graduate-student annotators judged reasoning correctness and answer helpfulness, with disagreements adjudicated by a third annotator.Source: §4.1 · pp. 7–8

4.2 Main Results

  • CogMem achieves the highest overall LongMemEval accuracy with both backbones and edges the strongest competing methods on Open Domain under both backbones.Open Domain tests broad semantic recall rather than precise graph operations.Source: Table 4 · p. 8, §4.2 · p. 8
  • RoG performs competitively on Single-Hop but less well on Open Domain and Temporal questions; this is a zero-shot transfer comparison, not a fully fine-tuned comparison.RoG is evaluated with its pretrained checkpoint because the datasets lack training splits for path learning.Source: §4.2 · p. 8

4.3 Ablation Studies

  • Removing the agent drops Multi-Hop F1 by 25.61 points (48.42% →22.81%); removing Claim nodes cuts Knowledge Update accuracy by 16.41 points (73.08% →56.67%).The fixed pipeline is less effective on queries requiring adaptive operator selection.Source: Table 5 · p. 9, §4.3 · p. 9
  • Further analyses identify added graph storage as consolidation’s cost; remaining errors center on embedding drift, incomplete search scope, and temporal normalization.The analysis covers construction cost and graph growth, operator sensitivity, and manually categorized LoCoMo failures.Source: §4.3 · p. 9
  • Without consolidation, Multi-Hop F1 is 43.56%; consolidation also raises F1 by 4.86 points and reduces average reasoning steps from 3.42 to 2.67.Consolidated Fact nodes provide semantic shortcuts compared with traversing episodic Event nodes.Source: Table 6 · p. 9, §4.3 · p. 9

5 Conclusion

CogMem shifts long-term dialogue memory toward active reconstruction through a provenance-aware graph, periodic consolidation, and query-adaptive graph operators. It performs particularly well on multi-hop, temporal, and knowledge-update settings, while its trade-offs and remaining failure sources show that retrieval error is not eliminated.

5 Conclusion

  • CogMem combines a PEC2F schema separating source-attributed Claims from Event and Fact records, periodic consolidation, and a query-adaptive controller composing deterministic graph operators.The architecture is training-free and shifts memory from passive retrieval toward active reconstruction.Source: §5 · p. 9
  • Across LoCoMo and LongMemEval, CogMem performs particularly well on multi-hop, temporal, and knowledge-update settings, with ablations and a semantic-collapse probe supporting complementary component contributions.The paper concludes that reliable long-term memory depends on preserving provenance and reconstructing evidence through task-appropriate retrieval paths.Source: §5 · p. 9
  • Consolidation increases graph storage while reducing online reasoning steps, and remaining errors concentrate on embedding drift, incomplete search scope, and temporal normalization.The conclusion frames CogMem as making memory more structured, attributable, and auditable, not eliminating retrieval error.Source: §5 · p. 9

6 Limitations

The evaluation is bounded to two English long-term dialogue benchmarks and two LLM backbones, and the authors identify additional limits in the probe, human study, and retrieval design.

6 Limitations

  • CogMem has not established generalization to multilingual dialogue, noisy real-world conversations, or continuously deployed assistants.The evaluation covers two English benchmarks and two backbones.Source: §6 · pp. 9–10
  • The semantic-collapse probe is synthetic, while the human preference study covers 50 examples with two primary annotators and one adjudicator.The authors treat these analyses as supplementary to larger independent human evaluations.Source: §6 · p. 10
  • LongMemEval uses an LLM judge whose decisions may inherit model-specific biases despite following the benchmark’s official protocol.Source: §6 · p. 10
  • The current schema omits dynamic user goals and emotion vectors, which the authors identify as possible additions for representing evolving intent and affect.Source: §6 · p. 10
  • The Search Agent uses fixed hand-crafted operators; neural tool learning and learned composite operators are proposed as future directions.The authors give counterfactual search for conflicting claims as an example.Source: §6 · p. 10
  • Consolidation currently runs periodically offline, leaving a delay before events become generalized knowledge; incremental updates are a proposed future direction.Source: §6 · p. 10

7 Ethical Considerations

The paper discusses risks from storing sensitive dialogue and describes the experimental infrastructure, models, and baseline configurations used in its evaluation.

7 Ethical Considerations

  • Sensitive dialogue records create risks of profiling, surveillance, data leakage, memory poisoning, and bias amplification during consolidation.The authors call for safeguards including encryption, auditing, user-controlled retention and deletion, provenance inspection, and defenses against indirect prompt injection.Source: §7 · p. 10

A.1 Hardware Infrastructure

  • Experiments ran on a node with four NVIDIA A800 GPUs, a 48-core CPU, and 720GB RAM.Source: §A.1 · p. 12

A.2 Model Configurations

  • The evaluation used GPT-4o-mini through the OpenAI API and locally deployed Qwen2.5-14B-Instruct; BGE-M3 supplied vector embeddings.The authors note that using one embedding model reduces representation-quality variation, while other architectural and implementation differences remain.Source: §A.2 · p. 12

A.3 Baseline Settings

  • Baselines used varied retrieval configurations, including 512-token Naive RAG chunks, LightMem’s compression and consolidation pipeline, and GAM’s retrieval of up to 20 pages.Their intermediate computational budgets could not be matched exactly because the methods expose different storage and retrieval operations.Source: §A.3 · pp. 12–13

A.4 Dataset Details and Evaluation Metrics

The evaluation uses LoCoMo and LongMemEval with metrics suited to their reasoning and consistency tasks, alongside a supplementary human comparison. Operator sensitivity analyses examine how retrieval limits and depth affect LoCoMo performance.

A.4 Dataset Details and Evaluation Metrics

  • LoCoMo covers Single-Hop, Multi-Hop, Temporal, and Open Domain reasoning; the evaluation reports category-level results and prioritizes macro-averaged comparisons.LongMemEval tests memory stability, consistency, evolving user states, and conflict resolution using Acc under an LLM-as-a-judge protocol that may be subject to judge-model bias.Source: §A.4 · p. 13

A.5 Human Evaluation Protocol

  • CogMem wins 68%, ties 20%, and loses 12% of 50 masked CogMem–GAM comparisons, with graduate-student annotators judging reasoning correctness and answer clarity.The authors treat this small, single-institution-background study as supplementary rather than a replacement for benchmark metrics.Source: §A.5 · p. 13

B Operator Sensitivity Analysis

  • The sensitivity analysis varies retrieval limit K and search depth D using Qwen2.5-14B on the post-consolidation graph, reporting weighted overall F1.The full hyperparameter setting scores 57.04, rounded to 57.0 in Table 11.Source: B Operator Sensitivity Analysis · pp. 13–14

B.1 Anchoring Operator Sensitivity

  • At K = 3, anchoring causes a 4.6-point drop from the best setting; performance saturates at K = 15–18, then marginally degrades.The prose attributes the low-K drop to missing graph entry points and the later decline to noise and increased context load.Source: §B.1 · p. 14, Table 7 · p. 14

B.2 Traversal Operator Sensitivity

  • Depth 2 yields the highest observed LoCoMo score, while depth 1 is insufficient and depths 3 or 4 add context without improving F1.For neighbor limit, K = 15 is the optimal balance; K = 5 truncates potential reasoning paths, and larger limits slightly regress.Source: §B.2 · p. 14, Table 9 · p. 14, Table 8 · p. 14

B.3 Intersection Operator Sensitivity

  • At K = 10, the Intersection Operator performs best; expanding beyond K > 15 reduces F1 while increasing computational cost.The analysis suggests salient commonalities are usually in top-ranked connections.Source: §B.3 · p. 14, Table 10 · p. 14

C Detailed Ablation: Agentic vs. Fixed Flow

The analysis compares agentic retrieval with a fixed pipeline, examines consolidation’s graph and computational effects, and characterizes CogMem’s efficiency. The reported comparison favors the agentic approach, while consolidation retains source records and adds graph structure.

C Detailed Ablation: Agentic vs. Fixed Flow

  • Weighted overall F1 decreases by 65.4% relative under Fixed Flow, while the Cognitive Agent averages 2.65 tool invocations versus 3.00.Fixed Flow executes three rigid steps without self-correction or topological intersection; the agent can terminate early on sufficient evidence or invoke intersection for commonality queries.Source: C Detailed Ablation: Agentic vs. Fixed… · p. 15, Table 11 · p. 15

D.1 Graph Structure Evolution

  • Consolidation adds 540 nodes and 4,708 edges by retaining original Events and attributed records while adding Fact nodes and temporally scoped Claim views.This additive-evidence strategy keeps source utterances available for verification to limit error propagation, but increases storage footprint.Source: §D.1 · p. 15, Table 12 · p. 15

D.2 Computational Cost vs. Benefit

  • Consolidating LoCoMo costs 537.85 seconds and about 0.79M tokens before prompt-caching optimization; optimized accounting records 652k backbone tokens.The reported online benefit is a 21.9% reduction in Multi-Hop inference steps (3.42 →2.67) and a 4.86-point F1 gain.Source: §D.2 · pp. 15–16

E.1 Theoretical Complexity

  • Approximate-nearest-neighbor anchoring grows with graph-node count, but traversal after anchor selection is bounded by controller budget and local degree rather than scanning all dialogue history.The analysis distinguishes one-time memory construction from recurring inference.Source: §E.1 · p. 16, E Efficiency and Cost Analysis · p. 16, Table 13 · p. 16

E.2 Memory Construction Cost

CogMem’s memory construction uses fewer backbone tokens than the displayed agentic baselines under the reported accounting, while its iterative inference phase consumes more online tokens than a single-pass retriever.

E.2 Memory Construction Cost

  • Indexing used 926k tokens and consolidation used 652k tokens.Source: §E.2 · p. 16
  • LightMem is excluded from the token-only comparison because a separate compression model handles part of its processing.Backbone-LLM tokens alone would not measure the same computational components across systems.Source: §E.2 · p. 16
  • 1,578k total construction tokens; CogMem used fewer backbone tokens than A-MEM (1,626k), Mem0 (1,799k), and MemoryOS (2,992k).The comparison is an empirical resource measurement, not a controlled complexity result.Source: Table 14 · p. 16, §E.2 · p. 16

E.3 Inference (QA) Overhead

  • 10.19M tokens across 1,542 LoCoMo questions, averaging 6,610 tokens per query, were consumed during inference.Source: §E.3 · p. 16
  • Optimized system-prompt caching reduces repeated input overhead, although the iterative agent consumes more online tokens than a single-pass retriever.Source: §E.3 · p. 16

F Qualitative Analysis: Reasoning Trajectories

The qualitative trajectories illustrate operator selection across single-hop, multi-hop, open-domain, and temporal queries. The error analysis identifies distinct retrieval and representation failures across task categories.

F Qualitative Analysis: Reasoning Trajectories

G.1 Single-hop Queries: Tool Selection and Semantic Retrieval

  • 28% of single-hop errors involved vector semantic drift, while 24% involved suboptimal tool selection.The analysis attributes tool-selection errors to confusion between attribute and fact retrieval.Source: §G.1 · p. 17

G.2 Multi-hop Queries: Search Scope and Granularity Loss

  • 20% of multi-hop errors involved incomplete search scope, and 12% involved schema granularity loss.Source: §G.2 · p. 18
  • 12% of multi-hop errors followed consolidation that abstracted specific qualifiers, and the agent traversed Evidence Mounting links in only 34% of relevant cases.Source: §G.2 · p. 18

G.3 Temporal Queries: Normalization Failures

  • 44% of temporal errors involved temporal normalization failures, the highest concentration among the analyzed categories.The ingestion module stored the session date but did not resolve relative expressions such as “last year” against the dialogue timestamp.Source: §G.3 · p. 18

G.4 Open-domain Queries: Embedding Dominance

  • 32% of open-domain errors involved semantic drift associated with reliance on vector similarity for unstructured content.Broad predicates can leave retrieval dependent on embedding similarity, which conflated leisure activities with volunteer work in the described case.Source: §G.4 · pp. 18–19

G.5 Implications for Architecture Design

The error analysis identifies trade-offs involving consolidation detail, search coverage, and embedding quality. The prompts specify how CogMem classifies dialogue records, selects retrieval tools, and consolidates episodic and attributed information.

G.5 Implications for Architecture Design

  • 11% of sampled errors involved granularity loss, 15% incomplete search scope, and 23% vector semantic drift overall.The discussion proposes conditional consolidation, automatic node-type expansion, and hybrid lexical–dense retrieval as possible responses.Source: §G.5 · p. 19

H.1 Ingestion Phase Prompts

  • Ingestion prompts distinguish unattributed or self-reported Event and Fact records from source-attributed Claims; Fact is an operational record type, not independently verified truth.Source: §H.1 · p. 19

SEARCH AGENT PROMPT (Cognitive Strategy)

H.3 Consolidation Phase Prompts

  • Consolidation prompts synthesize clustered Events into generalized Facts with validity intervals and reconcile conflicting Claims while preserving original Claim IDs and evidence spans.Source: §H.3 · p. 20
Loading 2610.11314v1…