Abstract
Most evaluations of External Memory Module assume a static setting: memory is built offline and queried at a fixed state. In practice, memory is streaming: new facts arrive continuously, insertions interleave with retrievals, and the memory state evolves while the model is serving queries. In this regime, accuracy and cost are governed by the full memory lifecycle, which encompasses the ingestion, maintenance, retrieval, and integration of information into generation. We present Neuromem, a scalable testbed that benchmarks External Memory Modules under an interleaved insertion-and-retrieval protocol and decomposes its lifecycle into five dimensions including memory data structure, normalization strategy, consolidation policy, query formulation strategy, and context integration mechanism. Using three representative datasets LOCOMO, LONGMEMEVAL, and MEMORYAGENTBENCH, Neuromem evaluates interchangeable variants within a shared serving stack, reporting token-level F1 and insertion/retrieval latency. Overall, we observe that performance typically degrades as memory grows across rounds, and time-related queries remain the most challenging category. The memory data structure largely determines the attainable quality frontier, while aggressive compression and generative integration mechanisms mostly shift cost between insertion and retrieval with limited accuracy gain.
Introduction
Traditional evaluations of Large Language Model (LLM) memory modules often operate in a "static" vacuum, where a database of facts is constructed offline before a batch of queries is processed. However, real-world applications—such as medical assistants or autonomous agents—operate in a streaming environment. In these scenarios, new information arrives continuously, facts evolve, and the system must seamlessly interleave the ingestion of new data with the retrieval of relevant historical context.
Current evaluation frameworks often treat memory modules as "black boxes," making it difficult to isolate which specific design choices (e.g., storage structure vs. query rewriting) drive performance. Neuromem addresses this gap by providing a granular decomposition of the memory lifecycle, allowing researchers to analyze the trade-offs between accuracy and latency as memory scales over long interaction periods.
The Neuromem Framework
Neuromem introduces a modular architecture that decomposes the memory lifecycle into five functional dimensions (D1–D5), as illustrated in Figure 1. This decomposition allows for the systematic testing of interchangeable components within a unified serving stack.
- D1: Memory Data Structure: The underlying physical storage (e.g., flat vector stores, hierarchical queues, or knowledge graphs).
- D2: Normalization Strategy: The pre-processing of raw text (e.g., maintaining raw text vs. extracting semantic triplets).
- D3: Consolidation Policy: The maintenance logic for handling memory growth (e.g., forgetting old facts or resolving contradictions).
- D4: Query Formulation: The transformation of user input into a search signal (e.g., keyword extraction or multi-query expansion).
- D5: Context Integration: The mechanism for merging retrieved facts into the final generation prompt (e.g., reranking or multi-query fusion).
Neuromem utilizes an interleaved insertion-and-retrieval protocol, ensuring that the model can only access information that has been explicitly "saved" prior to a specific query, mimicking real-world temporal constraints.
Experimental Setup
The study evaluates these dimensions across three representative benchmarks adapted for streaming contexts:
- LoCoMo: Focuses on long-horizon dialogues and complex information synthesis.
- LongMemEval: Evaluates the stability and reliability of memory over extended interaction periods.
- MemoryAgentBench (Selective Forgetting): Specifically targets the system's ability to handle evolving information and resolve contradictions when old "facts" are superseded.
Results and Discussion
The "Latency Tax" and the Quality Frontier
A primary finding of the Neuromem evaluation is the existence of a significant "latency tax." Many popular LLM-based optimizations—such as using generative models to "clean" memory or "expand" queries—often increase processing time by 10x to 100x while providing negligible gains in accuracy. As shown in Figure 2, the underlying Memory Data Structure (D1) is the primary determinant of the attainable performance frontier.
Structural Collapse and Heuristic Success
Aggressive normalization (D2), such as converting natural language into rigid knowledge graph triplets, often proves destructive. This process frequently discards subtle linguistic context and temporal markers, leading to up to a 50% drop in F1 scores compared to storing raw text. Conversely, deterministic heuristics—such as simple keyword filters or basic temporal decay rules—consistently outperform expensive LLM-based maintenance (D3) in streaming environments.
Key Performance Metrics
- Hybrid Superiority: The Inverted+Vector hybrid structure emerged as the most robust, showing only a 12.9% performance decline as memory grew, whereas simple FIFO queues suffered a 44.4% decline.
- Maintenance Inefficiency: In Property Graph architectures, employing an LLM for conflict resolution (CRUD) added over 3,700ms of latency for a marginal F1 improvement of 0.001.
- Query Expansion Costs: Multi-query expansion (D4) increased retrieval latency by 6.5x on a Llama-3-8B backbone but only yielded a 2.4% relative improvement in accuracy.
Conclusion
Neuromem reveals that for streaming LLM memory, the choice of data structure is paramount, while "smart" generative layers often introduce prohibitive latency for minimal gain. Future work should focus on developing strictly incremental update algorithms to avoid quadratic growth in latency and better defining the boundaries between short-term working memory and long-term storage tiers.
Summary updated