LLM-agent memory selection often uses retrieval rankings based on record relevance or individual influence. Such rankings cannot identify sufficient subsets under redundant or jointly necessary evidence. We study per-decision memory sufficiency: selecting a small subset that preserves full-memory behavior. To separate search error from model error, we introduce JointCoreBench, a benchmark with nine interaction families, six workflow domains, natural-language decisions, and exact sufficient-set oracles, and JointCore, a relevance cost-ordered group-deletion baseline that tests blocks before individual records. On 6,912 exact conditions, cost-ordered JointCore recovers a minimum-cost sufficient set in 100.0% of cases, reduces subset evaluations from 30.00 to 11.13 (62.9%), and achieves 87.8% active-memory savings. Across four 12B-70B model families and 432 tasks per model, its unweighted mean is 10.28 versus 16.00 model queries and 50.6% versus 43.1% minimum-cost recovery relative to cost aware singleton deletion. Both methods preserve full-memory behavior under the deterministic primary interface. Tests with physical deletion, UNKNOWN masks, PENDING sentinels, counterfactual values, and alternative labels identify interface dependent behavior. JointCore is an efficient benchmark baseline; the study does not establish deployment-ready memory compression.
Figures & tables
Figure 1: Schematic JointCore trace on eight ordered records. The search removes d1:d4 as a block, refines e1:e4 , and returns {e1,e2} .
Method
Exact suff.
Min.-cost
Savings
Subset evals.
Random- B
0.162
0.001
0.766
0.00
Semantic top- B
0.944
0.222
0.775
0.00
Independent leave-one-out
0.667
0.667
0.900
30.00
Cost-aware singleton
1.000
1.000
0.878
30.00
Legacy JointCore
1.000
0.933
0.876
10.96
Cost-ordered JointCore
1.000
1.000
0.878
11.13
Table 1: Exact-stage aggregate over 6,912 conditions. Exact sufficiency and minimum-cost recovery are proportions. Savings are relative to full registered payload cost. Higher is better except for subset evaluations, which exclude the shared full-memory reference.
Checkpoint
Control
Behavior
Exact
Min.-cost
Savings
Queries
Qwen2.5–14B
0.988
1.000/1.000
0.586/0.544
0.465/0.382
0.881/0.860
9.97/16.00
Gemma–4–12B
0.875
1.000/1.000
0.845/0.808
0.572/0.493
0.837/0.807
10.70/16.00
Mistral–3.1–24B NF4
0.847
1.000/1.000
0.660/0.644
0.403/0.296
0.874/0.835
9.56/16.00
Llama–3.3–70B NF4 †
0.993
1.000/1.000
0.706/0.713
0.583/0.551
0.856/0.836
10.87/16.00
Table 2: Primary-interface evaluation over 432 tasks per model. Control is exact full-memory accuracy. Remaining cells are cost-ordered JointCore / cost-aware singleton: behavior is agreement with the model’s full-memory decision, exact is logical sufficiency, min.-cost is exact minimum-cost recovery, and savings use registered payload cost. Higher is better except for queries. † Exploratory model result.
Figure 2: Primary-interface comparison over 432 tasks per model. (a) Mean selection queries per task, where lower is better; JointCore whiskers are 95% task-bootstrap intervals and singleton always uses 16 queries. (b) Exact minimum-cost recovery, where higher is better. † Exploratory model result.
Figure 3: Model-stage results by interaction family. Panels (a) and (b) show cost-ordered JointCore minus cost-aware singleton in percentage points for logical recovery and active-payload savings; positive values favor JointCore. Panel (c) shows JointCore’s absolute mean query count, with singleton’s 16-query cost as the reference. Values are unweighted means across the four displayed models and include the exploratory Llama results.
Figure 4: Memory and label robustness on the fixed 108-task subset for each model. Each cell is cost-ordered JointCore / cost-aware singleton task success (%); color is their percentage-point difference. Primary uses semantic YES/NO decisions and UNKNOWN masks. † Exploratory model result.
Appendix figures & tables3 assets
Supplementary material from the paper’s appendix.
Appendix
Family
Sufficiency condition
Candidate minimal sets
Singleton
The designated record r1 is retained.
{r1}
Redundant OR
At least one record in R is retained.
Any {ri}
Synergistic AND
Every record in R is retained.
R
XOR
Every XOR flag in R is retained; their fixed values contain exactly one ON flag.
R
Threshold
At least k records from R are retained.
Any size- k subset of R
Multiple minimum sets
Every record in RA or every record in RB is retained.
RA or RB
Appendix
Table 3: Exact interaction families used by JointCoreBench. The condition column specifies when a retained set S is logically sufficient.
Method
Retained memory
Cost
Subset evals.
Exact / minimum
Full memory
all 16 records
81
0
yes / no
Semantic top- 4
{m0,m9,m10,m11}
20
0
yes / no
Independent leave-one-out
∅
0
16
no / no
Cost-aware singleton
{m10}
3
16
yes / yes
Cost-ordered JointCore
{m10}
3
9
yes / yes
Exact oracle
{m0}
3
0
yes / yes
Appendix
Table 4: Exact worked example from the frozen benchmark. Static retrieval uses no selection evaluations; the exact oracle is a reference, not a selector.
Checkpoint
Δ queries
95% CI
adjusted p
Qwen2.5–14B
-6.03
[-6.34, -5.73]
<.001
Gemma–4–12B
-5.30
[-5.81, -4.77]
<.001
Mistral–3.1–24B NF4
-6.44
[-6.84, -6.00]
<.001
Llama–3.3–70B NF4 †
-5.13
[-5.49, -4.74]
<.001
Appendix
Table 5: Displayed-cohort paired model-query comparisons. Differences are JointCore minus cost-aware singleton, so negative values favor JointCore. Adjusted p uses the registered twelve-test Holm family.
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.
Long-term memory enables LLM agents to leverage past interactions, but dialogue histories quickly exceed the context window, forcing agents to retrieve relevant subsets at query time. Because useful evidence is sparse and scattered across verbose conversations, retrieval faces a fundamental tension: broadening recall improves coverage but floods downstream reasoning with noise, while compressing memories at write time eases retrieval but irreversibly discards details that future queries may need. We introduce LazyMem, which resolves this tension by deferring all memory construction to query time. Given a retrieved candidate pool, a lightweight model processes it in overlapping parallel windows, selectively retaining and compressing only query-relevant content. The model is trained with supervised fine-tuning followed by reinforcement learning, using a reward that jointly encourages the identification of relevant messages and the generation of compressions that are faithful to the source and useful for answering the query. On LongMemEval, LazyMem-4B achieves an LLM-judge accuracy of 0.85, outperforming the strongest non-oracle baseline while using only 213 answer-context memory tokens, 21.0 times fewer than the baseline. It further generalizes to LoCoMo without target-domain training and reduces mean latency relative to the prior query-time baseline. Code is available at https://github.com/allacnobug/LazyMem.
Jing Yu, Yibo Zhao, Jiaming Zhang +1
School of Data Science and Engineering, East China Normal University
Large Language Model (LLM) agents increasingly rely on external memory systems to accumulate experience across tasks. Yet nearly all existing approaches, from graph-structured memories to reflective insight stores, access memory through fixed, hand-designed heuristics. We argue that this static view of memory is a core bottleneck for agentic learning because optimal memory behavior is fundamentally context-dependent. The early stages of the tasks, benefit from minimal retrieval because memory is sparse; recurring goal types benefit from plan reuse rather than generic nearest-neighbor lookup; stuck agents benefit from re-retrieval with alternative queries; and across long task streams, the memory store itself must be consolidated and pruned to remain useful. We present Memory as a Controlled Process (MemCon), a framework that models memory operations as a Markov Decision Process and learns an online policy that adaptively decides when, what, and how much to retrieve, when to inject a distilled plan, and when to consolidate or forget. MemCon is backend-agnostic: it wraps any existing memory implementation, learns from task-by-task binary feedback with no pretraining and no additional LLM calls, and uses a lightweight tabular contextual bandit with UCB exploration that converges within tens of tasks. Across 6 benchmarks, 3 agent frameworks, and 3 LLM backbones, MemCon consistently outperforms multiple memory baselines by up to 15.2 points in task success while reducing token consumption by 5--20%.
Eric Hanchen Jiang, Zhi Zhang, Yuchen Wu +11
University of California Los Angeles · University of Washington · Northwestern University