프로필

설정

불러오는 중…

← 홈

도움말·문의

자주 묻는 질문

어떤 기능에 로그인이 필요한가요?

공개 논문의 해설과 논문 정보, 모델 구조, 관련 논문, 용어는 로그인 없이 볼 수 있습니다. 논문 올리기, 내 보관함, 읽기 기록, 논문 평가, 관심 분야 추천, 메일과 알림은 로그인해야 쓸 수 있습니다.

PDF 파일로도 올릴 수 있나요?

논문은 arXiv나 DOI 링크로 올리고, 해설은 모두에게 공개됩니다. 출처와 이용 조건이 확인되지 않아 해설을 공개할 수 없는 논문은 올릴 수 없습니다. PDF 파일 올리기와 나만 보기는 구독 회원만 쓸 수 있고, 파일로 올린 논문은 나만 보기로만 저장합니다. 제목으로 공식 정보를 찾는 검색은 버튼을 누를 때만 합니다.

그림과 AI 해설은 정확한가요?

그림은 논문 원본만 쓰고 이용 허락이 확인된 것만 보여 줍니다. 해설은 AI가 쓴 글이라 틀릴 수 있습니다. 중요한 주장과 수치, 그림의 맥락은 원문 근거로 확인해 주세요.

저작권 문제를 알리고 싶어요.

이용 조건과 원문 출처는 논문 정보 탭에 있습니다. 문제가 있으면 ‘문의하기’에서 ‘논문 내용·그림·저작권’을 골라 논문 링크와 문제가 되는 부분, 권리를 확인할 수 있는 근거를 보내 주세요. 접수만으로 권리가 확정되거나 바로 삭제되지는 않습니다. 검토 결과는 ‘내 문의’에서 볼 수 있습니다.

비밀번호를 잊었어요.

이메일로 가입했다면 로그인 창의 비밀번호 찾기에서 인증한 이메일로 다시 설정할 수 있습니다. Google, 네이버, 카카오로 가입했다면 그 서비스에서 비밀번호를 바꿔 주세요.

문의할 때 무엇을 적어야 하나요?

어느 화면에서 무엇을 하다 생긴 문제인지 논문 링크와 함께 적어 주세요. 비밀번호, API 키, 인증 코드, 전화번호 같은 개인정보는 적지 마세요. 문의와 답변은 Refivu에 저장되고 ‘내 문의’에서 볼 수 있습니다.

회원탈퇴는 어떻게 하나요?

설정의 내 계정에서 회원탈퇴를 누르세요. 지워지는 내용을 확인하고 본인 확인을 마치면 탈퇴됩니다. 다른 요청은 ‘문의하기’에서 ‘계정’을 골라 남겨 주세요.

논문 해설

Multi-Turn Code Generation Through Single-Step Rewards

단일 단계 보상을 통한 다중 턴 코드 생성

  • 연구 문제 다중 턴 코드 생성에서 실행 피드백을 활용하면서도 복잡한 다단계 강화학습을 피하는 방법이 필요합니다.
  • 연구 방법 µCODE는 코드 생성을 one-step recoverable MDP로 보고, 단일 단계 보상으로 검증기와 생성기를 반복 학습합니다.
  • 주요 결과 원문 표 1 기준 µCODE의 1B 모델 BoN@5는 MBPP 51.1, HumanEval 41.5를 기록했습니다.

다중 턴 코드 생성의 어려움

코드 생성 모델은 실행 오류를 보고 여러 차례 코드를 고쳐야 정답에 도달하는 경우가 많습니다. 원문은 프롬프트만으로는 제한된 문맥 안에서 가능한 모든 오류에서 회복하는 법을 가르칠 수 없다고 지적합니다. 기존 접근은 단일 턴 학습과 다중 턴 강화학습으로 나뉘며, 다중 턴 강화학습은 희소한 학습 신호 때문에 비효율적이라고 설명됩니다. 이 논문은 이 문제를 단일 단계 보상만으로 다루는 방법을 제안합니다.

µCODE의 학습 반복과 단일 단계 보상

