Saber: An Efficient Sampling with Adaptive Acceleration and Backtracking Enhanced Remasking for Diffusion Language Model

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Dong, Yihong, Ma, Zhaoyu, Jiang, Xue, Fan, Zhiyuan, Qian, Jiaru, Li, Yongmin, Xiao, Jianha, Jin, Zhi, Cao, Rongyu, Li, Binhua, Huang, Fei, Li, Yongbin, Li, Ge
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918472366161920
author Dong, Yihong
Ma, Zhaoyu
Jiang, Xue
Fan, Zhiyuan
Qian, Jiaru
Li, Yongmin
Xiao, Jianha
Jin, Zhi
Cao, Rongyu
Li, Binhua
Huang, Fei
Li, Yongbin
Li, Ge
author_facet Dong, Yihong
Ma, Zhaoyu
Jiang, Xue
Fan, Zhiyuan
Qian, Jiaru
Li, Yongmin
Xiao, Jianha
Jin, Zhi
Cao, Rongyu
Li, Binhua
Huang, Fei
Li, Yongbin
Li, Ge
contents Diffusion language models (DLMs) are emerging as a compelling alternative to the dominant autoregressive paradigm, offering inherent advantages in parallel generation and bidirectional context modeling. However, for the tasks with strict structural constraints such as code generation, DLMs face a critical trade-off between inference speed and output quality, where accelerating generation by reducing sampling steps often leads to catastrophic performance collapse. We find that the fundamental reasons are: 1) the generation difficulty is non-uniform in the structured sequence decoding steps, making DLM's static acceleration strategy suboptimal; 2) the context of tokens generated by DLM evolves continuously, causing early high-confidence predictions to turn into irreversible errors. In this paper, we introduce efficient Sampling with Adaptive acceleration and Backtracking Enhanced Remasking (i.e., Saber), a novel training-free sampling algorithm for DLMs that first achieves both better inference speed and output quality in code generation. Saber dynamically adjusts the number of tokens unmasked per step based on the model's evolving confidence, and utilizes a backtracking mechanism to revert tokens whose confidence drops as new context emerges, with its effectiveness supported by theoretical analysis. Extensive experiments on multiple mainstream code generation benchmarks show that Saber boosts Pass@1 accuracy by an average of 1.9\% over mainstream DLM sampling methods, while achieving an average 251.4\% inference speedup. By leveraging the inherent advantages of DLMs, our work significantly narrows the performance gap with autoregressive models in code generation.
format Preprint
id arxiv_https___arxiv_org_abs_2510_18165
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Saber: An Efficient Sampling with Adaptive Acceleration and Backtracking Enhanced Remasking for Diffusion Language Model
Dong, Yihong
Ma, Zhaoyu
Jiang, Xue
Fan, Zhiyuan
Qian, Jiaru
Li, Yongmin
Xiao, Jianha
Jin, Zhi
Cao, Rongyu
Li, Binhua
Huang, Fei
Li, Yongbin
Li, Ge
Artificial Intelligence
Computation and Language
Machine Learning
Software Engineering
Diffusion language models (DLMs) are emerging as a compelling alternative to the dominant autoregressive paradigm, offering inherent advantages in parallel generation and bidirectional context modeling. However, for the tasks with strict structural constraints such as code generation, DLMs face a critical trade-off between inference speed and output quality, where accelerating generation by reducing sampling steps often leads to catastrophic performance collapse. We find that the fundamental reasons are: 1) the generation difficulty is non-uniform in the structured sequence decoding steps, making DLM's static acceleration strategy suboptimal; 2) the context of tokens generated by DLM evolves continuously, causing early high-confidence predictions to turn into irreversible errors. In this paper, we introduce efficient Sampling with Adaptive acceleration and Backtracking Enhanced Remasking (i.e., Saber), a novel training-free sampling algorithm for DLMs that first achieves both better inference speed and output quality in code generation. Saber dynamically adjusts the number of tokens unmasked per step based on the model's evolving confidence, and utilizes a backtracking mechanism to revert tokens whose confidence drops as new context emerges, with its effectiveness supported by theoretical analysis. Extensive experiments on multiple mainstream code generation benchmarks show that Saber boosts Pass@1 accuracy by an average of 1.9\% over mainstream DLM sampling methods, while achieving an average 251.4\% inference speedup. By leveraging the inherent advantages of DLMs, our work significantly narrows the performance gap with autoregressive models in code generation.
title Saber: An Efficient Sampling with Adaptive Acceleration and Backtracking Enhanced Remasking for Diffusion Language Model
topic Artificial Intelligence
Computation and Language
Machine Learning
Software Engineering
url https://arxiv.org/abs/2510.18165