acceptodds
Under review as a conference paper at ICLR 2027

ElasticMem: Latent Memory as a Learnable Resource for LLM Agents

Abstract

Long-term memory is essential for LLM agents to reason coherently across extended interactions, personalize responses, and reuse past experience. However, existing memory-augmented methods typically treat memory as a fixed resource: text-space approaches concatenate retrieved memories into the context window, causing substantial token overhead and sensitivity to noisy evidence, while latent-space approaches reduce textual cost but still rely on rigid retrieval or fixed-capacity memory interfaces. This creates a mismatch between query-dependent memory utility and fixed memory allocation. We propose ElasticMem, a memory-augmented LLM framework that learns to use memory as an elastic latent resource. ElasticMem builds an offline latent memory bank with retrieval keys and content caches, retrieves memories adaptively from the reasoner's hidden state, assigns each retrieved memory a variable latent budget through a learned policy, and injects selected latent states as soft memory tokens for generation. The full memory-use process is optimized with downstream task rewards through group-relative policy optimization. We evaluate ElasticMem on MemorySuite, covering memory-intensive QA and embodied agent control. Across Qwen2.5-3B-Instruct and Qwen2.5-7B-Instruct backbones, ElasticMem improves weighted-average QA accuracy by 26.2% and 24.6% and ALFWorld success rate by 66.3% and 27.2% relative to the strongest baselines, while consuming the fewest tokens on ALFWorld on average. Ablations and qualitative analyses further show that adaptive retrieval and elastic budget allocation help ElasticMem prioritize useful evidence and transferable plans beyond rigid cosine similarity.

Primary area:
foundation or frontier models, including LLMs
Keywords:
Latent Memory

Reviews

Among:
Shape:
1234this paper, Top 30%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.67 over 3 reviews, above 70% of the others.
Reviewer_ceneOpenReview ↗
Rating
3
Confidence
4
Informativeness
2
Presentation
3
Soundness
3
Read review
Paper summary

This paper proposes ElasticMem, a latent memory framework that jointly learns memory retrieval and adaptive token-budget allocation through GRPO, achieving promising results on memory QA and embodied agent tasks.

Critical strengths
  • Treating memory allocation as a learnable resource is a meaningful direction for memory-augmented agents and it is significant in industrial deployment.
  • The method achieves consistent improvements across memory QA and embodied agent tasks with multiple backbone sizes.
Critical weaknesses
  • The budget policy is optimized without an explicit token-cost penalty. It remains unclear whether elastic allocation outperforms fixed allocation under matched token budgets.
  • There exists a concern of PersonaMem-128K, because a case study of it contains two identical answer options (Tab.41 (b) (c)).
Questions for authors
  • Can the authors provide accuracy–token trade-off comparisons between elastic and fixed allocation under matched token budgets?
  • The proposed budget policy combines memory selection and capacity allocation, but their individual contributions are not clearly disentangled. Can the authors provide a binary gating baseline that either discards a memory or assigns it a fixed budget would help determine whether fine-grained elastic allocation is truly necessary.
4 comments
AuthorsOpenReview ↗

Response 1

We sincerely thank the reviewer for their thoughtful feedback and constructive suggestions. We appreciate the concerns regarding token-budget fairness, the necessity of fine-grained allocation, and benchmark quality. Below, we address each point in detail.


[W1, Q1]: Token-cost penalty and accuracy–token trade-off under matched budgets

W1: Missing token-cost penalty and matched-budget comparison.

Q1: Accuracy–token trade-off under matched budgets.

Response. Thank you for raising this question. The default ElasticMem reward in §3.6, Eq. (17) has no explicit token-cost penalty. We added two experiments with Qwen2.5-7B-Instruct. First, elastic allocation outperforms uniform allocation in all 16 comparisons when both methods receive exactly the same memory-token budget on every question. Second, when the budget can vary, adding a token-cost penalty reduces token use with a measurable accuracy trade-off. We summarize both results in §4.3 and report the full comparisons in Appendix J, Tables 70 and 71.

(i) Accuracy under an exact per-question memory budget. For each question, both methods receive the same ZZ retrieved chunks and inject exactly B=kZB=kZ latent memory tokens, where k∈{4,8,12,16}k\in\{4,8,12,16\}. We train each method under its assigned constraint and enforce that same constraint at evaluation.

  • Fixed (uniform) allocation assigns exactly kk tokens to each of the ZZ chunks, so the total is kZ=BkZ=B.

  • Elastic allocation uses a feasibility mask in retrieval order during both training and evaluation. Before allocating tokens to chunk jj, let Rj=B−∑i<jbiR_j=B-\sum_{i<j}b_i be the remaining budget and m=Z−jm=Z-j the number of chunks still to follow. The policy can choose only integer allocations satisfying

    max⁡(1,Rj−20m)≤bj≤min⁡(20,Rj−m).\max(1,R_j-20m)\leq b_j\leq\min(20,R_j-m).

    This leaves enough tokens to give each remaining chunk at least one, while ensuring that the remaining chunks can absorb the balance at no more than 20 tokens each. At the last chunk, m=0m=0, so the only feasible choice is bZ=RZb_Z=R_Z. Both methods therefore retain every retrieved chunk and use exactly BB injected tokens on every question. For example, on LoCoMo with Z=20Z=20 and B=160B=160, uniform allocation gives every chunk eight tokens, while elastic allocation can distribute those same 160 tokens unevenly.

Table 1. QA accuracy under matched per-question memory budgets (Appendix J, manuscript Table 70).

DatasetMean tokens per chunk (kk)Injected tokens per question (BB)Fixed accuracyElastic accuracy
PersonaMem-32K4360.7880.804
PersonaMem-32K8720.8320.868
PersonaMem-32K121080.8560.892
PersonaMem-32K161440.8720.888
PersonaMem-128K4840.6860.724
PersonaMem-128K81680.7550.801
PersonaMem-128K122520.7960.829
PersonaMem-128K163360.8110.839
LoCoMo4800.6790.712
LoCoMo81600.7570.801
LoCoMo122400.7900.836
LoCoMo163200.8060.830
LongMemEval4800.5740.598
LongMemEval81600.6400.700
LongMemEval122400.6800.746
LongMemEval163200.6980.752

