TL;DR
Reinforced Fine-Tuning (ReFT) enhances LLM reasoning via verifiable rewards, but generating multiple rollout trajectories during training incurs massive computational overhead. Nested-ReFT accelerates this process by generating training rollouts from a cheaper, "nested" behavior model created through dynamic layer skipping. Paired with importance-weight truncation (such as Retrace-$\lambda$), Nested-ReFT achieves linear speedups in rollout generation while preserving the reasoning performance of the full target model.
What Problem Does This Paper Address?
Reinforcement learning fine-tuning with verifiable rewards (ReFT)—exemplified by methods like DeepSeek's GRPO—has become the standard recipe for training LLMs on math and code reasoning. Unlike RLHF, ReFT skips the memory footprint of a learned reward model by using deterministic verifiers (e.g., checking if the final answer matches ground truth).
However, ReFT introduces a major computational bottleneck: the policy must auto-regressively generate multiple rollout completions per prompt during training. Standard implementations use the target LLM itself (from the previous step) as the behavior policy, meaning rollout generation uses the exact same compute as full inference. When generating dozens of long reasoning traces, sampling cost dominates wall-clock training time.
Methods
Nested-ReFT addresses this by turning the rollout generation step into an off-policy RL problem using a compressed, "nested" behavior policy.
[Target Model π_θ (Full Layers)]
│
Dynamic Layer Skipping (Uniform sampling of valid layers)
▼
[Nested Behavior Policy η'_s (Fewer Layers)]
│
Generates rollouts faster (reduced forward-pass compute)
│
Scored by Verifier / Reward Function
│
Importance Sampling Adjustment (Retrace-λ / Truncation)
▼
[Target Model Updated via Policy Gradient (e.g., GRPO)]
- Stochastic Layer Skipping: At each gradient step $s$, the behavior model $\eta'_s$ is formed by skipping a user-specified fraction of transformer layers $x \in \{5\%, 10\%, 15\%\}$. To avoid disrupting initial embeddings and final predictions, a border parameter ($b = 1$) protects the very first and last layers from being skipped. The remaining layers to skip are sampled uniformly at random per step, creating a stochastic ensemble of nested behavior policies.
- Taming Off-Policy Variance: Because rollouts come from a layer-skipped behavior model $\eta'_s$ rather than the current target policy $\pi_\theta$, importance sampling ratios $h(\hat{y}, x) = \frac{\pi_\theta(\hat{y}|x)}{\eta'_s(\hat{y}|x)}$ are needed to correct the distribution shift. To prevent high variance and training instability, the authors evaluate three stabilization variants:
- Base: Unclipped importance sampling ratio.
- Practical: Setting the ratio $h_1 = 1$ (relying purely on SGD robustness).
- Retrace-$\lambda$: Truncating the ratio via $h_\lambda = \lambda \min(1, h_{\text{base}})$.
- Theoretical Soundness: The authors prove that an ensemble of nested policies generates an unbiased policy gradient estimate whose variance is bounded under importance weight clipping.
Datasets
- Training / Fine-Tuning Datasets:
- SVAMP
- GSM8K
- Math12k (Models undergo 2 epochs of SFT warm-up, followed by 99 ReFT gradient steps).
- Evaluation Benchmarks:
- Evaluated on 5 math reasoning benchmarks: AIME2024, AMC, MATH500, Minerva, and OlympiadBench using strict greedy/pass@1 accuracy ($K=1$).
- No new benchmarks were created.
Key Insights and Ideas
- Inference-Time Tricks at Train-Time: While layer skipping and nested sub-networks have traditionally been used to accelerate test-time speculative decoding, applying them inside the training loop as an off-policy rollout generator is an intuitive way to bypass the sampling bottleneck.
- Reasoning Tolerates Moderate Off-Policyness: Even though layer-skipped models output degraded representations, the trajectories they produce remain structurally coherent enough for verifiable reward scoring to guide the full target model effectively.
- Importance Weight Clipping is Critical: Unclipped importance weights (Base) frequently produced worst-case stability drops, while the "Practical" heuristic ($h=1$) occasionally achieved high peak performance but was unpredictable. Retrace-$\lambda$ offered the highest stability across model sizes and datasets (achieving zero worst-case performance drops).
Key Results
Experiments were conducted on Qwen2.5-Math-Instruct (1.5B and 7B parameters):
- Linear Efficiency Gains: Total training runtime decreased and token generation throughput (tokens/sec) scaled linearly with the layer-skipping ratio $x$ across all configurations.
- Preserved Accuracy: Off-policy rollouts caused minimal performance variation compared to full ReFT baselines (fluctuations stayed within $\pm 2.6$ percentage points across benchmarks).
- Occasional Improvements: On the 1.5B model, using nested rollouts actually yielded modest accuracy gains over the standard ReFT baseline (e.g., up to $+0.026$ absolute accuracy on Math12k).
Limitations and Future Work
- Fixed Completion Lengths: In training experiments, rollout lengths were artificially capped and padded to a fixed 256 tokens. In real-world reasoning tasks, LLMs produce variable-length reasoning chains; how layer skipping interacts with dynamic chain-of-thought length remains an open question.
- Uniform Random Skipping: The method drops layers uniformly at random (aside from border layers). A learned or task-adaptive skipping schedule could yield better rollout quality.
- Limited Exploration of Scale: The maximum skipping ratio tested was 15%, leaving open how aggressively depth or width can be pruned before policy divergence degrades final reasoning performance.
Summary updated