arXiv:2610.25373cs.DBOct 2026

Manuscript Offprint

arXiv:2610.25373

MemDerive: A Diagnostic Benchmark for Agent Memory over Evolving Data

Sen Gao, Yongan Li, Han Chen, Bingsheng He, Ming Wu, Jason Zeng, Michael Heinrich, Shixuan Sun

Sen Gao

National University of

Singapore

Singapore, Singapore

sen@u.nus.edu

Ming Wu

Zero Gravity Labs

Singapore, Singapore

ming@0g.ai

Yongan Li

Shanghai Jiao Tong

University

Shanghai, China

liyongan@sjtu.edu.cn

Jason Zeng

Zero Gravity Labs

Singapore, Singapore

jason@0g.ai

Han Chen

National University of

Singapore

Singapore, Singapore

chenhan@u.nus.edu

Michael Heinrich

Zero Gravity Labs

Singapore, Singapore

michael@0g.ai

Bingsheng He

National University of

Singapore

Singapore, Singapore

dcsheb@nus.edu.sg

Shixuan Sun

Shanghai Jiao Tong

University

Shanghai, China

sunshixuan@sjtu.edu.cn

Abstract

Long-running agents rely on memory of their past interactions for task state, such as what has been completed and which conditions still hold. Such state is usually a derived state. No record states it, and it must be computed by rules from multiple records of an evolving history. Existing memory benchmarks score only the final answer, with no reference for the intermediate states behind it. A wrong answer therefore cannot be traced to the state that was missed, and a state that silently became outdated goes undetected. We present MemDerive, a diagnostic benchmark for agent memory over evolving data. It specifies each scenario symbolically, derives exact gold answers with Datalog, records the gold derivation DAG and the supporting events of every query, and renders the history in natural language with fictional entities and distractors. Its 10 scenarios contain 4,692 events and 1,503 queries whose difficulty varies along access, evolution, and composition. On this ground truth, MemDerive evaluates answer reliability, diagnoses failures by probing the nodes of the gold derivation DAG, and tracks whether answers stay correct as events arrive.

Our evaluation of four memory systems reveals failures that final-answer benchmarks hide. On derived state, every memory system falls behind simple BM25 retrieval, although the same answer model reaches 96.01 % when given the supporting events. Most failures are ungathered, as a system holds the missing intermediate state but does not retrieve it for the question that needs it. Memory systems also rarely propagate implicit changes, which no new record states. These results suggest three principles for memory design. Gather inputs along the derivation, store rules with their versions, and maintain derived states through recorded dependencies.

1 Introduction

Long-running agents rely on memory of their past interactions to decide what to do next [42, 45]. A decision depends on what has been completed, which conditions still hold, and what remains to be done. Anthropic reports coding agents that prematurely consider a project complete and addresses this with persistent progress records and verification across sessions [51]. Generative agents [34] and Reflexion [39] likewise synthesize past observations into reflections that guide later behavior. In both cases the agent needs a task state

Figure

Figure 1: An original question and a state question over the same LoCoMo history. (a) One record states the answer. (b) The answer is computed from two states, each gathered from several records of the history.

that the records of its history support but rarely state. Memory systems such as Mem0 [8] and Cognee [31] extract information from the history and retrieve what matches a request. This paper asks whether they supply the state that a task needs.

Figure 1 shows the difference on a LoCoMo history. The original question asks which futuristic game Nate reported playing, and one record answers it. Now Nate asks what he could play to relax away from competitive gaming. A good answer lists the games he has played without any recorded tournament. No record states this set. Memory must first build two intermediate states from several sessions, the games Nate has played and the games he played in tournaments, and then take their difference. We call a fact that no record states but that follows from several records by rules a derived state, and a question whose answer is a derived state a state question. The status of a task is a typical derived state. Like the result of a view over database tables, a derived state is computed from the history rather than stored in it. Here, however, the base data is natural language, and the view is defined only when a question arrives.

Derived state is hard for memory systems. The records that support it rarely share words with the question and have low embedding similarity to it. They matter only in combination, and together they can outnumber any retrieval budget. A derived state is usually composed from intermediate states layer by layer, so one wrong intermediate state corrupts every state above it. It can also become stale without any record saying so. A later record that Nate entered a Chess tournament would remove Chess from the answer, although it never mentions the games he could play to relax. These properties affect every way of building memory, whether a system retrieves raw records for each question, extracts and stores facts as events arrive, or searches and reasons over the history when a question arrives.