Elastic allocation improves accuracy by 1.6–6.6 percentage points across the four datasets and four budgets. At exactly 240 injected tokens per question, it gains 4.6 points on LoCoMo and 6.6 points on LongMemEval. Because both methods retain the same chunks and inject the same number of tokens, these comparisons show that learning how to distribute a fixed memory budget improves accuracy over dividing it evenly.

(ii) Effect of an explicit token-cost penalty. On LoCoMo and PersonaMem-128K, we also allow the injected memory length to vary by question and train with the reward

Rλ=Racc−λ∑j=1ZbjZBmax⁡.R_\lambda=R_{\mathrm{acc}}-\lambda\frac{\sum_{j=1}^{Z}b_j}{ZB_{\max}}.

We vary only λ\lambda, with λ=0\lambda=0 recovering the original QA reward. The penalty applies to injected memory tokens as a fraction of the available latent capacity. The table reports mean total tokens per question, including task input, injected memory, and generated output, following the accounting in manuscript Table 2.

Table 2. QA accuracy and mean total tokens per question as the token-cost penalty varies (Appendix J, manuscript Table 71).

Token penalty λ\lambdaLoCoMo accuracyLoCoMo total tokensPersonaMem-128K accuracyPersonaMem-128K total tokens
00.8413620.840557
0.020.8403510.842545
0.050.8313320.832526
0.100.8023010.806489
AuthorsOpenReview ↗

Response 2

Continuation of our response to [W1, Q1] from the previous page:

At λ=0.02\lambda=0.02, both datasets use fewer tokens and accuracy changes by at most 0.2 percentage points. At λ=0.05\lambda=0.05, total token use falls by 8.3% on LoCoMo and 5.6% on PersonaMem-128K, with accuracy losses of 1.0 and 0.8 percentage points, respectively. Thus, the learned allocator improves accuracy when the per-question budget is fixed, and an explicit penalty provides a separate way to trade accuracy for lower token use when the budget can vary.


W2: Potential issue with PersonaMem-128K answer options.

Response. Thank you for pointing out the duplicated option. We checked the prompt used in the Mem0 evaluation: option (b) describes a deeper appreciation for yoga, while option (c) describes a stronger interest in meditation with unchanged feelings toward yoga. When transcribing the case study for the original Table 41, we inadvertently repeated (b) in place of (c). We have corrected (c) wherever this question appears in Appendix I.2 of the revised manuscript (Tables 42–44 and 46). The gold answer and Mem0’s reported prediction are both (b).


Q2: Disentangling memory selection and capacity allocation.

Response. Thank you for suggesting a binary gating baseline. At the same injected-memory budget for every question, Full ElasticMem achieves 79.9% weighted QA accuracy versus 76.1% for Binary Gating, a gain of 3.8 percentage points. We report this comparison in §4.3 and give the full protocol and results in Appendix J, Table 72.

Setting. We evaluate Qwen2.5-7B-Instruct on four QA benchmarks. All variants use the same memory-bank construction, retrieval count, projector architecture, training data, and GRPO protocol. During both training and evaluation, each variant injects exactly 80 latent memory tokens per PersonaMem-32K question and 160 per question on each of the other three benchmarks.

  • Uniform retains all retrieved chunks and divides the budget as evenly as possible. Allocations differ by at most one token.
  • Binary Gating assigns either 0 or 20 tokens to each chunk. It learns which four chunks to retain at a budget of 80, or which eight to retain at a budget of 160.
  • Elastic w/o Gating retains every chunk and learns an allocation of 1–20 tokens per chunk.
  • Full ElasticMem learns an allocation of 0–20 tokens per chunk, so it can both discard chunks and vary the capacity of those retained.

Both elastic variants allocate tokens in retrieval order. At each step, we mask allocations that would leave too few or too many tokens for the remaining chunks. The last chunk receives exactly the remainder.

Table 3. Mean QA accuracy across five independent training seeds at matched per-question budgets (Appendix J, manuscript Table 72). The weighted average uses 50, 233, 314, and 100 test questions, respectively (Appendix A.1).

DatasetTokens per questionUniformBinary GatingElastic w/o GatingFull ElasticMem
PersonaMem-32K800.8360.8520.8640.876
PersonaMem-128K1600.7490.7670.7780.799
LoCoMo1600.7570.7740.8010.814
LongMemEval1600.6400.6620.7000.716
Weighted Avg.—0.7430.7610.7830.799

Results. Binary Gating improves on Uniform by 1.8 percentage points in weighted accuracy (0.743 to 0.761). When every retrieved chunk is retained, learning its token budget raises weighted accuracy from 0.743 (Uniform) to 0.783 (Elastic w/o Gating). Allowing zero-token allocations as well raises it to 0.799, a further 1.6 points.

Full ElasticMem outperforms Binary Gating by 2.4, 3.2, 4.0, and 5.4 percentage points across the four benchmarks, respectively. Thus a learned keep-or-discard rule is useful, and learning how much capacity to assign to retained chunks improves accuracy further under the same token budget.

We would like to thank the reviewer once again for their valuable time and thoughtful feedback. We sincerely hope that our responses and revisions have adequately addressed the concerns raised and further improved the clarity and overall quality of the manuscript. We would greatly appreciate the reviewer's further assessment of these improvements and warmly welcome any additional feedback or discussion.

Thank you for the detailed response and additional experiments. The new results have largely addressed my main concerns. I appreciate the authors' efforts and will maintain my positive rating.

AuthorsOpenReview ↗

Thanks for the Reviewer’s Constructive Feedback

Thank you for your thoughtful and constructive feedback. We are pleased to hear that our responses have addressed all of your concerns. We are committed to incorporating the suggested changes in our revisions to further enhance the manuscript.

