Manuscript Offprint
arXiv:2610.11128Balancing Reference Guidance and Free Generation in Trajectory Rollouts for Reasoning RL
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
ABSTRACT
A verified reference solution provides a correct trajectory for training a reasoning model. Alternatively, a prefix of the reference can guide the model in generating a trajectory of its own. How much reference guidance should we provide? We study this question through prefix continuation, where the model continues from a reference prefix and keeps the resulting trajectory if it passes verification, falling back to the reference otherwise. Since both procedures produce correct trajectories, we compare their distributions with the ideal distribution, the model's own distribution conditioned on successful verification. For one continuation, we derive the KL divergence in closed form, which, up to a bounded term, decreases with the product of the probability of generating a different correct trajectory and the reference surprisal, the negative log probability of the reference suffix given the prefix. Since a longer prefix tends to raise the former but lowers the latter, continuation success alone does not determine the preferred amount of guidance. From this analysis, we learn a prefix selector shared across training questions from continuation outcomes, without estimating success probabilities or additional generation. The resulting Adaptive Reference Guidance (ARG) constructs correct trajectories within a fixed generation budget, and we apply it to all-failure groups in Group Relative Policy Optimization (GRPO). Experiments on Qwen3-4B and Qwen3-8B across five mathematical reasoning benchmarks show that ARG achieves the highest aggregate pass@12 among the evaluated methods with competitive average sampled accuracy.
1 INTRODUCTION
Reinforcement learning with verifiable rewards (RLVR) (Lambert et al., 2024) trains Large Language Models (LLMs) using feedback on their own generated responses (Guo et al., 2025, Team et al., 2025, Jaech et al., 2024). On difficult questions, however, the model may rarely generate a response that reaches the correct answer, leaving little feedback to learn from. When such a question comes with a reference solution written by humans or a stronger model, a straightforward approach is to train on it directly (Yan et al., 2026, Fu et al., 2026, Ma et al., 2026). However, the reference may differ substantially from the trajectories the model would produce itself, which can make it a poor learning target (Setlur et al., 2026, Qu et al., 2026). Since the model learns more easily from familiar responses (Ren et al., 2024), another line of work uses the reference as guidance so that the model generates correct trajectories by itself. Some methods transform the reference into hints (Zhang et al., 2026c, Liao et al., 2026), which requires additional LLM generation and may introduce bias or errors. Other methods, in contrast, let the model generate a continuation from a reference prefix, which is an initial segment of the reference. This approach uses the reference without modification and controls how much guidance the model receives through how much of the reference is revealed in the prefix.
Work done during an internship at Honda Research Institute USA.
However, when generating a trajectory following a prefix, deciding how much to reveal involves a trade-off. Specifically, using a longer reference prefix, which provides more guidance, makes the continuation more likely to be correct. Yet the resulting trajectory contains more content the model would not generate itself, making learning harder. Using a shorter prefix keeps the trajectory closer to the model's own generation, but increases the chance of failure. At the two extremes, revealing the entire reference reduces to training on the reference directly, while revealing nothing reduces to standard RLVR, which provides no learning signal on questions the model cannot yet solve. Balancing the two is therefore essential. The prefix should reveal just enough for the model to succeed, and leave the rest for the model to generate on its own.
To analyze this trade-off, we first ask which trajectories are ideal to learn from. Ideally, these trajectories should be correct and generated entirely by the model. We therefore define the distribution of the model's own correct samples as the ideal distribution. We show that the Kullback-Leibler (KL) divergence from the distribution of generated trajectories used for training to this ideal distribution decreases as increases, up to a small bounded term. Here is the probability that the model follows the reference's prefix to generate a successful trajectory, and is the negative log probability of the remaining reference given the prefix. Intuitively, reflects how much the prefix helps the model succeed, while indicates how unfamiliar the reference suffix is. Moreover, captures both sides of the trade-off. A longer prefix tends to increase , since more guidance makes success more likely, but it decreases , since less of the reference is left.
As a result, a good prefix should maximize . However, is unknown, and estimating it for every prefix of every question is impractical. We avoid this estimation by learning a prefix selector, a distribution over a few guidance levels shared across questions. Since the selector only needs to work well on average, the outcome of each continuation already provides the feedback it needs, without any additional generation.
These analyses lead to Adaptive Reference Guidance (ARG). Given a question and its reference, ARG samples guidance levels from the prefix selector, generates continuations from the resulting prefixes within a fixed budget, and falls back to the reference when no continuation succeeds. The same continuations also update the prefix selector, which therefore requires no additional generation. To examine how the accepted trajectories affect policy learning, we apply ARG to Group Relative Policy Optimization (GRPO) (Shao et al., 2024) for groups in which every sampled response fails, resulting in no learning signals.
Empirically, on Qwen3-4B and Qwen3-8B (Yang et al., 2025) across five mathematical reasoning benchmarks, ARG achieves the highest aggregate pass@12 of 67.33% and 70.00%, respectively. Moreover, its average sampled accuracy remains competitive, with a small gap to the strongest baseline. Our contributions are threefold.
• We analyze reference-prefix continuation through the KL divergence to the model’s own correct trajectories, revealing a trade-off between reference guidance and surprisal.
• We derive an unbiased update of the prefix selector from the same continuations, adapting the guidance level across questions and during training without additional generation.
• We develop ARG from this analysis and apply it to all-failure groups in GRPO, achieving the highest aggregate pass@12 across five math benchmarks on two model scales.
Reference-prefix continuation with fallback. Suppose that the question comes with a correct reference . For a prefix length , we write , where the reference prefix contains the first tokens of , the reference suffix contains the remaining tokens, and denotes token concatenation. The model samples a continuation , which forms the candidate trajectory . At , the prefix is empty and the model generates under the original question alone. We keep the candidate trajectory if it is correct and fall back to the reference otherwise, which gives the accepted trajectory
Thus, assigns all probability to correct trajectories for every prefix length. In contrast, training on the reference corresponds to the distribution , which assigns all probability to r.
Ideal distribution. As discussed in Section 1, we take the model's own correct trajectories as the ideal distribution. Formally, for , sampling from and keeping only correct trajectories gives
This distribution also has a direct connection to likelihood learning (Phan et al., 2023, Singh et al., 2023). Specifically, for a finite trajectory space and a differentiable policy with positive probabilities,
In other words, learning the likelihood of trajectories drawn from increases the success probability in expectation at the current model. Finally, we measure how far a distribution Q of correct trajectories is from the ideal distribution by the Kullback-Leibler (KL) divergence
Appendix A.2 derives Equation (3) and explains this direction of KL.
3 ANALYZING AND SELECTING REFERENCE PREFIXES
In this section, we analyze how the prefix length affects the accepted trajectory and turn the analysis into a practical way of choosing prefixes. Section 3.1 derives the distance from the accepted trajectory to the ideal distribution, which identifies the preferred prefix of a question. Section 3.2 explains why this prefix is difficult to find during training, and Section 3.3 addresses both challenges by learning a prefix selector that performs well on average across questions.
3.1 DISTANCE TO THE IDEAL DISTRIBUTION
Fix a question with reference and the current model , and suppress the conditioning on and the parameters by writing , , , and . We assume a finite trajectory space with . For a prefix length , we define the successful replacement probability and the reference surprisal as
Here excludes an exact copy of the reference, since the accepted trajectory is then still r. In other words, is the probability that the model replaces the reference suffix with a different correct continuation, and measures how unfamiliar the reference suffix is to the model after the prefix.
Theorem 1 (Distance to the ideal distribution). Under the setup above, for every prefix length t,
Moreover, every satisfies .
Theorem 1 expresses the distance between and the ideal distribution in closed form with three terms. The first term equals that of training on the reference, which does not depend on the prefix. The third term is bounded within . Therefore, the prefix affects the distance mainly through the second term, . Intuitively, this product formalizes the trade-off in choosing the prefix length. A longer prefix never increases , since it leaves less of the reference for the continuation to replace. In contrast, a longer prefix can increase by making the continuation easier to succeed. Consequently, both a nearly complete prefix and an empty prefix on a hard question make close to zero and leave the distance close to , indicating learning from the reference alone. Moreover, a prefix with a higher success probability of the continuation need not give a smaller distance, as illustrated in Appendix A.5. Instead, maximizing attains the smallest distance up to 1/e by the second statement in the theorem, and we call the preferred prefix of the question under the current model. Appendix A gives the proof.
3.2 CHALLENGES IN FINDING THE PREFERRED PREFIX
Although Theorem 1 identifies the preferred prefix, finding it during training is difficult. The reference surprisal is available for every prefix length from a single forward pass of the model on the reference. However, the successful replacement probability is unknown, which leads to the following two challenges.
Challenge 1: Variation across questions and training steps. Theorem 1 concerns a fixed question and a fixed model, and depends on both. Therefore, the estimates of for one question do not apply to another question. Furthermore, since changes as the model is updated, the estimates obtained at one training step may become outdated at the next. As a result, the search for would have to be repeated for every question and every model update.
Challenge 2: Limited sampling budget. Moreover, each such search is expensive. Identifying compares across prefix lengths and therefore requires an accurate estimate of at every prefix length. Since is often small on hard questions, such an estimate requires many continuations even for a single prefix length, and this cost multiplies across prefix lengths.
3.3 LEARNING A PREFIX SELECTOR ACROSS QUESTIONS
Both challenges arise from seeking the preferred prefix of each question at each training step. Instead, we learn a way of choosing prefixes that performs well on average over the questions that receive guidance, which addresses both challenges.
Sharing across questions and training steps. Averaging over questions requires describing prefixes in the same way for every question, which the prefix length does not achieve for references of different lengths. Since Theorem 1 measures the replaced suffix by its surprisal rather than its length, we describe a prefix through the reference surprisal. Specifically, for a question with reference , let be the surprisal of the entire reference. A guidance level in a set selects a prefix length whose reference surprisal is approximately . Thus, is the fraction of the reference surprisal left to the continuation, where gives the empty prefix. As with prefix lengths, the levels cannot all be tried within the sampling budget. Therefore, contains only a few levels, and Section 4.1 specifies the mapping from levels to prefix lengths.
We then learn a prefix selector , which is a distribution over with parameters shared across questions. Let denote the distribution of questions that receive guidance at the current training step, which Section 4.3 specifies for our application. For and , we write , , and for , , and at the prefix length , and for the ideal distribution of . The selector maximizes
which averages over the questions and the sampled levels in units of the surprisal of the entire reference. This normalization keeps questions with long or unfamiliar references from dominating the average, and it does not change which prefix maximizes within any question. Since the selector is shared across questions and updated at every training step, continuations on all questions and at all steps inform the same choice, while the selected prefix still adapts to each question through its reference surprisal. This addresses Challenge 1, and Appendix B.3 bounds the sharing cost.
Learning without estimating . The average objective also avoids the accurate estimates of required in Challenge 2. For a continuation from the prefix , we define the selector feedback
and write for the feedback at the prefix length . In other words, a successful replacement receives the fraction of the reference surprisal left to the continuation, while a failure or an exact copy of the reference receives zero. Since the indicator has expectation , the feedback satisfies
Thus, the feedback of a single continuation is an unbiased estimate of its term in J. A single estimate is noisy, and noisy estimates cannot reliably rank the prefix lengths of one question. However, since J is an average that is linear in , the errors of single continuations cancel when pooled over many questions. Moreover, since A contains only a few levels and the selector keeps a positive probability on every level, every level receives feedback from many questions, which addresses Challenge 2. The following theorem shows that J still measures the distance in Theorem 1 and that the selector can be learned from this feedback.
Theorem 2 (Learning the prefix selector from feedback). Fix the current model, the references, and , where every question satisfies the setup of Section 3.1. Let and be the expectations of and over and . Then
Moreover, for a differentiable prefix selector with positive probabilities and a baseline b fixed before sampling,
The first statement shows that, compared with training on the reference, the selector reduces the average normalized distance by at least J, where each distance is divided by the surprisal of the entire reference. The gap is at most , which is small when no reference is highly likely under the model. Therefore, maximizing J pursues the goal of Theorem 1 across questions. The second statement shows that raising the probability of the levels whose feedback exceeds the baseline b moves the selector toward a larger J on average, where b introduces no bias and serves to reduce the variance. Since these continuations also produce the accepted trajectories, the update requires no additional generation. Appendix B proves Theorem 2 and extends it to batches, changing models, and randomly sampled levels.
4 ARG: ADAPTIVE REFERENCE GUIDANCE
We now build ARG on Theorems 1 and 2. Section 4.1 describes how ARG generates accepted trajectories for a question, and Section 4.2 describes how the same continuations update the prefix selector. Neither step depends on a particular reinforcement learning algorithm. The algorithm only determines the questions that receive guidance and how the model learns from the accepted trajectories, and Section 4.3 specifies both for GRPO.
4.1 GENERATING ACCEPTED TRAJECTORIES
Consider a question that receives guidance, with reference . ARG first scores once under the current model , which gives the reference surprisal for every prefix length. Each guidance level then maps to a prefix length . Specifically, gives the empty prefix. For , we take the latest prefix length whose reference surprisal is at least and move it to a nearby sentence or formula boundary, so that the prefix ends at a natural break. Appendix E.2 gives the boundary rules.
The prefix selector assigns a logit to each level and samples from
(11) where keeps every level observed as the model changes. Within a fixed budget of continuations per question, we independently sample for . For the resulting prefix length , we sample a continuation and verify the candidate trajectory .
Every correct candidate trajectory different from can serve as an accepted trajectory. If there is none, ARG falls back to the reference. Therefore, the question always receives a correct trajectory. When the number of accepted trajectories is limited, as in our application, we prefer candidate trajectories that keep less of the reference. Specifically, a correct candidate trajectory from the empty prefix keeps none of the reference. Indeed, it is generated entirely by the model and follows the ideal distribution restricted to trajectories other than . Therefore, we accept these candidate trajectories first. Among candidate trajectories from nonempty prefixes, we prefer the shortest prefix, since the surprisal of the prefix, , never decreases with . Finally, Theorem 1 concerns a single continuation. For accepted trajectories from several continuations, Appendix C.2 gives a sufficient condition under which the distance remains no larger than that of training on the reference.
4.2 UPDATING THE PREFIX SELECTOR
Every continuation provides the selector feedback in Equation (7), whether or not its candidate trajectory is accepted. Since the feedback does not depend on which trajectories are accepted, the second statement of Theorem 2 holds under any acceptance rule, while the first statement, like Theorem 1, concerns a single continuation.
We collect continuations for all questions in a batch while keeping the current model and the prefix selector fixed. Let index these continuations, with sampled levels and selector feedback . For a nonempty , we update the prefix selector by
where is the step size and b is a running average of past feedback fixed before collection. By the second statement of Theorem 2, the update follows the gradient of J in expectation. Appendix B gives the baseline update and derives the expected update as the model and the questions change during training.
4.3 APPLYING ARG TO GRPO
GRPO (Shao et al., 2024) samples a group of G = 8 responses for each question and compares their rewards within the group. When every response in a group is incorrect, the group provides no signal for improving correctness, since all correctness rewards are identical. In such an all-failure group, adding a correct trajectory restores the learning signal. Therefore, we apply ARG to all-failure groups, using K = 8 continuations. These questions define .
We insert at most four accepted trajectories into each group, which keeps at least four original failures and permits a balanced group, motivated by prior work on intermediate pass rates (Bae et al., 2026, Liu et al., 2026b). Following the preference in Section 4.1, we first accept correct candidate trajectories from the empty prefix. If fewer than four are accepted, we additionally accept at most one from a nonempty prefix, which limits repeated reference content in the same group. If no candidate trajectory is accepted, we insert the reference once as fallback. Each inserted trajectory replaces an original failure at a uniformly chosen position. We then recompute the group advantages from the final correctness and format rewards, as specified in Appendix E.3.
The model learns each inserted trajectory under the original question through its complete likelihood, including the prefix. This matches Theorem 1, which measures the complete accepted trajectory under the original question. Let I index the inserted trajectories and let T be the total number of tokens in the loss. Their contribution to the gradient is
(13) where the trajectories, advantages, and token count are fixed during differentiation. The remaining original responses use the clipped GRPO loss with the same denominator. Moreover, for binary rewards, Appendix D shows that inserting into an all-failure group gives an expected update proportional to the gradient of at the current model. The gradient of the second term vanishes when is the ideal distribution, in which case the update only increases the odds of success. This connects the distance in Theorem 1 to the GRPO update.
After collecting continuations, we update the prefix selector by Equation (12) and take one policy update on the final groups. Algorithm 1 summarizes the training procedure.
5 EXPERIMENTS
5.1 EXPERIMENTAL SETTING
Data and models. We use DeepMath-103k with offline reference solutions (He et al., 2026) as our training set. We use Qwen3-4B and Qwen3-8B with thinking mode disabled (Yang et al., 2025) as our base LLMs. For all methods, we evaluate on five mathematical reasoning benchmarks, AIME 2024, AIME 2025, AIME 2026, HMMT February 2025, and HMMT November 2025 (Balunovic et al., 2026, Dekoninck et al., 2026). Appendix E gives further details.
Baselines and evaluation. We compare against the initial Qwen model, vanilla supervised fine-tuning (SFT), GRPO (Shao et al., 2024), OPSD (Zhao et al., 2026), SAGE (Liao et al., 2026), BREAD (Zhang et al., 2026d), and LUFFY (Yan et al., 2026). During evaluation, we draw 12 responses per question. pass@12 measures whether a question has at least one correct response, while avg@12 measures the fraction of correct responses. We use pass@12 as the primary metric.
| Model | Method | AIME24 | AIME25 | AIME26 | HMMT_Feb | HMMT_Nov | Avg. |
|---|---|---|---|---|---|---|---|
| Qwen3-4B | Base | 50.00 | 43.33 | 43.33 | 23.33 | 33.33 | 38.67 |
| SFT | 63.33 | 63.33 | 66.67 | 36.67 | 36.67 | 53.33 | |
| GRPO | 76.67 | 70.00 | 73.33 | 53.33 | 46.67 | 64.00 | |
| OPSD | 56.67 | 36.67 | 40.00 | 40.00 | 40.00 | 42.67 | |
| SAGE | 73.33 | 70.00 | 70.00 | 43.33 | 56.67 | 62.67 | |
| BREAD | 80.00 | 73.33 | 73.33 | 50.00 | 56.67 | 66.67 | |
| LUFFY | 80.00 | 73.33 | 70.00 | 43.33 | 56.67 | 64.67 | |
| ARG (ours) | 80.00 | 73.33 | 73.33 | 43.33 | 66.67 | 67.33 | |
| Qwen3-8B | Base | 46.67 | 43.33 | 53.33 | 16.67 | 46.67 | 41.33 |
| SFT | 80.00 | 70.00 | 73.33 | 46.67 | 56.67 | 65.33 | |
| GRPO | 80.00 | 63.33 | 70.00 | 46.67 | 53.33 | 62.67 | |
| OPSD | 66.67 | 60.00 | 50.00 | 36.67 | 43.33 | 51.33 | |
| SAGE | 80.00 | 70.00 | 70.00 | 50.00 | 60.00 | 66.00 | |
| BREAD | 80.00 | 66.67 | 66.67 | 53.33 | 70.00 | 67.33 | |
| LUFFY | 76.67 | 76.67 | 73.33 | 46.67 | 63.33 | 67.33 | |
| ARG (ours) | 83.33 | 73.33 | 73.33 | 56.67 | 63.33 | 70.00 |
Table 1. Main experimental results in pass@12 percentages. Avg. is the mean over the five benchmarks. Within each model, bold and underline mark the best and second-best values in each column.
5.2 RESULTS
Table 1 evaluates ARG through its application to GRPO. ARG achieves the highest aggregate pass@12 at both model scales, reaching on Qwen3-4B and on Qwen3-8B. Compared with GRPO, these results improve pass@12 by 3.33 and 7.33 percentage points, respectively. ARG also exceeds the reference-informed baselines in aggregate pass@12, which use reference solutions as off-policy responses in LUFFY, as prefixes in BREAD, and as hints in SAGE (Yan et al., 2026, Zhang et al., 2026d, Liao et al., 2026). Thus, ARG solves the largest fraction of evaluation questions under the 12-response budget. For avg@12, ARG improves over GRPO on both models and remains competitive with the strongest baseline, as discussed in Appendix F. Sections 5.3 and 5.4 examine the contributions of the continuations and the prefix selector.
| Method | pass@12 | avg@12 |
|---|---|---|
| Reference insertion | 56.67 | 28.44 |
| Resampling | 60.00 | 34.00 |
| ARG | 67.33 | 41.11 |
(a) Sources of accepted trajectories on Qwen3-4B
| Method | Qwen3-4B | Qwen3-8B | ||
|---|---|---|---|---|
| pass@12 | avg@12 | pass@12 | avg@12 | |
| w/o weighting | 63.33 | 34.67 | 64.00 | 31.89 |
| ARG | 67.33 | 41.11 | 70.00 | 42.28 |
(b) Surprisal weighting on both models
Table 2. Ablation results averaged over the five benchmarks. Resampling uses eight continuations from the empty prefix without reference fallback. The weighting ablation removes from the selector feedback.
5.3 ABLATIONS
We examine the contribution of the continuations, compare with unguided resampling, and evaluate the surprisal weighting in the selector feedback.
Reference insertion. For each all-failure group, we replace a random failure in the original group with the reference without any extra generation. This ablation corresponds to training on the reference in Theorem 1. Table 2(a) shows that reference insertion achieves in pass@12 and in avg@12 on Qwen3-4B, compared with and for ARG. These results support using the reference to guide continuations and reserving the reference itself for fallback.
Resampling. We allocate the same eight continuations to the empty prefix for each all-failure group. Correct candidate trajectories replace original failures, and groups with no correct candidate trajectory remain unchanged. Thus, this comparison evaluates ARG against additional sampling without reference guidance or fallback. Table 2(a) shows that ARG improves pass@12 from to and avg@12 from to on Qwen3-4B. During their respective training runs, candidate trajectories are accepted in of all-failure groups with ARG and only with resampling. More details are shown in Appendix G.2.
Without surprisal weighting. We replace the selector feedback in Equation (7) with the successful replacement indicator. The guidance levels, surprisal-based prefix construction, selector update rule, and acceptance rule remain unchanged. Table 2(b) shows that removing the weighting lowers both evaluation metrics on both models, with pass@12 decreasing by 4.00 and 6.00 percentage points on Qwen3-4B and Qwen3-8B, respectively. These results support the surprisal weighting in the selector feedback. Section 5.4 examines the selector feedback and prefix selection under ARG, while Appendix G.3 compares the prefix selection with that of the ablation.
5.4 TRAINING DYNAMICS
Figure 1 examines Qwen3-8B training dynamics through successful replacement rates, selector feedback, and prefix selection.
Successful replacement and selector feedback. Figure 1(a) reports the successful replacement rate for each guidance level. Each point averages all continuations at that level within a window of 50 training steps. The level has a higher successful replacement rate than in every window. However, Figure 1(b) shows that their ordering can change when the successful replacement indicator is weighted by the fraction of the reference surprisal left to the continuation. In the final window, for example, has lower mean feedback than (0.0802 versus 0.0991), although its successful replacement rate is higher (43.84% versus 23.65%). Thus, the feedback favors less reference guidance in this window, consistent with Section 3.1, where a higher success probability of the continuation need not give a smaller distance.
Prefix selection during training. The selector uses the feedback from each continuation to update its selection probabilities. Figure 1(c) shows how these probabilities change during training. The selector favors through much of training and increases its probability of selecting later, assigning it the highest final probability of . Since a larger leaves more of the reference surprisal to the continuation, this shift supplies less reference guidance. Appendix H provides additional training-dynamics results.

