[논문 리뷰] Conversational Automated Program Repair
이 논문은 대화형 APR을 도입합니다. 이는 피드백을 통해 패치를 생성하고 검증하는 과정을 교대로 수행하는 LLM 기반 접근 방식으로, 다수의 모델과 벤치마크에서 기존 샘플링 방식보다 수리 효과를 향상시킵니다.
Automated Program Repair (APR) can help developers automatically generate patches for bugs. Due to the impressive performance obtained using Large Pre-Trained Language Models (LLMs) on many code related tasks, researchers have started to directly use LLMs for APR. However, prior approaches simply repeatedly sample the LLM given the same constructed input/prompt created from the original buggy code, which not only leads to generating the same incorrect patches repeatedly but also miss the critical information in testcases. To address these limitations, we propose conversational APR, a new paradigm for program repair that alternates between patch generation and validation in a conversational manner. In conversational APR, we iteratively build the input to the model by combining previously generated patches with validation feedback. As such, we leverage the long-term context window of LLMs to not only avoid generating previously incorrect patches but also incorporate validation feedback to help the model understand the semantic meaning of the program under test. We evaluate 10 different LLM including the newly developed ChatGPT model to demonstrate the improvement of conversational APR over the prior LLM for APR approach.
연구 동기 및 목표
- 테스트 결과의 피드백을 활용하여 APR에서 수동 노력을 줄이는 것을 동기로 삼는다.
- 대화형 APR을 제안하여 patch 생성과 검증을 교대로 수행하고 LLM의 장기 맥락 능력을 활용한다.
- 검증 피드백과 이전에 생성된 패치를 포함시키면 패치 다양성과 성공률이 여러 모델에서 향상된다는 것을 보여준다.
- ChatGPT를 포함한 10개의 LLM에 대해 표준 버그 수정 벤치마크에서 대화형 APR의 효과성과 효율성을 평가한다.
제안 방법
- 대화형 턴을 패치 생성, 검증, 피드백 추출로 정의한다.
- 이전 패치와 그 검증 피드백을 연결한 입력 프롬프트를 구성하여 후속 생성을 안내한다.
- 최대 체인 길이를 사용하여 LLM 컨텍스트를 관리하고 필요시 신선한 체인으로 자동 재시작한다.
- 동일한 프롬프트 하에서 대화형 APR을 기준 샘플링 접근법과 비교한다.
- QuixBugs의 Python 및 Java에 대해 여러 LLM(CodeGen 변형, Codex, ChatGPT)을 대상으로 평가한다.

실험 결과
연구 질문
- RQ1RQ1: 대화형 APR이 기준 샘플링 기반 LLM APR과 비교하여 얼마나 효과적인가?
- RQ2RQ2: 다양한 구성 요소(체인 길이, 검증 프롬프트)가 성능에 어떤 영향을 미치는가?
- RQ3RQ3: 동일 벤치마크에서 이 대화형 APR에 대해 ChatGPT가 다른 LLM과 어떻게 비교되는가?
- RQ4RQ4: 프롬프트 스타일과 검증 피드백이 수리 결과에 어떤 영향을 미치는가?
주요 결과
- 대화형 APR은 다양한 크기의 unsupervised LLMs가 있는 경우에도 기준 샘플링에 비해 올바르고 그럴듯한 패치 수를 향상시킨다.
- 더 긴 체인 길이는 모델 의존적이지만 포인트까지 도움을 준다( CodeGen의 경우 약 3–4 턴; 더 큰 모델은 더 긴 체인을 더 잘 처리한다).
- 기능적 검증 프롬프트( 테스트 입력으로 함수를 호출 )가 프롬프트 스타일 중 가장 좋은 결과를 낳는다.
- ChatGPT는 일반적으로 Codex보다 이 설정에서 우수하며, 대화에 초점이 맞춰진 학습과 RLHF의 이점을 얻는다.
- 검증 피드백을 사용하면 반복 패치를 줄이고 그럴듯한/올바른 패치를 얻는 데 필요한 샘플(시도) 수를 줄인다.

더 나은 연구,지금 바로 시작하세요
논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.