A Novel Approach for Automatic Program Repair using Round-Trip Translation with Large Language Models

要約

研究によると、文内の文法上の間違いは、言語モデルを備えたニューラル機械翻訳を使用して別の言語に翻訳し、元の言語に翻訳することで修正できることがわかっています。
大規模言語モデル (LLM) のこの修正機能が自動プログラム修復 (APR) にも拡張されるかどうかを調査します。
現在の APR の生成モデルは、ソース コードで事前トレーニングされ、修復のために微調整されています。
このペーパーでは、微調整ステップをバイパスし、ラウンドトリップ翻訳 (RTT) を使用することを提案します。つまり、あるプログラミング言語から別のプログラミング言語または自然言語にコードを変換し、またその逆に変換します。
LLM を使用した RTT は、事前トレーニング中にコードで最も一般的に見られるパターンを復元する、つまり、平均に向けて回帰を実行し、バグはノイズの一種であるため、バグを除去すると仮説を立てます。
トレーニング データ内のより頻繁で自然なバグのないコード。
この仮説を検証するために、最新の GPT バージョンを含む、コード上で事前トレーニングされた 8 つの最近の LLM と、Java の 4 つの一般的なプログラム修復ベンチマークを使用します。
英語を中間言語として使用した RTT は、HumanEval-Java データセット上の GPT-4 の 164 個のバグのうち 101 個を修復したことがわかりました。
さらに、このうち 46 件は、APR 用に微調整された他の LLM では修復できない固有のバグです。
私たちの調査結果は、自動プログラム修復技術としての LLM による往復変換の実現可能性と、ソフトウェア エンジニアリングにおける研究における可能性を強調しています。
キーワード: 自動プログラム修復、大規模言語モデル、機械翻訳

要約(オリジナル)

Research shows that grammatical mistakes in a sentence can be corrected by translating it to another language and back using neural machine translation with language models. We investigate whether this correction capability of Large Language Models (LLMs) extends to Automatic Program Repair (APR). Current generative models for APR are pre-trained on source code and fine-tuned for repair. This paper proposes bypassing the fine-tuning step and using Round-Trip Translation (RTT): translation of code from one programming language to another programming or natural language, and back. We hypothesize that RTT with LLMs restores the most commonly seen patterns in code during pre-training, i.e., performs a regression toward the mean, which removes bugs as they are a form of noise w.r.t. the more frequent, natural, bug-free code in the training data. To test this hypothesis, we employ eight recent LLMs pre-trained on code, including the latest GPT versions, and four common program repair benchmarks in Java. We find that RTT with English as an intermediate language repaired 101 of 164 bugs with GPT-4 on the HumanEval-Java dataset. Moreover, 46 of these are unique bugs that are not repaired by other LLMs fine-tuned for APR. Our findings highlight the viability of round-trip translation with LLMs as a technique for automated program repair and its potential for research in software engineering. Keywords: automated program repair, large language model, machine translation

arxiv情報

著者 Fernando Vallecillos Ruiz,Anastasiia Grishina,Max Hort,Leon Moonen
発行日 2024-01-15 22:36:31+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.CL, cs.LG, cs.SE パーマリンク