µCODE는 코드 생성을 one-step recoverable MDP로 보고, 임의의 중간 상태에서 정답 코드를 한 턴에 복구할 수 있다고 가정합니다. 학습은 현재 생성기로 다중 턴 환경에서 롤아웃 데이터를 모으고, 누적 데이터로 검증기 R_ϕ를 학습하는 순서로 진행됩니다. 이후 학습된 검증기와 오라클 보상을 결합한 지역 탐색 전문가가 각 프롬프트의 최적 후보를 골라 데이터를 재라벨링하며, 생성기는 이 전문가 데이터로 미세조정됩니다. 이 과정은 강화학습 대신 모방 학습 형태로 재구성됩니다.

Figure 1: (a) We define the task of multi-turn code generation where for an initial problem x, the generator πθ provides a solution y1.
This solution is evalua…

Figure 1 . (a) We define the task of multi-turn code generation where for an initial problem x, the generator πθ provides a solution y1. This solution is evaluated with the public test to get execution feedback o1. At a turn t, the generator is conditioned on the history to generate solution yt ∼ πθ(.|x, y<t, o<t). The rollout ends when the turn limit is reached or the public tests pass upon which the solution is executed on private tests. Since, the agents can generate the optimal solution at any turn, this is a 1-step recoverable process. (b) Training loop of our method µCODE – which comprises of a generator and a learned verifier. During each iteration, rollouts are collected using πθ and we train a verifier Rϕ to rank candidate solutions for a prompt. The verifier Rϕ is then used to construct a local expert and relabel the collected rollouts. Lastly, the generator is fine-tuned with this expert dataset.

원문 · CC BY 4.0 · Jain, Arnav Kumar, Gonzalez-Pumariega, Gonzalo, Chen, Wayne, Rush, Alexander M, Zhao, Wenting, Choudhury, Sanjiban · Multi-Turn Code Generation Through Single-Step Rewards · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.
Table 2: Comparison of using learned verifier (LV) and relabeling
with one-step recoverability (One-Step) with the 1B-sized model.
We observe that FT with the…

Table 2 . Comparison of using learned verifier (LV) and relabeling with one-step recoverability (One-Step) with the 1B-sized model. We observe that FT with the learned verifierRFTL Vperforms better than FT with the oracle verifier scores RFT. Moreover, µCODE performs best when from both verifiers are used for relabeling.

원문 · CC BY 4.0 · Jain, Arnav Kumar, Gonzalez-Pumariega, Gonzalo, Chen, Wayne, Rush, Alexander M, Zhao, Wenting, Choudhury, Sanjiban · Multi-Turn Code Generation Through Single-Step Rewards · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.

검증기 손실과 추론 시 다중 턴 탐색

검증기는 프롬프트와 현재 코드 해법을 입력받아 스칼라 점수를 출력합니다. 원문은 이진 교차 엔트로피 손실(BCE)과 Bradley Terry 손실(BT) 두 가지를 비교하며, BT 손실은 정답과 오답 쌍의 점수 차이를 키우는 방식입니다. 추론 시에는 생성기가 턴마다 N개의 후보를 만들고, 검증기가 가장 높은 후보를 골라 공개 테스트 실행 피드백을 얻습니다. 원문은 공개 테스트 통과 여부를 우선하고 학습된 검증기로 동점을 깨는 혼합 방식이 가장 좋았다고 보고합니다.

Table 3: Comparing BoN with different ways of picking solutions
at each turn for multi-turn BoN search using the 1B sized model.
The hierarchical approach of u…

Table 3 . Comparing BoN with different ways of picking solutions at each turn for multi-turn BoN search using the 1B sized model. The hierarchical approach of using public test and learned veri- fier (PT+LV) outperforms picking solutions with only using either public tests (PT) or the learned verifier (LV). The best performance for each dataset and model-size is highlighted in bold and similar performances (within 1%) are underlined.

원문 · CC BY 4.0 · Jain, Arnav Kumar, Gonzalez-Pumariega, Gonzalo, Chen, Wayne, Rush, Alexander M, Zhao, Wenting, Choudhury, Sanjiban · Multi-Turn Code Generation Through Single-Step Rewards · 원문 그림 인용 · 원본 PDF 6쪽에서 그림 영역을 추출했습니다.
Figure 2: Compares the BoN performance at each turn (with 6 turns) on HumanEval, MBPP datasets. We also present results on a
partially observable version of MB…

