arXiv:2610.11128cs.AIOct 2026

Manuscript Offprint

arXiv:2610.11128

Balancing Reference Guidance and Free Generation in Trajectory Rollouts for Reasoning RL

Hanyu Wang, Nakul Agarwal, Hossein Nourkhiz Mahjoub, Ehsan Moradi Pari, Makoto Fukushima, Jinghui Chen, Vaishnav Tadiparthi

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 dtStd_t S_t increases, up to a small bounded term. Here dtd_t is the probability that the model follows the reference's prefix to generate a successful trajectory, and StS_t is the negative log probability of the remaining reference given the prefix. Intuitively, dtd_t reflects how much the prefix helps the model succeed, while StS_t indicates how unfamiliar the reference suffix is. Moreover, dtStd_t S_t captures both sides of the trade-off. A longer prefix tends to increase dtd_t, since more guidance makes success more likely, but it decreases StS_t, since less of the reference is left.

As a result, a good prefix should maximize dtStd_t S_t. However, dtd_t 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.