Introduction
TraceRL introduces a novel reinforcement learning (RL) framework designed specifically for Diffusion Large Language Models (DLMs). By aligning the training process with the model's actual inference trajectory and introducing a diffusion-based value model, the researchers have developed the "TraDo" series of models. Remarkably, these models significantly outperform larger autoregressive counterparts like Qwen2.5-7B and Llama3.1-8B on complex math and coding tasks.
The Problem: Trajectory Mismatch in DLMs
While standard autoregressive Large Language Models (LLMs) generate text one token at a time, Diffusion Large Language Models (DLMs) generate text by starting with a sequence of "mask" tokens and iteratively refining them into actual words. This approach allows for parallel generation and better global consistency.
However, a major gap exists in how these models are trained after their initial pre-training. Current post-training methods often rely on random masking, which fails to match how the model actually "thinks" during inference—where it unmasks tokens based on confidence. This trajectory mismatch severely limits their reasoning capabilities. Furthermore, applying Reinforcement Learning to diffusion models is notoriously unstable and computationally expensive.
Methods: The TraceRL Framework
To bridge the gap between training and inference, the authors introduce TraceRL, a trajectory-aware RL framework.
Key innovations of TraceRL include:
- Trajectory-Aware Optimization: Instead of training on random masks, TraceRL optimizes the model based on its "preferred inference traces"—the specific sequence of steps the model naturally takes to unmask a response.
- Diffusion-Based Value Model: The researchers developed a token-wise value model that predicts the quality of intermediate steps. This acts as a stabilizer, reducing reward variance by up to 45% and allowing the model to learn from process rewards rather than just the final outcome.
- Shrinkage Parameter ($s$): To make training computationally feasible, TraceRL aggregates multiple inference steps into a single training step, reducing complexity without sacrificing performance.
- Sliced Training: For "block-attention" models that process chunks of text, a novel slicing technique makes training highly parallel and efficient.
Datasets and Evaluation
The models were rigorously trained and evaluated on a suite of reasoning benchmarks. Math training utilized a filtered version of the MATH dataset (8K hard tasks) and OpenThoughts-3 (75K samples for long Chain-of-Thought). Coding training leveraged verified problems from PrimeIntellect, DeepCoder, and OpenCoder. Evaluation spanned MATH500, AIME2024, and GSM8K for mathematics, alongside LiveCodeBench-v2, LiveBench, and MBPP for programming.
Key Insights and Results
The core insight of the paper is that how a model unmasks during training matters just as much as what it unmasks. Training on the model's natural inference path leads to significantly higher accuracy than random masking.
The resulting TraDo models set new standards for open-source diffusion language models:
- Small Models, Big Brains: The framework allows smaller diffusion models to punch way above their weight class. As seen in the performance charts, the TraDo-4B-Instruct model achieved a 5.4% accuracy gain on MATH500, successfully outperforming the 7B-parameter state-of-the-art autoregressive model, Qwen2.5-7B-Instruct.
- Coding Excellence: TraDo-8B-Instruct scored 6.6% higher on LiveCodeBench-V2 than Llama3.1-8B-Instruct.
- The First of its Kind: By combining TraceRL with curriculum learning, the authors created TraDo-8B-Thinking, the first 8B-scale diffusion model capable of "Long Chain-of-Thought" (Long-CoT) reasoning, reaching a staggering 87.4% accuracy on MATH500.
- Efficiency Gains: Beyond accuracy, TraceRL optimization led to a 15.4% speedup in inference for the 4B model, as the model became more "confident" and unmasked more tokens per step (dynamic sampling).
Limitations and Future Work
While diffusion models offer the promise of parallel generation, current open-source infrastructure (like vLLM) is heavily optimized for autoregressive models. Consequently, DLMs can still feel slower in practice due to a lack of mature deployment frameworks. Future work will focus on scaling TraceRL to even larger models and exploring more sophisticated acceleration methods for larger "block sizes" in generation.
Summary updated