Reviewer_F6haOpenReview ↗
Rating
2(+1)
Confidence
3
Informativeness
2
Presentation
2
Soundness
1
Read review
Paper summary

The paper proposes ElasticMem, a latent memory module for LLM agents. Each memory chunk is encoded once by the frozen backbone: the final hidden state becomes the retrieval key and the last Nc=20N_c=20 hidden states are stored as content. At query time the LoRA-adapted reasoner samples one ordinary vocabulary token, and the hidden state after that token retrieves the top-Z chunks by cosine similarity. A small Transformer then gives each retrieved chunk a budget bj∈{0,…,20}b_j \in \{0,\dots,20\}. The last bjb_j cached states of the chunk go through an MLP projector and enter the prompt as soft tokens. The reasoner LoRA, budget policy and projector are trained with GRPO, using exact match on the answer letter as the QA reward and per-step agreement with the expert action for ALFWorld.

Experiments cover PersonaMem-32K/128K (4-way multiple choice), LoCoMo and LongMemEval (10-way multiple choice) and ALFWorld seen/unseen, with Qwen2.5-3B/7B. There are ten baselines: seven training-free text memory systems and three latent methods retrained per task (MemGen, AutoCompressor, M+). The paper also reports controlled text-memory variants (Table 3), ablations of the budget policy, retrieval and maximum budget (Fig. 2), sensitivity to Z and G, latency, frozen cross-task transfer, and single runs with Llama backbones.

Critical strengths
  1. Treating the number of latent tokens per retrieved memory as an action learned from task reward is a sensible way to frame memory use. The bank is encoded once and reused, and the control token, budget policy and projector are separate pieces that the ablations swap out one at a time. Table 4 is candid about what each comparison does and does not control.

  2. The evaluation is broad and the numbers are consistent. It spans five tasks, two backbone sizes, ten baselines and a second model family, and includes a frozen transfer test where a PersonaMem-128K checkpoint reaches 0.726 on LoCoMo against 0.637 for MemGen. I recomputed every weighted average in Table 2 from the per-split scores and test sizes, and all of them match.

  3. The gains over the retrained latent baselines are large and hold on every split with both backbones (five-seed means), for example 0.84 vs 0.68 on LoCoMo and 0.53 vs 0.36 ALFWorld SR against MemGen at 7B. Table 3 rules out GRPO or extra LoRA capacity as the whole story: a text-memory model trained with GRPO reaches 0.650 on LoCoMo, and 0.682 with a higher LoRA rank, against 0.841.

Critical weaknesses
  1. The elastic allocation accounts for a small part of the gain, and the rest is unexplained. By my reading of Fig. 2a, a uniform budget already reaches about 0.84, 0.79, 0.71 and 0.46 on PersonaMem-32K, LoCoMo, LongMemEval and ALFWorld, against 0.90, 0.84, 0.76 and 0.53 for ElasticMem. So the learned policy adds 5 to 7 points, while the uniform variant is already 8 to 14 points above MemGen. Even a random budget scores about 0.74 on LoCoMo, roughly 9 points above the GRPO text-memory model in Table 3, which reads the same number of retrieved chunks as full text. The soft tokens are at most the last 20 frozen hidden states of each chunk, so they cannot carry more of its content than the text does.

