Experience-Handoff Reinforcement Learning · Kim et al.
Train experience notes by testing the next attempt they guide
41 reminders, but only 6 belonged
An AppWorld agent must remind roommates about payment requests pending for at least 50 days. Its first attempt reminds all 41 old sent requests—without identifying the roommates. Its successful third attempt reminds 6. Figure 2
A failure can reveal exactly what to check next. But a new attempt needs that evidence in a usable note. In the same example, actor-only GRPO tries to edit a nonexistent tip in an empty playbook; the edit is rejected and nothing carries forward. A stronger actor is not automatically a better memory writer. §1; Figure 2
The first three attempts in Figure 2
| Visit | Actor-only GRPO in ACE | ACE-RL in ACE |
|---|---|---|
| 1 | Fails, 20 turns. Reads received requests. UPDATE on empty book is rejected. | Fails, 15 turns. Reminds all 41 old sent requests. Adds an identity-verification tip. |
| 2 | Fails, 20 turns. Guesses roommate names. Again edits a missing tip. | Fails, 17 turns. Phone login fails; guesses from payment history. Adds a date-calculation tip. |
| 3 | Fails, 16 turns. Reminders on received requests are refused. | Succeeds, 15 turns. Finds roommates and today's date in the phone app; reminds the 6 old requests. |
Our inference: This contrasts checkpoints, not the same actor with one particular tip removed. It does not isolate the causal effect of those exact tips.
Train the writer by testing its reader
ACE-RL jointly trains one model's actor, reflector, and curator by executing candidate playbooks in fresh attempts, crediting their verifier scores upstream, and comparing reflection and edit alternatives with shared inputs. §§2–3
Do not ask another model whether a note sounds helpful: give it to a fresh attempt and check the task result. Use that result to train the note-writing calls and the actor that reads the note. §3.1
In the payment task, missing roommate identities motivate a tip to verify them using supervisor or phone data. During training, a proposed playbook would be tested in a fresh episode. The displayed held-out run is different: weights are frozen, edits are applied directly, and the third actor attempt succeeds. Figure 2; §2.1
- Fixed task-local harness
- Prompts, tools, and control flow stay fixed. Every actor call starts a fresh environment; only the task's playbook persists. §2.1
- Actor
- Reads task and playbook, generates actions, observes tool replies, and receives its own task-verifier reward. An episode is this alternating action–observation record. §2.1; §3.1
- Reflector
- Reads trajectory evidence and extracts an actionable insight. §2.1; Appendix D.3
- Curator and Apply
- Emits ADD, UPDATE, or REMOVE operations. Apply executes them in order, removes duplicates, and renumbers tips. A candidate must parse, apply, actually change memory, and fit within 2,048 tokens. Appendix D.3
What is new—and what already existed?
Reflect–Retry–Reward, ERL, Memory-R1, and others already credited experience with downstream outcomes. ACE-RL's narrower contribution is one jointly trained policy for a two-stage reflect–curate handoff, a persistent editable artifact, and stage-specific comparison groups. It fixes the harness rather than searching its prompts or code. Appendix A
What the reflector actually sees
Benchmark-specific prompts can include richer context than the compact equations. A summary precedes the action–observation record. History is capped at 20k tokens, always preserving the final environment reply. Output is JSON with outcome, reasoning, and key_insight. Appendix D.3
Branch alternatives, then send credit back
Start with four seed episodes. Pick one uniformly; ask for two reflections of that same evidence. Pick one usable reflection uniformly for three alternative edits; give the other usable reflection one edit. Each edit changes a separate copy of the incumbent—not the preceding candidate. Figure 3; Appendix D.3
Execute each admissible candidate once. Its verifier score rewards the edit, contributes to its reflection's mean, and trains the scoring actor episode itself. With all branches usable and admissible, this gives eight actor episodes in fourteen outputs. §3.1; Appendix D.1
Provenance determines where credit goes; group membership determines the comparison. Figure 3; Appendix D.3
Above a group's reward mean gives positive credit; below gives negative credit. This can make rewarded generated outputs more likely without differentiating through environment replies. After filtering and normalization, all roles share one clipped token-level update. §3.2; Appendix D.3
Separately, keep a highest-scoring candidate if it meets the selected seed's score; otherwise keep the incumbent. Ties are uniform. Training memory resets before each task's 3rd, 6th, … encounter; evaluation memory does not follow that schedule. Appendices D.2–D.3
Our inference: A sampled score is not expected improvement over the incumbent. One fresh episode can be lucky; so can the seed that supplies the acceptance threshold.
What sparsity saves—and does not preserve
The full tree with the main group sizes would produce 60 outputs, including 24 candidate evaluations. The sparse version has at most 14 outputs, including 8 actor rollouts. Uniform selections preserve specified raw-score means under the analysis assumptions; they do not establish equality of normalized, filtered, clipped gradients. Appendix D.1
A failed seed can earn a useful reflection
A receives , above its group's mean of . The failed seed supplies evidence, not A's reward. No prose-quality rating enters: the task verifier grades candidate-guided episodes. Eq. (7)
Numerical teaching example—not a reconstruction of the payment task.
Fix an empty incumbent, two usable reflections, and four distinct admissible ADDs. Scores and tip texts below are illustrative. Each playbook has one tip; the alternatives do not accumulate.
- Select evidence and branch.
Both reflections read the same selected seed; only A receives a three-edit comparison group.
- Apply each edit to its own copy.
The common input is the empty incumbent, not the previous edit's output.
- Execute candidates and credit actors.
A candidate score rewards its edit; the scoring episode also joins actor training with its own score.
- Average admissible descendants.
Use the mean, not the seed score and not the best descendant.
- Compare within each group.
Dividing these centered values by a positive standard-deviation-plus-epsilon scale preserves their signs. The binary singleton gives no comparison.
- Select memory independently.
All evaluated outputs remain eligible subject to group filtering—not just the retained winner. Appendix D.2
Arithmetic convention
The toy displays population standard deviations and leaves epsilon symbolic. This is a display convention, not a claim about the backend's standard-deviation convention. It routes already-supplied scores; it does not generate a note, run a verifier, or train a transformer.
Learning credit is not memory acceptance
Keep P: every candidate is below the selected seed's score. Reflection rewards are , and the nonconstant reflector and curator A groups remain eligible. A positive reward is not enough for acceptance; rejection from memory does not mean rejection from training. Appendix D.2
A trained actor in an untrained handoff harness
Same input: the held-out payment task, an empty playbook.
Its first two edits target missing tips and are rejected. The first three attempts fail, using 20, 20, and 16 turns.
Adds identity and date tips. Attempt 3 finds the roommates and date, then reminds the 6 old requests in 15 turns.
Difference: checkpoints trained for actor-only outcomes versus joint action and handoff behavior. Figure 2
Our inference: This is not an isolated causal test of those tips or of grouping.
A fluent edit that changes nothing
Same input: an empty book and an UPDATE of tip 1. Teaching near-miss, not an evaluated baseline.
Could praise an insightful explanation while leaving no usable memory.
No target exists. Reward is zero; no candidate episode runs; the edit is excluded from the reflection's denominator.
Difference: require a mechanically changed artifact before execution, not convincing prose. Appendices C.3, D.3
Mechanical checks do not guarantee semantic truth
Our inference: The gate checks parsing, applicability, change, and size. It does not certify truth or compliance with every prompt instruction. Observed Mastermind tips name digits and positions despite prompt prohibitions. Appendices C.1, G.1
Make learning and retention disagree
Goal: produce informative handoff training credit without retaining any candidate. Explain why those decisions disagree.
Teaching playground · supplied outcomes, not a learned reward model
Try these
- Use “Below the seed”, seed 1. Which handoff groups still train?
- Use “Mixed success”, invalidate a3. Watch A's denominator and the actor count.
- Make all executions succeed. Why can a memory winner exist without a handoff comparison?
- Break all edits. Do you still get eight actor episodes?
| Output | Reward | Source / denominator |
|---|
Comparisons
Inspect complete group records
Invariant: only admissible candidates execute. Their scores train edits, average into reflections, and train actor episodes. Retention is a separate maximum-versus-seed decision. “All invalid” stands for parse failures, missing targets, no-ops, or oversized books—not a judgment of semantic usefulness. §3.1; Appendix D.3
Which filtering branch does this model use?
Mastermind/MBPP threshold rules: drop groups all at or below 0 or all at or above 1. Surviving constant multi-output groups have zero centered advantages. A surviving fractional singleton uses mean 0 and scale 1. MiniSWEBench instead requires a nonzero within-group range, which this toy does not simulate. Appendix D.3
What is simplified?
The seed and reflection choices are fixed instead of uniformly sampled. Flags stand in for JSON parsing, applicability, tokenization, and the 2,048-token cap. No text generation, environment, likelihood ratios, clipping, weight update, token-count role weighting, over-generation, store aging, or test-time sequence is simulated. Population standard deviation is for display; epsilon stays symbolic.
The objective, the reward rule, and the approximation
The update changes generated-token probabilities and clips large likelihood-ratio changes. The toy computes credit bookkeeping, not a transformer update. An intended expected-reward objective and its finite-sample surrogate are different objects. Appendices D.1, D.3
The intended local objective is the expected score of the fresh attempt after a sampled handoff. This explains why worked steps 3–4 use future episode outcomes. Eq. (5)
| Symbol | Meaning and worked value |
|---|---|
| Shared parameters and policy; not numerically simulated. | |
| Expected future reward and averaging; not estimated by these four leaves. | |
| Task, incumbent, visited pair distribution; one abstract task, empty book, fixed pair. | |
| Seed, reflection, edit; seed 1, A or B, a1–a3 or b1. | |
| Fresh episode and verifier; supplied scores . |
Estimate a candidate's handoff value with one fresh collection-policy episode. This is worked step 3, not proof of improvement. Eq. (6)
| Symbol | Meaning and worked value |
|---|---|
| Fresh scoring episode, collection policy, frozen collection weights; one episode per valid candidate, policy not simulated. | |
| Actor formatter, same task, candidate book; task plus Pa1, Pa2, Pa3, or Pb1. | |
| Sampled value and verifier; , supplied rather than modeled. |
Our inference: Expected improvement over the incumbent remains a question, as the dashed link in the tree indicates.
Edits get candidate scores; reflections average admissible descendants; actors get their own scores. Invalid edits get zero, and an empty admissible set gives reflection reward zero. Eq. (7); Appendix D.3
| Symbol | Meaning and worked value |
|---|---|
| Role rewards: ; ; . | |
| Sampled value and episode verifier; each episode's own supplied reward. | |
| Deterministic edit application to empty incumbent; four independent ADDs. | |
| Reflection and its admissible edits: A has {a1,a2,a3}, B has {b1}; counts . | |
| Admissible sum (A: , B: ) and any actor episode, seed or candidate execution. |
Scale each retained multi-output group's centered reward into an advantage broadcast to generated tokens. This formalizes worked step 5. §3.2; Appendix D.3
| Symbol | Meaning and worked value |
|---|---|
| Output, reward, advantage; for A: reward, positive advantage. | |
| Group, mean, standard deviation; {A,B}, mean , toy population deviation . | |
| Small stabilizer; symbolic, no assigned fixture value. |
Filter and singleton exception
Threshold groups all ≤0 or all ≥1 are dropped. Fractional singletons may survive with mean 0 and scale 1, giving outcome weighting. Surviving constant multi-output groups have zero centered credit. MiniSWEBench uses a nonzero-range rule instead. Appendix D.3
Keep a best candidate if its sampled score meets the selected seed's score; otherwise keep the incumbent. This is worked step 6, not the training filter. Eq. (8); Appendix D.2
| Symbol | Meaning and worked value |
|---|---|
| Next book, candidate, incumbent; winners , four candidate copies, empty incumbent. | |
| Sampled value, seed threshold, verifier; maximum , threshold . | |
| Selected seed and index; seed 1 (fixed here; uniformly sampled in collection). | |
| Highest-valued choice, existence of a qualifying candidate; tied winners each have probability . |
Precision check: the missing future-evidence term
Even idealized implemented credit omits the seed actor's future-evidence effect when its own reward replaces future reward. This assumes all outputs admissible, no filtering or normalization, and equal role means—not the actual token-weighted update. Eq. (15)
| Symbol | Meaning and worked value |
|---|---|
| Idealized local update and chain expectation; not computed by the toy. | |
| Seed and future reward; selected seed , branch values . | |
| Log-policy gradients for seed, reflector, curator, and next actor; not represented. | |
| Exact local future-only gradient and objective from Eq. (5); not the implemented normalized clipped gradient. |
Nonlinear empirical normalization, admissible-only averaging, filtering, clipping, and retained-token weighting further qualify raw sampling identities. One-handoff credit also omits consequences beyond the next attempt. Appendix D.1
The shared optimizer
One generated-token mean combines all retained roles: longer retained outputs give their role more weight. No explicit role balancing, critic, KL penalty, or entropy bonus is used. Candidate values and advantages are constants with respect to the updated parameters. Eq. (24)
Glossary
- Experience-handoff RL (EHRL)
- Training a model for its fixed harness's outcome, including inherited model-written experience. §2.2
- Recursive self-improvement (RSI)
- Here: rewriting inherited context under fixed weights and harness. §1
- Playbook
- Short task-local natural-language tips prepended to actor input; initially empty. §2.1
- Handoff value
- A fresh actor episode's verifier reward as an estimate of candidate usefulness. §3.1
- Admissible edit
- Parseable, applicable, changes memory, and leaves at most 2,048 tokens. Appendix D.3
- Comparison group
- Outputs sharing a normalization baseline; actor inputs need not match. §3.2; Appendix D.1
- RSI@K
- Best reward in the first K sequential harness visits. §4.2
- pass@K
- Expected best reward from K independent actor episodes without the harness. §4.2
- Training credit
- Reward and group information for updating output probabilities, separate from memory retention. Appendix D.2
Separate a better actor from better memory
Hold the ACE-RL actor fixed; discard only its edits. More attempts alone can raise best-so-far reward, and changing the actor confounds the cross-method comparison. The actual late Mastermind control slightly favors discarding edits.
At matched cumulative update compute, ACE-RL reports the highest held-out reward on all four benchmarks, including against GRPO deployed in the same harness. Error bars are SEM over tasks from one training run—not variation across training seeds. Table 2; §4.2
Different trained actors
Same actor, memory removed
Our inference: A best-so-far maximum cannot decrease when more attempts are added, even if no attempt learns from another. A rising curve alone is not evidence of adaptation.
| Benchmark | ACE-RL RSI@3 | GRPO pass@3 | GRPO RSI@3 |
|---|---|---|---|
| Mastermind | 0.775±0.014 | 0.686±0.010 | 0.739±0.012 |
| MBPP | 0.987±0.011 | 0.867±0.027 | 0.820±0.033 |
| AppWorld | 0.667±0.063 | 0.624±0.060 | 0.597±0.066 |
| MiniSWEBench | 0.340±0.048 | 0.245±0.040 | 0.260±0.044 |
Through K=8, ACE-RL stays above independent GRPO at every tested K. In benchmark order above, it ends at 0.81, 0.99, 0.81, and 0.40 versus 0.78, 0.91, 0.68, and 0.30. That is a persistent cross-method lead, not an isolated memory effect. §5.3; Figure 6
Same trained actor, memory removed
Same input: the same ACE-RL checkpoint and held-out tasks over K visits.
Every actor visit reads the empty playbook.
Later visits inherit task-local notes. The reported effects are marked above; MiniSWEBench improves at K=3, while Mastermind slightly reverses later.
Difference: whether the context survives, with the actor fixed. MBPP's two runs are near the ceiling. On Mastermind the benefit fades after K=3; from K=5 the discarded run is slightly ahead. §5.4; Figure 7
ACE-RL averages 1.14×, 1.01×, 1.17×, and 1.21× GRPO's update FLOPs per step in benchmark order. Matching cumulative update FLOPs can therefore mean different step counts. Generation is excluded; evaluation's K actor episodes also require K reflector and K curator calls. Appendices E, F.1
Models, splits, and reward types
Mastermind and MBPP use Qwen3-0.6B, non-thinking; AppWorld and MiniSWEBench use Qwen3-4B-Instruct-2507. Train / held-out sizes are 200 / 100, 374 / first 100 test problems, 90 / 57 dev tasks, and 100 SWE-Gym / first 100 SWE-bench Verified instances. Turns per episode: 20, except MBPP's 6. Table 6; Appendix E
Mastermind uses best-guess partial credit; MBPP uses best fraction of three tests passed. AppWorld is binary. MiniSWEBench has shaped training rewards 0 / 0.05 / 0.2 / 1, but held-out reward is binary issue resolution. These are mean rewards, not uniformly solve rates. Appendix E
Other Table 2 baselines
| Method · evaluation | Mastermind | MBPP | AppWorld | MiniSWEBench |
|---|---|---|---|---|
| Base · pass@3 | 0.431±0.014 | 0.396±0.041 | 0.252±0.052 | 0.146±0.029 |
| PPO · pass@3 | 0.000±0.000 | 0.715±0.036 | 0.106±0.035 | 0.000±0.000 |
| ERL · pass@3 | 0.615±0.010 | 0.509±0.043 | 0.418±0.059 | 0.234±0.038 |
| Base · RSI@3 | 0.527±0.015 | 0.387±0.045 | 0.246±0.058 | 0.180±0.039 |
| Delayed-joint PPO · RSI@3 | 0.659±0.011 | 0.500±0.047 | 0.000±0.000 | 0.010±0.010 |
Same benchmark order and task SEM; matched update compute. Table 2
Delayed-joint ACE-RL is not delayed-joint PPO
The Appendix B variant uses chain-wise group-relative credit, not a learned critic. Its matched-update RSI@3 values are 0.743±0.012 / 0.760±0.038 / 0.526±0.067 / 0.250±0.044. It uses sixteen actor episodes per task versus ACE-RL's eight; actor sampling, actor credit, and handoff prompts also differ. MiniSWEBench values are older-serving reference evaluations. This is not an isolated grouping ablation. Table 4; Appendices B.1, B.7
Our inference: These results do not show a pure grouping effect, equal end-to-end compute, training-seed robustness, or always-helpful memory. They support a combined trained-harness gain, with incremental text benefits in several reported settings.
A useful note is still only a sampled hypothesis
- The interface must permit branching. Handoff artifacts must be separately resampleable and evaluable. A fused action–summary–memory generation does not expose those groups. Appendix H
- Task-local evidence only. Cross-task transfer is unstudied. Evidence covers models up to 4B, four benchmarks, and one training run per method; frontier-scale sufficiency is open. AppWorld's edits-discarded control is beyond its compute budget. Appendix H
- Credit is approximate. Current seed reward omits its future-evidence effect; one-handoff credit omits later consequences. Filtering, admissible-only means, nonlinear normalization, clipping, and token weighting prevent a blanket exact-gradient claim. Appendix D.1
- One execution is noisy. For a fixed candidate, one episode preserves conditional mean value but weakly increases variance relative to averaging independent episodes. Eq. (20)
Our inference: Selecting a noisy maximum can retain a lucky note or reject a useful one; the sampled seed threshold is not a causal estimate of expected improvement.
- Grouping's variance benefit needs direct measurement. Appendix B changes sampling, actor credit, and prompts too. Additional runs and controlled variance measurements remain future work. Appendix B.7
- The verifier bounds what a high score means. MBPP displays scored assertions, and some learned solutions hardcode them. Appendices E, G.1
- Our inference: Prompt prohibitions are not semantic firewalls. Observed Mastermind tips name digits and positions despite prohibitions. Mechanical admissibility does not certify truth or prompt compliance. Appendices C.1, G.1
- Sandbox scope is not deployment safety. Task-local, verifier-bounded experiments do not resolve scoping, monitoring, and release for open-ended agents. Appendix H
MBPP grading history
A first delayed-joint PPO run exploited a zero subprocess exit code before an assertion failed. It was excluded; the grader now requires a random marker printed after the assertion. Most reported MBPP evaluations predate this fix, except delayed-joint ACE-RL and the delayed-joint PPO rerun. ACE-RL and PPO evaluation trajectories at steps 170, 250, and 300 contain no exit calls. Appendix E
Our inference: High scores with visible scored tests do not establish hidden-test generalization.
Questions still open
- When does same-input grouping lower measured credit variance if other choices stay fixed?
- Should extra budget buy more candidate notes or repeated evaluations of each?
- How should credit include seed evidence and consequences beyond the next handoff?
- Can useful experience transfer across tasks and remain valuable at frontier scale?
- What gains survive matched generation-plus-update cost and genuinely hidden tests?
Rebuild it without the diagram
Answer each in your head before opening it.
1 · Reconstruct the credit
A reflection has three sampled edits: one inadmissible, one admissible scoring 0, and one admissible scoring 1. What is its reward, the three curator rewards, and the candidate-episode count?
Compare your answer
Reflection reward: 1/2. Curator rewards: [0,0,1]. Candidate episodes: two. The invalid edit gets zero but is not executed or included in the reflection denominator. Eq. (7); Appendix D.3
2 · Transfer the interface
A database-debugging agent emits its next SQL action, failure summary, and memory update in one inseparable generation. What interface change exposes an ACE-RL-style group, and what feedback scores the memory?
Compare your answer
Expose a separately resampleable handoff artifact under a fixed trajectory or insight. Apply alternatives to separate memory copies, reset the database sandbox for fresh attempts, and score those attempts with a task verifier. If generation stays fused, the same-input handoff comparison is not directly available. This is a transfer example, not a reported database experiment. Appendix H
3 · Count the evaluation cost
An evaluator adds a fresh scoring episode after every test-time edit, then calls K=3 an equal-three-episode comparison with pass@3. What is wrong?
Compare your answer
Actual RSI@3 uses three actor episodes plus three reflector and three curator calls, fixed weights, and no extra scoring episode. Adding scoring episodes changes the protocol and exceeds the three-actor-episode budget. Even the actual protocol does not match all generation cost. Training scores alternative artifacts; evaluation applies sequential edits directly. §2.1; Appendix E