扩散语言模型在不同任务和语言中改变速度
研究论文 · 2026/10/24
扩散语言模型可在一次前向传播中生成多个token,且生成时决定前向传播次数,因此相同长度输出的成本差异很大。通过分析两个扩散模型在10个任务上的表现,发现每token前向传播次数高度依赖任务:从输入复制或轻微编辑的文本成本低,开放式写作成本高(如DiffusionGemma写故事比语法纠正多三倍以上前向传播)。输出新颖性和词汇稀有度可解释大部分差异,思维链中最终答案重复推理时成本低、添加新内容时成本高。多语言生成中,高token化语言每token需更多传播,增加成本。成本与正确性相关:同一数学问题错误答案每token传播更多,按解码速度加权候选答案比多数投票提升4.2个百分点且无额外成本。结果表明扩散模型的计算优势取决于输出已确定程度,解码努力可作为提升推理效率和可靠性的实用信号。
该研究揭示了扩散语言模型计算成本的可解释因素,并提出了利用解码速度提升推理效率与可靠性的实用方法,对模型优化和实际部署有重要参考价值。
Diffusion language models can write several tokens in one forward pass, and they decide during generation how many passes to spend. Two outputs of the same token length can therefore vary a lot in cost. To understand the underlying factors of this cost variation, we analyze two diffusion models across 10 tasks. We find that the number of forward passes per token depends heavily on the task. Text copied or lightly edited from the input is cheap, while open-ended writing is costly. In DiffusionGemma, generating a token for story writing requires more than three times as many forward passes as for grammar correction. Two output properties explain much of this gap: how much of it is new relative to the input, and how rare its words are within the task. The same holds within a single response when thinking is involved. The final answer is cheap when it repeats the model's reasoning trace and costly when it adds something new. In multilingual generation, we find that highly tokenized languages also require more passes per token, adding to the cost they already pay with more tokens. Finally, cost tracks correctness: on the same math problem, wrong answers take more passes per token than correct ones, and weighting candidate answers by decoding speed beats majority voting by up to 4.2 points at no extra cost. Taken together, our results show that diffusion's computational advantage depends on how much of the output is already determined, while its decoding effort offers a practical signal for making inference more efficient and reliable.