TL;DR
RELAY (Learned Relay Representations) solves the "hard reset" problem in Masked Diffusion Models (MDMs) by allowing them to pass continuous latent information between denoising steps. By training this communication channel with truncated backpropagation through time (BPTT), models learn to "think ahead," resulting in significantly better reasoning capabilities and up to a 32% reduction in inference latency.
What Problem Does This Paper Address?
Masked Diffusion Models (MDMs) generate sequences by starting with a "blank canvas" of mask tokens and iteratively filling them in. However, they suffer from a structural inefficiency called the hard reset problem.
In a standard MDM, the model performs a full forward pass, computes complex hidden representations for every position, and then picks a few tokens to "unmask." Crucially, it then discards all those rich internal representations. The next denoising step starts from scratch, seeing only the newly committed discrete tokens. This prevents the model from accumulating "continuous computation"—essentially a latent chain-of-thought—across the generation process. This is particularly damaging for difficult reasoning tasks where the model needs to "plan" its future moves.
Methods
The authors propose RELAY, which augments the MDM state. Instead of just passing the partially unmasked sequence ($x_t$), the model also passes a relay representation ($h_t$):
- Augmented State: At each step $k$, the model takes the current tokens and the relay state from the previous step ($h_{k-1}$).
- Relay Module: A small module ($R_\theta$) projects the previous relay state, which is then added to the token embeddings at the first layer.
- Forward-Thinking Training: Simply passing the state isn't enough; the model must learn to use it. The authors use truncated Backpropagation Through Time (BPTT) with a horizon of $K=2$. This forces the model to produce a relay state at step $k$ that is explicitly optimized to help the model make better predictions at step $k+1$.
- Architecture Agnostic: RELAY is designed to be compatible with modern Diffusion Language Model (DLM) optimizations like KV caching and block-based parallel decoding.
Datasets
The paper evaluates RELAY across two distinct scales:
- Sudoku-Extreme: A challenging reasoning benchmark. The authors released a derived version of this dataset that includes step-by-step solver trajectories and deduction strategies to analyze how the model solves the puzzles.
- LLM Scale (Fast-dLLM v2 1.5B): To test real-world performance, they adapted a state-of-the-art 1.5B parameter DLM using a 60,000-example mixture of OpenCodeInstruct and OpenMathInstruct-2.
- Evaluation: Performance was measured on standard coding benchmarks: HumanEval(+) and MBPP(+).
Key Insights and Ideas
- The Power of Continuity: Passing continuous hidden states is far more informative than just passing discrete tokens. It allows the model to maintain "uncertain" or "intermediate" thoughts that haven't been committed to text yet.
- BPTT is the Secret Sauce: The authors found that just piping the states forward (with a stop-gradient) helps, but training end-to-end with BPTT provides a much larger boost. It teaches the model to "save its work" for the next step.
- Efficiency Paradox: You might expect BPTT to double the memory requirements during training. However, because RELAY allows for smaller batch sizes (by avoiding the "batch doubling" trick used in standard MDM training), the peak GPU memory usage remains nearly identical to vanilla supervised fine-tuning.
- Self-Consistency: In Sudoku tasks, RELAY models were significantly more likely to keep the board "legal" (no rule violations) during intermediate steps compared to baselines.
Key Results
- Better Accuracy, Lower Latency: On the HumanEval coding benchmark, RELAY outperformed standard supervised fine-tuning (SFT) in accuracy while requiring 32% fewer denoising steps (88.3 vs 130.7 NFEs).
- Pareto Frontier Shift: Across both Sudoku and coding tasks, RELAY consistently pushed the "accuracy-vs-latency" frontier outward. At any given speed, RELAY is more accurate; at any given accuracy level, RELAY is faster.
- Sudoku Success: On the "deduction-only" Sudoku cohort, RELAY achieved a 76.4% exact match rate, a massive jump over the 32.2% achieved by standard Masked Language Modeling (MLM) baselines.
Limitations and Future Work
- Training Time: While memory-efficient, training with BPTT is still more computationally expensive per-step than standard training. The authors argue this is a "buy-now, save-later" trade-off, as it pays off during inference.
- Interpretability: The "relay" is a black-box vector. Future work could involve probing these representations to see if we can "steer" the model's reasoning mid-generation.
- Beyond Text: The relay mechanism is architecture-agnostic. A natural next step is applying it to other discrete diffusion domains, such as image generation or molecular modeling, where iterative refinement is also standard.
Summary updated