Figure 2 . Compares the BoN performance at each turn (with 6 turns) on HumanEval, MBPP datasets. We also present results on a partially observable version of MBPP where we remove the public tests from the prompt to test the efficacy of methods at incorporating execution feedback– MBPP (POMDP). We observe that all methods improve performance with more turns on MBPP and HumanEval datasets. However, on MBPP (POMDP) the performance drops at first turn and µCODE closes the gap with performance on MBPP compared to the baselines demonstrating its ability to incorporate execution feedback to improve code solutions at each turn.

원문 · CC BY 4.0 · Jain, Arnav Kumar, Gonzalez-Pumariega, Gonzalo, Chen, Wayne, Rush, Alexander M, Zhao, Wenting, Choudhury, Sanjiban · Multi-Turn Code Generation Through Single-Step Rewards · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.
Figure 3: Test-time scaling with different values of candidate so-
lutions N at each turn. The candidate solutions are obtained from
the 1B-sized generator of…

Figure 3 . Test-time scaling with different values of candidate so- lutions N at each turn. The candidate solutions are obtained from the 1B-sized generator of µCODE. We observe that the BoN per- formance improves with larger values of N on both datasets.

원문 · CC BY 4.0 · Jain, Arnav Kumar, Gonzalez-Pumariega, Gonzalo, Chen, Wayne, Rush, Alexander M, Zhao, Wenting, Choudhury, Sanjiban · Multi-Turn Code Generation Through Single-Step Rewards · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.
Figure 4: Comparison between BCE and BT loss function for train-
ing the verifier. We train the verifiers on samples generated by
the base model (Llama-3.2-1B-…

Figure 4 . Comparison between BCE and BT loss function for train- ing the verifier. We train the verifiers on samples generated by the base model (Llama-3.2-1B-Instruct). The learned verifier then ranks the candidate solutions from base model and the BoN per- formance of selected solution is reported. The verifier trained with BT loss performs better increasing value of N.

원문 · CC BY 4.0 · Jain, Arnav Kumar, Gonzalez-Pumariega, Gonzalo, Chen, Wayne, Rush, Alexander M, Zhao, Wenting, Choudhury, Sanjiban · Multi-Turn Code Generation Through Single-Step Rewards · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.

일단계 복구 가능성과 성능 상한

원문은 최적 정책의 이득 함수가 −1과 0 사이로 제한되는 경우를 one-step recoverable MDP로 정의합니다. 코드 생성에서는 최적 정책이 프롬프트에만 의존하므로 이 조건을 만족한다고 논증합니다. 정리 3.2는 N번의 µCODE 반복 후 최소 하나의 정책이 J(π*) − J(π) ≤ O(T(ϵ + γ(N)))를 만족한다고 주장하며, 여기서 ϵ은 실현 가능성 오차이고 γ(N)은 평균 후회입니다. 이 상한은 위 가정을 전제로 한 결과입니다.

주요 비교 결과

Llama-3.2-1B-Instruct 기반 µCODE는 N=1에서 MBPP 37.9, HumanEval 35.4를, BoN@5에서 MBPP 51.1, HumanEval 41.5를 기록했다고 원문 표 1에 보고됩니다. 같은 표에서 8B 모델의 CodeContests BoN@5 점수는 16.3입니다. Qwen-2.5-1.5B-Instruct 추가 실험에서는 BoN@5가 MBPP 63.1, HumanEval 74.0입니다. 이 수치들은 각 표에 정의된 기반 모델과 측정 조건에서 얻은 결과입니다.

Table 1: Comparison of our method µCODE with baselines across
MBPP, HumanEval, and CodeContests datasets. N = 1denotes
generating solutions with 0 temperature.…

Table 1 . Comparison of our method µCODE with baselines across MBPP, HumanEval, and CodeContests datasets. N = 1denotes generating solutions with 0 temperature. The Best-of-N (BoN) accuracy is computed with N = 5 candidate solutions at each where the public tests and learned verifier are used for selection. We observe that µCODE outperforms competing methods based on Llama-3.2-1B-Instruct and Llama-3.1-8B-Instruct models. The best performance for each dataset and model-sized is highlighted in bold and similar performances (within 1%) are underlined.

원문 · CC BY 4.0 · Jain, Arnav Kumar, Gonzalez-Pumariega, Gonzalo, Chen, Wayne, Rush, Alexander M, Zhao, Wenting, Choudhury, Sanjiban · Multi-Turn Code Generation Through Single-Step Rewards · 원문 그림 인용 · 원본 PDF 5쪽에서 그림 영역을 추출했습니다.
Table 4: Comparison of our method µCODE with baselines across MBPP, HumanEval using the Qwen-2.5-1.5B-Instruct model

Table 4 . Comparison of our method µCODE with baselines across MBPP, HumanEval using the Qwen-2.5-1.5B-Instruct model.

원문 · CC BY 4.0 · Jain, Arnav Kumar, Gonzalez-Pumariega, Gonzalo, Chen, Wayne, Rush, Alexander M, Zhao, Wenting, Choudhury, Sanjiban · Multi-Turn Code Generation Through Single-Step Rewards · 원문 그림 인용 · 원본 PDF 14쪽에서 그림 영역을 추출했습니다.

범위와 한계

저자들은 실험 모델이 최대 8B 규모였고 MBPP 학습 세트가 374개 문제에 그쳐 결론이 더 큰 모델이나 다른 언어로 일반화되지 않을 수 있다고 밝힙니다. 따라서 이 결과는 Python 데이터셋과 제시된 모델 규모에서의 근거로 읽어야 합니다.

논문 정보

저자
Jain, Arnav Kumar, Gonzalez-Pumariega, Gonzalo, Chen, Wayne, Rush, Alexander M, Zhao, Wenting, Choudhury, Sanjiban
학회·저널
arXiv · 프리프린트
최초 공개일
2025년 2월 27일
등록일
2026년 10월 29일
수정일
2025년 6월 27일
버전
v2
arXiv
2502.20380
원문 이용 조건
CC BY 4.0
제공 범위
논문 정보, 해설, 허용된 원문 그림

AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.

초록

We address the problem of code generation from multi-turn execution feedback. Existing methods either generate code without feedback or use complex, hierarchical reinforcement learning to optimize multi-turn rewards. We propose a simple yet scalable approach, $\mu$Code, that solves multi-turn code generation using only single-step rewards. Our key insight is that code generation is a one-step recoverable MDP, where the correct code can be recovered from any intermediate code state in a single turn. $\mu$Code iteratively trains both a generator to provide code solutions conditioned on multi-turn execution feedback and a verifier to score the newly generated code. Experimental evaluations show that our approach achieves significant improvements over the state-of-the-art baselines. We provide analysis of the design choices of the reward models and policy, and show the efficacy of $\mu$Code at utilizing the execution feedback. Our code is available at https://github.com/portal-cornell/muCode.

원문 인용

Jain, Arnav Kumar, Gonzalez-Pumariega, Gonzalo, Chen, Wayne, Rush, Alexander M, Zhao, Wenting, Choudhury, Sanjiban (2025). Multi-Turn Code Generation Through Single-Step Rewards. arXiv:2502.20380v2. https://arxiv.org/abs/2502.20380v2

BibTeX
@misc{kumar2025multi,
  title = {{Multi-Turn Code Generation Through Single-Step Rewards}},
  author = {Jain, Arnav Kumar and Gonzalez-Pumariega, Gonzalo and Chen, Wayne and Rush, Alexander M and Zhao, Wenting and Choudhury, Sanjiban},
  year = {2025},
  eprint = {2502.20380},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2502.20380v2}
}

관련 논문 보기다른 논문 둘러보기

논문 미리 보기
계정 보안

Google 계정 연결

Google 계정을 연결하면 그 계정으로도 로그인할 수 있습니다.

Refivu

회원탈퇴

Refivu
Refivu

회원가입