Read the Trace, Steer the Path: Trajectory-Aware Reinforcement Learning for Diffusion Language Models

Anant Khandelwal, Manish GuptaarXiv 2026

TL;DR

Reinforcement learning for Diffusion Large Language Models (dLLMs) typically forces a choice between cheap but coarse "flat" rollouts and precise but computationally expensive "tree" searches. This paper introduces CAPR (Cached-Amortized Path Refinement), a novel RL algorithm that extracts fine-grained supervision directly from a dLLM's internal denoising trace. By caching intermediate states, steering generation, and utilizing a block critic, CAPR achieves state-of-the-art reasoning performance while cutting compute costs to less than a third of tree-based methods.

What Problem Does This Paper Address?

Diffusion LLMs (dLLMs) generate text differently than standard autoregressive models; they iteratively unmask and refine tokens in parallel across multiple denoising steps. This parallel generation leaves behind a rich "denoising trace" showing exactly when the model becomes confident about specific tokens and where it continues to oscillate.

Figure 1: The denoising trace contains information that current RL methods do not use. Left: each masked position has a sequence of provisional predictions however stable and confident positions can be separated from positions that keep changing. Right: prior dLLM-RL methods occupy two extremes of the cost–granularity plane. Flat rollouts are cheap but give one scalar advantage per trajectory, d-TreeRPO (Pan et al., 2026) pays tree-expansion cost for a small number of segment-level advantages. The approach introduced in this paper named, CAPR, uses the trace to obtain per-block advantages at roughly 0.75× flat-rollout cost.

However, current RL post-training methods struggle to use this signal efficiently. They generally fall into two extremes:

  1. Flat rollouts: Cheap to compute, but they assign a single final reward to the entire generation sequence, blinding the model to which specific step or block was actually helpful.
  2. Tree rollouts: Fork multiple alternative paths to find local advantages, providing high-granularity feedback but suffering from exponential compute costs.

The authors tackle this efficiency-granularity trade-off, asking if the denoising trace itself can provide tree-like supervision without the massive computational overhead of full tree expansion.

Methods

The authors propose CAPR, an RL algorithm designed for block-based dLLMs that operates via three main mechanisms:

Figure 2: Overview of CAPR. (a) Trace State / Cache & Steer: CAPR summarizes per-position confidence, entropy, and stability into a path state, then uses it to steer the next reverse step while carrying only the previous clean-token prediction and path state. (b) Branch & Prune: a shared denoising prefix is forked once at the branch step, and siblings are kept by path-state quality. (c) Block Critic: a value head reads block-boundary states and converts the final reward into per-block PPO weights. Self-distillation uses solved rollouts as supervised targets so zero-variance groups still provide learning signal.
  • Cache & Steer: CAPR tracks token confidence, entropy, and stability at each denoising step, compressing this information into a compact "path state" using a GRU-style update. This path state dynamically steers the next step's logits—reinforcing stable token commitments and damping unstable oscillations.
  • Branch & Prune: At the midpoint of the denoising trajectory, CAPR forks a small number of Gumbel-perturbed sibling continuations from a cached prefix. It periodically prunes lower-quality branches based on their path-state scores, preventing full tree expansion.
  • Block Critic: A lightweight value head reads the path state at block boundaries, redistributing the final sparse reward into granular, block-level PPO weights based on how many tokens were revealed in each block.

Additionally, CAPR incorporates self-distillation on solved rollouts to maintain a learning signal even when rollout variance drops, alongside a one-sided $\chi^2$ regularizer to prevent destabilizing token-level log-ratio spikes. Crucially, all these mechanisms are training-only; the extra value heads and path states are discarded at deployment, resulting in zero inference overhead.

Datasets

CAPR was evaluated on four verifiable reasoning benchmarks:

  • 4x4 Sudoku: An exact constraint satisfaction task.
  • Countdown: A task requiring the generation of arithmetic expressions to match a target number.
  • GSM8K: Grade school math word problems.
  • Math500: A subset of challenging mathematical reasoning problems.

These tasks were tested across both dense (LLaDA-8B-Instruct) and mixture-of-experts (LLaDA-MoE-7B-A1B-Instruct) backbones.

Key Insights and Ideas

  • The Trace is a Free Tree: The internal dynamics of a dLLM's denoising process (stability vs. oscillation) inherently contain the structural information that explicit tree-search methods try to uncover by branching.
  • Local Exploration via Caching: Caching the mid-trajectory prefix allows the model to explore alternative suffixes ("siblings") extremely cheaply, bypassing the need for full forward passes from scratch.
  • Credit Assignment via Block Redistribution: Instead of treating the entire generation as a monolith, the block critic successfully localizes sparse rewards to the specific blocks where critical tokens were actually unmasked and stabilized.

Key Results

  • Drastic Compute Reductions: CAPR reduces rollout generation costs to roughly 0.75x of flat rollouts and 0.6x of tree rollouts. On 4x4 Sudoku, it matches the accuracy of the strongest tree baseline (d-TreeRPO) while requiring less than one-third of the per-step wall-clock compute time (165 seconds vs 596 seconds).
  • New State-of-the-Art: Across all four reasoning benchmarks at both 256- and 512-token budgets, CAPR sets a new SOTA for RL-tuned dLLMs. For instance, on the MoE backbone for Sudoku ($L=256$), CAPR achieves an accuracy of 84.8%, outperforming d-TreeRPO (78.3%) by 6.5 percentage points.
  • Robust Transferability: The exact same training recipe successfully transfers from dense backbones to sparse-MoE backbones without task-specific retuning.

Limitations and Future Work

  • Verifiable vs. Open-Ended Tasks: CAPR was only evaluated on tasks with automatically checkable, objective rewards (math and logic puzzles). Its performance on open-ended generation, dialogue safety, or noisy preference-based objectives remains unproven.
  • Long Reasoning Chains: The online block critic might become less reliable for exceptionally long generation budgets or complex tasks with highly delayed subgoals.
  • Architecture Specifics: The method was exclusively validated on the LLaDA family of masked dLLMs; adapting it to other diffusion architectures might require retuning hyperparameters like block size and branch fractions.

Summary updated

BibTeX
@misc{khandelwal2026read,
  author = {Anant Khandelwal and Manish Gupta},
  title = {{Read the Trace, Steer the Path: Trajectory-Aware Reinforcement Learning for Diffusion Language Models}},
  year = {2026},
  eprint = {2606.04396},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2606.04396},
}
Figure