arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.23629cs.LGcs.AIcs.PL
收藏

执行链监督提升大语言模型的通用推理能力

Chain of Execution Supervision Promotes General Reasoning in Large Language Models

Qwen Team, Alibaba(阿里巴巴通义实验室);Hong Kong University of Science and Technology (Guangzhou)(香港科技大学(广州));University of Science and Technology of China(中国科学技术大学)

Nuo Chen, Zehua Li, Keqin Bao, Junyang Lin, Dayiheng Liu

AI总结:

针对代码中推理隐式且含噪声导致直接训练效果不佳的问题,该研究提出含260万样本的TracePile语料库,将代码执行转化为显式执行链推理依据,经多设置多基准实验验证可有效提升LLM的通用推理能力。

摘要:

构建鲁棒且通用的推理能力是大语言模型(LLM)发展的核心目标。鉴于代码固有的逻辑结构以及分治、拓扑排序、枚举等多样推理范式,近期研究越来越多地将代码作为丰富的训练来源。然而,代码中的推理往往是隐式表达的,且与语法或实现层面的噪声纠缠在一起,使得直接在原始代码上训练的效果不够理想。为解决这一问题,我们提出了TracePile,一个包含260万样本的大规模语料库,它将代码执行转化为显式的、逐步的思维链风格推理依据,我们称之为执行链(Chain of Execution, CoE)。该语料库涵盖数学、经典算法、算法竞赛等领域,并通过变量追踪问题和代码重写来增强逻辑粒度和代码多样性。我们通过三种训练设置评估TracePile:持续预训练、预训练后的指令微调,以及两阶段微调。在四个基础模型(LLaMA 3、LLaMA 3.1、Qwen-2.5和Qwen-2.5 Coder)以及覆盖数学、代码、逻辑和算法的20个基准上的实验显示,模型性能得到了一致提升。值得注意的是,在两阶段微调设置下,TracePile使LLaMA3.1-8B在9个数学数据集上的平均性能提升了7.1%,并且在LiveCodeBench、CRUX和MMLU上也带来了明显增益。

英文摘要:

Building robust and general reasoning ability is a central goal in the development of large language models (LLMs). Recent efforts increasingly turn to code as a rich training source, given its inherent logical structure and diverse reasoning paradigms such as divide-and-conquer, topological ordering, and enumeration. However, reasoning in code is often expressed implicitly and entangled with syntactic or implementation noise, making direct training on raw code suboptimal.To address this, we introduce TracePile, a large-scale corpus of 2.6 million samples that transforms code execution into explicit, step-by-step chain-of-thought-style rationales, which we call Chain of Execution (CoE). The corpus spans domains including mathematics, classical algorithms and algorithmic competition, and is enriched with variable-tracing questions and code rewritings to enhance logical granularity and code diversity. We evaluate TracePile using three training setups: continue-pretraining, instruction tuning after pretraining, and two-stage finetuning. Experiments across four base models (LLaMA 3, LLaMA 3.1, Qwen-2.5, and Qwen-2.5 Coder) and 20 benchmarks covering math, code, logic, and algorithms demonstrate consistent improvements. Notably, TracePile boosts LLaMA3.1-8B by 7.1\% on average across nine math datasets and delivers clear gains on LiveCodeBench, CRUX, and MMLU under two-stage fine-tuning.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