TL;DR
The paper introduces LATENTGRAPHMEM, a novel memory framework for Large Language Models (LLMs) that bridges the gap between stable, efficient latent memory and interpretable, structured explicit memory. By storing a graph-structured memory in a continuous latent space and retrieving only a compact, symbolic subgraph for downstream reasoning, it achieves state-of-the-art performance on long-context question answering (QA) while maintaining human-inspectable transparency and stable inference times.
What Problem Does This Paper Address?
As LLMs are increasingly deployed in long-horizon tasks—such as multi-agent collaboration or long-chain reasoning—they must reliably extract sparse evidence scattered across thousands of tokens of noisy context. Existing memory architectures generally fall into two flawed paradigms:
- Explicit Structured Memories: These systems (e.g., external knowledge graphs) extract and store human-readable symbolic facts. While highly interpretable, they are brittle; long and noisy contexts cause structure induction to fail, and symbolic retrieval becomes highly sensitive to query variations.
- Implicit/Latent Memories: These systems compress information directly into continuous vector representations. They are highly efficient and stable under long-context overload, but they act as uninspectable black boxes, making it impossible to verify why a model retrieved a specific piece of evidence.
As shown in preliminary experiments, explicit structured approaches frequently underperform even basic baseline memory systems due to this long-context overload.
Methods
LATENTGRAPHMEM addresses these challenges by decoupling memory storage from reasoning through a three-stage pipeline consisting of a trainable graph builder, a subgraph retriever, and a frozen LLM reasoner:
- Stage I: Remote-Supervised Full-Graph Construction: The graph builder processes long documents sequentially in streaming chunks. It extracts candidate triples (subject, relation, object) and maintains an evolving global graph state. Hard capacity limits (e.g., a global edge cap $M$) are enforced to prevent graph explosion.
- Stage II: Remote-Supervised Latent Subgraph Retrieval: The extracted graph edges are mapped into continuous latent embeddings. Conditioned on a query, the retriever uses a differentiable top-$k$ selection mechanism (via a straight-through estimator) to identify a compact subset of edges within a strict retrieval budget $k$.
- Stage III: Joint Fine-Tuning: The builder and retriever are jointly optimized using stable alternating updates to maximize their coordination, ensuring the builder produces embeddings that are easy for the retriever to navigate.
During inference, the full graph is never serialized into the prompt. Instead, retrieval happens entirely in the latent space, and only the compact, explicit subgraph is externalized as text to guide the frozen reasoner.
Datasets
The authors constructed a robust training and evaluation setup using established benchmarks:
- Training Corpora: 20,800 instances compiled from TriviaQA (open-domain QA with long, heterogeneous evidence), QASPER (QA over full scientific papers), and QuALITY (multiple-choice questions requiring global comprehension of long articles).
- Evaluation Corpora: A fixed 2,600-instance mixture of completely unseen datasets to test generalization: HotpotQA and WikiHop (stressing multi-hop reasoning across documents) and NarrativeQA (probing long-form narrative understanding).
Key Insights and Ideas
- The Hybrid Sweet Spot: Storing the graph implicitly provides robustness against noise and long-context overload, while exposing the retrieved results explicitly preserves the debugging and verification benefits of symbolic systems.
- Decoupled Scaling: Because the memory modules output explicit text subgraphs, the framework allows parameter-efficient adaptation (using LoRA on a small 1.5B builder/retriever) that seamlessly scales up to larger, completely frozen reasoners (up to 8B) without retraining the memory component.
- Constant-Time Scaling: Performing retrieval in the latent space under a fixed budget prevents inference latency from scaling quadratically with context length, avoiding the computational explosion typical of vanilla long-context LLMs.
Key Results
- Downstream Accuracy: LATENTGRAPHMEM consistently outperformed both explicit-graph (e.g., A-Mem, Mem0) and latent-memory (MemGen) baselines. It achieved the best average accuracy across all evaluated reasoner scales: 56.08% with Qwen2.5-1.5B, 58.64% with SmolLM3-3B, and 63.34% with Qwen3-8B.
- Inference Efficiency: While explicit methods like A-Mem show highly unstable and sharply increasing latency as context grows (leaping to 44.65 seconds at 9k tokens), LATENTGRAPHMEM maintains a stable inference time (~13.78 seconds at 10k tokens), closely matching purely latent methods.
- Structural Ablations: Ablation studies confirmed that directly reasoning over a full graph degrades performance due to noise, proving the necessity of budgeted subgraph retrieval.
- Qualitative Success: In case studies involving sparse, dispersed temporal evidence, explicit baselines failed to retrieve all necessary facts, and latent baselines produced unverifiable answers. LATENTGRAPHMEM successfully isolated the exact compact subgraph needed for a correct comparison.
Limitations and Future Work
The authors note that performance remains dependent on the initial quality of the graph construction module. Furthermore, the global graph capacity ($M$) and retrieval budget ($k$) are currently fixed hyperparameters that may require manual tuning for tasks with different evidence densities.
Currently, the framework is strictly text-based and optimized for question answering. The authors highlight extending this implicit-graph, explicit-retrieval approach to multimodal inputs and interactive multi-agent reasoning environments as promising directions for future work.
Summary updated