(a) Successful replacement

(b) Selector feedback

(c) Prefix selection
Figure 1. Training dynamics of a Qwen3-8B ARG run. Panel (a) reports successful replacement rates, panel (b) reports mean selector feedback , and panel (c) shows the selection probabilities. In panels (a) and (b), a point at step s summarizes all continuations at that level across the past 50 steps, including failures and candidate trajectories not accepted for training. Panel (c) shows the state after each training step without smoothing.
6 RELATED WORK
Learning signals beyond on-policy rollouts. LUFFY, SRFT, ReLIFT, and related methods combine reference or teacher trajectories with the model's own rollouts, through mixed-policy groups or combined supervised and reinforcement updates (Yan et al., 2026, Fu et al., 2026, Ma et al., 2026, Zhang et al., 2026b, Liu et al., 2025a, Dong et al., 2026, Lv et al., 2025). OPSD and SDPO instead use the model conditioned on solution information or feedback as a teacher for token-level supervision (Zhao et al., 2026, Hübotter et al., 2026). Other methods recover learning signals from failed rollouts, either by repairing them into correct ones (Li et al., 2026b, Yang et al., 2026, Zhang et al., 2025, Ren et al., 2026) or by reshaping the rewards or advantages of groups with identical rewards (Chen et al., 2025, Nie et al., 2026, Nan et al., 2025, Le et al., 2026).
Reference-guided generation. Closer to our work, many methods use the reference only to guide the model's own generation, either by revealing a prefix of the reference for the model to continue (Liu et al., 2026a, Setlur et al., 2026, Qu et al., 2026, Zhang et al., 2026a, Su et al., 2026, Liu et al., 2025b) or by providing hints derived from the reference or its answer (Liao et al., 2026, Zhang et al., 2026c, Nath et al., 2025, Chen et al., 2026, Zhou et al., 2026a). The amount of guidance is fixed or scheduled (Xi et al., 2024, Huang et al., 2025, Li et al., 2026a), adapted to the observed success of the model (Zhang et al., 2026d, amani et al., 2026, Li et al., 2025b, Guo et al., 2026, Beliaev, 2026), or chosen by the gain of a prefix or the transfer of a hint (Zhou et al., 2026c, Xia et al., 2026). In contrast, we derive the amount of guidance from the distance between the accepted trajectory and the ideal distribution, which shows that success alone does not determine the preferred prefix, and we learn a prefix selector shared across questions from the continuations themselves.
Posterior views of learning from correct trajectories. Training on the model's own correct samples, as in STaR and ReST , approximates learning from our ideal distribution (Zelikman et al., 2022, Singh et al., 2023), which is also the correct distribution closest to the model in KL and relates to the Bayesian view of KL-regularized RL (Dymetman, 2026, Korbak et al., 2022). Latent-variable methods approximate the posterior over rationales given the correct answer (Phan et al., 2023, Zhou et al., 2026b), and TRICE keeps a stored rationale until a new proposal is correct, similar to our fallback. Other work analyzes or modifies the function of the success probability that RL maximizes (Davis & Recht, 2025, Tajwar et al., 2026, Ramasubramanian et al., 2026), or shows that targets unlikely under the model are harder to learn from (Ren et al., 2024, Li et al., 2025a, Setlur et al., 2024).
7 CONCLUSION AND LIMITATIONS
We study reference-prefix continuation with fallback through the distance from the accepted trajectory to the ideal distribution. Up to a small bounded term, this distance decreases with , which captures the trade-off between successful replacement and the reference surprisal. This analysis leads to ARG, which learns a prefix selector across questions from the continuations themselves.
Applied to all-failure groups in GRPO, ARG achieves the highest aggregate pass@12 on Qwen3-4B and Qwen3-8B across five mathematical benchmarks, with competitive average sampled accuracy.
Limitations. ARG is only applied to GRPO, although the method does not depend on a particular reinforcement learning algorithm. Moreover, the selector chooses among a predefined set of guidance levels, and our experiments cover mathematical reasoning with one model family. Future work may extend the method to other domains with verifiable rewards.
REFERENCES
mohammad hossein amani, Aryo Lotfi, Nicolas Baldwin, Samy Bengio, Mehrdad Farajtabar, Emmanuel Abbe, and Robert West. Rl for reasoning by adaptively revealing rationales. In C. Vondrick, B. Hariharan, C. Raffel, L. Pinto, D. Yang, and A. Faust (eds.), International Conference on Learning Representations, volume 2026, pp. 118599–118620, 2026. URL https://proceedings.iclr.cc/paper_files/paper/2026/file/c073a9d002f3dab99a7af18642d74bdb-Paper-Conference.pdf.
Sanghwan Bae, Jiwoo Hong, Min Young Lee, Hanbyul Kim, Jeong Yeon Nam, and Donghyun Kwak. Online difficulty filtering for reasoning oriented reinforcement learning. In Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 700–719, 2026.
Mislav Balunovic, Jasper Dekoninck, Ivo Petrov, Nikola Jovanović, and Martin Vechev. Matharena: Evaluating llms on uncontaminated math competitions. Advances in Neural Information Processing Systems, 38, 2026.
Vladislav Beliaev. Max out grpo signal: Adaptive trace prefix control for hard reasoning problems. arXiv preprint arXiv:2607.07674, 2026.
Justin Chen, Xiangyu Peng, Prafulla Kumar Choubey, Kung-Hsiang Huang, Jiaxin Zhang, Mohit Bansal, and Chien-Sheng Wu. Nudging the boundaries of llm reasoning. In International Conference on Learning Representations, volume 2026, pp. 30315–30335, 2026.
Peter Chen, Xiaopeng Li, Ziniu Li, Xi Chen, and Tianyi Lin. Stepwise guided policy optimization: Coloring your incorrect reasoning in grpo. arXiv preprint arXiv:2505.11595, 2025.
Damek Davis and Benjamin Recht. What is the objective of reasoning with reinforcement learning? arXiv preprint arXiv:2510.13651, 2025.
Jasper Dekoninck, Nikola Jovanović, Tim Gehrunger, Kári Rognvaldsson, Ivo Petrov, Chenhao Sun, and Martin Vechev. Beyond benchmarks: Matharena as an evaluation platform for mathematics with llms. arXiv preprint arXiv:2605.00674, 2026.
Yihong Dong, Xue Jiang, Yongding Tao, Huanyu Liu, Kechi Zhang, Lili Mou, Rongyu Cao, Yingwei Ma, Jue Chen, Binhua Li, et al. Rl-plus: Countering capability boundary collapse of llms in reinforcement learning with hybrid-policy optimization. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 43029–43053, 2026.
Marc Dymetman. Binary rewards and reinforcement learning: Fundamental challenges. arXiv preprint arXiv:2605.02375, 2026.
Yuqian Fu, Tinghong Chen, Jiajun Chai, Xihuai Wang, Songjun Tu, Guojun Yin, Wei Lin, Qichao Zhang, Yuanheng Zhu, and Dongbin Zhao. Srft: A single-stage method with supervised and reinforcement fine-tuning for reasoning. In International Conference on Learning Representations, volume 2026, pp. 102430–102459, 2026.
Daya Guo, Dejian Yang, Haowei Zhang, Junxiao Song, Peiyi Wang, Qihao Zhu, Runxin Xu, Ruoyu Zhang, Shirong Ma, Xiao Bi, et al. Deepseek-r1: Incentivizing reasoning capability in llms via reinforcement learning. arXiv preprint arXiv:2501.12948, 2025.
Yongxin Guo, Wenbo Deng, Zhenglin Cheng, and Xiaoying Tang. G2rpo-a: Guided group relative policy optimization with adaptive guidance. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 4525–4539, 2026.
Zhiwei He, Tian Liang, Jiahao Xu, Qiuzhi Liu, Xingyu Chen, Yue Wang, Linfeng Song, Dian Yu, Zhenwen Liang, Wenxuan Wang, et al. Deepmath-103k: A large-scale, challenging, decontaminated, and verifiable mathematical dataset for advancing reasoning. In International Conference on Learning Representations, volume 2026, pp. 138306–138322, 2026.
Zeyu Huang, Tianhao Cheng, Zihan Qiu, Zili Wang, Yinghui Xu, Edoardo M Ponti, and Ivan Titov. Blending supervised and reinforcement fine-tuning with prefix sampling. arXiv preprint arXiv:2507.01679, 2025.
Jonas Hübotter, Frederike Lübeck, Lejs Behric, Anton Baumann, Marco Bagatella, Daniel Marta, Ido Hakimi, Idan Shenfeld, Thomas Kleine Buening, Carlos Guestrin, et al. Reinforcement learning via self-distillation. arXiv preprint arXiv:2601.20802, 2026.
Aaron Jaech, Adam Kalai, Adam Lerer, Adam Richardson, Ahmed El-Kishky, Aiden Low, Alec Helyar, Aleksander Madry, Alex Beutel, Alex Carney, et al. Openai o1 system card. arXiv preprint arXiv:2412.16720, 2024.
Tomasz Korbak, Ethan Perez, and Christopher Buckley. R1 with kl penalties is better viewed as bayesian inference. In Findings of the Association for Computational Linguistics: EMNLP 2022, pp. 1083–1091, 2022.
Nathan Lambert, Jacob Morrison, Valentina Pyatkin, Shengyi Huang, Hamish Ivison, Faeze Brahman, Lester James V Miranda, Alisa Liu, Nouha Dziri, Shane Lyu, et al. Tulu 3: Pushing frontiers in open language model post-training. arXiv preprint arXiv:2411.15124, 2024.
Thanh-Long V Le, Myeongho Jeon, Kim Vu, Viet Lai, and Eunho Yang. No prompt left behind: Exploiting zero-variance prompts in llm reinforcement learning via entropy-guided advantage shaping. In International Conference on Learning Representations, volume 2026, pp. 121956–121982, 2026.
Jiazheng Li, Hongzhou Lin, Hong Lu, Kaiyue Wen, Zaiwen Yang, Jiaxuan Gao, Yi Wu, and Jingzhao Zhang. Questa: Expanding reasoning capacity in llms via question augmentation. In International Conference on Learning Representations, volume 2026, pp. 144191–144215, 2026a.
Shuozhe Li, Vaishnav Tadiparthi, Kwonjoon Lee, Nakul Agarwal, Hossein Nourkhiz Mahjoub, Ehsan Moradi Pari, Lizhang Chen, Amy Zhang, and Liu Leqi. Learning robust reasoning through guided adversarial self-play. arXiv preprint arXiv:2602.00173, 2026b.
Yuetai Li, Xiang Yue, Zhangchen Xu, Fengqing Jiang, Luyao Niu, Bill Yuchen Lin, Bhaskar Ramasubramanian, and Radha Poovendran. Small models struggle to learn from strong reasoners. In Findings of the Association for Computational Linguistics: ACL 2025, pp. 25366–25394, 2025a.
Ziheng Li, Zexu Sun, Jinman Zhao, Erxue Min, Yongcheng Zeng, Hui Wu, Hengyi Cai, Shuaiqiang Wang, Dawei Yin, Xu Chen, et al. Staying in the sweet spot: Responsive reasoning evolution via capability-adaptive hint scaffolding. arXiv preprint arXiv:2509.06923, 2025b.
Baohao Liao, Hanze Dong, Xinxing Xu, Christof Monz, and Jiang Bian. Self-hinting language models enhance reinforcement learning. arXiv preprint arXiv:2602.03143, 2026.
Mingyang Liu, Gabriele Farina, and Asuman Ozdaglar. Uft: Unifying supervised and reinforcement fine-tuning. Advances in Neural Information Processing Systems, 38:101347–101383, 2026a.
Yihao Liu, Shuocheng Li, Lang Cao, Yuhang Xie, Mengyu Zhou, Haoyu Dong, Xiaojun Ma, Shi Han, and Dongmei Zhang. Superrl: Reinforcement learning with supervision to boost language model reasoning. arXiv preprint arXiv:2506.01096, 2025a.
Zehao Liu, Yuanpu Cao, Jinghui Chen, and Vasant G Honavar. Restoring the sweet spot: Pass-rate weighted self-distillation for llm reasoning. arXiv preprint arXiv:2605.27765, 2026b.
Ziru Liu, Cheng Gong, Xinyu Fu, Yaofang Liu, Ran Chen, Shoubo Hu, Suiyun Zhang, Rui Liu, Qingfu Zhang, and Dandan Tu. Ghpo: Adaptive guidance for stable and efficient llm reinforcement learning. arXiv preprint arXiv:2507.10628, 2025b.
Xingtai Lv, Yuxin Zuo, Youbang Sun, Hongyi Liu, Yuntian Wei, Zhekai Chen, Xuekai Zhu, Kaiyan Zhang, Bingning Wang, Ning Ding, et al. Towards a unified view of large language model post-training. arXiv preprint arXiv:2509.04419, 2025.
Lu Ma, Hao Liang, Meiyi Qiang, Lexiang Tang, Xiaochen Ma, Zhen Wong, Junbo Niu, Chengyu Shen, Runming He, Yanhao Li, et al. Learning what reinforcement learning can't: Interleaved online fine-tuning for hardest questions. In International Conference on Learning Representations, volume 2026, pp. 80802–80821, 2026.
Gongrui Nan, Siye Chen, Jing Huang, Mengyu Lu, Dexun Wang, Chunmei Xie, Weiqi Xiong, Xianzhou Zeng, Qixuan Zhou, Yadong Li, et al. Ngrpo: Negative-enhanced group relative policy optimization. arXiv preprint arXiv:2509.18851, 2025.
Vaskar Nath, Elaine Lau, Anisha Gunjal, Manasi Sharma, Nikhil Baharte, and Sean Hendryx. Adaptive guidance accelerates reinforcement learning of reasoning models. arXiv preprint arXiv:2506.13923, 2025.
Wenhua Nie, Jianan Wu, Junlin Liu, Ziwei Li, Zheng Lin, Zhang Zijian, Yilong Fan, Haoran Zheng, and Jyh-Shing Roger Jang. Gradient starvation in binary-reward grpo: Why group-mean centering fails and why the simplest fix works. arXiv preprint arXiv:2605.07689, 2026.
Du Phan, Matthew Douglas Hoffman, David Dohan, Sholto Douglas, Tuan Anh Le, Aaron Parisi, Pavel Sountsov, Charles Sutton, Sharad Vikram, and Rif A Saurous. Training chain-of-thought via latent-variable inference. Advances in Neural Information Processing Systems, 36:72819–72841, 2023.
Yuxiao Qu, Amrith Setlur, Virginia Smith, Ruslan Salakhutdinov, and Aviral Kumar. Pope: Learning to reason on hard problems via privileged on-policy exploration. arXiv preprint arXiv:2601.18779, 2026.
Shrinivas Ramasubramanian, Daman Arora, Fahim Tajwar, Guanning Zeng, Qingyang Wu, Zhongzhu Zhou, Chenfeng Xu, Haiwen Feng, Yuda Song, Aarti Singh, et al. Tail-likelihood reinforcement learning. arXiv preprint arXiv:2609.02987, 2026.
Xuan Ren, Biao Wu, and Lingqiao Liu. I learn better if you speak my language: Understanding the superior performance of fine-tuning large language models with llm-generated responses. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, pp. 10225–10245, 2024.
Yanwei Ren, Haotian Zhang, Likang Xiao, Xikai Zhang, Jiaxing Huang, Jiayan Qiu, Baosheng Yu, Quan Chen, and Liu Liu. Recycling failures: Salvaging exploration in rlvr via fine-grained off-policy guidance. arXiv preprint arXiv:2602.24110, 2026.
Amrith Setlur, Saurabh Garg, Xinyang Geng, Naman Garg, Virginia Smith, and Aviral Kumar. Rl on incorrect synthetic data scales the efficiency of llm math reasoning by eight-fold. Advances in Neural Information Processing Systems, 37:43000–43031, 2024.
Amrith Setlur, Zijian Wang, Andrew Cohen, Paria Rashidinejad, and Sang Michael Xie. Reuse your flops: Scaling rl on hard problems by conditioning on very off-policy prefixes. arXiv preprint arXiv:2601.18795, 2026.
Zhihong Shao, Peiyi Wang, Qihao Zhu, Runxin Xu, Junxiao Song, Xiao Bi, Haowei Zhang, Mingchuan Zhang, YK Li, Yang Wu, et al. Deepseekmath: Pushing the limits of mathematical reasoning in open language models. arXiv preprint arXiv:2402.03300, 2024.
Avi Singh, John D Co-Reyes, Rishabh Agarwal, Ankesh Anand, Piyush Patil, Xavier Garcia, Peter J Liu, James Harrison, Jaehoon Lee, Kelvin Xu, et al. Beyond human data: Scaling self-training for problem-solving with language models. arXiv preprint arXiv:2312.06585, 2023.
Mingyu Su, Jian Guan, Yuxian Gu, Minlie Huang, and Hongning Wang. Trust-region adaptive policy optimization. In International Conference on Learning Representations, volume 2026, pp. 51806–51828, 2026.
Fahim Tajwar, Guanning Zeng, Yueer Zhou, Yuda Song, Daman Arora, Yiding Jiang, Jeff Schneider, Ruslan Salakhutdinov, Haiwen Feng, and Andrea Zanette. Maximum likelihood reinforcement learning. arXiv preprint arXiv:2602.02710, 2026.
Kimi Team, Angang Du, Bofei Gao, Bowei Xing, Changjiu Jiang, Cheng Chen, Cheng Li, Chenjun Xiao, Chenzhuang Du, Chonghua Liao, et al. Kimi k1. 5: Scaling reinforcement learning with llms. arXiv preprint arXiv:2501.12599, 2025.
Zhiheng Xi, Wenxiang Chen, Boyang Hong, Senjie Jin, Rui Zheng, Wei He, Yiwen Ding, Shichun Liu, Xin Guo, Junzhe Wang, et al. Training large language models for reasoning through reverse curriculum reinforcement learning. arXiv preprint arXiv:2402.05808, 2024.
Yu Xia, Canwen Xu, Zhewei Yao, Julian McAuley, and Yuxiong He. Learning to hint for reinforcement learning. arXiv preprint arXiv:2604.00698, 2026.
Jianhao Yan, Yafu Li, Zican Hu, Zhi Wang, Ganqu Cui, Xiaoye Qu, Yu Cheng, and Yue Zhang. Learning to reason under off-policy guidance. Advances in Neural Information Processing Systems, 38:117157–117186, 2026.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025.
Matthew Yang, Hao Bai, Ian Wu, Gene Yang, Amrith Setlur, and Aviral Kumar. Int: Self-proposed interventions enable credit assignment in llm reasoning. In International Conference on Learning Representations, volume 2026, pp. 85054–85091, 2026.
Eric Zelikman, Yuhuai Wu, Jesse Mu, and Noah Goodman. Star: Bootstrapping reasoning with reasoning. Advances in Neural Information Processing Systems, 35:15476–15488, 2022.
Kaiyi Zhang, Ang Lv, Jinpeng Li, Yongbo Wang, Feng Wang, Haoyuan Hu, and Rui Yan. Stephint: Multi-level stepwise hints enhance reinforcement learning to reason. In Proceedings of the 64th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 37846–37864, 2026a.
Wenhao Zhang, Yuexiang Xie, Yuchang Sun, Yanxi Chen, Guoyin Wang, Yaliang Li, Bolin Ding, and Jingren Zhou. On-policy rl meets off-policy experts: Harmonizing supervised fine-tuning and reinforcement learning via dynamic weighting. In International Conference on Learning Representations, volume 2026, pp. 120693–120726, 2026b.
Xiaoying Zhang, Yipeng Zhang, Hao Sun, Kaituo Feng, Chaochao Lu, Chao Yang, and Helen Meng. Critique-grpo: Advancing llm reasoning with natural language and numerical feedback. arXiv preprint arXiv:2506.03106, 2025.
Xichen Zhang, Sitong Wu, Yinghao Zhu, Haoru Tan, Shaozuo Yu, Ziyi He, and Jiaya Jia. Scaff-grpo: Scaffolded group relative policy optimization for enhancing llm reasoning. In International Conference on Learning Representations, volume 2026, pp. 131946–131974, 2026c.
Xuechen Zhang, Zijian Huang, Yingcong Li, Chenshun Ni, Jiasi Chen, and Samet Oymak. Bread: Branched rollouts from expert anchors bridge sft & rl for reasoning. Advances in Neural Information Processing Systems, 38:96726–96752, 2026d.
Siyan Zhao, Zhihui Xie, Mengchen Liu, Jing Huang, Guan Pang, Feiyu Chen, and Aditya Grover. Self-distilled reasoner: On-policy self-distillation for large language models. arXiv preprint arXiv:2601.18734, 2026.
Ruiyang Zhou, Shuozhe Li, Amy Zhang, and Liu Leqi. Expo: Unlocking hard reasoning with self-explanation-guided reinforcement learning. Advances in Neural Information Processing Systems, 38:90989–91016, 2026a.
Xiangxin Zhou, Zichen Liu, Haonan Wang, Chao Du, Min Lin, Chongxuan Li, Liang Wang, and Tianyu Pang. Variational reasoning for language models. In International Conference on Learning Representations, volume 2026, pp. 154370–154407, 2026b.
Yuhang Zhou, Yixin Cao, and Guangnan Ye. From correctness to utility: Gain-based prefix evaluation for llm reasoning. arXiv preprint arXiv:2606.07190, 2026c.
A PROOFS FOR THE DISTANCE TO THE IDEAL DISTRIBUTION
This appendix proves Theorem 1 and collects its consequences. Appendix A.1 fixes the setup. Appendix A.2 derives the gradient identity in Equation (3) and the distance of training on the reference. Appendix A.3 describes the accepted trajectory and the reference surprisal, and then proves Theorem 1. Appendix A.4 gives an equivalent reading of the closed form. Finally, Appendix A.5 illustrates the theorem with a finite example.
A.1 SETUP
We use the setup of Section 3.1. Fix a question , its correct reference , and the current model, and suppress the conditioning on . The trajectory space is finite, and denotes the current policy . Moreover, is the set of correct trajectories, is the success probability, and is the ideal distribution in Equation (2). We assume . For a token sequence , we write for the probability that a trajectory sampled from begins with , and for the probability that the model continues with . Since the continuation follows the same policy, including its termination rule, autoregressive factorization gives for every complete trajectory .
For a prefix length , the reference splits as , and is the distribution of the accepted trajectory in Equation (1). Besides and in Equation (4), the proofs use the probabilities of an exact copy of the reference and of a correct candidate trajectory,
Here an exact copy means equality of the complete token sequences, and different token sequences can still follow the same mathematical strategy. By definition, , and in particular is the reference surprisal of the empty prefix. Since autoregressive factorization gives , we have , and every is finite.
A.2 THE IDEAL DISTRIBUTION
We first justify the choice of the ideal distribution as the learning target in Section 2. Lemma A.1 shows that learning the likelihood of its trajectories increases the success probability in expectation. Lemma A.2 then gives the distance of training on the reference, which is the first term in Theorem 1.
Lemma A.1 (Gradient identity). Suppose that is differentiable in and assigns positive probability to every trajectory in a neighborhood of . Write . Then
Proof. Since the trajectory space is finite, differentiating term by term gives
At , the weight of each equals by Equation (2), which proves the claim.
Here is fixed at the current model, and differentiation applies only to the trajectory log likelihood. Lemma A.2 (Distance of training on the reference). Training on the reference has distance
In contrast, if assigns positive probability to a trajectory other than , then .
Proof. Since assigns all probability to and , Equation (2) gives . Substituting gives . This quantity is nonnegative since , and it is at most since . For the reverse direction, a trajectory with has , which makes the term infinite.
Thus, the direction of KL in Section 2 permits a finite comparison with training on the reference.
A.3 PROOF OF THEOREM 1
The closed form in Theorem 1 combines two ingredients. Lemma A.3 describes the distribution of the accepted trajectory, and Lemma A.4 relates the reference surprisal to the probability of the prefix.
Lemma A.3 (Distribution of the accepted trajectory). For every prefix length , we have and . Moreover, every trajectory with is correct and has the form , and it satisfies
These trajectories have total probability under .
Proof. The candidate trajectory equals exactly when , which has probability . Since , the event is the disjoint union of and . Therefore, . By Equation (1), the accepted trajectory equals when the candidate trajectory is an exact copy or is incorrect. These two events are disjoint and have total probability .
For , the accepted trajectory equals only when and . Hence, requires and for some , in which case . Autoregressive factorization gives , where . Since for , the ratio equals . Finally, these trajectories carry the remaining probability .
Lemma A.4 (Monotonicity of the reference surprisal). For every prefix length t,
Moreover, is nonincreasing in t.
Proof. Autoregressive factorization gives . Taking negative logarithms gives . Since and , both and are nonnegative. For , every trajectory that begins with also begins with . Therefore, , which gives .
With these two lemmas, the proof of Theorem 1 reduces to a direct computation.
Theorem 1 (Distance to the ideal distribution, restated). Under the setup in Appendix A.1, for every prefix length t,
Moreover, every satisfies .
Proof. Write . By Lemma A.3, assigns probability 1 - d to r, whose likelihood ratio is . It assigns the remaining probability d to trajectories whose likelihood ratio is . Therefore,
Lemma A.4 gives , and hence . Collecting the two terms in proves the closed form. Its first term equals by Lemma A.2 and does not depend on .
For the second statement, write and . Since for , we have . For every prefix length , the maximality of gives
Taking the minimum over the finitely many prefix lengths completes the proof.
Since and , the closed form also gives for every prefix length . Therefore, a continuation with fallback never moves the distribution of the accepted trajectory farther from the ideal distribution than training on the reference.
A.4 CONSEQUENCES OF THEOREM 1
We now give an equivalent reading of the closed form. Corollary A.5 rewrites the distance in terms of the reference content kept in the accepted trajectory.
Corollary A.5 (Reference content kept in the accepted trajectory). Let be the reference content kept in the accepted trajectory , which is when and the prefix otherwise. Then, for every prefix length ,
Proof. Lemma A.2 gives . Substituting this expression and into the closed form of Theorem 1 gives the display. By Lemma A.3, with probability and with probability . Since and by Lemma A.4, the middle two terms equal .
In other words, apart from , which does not depend on the prefix, and a term in , the distance to the ideal distribution is the expected surprisal of the reference content that the model has not replaced. Both extremes of the prefix length keep nearly all of the reference surprisal . A prefix covering almost the entire reference keeps it through the prefix, while an empty prefix on a hard question keeps it through fallback.
A.5 A FINITE EXAMPLE
This example shows that neither the success probability of the continuation nor the successful replacement probability alone determines which prefix gives the smaller distance. Consider five complete trajectories whose displayed strings omit a shared deterministic termination token, , , , , and , with respective probabilities 0.08, 0.01, 0.01, 0.20, and 0.70. The correct trajectories are , , and , and the reference is . The first tokens are and , with probabilities 0.10 and 0.90, and the second-token probabilities are the corresponding conditional probabilities. These probabilities define a finite autoregressive distribution.
| Prefix | ||||||
|---|---|---|---|---|---|---|
| Empty | 0.29 | 0.08 | 0.21 | 2.525729 | 0.530403 | 0.571231 |
| H | 0.90 | 0.80 | 0.10 | 0.223144 | 0.022314 | 1.170715 |
Training on the reference gives . Supplying H increases while making an exact copy more likely. In this setting, both the successful replacement probability and the reference surprisal decrease. Therefore, the empty prefix gives the larger and the smaller distance despite the lower success probability of its continuation.
To isolate the role of the reference surprisal, keep the three probabilities under H unchanged and assign probabilities 0.04 and 0.86 to and , respectively. The resulting comparison is
| Prefix | ||||||
|---|---|---|---|---|---|---|
| Empty | 0.13 | 0.08 | 0.05 | 2.525729 | 0.126286 | 0.310493 |
| H | 0.90 | 0.80 | 0.10 | 0.223144 | 0.022314 | 0.368369 |
Training on the reference now gives . Here supplying H increases both and . However, the decrease in the reference surprisal outweighs the increase in . Therefore, the empty prefix still gives the larger and the smaller distance. Thus, even the successful replacement probability alone can favor a different prefix from the one preferred by Theorem 1. Both examples concern a fixed model and illustrate why the choice of prefix should account for and together.
B PROOFS FOR LEARNING THE PREFIX SELECTOR
This appendix proves Theorem 2 and analyzes the prefix selector during training. Appendix B.1 fixes the setup and derives the properties of the selector feedback, and Appendix B.2 proves Theorem 2. Appendix B.3 examines the effects of sharing the selector across questions and of randomizing the guidance level. Finally, Appendix B.4 derives the expected update of the selector in the GRPO application as the model and the questions change, and Appendix B.5 bounds the accumulated sampling noise.
B.1 SETUP AND SELECTOR FEEDBACK
Fix the current model, the references, and as in Section 3.3. We assume that every question satisfies the setup of Appendix A.1, which includes and hence . For a question , we write for its ideal distribution. For a guidance level , we write , , and for the distribution of the accepted trajectory, the successful replacement probability, and the reference surprisal at the prefix length . Here is the actual prefix length, including the boundary adjustment in Section 4.1. Therefore, the nominal level can differ from the realized ratio . We first collect the properties of the selector feedback for a single question, for which we suppress as in Appendix A.
Lemma B.1 (Selector feedback). For every prefix length , the selector feedback satisfies and . Moreover, with ,
and the normalized distances satisfy .
Proof. The indicator in Equation (7) has expectation by Equation (4). Lemma A.4 gives , and hence and , which proves Equation (8). Dividing the closed form of Theorem 1 by gives Equation (14), and the range of follows from for . Finally, since and , Equation (14) gives , and Lemma A.2 gives .
Thus, a larger expected feedback corresponds to a smaller normalized distance, up to the bounded last term. Since normalization divides at every prefix of the same reference by the same , it preserves the ranking of across these prefixes. Because of the bounded last term, this ranking need not equal the ranking of the exact distances. Across questions, normalization expresses each distance relative to the reference surprisal of the empty prefix.
The ablation without surprisal weighting in Section 5.3 replaces with the indicator of successful replacement, whose expectation is . Since this indicator still excludes exact copies of the reference, comparing it with isolates the effect of weighting a successful replacement by the reference surprisal.
For the rest of this appendix, we write
for the expected selector feedback of question x at level , where the equality follows from Lemma B.1.
B.2 PROOF OF THEOREM 2
Theorem 2 measures a selector by its average normalized distance and compares it with training on the reference. Written out, these distances are
By Lemma B.1 and , the quantities , , and lie in .
Theorem 2 (Learning the prefix selector from feedback, restated). Fix the current model, the references, and , where every question satisfies the setup of Section 3.1. Let and be the expectations of and over and . Then
Moreover, for a differentiable prefix selector with positive probabilities and a baseline b fixed before sampling,
Proof. For the first statement, averaging Equation (14) over and gives
where and is the last term of Theorem 1 at the prefix length . Lemma B.1 bounds each , and rearranging Equation (15) gives the first statement.
For the second statement, the level is sampled independently of the question. Condition on . Since and ,
The baseline term vanishes since . Define , which does not depend on . Then
where differentiation acts on a finite sum with fixed bounded coefficients. Averaging the conditional identity over gives the same expression, which proves the second statement.
The first statement leads to the following guarantee for a selector that maximizes J.
Corollary B.2 (Maximizing the objective). If , then .
Proof. By Equation (15), gives
Thus, a larger objective corresponds to a smaller average normalized distance, up to a bounded correction. Since the correction can change with the selector, and can rank selectors differently within this bound. The bound is informative only when is small, and it can be large when some reference surprisals are close to zero.
In Section 4.2, the baseline is a running average of past feedback. For such a baseline, the same argument applies after conditioning on the history and the current question. Given this information, the baseline is fixed, the level still follows , and its feedback still has conditional mean . Moreover, the baseline update in Appendix B.4 keeps , which ensures integrability.
B.3 SHARING AND RANDOMIZING GUIDANCE LEVELS
The prefix selector shares one distribution over guidance levels across questions and samples a level for each continuation. We now examine both choices. Proposition B.3 bounds the cost of sharing within the objective J. Proposition B.4 then compares the distance after randomizing the level with the average over levels in J.
For any distribution over , write with from the proof of Theorem 2, which gives . The best shared distribution has value . In contrast, an oracle that knows for every question and chooses a level for each question separately has value .
Proposition B.3 (Cost of sharing). For every distribution over A,
where both terms are nonnegative. Moreover, the prefix selector in Equation (11) satisfies
Proof. The decomposition is an identity. The first term is nonnegative since . The second term is nonnegative since is a convex combination of the values . For the selector in Equation (11), write for its softmax component. Then . The first sum is at most , and it approaches this value as concentrates on a maximizing level.
The first term in Equation (16) measures the cost of using the same distribution over levels for every question. It is zero if one level maximizes for almost every question. The second term measures the gap between the current selector and the best shared distribution. If all are equal, every shared distribution has the same objective even when individual questions prefer different levels. Moreover, the uniform component of the selector has an explicit cost in the current objective, while it keeps every level observed as the model changes.
Through Theorem 2, the objective corresponds to the average of the normalized distance over the selected levels. However, sampling a level and then making one continuation produces a single distribution of the accepted trajectory, which mixes the distributions for different levels. For a fixed question and a distribution over , this mixture is . Let be the mutual information between the sampled level and the accepted trajectory, and let be the entropy of .
Proposition B.4 (Randomizing the guidance level). For every question x and distribution over A,
where . Consequently, with ,
Proof. Every has finite distance by Lemma B.1. Splitting the log probability ratio through and summing over trajectories with positive probability gives
since equals the mutual information . The mutual information is nonnegative and at most the entropy of the level, which gives . For the bounds, divide the identity by and apply Equation (14) to each level. The upper bound uses and , and the lower bound uses and .
The mutual information is zero when all distributions with positive weight coincide. Otherwise, randomizing the level gives a smaller distance than the average over levels. This construction returns one accepted trajectory from one continuation, and Appendix C.2 analyzes acceptance after multiple continuations.
B.4 SELECTOR UPDATES IN THE GRPO APPLICATION
Theorem 2 fixes the model, the references, and . We now specify and the baseline in the GRPO application of Section 4.3, and then derive the expected update of the selector for a batch and across training iterations.
Questions selected for reference guidance. Fix the current model and a reference for each question. Since the responses of a group are sampled independently, the group is an all-failure group with probability . For , define . When , the questions that receive reference guidance follow
Given the question, the guidance levels and continuations are sampled independently of the group. Therefore, restricting guidance to questions with an all-failure group changes their relative weights while preserving for each question and level. If , no question receives guidance and the selector update is zero almost surely.
Baseline and update order. The selector starts with and . Every term in Equation (12) uses the same selector parameters and baseline, which are fixed before the batch is collected. After a nonempty batch of continuations, the baseline is updated by
where . Since this update is a convex combination of values in , induction gives at every iteration. Centering the updated logits by subtracting their mean leaves the selection probabilities unchanged. An empty batch of continuations leaves and unchanged. Table 3 specifies the numerical hyperparameters. Reference surprisals, verification outcomes, and model parameters are fixed during the selector update. This update precedes the policy update, and both use the continuations generated by the same current model. All continuations supply feedback, including zero feedback values when no continuation gives a successful replacement and ARG falls back to the reference.
Expected batch update. Let denote the summed direction in Equation (12) before multiplication by the step size,
with when is empty.
Proposition B.5 (Expected batch update). Consider a batch of n question positions, each with marginal distribution D. Suppose that the model, the selector, and the baseline are fixed during collection, and that every all-failure group receives K continuations whose levels and feedback follow the laws above. Then
where the right-hand side is zero when .
Proof. Write as a sum over question positions and continuations of the terms . Conditional on the question at position and on its all-failure event, each term has expectation by the proof of Theorem 2. Therefore, position contributes
where the first equality uses Equation (17). Summing over the positions by linearity proves the claim. When , no group is an all-failure group almost surely, and hence almost surely.
Since the proof uses only the marginal laws, it requires no independence between question positions or between continuations. Holding J fixed, the factors n, K, and only scale the expected update at a fixed step size. However, changes in the all-failure probabilities also change the question weights in J and hence the update direction.
Changing models and questions. Across training iterations, the model, the question distribution, and the selector all change. Let be the increasing filtration of the training history, where contains the history before iteration , including the current model, the selector parameters , and the baseline. For the question positions at iteration , define their average conditional marginal distribution by
With the current all-failure probabilities and expected feedback , define
where the last two are defined when . Let be the summed direction at iteration .
Proposition B.6 (Expected update under changing models and questions). Suppose that, conditional on , the groups and continuations at iteration follow the laws of Proposition B.5 under the current model, except that position has the marginal distribution . Then
where the right-hand side is zero when .
Proof. Apply the proof of Proposition B.5 conditionally on , with the marginal distribution of position given by . Since the proof uses only marginal laws, the positions may have different marginal distributions. Summing their contributions replaces with , which gives Equation (20).
The gradient in Equation (20) holds the history-dependent model, question distribution, and prefix mapping fixed. Thus, the update follows the current objective in expectation even as training changes these quantities. The setting includes sampling with replacement from a fixed distribution, for which , and sampling without replacement from a remaining pool of questions.
B.5 ACCUMULATED SAMPLING NOISE
Proposition B.6 describes the expected update at each iteration. We now bound how far the accumulated updates deviate from these expectations, starting with the size of each update.
Lemma B.7 (Bounded update direction). For the selector in Equation (11) and a baseline in [0, 1], every term of has Euclidean norm at most . Consequently, .
Proof. Let be the softmax component of Equation (11) and the coordinate vector for level . Then
The prefactor is at most one since . Moreover, . Since and both lie in , we have , which bounds each term by . Finally, has at most terms, including the case of no continuations.
Define the centered errors
Proposition B.8 (Accumulated sampling noise). Under the conditions of Proposition B.6 and a baseline in [0, 1], for a deterministic number of iterations,
Proof. Proposition B.6 gives . The conditional variance identity and Lemma B.7 then give
For , the error is measurable with respect to . Therefore, . Expanding the squared norm of the sum, the cross terms vanish and each of the diagonal terms is at most 2, which proves the bound.
The baseline update in Equation (18) satisfies the condition on the baseline. Proposition B.8 controls the noise around the changing expected directions.
C ANALYSIS OF MULTIPLE CONTINUATIONS
Theorem 1 concerns a single continuation, whereas ARG samples K continuations for each question and accepts candidate trajectories by the rule in Section 4.1. This appendix analyzes the distribution of the accepted trajectory after multiple continuations. Appendix C.1 fixes one prefix and studies how the distance to the ideal distribution changes with the number of continuations. Appendix C.2 gives a sufficient condition under which an arbitrary acceptance rule keeps the distance no larger than that of training on the reference.
C.1 REPEATED CONTINUATIONS FROM A FIXED PREFIX
Fix a prefix length and let be the event that a trajectory begins with . Since the reference is correct and has positive probability, . For a positive integer , draw independent continuations from . The first-success rule returns the first correct candidate trajectory, including an exact copy of , and returns if every candidate trajectory is incorrect. This rule treats an exact copy as a success. Let be the resulting distribution of the accepted trajectory, and let be the ideal distribution restricted to trajectories that begin with .
Lemma C.1 (Distribution after repeated continuations). Let be the probability that at least one candidate trajectory is correct, and define and . Then
and
Proof. A correct trajectory is returned at continuation with probability . Summing over gives for every correct . Since for these trajectories, this probability equals . The same calculation gives for an exact copy, and fallback adds . Therefore, , which proves Equation (22). For the distance, the trajectories other than have total probability and likelihood ratio . Following the proof of Theorem 1 with this ratio gives the closed form.
Compared with the closed form for one continuation, the additional term accounts for the larger probability of each trajectory other than the reference after repeated continuations. For , we have , and the lemma recovers Theorem 1. The mixture form in Equation (22) shows that additional continuations move probability from the reference to , which leads to the following limit.
Proposition C.2 (The limit of a fixed prefix). The distance is nonincreasing in k and satisfies
Consequently, it converges to as .
Proof. For , we have . Hence, every distribution supported on satisfies . By Lemma C.1, is such a distribution. Therefore, it suffices to study , and the lower bound follows from its nonnegativity. For the upper bound, convexity of KL applied to Equation (22) gives , where and . For monotonicity, take . If , then . Otherwise, satisfies , and convexity gives
Finally, the upper bound converges to since .
For the empty prefix, contains every trajectory. Therefore, the limiting distribution is and the limiting distance is zero. A nonempty prefix has the same limit exactly when contains all correct trajectories with positive probability. Proposition C.2 orders the numbers of continuations for each fixed prefix. However, comparing different prefixes also requires their respective and , which determine both the rate and the limit of the decrease.
C.2 A SUFFICIENT CONDITION FOR GENERAL ACCEPTANCE RULES
To cover the acceptance rule of ARG, which excludes exact copies, mixes several prefixes, prefers some candidate trajectories over others, and may accept several of them, we consider a general procedure. Choose reference prefixes before generation. Conditional on this list, draw a continuation and form the candidate trajectory for each . The continuations may depend on each other, provided that each candidate trajectory has this conditional marginal law given the entire list. A procedure returns or one of the correct candidate trajectories. If several trajectories are accepted, we consider the distribution obtained by selecting one of them with nonnegative weights that sum to one. Let denote the resulting distribution of the accepted trajectory, including fallback, and use the convention .
Proposition C.3 (Multiple continuations and acceptance). Under the setup above, define and . Then
In particular, guarantees . A sufficient condition is .
Proof. A trajectory can be selected only if it appears among the candidate trajectories. Thus,
where the last inequality uses from Lemma A.4. Every with is correct and has . Hence, . Since these trajectories have total probability and the reference has probability with ,
Lemma A.2 gives , which proves Equation (23). Since , and when , the condition gives the comparison with training on the reference. Finally, gives .
The argument permits arbitrary selection among correct candidate trajectories, including the exclusion of exact copies and the priority rule of ARG. For one prefix used times, , and the bound becomes . The term accounts for the possible concentration from selecting among several candidate trajectories. For and the acceptance rule in Equation (1), we have , and the bound becomes the equality in Theorem 1.
In ARG, the prefixes come from guidance levels sampled before generation. The following corollary extends the comparison to this case.
Corollary C.4 (Guidance levels sampled before generation). Under the setup of Proposition C.3, suppose that the guidance levels are sampled before generation from any distribution over , and that . Then the distribution of the accepted trajectory, averaged over the sampled levels, satisfies .
Proof. Conditional on each list of levels, every prefix satisfies . Therefore, Proposition C.3 bounds the conditional distance by . Since is the average of these conditional distributions, convexity of KL in its first argument gives the same bound for .
The condition in Corollary C.4 uses the actual prefix lengths after the boundary adjustment and is available from the same reference surprisals used for prefix selection.
D ANALYSIS OF LEARNING FROM INSERTED TRAJECTORIES
The preceding appendices compare distributions of accepted trajectories at a fixed model. This appendix examines how the inserted trajectories contribute to the policy update in Section 4.3. Appendix D.1 derives the gradient of inserted trajectories in Equation (13). Appendix D.2 derives the expected group update under binary rewards for one inserted trajectory, and Appendix D.3 extends it to multiple inserted trajectories. Finally, Appendix D.4 relates learning the complete trajectory and learning only the continuation to their respective success events.
D.1 THE GRADIENT OF INSERTED TRAJECTORIES
Condition on the realized batch, its masks, and the recomputed group advantages. Let I index the inserted trajectories, and let T > 0 be the total number of active response tokens in the batch loss. For token j of an inserted trajectory , let be its log probability given the original question and all preceding tokens of the trajectory. Inserted trajectories use the clipped objective of Equation (29) in Appendix E.3 with the stopped current probability in the ratio denominator,
where stopgrad preserves a value but assigns zero derivative to it.
Lemma D.1 (Gradient of inserted trajectories). Suppose that the advantages and the token count are held fixed during differentiation and that every token of an inserted trajectory is active. Then the gradient of is given by Equation (13).
Proof. By construction, and . Since the clipping interval contains one in its interior, both branches of the clipped loss have the same derivative at this ratio. Therefore, for any fixed real advantage , the loss of token has derivative . Summing over all positions, including any supplied prefix and the termination token, gives for each inserted trajectory. Summing over proves Equation (13).
Lemma D.1 identifies the gradient under the prescribed rule of automatic differentiation. For , minimizing gives a positively weighted supervised fine-tuning (SFT) contribution. The advantage specifies its learning weight, while candidate generation and acceptance determine the distribution of the trajectory.
D.2 THE GROUP UPDATE WITH ONE INSERTED TRAJECTORY
We now use binary correctness rewards to separate the contributions of correct and incorrect responses. This simplification ignores the format reward, which leaves the advantages unchanged when all responses in a group receive the same format reward. The calculation is at the current model and precedes division by the batch token count. Fix a question with set of correct trajectories , and suppress the conditioning on unless shown explicitly. Assume a finite trajectory space, a differentiable policy with positive trajectory probabilities in a neighborhood of , and . Draw independent responses from and condition on all of them failing verification. Then replace one uniformly chosen response by , where is supported on , and where and the replaced position are independent of the original failures. Both and the collected responses are fixed during differentiation. Set
and write for the ideal distribution at the current model.
At the current model, the ratios of the original responses equal one and clipping is inactive. The inserted trajectory follows Lemma D.1, and all response tokens are included. We consider the group ascent direction, which is the sum of the reward-dependent gradients before division by the batch token count. With one inserted trajectory, the reward mean is and the sample standard deviation is . Therefore, the inserted trajectory has advantage , and each failure has advantage , where is the stabilizer in Equation (28). Define the positive coefficient
Let denote the original failures that remain after replacement. The realized group direction is
Proposition D.2 (Inserted trajectories and the group update). Under the setup above, let be the expectation over the original failures, the replaced position, and the inserted trajectory. Then
In particular, for ,
Proof. Conditioning independent responses on all of them belonging to gives independent draws from , and uniform replacement preserves this distribution for the remaining failures. Therefore, with ,
Applying the argument of Lemma A.1 to the event gives at . For fixed , expanding gives
Substituting both expressions proves Equation (25). When , the gradient of the KL term vanishes at by Lemma A.1. Since , this gives Equation (26).
The ratio is the odds of passing verification. The first term in Equation (25) favors success over failure. The second term records which correct trajectories the distribution Q favors.
For training on the reference, , and this term favors the particular reference within the set of correct trajectories. In contrast, Equation (26) shows that inserting trajectories from the ideal distribution gives an expected group update proportional to the gradient of the success probability under the original question.
For reference fallback, makes the positive term in Equation (24) a weighted SFT gradient. For an accepted candidate trajectory, the positive term learns its complete sequence, including the supplied prefix. In both cases, the original failures supply the negative terms in the same group update. This combination of learning from correct trajectories with feedback on the model's own failures connects our update to prior work on integrating supervised and reinforcement fine-tuning (Yan et al., 2026, Fu et al., 2026).
D.3 MULTIPLE INSERTED TRAJECTORIES
We keep the preceding setup but insert a random number of correct trajectories with , where a single reference is inserted when no candidate trajectory is accepted. The inserted trajectories may depend on each other. However, they, their number , and the replaced positions, which are uniformly chosen and distinct, are independent of the original failures. Conditional on , let and be the empirical distributions of the inserted trajectories and of the remaining failures. Substituting the advantages and of the inserted trajectories and the remaining failures gives the group direction
where
Define the average coefficient and the advantage-weighted distribution of inserted trajectories by
Since , we have , and is a probability distribution on .
Proposition D.3 (Multiple inserted trajectories). Under the setup above,
For one inserted trajectory, and , which recovers Proposition D.2.
Proof. Conditional on the inserted trajectories and their number, uniform replacement preserves the failure distribution for the remaining failures. Therefore, , and taking expectations in the group direction gives
The proof of Proposition D.2 then applies with replaced by and replaced by . Finally, gives .
The distribution weights each realized set of inserted trajectories by its total positive advantage . Therefore, it accounts for both acceptance and the resulting composition of the group.
D.4 LEARNING THE PREFIX AND THE CONTINUATION
The likelihood in Equation (13) includes every token of the complete accepted trajectory under the original question. For a candidate trajectory from a nonempty prefix, the chain rule gives
Hence, learning covers both producing the supplied prefix and completing the trajectory, and reference fallback trains the complete reference through Equation (13). We now connect the two terms in Equation (27) to different success events. Fix a prefix length , let be the event that a trajectory begins with , and let as in Appendix C.1. This distribution is well defined since the correct reference has positive probability. Let be the distribution of its continuations. Here is the probability that a continuation from gives a correct candidate trajectory, which equals at .
Proposition D.4 (Learning the prefix and the continuation). Under the assumptions of Lemma A.1, at ,
Moreover, the distribution of the accepted trajectory after k continuations in Lemma C.1 satisfies
Proof. The first identity follows from Lemma A.1 with replaced by . For the second, Equation (27) gives , and . Subtracting from both sides of the first identity gives the second. Finally, the mixture form in Equation (22), whose weights are fixed at , and the first identity give the last statement.
Under , the expected gradient of the complete trajectory addresses the joint event of producing the prefix and passing verification. In contrast, learning only the continuation addresses verification given an externally supplied prefix. The two coincide for the empty prefix. The joint event covers the correct trajectories that begin with this prefix, while the overall success event C also includes correct trajectories that begin differently. Finally, the mixture identity in Proposition D.4 shows how fallback and successful continuations contribute to the expected gradient of the accepted trajectory before any weighting.
E IMPLEMENTATION AND EVALUATION DETAILS
We first specify the training procedure, reference boundaries, and policy loss. We then give the training configurations, question prompt, and evaluation protocol. Together, these details connect the single-continuation analysis in Theorem 1 to the complete training procedure.
E.1 TRAINING PROCEDURE
Training uses 11,068 screened DeepMath examples with matched offline DeepSeek-R1 reference solutions (Guo et al., 2025). We start from DeepMath-103K, keep problems with difficulty at least 5.0, and drop problems whose gold answer is not a single short expression, is a multiple-choice letter, or cannot be verified by our checker when written inside \boxed{}. From the remaining problems, we randomly sample 16,000 in proportion to difficulty and let the base Qwen3-4B attempt each one eight times under the training prompt and sampling settings. Problems solved in all eight attempts are removed. We also drop the few problems whose reference solution does not end in the gold answer. Table 3 gives the ARG configuration. Algorithm 1 separates collection under a fixed policy from updates of the selector and policy. All continuations, including failures and candidate trajectories not selected for the policy update, provide selector feedback.
In the algorithm, contains distinct batch-wide continuation indices for question . Candidate quantities are computed for every . The operation Accept returns the candidate indices selected by the rule in Section 4.3.
E.2 PREFIX BOUNDARIES
The level always uses the empty prefix. For , we take the latest prefix length whose reference surprisal is at least and, if this length is positive, move it to the first valid sentence or formula boundary at or after it. If no such boundary exists, we use the latest earlier valid boundary,
Algorithm 1 One ARG training update with GRPO
Input Batch with references, policy , selector , baseline .
-
-
for
-
for with do
-
for ,
-
if then
-
-
-
-
-
end if
-
Replace rows in by , or by if .
-
end for
-
Recompute final rewards , then .
-
if then
-
-
-
end if
-
Update using Equation (13) and the remaining-response loss in Appendix E.3.
| Setting | ARG configuration |
|---|---|
| Questions per update | 32 |
| Ordinary responses per question | 8 |
| Continuations per all-failure group | 8 |
| Guidance levels | |
| Total acceptance cap in Algorithm 1 | 4 |
| Maximum accepted trajectories with empty prefixes | 4 |
| Maximum accepted trajectories with nonempty prefixes | 1 |
| Selector exploration | 0.2 |
| Selector step size | 0.3 |
| Baseline update rate | 0.1 |
| Training budget | 200 updates |
| Learning rate | |
| Warmup updates | 10 |
| Weight decay | 0.01 |
| Gradient norm clipping | 1 |
| Policy optimization epochs per batch | 1 |
| Clipping ratio interval | [0.8, 1.3] |
| Policy loss averaging | Batch token mean |
| Total reward | Accuracy plus 0.2 format |
| Advantage stabilizer | |
| Training temperature | 1 |
| Training top- and top- | 1 and no truncation |
| Question length limit | 3072 tokens |
| Trajectory length budget including the prefix | 8192 tokens |
| Additional KL loss | None |
| Entropy loss coefficient | 0 |
Table 3. ARG configuration for both model sizes.
or the empty prefix if there is none. A valid boundary falls on a token boundary, closes all mathematical delimiters, and leaves a nontrivial suffix containing the final boxed answer. The selector feedback uses the reference surprisal at this adjusted prefix length, and the prefix counts toward the maximum trajectory length.
E.3 POLICY LOSS
Final rewards combine binary verifier accuracy with 0.2 times a binary format reward indicating an extracted boxed answer. Thus, a correct response receives 1.2, while an incorrect response receives 0.2 or zero according to its format. We recompute advantages within each final group as
where and are the mean and sample standard deviation of the group's final rewards, and ensures numerical stability. All-equal rewards give exactly zero advantages.
For an ordinary response , let be token and define
Let index the original responses that remain in their groups, and let be the total number of active response tokens in the final batch. Their loss contribution uses the asymmetric clipping interval [0.8, 1.3],
Inserted trajectories use the stopped current probability in the ratio denominator, as derived in Appendix D. With unit token weights over each complete inserted trajectory, this gives Equation (13). Loss-active tokens include supplied prefixes and termination tokens when present, and both contributions share the same batch token denominator.
E.4 TRAINING CONFIGURATIONS AND QUESTION PROMPT
The GRPO, SAGE, BREAD, LUFFY, and ARG runs share the optimizer and student rollout settings in Table 4. The resampling and weighting ablations use the same settings. SFT learns from the offline references. For OPSD, we follow Zhao et al. (2026) in using one student response per question, a training generation limit of 1024 tokens, and temperature 1.1. Table 4 specifies the remaining settings used in our experiments. All listed runs use 32 questions per update and one optimization epoch per collected batch. Their data and parameter-initialization seeds are zero, and the learning rate is constant after warmup.
| Setting | GRPO-based runs | SFT | OPSD |
|---|---|---|---|
| Learning rate | |||
| Warmup updates | 10 | 10 | 0 |
| Weight decay | 0.01 | 0.01 | 0 |
| Gradient norm clipping | 1 | 1 | 0.1 |
| Responses per question | 8 | Reference | 1 |
| Response length limit | 8192 | 8192 | 1024 |
| Generation temperature | 1 | N/A | 1.1 |
| Generation top- | 1 | N/A | 0.95 |
| Generation top- | Unrestricted | N/A | 20 |
Table 4. Recorded configurations for both model sizes. GRPO-based runs here comprise GRPO, SAGE, BREAD, LUFFY, ARG, resampling, and the weighting ablation. The reference-insertion ablation is specified by its replacement rule in Section 5.3.
The ordinary student question prompt and the evaluation prompt contain a single user message with the question, a blank line, and the instruction below. They use no system message or few-shot example. Auxiliary teacher or reference conditioning is specific to each training method. The
Qwen3 chat template is applied with thinking mode disabled, which appends an empty thinking block before response generation. The rendered question prompt is shown schematically below.
<|im_start|>user <question>
Please reason step by step, and put your final answer within \boxed{}.
<|im_end|>
<|im_start|>assistant <think>
</think>Here <question> denotes the question text, and the line break before <|im_end|> is added for display. For ARG generation, the selected reference prefix supplies the beginning of the candidate trajectory. Evaluation supplies no reference prefix.
E.5 CHECKPOINT AND EVALUATION RECORDS
Table 5 lists the reported checkpoints. GRPO, SAGE, BREAD, LUFFY, ARG, resampling, and the weighting ablations use the fixed budget of 200 updates. Reference insertion also reports its step-200 checkpoint. For SFT and OPSD, we select the reported checkpoints by comparing mean pass@12 and avg@12 on the five evaluation benchmarks.
| Method | 4B checkpoint | 8B checkpoint |
|---|---|---|
| Base | 0 | 0 |
| SFT | 25 | 25 |
| OPSD | 60 | 100 |
| GRPO, SAGE, BREAD, LUFFY, ARG | 200 | 200 |
| Resampling | 200 | N/A |
| w/o weighting | 200 | 200 |
| Reference insertion | 200 | N/A |
Table 5. Reported checkpoint steps for both model sizes. Base uses the released parameters. SFT and OPSD use benchmark-selected checkpoints, and the remaining trained entries report step 200.
All 20 reported model and method entries use the same 150 evaluation questions, comprising 30 questions from each of the five benchmarks. The benchmark files, answer extractor, and verifier implementation match across entries. Table 6 gives the common decoding settings. Each question contributes 12 scored responses.
| Setting | Evaluation value |
|---|---|
| Temperature | 1 |
| Top-p | 0.95 |
| Top-k | 20 |
| Maximum new tokens | 16,384 |
| Maximum context length | 32,768 |
| Scored responses per question | 12 |
| Random seed | 1234 |
| Parameter precision | bfloat16 |
| Generation engine | vLLM 0.11.0 |
| Thinking mode | Disabled |
Table 6. Evaluation configuration shared by all reported entries.
The scorer extracts the final balanced boxed answer. A response without a boxed answer is incorrect. Extracted answers are checked with Math-Verify 0.9.0 and a normalized string comparison. For each question, pass@12 records whether at least one of its 12 responses is correct, while avg@12 is the fraction of those responses that are correct. Both metrics are averaged over questions and reported as percentages. Since the benchmarks have equal sizes, the mean over benchmarks also equals the mean over all 150 questions.
F ADDITIONAL MAIN RESULTS
Table 7 reports avg@12 for the same checkpoints and the same 12 scored responses per question as Table 1, following the scoring protocol in Appendix E.5.
| Model | Method | AIME24 | AIME25 | AIME26 | HMMT_Feb | HMMT_Nov | Avg. |
|---|---|---|---|---|---|---|---|
| Qwen3-4B | Base | 22.78 | 22.22 | 13.33 | 11.94 | 9.17 | 15.89 |
| SFT | 19.44 | 20.56 | 16.94 | 9.72 | 9.17 | 15.17 | |
| GRPO | 47.22 | 42.22 | 46.67 | 26.94 | 29.17 | 38.44 | |
| OPSD | 22.22 | 18.89 | 20.83 | 14.44 | 13.06 | 17.89 | |
| SAGE | 44.17 | 39.17 | 40.83 | 25.00 | 28.06 | 35.44 | |
| BREAD | 56.39 | 47.78 | 47.78 | 29.17 | 35.56 | 43.33 | |
| LUFFY | 50.28 | 43.61 | 41.67 | 25.00 | 33.06 | 38.72 | |
| ARG (ours) | 52.50 | 46.67 | 46.39 | 26.94 | 33.06 | 41.11 | |
| Qwen3-8B | Base | 25.28 | 21.67 | 18.61 | 9.72 | 9.44 | 16.94 |
| SFT | 33.06 | 27.78 | 28.06 | 12.22 | 17.50 | 23.72 | |
| GRPO | 48.89 | 35.83 | 36.67 | 22.22 | 30.56 | 34.83 | |
| OPSD | 33.89 | 29.44 | 26.67 | 14.17 | 19.44 | 24.72 | |
| SAGE | 54.72 | 40.00 | 44.17 | 27.22 | 35.28 | 40.28 | |
| BREAD | 60.56 | 42.50 | 43.06 | 27.78 | 39.44 | 42.67 | |
| LUFFY | 50.83 | 42.22 | 43.89 | 25.28 | 31.94 | 38.83 | |
| ARG (ours) | 55.28 | 46.94 | 46.39 | 27.22 | 35.56 | 42.28 |
Table 7. Main experimental results in avg@12 percentages. Avg. is the mean over the five benchmarks. Within each model, bold and underline mark the best and second-best values in each column.
ARG improves aggregate avg@12 over GRPO by 2.67 and 7.45 percentage points on Qwen3-4B and Qwen3-8B, respectively, and achieves the second-highest aggregate avg@12 on both models. The difference between the two metrics is consistent with where ARG intervenes. Specifically, ARG modifies the GRPO update only for all-failure groups, where all responses to a training question are incorrect, and leaves the update for all other questions unchanged. Therefore, the additional learning signal concentrates on questions that the model currently fails to solve. When a question changes from unsolved to solved by a few of the 12 responses, pass@12 counts the entire question, whereas avg@12 counts only the fraction of correct responses. As a result, the effect of ARG appears most clearly in pass@12, which measures the fraction of questions that the model solves within the sampling budget.
G ADDITIONAL ABLATION RESULTS
We provide benchmark-level results, then examine how the ablations change the accepted trajectories and the prefix selector during training. Reference insertion and resampling use Qwen3-4B, while the surprisal-weighting comparison covers both model sizes.
G.1 EVALUATION RESULTS
Tables 8 and 9 report pass@12 and avg@12 separately for all five benchmarks. All entries use the checkpoint after 200 training steps and the same evaluation protocol as the main results. Each question contributes 12 scored responses, as specified in Appendix E.5.
For the ablations in Table 9, ARG has higher average sampled accuracy on every benchmark.
G.2 ACCEPTED CANDIDATE TRAJECTORIES DURING TRAINING
To measure how often continuations supply the trajectories used for training, we count all-failure groups that accept at least one candidate trajectory. Reference fallback is excluded from this count.
| Model | Method | AIME24 | AIME25 | AIME26 | HMMT_Feb | HMMT_Nov | Avg. |
|---|---|---|---|---|---|---|---|
| Qwen3-4B | Reference insertion | 70.00 | 60.00 | 63.33 | 43.33 | 46.67 | 56.67 |
| Resampling | 76.67 | 63.33 | 63.33 | 43.33 | 53.33 | 60.00 | |
| w/o weighting | 76.67 | 70.00 | 66.67 | 50.00 | 53.33 | 63.33 | |
| ARG | 80.00 | 73.33 | 73.33 | 43.33 | 66.67 | 67.33 | |
| Qwen3-8B | w/o weighting | 83.33 | 70.00 | 66.67 | 50.00 | 50.00 | 64.00 |
| ARG | 83.33 | 73.33 | 73.33 | 56.67 | 63.33 | 70.00 |
Table 8. Benchmark-level ablation results in pass@12 percentages. Avg. is the mean over benchmarks. Here w/o weighting denotes ARG without surprisal weighting.
| Model | Method | AIME24 | AIME25 | AIME26 | HMMT_Feb | HMMT_Nov | Avg. |
|---|---|---|---|---|---|---|---|
| Qwen3-4B | Reference insertion | 36.67 | 34.17 | 34.17 | 17.78 | 19.44 | 28.44 |
| Resampling | 44.44 | 35.56 | 40.00 | 21.67 | 28.33 | 34.00 | |
| w/o weighting | 43.61 | 40.83 | 39.17 | 21.39 | 28.33 | 34.67 | |
| ARG | 52.50 | 46.67 | 46.39 | 26.94 | 33.06 | 41.11 | |
| Qwen3-8B | w/o weighting | 45.28 | 33.89 | 38.33 | 18.33 | 23.61 | 31.89 |
| ARG | 55.28 | 46.94 | 46.39 | 27.22 | 35.56 | 42.28 |
Table 9. Benchmark-level ablation results in avg@12 percentages, computed from the same scored responses as Table 8. Avg. is the mean over benchmarks.
Figure 2 reports the proportion in consecutive windows of 50 training steps, using the total group counts within each window. Each curve describes the all-failure questions encountered in its own training run.