A paired study shows that current memory systems fail on state questions. We take histories from LoCoMo and LongMemEval, keep an original question, and add a state question over the same history and the same stored memories. Figure 2(a) shows Mem0 falling from 86.7 % to 33.3 % and Cognee from 60.0 % to 16.7 %. Given the whole history, the same answer model still reaches 86.7 %, so the questions are answerable and the loss lies in what memory supplies. Figure 2(b) splits each state question into two sub-questions, one for each intermediate state. Retrieving separately for each sub-question helps some systems, and so does answering the state question from the system's own answers to the sub-questions, but no system exceeds 46.7 %. Given the correct answers to the sub-questions, the answer model solves every state question. The bottleneck is therefore obtaining the intermediate states, not combining them, and an evaluation that scores only final answers cannot see it.

Existing benchmarks were not designed to expose this failure. LoCoMo and LongMemEval test recall, temporal and multi-session reasoning, and knowledge updates over long conversations [30, 48]. StateMemBench separates current from superseded answers [13], and MemTrace audits how evidence is reached and used [29]. These benchmarks judge the final answer. Their histories are written text without executable semantics, so they cannot supply the correct value of an intermediate state, and a wrong answer cannot be traced to the step that failed (Table 6). Their updates are explicit, since a new record revises a fact and states its new value. A derived state also changes implicitly, when a fact it depends on changes and no record mentions the state. Rankings on these benchmarks therefore do not carry over to derived state. On LongMemEval, Mem0 reaches 84.00 % and exceeds BM25 at 78.60 %, yet on derived state every memory system falls behind BM25.

Our approach. We present MemDerive, a diagnostic benchmark for agent memory over evolving data. Its design follows from four needs. Exact ground truth. Every intermediate state needs a correct value at every point of an evolving history. MemDerive therefore specifies each scenario symbolically. Each event pairs a natural-language record with symbolic actions, and a Datalog program with aggregation derives every state from the current facts and rules, so the gold is exact by construction. Derivations as evidence. For each query, MemDerive records a gold derivation DAG that links the answer through its intermediate states to the events, and the witnesses, the minimal sets of events that support the answer. No shortcuts.

Figure

(a) Accuracy by question type

(b) Answering via sub-questions

Figure 2: Accuracy on LoCoMo and LongMemEval histories. A state question asks for an answer that no single record states and that must be computed from several records.

The answer must come from the history alone. No record states a derived state, every recognizable entity is fictional so that pretrained knowledge cannot help, and the key terms of a question often appear only in distractor records. Controlled difficulty. Generation varies three workload dimensions independently, namely Access to the support, Evolution of the facts, and Composition of the derivation, so that a failure can be traced to one of them. The suite covers travel reimbursement, shopping, and degree planning in 10 scenarios with 4,692 events and 1,503 queries.

Memory systems share no interface beyond answering questions, so MemDerive observes them as black boxes through three evaluation questions. Q1: Reliability compares answers exactly with the gold and citations with the witnesses. Q2: Diagnosis turns the nodes of each gold derivation DAG into state probes, questions about single intermediate states. Following the DAG from the answer toward the events, it locates the lowest states that the system gets wrong, classifies why they fail, and tests whether repairing them recovers the answer. Q3: Maintenance asks tracked queries at successive checkpoints and separates the refresh of changed answers from the preservation of unchanged ones.

Findings and implications. We evaluate four memory systems and two raw-retrieval baselines under one answer model. First, memory systems answer 30.41–48.30 % of the queries, below BM25 at 58.28 %, whereas the whole history yields 79.84 % and the supporting events 96.01 %. Accuracy falls along all three workload dimensions, also under matched context budgets. Second, most failures are ungathered. The system answers a missing intermediate state correctly when asked about it directly, but does not retrieve it for the question that needs it. Rebuilding the answer from these intermediate answers recovers up to 30.0 points of accuracy, so a memory system should split a request for a derived state into requests for its inputs. Some systems fail to return rules even when asked directly, so rules should be stored with their versions, like facts. Third, memory systems preserve 91.03–92.86 % of unchanged answers and refresh 82.4 % of explicit changes, which a new record states, but only 41.1 % of implicit changes, which propagate through dependencies. Stored states therefore need recorded dependencies, as in incremental view maintenance [16, 32]. Their work at ingestion buys neither accuracy nor refresh.

Our contributions are as follows.

  • Problem characterization. We define derived state over an evolving history, identify the properties that make it hard for memory systems, and derive three workload dimensions, connecting agent memory to views and provenance (Section 2).

  • Benchmark construction. Executable scenarios generate histories and queries with exact gold derivations, witnesses, and controlled workload dimensions (Section 3).

  • Evaluation methodology. State probes in two contexts locate and classify failures, two recoveries test them, and tracked queries separate refresh from preservation (Section 4).

  • Experimental study. A comprehensive evaluation of four memory systems and two retrieval baselines over a broad set of metrics yields three findings and design lessons for memory systems (Sections 5 and 6).

Reproducibility. The benchmark dataset is available at https://anonymous.4open.science/r/DeriveMem-67C6, and the evaluation framework that runs all experiments is available at https://anonymous.4open.science/r/DerivEval-6799.

References (32)