AttentionInfluence: Adopting Attention Head Influence for Weak-to-Strong Pretraining Data Selection
该论文提出了一种名为AttentionInfluence的无监督预训练数据选择方法,通过分析注意力头的影响来选择高质量的预训练数据,从而提升大型语言模型(LLM)的推理能力。
更新于 2025-05-13。作者:Kai Hua、Steven Wu、Ge Zhang、Ke Shen。
中文摘要
近期,对收集推理密集型预训练数据以提高大型语言模型(LLM)复杂推理能力的兴趣日益增长。先前的方法通常依赖于监督分类器来识别此类数据,这需要人工或LLM进行标注,往往引入了领域特定的偏差。由于注意力头对于情境推理至关重要,我们提出了AttentionInfluence,这是一种简单而有效、无需监督信号的训练方法。我们的方法通过简单的注意力头掩码操作,使一个小型预训练语言模型能够作为强大的数据选择器。具体来说,我们识别检索头,并计算在掩码这些头时的损失差异。我们将AttentionInfluence应用于一个具有1.3亿参数的密集模型,对包含2410亿个标记的SmolLM语料库进行数据选择,并将SmolLM语料库与包含730亿个标记的选定子集混合,使用1T训练标记和WSD学习率调度方案预训练一个具有70亿参数的密集模型。我们的实验结果表明,在多个知识密集型和推理密集型基准测试(即MMLU、MMLU-Pro、AGIEval-en、GSM8K和HumanEval)中,性能有了显著的提升,范围从1.4pp到3.5pp。这证明了有效的弱到强扩展属性,即小型模型改善了大型模型的最终性能——为以推理为中心的数据选择提供了一条有希望且可扩展的路径。
英文摘要
Recently, there has been growing interest in collecting reasoning-intensive pretraining data to improve LLMs' complex reasoning ability. Prior approaches typically rely on supervised classifiers to identify such data, which requires labeling by humans or LLMs, often introducing domain-specific biases. Due to the attention heads being crucial to in-context reasoning, we propose AttentionInfluence, a simple yet effective, training-free method without supervision signal. Our approach enables a small pretrained language model to act as a strong data selector through a simple attention head masking operation. Specifically, we identify retrieval heads and compute the loss difference when masking these heads. We apply AttentionInfluence to a 1.3B-parameter dense model to conduct data selection on the SmolLM corpus of 241B tokens, and mix the SmolLM corpus with the selected subset comprising 73B tokens to pretrain a 7B-parameter dense model using 1T training tokens and WSD learning rate scheduling. Our experimental results demonstrate substantial improvements, ranging from 1.4pp to 3.5pp, across several knowledge-intensive and reasoning-heavy benchmarks (i.e., MMLU, MMLU-Pro, AGIEval-en, GSM8K, and HumanEval). This demonstrates an effective weak-to-strong scaling property, with small models improving the final performance of larger models-offering a promising and scalable path for reasoning-centric data selection.
解读
一句话总结
该论文提出了一种名为AttentionInfluence的无监督预训练数据选择方法,通过分析注意力头的影响来选择高质量的预训练数据,从而提升大型语言模型(LLM)的推理能力。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:当前LLM预训练数据选择依赖于监督分类器,需要人工或LLM标注,容易引入领域特定偏差。
- 现有方案不足:依赖人工或LLM标注,存在领域特定偏差,且分类器构建过程复杂。
- 研究目标:提出一种无监督的预训练数据选择方法,通过分析注意力头的影响来选择高质量数据,提升LLM的推理能力。
问题2:论文的核心创新点是什么?
- 技术创新:提出AttentionInfluence方法,通过分析注意力头的影响来选择高质量数据。
- 方法改进:无需监督信号,无需训练,能够有效地选择高质量数据。
- 优势:与现有方法相比,无需人工或LLM标注,无领域特定偏差,且更易于实现。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在SmolLM语料库上使用1.3B参数的模型进行数据选择,并与7B参数的模型进行预训练。
- 性能提升:在多个知识密集型和推理密集型基准测试中(如MMLU、MMLU-Pro、AGIEval-en、GSM8K和HumanEval),性能提升从1.4pp到3.5pp不等。
- 对比结果:与基线方法相比,AttentionInfluence在多个基准测试中均表现出显著性能提升。
问题4:这个研究的实际应用价值是什么?
- 应用场景:可用于LLM的预训练数据选择,提升LLM的推理能力。
- 实施建议:结合现有分类器,可以进一步提升数据选择效果。
- 局限与展望:目前实验局限于7B参数和1TB训练令牌,未来可扩展到更大规模模型和更长的训练周期。此外,可以进一步研究不同注意力头和MLP的影响,以更深入地理解LLM的工作原理。