どのデータ属性が数学的・コード的推論を促進するか?影響関数を用いた調査
Which Data Attributes Stimulate Math and Code Reasoning? An Investigation via Influence Functions
May 26, 2025
著者: Siqi Kou, Qingyuan Tian, Hanwen Xu, Zihao Zeng, Zhijie Deng
cs.AI
要旨
大規模言語モデル(LLM)は、数学やコーディングにおいて顕著な推論能力を示しており、しばしば強力なモデルによって生成された連鎖的思考(CoT)を用いた事後学習によって強化されています。しかし、そのような学習データをキュレーションする既存の戦略は、主にヒューリスティックに依存しており、一般化能力が制限され、データに内在する微妙なニュアンスを捉えることができていません。これらの制約を解決するため、我々は影響関数を活用して、LLMの数学およびコーディングにおける推論能力を個々の学習例、シーケンス、トークンに系統的に帰属させ、効果的なデータ特性に関する深い洞察を可能にします。我々の影響ベースの推論帰属(Infra)は、数学とコーディングタスクにわたる非自明なクロスドメイン効果を明らかにします:高難易度の数学例は数学とコードの両方の推論を向上させ、低難易度のコードタスクはコード推論に最も効果的に寄与します。これらの発見に基づき、タスクの難易度を反転させるというシンプルでありながら効果的なデータセットの再重み付け戦略を導入し、AIME24の精度を10%から20%に倍増させ、Qwen2.5-7B-InstructのLiveCodeBench精度を33.8%から35.3%に向上させました。さらに、我々の細粒度の帰属分析は、シーケンスレベルの探索的行動が数学とコードの両方の推論性能を向上させること、およびトークンレベルの影響パターンが数学とコードの推論で異なることを明らかにしました:前者は自然言語の論理接続詞を好み、後者は構造的な構文を重視します。
English
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.Summary
AI-Generated Summary