Skip to main content
QUICK REVIEW

[논문 리뷰] The Fact Selection Problem in LLM-Based Program Repair

Nikhil Parasaram, Huijie Yan|arXiv (Cornell University)|2024. 04. 08.
Advanced Data Storage Technologies인용 수 4
한 줄 요약

이 논문은 LLM 기반 프로그램 복구에서 너무 많은 버그 관련 사실을 프롬프트에 포함할 경우 복구 효과성이 떨어지는 '사실 선택 문제'를 규명한다. 저자들은 BugsInPy 벤치마크에서 19,000개의 프롬프트를 대상으로 대규모 연구를 수행하고, 각 버그에 특화된 사실을 선택하는 데에 효과적인 Maniple이라는 통계적 사실 선택 모델을 제안한다. 이 모델은 일반적인 사실 세트보다 뛰어난 성능을 보이며, 벤치마크에서 88개의 버그를 복구하여 최고의 베이스라인 대비 17% 높은 성능을 달성한다.

ABSTRACT

Recent research has shown that incorporating bug-related facts, such as stack traces and GitHub issues, into prompts enhances the bug-fixing capabilities of large language models (LLMs). Considering the ever-increasing context window of these models, a critical question arises: what and how many facts should be included in prompts to maximise the chance of correctly fixing bugs? To answer this question, we conducted a large-scale study, employing over 19K prompts featuring various combinations of seven diverse facts to rectify 314 bugs from open-source Python projects within the BugsInPy benchmark. Our findings revealed that each fact, ranging from simple syntactic details like code context to semantic information previously unexplored in the context of LLMs such as angelic values, is beneficial. Specifically, each fact aids in fixing some bugs that would remain unresolved or only be fixed with a low success rate without it. Importantly, we discovered that the effectiveness of program repair prompts is non-monotonic over the number of used facts; using too many facts leads to subpar outcomes. These insights led us to define the fact selection problem: determining the optimal set of facts for inclusion in a prompt to maximise LLM's performance on a given task instance. We found that there is no one-size-fits-all set of facts for bug repair. Therefore, we developed a basic statistical model, named Maniple, which selects facts specific to a given bug to include in the prompt. This model significantly surpasses the performance of the best generic fact set. To underscore the significance of the fact selection problem, we benchmarked Maniple against the state-of-the-art zero-shot, non-conversational LLM-based bug repair methods. On our testing dataset of 157 bugs, Maniple repairs 88 bugs, 17% above the best configuration.

연구 동기 및 목표

  • 다양한 버그 관련 사실이 LLM 기반 프로그램 복구 성능에 미치는 영향을 조사하는 것.
  • 프롬프트에 포함된 사실 수를 늘릴수록 복구 결과가 향상되는지 악화되는지 판단하는 것.
  • 사실 수와 복구 성공률 사이에 비단조화적 관계가 존재하는지 확인하는 것.
  • 일반적인 설정을 넘어서 LLM 기반 복구 성능을 향상시키기 위한 맞춤형 사실 선택 전략을 개발하는 것.
  • 통계 모델(Maniple)이 개별 버그에 최적의 사실을 선택하는 데에 얼마나 효과적인지 평가하는 것.

제안 방법

  • BugsInPy 벤치마크의 314개 버그에서 7종류의 서로 다른 사실을 다양한 조합으로 사용한 19,000개의 프롬프트를 활용한 대규모 실증 연구를 수행함.
  • 코드 컨텍스트, 스텍 트레이스, GitHub 이슈, 그리고 천사 값 같은 새로운 의미적 사실을 포함한 다양한 사실들을 통합함.
  • 각 버그에 특화된 사실을 그 버그의 복구 효과성에 기반해 선택하는 통계 모델인 Maniple을 제안함.
  • 각 사실-버그 조합의 이력 복구 성공률을 활용해 Maniple을 훈련하여 최적의 사실 세트를 예측함.
  • 보류된 테스트 세트 157개의 버그에서, 제로샷 및 비대화형 LLM 기반 복구 방법과 Maniple을 비교 평가함.
  • 비단조화적 성능 곡선을 활용해 각 버그에 최적의 사실 수를 식별함으로써 프롬프트의 과도한 부담을 방지함.

실험 결과

연구 질문

  • RQ1다양한 버그 관련 사실의 조합이 LLM 기반 프로그램 복구 성공률에 어떻게 영향을 미치는가?
  • RQ2프롬프트에 포함된 사실 수와 복구 효과성 사이에 비단조화적 관계가 존재하는가?
  • RQ3데이터 기반의 버그 전용 사실 선택 모델이 일반적인 사실 세트보다 LLM 기반 복구에서 뛰어난 성능을 내는가?
  • RQ4천사 값 같은 이전에 탐색되지 않은 의미적 사실 유형을 포함할 경우 복구 결과에 어떤 영향을 미치는가?
  • RQ5맞춤형 사실 선택 모델(Maniple)의 성능은 최신의 제로샷 LLM 기반 복구 방법과 비교해 어떻게 되는가?

주요 결과

  • 구문적 코드 컨텍스트에서 의미적 천사 값에 이르기까지 7종류의 사실 각각이, 그렇지 않으면 복구되지 않을 버그에 대해 복구 성공률을 향상시킴.
  • 프롬프트의 효과는 비단조화적임: 너무 많은 사실을 포함하면 복구 성능이 심각하게 저하됨.
  • 모든 버그에서 최적의 복구를 달성하는 유일한 보편적 사실 세트는 존재하지 않음. 이는 사실 선택 문제의 존재를 확인함.
  • 버그 전용 사실 선택 모델인 Maniple은 테스트 세트에서 157개의 버그 중 88개를 복구하여, 최고의 일반 설정 대비 17% 높은 성능 기록.
  • 천사 값이라는 사실 유형을 포함시킴으로써, 이전에 LLM 기반 복구에서 탐색되지 않은 특정 유형의 버그에 대해 복구 결과가 크게 향상됨.
  • LLM 기반 APR의 프롬프트 엔지니어링은 단순히 사실을 더 추가하는 것 이상의 적응적이고 맥락 인식적인 접근이 필요함을 입증함.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.