# Reuse your FLOPs: Scaling RL on Hard Problems by Conditioning on Very Off-Policy Prefixes

PrefixRL trains on hard problems by conditioning on old correct traces

Amrith Setlur, Zijian Wang, Andrew Cohen, Paria Rashidinejad, Sang Michael Xie · arXiv · 2026-1-26

- **Problem** On hard problems, on-policy RL rarely samples a correct trace, so the advantage and gradient vanish and learning stalls.
- **Method** PrefixRL appends a prefix of an old correct trace to each problem and runs on-policy RL to finish it, without training on the trace tokens.
- **Results** On hard reasoning problems, PrefixRL reaches the same training reward 2× faster than SFT followed by RL, counting rejection-sampling compute.

## Why on-policy RL stalls on hard problems

On-policy RL recipes sample multiple reasoning traces from the current model and update from the correct and incorrect ones. That works while the model sometimes succeeds, but on hard problems with pass@2k near zero the model rarely samples a correct trace. The group baseline subtracts the mean reward of the n samples from each sample's reward, so when all n samples fail, the advantage is zero.

With zero advantage the gradient vanishes too, so the run keeps spending sampling FLOPs while learning stalls. The paper calls this the stalling regime, and the RL rewards plateau in it.

Earlier runs and inference on previous models often produced a few correct traces for these same hard problems. The open question is how to use those off-policy traces to guide the online RL policy without breaking the on-policy update. The obvious route treats the off-policy traces as supervision, either through SFT as mid-training before RL or through importance-weighted off-policy RL.

Warm-starting RL with SFT boosts pass@1 but collapses entropy, leading to a drop in pass@64 after about 100 RL iterations. Importance-weighted off-policy RL avoids that collapse, but its large-variance or clipped weights yield biased gradients and can be unstable. Both options use off-policy traces as target supervision, and these traces are very low probability under the RL policy, which leads to suboptimal RL optimization.

PrefixRL instead runs on-policy RL conditioned on prefixes of correct off-policy traces, rather than supervising on them. The paper's goal is to place the RL policy in higher-rewarding states, so the learning signal on hard problems is no longer zero.

## PrefixRL: condition on a correct prefix instead of imitating it

PrefixRL builds each training example by appending a prefix of a correct off-policy trace to the original problem. The off-policy traces are not used as targets, so the policy never trains on their tokens. Instead, the policy samples its own continuation after the prefix, and the gradient is masked on the prefix tokens. Because the policy's own samples are the only ones entering the update, the prefix does not impose off-policy supervision on the policy.

The authors run on-policy RL on both the original no-prefix problems and the prefixed problems, as shown in Figure 1. The reward for a prefixed problem is identical to the reward of its no-prefix counterpart. The prefix lengths are chosen so the base LLM still has reasonable accuracy given the prefix. Typically the cut points land on states that reveal a high-level problem-solving strategy the base LLM rarely samples on its own.

Multiple prefixed problems are created for each original problem by choosing multiple prefix lengths.

The PrefixRL objective sums expected reward over the prefixed problems and over the no-prefix problems, and maximizes that total over the policy. The off-policy traces appear only through the prefixes, so the gradient sees only the policy's own samples. The authors note that this objective keeps the target of standard RL, since its optimum on no-prefix problems is preserved.

The off-policy traces come from rejection sampling on the base model until one correct trace is found per problem. If the pass@1 of the base model on a problem is px, one expects about 1/px samples to get a correct trace. This collection step is therefore a real part of the compute budget that PrefixRL reuses.

## What the objective guarantees

The guarantees rest on an assumption that every off-policy trace is correct and that some optimal policy in the class assigns it probability one. The paper states this as realizability: some policy µ can perfectly fit the empirical distribution defined by Doff. In practice, Doff can be curated with inference algorithms that the architecture cannot represent directly, such as scaffolded sequential and parallel compute or oracle access.

So the realizability condition holds in theory, and the authors don't claim it holds exactly for every curated dataset.

