# Beyond RAG for Agent Memory: Retrieval by Decoupling and Aggregation

*Zhanghao Hu, Qinglin Zhu, Runcong Zhao, Di Liang, Hanqi Yan, Yulan He, Lin Gui*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/150607) · [Open on the map](../papers.html#p150607)

Category: [LLM Reasoning, Memory & RAG](../pcat/19.md) › [Agent Memory Compression and Retrieval](../pgroup/611.md) · Type: new method · Keywords: agent memory, retrieval augmentation, hierarchical memory, decoupling aggregation, LLM agents

Areas: [LLM Reasoning](../areas/reasoning.md) › Reasoning Strategies › Agent Memory and Reasoning; [Memory](../areas/memory.md) › Agent Memory Systems › Agent Memory; [Long Context](../areas/longcontext.md) › Long-context mechanisms › Agent memory representations; [AI Agents](../areas/agents.md) › Agent Capabilities › LLM Agent Memory; [Retrieval-Augmented Generation](../areas/rag.md) › Language Model Retrieval › Internal Retrieval Mechanisms

## Summary
xMemory introduces a hierarchical, revisable memory structure that decouples and aggregates agent interaction history to improve retrieval efficiency and answer quality.

## Explained to a 5-year-old
People talk to computer helpers a lot, and the computer needs to remember everything they said. When the robot wants to answer a question, it looks through all the past chats to find useful info. The usual way is like flipping through a big stack of papers, which often shows the same story over and over. This repetition makes the robot give answers that are not very helpful and sometimes miss tiny details that matter. The new idea is to first split the talks into small, separate events, then pull out the important facts and put similar ones together. Then when the robot needs to answer, it first looks at the big groups of facts, and only looks at the tiny details if it still needs more.

## Explained to a 5-year-old, longer
Imagine you have a robot friend that talks with you a lot and needs to remember everything you said. When the robot wants to answer a question, it looks through all the past chats to find useful info. The old way is like flipping through a big stack of papers, which often shows the same story over and over. This repetition makes the robot give answers that are not very helpful and sometimes miss tiny details that matter. The researchers thought it would be better to first break the chats into small, separate events, like each time you asked something. Then they took each event and pulled out the important facts, like promises, facts, or feelings, and put them aside. After that, they grouped similar facts together so that related ideas are stored near each other. They also made a rule that the groups should be both sparse (not too many) and faithful to the original meaning. The robot updates this organized memory as new chats come in, so it stays fresh. When the robot needs to answer, it first looks at the big groups of facts, which are like a quick summary. If the answer still feels uncertain, it then digs into the smaller pieces and even the raw chat messages. This way, the robot gets better answers faster and doesn't waste time on useless repeats.

## For a technical reader
The paper identifies a limitation of standard retrieval-augmented generation for agent memory: flat similarity search yields redundant context and summary-centric hierarchies lose fine-grained distinctions. It proposes a hierarchical memory organization that first segments interaction history into local events, extracts reusable components (facts, updates, details), and aggregates related components into high-level groups using a sparsity-semantic faithfulness objective. The structure is maintained incrementally, allowing the system to adapt as new interactions arrive without rebuilding the whole memory. At inference time, the system performs a top-down retrieval: it selects a compact backbone of complementary groups and components, expanding to raw segments only when additional evidence reduces uncertainty. Experiments on two benchmarks across multiple open-source and proprietary LLMs demonstrate consistent gains in answer quality and token-efficient inference, validated by analyses of redundancy, evidence density, and coverage.

## Problem
Agent memory consists of a bounded, coherent interaction stream where many spans are highly correlated or near duplicates, causing flat top-k retrieval to return redundant context while summary-centric hierarchies can obscure distinguishing details. This makes it difficult to retrieve both concise and precise information efficiently.

## Method
The approach builds a revisable hierarchical memory structure that segments interaction history into local events, decomposes each segment into reusable memory components, aggregates related components into high-level groups using a sparsity-semantic faithfulness objective, and updates the structure incrementally. At inference, it retrieves top-down by first selecting a compact backbone of complementary groups and components, then expanding to raw segments only when additional evidence reduces uncertainty.

## Results
The approach yields consistent improvements in answer quality and inference token efficiency across multiple LLMs, as shown by analyses of redundancy, evidence density, and coverage.

## Contributions
It proposes a principle of decoupling before aggregation for agent memory, introduces a hierarchical revisable memory structure that isolates reusable facts and distinguishing details, and demonstrates its effectiveness on benchmark tasks.

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/150607)
