TL;DR
MemFly is a novel memory framework for LLM agents that uses Information Bottleneck principles to solve the "compression vs. fidelity" trade-off. By organizing memory into a hierarchical structure (Notes-Keywords-Topics) and using an LLM-driven optimizer to merge redundant data on-the-fly, it achieves state-of-the-art performance in long-term reasoning and retrieval.
What Problem Does This Paper Address?
As LLM agents evolve from simple chatbots into autonomous assistants, they need to remember past interactions over long periods. However, current memory systems face a "fundamental dilemma":
- Retrieval-centric approaches (like standard RAG) keep every detail. This leads to "noise" and redundancy, making it harder for the model to find the right needle in an ever-growing haystack.
- Memory-augmented approaches use summarization to save space. While efficient, they often "summarize away" the fine-grained details needed for precise reasoning.
The authors argue that memory management is essentially an Information Bottleneck (IB) problem: how do you compress observations as much as possible while preserving only the information relevant for future tasks?
Methods
MemFly introduces a structured, "on-the-fly" evolution of memory through three main components:
1. The Stratified Memory Hierarchy
Instead of a flat list of documents, MemFly builds a three-layer structure:
- Notes (Fidelity Layer): Denoised, atomic units of information that preserve raw details.
- Keywords (Anchoring Layer): Symbolic anchors that bridge the gap between raw text and high-level concepts.
- Topics (Navigation Layer): Macro-clusters of keywords (organized via the Leiden community detection algorithm) that allow the agent to navigate memory quickly.
2. LLM as a "Gradient-Free Optimizer"
To decide what to do with new information, MemFly uses an LLM to approximate Jensen-Shannon divergence (a measure of how much information two sets share). Based on this, the system performs one of three gated operations:
- Merge: If the new info is highly redundant, it’s fused into an existing note.
- Link: If the info is new but logically related, a topological edge is created to support multi-hop reasoning.
- Append: If the info is entirely distinct, it’s saved as a new autonomous unit.
3. Tri-Pathway Retrieval & IER
When a query comes in, MemFly doesn't just do a vector search. It traverses three paths simultaneously: Macro-semantic (via Topics), Micro-symbolic (via Keywords), and Topological (following the links between notes). If the initial results aren't enough, an Iterative Evidence Refinement (IER) protocol generates follow-up sub-queries to dig deeper into the memory graph.
Datasets
The researchers evaluated MemFly using the LoCoMo benchmark, a dataset specifically designed to test long-term information synthesis. Unlike simple Q&A, LoCoMo features:
- Long-horizon conversations.
- Interleaved topics.
- Evolving entity states (where facts change over time).
The evaluation covered five categories: Multi-Hop, Temporal, Open Domain, Single Hop, and Adversarial reasoning.
Key Insights and Ideas
- Principled Forgetting: By grounding memory in Information Bottleneck theory, the authors provide a mathematical reason for why certain data should be merged or kept, rather than relying on arbitrary summarization.
- The Double Clustering Principle: The paper applies a classic information theory concept—clustering the "feature space" (keywords) before clustering the "data space" (notes)—to make the memory structure much more robust against the "noise" of high-dimensional embeddings.
- Symbolic Anchoring: Using keywords as intermediate anchors prevents "vector dilution," a common problem where similar-sounding but unrelated concepts get blurred together in a standard vector database.
Key Results
MemFly was tested against heavyweights like MemGPT, ReadAgent, and A-MEM across multiple models (GPT-4o, Qwen3-8B/14B).
- Superior Accuracy: On the Qwen3-8B model, MemFly achieved a 38.62% F1 score, outperforming the strongest baseline (A-MEM) by a massive 5.86 points.
- Efficiency in Navigation: The Topic-based navigation was particularly effective for "Open Domain" queries, where the agent needs to find information across vast, unrelated conversation turns.
- Robustness: The system showed significant gains in "Adversarial" tasks, proving that its structured approach is better at filtering out distracting or misleading information than flat retrieval methods.
Limitations and Future Work
- Computational Overhead: Because the system performs "computation-on-construction" (using an LLM to evaluate every new piece of info), it is slower to ingest data than a simple database.
- Text-Only: The current framework is limited to textual data. The authors suggest that extending this to multi-modal inputs (images, video) is a promising next step.
- Domain Specificity: While it performs well on general benchmarks, the authors note that testing in specialized fields like medicine or law remains for future investigation.
Summary updated