Decoupling Memory from Context: Structured Memory for Token-Efficient Test-Time Continual Learning
Abstract
Large language models (LLMs) are increasingly deployed in enterprise, scientific, and medical applications, where agents must incorporate domain-specific knowledge and adapt from experience. Context engineering offers a practical alternative to weight updates by improving model behavior through instructions, strategies, and evidence supplied at inference time. However, adapting context online typically requires a costly trial-and-error process, while queries are often processed independently, preventing useful experience from carrying forward. Memory systems address this limitation by retaining information across interactions, but approaches that continually append information to a shared context face increasing token costs, context-window limits, and performance degradation as the context expands. We introduce a unified formulation of context optimization and show that an agent memory system update can be interpreted as an optimization update procedure over the model's context. This perspective attempts to provide a principled framework for studying memory design and its efficiency. We then propose GraphMemory, a lightweight graph-based memory that accumulates, refines, organizes, and connects reusable strategies. For each query, GraphMemory retrieves only the relevant subgraph, enabling online context adaptation without exposing the model to the entire memory. Under bounded retrieval, the amount of retrieved memory remains constant as the number of processed examples grows. Experiments show that GraphMemory achieves competitive downstream performance while using approximately 81-85% fewer memory-construction tokens than our baselines.
Create a lesson
Metadata
- Categories
- cs.AI, cs.LG
- Comments
- 14, 4, neurips workshop: TTCL
Related papers
Dynamic Routing as a New Dimension for Test-time Versatility of LLMs
Shared title terminologycs.AIMichal Štefánik, Marek Kadlčík, Josef Kuchař et al.
Refinement Buys Intelligibility, Search Buys Identity: What Test-Time Compute Buys in Masked-Diffusion TTS
Shared title terminologycs.AINityanand Mathur, Hamees Sayed, Ayush Pratap Singh
ActField: Learning Action Effects as Continuous-Time Latent Dynamics
Shared title terminologycs.AIYunpeng Qing, Yuheng Huang, Changxu Wei et al.
Zero-Shot Time-Series Question Answering via Decoupled Perception and Reasoning
Shared title terminologycs.AIJing Xie, Haochen Yuan, Yunbo Wang
Pressure, Context, and Machine Self-Control: A Criminological Test of Reward Hacking in Generative AI Models
Shared title terminologycs.AIMurat Ozer, Isaac Kofi Nti
Language-Conditioned Token and Reasoning Efficiency in Large Language Models: A Paired Cross-Lingual Study Protocol
Shared title terminologycs.AIGenliang Zhu, Chu Wang