CodeIO: Condensing Reasoning Patterns via Code Input-Output Prediction
Junlong Li, Daya Guo, Dejian Yang, Runxin Xu, Yu Wu, Junxian He
摘要
Reasoning is a fundamental capability of Large Language Models. While prior research predominantly focuses on enhancing narrow skills like math or code generation, improving performance on many other reasoning tasks remains challenging due to sparse and fragmented training data. To address this issue, we propose CODEI/O, a novel approach that systematically condenses diverse reasoning patterns inherently embedded in contextually-grounded codes, through transforming the original code into a code input-output prediction format. By training models to predict inputs/outputs given code and test cases entirely in natural language as Chain-of-Thought (CoT) rationales, we expose them to universal reasoning primitives-like logic flow planning, state-space searching, decision tree traversal, and modular decomposition-while decoupling structured reasoning from code-specific syntax and preserving procedural rigor. Experimental results demonstrate CODEI/O leads to consistent improvements across symbolic, scientific, logic, math & numerical, and commonsense reasoning tasks. By matching the existing ground-truth outputs or re-executing the code with predicted inputs, we can verify each prediction and further enhance the CoTs through multi-turn revision, resulting in CODEI/O++ and achieving higher performance. Our data and models are available at https://github.com/hkust-nlp/CodeIO .
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 13 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- Absolute Zero: Reinforced Self-play Reasoning with Zero Data 引用了 CRUXEval: A Benchmark for Code Reasoning, Understanding and Execution
- ARM: Adaptive Reasoning Model 引用了 Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them
- Scaling Code-Assisted Chain-of-Thoughts and Instructions for Model Reasoning 引用了 MAmmoTH2: Scaling Instructions from the Web
- Scaling Code-Assisted Chain-of-Thoughts and Instructions for Model Reasoning 引用了 Towards Reasoning in Large Language Models: A Survey
- MAmmoTH2: Scaling Instructions from the Web 引用了 Measuring Massive Multitask Language Understanding
- MAmmoTH2: Scaling Instructions from the Web 引用了 Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them
- Towards Reasoning in Large Language Models: A Survey 引用了 Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve Them
引用它的顶会 Paper13
- Absolute Zero: Reinforced Self-play Reasoning with Zero DataAndrew Zhao, Yiran Wu, Tong Wu, Quentin Xu 等NeurIPS 2025 · 361 次引用
- ARM: Adaptive Reasoning ModelSiye Wu, Jian Xie, Yikai Zhang, Aili Chen 等NeurIPS 2025 · 31 次引用
- AutoCodeBench: Large Language Models are Automatic Code Benchmark GeneratorsChangzhi Zhou, Ao Liu, Yuchi Deng, Zhiying Zeng 等ICLR 2026 · 27 次引用
- CODERL+: Improving Code Generation via Reinforcement with Execution Semantics AlignmentXue Jiang, Yihong Dong, Mengyang Liu, Hongyi Deng 等ACL 2026 · 18 次引用
- Scaling Code-Assisted Chain-of-Thoughts and Instructions for Model ReasoningHonglin Lin, Qizhi Pei, Zhuoshi Pan, Yu Li 等NeurIPS 2025 · 12 次引用
它引用的 Paper12
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 7,905 次引用
- Towards Reasoning in Large Language Models: A SurveyJie Huang, Kevin Chen-Chuan ChangACL Findings 2023 · 428 次引用
- CRUXEval: A Benchmark for Code Reasoning, Understanding and ExecutionAlex Gu, Baptiste Rozière, Hugh James Leather, Armando Solar-Lezama 等ICML 2024 · 270 次引用
- Challenging BIG-Bench Tasks and Whether Chain-of-Thought Can Solve ThemMirac Suzgun, Nathan Scales, Nathanael Schärli, Sebastian Gehrmann 等ACL Findings 2023 · 253 次引用
- MAmmoTH2: Scaling Instructions from the WebXiang Yue, Tianyu Zheng, Ge Zhang, Wenhu ChenNeurIPS 2024 · 176 次引用
相关 Paper
- Code to Think, Think to Code: A Survey on Code-Enhanced Reasoning and Reasoning-Driven Code Intelligence in LLMsDayu Yang, Tianyang Liu, Daoan Zhang, Antoine Simoulin 等EMNLP 2025 · 1 次引用
- Revisiting Chain-of-Thought in Code Generation: Do Language Models Need to Learn Reasoning before Coding?Renbiao Liu, Anqi Li, Chaoding Yang, Hui Sun 等ICML 2025
- Language Models of Code are Few-Shot Commonsense LearnersAman Madaan, Shuyan Zhou, Uri Alon, Yiming Yang 等EMNLP 2022 · 103 次引用
- CodePlan: Unlocking Reasoning Potential in Large Language Models by Scaling Code-form PlanningJiaxin Wen, Jian Guan, Hongning Wang, Wei Wu 等ICLR 2025
- Enhancing Chain of Thought Prompting in Large Language Models via Reasoning PatternsYufeng Zhang, Xuepeng Wang, Lingxiang Wu, Jinqiao WangAAAI 2025 · 27 次引用