The controls that would explain this are missing: the same LoRA and GRPO training with every budget set to 0, and a run with soft tokens taken from a different conversation. Every QA set here is 4-way or 10-way multiple choice with a 5-token output, trained on in-domain splits, and formats like these often carry option artifacts. In the paper's own Table 34, each distractor changes one part of the correct option (disliking vs indifferent vs enjoying, wonderful vs surprising), so the correct option is the one that agrees with the majority on every part. The notion of capacity is also odd, since a larger budget only adds positions from the end of the chunk. The paper does not give the chunk length or say which layer the cached states come from. Its ablations are radar plots with truncated per-axis ranges and no numbers, and the uniform, random and semantic variants are never defined.

  1. The comparisons are unequal, and the strongest simple baselines are missing. ElasticMem is trained per task on the in-domain training split, while the seven text-memory baselines are training-free and several sit near chance (0.30 to 0.42 on 4-way PersonaMem-128K). Outside Table 3, which covers only LoCoMo and ALFWorld, there is no trained text-memory or full-context model. A full-context model is the natural baseline, since LoCoMo histories (about 16K tokens by the paper's own description) fit in Qwen2.5's 32K window. Dense retrieval plus LoRA-GRPO on all five tasks is another. Memory-R1 is cited but not compared. The closest prior work on compressing context into soft tokens is not discussed: xRAG, ICAE, gist tokens, COCOM (trained at several compression rates), PISCO, and REFRAG, which trains an RL policy to decide which retrieved chunks are expanded and which stay compressed. REFRAG is close to the central idea of this paper.

ALFWorld has the same problem. The latent methods get Gemini-distilled skill cards and the text methods get raw trajectories. ElasticMem trains on 4,260 expert steps, the text methods are not trained at all, and there is no behavior-cloning agent without memory. For reference, ETO (Song et al., 2024) reports 60.0/67.2 seen/unseen for Llama-2-7B fine-tuned on ALFWorld expert trajectories, under a different prompting setup. Retrieval in ALFWorld is also fixed per episode from the task objective, which makes the reasoner-state retrieval a task-type lookup there.

  1. The mechanism claims rest on anecdotes, and the reporting cannot support small differences. Sec. 4.4 supports the claim that useful memories get larger budgets with two prose examples and no budget values, and every case study in Appendix I shows a baseline. LoCoMo and LongMemEval have evidence annotations, yet there is no budget on evidence vs non-evidence chunks, no fraction of zero budgets and no retrieval recall. Top-Z selection passes no gradient, so retrieval learns only through which vocabulary token gets sampled (G=4). In Fig. 2b the control token is 2 to 3 points above a trainable query-only state, and the bypass in Table 12 is confounded because the budget policy was trained on post-token states.

The test sets are small: 50 questions for PersonaMem-32K, 100 for LongMemEval, and 314 from two conversations for LoCoMo. Five seeds were run, but no variance is reported. The Z, G and Bmax sweeps (Tables 8, 9, 11) report test numbers (0.841, 0.529, 0.900) although validation splits exist. The token claim in the abstract counts tokens per ALFWorld episode, which favors whichever method finishes sooner, and at 3B ElasticMem uses more tokens than LangMem on Unseen (12,846 vs 12,449). Sec. 4.1 gives 423 QA tokens where Table 2 shows 589 (3B) and 443 (7B). The appendix also says the exact rank and parameter count of the higher-rank LoRA variant are not available, and that it is not established whether the latency figures include the control-token forward pass. On LoCoMo at 3B, ElasticMem is listed at 0.41 s per question against 0.44 s for M+ while using 577 tokens against 154, plus that extra pass.

Questions for authors
  1. On all four QA sets, please report the same LoRA and GRPO pipeline with every budget fixed at 0, a run with soft tokens drawn from a different conversation, and the base model answering from question and options alone. Please also give the Fig. 2 ablations as a table with seed standard deviations, and define the uniform, random and semantic variants.

  2. What is the chunk length, and which layer do the cached states come from? Using the LoCoMo and LongMemEval evidence labels, what is the distribution of learned budgets (fraction of zeros, mean), the mean budget on evidence vs non-evidence chunks, and recall@Z for semantic, query-state and control-token retrieval?

  3. Please add a full-context Qwen2.5-7B on LoCoMo and PersonaMem-32K, zero-shot and with LoRA-GRPO, and dense retrieval plus LoRA-GRPO at the same Z on all five tasks. On ALFWorld, the text baselines should get the same skill cards, and a behavior-cloning agent without memory is needed. How does ElasticMem differ from REFRAG and COCOM?

  4. What are the seed standard deviations for Table 2? Were Z, Bmax and G chosen on validation or test? How many distinct personas or shared contexts are in the PersonaMem test splits? All the PersonaMem-32K case studies appear to come from one persona (Kai).

  5. What are the ALFWorld tokens per step and the mean episode length for each method? Does Table 10 include the control-token pass? What rank does the higher-rank variant use, and which QA token average is correct, 423 or 589/443?

9 comments
AuthorsOpenReview ↗

Response 1

Thank you for examining how memory allocation, task training, and the evaluation protocol each affect our results.


W1: Limited contribution of elastic allocation and missing mechanism controls.

Response. The learned allocator adds 4.89 percentage points over Uniform and 2.47 points over MLP in weighted QA accuracy (Table 1). Uniform itself exceeds MemGen by 11.5 points, and even Random exceeds trained text memory on LoCoMo (0.742 vs. 0.650). Those comparisons change the memory interface as well as the allocator, so they cannot attribute the entire gain to allocation (manuscript §4.2, Table 3 and Appendix A.2, Table 6).

Table 1. QA allocation policies with Qwen2.5-7B-Instruct.

Allocation policyPersonaMem-32KPersonaMem-128KLoCoMoLongMemEvalWeighted QA accuracyMean total tokens/query
Random0.8000.7550.7420.6500.7373442
Uniform0.8400.7940.7900.7100.7834432
MLP0.8600.8240.8150.7200.8076445
ElasticMem0.9000.8410.8380.7600.8323443

Table 1 allows injected length to vary by query. When we hold the retrieved chunks and the exact per-query memory budget fixed, elastic allocation beats Uniform in all 16 dataset–budget pairs, by 1.6–6.6 points. Under matched budgets, binary gating, elastic allocation without gating, and full ElasticMem reach 76.1%, 78.3%, and 79.9% weighted QA accuracy, respectively (Appendix J, manuscript Tables 70 and 72). Q1 below defines the Figure 2 variants and gives their five-seed results.

Memory content. We trained the same LoRA–GRPO pipeline with every budget fixed at zero. Separately, at evaluation we kept the trained checkpoint, query, retrieved indices, and per-chunk budgets fixed and substituted cached states from a different conversation or, on ALFWorld, unrelated skill cards.

Table 2. Memory-content controls.

DatasetZero memory (LoRA + GRPO)Incorrect memoryElasticMem
PersonaMem-32K0.6440.5880.900
PersonaMem-128K0.5770.5220.841
LoCoMo0.4230.3910.838
LongMemEval0.3300.2900.760
Weighted QA avg.0.4770.4340.832
ALFWorld0.2960.3190.529

Zero-budget training leaves a 35.5-point weighted QA gap to ElasticMem. Replacing memory content at the same injected length costs 39.8 points on QA and 21.0 on ALFWorld. These controls show that the trained model uses the retrieved content. Their effects cannot be added to decompose the gain over MemGen.

Answer-option artifacts. The reviewer’s writing-workshop example can be solved from the options alone. Only gold option (a) combines the most frequent initial attitude (“disliking”) with the most frequent reaction (“wonderful”) (original Table 34, revised Appendix I.1, manuscript Table 35).

Table 3. Answer-option controls. The options-only control is trained with the answer choices as its only input. Question + options uses the trained zero-memory control. For the permutation test, we shuffle the options and remap the gold label while preserving the question and memory.

DatasetOptions onlyQuestion + optionsElasticMem, permuted optionsElasticMem, original order
PersonaMem-32K0.5480.6440.8880.900
PersonaMem-128K0.4620.5770.8300.841
LoCoMo0.2380.4230.8240.838
LongMemEval0.2200.3300.7480.760

The options-only model exceeds chance on all four datasets (33.3% weighted accuracy). Shuffling choices and remapping the gold label lowers ElasticMem’s accuracy by 1.1–1.4 points. This tests sensitivity to position. Because the wording survives shuffling, the frequency of the reviewer’s majority-wording shortcut remains unknown.

Cache capacity. A budget of bjb_j exposes the last bjb_j projected states of a chunk to the reasoner. Each state can attend to the preceding text. Increasing the budget therefore gives the reasoner more positions through which to access the same source information. Q2 gives the measured chunk lengths and the encoder layer.

Table 4. Cache position and Transformer layer. All variants use the same source memories, retrieval configuration, and cache capacity of 20 states per chunk.

Cache configurationPersonaMem-128KLoCoMo
Final layer, first 20 positions0.7520.739
Final layer, 20 uniformly spaced positions0.8040.792
Penultimate layer, last 20 positions0.7990.803
Final layer, last 20 positions (ElasticMem)0.8410.838

With the source chunks and cache size fixed, the final layer’s last 20 positions perform best on both datasets. Comparing them with the first 20 isolates the effect of position. Comparing the last 20 across the final two layers isolates the effect of layer choice.

AuthorsOpenReview ↗

Response 2

W2: Unequal comparisons and missing strong baselines.

Response. The seven text-memory methods in manuscript Table 2 use their native procedures without task-specific parameter updates. We therefore added trained text controls on all five tasks (§4.2 and Appendix L, manuscript Tables 76–78).

Trained text and long context. The QA controls use Qwen2.5-7B-Instruct, the same splits, answer supervision, and output constraints. The GRPO controls match the LoRA settings, schedule, and update count. The dense-text SFT and GRPO variants also share a frozen retriever. The long-context model receives the conversation directly, dropping the oldest turns when necessary to fit the 32,768-token window.

Table 5. Trained QA baselines (§4.2 and Appendix L, manuscript Table 76). Accuracy is averaged over five training seeds. The QA average weights the four benchmarks by their 50, 233, 314, and 100 test questions, respectively. The last column gives mean online tokens per LoCoMo query, including task input, memory, and generated output.

MethodPersonaMem-32KPersonaMem-128KLoCoMoLongMemEvalWeighted QA avg.LoCoMo tokens/query
No memory + LoRA-GRPO0.6440.5770.4230.3300.477171
Dense text + LoRA-SFT0.7440.6820.6250.5620.6443,822
Dense text + LoRA-GRPO0.7920.7430.7100.6500.7183,854
Long context (32K) + LoRA-GRPO0.8760.7140.8480.6420.77616,784
ElasticMem0.9000.8410.8380.7600.832362

Holding dense retrieval fixed, GRPO improves weighted QA accuracy by 7.4 points over SFT. ElasticMem gains a further 11.4 points over dense text + GRPO, a comparison that changes both retrieval and memory representation. On LoCoMo, the trained 32K model leads ElasticMem by 1.0 point while using 46.4 times as many online tokens per question.

Learned memory and compression. We adapted the methods in Table 6 to the same 7B backbone, source histories, and test questions while retaining their respective training objectives. COCOM and PISCO use 16× compression. The REFRAG-style baseline learns which compressed chunks to expand into text. ElasticMem learns how many latent positions each retrieved chunk receives.

Table 6. Learned-memory and compression comparisons (§5 and Appendix L, manuscript Table 77). Token counts are mean online tokens per question.

MethodLoCoMo accuracyLoCoMo tokensLongMemEval accuracyLongMemEval tokens
Memory-R1 (adapted)0.7641,9300.6901,744
xRAG (adapted)0.7221920.636206
COCOM (16×, adapted)0.7753080.690327
PISCO (16×, adapted)0.7993460.704369
REFRAG-style selective expansion0.8171,1860.7161,254
ElasticMem0.8383620.760410

ElasticMem improves on the REFRAG-style adaptation on both tasks while using fewer tokens. xRAG, COCOM, and PISCO use fewer tokens than ElasticMem. The revised §5 also distinguishes xRAG’s projected retrieval embeddings, ICAE’s learned memory slots, gist tokens for reusable prompts, COCOM’s compression rates, PISCO’s sequence-level distillation, and Memory-R1’s learned operations on text memory.

ALFWorld supervision. The original text methods received raw trajectories, while the latent methods received Gemini-distilled skill cards. For the controls in Table 7, we reserved 2,832 successful trajectories for memory construction and used 4,260 expert actions from 709 separate trajectories for training. All agents use the same 7B backbone. The memory-free behavior-cloning agent predicts expert actions with cross-entropy. The shared-card text agent receives ElasticMem’s selected cards verbatim, and the dense-text agent selects its own cards from the same pool.

Table 7. ALFWorld success under matched expert supervision (§4.2 and Appendix L, manuscript Table 78). Weighted SR accounts for 140 Seen and 134 Unseen episodes.

MethodSeen SRUnseen SRWeighted SR
No memory + behavior cloning0.4110.3630.388
No memory + GRPO0.3130.2790.296
Raw trajectory text + GRPO0.4860.4270.457
Shared skill cards + text + GRPO0.5130.4460.480
Dense retrieval + skill-card text + GRPO0.5360.4700.504
ElasticMem0.5630.4940.529

The strongest trained text agent comes within 2.5 points of ElasticMem in weighted success. Retrieval is conditioned on the episode objective: under greedy evaluation, cards and budgets stay fixed, while each action depends on the current observation, recent history, and admissible actions (§3.3 and Appendix L). Song et al. report 60.0/67.2 Seen/Unseen for supervised fine-tuning and 68.6/72.4 for ETO with Llama-2-7B-Chat under different prompts. Table 7 provides the within-protocol behavior-cloning comparison.

AuthorsOpenReview ↗

Response 3

W3: Insufficient evidence for mechanism claims and unreliable reporting of small improvements.

Response. At 7B, the post-control-token state retrieves more annotated evidence on both benchmarks. The policy gives retrieved evidence chunks larger budgets and suppresses them less often (Table 8). The evidence labels were used only for analysis. This measures an association across examples and allows for useful information in unannotated chunks (§4.4).

Table 8. Evidence recall and allocation among retrieved chunks (Appendix M, Table 79).

DatasetQuery-only Recall@20Post-token Recall@20Tokens per annotated chunkTokens per other chunkZero budget, annotatedZero budget, other
LoCoMo0.6660.71612.77.04.1%16.8%
LongMemEval0.6040.67113.26.83.2%18.3%

What the control token learns. Hard top-ZZ selection passes no gradient. With GRPO (G=4G=4), the sampled control token receives the downstream group-relative advantage through its likelihood. Each update holds the rollout indices and sampled budgets fixed (§3.6). The original bypass also changed the allocator’s input state (Appendix A.7, manuscript Table 13). Table 9 addresses that confound in three ways.

  • At the same checkpoint, we rank chunks using the pre-token state and retain the post-token state for the allocator. The retrieved chunks can change.
  • We independently train and evaluate a query-only model using the pre-token state for both retrieval and allocation, with matched backbone, data, memory bank, group size, and schedule.
  • We permute the budgets within each retrieved set, preserving its chunks, budget values, and total injected length.

Table 9. Retrieval and allocation interventions at 7B (Appendix M, Table 80).

SettingLoCoMo accuracyLongMemEval accuracyALFWorld weighted success rate
Full ElasticMem0.8410.7600.529
Query-only retrieval, original post-token allocator state0.8220.7400.514
Independently trained query-only retrieval and allocation0.8180.7340.505
Permuted budgets at the original checkpoint0.8100.7280.502

Both pre-token controls score lower on all three tasks, including when trained on the state they use at evaluation. Permuting the budgets also lowers all three scores, showing that which chunk receives each budget matters even at fixed total length.

Uncertainty. Table 10 uses full-minus-control differences for five paired seeds on identical examples. On LoCoMo, the allocation pair comes from manuscript Table 4 (0.838 vs. 0.815) and the retrieval pair from manuscript Table 80 (0.841 vs. 0.818). All six nominal two-sided 95% Student-tt intervals (4 df) exclude zero on these splits. One correct answer changes single-run accuracy by 2 points on PersonaMem-32K and 1 on LongMemEval. The 314 LoCoMo questions share two held-out conversations, so these intervals quantify training-seed variation on those histories. Q4 gives the main-score SDs (Appendix A.2, manuscript Table 6).

Table 10. Paired performance differences across five training seeds (Appendix M, Table 81).

ComparisonDatasetMean gainPaired SD95% seed-level interval
Transformer allocation vs. MLP allocationPersonaMem-32K+0.0400.024[+0.010, +0.070]
Transformer allocation vs. MLP allocationLoCoMo+0.0230.015[+0.004, +0.042]
Transformer allocation vs. MLP allocationLongMemEval+0.0400.025[+0.008, +0.072]
Full retrieval vs. independently trained query-only retrievalLoCoMo+0.0230.014[+0.006, +0.040]
Full retrieval vs. independently trained query-only retrievalLongMemEval+0.0260.017[+0.005, +0.047]
Full retrieval vs. independently trained query-only retrievalALFWorld+0.0240.016[+0.004, +0.044]

Hyperparameter sweeps. We fixed the QA defaults during development with the training and validation splits. The cited 0.841, 0.529, and 0.900 are post-hoc test sensitivity results (Appendix A.4, manuscript Tables 9–10 and Appendix A.6, manuscript Table 12). Doubling GG from 4 to 8 adds 0.003 LoCoMo accuracy and 0.004 ALFWorld success. The Bmax⁡B_{\max} sweep also varies cache length. Manuscript Table 12 separately clips allocations to 20 at inference for a fixed checkpoint trained with a limit of 40.

Token accounting. The revised abstract identifies ALFWorld’s token metric as a weighted mean per episode. At 3B, ElasticMem takes fewer actions than LangMem but uses more tokens per action on both splits, costing 397 more tokens per Unseen episode. At 7B it uses fewer actions and fewer tokens per action than MemGen on both splits (Table 11). Q5 gives the corrected QA totals from §4.1 and manuscript Table 2.

Reviewer_4iFTOpenReview ↗
Rating
3
Confidence
2
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

ElasticMem treats latent memory capacity as a learnable resource. It combines reasoner-state retrieval, a policy assigning variable token budgets to retrieved memories, and a projector injecting cached representations as soft tokens. These components are trained with GRPO using task rewards. Experiments across memory-intensive QA and ALFWorld report substantial improvements over text and latent memory baselines, supported by component ablations and cross-task transfer evaluations.

Critical strengths

The paper identifies a useful distinction between retrieving relevant memories and deciding how much representational capacity each memory deserves. Learning both decisions from downstream feedback provides a coherent approach to reducing the influence of redundant evidence while preserving useful information. The empirical results are encouraging across both QA and embodied interaction, with substantial reported gains on two backbone scales. The training-objective controls, projector ablation, retrieval/allocation comparisons, and frozen cross-task transfer experiments provide complementary evidence that the complete approach is useful beyond a single benchmark.

Critical weaknesses

The contribution of elastic allocation at a fixed resource budget remains insufficiently isolated. Figure 2 compares allocation policies without reporting their corresponding total injected-token budgets. ElasticMem also uses more QA tokens than MemGen and M+. These limitations make it difficult to determine how much improvement comes from better allocation versus additional resources.

The implementation of the policy-update objective needs clarification. Equations 20–21 include a deterministic retrieval indicator whose selected indices depend on the trainable reasoner. If those indices change between rollout collection and likelihood evaluation, the stored trajectory can receive zero probability under the stated joint likelihood. The training procedure does not clearly explain how this case is handled or whether optimization instead conditions on fixed rollout indices. This distinction matters for reproducing and assessing the claimed joint optimization.

Questions for authors

At matched total injected-memory token budgets, how does the learned allocator compare with uniform allocation? Please report the actual budgets used by the Figure 2 variants. Can you provide uncertainty estimates across the five training seeds and confirm whether the latency measurements include the complete retrieval-control/query-state computation?

2 comments
AuthorsOpenReview ↗

Response 1

We sincerely thank the reviewer for their careful reading of our paper and constructive feedback. We greatly appreciate the thoughtful comments and suggestions, which will help us improve the clarity and rigor of our work. Below, we address each concern in detail.


W1: Insufficient isolation of elastic allocation under fixed resource budgets.

Response. Thank you for pointing out that allocation policies can differ both in how much memory they inject and in how they distribute it. We added mean total tokens per question for the policies in Figure 2(a) to §4.3, “Budget Policy and Retrieval”. We also report a new comparison with increased-budget MemGen and M+ in §4.1, “Performance and Token Consumption”. Appendix A.1, Table 4 gives the per-dataset results for both comparisons.

(i) Token use across allocation policies. The four policies use Qwen2.5-7B-Instruct with the same retrieval settings and evaluation protocol. Rebuttal Table 1 pairs the accuracies from manuscript Figure 2(a) with mean total tokens per question. Following manuscript Table 2, this count includes the task input, injected memory, and generated answer. Uniform injects 10 tokens per retrieved chunk, giving 90, 210, 200, and 200 memory tokens per question on PersonaMem-32K, PersonaMem-128K, LoCoMo, and LongMemEval, respectively. Table 1 does not report separate measured injection lengths for Random, MLP, or the Transformer. We weight the four datasets by their respective test-set sizes of 50, 233, 314, and 100 questions (Appendix G, Table 15).

Table 1. QA accuracy / mean total tokens per question for each allocation policy (Appendix A.1, manuscript Table 4, first four rows).

Allocation policyPersonaMem-32KPersonaMem-128KLoCoMoLongMemEvalWeighted avg.
Random0.800 / 4790.755 / 5520.742 / 3700.650 / 3930.7373 / 442
Uniform0.840 / 4740.794 / 5420.790 / 3600.710 / 3830.7834 / 432
MLP0.860 / 4840.824 / 5510.815 / 3730.720 / 4020.8076 / 445
ElasticMem0.900 / 4830.841 / 5570.838 / 3620.760 / 4100.8323 / 443

ElasticMem achieves the highest accuracy on all four QA datasets. On LoCoMo, for example, its Transformer allocator improves accuracy from 81.5% to 83.8% over the MLP allocator while reducing mean token use from 373 to 362 per question.

(ii) Increasing the memory allowances of MemGen and M+. In their standard configurations, MemGen and M+ average 291 and 247 total tokens per question, respectively, compared with 443 for ElasticMem (manuscript Table 2, Qwen2.5-7B rows). We increased the memory allowance within each baseline’s native interface and evaluated each configuration over five runs on the same QA test sets with Qwen2.5-7B-Instruct. We report the weighted comparison in §4.1, “Performance and Token Consumption”.

Table 2. QA accuracy / mean total tokens per question with increased baseline memory allowances (Appendix A.1, manuscript Table 4, ElasticMem row and final two rows).

Method and allowancePersonaMem-32KPersonaMem-128KLoCoMoLongMemEvalWeighted avg.
MemGen, increased0.712 / 5330.701 / 6030.713 / 3940.658 / 4470.701 / 481
M+, increased0.660 / 5330.638 / 6030.667 / 3940.616 / 4470.649 / 481
ElasticMem0.900 / 4830.841 / 5570.838 / 3620.760 / 4100.8323 / 443

With increased allowances, MemGen and M+ reach 70.1% and 64.9% weighted QA accuracy, respectively, at 481 total tokens per question. ElasticMem reaches 83.23% at 443 tokens, leading MemGen by 13.1 percentage points and M+ by 18.3 percentage points. On every dataset, both baselines consume more total tokens than ElasticMem and still score lower.

Conclusion. The clearest evidence for learned allocation comes from the comparison within ElasticMem. Across the four QA datasets, the Transformer allocator improves weighted accuracy by 2.47 percentage points over the MLP allocator while using two fewer total tokens per question on average. The increased-budget baseline comparison likewise shows that ElasticMem’s advantage persists even when competing systems consume more tokens. These results support the benefit of the learned allocator at comparable average token use. In §4.3 and Appendix J (manuscript Table 70), we held the retrieved chunks and the number of injected memory tokens fixed for each question. Elastic allocation outperformed uniform allocation in all 16 dataset–budget comparisons, by 1.6–6.6 percentage points.

AuthorsOpenReview ↗

Response 2

W2: Clarification of the policy-update objective and joint optimization.

Response. Thank you for pointing this out. Under the original joint likelihood, changing the retrieved indices could assign zero probability to a stored trajectory. In our implementation, retrieval indices and sampled budgets remain fixed during GRPO updates. We have clarified this conditional objective in §3.6, Eqs. (19)–(21) and the rollout procedure in Appendix E, Algorithm 1.

Fixed rollout decisions. Each rollout samples a retrieval-control token, selects the top-ZZ chunks, allocates their budgets, and generates an answer. During subsequent updates, the stored indices and budgets remain fixed, while the current projector reconstructs the soft memory inputs for scoring the recorded answer. Retrieval is performed again when collecting new rollouts.

Conditional optimization. Eq. (19) applies the same group-relative advantage to separately clipped token and budget-policy terms. Eq. (20) scores the sampled control token and recorded answer tokens, while Eq. (21) evaluates each stored budget action under the current and rollout policies using the same saved decision context. The deterministic retrieval indicator is excluded, preventing changed retrieval indices from zeroing the update.

The control-token and answer terms update the LoRA-adapted reasoner; the answer term also updates the latent projector, while the budget term updates the allocator. All three components therefore learn from the same downstream reward, without differentiating through discrete top-ZZ selection.


Q1: Uncertainty estimates, and latency accounting.

Response. Thank you for requesting uncertainty estimates and complete latency accounting. We report standard deviations across five training seeds and clarify the retrieval-control overhead. The original end-to-end timings included the control-token pass; the new measurements explicitly cover both control-token generation and the subsequent query-state forward pass.

(i) Uncertainty across training seeds. We keep test splits, memory banks, hyperparameters, and evaluation protocols fixed across seeds. Table 3 reports QA accuracy and ALFWorld success rate (SR). Dataset means retain the two-decimal precision of manuscript Table 2. Weighted QA accuracy is computed over all 697 test questions within each seed before calculating the five-seed mean and SD.

Table 3. Qwen2.5-7B-Instruct performance across five training seeds (mean ± SD).

DatasetMemGenElasticMem
PersonaMem-32K0.70 ± 0.0320.90 ± 0.032
PersonaMem-128K0.66 ± 0.0190.84 ± 0.016
LoCoMo0.68 ± 0.0210.84 ± 0.017
LongMemEval0.63 ± 0.0260.76 ± 0.025
QA weighted average0.668 ± 0.0160.832 ± 0.014
ALFWorld-Seen0.39 ± 0.0370.56 ± 0.031
ALFWorld-Unseen0.34 ± 0.0410.49 ± 0.035

ElasticMem improves weighted QA accuracy over MemGen by 16.4 percentage points, with across-seed SDs of 1.4 and 1.6 points, respectively. It also achieves higher mean success rates on both ALFWorld splits. These results are reported in §4.1 and Appendix A.2, Table 6.

(ii) Complete inference latency. We remeasured ElasticMem on an NVIDIA RTX A6000 in BF16 using CUDA-synchronized wall-clock timing and identical decoding settings. The timer starts before query processing and includes control-token generation, the post-token query-state forward pass, top-ZZ retrieval, budget allocation, latent projection, and final generation. QA latency covers each complete answer; ALFWorld latency covers the episode through its final action. Offline memory-bank construction is excluded.

Table 4. Qwen2.5-7B-Instruct inference latency. The final column measures control-token and query-state computation within the complete execution.

DatasetUnitOriginal timingComplete timingControl token + query state
PersonaMem-32Ks/query0.4400.4630.052
PersonaMem-128Ks/query0.6200.6510.059
LoCoMos/query0.4900.5140.054
LongMemEvals/query0.5500.5760.057
ALFWorld-Seens/episode42.543.8—
ALFWorld-Unseens/episode44.445.9—

Control-token generation and query-state computation take 52–59 ms per QA query, accounting for 9.1–11.2% of complete latency. With both operations included, ElasticMem remains faster than the reported MemGen, AutoCompressor, and M+ timings on all four QA benchmarks. Complete ALFWorld latency is 43.8 s/episode on Seen and 45.9 s/episode on Unseen, including the control step and all actions. We summarize these results in §4.1 and provide the complete latency comparisons in Appendix A.5, Table 11.

We hope these clarifications address your concerns and would appreciate your reconsideration of the score. Thanks for the constructive feedback.

Comments on the paper

1 comment
AuthorsOpenReview ↗

Our Sincere Appreciation to the Area Chair and Reviewers: Summary of Rebuttal Improvements

We sincerely thank the Area Chair and all reviewers for their thoughtful and constructive feedback. During the rebuttal, we substantially strengthened ElasticMem through additional controlled experiments, stronger baseline comparisons, detailed mechanism analyses, and improved statistical and implementation reporting. Below, we summarize the major concerns, our responses, and the key findings.

DimensionKey ConcernsOur Main ActionsKey Findings
Elastic Allocation & Token EfficiencyDoes learned allocation outperform fixed allocation under identical token budgets?Added 16 matched-budget comparisons across four QA benchmarks, along with binary gating, uniform allocation, and explicit token-cost penalty experiments.Elastic allocation improves accuracy by 1.6–6.6 percentage points at identical per-question budgets. Full ElasticMem also outperforms binary gating by 3.8 points, demonstrating the benefit of fine-grained allocation.
Memory Effectiveness & MechanismDo improvements genuinely arise from retrieved memory content and adaptive allocation?Added zero-budget, unrelated-memory, and options-only controls, alongside evidence-based retrieval and budget-distribution analyses.Removing memory or substituting unrelated content reduces weighted QA accuracy from 83.2% to 47.7% and 43.4%, respectively. Annotated evidence receives 1.81–1.94× larger budgets than other chunks.
Baseline Fairness & ComparisonsAre improvements attributable to stronger training or unequal memory resources rather than the proposed method?Added trained dense-text, full-context, behavior-cloning, and compression baselines, including Memory-R1, xRAG, COCOM, PISCO, and REFRAG-style methods, with controlled training and evaluation settings.ElasticMem achieves 83.2% weighted QA accuracy, compared with 71.8% for trained dense-text retrieval and 77.6% for trained long-context memory, while using substantially fewer tokens.
Retrieval & Optimization ValidityAre retrieval and allocation contributions isolated, and is the joint GRPO objective correctly implemented?Added query-only retrieval controls, budget-permutation experiments, and clarified the conditional GRPO objective with fixed rollout indices and budgets.Control-token retrieval improves evidence Recall@20 to 71.6% on LoCoMo and 67.1% on LongMemEval. Controlled interventions confirm the benefits of learned retrieval and allocation.
Statistical Reliability & Evaluation TransparencyAre performance gains robust across seeds, and are experimental configurations and benchmark details sufficiently documented?Added five-seed standard deviations, paired uncertainty analyses, explicit hyperparameter-selection protocols, and clarifications of test-set composition and answer-option artifacts.ElasticMem maintains consistent improvements across both backbone sizes. At 7B, weighted QA accuracy reaches 83.2% ± 1.4%, compared with 66.8% ± 1.6% for MemGen.
Computational Cost & ReproducibilityAre token consumption, inference latency, and implementation details reported accurately?Added complete latency measurements, including control-token and query-state computation, per-action token accounting, and detailed cache and projector configurations.ElasticMem retains competitive inference latency while improving memory efficiency. At 7B, complete retrieval-control computation accounts for 9.1–11.2% of QA latency, with all stages explicitly measured.

Appreciation

We sincerely thank the Area Chair and all reviewers for their constructive feedback. The additional experiments, controlled comparisons, and methodological clarifications have strengthened the rigor, transparency, and practical significance of ElasticMem. We hope our responses and revisions adequately address the concerns raised.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.