AI Trends

Amazon Science Explores Sample-Efficient Agent Post-Training Methods

Amazon ScienceUpdated Dec 1 05:48

AI summary

Amazon Science summarizes seven training methods proposed in seven papers, exploring how to extract more useful signals from existing rollouts to improve the sample efficiency of agent post-training. These methods leverage information such as step-level credit assignment, revision feedback, reward-aligned distillation, corrective targets close to model outputs, self-distillation, and guide models. Improvements in model accuracy must still be evaluated alongside costs such as environment interactions, generated tokens, teacher calls, update counts, and runtime.

Why read this

AI score 53

Seven methods demonstrate how to extract training signals from the steps, feedback, and revisions of existing rollouts, providing a methodological framework for improving sample utilization in agent post-training.

Topics

Tags

Body

Large language models are increasingly deployed as agents that pursue goals over many steps — say, fixing a bug by reading files, running tests, and editing code. Once they’ve been pretrained on large volumes of linguistic data, one way to refine them is reinforcement learning (RL) with verifiable rewards. The agent attempts a task, a program scores the result, and the model learns from that score. The scoring usually comes only at the end of the task. With the standard optimization algorithm, group-relative policy optimization (GRPO), every action the agent took shares in the reward: the search that found the bug and the edit that broke the build get the same credit. Distinguishing different actions’ contributions has historically meant generating more attempts, or rollouts, which is expensive. How much more can we learn from the rollouts we already have? Across seven recent papers, we propose seven new training methods that help answer this question. In this post, we apply all seven methods to a single running example and extract five lessons from the results. The example During post-training, an agent is asked to write a function, nth_prime(n), that returns the nth prime within a time limit. The standard way to generate the sequence of primes is some variation on the sieve of Eratosthenes, which steps through the integers, starting with two. It flags all the multiples of two, up to some maximum value, then moves on to the next unflagged number (three) and repeats the procedure. The numbers left unflagged by successive iterations of this procedure are themselves prime. Agents’ implementations of nth_prime(n) frequently call a helper function that generates all the primes up to n and stores them in an array. In our examples, we call that function primes, and the function primes[n] indexes into the array at location n. Indexing often causes errors, because the first prime is stored at primes[0], not primes[1], while nth_prime begins counting at one. Lesson 1 A good attempt contains bad steps, and a failed attempt contains good steps Across attempts, the agent reads the same specification before writing different versions of nth_prime. Some versions pass; others fail. With GRPO, even reading the specification is rewarded in one attempt and penalized in another. One of our methods, SALT, fixes this by building a graph that merges all steps with equivalent starting states, actions, and resulting states. Each merged step gets the average advantage of the attempts that took it. Across rollouts, the shared actions’ positive and negative signals cancel, while the differing edits retain their own credit. One version of nth_prime finds the right primes but times out on a large input. The agent receives the timeout error as textual feedback and uses it to write a faster version of the function, which passes. Scoring each of these attempts separately gives the first program no credit for finding the right primes. Another of our methods, MURPHY, uses revision scores to assign credit to earlier attempts, so we can learn from failed programs that lead to successful corrections. Lesson 2 A teacher helps only when its advice points toward reward One existing method for extracting additional training information from a rollout that receives a single score is on-policy distillation. With on-policy distillation, the model being trained (the student) attempts to perform a task, and a stronger teacher model scores every token (word or word part) it generates, providing dense feedback instead of a single verdict. In our example, suppose a teacher guides the agent’s next attempt. Its token-level signals encourage the correct index, n - 1, but also push the agent to replace an efficient sieve with a slower method. Agreement with the teacher does not guarantee better code. Our third method, reward-aligned distillation (RAD), looks at the gradients — the direction of adjustment to the model parameters — resulting from each output token and uses them to estimate how each token’s distillation signal affects reward. This strengthens useful guidance and suppresses or reverses harmful signals. Lesson 3 When every attempt fails, learn from a target close to your own Now suppose that every one of the agent’s versions of the function generates the primes correctly but returns primes[n] instead of primes[n-1]. As a consequence, all attempts fail. But the reference solution is so unlike the model’s almost-correct solutions that training on it erodes skills the model already has. Our projected-distillation method asks a secondary model for small edit that yields a verified correction — here, changing the index to n-1. The training target is just the edited spans, which are continually revised as the student improves. Lesson 4 Hindsight lets the agent teach itself, if it’s used carefully A common variation on on-policy distillation is on-policy self-distillation. Here, the teacher is not a stronger model but the same model as the student, primed with additional contextual information — such as, for instance, the hint that “the first prime is at index zero”. This approach can run into problems during post-training, however. The information the teacher bases its scores on is nowhere present in the data the student sees. If the student looks for patterns in the input data that explain the teacher’s scores, it may end up drawing spurious correlations or learning heuristics that don’t generalize. Privileged-information internalization (PINT) addresses this by taking the privileged information out of the teacher’s context and putting it in the teacher’s weights. First, we generate a sequence of rollouts, both with the privileged information and without it. Then we select a subset of successful rollouts, generated both ways, and use it to post-train a “temporary teacher”. Now, when the temporary teacher scores the student’s outputs, it’s basing its scores only on the same data the student sees, so its outputs are better aligned with the student’s. If an agent-generated function fails its test and receives the error message “expected 2, got 3”, it not only indicates an indexing error but tells us where to look for it: the action that wrote return primes[n]. Like the rewards accorded to whole rollouts, the hints provided during on-policy self-distillation are much more useful when they’re assigned to specific steps of the task execution. With adaptive hindsight with environment-augmented distillation (AHEAD), we execute a rollout with the student model and use the results to reweight the per-step advantages calculated by the teacher. Lesson 5 If you can’t retrain the model that acts, train the one that advises it Finally, suppose the coding agent is a model whose weights we cannot change. We can still train a small guide to suggest a strategy, such as “Generate primes efficiently, select index n-1, and check the boundary case.” ExecTune first fine-tunes the guide on strategies written by a stronger teacher model, keeping only those the agent executes successfully. Then it applies reinforcement learning with rewards computed from the agent’s own execution. Putting it together For the agent writing nth_prime, a shared action, a timeout message, a teacher’s token scores, a one-line correction, a later test result, and a guide’s strategy each offer something the final verdict alone cannot. Our work demonstrates different ways to turn that information into training signals tied to task success. The relevant budget — environment interactions, generated tokens, teacher calls, updates, or wall-clock time — depends on the method. Comparing existing rollouts and generating new revisions have different costs. The increase in the model’s accuracy must ultimately be assessed alongside the cost of implementing the additional training methods. Looking ahead Long coding tasks make the question of using rollouts efficiently especially pressing. An action may pay off dozens of tool calls later. We’re now studying how agents can learn from execution traces, assign credit across those long chains, and decide when a guide’s advice is worth its cost. The final verdict may be sparse. The experience that produced it isn’t. Papers SALT: Step-level Advantage Assignment for Long-horizon Agents via Trajectory Graph Authors: Jiazheng Li, Yawei Wang, David Yan, Yijun Tian, Zhichao Xu, Huan Song, Panpan Xu, Lin Lee Cheong Findings of EACL 2026 MURPHY: Feedback-Aware GRPO with Retrospective Credit Assignment for Multi-Turn Code Generation Authors: Chanakya Ekbote*, Vijay Lingam*, Sujay Sanghavi, Behrooz Omidvar-Tehrani, Jun Huan, Anoop Deoras, Stefano Soatto (*equal contribution) NeurIPS 2026 Reward-Aligned Distillation Authors: Yilan Chen, Zian Su, Manish Prajapat, Dingmin Wang, Rui Song, Rein Houthooft, Vijay Lingam NeurIPS 2026 Workshop on Transitioning from Pre-Training to Post-Training Projected Distillation: On Learning to Solve Hard Problems from Close, Correct Targets Authors: Shripad V. Deshmukh, Christian Bock, Kangrui Ruan, Abhijeet Awasthi, Vijay Lingam, Rein Houthooft, Manish Prajapat NeurIPS 2026 Workshop on Foundations of LLM Post-Training in Changing Environments PINT: Effective On-Policy Self-Distillation via Privileged Information Internalization Authors: Zian Su, Yilan Chen, Manish Prajapat, Rui Song, Rein Houthooft, Vijay Lingam NeurIPS 2026 workshop AHEAD: Adaptive Hindsight with Environment-Augmented Distillation for Agentic RL Authors: Xiaolong Jin, Dingmin Wang, Vijay Lingam, Varun Kumar NeurIPS 2026 Workshop on Transitioning from Pre-Training to Post-Training ExecTune: Effective Steering of Black-Box LLMs with Guide Models Authors: Vijay Lingam, Aditya Golatkar, Anwesan Pal, Ben Vo, Narayanan Sadagopan, Alessandro Achille, Jun Huan, Anoop Deoras, Stefano Soatto ICLR 2026 Workshop on Lifelong Agents Acknowledgments: We worked with Panpan Xu, Luke Huan, Stefano Soatto, Anoop Deoras, Varun Kumar and the coauthors listed above, including interns from MIT, Purdue University, UC San Diego, the University of Connecticut and the University of Massachusetts.

Source

Amazon Science