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 .
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了每一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 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 次
它引用的顶会 Paper9
- Measuring Massive Multitask Language UnderstandingDan Hendrycks, Collin Burns, Steven Basart, Andy Zou 等ICLR 2021 · 被引用 7,905 次
- CRUXEval: A Benchmark for Code Reasoning, Understanding and ExecutionAlex Gu, Baptiste Rozière, Hugh James Leather, Armando Solar-Lezama 等ICML 2024 · 被引用 270 次
- MAmmoTH2: Scaling Instructions from the WebXiang Yue, Tianyu Zheng, Ge Zhang, Wenhu ChenNeurIPS 2024 · 被引用 176 次
- Reasoning with Language Model Prompting: A SurveyShuofei Qiao, Yixin Ou, Ningyu Zhang, Xiang Chen 等ACL 2023 · 被引用 124 次
- NExT: Teaching Large Language Models to Reason about Code ExecutionAnsong Ni, Miltiadis Allamanis, Arman Cohan, Yinlin Deng 等ICML 2024 · 被引用 73 次
相关 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 次
- Enhancing Chain of Thought Prompting in Large Language Models via Reasoning PatternsYufeng Zhang, Xuepeng Wang, Lingxiang Wu, Jinqiao WangAAAI 2025 · 被引用 27 次
- CodePlan: Unlocking Reasoning Potential in Large Language Models by Scaling Code-form PlanningJiaxin Wen, Jian Guan, Hongning Wang, Wei Wu 等ICLR 2025
