发现扩散语言模型的掩码会分散注意力,影响上下文理解能力
Masks Can Be Distracting: On Context Comprehension in Diffusion Language Models
- 提出无掩码干扰的损失函数,让模型预测不依赖掩码数量
- 实验表明大量掩码会使模型性能下降40%以上
- 适合关注上下文建模与扩散模型优化的研究者
最近兴起的掩码扩散语言模型(MDLMs)被视为自回归语言模型(ARLMs)的有前景替代方案,其去噪目标理论上应实现更均匀的上下文利用。本文研究发现,尽管具有全局训练目标和双向注意力机制,MDLMs 仍存在显著局部性偏差:模型性能对关键信息的位置高度敏感,偏好局部上下文而非远距离信息。此外,生成所需的大量掩码会严重损害上下文理解能力。系统消融实验表明,这些掩码充当干扰项,削弱了模型处理相关输入的能力。为此,我们提出一种无掩码依赖的损失函数,使预测结果对附加掩码数量保持不变。在该目标下微调可显著缓解掩码干扰效应,提升模型鲁棒性。研究揭示了当前 MDLM 训练范式的两大缺陷,并为构建具备更强上下文理解能力的扩散语言模型提供了可行路径。
原文摘要 · Abstract (English)
Masked Diffusion Language Models (MDLMs) have recently emerged as a promising alternative to Autoregressive Language Models (ARLMs), leveraging a denoising objective that, in principle, should enable more uniform context utilisation. In this work, we examine the context comprehension abilities of MDLMs and uncover two key limitations. First, despite their more global training objective and bidirectional attention mechanism, similarly to ARLMS, MDLMs exhibit a strong locality bias: performance is highly sensitive to the position of relevant information within the input, favouring local over distant context. Second, we show that appending a large number of mask tokens--required for generation--can significantly degrade context comprehension. Through systematic ablations, we find that these masks act as distractors, reducing the model's ability to process relevant information. To address this, we introduce a mask-agnostic loss function that encourages predictions to remain invariant to the number of appended masks. Fine-tuning with this objective substantially mitigates the distracting effect of masks, improving robustness of MDLMs. Overall, our findings reveal critical limitations of the current MDLM training paradigm and provide actionable insights for building diffusion-based language models with stronger context comprehension.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。