> Paper: Just-In-Time Reinforcement Learning: Continual Learning in LLM Agents Without Gradient Updates > Venue: ICML 2026 Spotlight | Team: National University of Singapore > arXiv: 2601.18510 | TL;DR: With model weights fully frozen, JitRL retrieves experience from memory to estimate action advantages and directly modulates logits—no gradient updates at all, yet the agent keeps improving.
---
🎯 A Counter-Intuitive Question: Why Can't an Agent "Remember" What It Has Learned?
Consider an LLM agent trained to book flights. It performs well on familiar flows, but once deployed, if an airline changes its website layout or adds a new step, the agent breaks—its weights are frozen, and it cannot learn the new click sequence.
This is the core dilemma of LLM agents: weights freeze after deployment, making continual adaptation hard.
The traditional fix is continued RL fine-tuning (PPO, GRPO), but that faces three obstacles:
1. Prohibitive compute: a single training run can cost thousands of dollars on H200 clusters for hundreds of hours 2. Catastrophic forgetting: learning new environments degrades old ones 3. In-context learning is insufficient: prompts have length limits, and many skills (e.g., "how to bypass that popup on this specific site") are hard to verbalize
The paper's core question:
> Can an agent keep learning new skills after deployment, without touching weights or computing any gradients?
JitRL's answer: Yes—store experience in memory and retrieve it at inference time.
---
🧩 Method: A Three-Step, Zero-Gradient Loop
In one sentence: retrieve similar experiences at inference → estimate action advantages → add them to logits when selecting actions; after each task, evaluate the trajectory → store it in memory → reuse it next time.
Step 1: Retrieve
Given a new state, the agent searches memory for the most similar past states. Memory stores raw (state, action, return) triples—uncompressed experience, unlike EvolveR, which distills trajectories into textual principles.
Step 2: Estimate Advantage
- V(s) = average return of historical trajectories similar to the current state
- Q(s,a) = average return of similar trajectories that also took the same action
- A(s,a) = Q(s,a) − V(s)
- JitRL is the strongest training-free method at 51.35%
- On held-out tasks, JitRL reaches 60.00% vs. WebRL's 46.06%
- Training-free > gradient fine-tuning—frozen weights + memory retrieval may generalize better than fine-tuning, which can overfit the training distribution
- ProcMEM: the closest gradient-free relative, also using non-parametric advantage estimation. But ProcMEM consolidates experience into callable skills; JitRL has no such abstraction and is more lightweight
- GAM: shares the frozen-weights, test-time-intelligence philosophy. GAM governs the input side (what goes into context); JitRL governs the output side (how action probabilities are modulated)
- Memory growth: no discussion of index optimization or memory eviction strategies
- Neighbor count sensitivity: fixed K, no adaptive mechanism
- Multi-task interference: no task isolation in a shared memory store
- Theoretical assumptions: the KL closed-form derivation assumes linear function approximation; whether LLM token spaces strictly satisfy this is an open gap (supported empirically, not rigorously)
- Chen, W., et al. "Just-In-Time Reinforcement Learning: Continual Learning in LLM Agents Without Gradient Updates." ICML 2026 Spotlight. arXiv:2601.18510.
- Related coverage: EvolveR, ProcMEM, GAM
> Analogy: Suppose average return near an intersection is 100 (V=100), but among those that turned left there it is 130 (Q=130). Turning left has advantage +30.
For unseen actions, JitRL applies an optimism-based exploration bonus that shrinks as memory fills—automatically shifting from exploration to exploitation.
Step 3: Modulate Logits
Rather than editing prompts or fine-tuning, JitRL adds the advantage directly to the model's output logits:
> new logits = original logits + β × advantage
β is a temperature coefficient. Positively-advantaged actions get boosted, negative ones suppressed.
The paper proves a strong theoretical result: this additive rule is the exact closed-form solution to policy optimization under a KL-divergence constraint.
> Analogy: The model would say "left 30%, straight 40%, right 30%". If memory says left turns worked best (advantage +30), left's probability is pushed up to ~50%—but never beyond what the KL constraint permits, avoiding abrupt policy shifts.
Closing the Loop: Evaluation and Storage
After each task, an evaluator model performs step-level reward attribution—judging each step's contribution to the outcome rather than only scoring the final answer. Returns are discounted and summed, and (state, action, return) triples are written to memory.
---
🔬 Key Technical Details
Neighbor Search for Advantage Estimation
State similarity is measured by embedding-space distance; the K nearest neighbors are retrieved. A subtlety: neighbor returns are realized returns, not model-estimated expected returns, so value estimates are noisy—averaging helps as memory grows. The paper does not explicitly address this noise, but experiments suggest estimation quality is adequate once enough experience accumulates.
Theoretical Guarantee
Under a KL constraint (new policy must not drift too far from the original), maximizing expected return has an exact closed-form solution: original logits plus β times the advantage. The derivation assumes linear function approximation + softmax policies, but the authors argue it transfers to LLMs, whose final layer is essentially one large softmax.
A stronger result: as memory accumulates, retrieval-based value estimates converge to true values, and the policy converges to the KL-regularized optimum.
Engineering: White-Box vs. Black-Box Models
White-box (logprob access, e.g., GPT-series APIs, open-source models): read each candidate action token's logprob as logits, add advantages, re-softmax, and sample.
Black-box (no probability access): ask the model to verbalize its confidence (e.g., "8/10"), convert to an approximate logit, then apply advantage modulation.
Both modes work with API models as-is—no model changes required.
---
📊 Experiments: Training-Free vs. Fine-Tuning
WebArena
| Method | Training | Final Success Rate | |--------|----------|-------------------| | ReAct | zero-shot prompting | 14.41% | | Reflexion | reflection + in-context | 20.93% | | A training-free baseline | training-free | 43.00% | | JitRL | training-free | 51.35% | | WebRL | gradient fine-tuning | 46.06% |
Key findings:
Jericho Text Games (Zork1)
| Method | Training | Average Score | |--------|----------|---------------| | ReAct | zero-shot | 6.2 | | Reflexion | reflection | 16.2 | | GRPO (gradient) | gradient updates | 16.2 | | JitRL | training-free | 53.0 |
Key finding: JitRL scores 53.0, 3.27x GRPO. In the extremely sparse state spaces of text games, GRPO's gradients struggle to explore, while JitRL directly reuses historically successful paths from memory.
Cost Comparison
| Method | Compute | Estimated Cost | |--------|---------|----------------| | WebRL (gradient fine-tuning) | H200 cluster × 154 hours | ~$9,900 | | JitRL | API calls | ~$290 |
JitRL is over 30x cheaper than WebRL, requires no training infrastructure, and deploys out of the box.
---
🔗 Positioning: Three Roads to Experience-Driven Evolution
JitRL sits alongside EvolveR in the "experience-memory-driven evolution" line, but makes opposite design choices:
| Dimension | EvolveR | JitRL | |-----------|---------|-------| | Experience storage | compressed textual principles | raw triples, uncompressed | | Gradient updates | final GRPO training into parameters | zero gradients throughout | | Value function | implicit in parameters | explicit in memory | | Retrieval timing | at training time | at inference time |
Related work:
---
💡 Core Insights
1. "Memory Is the Value Function"
The most disruptive intuition: the value function need not be approximated by neural network parameters—it can be estimated directly from historical experience in memory.
Traditional RL: V(s) ≈ neural_network(s) JitRL: V(s) ≈ average of neighbors' returns
This may be unstable with sparse data, but LLM agents execute many tasks and accumulate many trajectories, so neighbor counts—and estimate quality—grow over time.
2. Frozen Weights Are a Feature, Not a Bug
Experiments show frozen weights + memory retrieval beat gradient fine-tuning on held-out tasks. Fine-tuning tends to overfit specific patterns of the training distribution, while memory retrieval preserves the base model's generalization while covering new distributions via experience. For "how should LLM agents evolve after deployment?", the answer may be not "keep training" but "store memory well."
3. The Importance of the KL Constraint
"Logits + advantage" is not arbitrary—it is the exact solution under a KL constraint. This means the agent cannot suddenly swing from a sane policy to a wild one; advantages "nudge" rather than "overturn", and when memory is thin (advantage estimates unreliable), the KL constraint protects the original model.
4. Engineering Elegance
No model changes, no training infrastructure, white-box and black-box support, plug-and-play deployment—easier to adopt than large-scale training pipelines.
5. Unsolved Problems
---