(a) Qwen3-4B resampling

(b) Qwen3-8B surprisal weighting
Figure 2. Proportion of all-failure groups that accept candidate trajectories. A point at step s aggregates steps s - 49 through s. Reference fallback is excluded. The curves come from their respective training runs.
On Qwen3-4B, the proportion increases from 59.4% to 71.8% for ARG across the first and last windows, while resampling decreases from 37.6% to 26.4%. Over the full runs, ARG accepts candidate trajectories in 318 of 482 all-failure groups and uses reference fallback in the remaining 164. Resampling accepts candidate trajectories in 145 of 446 all-failure groups, leaving the remaining 301 unchanged. Resampling retains all correct candidate trajectories. Both methods use eight continuations per all-failure group, and ARG also uses reference guidance and fallback.
The weighting ablation gives a different comparison. On Qwen3-8B, it accepts candidate trajectories in 64.8% of all-failure groups, compared with 60.2% for ARG, despite its lower evaluation scores. On Qwen3-4B, these proportions are similar at 65.9% and 66.0%. Thus, the proportion of groups that accept candidate trajectories alone does not explain the evaluation results.
G.3 SURPRISAL WEIGHTING AND PREFIX SELECTION
The weighting ablation uses the successful replacement indicator as feedback, while retaining the same guidance levels, prefix construction, selector hyperparameters, and acceptance rule. Figure 3 compares the resulting selection probabilities. On Qwen3-4B, both selectors favor for most of training. On Qwen3-8B, the unweighted selector favors throughout training, whereas the probabilities under ARG change more over time. The final probabilities under ARG are 49.0% for and 34.6% for , compared with 6.8% and 86.4% without weighting.

