The Past Is Prologue: A Plug-in Controller for Selective Updates in Sequentially Evolving LLM Memory
Zihan Chen, Songwei Dong, Chengshuai Shi, Peng Wang, Song Wang, Cong Shen, Jundong Li · 2026
Read The Past Is Prologue: A Plug-in Controller for Selective Updates in Sequentially Evolving LLM Memory by Zihan Chen, Songwei Dong, Chengshuai Shi, Peng Wang, Song Wang, Cong Shen, Jundong Li (2026) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2606-31121.txt.
Introduction
Chen and six colleagues add a safety check to language model agents that learn from past tasks. Such agents keep an external memory and update it after each task. Most systems deploy every update at once. A change that helps today's task can still erase useful knowledge, add over-specific rules, or bias memory toward recent examples.
Their plug-in controller, Janus, decides whether each candidate update is accepted or the old memory stays. A Memory Momentum Trigger flags updates that veer oddly from the recent trajectory. Suspicious updates are judged on a compact test set of coverage, boundary, and fresh tasks, not the full history. Janus wraps existing updaters without changing their rules. Across six datasets, two backbone models, and two updaters, it raised average accuracy by 2.7 to 4.6 points.
Catalog record
| CREATOR | Zihan Chen, Songwei Dong, Chengshuai Shi, Peng Wang, Song Wang, Cong Shen, Jundong Li |
|---|---|
| YEAR | 2026 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 48 KB |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2606.31121
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
The Past Is Prologue: A Plug-in Controller for Selective Updates in Sequentially Evolving LLM Memory Zihan Chen, Songwei Dong, Chengshuai Shi, Peng Wang, Song Wang, Cong Shen, Jundong Li Abstract Sequentially evolving LLM memory enables agents to reuse past experience, but existing systems usually deploy each locally generated memory update without checking whether it improves future behavior. As a result, updates that help the current task may overwrite useful knowledge, introduce over-specific rules, or bias the final memory toward recent examples. We propose Janus, a plug-in memory controller that decides whether to accept a candidate memory update or retain the previous memory. To make this decision efficient, Janus uses a Memory Momentum Trigger to identify suspicious deviations in the memory-update trajectory, and compares old and new memories on a compact hybrid evaluation set of coverage, boundary, and fresh tasks instead of replaying the full history. Janus is method-agnostic and wraps existing updaters without changing their update rules. Across six datasets, two backbone LLMs, and two memory updaters, Janus improves average accuracy by +2.7 to +4.6 points over the corresponding base updaters. 1 Introduction Large language models (LLMs) are increasingly deployed as sequential task-solving agents that learn from past interactions through external memory ( 24 ; 7 ; 22 ) . In this setting, the LLM repeatedly encounters tasks, produces answers, receives feedback, and updates its memory for future use. The resulting trajectories contain successful solutions, failed attempts, feedback signals, and intermediate reasoning traces, which can serve as reusable experience for improving future decisions ( 31 ; 22 ; 16 ; 34 ) . This form of sequentially evolving memory goes beyond static conversational recall: memory is not merely a record of past interactions, but a test-time adaptation mechanism that shapes the LLM’s behavior on future tasks. Such systems are important for reasoning assistants ( 10 ) , tool-use agents ( 19 ) , and interactive decision-making systems ( 32 ; 1 ) , where performance depends not only on the current input but also on the accumulated experience. Figure 1: Top: Existing sequential memory updates do not guarantee that the final memory will better support future tasks. Bottom: On GPQA, intermediate memory snapshots from two sequential memory methods exhibit non-monotonic test set performance, motivating the need to control which memory updates are deployed. A common mechanism behind these systems is to update memory using feedback from the current task 21 ; 22 . This feedback is often expressed as a natural-language signal, sometimes viewed as a form of text gradient : instead of providing numerical gradients over parameters, the environment provides textual feedback that suggests how the agent should revise its reasoning, strategy, or memory for future tasks. Existing sequential memory methods typically follow a retrieve–solve–update loop: the agent retrieves memory, solves the current task, and then uses the current trajectory and feedback to update the memory ( 16 ; 31 ; 22 ) . This design is intuitive and efficient, but it also introduces a fundamental risk. Each update is usually optimized locally for the most recent task, while its effect on the final memory state is rarely evaluated globally (Figure 1 ). As a result, a memory update that appears useful for the current task may overwrite previously useful knowledge, introduce noisy task-specific rules, or bias the memory toward recent examples. The key challenge is therefore not only how to generate memory updates, but also how to decide whether a proposed update should actually be deployed. This creates a memory validation problem. Ideally, before deploying a candidate memory, the agent should estimate whether it improves performance beyond the current task. The most direct way to obtain such a signal is to compare the previous memory and the candidate memory on tasks that approximate the future task distribution. Since the future is unavailable, previously encountered tasks provide a natural proxy. However, validating every candidate memory on the full history is computationally impractical: the replay cost grows with the number of seen tasks and would introduce substantial latency after each update. A cheaper alternative is to compare memories at fixed intervals, such as every N steps, but such schedules are heuristic and may miss harmful updates that occur between scheduled checks. Similarly, using only a small fixed replay set reduces cost but risks overfitting the deployment decision to stale examples. Thus, an effective memory controller must answer two coupled questions: when should old and new memory be compared, and what tasks should be used for comparison? To solve the above challenges, we propose Janus , a plug-in memory controller that wraps existing sequential memory updaters and decides whether each candidate memory update should be accepted or rejected. Instead of treating every generated memory update as automatically beneficial, Janus views memory updating as a deployment decision: a candidate memory should replace the previous memory only when it is likely to improve the utility of the final memory for future tasks. Janus introduces two key designs to make this decision efficient. First, it uses a Memory Momentum Trigger (MMT) to decide when old and new memory should be explicitly compared. Rather than triggering comparison after every task or at a fixed interval, MMT tracks the trajectory of memory changes and triggers comparison when a candidate update deviates substantially from the recent update direction, indicating that the update may either introduce useful new knowledge or distort the memory toward recent task-specific information. Second, when comparison is triggered, Janus evaluates the previous and candidate memories on a compact hybrid evaluation batch instead of replaying the full task history. This batch combines a stored support set, which includes both coverage tasks representing the seen task distribution and boundary tasks where memory choices previously changed correctness, with a fresh slice of recently encountered tasks to avoid overfitting the decision to a fixed support set. In this way, Janus improves memory deployment by selectively testing suspicious updates while keeping replay cost controlled. Our main contributions are summarized as follows: • Memory deployment challenge. We identify a key limitation of sequential LLM memory systems: locally generated memory updates are not necessarily globally useful, and blindly accepting them may produce final memories that are biased toward noisy task-specific information. • Efficient plug-in memory control. We propose Janus, a method-agnostic controller that wraps existing memory updaters and efficiently decides whether to accept or reject candidate memory updates. Janus combines a Memory Momentum Trigger with a compact hybrid evaluation batch over coverage, boundary, and fresh tasks, enabling old-versus-new memory selection without modifying the underlying updater or replaying the full task history. • Strong empirical results. Across six datasets, two backbone LLMs, and two sequential memory updater backbones, Janus consistently improves final memory usefulness, with average gains ranging from +2.7 to +4.6 percentage points over the corresponding base updaters. 2 Method 2.1 Problem Setting Figure 2: Overview of Janus. Given a task and the current memory M_{t-1} , a base updater proposes a candidate memory \widehat{M}_{t} . Janus acts as a plug-in controller that decides whether to deploy this candidate or retain the previous memory. It first uses a Memory Momentum Trigger to detect whether the candidate update deviates from the recent memory-update trajectory. If triggered, Janus compares M_{t-1} and \widehat{M}_{t} on