将代码执行作为 LLM 推理的扎根监督
Code Execution as Grounded Supervision for LLM Reasoning
AI总结:
针对可靠 CoT 监督难以获取的问题,本文利用程序执行的确定性提取可验证推理轨迹并转换为自然语言 CoT,从而提升 LLM 的跨任务推理能力并减少推理 token。
摘要:
使用思维链(CoT)监督训练大型语言模型(LLM)已被证明可有效增强其推理能力。然而,获取可靠且准确的推理监督仍是一项重大挑战。我们提出一种可扩展的方法,通过利用程序执行的确定性来生成高质量 CoT 监督数据集。不同于现有依赖昂贵人工标注或易出错的 LLM 生成 CoT 的推理数据集生成方法,我们的方法从代码执行中提取可验证的逐步推理轨迹,并将其转换为自然语言 CoT 推理。在多个领域的推理基准测试上的实验表明,我们的方法能有效赋予 LLM 跨多样任务的可迁移推理能力。此外,消融研究验证了我们的方法可生成高度准确的推理数据,并通过减少无意义重复和过度思考,在推理期间降低整体 token 长度。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。