用重置掩码代替直接替换,提升离散扩散语言模型的生成准确性。
Targeted Remasking: Replacing Token Editing with Token-to-Mask Refinement in Discrete Diffusion Language Models
- 将错误令牌重置为掩码,让模型在更干净的上下文中重新预测
- 数学任务上性能提升5.92%,修复59.4%的末段输出错误
- 无需训练,可直接替换现有编辑机制,适合高精度生成场景
离散掩码扩散语言模型如LLaDA通过迭代去噪生成文本,逐步用预测令牌替换掩码令牌。LLaDA2.1引入了令牌到令牌(T2T)编辑机制,通过直接替换疑似错误的已确定令牌加速生成。然而我们发现T2T存在根本缺陷:将错误检测与替换耦合、污染生成上下文、引入训练-推理噪声不匹配。本文提出令牌到掩码(T2M)重掩码,一种无需训练的即插即用替代方案,将怀疑出错的令牌重置为掩码状态,使扩散过程在更清晰的上下文中重新预测。设计并验证三种互补的错误检测策略——基于概率、触发镜像和时序差分,并提供统一理论分析表明,T2M净化生成上下文,将系统性推理误差还原为模型原生掩码噪声类型,支持延迟承诺以实现多位置联合优化。在涵盖知识、推理、数学、编码和指令遵循的12个基准上进行全面实验,T2M在需要精确令牌级输出的任务中普遍提升性能,数学任务最大提升达+5.92%(CMATH)。CMATH的错误分析显示,主要失败模式是末段令牌污染——正确推理导致最终答案被破坏,而T2M修复了其中59.4%的情况。
原文摘要 · Abstract (English)
Discrete masked diffusion language models such as LLaDA generate text through iterative denoising, where mask tokens are progressively replaced with predicted tokens. LLaDA2.1 introduced a Token-to-Token (T2T) editing mechanism that accelerates generation by directly replacing committed tokens suspected of being incorrect. However, we identify fundamental limitations of T2T editing: it couples error detection with replacement, pollutes the generation context with potentially incorrect tokens, and introduces a train-inference noise mismatch where systematic model-generated errors differ from the random perturbations seen during training. We propose Token-to-Mask (T2M) remasking, a training-free, drop-in replacement for T2T editing that resets suspected erroneous tokens back to the mask state, allowing the diffusion process to re-predict them under cleaner context. We design and empirically validate three complementary error detection strategies -- probability-based, trigger-mirrored, and temporal-difference-based -- and provide a unified theoretical analysis showing that T2M remasking purifies the generation context, converts systematic inference errors back to the model's native mask noise type, and enables delayed commitment for joint multi-position optimization. Comprehensive experiments across 12 benchmarks spanning knowledge, reasoning, mathematics, coding, and instruction following show that T2M generally improves performance on tasks requiring precise token-level output, with the largest gain on mathematics (+5.92% on CMATH). Error analysis on CMATH reveals that the dominant failure mode is last-mile token corruption -- where correct reasoning produces a corrupted final answer -- and that T2M repairs 59.4% of such cases.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。