用代码执行结果生成精准推理数据,提升大模型逻辑能力
Code Execution as Grounded Supervision for LLM Reasoning
- 通过代码执行的确定性提取可验证的分步推理轨迹
- 在多个领域基准上实现可迁移的推理能力,减少冗余计算
- 无需人工标注或错误推理,适合需要可靠推理的场景
使用链式思维(CoT)监督训练大语言模型已被证明能有效提升其推理能力。然而,获取可靠且准确的推理监督仍面临重大挑战。本文提出一种可扩展的方法,利用程序执行的确定性生成高质量的CoT监督数据集。与依赖昂贵人工标注或易出错的LLM生成CoT的现有方法不同,本方法从代码执行中提取可验证的、分步的推理轨迹,并将其转化为自然语言形式的CoT推理。在多个领域的推理基准测试中,实验表明该方法能有效赋予大模型跨任务的可迁移推理能力。此外,消融实验证明,该方法生成的推理数据具有高度准确性,并在推理过程中通过减少无意义重复和过度思考,降低了整体词元长度。
原文摘要 · Abstract (English)
Training large language models (LLMs) with chain-of-thought (CoT) supervision has proven effective for enhancing their reasoning abilities. However, obtaining reliable and accurate reasoning supervision remains a significant challenge. We propose a scalable method for generating a high-quality CoT supervision dataset by leveraging the determinism of program execution. Unlike existing reasoning dataset generation methods that rely on costly human annotations or error-prone LLM-generated CoT, our approach extracts verifiable, step-by-step reasoning traces from code execution and transforms them into a natural language CoT reasoning. Experiments on reasoning benchmarks across various domains show that our method effectively equips LLMs with transferable reasoning abilities across diverse tasks. Furthermore, the ablation studies validate that our method produces highly accurate reasoning data and reduces overall token length during inference by reducing meaningless repetition and overthinking.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。