TL;DR
How do you get an AI agent to learn from its mistakes on the job without the massive compute cost—or lobotomy risk—of constantly updating its neural weights? MemRL solves this by freezing the LLM’s brain and applying reinforcement learning directly to its external memory instead. By scoring past experiences based on whether they actually helped solve tasks, the agent evolves at runtime simply by getting smarter about what it chooses to remember.
What Problem Does This Paper Address?
Humans effortlessly balance stability (not forgetting how to ride a bike) with plasticity (learning the layout of a new city). Current AI agents struggle mightily with this balance after deployment.
If you try to teach a deployed LLM new tricks via fine-tuning, it is computationally expensive and risks catastrophic forgetting—overwriting core reasoning abilities to learn a narrow new task. The popular alternative is Retrieval-Augmented Generation (RAG), where you freeze the model and let it look up past experiences in an external database.
The catch? Standard RAG is passive. It retrieves memories based purely on semantic similarity ("this past query sounds like the current one"). In complex agentic tasks, sounding similar does not mean being helpful. As an agent’s memory bank grows, similarity search increasingly pulls in unhelpful noise or past failures, causing performance to plateau. We need agents that learn which memories actually work.
Methods
MemRL frames memory lookup not as a passive database query, but as an active Reinforcement Learning (RL) decision problem. The LLM backbone stays completely frozen; all the learning happens inside an evolving episodic memory bank.
Here is how MemRL upgrades standard RAG:
- Intent–Experience–Utility Triplets: Instead of simple key-value pairs, memories are stored with three parts: the Intent (the task goal/query), the Experience (an LLM-summarized trace of how it went), and a scalar Utility ($Q$-value) representing how useful that memory has been in the past.
- Two-Phase Retrieval: When a new task arrives, Phase A acts like standard RAG, using embedding similarity to pull a small pool of relevant candidates. Phase B then re-ranks those candidates using a 50/50 normalized blend of semantic similarity and learned $Q$-values, filtering out high-similarity "distractors" that historically led to dead ends.
- Runtime Utility Updates: After the agent attempts the task using the retrieved memories, the environment hands back a reward (e.g., pass or fail). MemRL updates the $Q$-values of the injected memories using a lightweight, Monte Carlo-style rule: $Q_{\text{new}} \leftarrow Q_{\text{old}} + \alpha(r - Q_{\text{old}})$. Meanwhile, the current attempt is summarized and added to the bank with a neutral initial utility ($Q_{\text{init}} = 0$).
Datasets
The authors evaluate MemRL across four existing benchmarks (no new datasets are introduced), pairing each with different frozen LLM backbones (GPT-4o, GPT-4o-mini, GPT-5-mini, and Gemini-3-pro):
- BigCodeBench: Complex code generation.
- ALFWorld: Embodied household navigation and exploration.
- Lifelong Agent Bench: Operating System (OS) and Database (DB) interaction tasks.
- Humanity’s Last Exam (HLE): Frontier, knowledge-intensive reasoning questions.
Key Insights and Ideas
- Failure isn't worthless: You might expect high-utility memory bins to contain only past successes. Surprisingly, about 12% of the memories in the highest $Q$-value tier ($0.9 - 1.0$) are actually past failures. The RL critic learns to value "strategic near-misses" that provide crucial procedural warnings on what not to do.
- Pure RL is just as flawed as pure similarity: In ablations tuning the blend between similarity and $Q$-values ($\lambda$), relying 100% on learned utility ($\lambda = 1$) caused performance to crash due to context detachment—picking high-scoring memories that had nothing to do with the prompt. A balanced 50/50 split ($\lambda = 0.5$) hit the sweet spot.
- Suppressing "empirical forgetting": Even with frozen weights, standard memory agents "forget" how to solve tasks when new, noisy memories crowd out good ones in retrieval. MemRL lowers this empirical forgetting rate to 4.1% (down from 5.1% in the strongest baseline).
Key Results
MemRL was tested in two modes: Runtime Learning (adapting across 10 epochs on the same task set) and Transfer Learning (freezing the learned memory bank and testing on unseen tasks).
- Runtime Dominance: Averaged across all benchmarks, MemRL achieved a 76.9% final-epoch success rate and a 79.8% Cumulative Success Rate (tasks solved at least once), beating the strongest agentic memory baseline (MemP) by +2.9 and +3.1 percentage points, respectively.
- Exploration Gains: Gains were largest in multi-step exploration environments. On ALFWorld, MemRL hit 94.2% final accuracy (+5.5 points over RAG) and 98.3% cumulative success. On HLE, it reached 57.0% (+4.8 points over MemP).
- Zero-Shot Transfer: When the memory bank was frozen and moved to held-out test sets, MemRL achieved the highest average success rate at 79.2% (+2.8 points over MemP), peaking at 98.1% on ALFWorld.
Limitations and Future Work
The authors are candid about several constraints:
- The Credit-Assignment Problem: If an agent retrieves three memories to solve a task and succeeds, all three get rewarded equally—even if two were useless passengers. Future work could use Shapley values or value decomposition to assign credit more precisely.
- Task-Level vs. Step-Level Feedback: Updating utilities only at the end of an episode can introduce noise in long-horizon tasks; multi-step temporal-difference updates and memory consolidation could help.
- The Frozen Ceiling: Non-parametric memory is bounded by the frozen LLM's base reasoning capacity and context window, and cross-task transfer struggles when tasks share very little semantic similarity (like in HLE). The authors view MemRL as a complement to, rather than a total replacement for, parametric fine-tuning.
Summary updated