2025-05-27 · 进阶 · 机器学习 · 自然语言处理

Which Data Attributes Stimulate Math and Code Reasoning? An Investigation via Influence Functions

该论文通过影响函数分析,揭示了哪些数据属性能够有效刺激数学和代码推理能力,并提出了一种基于数据重权的数据集调整策略,显著提升了模型的推理性能。

更新于 2025-05-27。作者:Siqi Kou、Qingyuan Tian、Hanwen Xu、Zihao Zeng、Zhijie Deng。

中文摘要

大型语言模型(LLMs)在数学和编码方面的推理能力表现出色,这通常得益于对由更强模型生成的思维链(CoTs)进行后训练。然而,现有的用于整理此类训练数据的策略主要依赖于启发式方法,限制了其泛化能力,并且未能捕捉到数据中潜藏的细微差别。为了解决这些局限性,我们利用影响函数来系统地归因于LLMs在数学和编码方面的推理能力,将其归因于单个训练示例、序列和标记,从而深入了解有效的数据特征。我们的基于影响函数的推理归因(Infra)揭示了数学和编码任务中的非平凡跨域效应:高难度的数学示例可以提高数学和编码推理能力,而低难度的编码任务最有效地促进了编码推理。基于这些发现,我们引入了一种简单而有效的数据集重新加权策略,通过翻转任务难度,将AIME24的准确率从10%提高到20%,并将Qwen2.5-7B-Instruct的LiveCodeBench准确率从33.8%提升到35.3%。此外,我们的细粒度归因揭示,序列级别的探索行为提高了数学和编码的推理性能,而标记级别的影响模式在数学和编码推理中是不同的:前者更倾向于自然语言逻辑连接词,而后者强调结构语法。

英文摘要

Large language models (LLMs) have demonstrated remarkable reasoning capabilities in math and coding, often bolstered by post-training on the chain-of-thoughts (CoTs) generated by stronger models. However, existing strategies for curating such training data predominantly rely on heuristics, limiting generalizability and failing to capture subtleties underlying in data. To address these limitations, we leverage influence functions to systematically attribute LLMs' reasoning ability on math and coding to individual training examples, sequences, and tokens, enabling deeper insights into effective data characteristics. Our Influence-based Reasoning Attribution (Infra) uncovers nontrivial cross-domain effects across math and coding tasks: high-difficulty math examples improve both math and code reasoning, while low-difficulty code tasks most effectively benefit code reasoning. Based on these findings, we introduce a simple yet effective dataset reweighting strategy by flipping task difficulty, which doubles AIME24 accuracy from 10\% to 20\% and boosts LiveCodeBench accuracy from 33.8\% to 35.3\% for Qwen2.5-7B-Instruct. Moreover, our fine-grained attribution reveals that the sequence-level exploratory behaviors enhance reasoning performance in both math and code, and the token-level influence patterns are distinct for math and code reasoning: the former prefers natural language logic connectors and the latter emphasizes structural syntax.

解读

一句话总结

该论文通过影响函数分析,揭示了哪些数据属性能够有效刺激数学和代码推理能力,并提出了一种基于数据重权的数据集调整策略,显著提升了模型的推理性能。

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

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

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

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

来源

机器可读索引:llms.txt