E-mem: Multi-agent based Episodic Context Reconstruction for LLM Agent Memory

Kaixiang Wang, Yidan Lin, Jiong Lou, Zhaojiacheng Zhou, Bunyod Suvonov, Jie Li · DOI

TL;DR

E-mem is a novel memory framework that moves away from "compressing" LLM history into embeddings and instead focuses on "reconstructing" raw episodic contexts. By using a hierarchical multi-agent system where small models (assistants) reason locally on raw data to feed a master model, E-mem achieves state-of-the-art accuracy on complex reasoning tasks while slashing token costs by over 70%.

What Problem Does This Paper Address?

As LLM agents move toward "System 2" reasoning—the kind of slow, deliberative thinking required for complex problem-solving—they need to maintain perfect logical integrity over long conversations.

Current memory systems (like standard RAG or knowledge graphs) rely on destructive de-contextualization. They take raw text and immediately turn it into fixed summaries or vector embeddings. This process "severs" the causal chains and sequential dependencies hidden in the original text. When the agent later retrieves these "fragments," it often lacks the full context needed for deep reasoning, leading to the "Lost-in-the-Middle" phenomenon or simple hallucinations.

Methods

The authors propose E-mem, a framework inspired by biological "engrams" (the physical traces of memory in the brain). Instead of pre-processing memory into a lossy format, E-mem preserves the raw experience.

Key components include:

  • Heterogeneous Hierarchical Architecture: A "Master Agent" (a large model like GPT-4o) handles high-level planning, while multiple "Assistant Agents" (lightweight Small Language Models or SLMs) act as memory nodes.
  • Sliding Window with Overlap: Memory is stored in raw text blocks with overlapping "buffers" to ensure continuity and prevent logical breaks at the edges of chunks.
  • Multi-Pathway Routing: To find the right memory, E-mem uses three parallel signals:
  • Global Alignment: High-level summaries.
  • Semantic Association: Vector embeddings of raw chunks.
  • Symbolic Trigger: Keyword/entity matching (like BM25).
  • Episodic Context Reconstruction: Once a memory chunk is "activated," the Assistant Agent doesn't just return the text. It "re-experiences" the raw context, performs local reasoning to extract specific evidence, and sends only that refined evidence to the Master Agent.
  • Latent State Caching: To reduce latency, the system can cache Key-Value (KV) tensors, allowing assistants to "wake up" and resume reasoning almost instantaneously.

Datasets

The researchers evaluated E-mem on two challenging benchmarks:

  1. LoCoMo: A benchmark for long-term memory in multi-session dialogues, featuring tasks like multi-hop retrieval and temporal reasoning.
  2. HotpotQA: A classic multi-hop QA dataset, which the authors adapted into a streaming, long-context format (up to 1,600 documents/200k+ tokens) to test scalability.

Key Insights and Ideas

  • Reasoning vs. Retrieval: The core "aha" moment is that memory shouldn't be a passive lookup table. By letting small models reason locally on raw text, the system preserves the "connective tissue" of a story or argument that embeddings usually destroy.
  • SLMs are "Good Enough" for Local Tasks: You don't need a massive model to look at a 4k-8k token chunk and answer "What did Caroline say about her home country here?" Using SLMs for this task makes the system incredibly cost-effective.
  • The "Latest State" Rule: The Master Agent is prompted to resolve conflicts by prioritizing later timestamps (e.g., if a memory says "the keys are in the drawer" at 10:00 and "the keys are on the table" at 10:05, it knows the table is the current truth).

Key Results

  • Superior Accuracy: E-mem achieved over 54% F1 score on LoCoMo, outperforming the previous state-of-the-art (GAM) by 7.75%.
  • Reasoning Gains: The biggest improvements were in Multi-hop (+8.56%) and Temporal reasoning (+8.87%), where preserving the original sequence of events is critical.
  • Massive Cost Savings: Despite the extra reasoning steps, E-mem reduced the "normalized token cost" by over 70% compared to standard baselines. Compared to a "Full-Context" window approach, it represents a 43x reduction in cost.
  • Robustness: In adversarial tests (LoCoMo's noise-heavy subset), E-mem maintained a peak F1 of 95.74%, proving it can filter out "distractor" memories effectively.

Limitations and Future Work

  • Latency Trade-off: Because the system performs "on-the-fly" reconstruction and reasoning within the assistant agents, it is slower than simple vector retrieval. Reasoning and answering can take 18–22 seconds for complex queries.
  • Granularity Sensitivity: The system performs best with 8K token chunks. If chunks are too small (4K), the system gets overwhelmed by fragments; if too large (32K), it suffers from "attention dilution."
  • Future Direction: The authors suggest an Adaptive Hybrid Framework. This would use a "Fast Mode" (standard RAG) for simple fact-finding and a "Deep Research Mode" (E-mem) for complex, multi-step logical deduction.

Summary updated

BibTeX
@inproceedings{wang2026e,
  author = {Kaixiang Wang and Yidan Lin and Jiong Lou and Zhaojiacheng Zhou and Bunyod Suvonov and Jie Li},
  title = {{E-mem: Multi-agent based Episodic Context Reconstruction for LLM Agent Memory}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=FAjA0snAYq},
}
Figure