(a) Qwen3-4B ARG

(b) Qwen3-4B w/o weighting

(c) Qwen3-8B ARG

(d) Qwen3-8B w/o weighting
Figure 3. Selection probabilities of the prefix selector with and without surprisal weighting. Curves show the state after each training step without smoothing. Steps with no selector update retain the previous probabilities. The level uses an empty prefix, while smaller levels leave less of the reference surprisal to the continuation.
H TRAINING DYNAMICS
We supplement Section 5.4 with the corresponding analysis on Qwen3-4B and the sources of accepted trajectories for both models. Comparisons with the ablated methods appear in Appendix G.
H.1 SUCCESSFUL REPLACEMENT, FEEDBACK, AND PREFIX SELECTION
Figure 4 reports successful replacement rates, mean selector feedback, and prefix selection on Qwen3-4B. As in the Qwen3-8B plots, each point in the first two panels uses all continuations sampled at that level within a window of 50 training steps. Successful replacement requires a correct candidate trajectory different from the reference. We compute with the actual after prefix-boundary adjustment, including zero feedback from failures and exact reference copies. The third panel shows the selection probabilities after each training step without smoothing.
The level has the highest successful replacement rate in each window. Weighting reduces its advantage over , and their mean-feedback ordering varies across windows. Over the full run, the mean feedback is 0.0754 for and 0.0588 for . These observations accompany the persistent preference for shown in Figure 4(c).

