2025-02-12 · 进阶 · 自然语言处理

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

本文提出了一种名为Mask-Enhanced Autoregressive Prediction (MEAP) 的简单有效的预训练范式,通过将掩码语言模型 (MLM) 无缝集成到下一个词预测 (NTP) 中来提高LLM的上下文检索能力,并在信息检索和长文本推理任务上取得了显著的性能提升。

更新于 2025-02-12。作者:Xialie Zhuang、Zhikai Jia、Jianjin Li、Zhenyu Zhang、Li Shen、Zheng Cao、Shiwei Liu。

中文摘要

大型语言模型 (LLM) 被发现难以准确检索关键信息。为了解决这个问题,我们提出了一种名为掩码增强自回归预测 (MEAP) 的简单而有效的训练范式,它将掩码语言建模 (MLM) 无缝集成到下一个词预测 (NTP) 中,以增强后者在上下文中的检索能力。具体来说,MEAP 首先随机掩盖一小部分输入词元,然后使用仅解码器的 Transformer 直接执行标准的下一个词预测自回归。MEAP 消除了 MLM 对双向注意力或编码器-解码器架构的需求,在预训练或推理过程中不会产生额外的计算开销。大量的实验表明,MEAP 在关键信息检索和长上下文推理任务上明显优于 NTP,而在常识推理任务上的性能与 NTP 相当甚至更好。MEAP 的优势也延伸到监督微调,在“中间丢失”场景中表现出显著的优势,比 NTP 高出 11.77 个百分点。我们的分析表明,MEAP 的有效性源于其通过集中于较小的一组未掩码词元来促进更具区分度的注意力分数的能力。这种机制提高了模型对任务相关信号的关注度,同时减轻了外围上下文的影响。这些发现表明 MEAP 是一种很有前景的大型语言模型训练范式。

英文摘要

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.

解读

一句话总结

本文提出了一种名为Mask-Enhanced Autoregressive Prediction (MEAP) 的简单有效的预训练范式,通过将掩码语言模型 (MLM) 无缝集成到下一个词预测 (NTP) 中来提高LLM的上下文检索能力,并在信息检索和长文本推理任务上取得了显著的性能提升。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源