Blockwise SFT for Diffusion Language Models: Reconciling Bidirectional Attention and Autoregressive Decoding

Bowen Sun, Yujun Cai, Ming-Hsuan Yang, Yiwei Wang
8/27/2025
cs.CL

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Discrete diffusion language models have shown strong potential for text generation, yet standard supervised fine-tuning (SFT) misaligns with their semi-autoregressive inference: training randomly masks tokens across the entire response, while inference generates fixed-size blocks sequentially. This mismatch introduces noisy prefixes and leaky suffixes, biasing gradients away from the desired blockwise likelihood. We propose Blockwise SFT, which partitions responses into fixed-size blocks, selects one active block per step for stochastic masking, freezes all preceding tokens, and fully hides future ones. Loss is computed only over the active block, directly mirroring the blockwise decoding process. Experiments on GSM8K, MATH, and MetaMathQA show consistent gains over classical SFT under equal compute or token budgets. Block size consistency studies and ablations confirm that improvements stem from faithful training-inference alignment rather than incidental masking effects. Our results highlight the importance of matching supervision granularity to the decoding procedure in diffusion-based language models.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{sun2025blockwise,
  title  = {Blockwise SFT for Diffusion Language Models: Reconciling Bidirectional Attention and Autoregressive Decoding},
  author = {Bowen Sun and Yujun Cai and Ming-Hsuan Yang and Yiwei Wang},
  year   = {2025},
  eprint = {2508.19529},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2508.19529v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2508.19529.svg)](https://codeofpaper.com/paper/2508.19529)

Discussion