(a) Successful replacement

(b) Selector feedback

(c) Prefix selection
Figure 4. Training dynamics of a Qwen3-4B ARG run. In panels (a) and (b), a point at step s averages the continuations at each level from steps s - 49 through s. Panel (c) shows the selection probabilities after each training step without smoothing. The colors and corresponding axis ranges match Figure 1.
The windowed statistics summarize continuations collected as the policy, the all-failure questions, and the selection probabilities change. Since the selector updates sequentially from these continuations, its state reflects their order and the preceding updates. Steps with no selector update retain the previous probabilities. This gives a view of the feedback observed during training alongside the resulting selection history.
H.2 SOURCES OF ACCEPTED TRAJECTORIES
Figure 5 records which trajectories enter policy learning. We call a candidate trajectory guided if it comes from a nonempty prefix and unguided if it comes from the empty prefix. Each all-failure group belongs to one of four categories, according to whether it accepts only guided candidate trajectories, only unguided ones, both types, or the reference as fallback. Thus, the figure describes groups, with each group counted once even when it accepts multiple trajectories.

(a) Qwen3-4B

(b) Qwen3-8B
Figure 5. Sources of accepted trajectories among all-failure groups in consecutive windows of 50 training steps. The mixed category contains groups that accept both guided and unguided candidate trajectories. Fallback supplies the complete reference when no candidate trajectory is accepted. Counts below the windows give the number of all-failure groups.
Candidate trajectories are accepted in 66.0% and 60.2% of all-failure groups for Qwen3-4B and Qwen3-8B, respectively. The remaining groups use reference fallback. Most groups that accept candidate trajectories use guided ones, while a smaller fraction accept unguided ones. Fallback remains present throughout training, and its proportion varies across windows as the all-failure questions change. These records complement the selection curves by showing the trajectories used for the policy updates.