Under this assumption, every maximizer of the PrefixRL objective also maximizes the standard objective J(π). The intuition is that a policy good on the original problems should also complete their prefixed versions. Because the prefixes come from correct traces, the two terms in the objective don't conflict at the optimum. The gradients still differ from standard RL, so the training path changes even though the optimum does not.

The sample-cost analysis uses natural policy gradient with a fitted critic, called PrefixRL-NPG. Each iteration fits a critic on N on-policy completions conditioned on the off-policy prefix, then takes a mirror-descent step. The suboptimality bound has an optimization term that shrinks with the number of updates T. Its constant depends on the KL divergence between µ and π0, and for rejection sampling with at most R attempts per problem, the KL is O(log R).

The critic-fitting term shrinks with N and pays no extra shift penalty, because sampling and evaluation share the same prefix reset distribution.

A worst-case construction shows a gap between PrefixRL-NPG and on-policy NPG. Standard NPG is bottlenecked by exponentially rare rewarding traces, while PrefixRL-NPG needs only polynomially many samples. This is an existence result for one reward function and base LLM, not a claim about every setting. The exploration needed for longer prefixes is outsourced to the off-policy prefix, so the policy learns shorter prefixes afterward.

## Back-generalization to unseen no-prefix problems

Training only on prefixed problems still lifts accuracy on no-prefix problems, which the authors call back-generalization. When the training mixture includes relatively short prefixes, the mismatch is moderate. When training is restricted to very long prefixes, the train/test mismatch is severe and the transfer is slower. Even so, longer training of 800 steps still yields measurable no-prefix gains.

