arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2510.14620cs.CLcs.AI
收藏

代码驱动的数列计算:增强大语言模型的归纳推理能力

Code-driven Number Sequence Calculation: Enhancing the inductive Reasoning Abilities of Large Language Models

East China Normal University(东华大学);Fudan University(复旦大学);Shanghai Innovation Institute(上海创新研究院);Xi’an Jiaotong University(西安交通大学);Shanghai AI Laboratory(上海人工智能实验室)

Kedi Chen, Zhikai Lei, Xu Guo, Xuecheng Wu, Siyuan Zeng, Jianghao Yin, Yinqi Zhang, Qin Chen, Jie Zhou, Liang He, Qipeng Guo, Kai Chen, Wei Zhang

AI总结:

本文提出CodeSeq,一个基于数列的合成后训练数据集,通过将数列转化为算法问题并定义通项生成任务,结合反思修正和基于可解性与用例生成成功率的强化学习奖励,增强大语言模型的归纳推理能力,实验显示其在多种推理任务上性能提升并保持分布外性能。

摘要:

大语言模型(LLMs)在推理任务中取得了显著进展。在不同的推理模式中,归纳推理因其与人类学习方式更契合而受到越来越多的关注。然而,归纳推理的研究面临一些挑战。首先,现有的归纳数据大多侧重于表面规律,缺乏更复杂的内部模式。其次,当前的工作仅提示LLMs或在简单的提示-响应对上进行微调,而没有提供精确的思考过程,也未实现难度控制。与以往工作不同,我们通过引入\ extit{CodeSeq}来应对这些挑战,这是一个基于数列构建的合成后训练数据集。我们将数列封装成算法问题以发现其通项,并相应定义了通项生成(GTG)任务。我们的流程通过反思失败的测试用例并纳入迭代修正来生成监督微调数据,从而教会LLMs自主生成测试用例和自我检查。此外,它利用强化学习,并采用一种新颖的基于可解性(由问题通过率估计)和自主用例生成成功率的案例协同可解性缩放奖励,使模型能够更有效地从成功和失败中学习。实验结果表明,使用\ extit{CodeSeq}训练的模型在各种推理任务上有所提升,并能保持模型的分布外(OOD)性能。

英文摘要:

Large language models (LLMs) make remarkable progress in reasoning tasks. Among different reasoning modes, inductive reasoning, due to its better alignment with human learning, attracts increasing interest. However, research on inductive reasoning faces certain challenges. First, existing inductive data mostly focuses on superficial regularities while lacking more complex internal patterns. Second, current works merely prompt LLMs or finetune on simple prompt-response pairs, but do not provide precise thinking processes nor implement difficulty control. Unlike previous work, we address these challenges by introducing \textit{CodeSeq}, a synthetic post-training dataset built from number sequences. We package number sequences into algorithmic problems to discover their general terms, defining a general term generation (GTG) task correspondingly. Our pipeline generates supervised finetuning data by reflecting on failed test cases and incorporating iterative corrections, thereby teaching LLMs to learn autonomous case generation and self-checking. Additionally, it leverages reinforcement learning with a novel Case-Synergy Solvability Scaling Reward based on both solvability, estimated from the problem pass rate, and the success rate of self-directed case generation, enabling models to learn more effectively from both successes and failures. Experimental results show that the models trained with \textit{CodeSeq} improve on various reasoning tasks and can preserve the models' OOD performance.

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

↑