arXiv:2502.07490cs.CLcs.LG2025-02ICML被引 2

通过掩码增强自回归预测,让大模型更专注关键信息

Mask-Enhanced Autoregressive Prediction: Pay Less Attention to Learn More

  • 在自回归预测中引入随机掩码,提升上下文检索能力
  • 在长文本推理任务上显著优于传统方法,中间信息丢失问题减少11.77%
  • 无需额外计算开销,适配预训练与微调场景

大型语言模型在准确提取关键信息方面存在不足。为此,本文提出掩码增强自回归预测(MEAP),一种简单有效的训练范式,将掩码语言建模(MLM)无缝融入下一个词预测(NTP)中,以增强其上下文检索能力。具体而言,MEAP首先随机掩码少量输入标记,然后直接使用仅解码器的Transformer进行标准自回归预测。该方法无需双向注意力或编码器-解码器架构,预训练与推理阶段均无额外计算开销。大量实验表明,MEAP在关键信息检索和长上下文推理任务上显著优于NTP,同时在常识推理任务上表现相当或更优。在监督微调中,MEAP在‘迷失于中间’场景下优势明显,性能超越NTP达11.77个百分点。分析显示,其有效性源于通过聚焦非掩码标记,使注意力得分更具区分性,从而强化对任务相关信号的关注,抑制外围上下文干扰。这些发现使MEAP成为大模型训练的有力范式。

原文摘要 · Abstract (English)

Large Language Models (LLMs) are discovered to suffer from accurately retrieving key information. To address this, we propose Mask-Enhanced Autoregressive Prediction (MEAP), a simple yet effective training paradigm that seamlessly integrates Masked Language Modeling (MLM) into Next-Token Prediction (NTP) to enhance the latter's in-context retrieval capabilities. Specifically, MEAP first randomly masks a small fraction of input tokens and then directly performs the standard next-token prediction autoregressive using a decoder-only Transformer. MEAP eliminates the need for bidirectional attention or encoder-decoder architectures for MLM, incurring no additional computational overhead during pre-training or inference. Intensive experiments demonstrate that MEAP substantially outperforms NTP on key information retrieval and long-context reasoning tasks, while performing on par or better on commonsense reasoning tasks. The benefits of MEAP also extend to supervised fine-tuning, where it shows remarkable advantages in lost-in-the-middle scenarios, outperforming NTP by 11.77 percentage points. Our analysis indicates that MEAP's effectiveness arises from its ability to promote more distinguishable attention scores by concentrating on a reduced set of non-masked tokens. This mechanism improves the model's focus on task-relevant signals while mitigating the influence of peripheral context. These findings position MEAP as a promising training paradigm for large language models.

自回归预测掩码机制长文本推理

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