![Figure 4: Back-generalization (train/test mismatch):We run RLonlyon prefixed problems where the prefix length of the off-policy trace lies in the shaded interv…](https://refivu.com/papers/d4a1b78f-9bc4-44e1-9097-37e1d659b65f/figures/figure-9d3021b4bbf9f19c58fcdd69119bbcfb.png?thumb=512)

**Figure 4** Back-generalization (train/test mismatch):We run RLonlyon prefixed problems where the prefix length of the off-policy trace lies in the shaded interval. We evaluate different RL training checkpoints across the full range of prefix lengths, including no-prefix problems (0% prefixing). Training on longer prefixes improves performance on shorter prefixes and can eventually improve no-prefix, indicating back-generalization (a,b). When training uses very long prefixes only there is a severe train/test mismatch, and back-generalization to no-prefix problems takes more training steps (c).

[Original paper](https://arxiv.org/abs/2601.18795v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

The authors then ask whether the policy simply copies the strategy written in the prefix. On two hard problems, they extract a keyword heuristic for a strategy and track it in three places. The three places are the prefixed problem, the response to the prefixed problem, and the early part of the no-prefix response. Keyword usage in the prefixed and no-prefix responses moves together, even though no-prefix problems are never trained on.

The authors argue that this coupling points to shared internal state representations rather than stitching solutions together. On one problem, the Erdős–Gallai keyword appears in about 90% of prefixed-problem responses at initialization and then decreases over training. Meanwhile, a rare Dirichlet Theorem strategy, under 2% at initialization, is upweighted despite the Erdős–Gallai conditioning.

The authors summarize that PrefixRL can downweight suboptimal strategies and discover new ones.

The in-context test places one problem and its solution trace in the prefix of another problem. When P2 and P3 are related, PrefixRL on P2 given P3 reaches 63% pass@4 on P2 and 60% pass@4 on P3. Standard RL on P2 alone raises pass@4 on P2 only to 18%, with limited transfer to P3. With unrelated problems such as P1 and P3, PrefixRL performs similarly to running RL on each problem alone.

The authors conclude that back-generalization is stronger when the prefixed problem's components are related.

## Compute-matched training and held-out benchmarks

PrefixRL is compared with four baselines: on-policy RL, SFT followed by RL, importance-weighted off-policy RL, and LUFFY. The authors use Llama-3.1-8B as the main RL model, and they also run a second setup with Qwen3-4B-instruct.

Under matched FLOPs, PrefixRL gives an absolute gain of 45% in no-prefix training accuracy for Llama-3.1-8B-instruct. For Qwen3-4B-instruct, the matched-FLOPs gain in no-prefix training accuracy is 30%. Counting the rejection-sampling compute, PrefixRL is about 2× more compute efficient than the strongest baseline, SFT followed by RL. Standard RL and SFT plus RL improve only slowly, even when the number of samples per problem n rises from 8 to 64.

PrefixRL therefore reallocates sampling FLOPs that standard RL would waste on hard problems toward raising training reward.

![Figure 7: Training compute matched evaluation of PrefixRL.Using prefixed-problems sourced by rejection sampling the base model, we run PrefixRL on the dataset…](https://refivu.com/papers/d4a1b78f-9bc4-44e1-9097-37e1d659b65f/figures/figure-ecb7097f7efae387e6f930df50f49669.png?thumb=512)

**Figure 7** Training compute matched evaluation of PrefixRL.Using prefixed-problems sourced by rejection sampling the base model, we run PrefixRL on the dataset of hard training problems (low pass rate under the base model) and measure accuracy on the no-prefix training problems for (Left) Llama-3.1-8b-instruct and (Right) Qwen-3-4b-instruct. Even accountingfortheinitialcomputespentonrejectionsampling(shadedblueregion),PrefixRLimprovescompute-efficiency by 2×over the strongest baseline with and an absolute gain of 45% with Llama and 30% with Qwen.

[Original paper](https://arxiv.org/abs/2601.18795v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Amrith Setlur, Zijian Wang, Andrew Cohen, Paria Rashidinejad, Sang Michael Xie · Reuse your FLOPs: Scaling RL on Hard Problems by Conditioning on Very Off-Policy Prefixes · Original paper figure · Extracted the figure area from page 8 of the original PDF.

The authors check that the baselines are not degenerate, since the iteration-matched curves show stable training for each method. Figure 8 reports held-out pass@k on AIME 2025, HMMT Feb 2025 and IMO-AnswerBench for the distilled Llama-3.1-8B model. PrefixRL improves pass@k by over 10% absolute over the baselines for k up to 64, including off-policy RL and LUFFY.

The authors read these small-k gains as evidence that the model more often starts from the right high-level plan. The gap over the baselines widens with k, reaching 18 points at k=8 and 28 points at k=64 on AIME 2025.

The authors also report that PrefixRL keeps raising pass@32 over training, while the baselines largely saturate. When prefixes come from Qwen3-4B-instruct instead of Llama, PrefixRL on Llama is about as effective on hard train and test problems. The Llama base model needed more initial compute to collect its own prefixes, which accounts for most of the gap between the curves.

## Why training is steadier than off-policy RL

PrefixRL keeps much of its token-level entropy even though it draws on off-policy prefixes. The authors read this as RL mostly sharpening a distribution over traces the base model can already sample.

PrefixRL has a much lower fraction of all-negative prompt batches on no-prefix problems than on-policy RL. An all-negative batch means every sampled trace for a problem gets zero reward, so the advantage is zero. The authors attribute the drop to the policy moving into states where non-zero advantages are reachable. Responses to no-prefix problems also get shorter, and the authors tie this to correct traces being shorter.

The authors call this shortening one route to lower gradient variance and better compute efficiency.

Importance-weighted off-policy RL shows a gradient norm spike, which the authors treat as a sign of instability. Its gradient variance is much higher than that of standard RL and PrefixRL. Token-level weights can be as small as 10−3, which shrinks the expected gradient until the spike. PrefixRL samples fewer tokens, and its prefixes move the policy into higher-advantage states.

The result is a higher gradient norm and lower variance, so PrefixRL has a better signal-to-noise ratio.

![Figure 12: PrefixRL signal-to-noise ratio and safely training on off-policy suffixes.PrefixRL simultaneously has higher gradient norm (left) and lower gradient…](https://refivu.com/papers/d4a1b78f-9bc4-44e1-9097-37e1d659b65f/figures/figure-48d9c6bb086534519f1f1763e6ca1056.png?thumb=512)

**Figure 12** PrefixRL signal-to-noise ratio and safely training on off-policy suffixes.PrefixRL simultaneously has higher gradient norm (left) and lower gradient variance (right) than both standard RL and importance-weighted off-policy RL. For off-policyRLinparticular, theimportanceweightingcausesthegradientvariancetobemuchhigherandcausesagradient norm spike, which is a sign of training instability. PrefixRL avoids these issues while still leveraging off-policy data.

[Original paper](https://arxiv.org/abs/2601.18795v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)

## Limits and open questions

PrefixRL's guarantees depend on the off-policy prefixes being correct and realizable by a policy in the model class. In the worst case, uninformative prefixes lead PrefixRL back to standard on-policy RL. The paper's separation result shows that NPG can be bottlenecked by exponentially rare rewarding traces, while PrefixRL-NPG needs only polynomial samples.

That separation is a worst-case construction, so it doesn't measure how often real hard problems look like it.

The main experiments cover two models, Llama-3.1-8B-instruct and Qwen3-4B-instruct, and math reasoning benchmarks. They didn't test generality to other domains such as coding, so the gains aren't shown beyond math. The authors state that the mechanisms behind back-generalization are not fully understood. Their working explanation is shared parameters that change the next-token distribution on prefixes the model never trained on.

The in-context setup supports this explanation with only a few problem pairs, so the mechanism isn't pinned down.

## Paper info

- **Authors**: Amrith Setlur, Zijian Wang, Andrew Cohen, Paria Rashidinejad, Sang Michael Xie
- **Venue**: arXiv · Preprint
- **First published**: 2026-1-26
- **Added**: 2026-10-30
- **Updated**: 2026-2-3
- **Version**: v2
- **arXiv**: 2601.18795
- **Category**: cs.LG · cs.AI · cs.CL
- **Original paper terms**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **What we show**: Paper info, commentary and permitted figures from the original paper

[Original paper ↗](https://arxiv.org/abs/2601.18795v2) · [PDF ↗](https://arxiv.org/pdf/2601.18795v2)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Abstract

Typical reinforcement learning (RL) methods for LLM reasoning waste compute on hard problems, where correct on-policy traces are rare, policy gradients vanish, and learning stalls. To bootstrap more efficient RL, we consider reusing old sampling FLOPs (from prior inference or RL training) in the form of off-policy traces. Standard off-policy methods supervise against off-policy data, causing instabilities during RL optimization. We introduce PrefixRL, where we condition on the prefix of successful off-policy traces and run on-policy RL to complete them, side-stepping off-policy instabilities. PrefixRL boosts the learning signal on hard problems by modulating the difficulty of the problem through the off-policy prefix length. We prove that the PrefixRL objective is not only consistent with the standard RL objective but also more sample efficient. Empirically, we discover back-generalization: training only on prefixed problems generalizes to out-of-distribution unprefixed performance, with learned strategies often differing from those in the prefix. In our experiments, we source the off-policy traces by rejection sampling with the base model, creating a self-improvement loop. On hard reasoning problems, PrefixRL reaches the same training reward 2x faster than the strongest baseline (SFT on off-policy data then RL), even after accounting for the compute spent on the initial rejection sampling, and increases the final reward by 3x. The gains transfer to held-out benchmarks, and PrefixRL is still effective when off-policy traces are derived from a different model family, validating its flexibility in practical settings.

## Quote from the paper

Amrith Setlur, Zijian Wang, Andrew Cohen, Paria Rashidinejad, Sang Michael Xie (2026). Reuse your FLOPs: Scaling RL on Hard Problems by Conditioning on Very Off-Policy Prefixes. arXiv:2601.18795v2. https://arxiv.org/abs/2601.18795v2

**BibTeX**

```
@misc{setlur2026reuse,
  title = {{Reuse your FLOPs: Scaling RL on Hard Problems by Conditioning on Very Off-Policy Prefixes}},
  author = {Amrith Setlur and Zijian Wang and Andrew Cohen and Paria Rashidinejad and Sang Michael Xie},
  year = {2026},
  eprint = {2601.18795},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2601.18795v2}
}
```

## Other paper commentary

- [Reinforcement Learning via Self-Distillation](https://refivu.com/en/papers/020d237b-90b6-4f93-9da6-e25bde98d4ec-reinforcement-learning-via-self-distillation.md)
- [To the Max: Reinventing Reward in Reinforcement Learning](https://refivu.com/en/papers/03998282-c5e6-4ef1-816e-db0cf7914a6b-to-the-max-reinventing-reward-in-reinforcement-learning.md)
- [Scaling Properties of Same-Family On-Policy Distillation](https://refivu.com/en/papers/7b699d2e-a190-46ef-9b5a-a697444431cd-scaling-properties-of-same-family-on-policy-distillation.md)
- [Soft Actor-Critic: Off-Policy Maximum Entropy Deep Reinforcement Learning with a Stochastic Actor](https://refivu.com/en/papers/ea8ec555-d426-4464-bcf3-677288c80a9c-soft-actor-critic-off-policy-maximum-entropy-deep.md)
- [Asynchronous Methods for Deep Reinforcement Learning](https://refivu.com/en/papers/39f3326a-859f-4ab8-9bdb-14644a9778e1-asynchronous-methods-for-deep-reinforcement-learning.md)
- [Continuous control with deep reinforcement learning](https://refivu.com/en/papers/4a1a35c3-732d-4750-869f-588d477a2492-continuous-control-with-deep-reinforcement-learning.md)
- [Learning to Discover at Test Time](https://refivu.com/en/papers/16b1e431-51ac-4e6b-a951-6aa5a5c017bb-learning-to-discover-at-test-time.md)
- [The Geometry of Refusal in Large Language Models: Concept Cones and Representational Independence](https://refivu.com/en/papers/fd13f7d8-7e4a-4bc8-9f04-ace7e79ab349-the-geometry-of-refusal-in-large-language-models.md)
- [Evolution Strategies at the Hyperscale](https://refivu.com/en/papers/77d44b80-fbe4-419d-a33e-e5ab69fb2914-evolution-strategies-at-the-hyperscale.md)
- [Transformers Provably Learn Algorithmic Solutions for Graph Connectivity, But Only with the Right Data](https://refivu.com/en/papers/b23c33ef-4b87-4e29-a0da-332c5c52f7a4-transformers-provably-learn-algorithmic-solutions-for-graph.md)
- [A unified framework for learning with nonlinear model classes from arbitrary linear samples](https://refivu.com/en/papers/cd3c393f-7a82-47bc-9d3e-9770cfc27865-a-unified-framework-for-learning-with-nonlinear-model.md)
- [Exploration Hacking: Can LLMs Learn to Resist RL Training?](https://refivu.com/en/papers/dbeab130-4e4c-4074-9b9a-cf61e193e4fb-exploration-hacking-can-llms-learn-to-resist-rl.md)

## Terms in this paper

- [Llama-3.1-8B-Instruct](https://refivu.com/en/terms/0abd12a34f8f-llama-3-1-8b-instruct)
- [rejection sampling](https://refivu.com/en/terms/40f65d094f14-rejection-sampling)
- [Gradient Norm](https://refivu.com/en/terms/ae6e90f81977-gradient-norm)
- [IMO-AnswerBench](https://refivu.com/en/terms/4ae87e1bec3e-imo-answerbench)
- [natural policy gradient](https://refivu.com/en/terms/9baf1b6e45c5-natural-policy-gradient)
- [Qwen3-4B-instruct](https://refivu.com/en/terms/7fa0c60557e9-qwen3-4b-instruct)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/d4a1b78f-9bc4-44e1-9097-37e1d659b65f-reuse-your-flops-scaling-rl-on-hard-problems)
