Back to list
LLM ベースのプログラム修復における暗記の診断:メタモーフィック・テストと負の対数尤度値を組み合わせたアプローチ
A Metamorphic Testing Approach to Diagnosing Memorization in LLM-Based Program Repair
Translated: 2026/4/24 20:27:22
Japanese Translation
arXiv:2604.21579v1 Announce Type: cross
要旨:
LLM(大規模言語モデル)ベースの自動プログラム修復(APR)技術は、デバッグコストを削減する有望な結果を示しています。しかし、従来の結果はデータリークの影響を受け得ます。LLM は評価ベンチマークが事前学習データと重複している場合、バグ修正を暗記(暗記)することがあり、性能評価が膨らんでしまうからです。本論文では、暗記を代理指標として使用してきた過去の研究における負の対数尤度値(NLL)と、メタモーフィック・テスト(MT)を組み合わせることで、データリークをより効果的に明らかにできるか調査します。意味保存変換を適用して、Defects4J および GitBug-Java という 2 つの広範に使用されているデータセットに変種ベンチマークを作成しました。これらのベンチマークを用いて、7 つの LLM が元のバージョンおよび変換されたバージョンにおける修復成功率を評価し、性能低下と NLL との関係を分析しました。私達の結果は、すべての評価された最先进の LLM が変換されたベンチマークにおいてパッチ生成成功率に大幅な低下を示すことを見出しました。GPT-4o の場合の -4.1% から Llama-3.1 の場合の -15.98% まで範囲に及びます。さらに、この低下は元のベンチマークにおける NLL と強く相関しており、モデルが暗記する可能性が高いインスタンスにおいてより良好にパフォーマンスを発揮していることを示唆しています。これらの発見は、NLL と MT を組み合わせることで、データリークに対するより強く、より信頼性の高い証拠を提供できることを示しています。これに反して、メタモーフィック・テスト単体では、LLM ベースの APR 評価におけるその効果を検証するために役立ちます。
Original Content
arXiv:2604.21579v1 Announce Type: cross
Abstract: LLM-based automated program repair (APR) techniques have shown promising results in reducing debugging costs. However, prior results can be affected by data leakage: large language models (LLMs) may memorize bug fixes when evaluation benchmarks overlap with their pretraining data, leading to inflated performance estimates. In this paper, we investigate whether we can better reveal data leakage by combining metamorphic testing (MT) with negative log-likelihood (NLL), which has been used in prior work as a proxy for memorization. We construct variant benchmarks by applying semantics-preserving transformations to two widely used datasets, Defects4J and GitBug-Java. Using these benchmarks, we evaluate the repair success rates of seven LLMs on both original and transformed versions, and analyze the relationship between performance degradation and NLL. Our results show that all evaluated state-of-the-art LLMs exhibit substantial drops in patch generation success rates on transformed benchmarks, ranging from -4.1% for GPT-4o to -15.98% for Llama-3.1. Furthermore, we find that this degradation strongly correlates with NLL on the original benchmarks, suggesting that models perform better on instances they are more likely to have memorized. These findings show that combining MT with NLL provides stronger and more reliable evidence of data leakage, while metamorphic testing alone can help mitigate its effects in LLM-based APR evaluations.