arXiv:2608.03769cs.CLcs.AI2026-08

为掩码扩散语言模型设计新型位置编码,提升上下文建模能力

MDLMPE: Distribution Aware Positional Encoding for Masked Diffusion Language Models

论文配图:MDLMPE: Distribution Aware Positional Encoding for Masked Diffusion Language Models
图 1 · 摘自论文原文
  • 基于令牌可见性动态变化设计分布感知位置编码
  • 在多个任务上优于传统位置编码,最高提升1.8个点
  • 适合研究非自回归生成与扩散模型的开发者

掩码扩散语言模型(MDLMs)支持并行生成和双向上下文建模,但其位置上下文与自回归模型有本质不同。自回归解码暴露连续前缀,而MDLM去噪过程产生动态、非连续的已揭示与掩码令牌配置。传统位置编码如RoPE仅捕捉序列顺序和成对偏移,无法感知这种不断变化的令牌可用性结构。为此,我们提出MDLMPE,首个显式感知动态揭示/掩码配置的位置编码方法。它将令牌可用性表示为二值序列,应用距离感知高斯加权,并通过余弦基投影生成分布感知的位置特征。这些特征加入词嵌入后,经轻量MLP映射为角偏移,调节标准RoPE相位。在LLaDA和DREAM上的大量实验表明,MDLMPE在监督微调、预训练、零样本评估及块扩散设置下普遍优于传统位置编码方法。消融实验显示,可用性状态、高斯局部性、谱基与嵌入注入的完整组合效果最佳。结果证明,动态令牌可用性分布是掩码扩散语言模型中有效的位置信号。

原文摘要 · Abstract (English)

Masked diffusion language models (MDLMs) enable parallel generation and bidirectional context modeling, but their positional context differs fundamentally from that of autoregressive (AR) models. Whereas AR decoding exposes a contiguous prefix, MDLM denoising produces dynamic, non-contiguous configurations of revealed and masked tokens. Conventional positional encodings such as RoPE capture sequence order and pairwise displacement but remain insensitive to this evolving token-availability structure. To address this limitation, we propose MDLMPE, a positional encoding designed specifically for masked diffusion. To the best of our knowledge, MDLMPE is the first method to make positional representations explicitly aware of the changing revealed/masked configuration. It represents token availability as a binary sequence, applies distance-aware Gaussian weighting, and projects the resulting pattern through a cosine basis to obtain distribution-aware positional features. These features are added to token embeddings and mapped by a lightweight MLP to angular offsets that modulate the standard RoPE phases. Extensive experiments on LLaDA and DREAM demonstrate that MDLMPE generally outperforms conventional positional encoding methods across supervised fine-tuning, pretraining, zero-shot evaluation, and block-diffusion settings. Further ablations show that the complete combination of availability state, Gaussian locality, spectral basis, and embedding injection yields the strongest result. These results establish the evolving token-availability distribution as a useful positional signal for masked diffusion language models.

位置编码扩散模型语言模型非自回归

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。