ChatPaper.aiChatPaper

코드I/O: 코드 입력-출력 예측을 통한 추론 패턴 압축

CodeI/O: Condensing Reasoning Patterns via Code Input-Output Prediction

February 11, 2025
저자: Junlong Li, Daya Guo, Dejian Yang, Runxin Xu, Yu Wu, Junxian He
cs.AI

초록

추론은 대형 언어 모델의 기본적인 능력입니다. 이전 연구는 주로 수학이나 코드 생성과 같은 좁은 기술을 향상시키는 데 초점을 맞추었지만, 다양한 추론 작업의 성능 향상은 희소하고 단편적인 훈련 데이터로 인해 여전히 어려운 문제입니다. 이 문제를 해결하기 위해 우리는 CodeI/O를 제안합니다. 이는 다양한 추론 패턴을 체계적으로 압축하는 혁신적인 방법으로, 문맥에 근거한 코드에 내재된 다양한 추론 패턴을 변환하여 원래 코드를 코드 입력-출력 예측 형식으로 만듭니다. 모델을 훈련시켜 코드와 테스트 케이스가 자연어로 완전히 표현된 Chain-of-Thought (CoT) 근거로 입력/출력을 예측하도록 함으로써, 우리는 이러한 모델들에게 논리 흐름 계획, 상태 공간 탐색, 의사 결정 트리 탐색, 그리고 모듈식 분해와 같은 범용 추론 기본 요소에 노출시킵니다. 이 과정에서 구조화된 추론을 코드별 구문에서 분리하고 절차적 엄격성을 보존합니다. 실험 결과는 CodeI/O가 상징적, 과학적, 논리, 수학 및 숫자, 그리고 상식적 추론 작업 전반에 걸쳐 일관된 향상을 이끌어냄을 보여줍니다. 기존의 실제 출력과 일치하거나 예측된 입력을 사용하여 코드를 다시 실행함으로써 각 예측을 검증하고, 다중 회전 수정을 통해 CoT를 더 발전시키는 CodeI/O++을 달성하여 더 높은 성능을 달성합니다. 저희의 데이터와 모델은 https://github.com/hkust-nlp/CodeIO에서 이용할 수 있습니다.
English
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.

Summary

AI-Generated Summary

PDF443February 12, 2025