Code-driven Number Sequence Calculation: Enhancing the inductive Reasoning Abilities of Large Language Models
Fuente:
arXiv
Saved in:
| Main Authors: | , , , , , , , , , , , , |
|---|---|
| Format: | Preprint |
| Published: |
2025
|
| Subjects: | |
| Online Access: | |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
| _version_ | 1866917018810187776 |
|---|---|
| author | Chen, Kedi Lei, Zhikai Guo, Xu Wu, Xuecheng Zeng, Siyuan Yin, Jianghao Zhang, Yinqi Chen, Qin Zhou, Jie He, Liang Guo, Qipeng Chen, Kai Zhang, Wei |
| author_facet | Chen, Kedi Lei, Zhikai Guo, Xu Wu, Xuecheng Zeng, Siyuan Yin, Jianghao Zhang, Yinqi Chen, Qin Zhou, Jie He, Liang Guo, Qipeng Chen, Kai Zhang, Wei |
| contents | 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. |
| format | Preprint |
| id |
arxiv_https___arxiv_org_abs_2510_14620 |
| institution | arXiv |
| publishDate | 2025 |
| record_format | arxiv |
| spellingShingle | Code-driven Number Sequence Calculation: Enhancing the inductive Reasoning Abilities of Large Language Models Chen, Kedi Lei, Zhikai Guo, Xu Wu, Xuecheng Zeng, Siyuan Yin, Jianghao Zhang, Yinqi Chen, Qin Zhou, Jie He, Liang Guo, Qipeng Chen, Kai Zhang, Wei Computation and Language Artificial Intelligence 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. |
| title | Code-driven Number Sequence Calculation: Enhancing the inductive Reasoning Abilities of Large Language Models |
| topic | Computation and Language Artificial Intelligence |
| url | https://arxiv.org/abs/2510.14620 |