ChatPaper.aiChatPaper

어떤 데이터 속성이 수학 및 코드 추론을 자극하는가? 영향 함수를 통한 조사

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

초록

대형 언어 모델(LLMs)은 수학 및 코딩 분야에서 놀라운 추론 능력을 보여주며, 종종 더 강력한 모델에 의해 생성된 사고의 연쇄(CoTs)를 통해 사후 훈련을 통해 강화됩니다. 그러나 이러한 훈련 데이터를 선별하는 기존 전략은 주로 휴리스틱에 의존하여 일반화 가능성을 제한하고 데이터에 내재된 미묘한 차이를 포착하지 못하는 한계가 있습니다. 이러한 한계를 해결하기 위해, 우리는 영향 함수(influence functions)를 활용하여 수학 및 코딩에서의 LLMs의 추론 능력을 개별 훈련 예제, 시퀀스 및 토큰에 체계적으로 귀속시켜, 효과적인 데이터 특성에 대한 더 깊은 통찰을 가능하게 합니다. 우리의 영향 기반 추론 귀속(Infra)은 수학과 코딩 작업 간의 비범한 교차 도메인 효과를 밝혀냅니다: 고난이도 수학 예제는 수학과 코드 추론 모두를 개선하는 반면, 저난이도 코드 작업은 코드 추론에 가장 효과적으로 이익을 제공합니다. 이러한 발견을 바탕으로, 우리는 작업 난이도를 뒤집는 간단하지만 효과적인 데이터셋 재가중 전략을 도입하여, Qwen2.5-7B-Instruct의 AIME24 정확도를 10%에서 20%로 두 배로 높이고, 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

PDF151May 27, 2025