cs.AIJul 20, 2026

Retain or Consolidate? Budget-Dependent Operator Selection for Language Agent Memory

Authors: Qingcan KangMingyang LiuShixiong KaiKaichao LiangZhentao TangYuqi CuiTao ZhongMingxuan Yuan

Organizations: Huawei Noah’s Ark Lab · Department of Computer Science, City University of Hong Kong

Abstract

Language agents depend on memory across interactions. However, the limited context windows of large language models (LLMs) and their inference costs constrain how much memory can be used at once. Existing systems mainly follow two strategies: memory retention and memory consolidation. Retention keeps raw records and preserves exact details, but relevant evidence may not fit under a tight budget; consolidation compresses and combines records, improving coverage per token but risking the loss of query-critical details. Neither strategy is universally preferable. This raises two central questions: when should consolidation replace retention, and which operator -- Merge, Abstract, or Rewrite -- should be selected? We formalize this decision by decomposing each operator's utility into a coverage effect on evidence omitted by retention and a signed replacement effect on raw evidence that already fits. Their balance explains why the preferred action changes with relative budget pressure. We implement this mechanism with Offline Abstraction-Safety (OAS), a lightweight learner that estimates action utilities from pre-generation features with held-out harm calibration. The public LongMemEval and LoCoMo benchmarks show the same budget-dependent pattern. On LongMemEval, consolidation improves absolute accuracy by up to 48% under tight budgets, whereas retention is preferable under loose budgets; LoCoMo replicates this crossover at a smaller budget, consistent with its shorter evidence. On both datasets, cross-note abstraction and merging generally outperform local rewriting when compression is necessary.

Explore similar work

Jun 11, 2026cs.CL

MemRefine: LLM-Guided Compression for Long-Term Agent Memory

Large language model (LLM) agents are increasingly expected to operate over long-term interactions, where information from past dialogues must be preserved and recalled to support future tasks. However, as interactions accumulate, the memory store grows without bound and fills with redundant entries that inflate storage cost and degrade retrieval by crowding out the most useful evidence. Furthermore, this is especially limiting on resource-constrained platforms with hard memory budgets, motivating us to formulate storage-budgeted memory management, the task of keeping an already constructed memory store within a fixed budget while preserving information useful for future interactions. To this end, we then propose MemRefine, an LLM-guided framework that, since surface similarity poorly reflects factual value, uses similarity only to propose candidate pairs and defers delete, merge, and preserve decisions to an LLM judge based on factual content, iterating until the budget is met. Across multiple memory frameworks and long-term conversation benchmarks, MemRefine consistently meets target budgets while preserving downstream performance and outperforming rule-based baselines under tight budgets.
Minjae Kim, Jinheon Baek, Soyeong Jeong +1
Jun 23, 2026cs.LG

Forget to Improve: On-Device LLM-Agent Continual Learning via Budget-Curated Memory

On-device language-model agents improve by accumulating experience in retrieved memory rather than by updating weights. This memory is hard-bounded and exposed: it consumes RAM and energy, reaches peers through a thin uplink, and becomes an attack surface because it is writable by what the agent reads. Existing systems each cover one part of this problem: agentic memories grow without a budget, on-device methods keep entries by success alone, and poisoning is studied mainly as an attack rather than as a memory-governance problem. We propose \sys{}, a single net-value-per-byte score that governs an agent's experience-memory lifecycle. The main idea is to let the budget act as the curator: each entry is scored as value minus harm, per byte, so one ruler decides what to keep, share, and trust. \sys{} makes three decisions: (1) \textbf{KEEP} evicts low-value bytes under the RAM and energy budget; (2) \textbf{SHARE} sends an insight only when its value exceeds its uplink cost; and (3) \textbf{TRUST} gates a peer entry by provenance. On language-model-agent task-drift benchmarks and a real heterogeneous Jetson testbed with two robot-arm nodes and a hub, \sys{} reduces memory by 2.7×2.7\times and uplink by 2.4×2.4\times, drives injection success from 0.75 to zero, and raises accuracy on cases corrupted by poison or stale memory. Curating by net value reduces footprint, energy, uplink, and injection success together without reducing accuracy. In this setting, forgetting by net value improves the agent rather than weakening it.
Beining Wu, Zihao Ding, Jun Huang +1
Nov 7, 2025cs.CL

BudgetMem: Training-Free Selective Memory for Cost-Efficient Long-Context Processing in Language Models

Processing long documents with large language models (LLMs) is expensive: a single query over a 100K-token document can cost from tens of cents to over a dollar in API fees, depending on the model, and memory grows linearly with context length. We introduce BudgetMem, a training-free architecture that keeps only high-salience content under an explicit memory budget. Unlike token-level neural compressors such as LLMLingua, BudgetMem makes chunk-level keep-or-discard decisions from interpretable features: entity density, TF-IDF importance, position, numerical density, discourse markers, and question presence. Across four benchmarks, BudgetMem matches the uncompressed baseline on template-generated structured documents (F1 = 0.859 vs. 0.855) while discarding 70% of chunks. As a pre-retrieval filter on the same documents it outperforms LLMLingua-2 by a wide margin (0.859 vs. 0.554), because token-level compression destroys the phrasal structure that retrieval depends on; the advantage holds across model scale and family (Llama-3.2-3B, Qwen2.5-7B), under dense retrieval (0.918 vs. 0.530), and in LLMLingua-2's intended direct-feed mode (0.797 vs. 0.720). On real NLP research papers (Qasper), BudgetMem is competitive but not free, trailing the full baseline by 7.4% and LLMLingua-2 by 5.5% relative F1 at a 72% storage reduction. Removing discourse markers or numerical density hurts most, although TF-IDF alone scores as well on template documents. The pipeline needs no trained models or GPU for compression and runs on a $10/month Colab instance.
Chandra Vamsi Krishna Alla, Harish Naidu Gaddam, Manohar Kommi +1