Diffusion Language Models Can Approximate Optimal Infilling Lengths Implicitly
Hengchang Liu ⋅ Zhao Yang ⋅ Bing Su
Abstract
Diffusion language models (DLMs) provide a bidirectional generation framework naturally suited for infilling, yet their performance is constrained by the pre-specified infilling length. In this paper, we show that DLM first-step confidence can provide a useful signal for infilling length. We identify two key statistical phenomena in the first-step denoising confidence: a local $\textit{Oracle Peak}$ that emerges near the ground-truth length and a systematic $\textit{Length Bias}$ that often obscures this signal. By leveraging this signal and calibrating the bias, our training-free method $ \textbf{CAL} (\textbf{C}alibrated\ \textbf{A}daptive\ \textbf{L}ength) $ selects an infilling length through a search before formal decoding. On LLaDA-Base Single-Line infilling, CAL improves average Pass@1 from 44.8\% to 65.4\% across four initial lengths; gains reach 47.7pp over Fixed and 40.5pp over the chat-based adaptive baseline at $L_{init}=4$. Text-infilling gains reach 8.5pp in BLEU-2 and 9.9pp in ROUGE-L. These results establish calibrated first-step confidence as an effective and practical signal for training-free adaptive length control in DLM infilling. Code is available at https://github.com/NiuHechang/Calibrated_Adaptive_Length.
Successful Page Load