Skip to main content
QUICK REVIEW

[논문 리뷰] On the Evaluation of Commit Message Generation Models: An Experimental Study

Wei Tao, Yanlin Wang|arXiv (Cornell University)|2021. 07. 12.
Software Engineering Research인용 수 4
한 줄 요약

이 논문은 다수의 프로그래밍 언어를 대상으로 커밋 메시지 생성 모델에 대한 체계적 실증 연구를 수행하며, 평가 지표, 데이터셋, 분할 전략을 평가한다. 인간 평가와 가장 높은 상관관계를 보이는 BLEU-Norm가 가장 적합한 지표로 규명되었고, 다섯 가지 언어로 구성된 360만 건이 넘는 메시지를 포함하는 대규모 MCMD 데이터셋을 제안하며, 모델 성능이 데이터셋 분할 전략에 따라 크게 달라짐을 입증하여 향후 평가 및 모델 선택을 위한 실용적 지침을 제공한다.

ABSTRACT

Commit messages are natural language descriptions of code changes, which are important for program understanding and maintenance. However, writing commit messages manually is time-consuming and laborious, especially when the code is updated frequently. Various approaches utilizing generation or retrieval techniques have been proposed to automatically generate commit messages. To achieve a better understanding of how the existing approaches perform in solving this problem, this paper conducts a systematic and in-depth analysis of the state-of-the-art models and datasets. We find that: (1) Different variants of the BLEU metric are used in previous works, which affects the evaluation and understanding of existing methods. (2) Most existing datasets are crawled only from Java repositories while repositories in other programming languages are not sufficiently explored. (3) Dataset splitting strategies can influence the performance of existing models by a large margin. Some models show better performance when the datasets are split by commit, while other models perform better when the datasets are split by timestamp or by project. Based on our findings, we conduct a human evaluation and find the BLEU metric that best correlates with the human scores for the task. We also collect a large-scale, information-rich, and multi-language commit message dataset MCMD and evaluate existing models on this dataset. Furthermore, we conduct extensive experiments under different dataset splitting strategies and suggest the suitable models under different scenarios. Based on the experimental results and findings, we provide feasible suggestions for comprehensively evaluating commit message generation models and discuss possible future research directions. We believe this work can help practitioners and researchers better evaluate and select models for automatic commit message generation.

연구 동기 및 목표

  • 커밋 메시지 생성 연구 분야에서 일관되고 종합적인 평가 관행의 부족을 해결하기 위해.
  • 특히 BLEU 변종이 인간 평가와 얼마나 상관관계가 있는지 조사하기 위해.
  • 언어 다양성과 데이터 분할 전략를 포함한 데이터셋 구성이 모델 성능에 미치는 영향을 탐구하기 위해.
  • 더 넓고 현실적인 평가를 지원하기 위해 다국어 커밋 메시지 데이터셋(MCMD)을 수집하고 공개하기 위해.
  • 연구자 및 실무자들이 커밋 메시지 생성 모델을 선택하고 평가하는 데 실질적인 권고안을 제공하기 위해.

제안 방법

  • BLEU 점수에 큰 변동이 있는 100개의 커밋 메시지에 대해 인간 평가를 실시하여 자동 평가 지표와 인간 평가 간의 상관관계를 평가하였다.
  • NNGen 기반 검색 모델에 대한 두 가지 개선 사항을 제안하고 평가하였다: n-gram 표현 사용(NNGen-Gram4) 및 스무딩 함수 적용(NNGen-Smooth).
  • 5개의 인기 있는 프로그래밍 언어(자바, 파이썬, 자바스크립트, C++, 고)에서 500개의 레포지터리로부터 커밋 메시지를 수집하고 정제하여, rich한 맥락 메타데이터를 포함한 360만 건이 넘는 커밋 메시지로 구성된 MCMD 데이터셋을 구축하였다.
  • 모델 성능에 미치는 영향을 평가하기 위해 세 가지 데이터셋 분할 전략(커밋 기반, 타임스탬프 기반, 프로젝트 기반)에서 최신 기술 모델을 평가하였다.
  • 인간 점수와의 상관관계를 비교하기 위해 피어슨 및 스피어만 상관계수를 사용하여 BLEU 변종(B-Moses, B-Norm, B-CC)을 평가하여 가장 신뢰할 수 있는 지표를 규명하였다.
  • 가능한 한 원본 모델 구현을 재사용하고, 새로운 구현 사례에 대해 이중 검증을 실시하여 재현 가능성과 타당성을 확보하였다.

실험 결과

연구 질문

  • RQ1BLEU 변종 중에서(B-Moses, B-Norm, B-CC) 인간 평가와 가장 강한 상관관계를 보이는 것은 무엇인가?
  • RQ2다양한 데이터셋 분할 전략(커밋 기반, 타임스탬프 기반, 프로젝트 기반)이 기존 커밋 메시지 생성 모델의 성능에 어떤 영향을 미치는가?
  • RQ3학습 및 평가 데이터셋의 언어 다양성이 모델의 일반화 능력과 성능에 어느 정도의 영향을 미치는가?
  • RQ4기존 기반 검색 모델에 대한 단순한 수정(예: n-gram 색인, 스무딩)이 성능 향상에 상당한 기여를 할 수 있는가?
  • RQ5현재 커밋 메시지 생성 모델 평가 관행의 주요 한계와 위협 요소는 무엇인가?

주요 결과

  • BLEU-Norm가 인간 평가와 가장 높은 상관관계를 보이며(피어슨 r = 0.62, 스피어만 ρ = 0.58) 커밋 메시지 생성 모델 평가에 가장 적합한 지표로 규명되었다.
  • 모델 성능은 데이터셋 분할 전략에 따라 크게 달라지며, 커밋 기반 분할 전략에서 성능이 뛰어나지만, 프로젝트 기반 또는 타임스탬프 기반 분할 전략에서는 성능이 크게 하락함을 확인하였다.
  • 5개 프로그래밍 언어에 걸쳐 360만 건 이상의 커밋 메시지를 포함하는 MCMD 데이터셋은 대부분의 기존 데이터셋이 자바에 크게 치우쳐 있음을 드러내어 일반화 능력에 제한이 있음을 시사한다.
  • 1-gram에서 4-gram 표현으로 검색 인덱스를 개선한 NNGen-Gram4는 BLEU-Norm 점수를 23.07에서 23.92로 상승시켰고, 스무딩 기법을 추가한 NNGen-Smooth-Gram4는 점수를 24.03으로 further 향상시켰다.
  • 기존 모델은 프로젝트 기반 및 타임스탬프 기반 분할 전략 하에서 일반화 능력이 제한되어 있어, 더 나은 데이터 분할 전략 및 데이터 증강 기법이 필요함을 시사한다.
  • 인간 평가에서 심각한 편향 위험이 드러났지만, 명확한 평가 기준과 평가자 간 논의를 통해 이는 완화되었으며, 평가자 간 표준편차가 낮게 유지되었다.

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

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

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

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