首次系统检测83个编程任务数据泄露,发现部分基准存在严重数据泄露问题。
LessLeak-Bench: A First Investigation of Data Leakage in LLMs Across 83 Software Engineering Benchmarks
- 分析83个软件工程基准,量化大模型训练中数据泄露比例。
- 平均泄露率仅4.8%(Python),但QuixBugs等高达100%。
- 提出LessLeak-Bench新基准,移除泄露样本以提升评估可靠性。
大型语言模型(LLMs)在代码生成、程序修复等软件工程任务中广泛应用,但其预训练数据常未公开,导致评估基准数据可能在模型构建阶段被无意“见过”,引发数据泄露问题,严重削弱研究有效性。本文首次对83个软件工程基准中的数据泄露现象进行大规模分析。结果表明,总体泄露率较低:Python、Java、C/C++基准的平均泄露率分别为4.8%、2.8%和0.7%。然而,部分基准泄露严重,如QuixBugs和BigCloneBench的泄露率分别高达100.0%和55.7%。我们还发现数据泄露显著影响模型评估结果,并识别出主要成因:基准数据被直接纳入预训练集,或使用LeetCode等平台构建基准。为此,我们提出LessLeak-Bench,通过移除泄露样本重构83个基准,为未来可信的LLM评估提供基础。
原文摘要 · Abstract (English)
Large Language Models (LLMs) are widely utilized in software engineering (SE) tasks, such as code generation and automated program repair. However, their reliance on extensive and often undisclosed pre-training datasets raises significant concerns about data leakage, where the evaluation benchmark data is unintentionally ``seen'' by LLMs during the model's construction phase. The data leakage issue could largely undermine the validity of LLM-based research and evaluations. Despite the increasing use of LLMs in the SE community, there is no comprehensive study that assesses the extent of data leakage in SE benchmarks for LLMs yet. To address this gap, this paper presents the first large-scale analysis of data leakage in 83 SE benchmarks concerning LLMs. Our results show that in general, data leakage in SE benchmarks is minimal, with average leakage ratios of only 4.8\%, 2.8\%, and 0.7\% for Python, Java, and C/C++ benchmarks, respectively. However, some benchmarks exhibit relatively higher leakage ratios, which raises concerns about their bias in evaluation. For instance, QuixBugs and BigCloneBench have leakage ratios of 100.0\% and 55.7\%, respectively. Furthermore, we observe that data leakage has a substantial impact on LLM evaluation. We also identify key causes of high data leakage, such as the direct inclusion of benchmark data in pre-training datasets and the use of coding platforms like LeetCode for benchmark construction. To address the data leakage, we introduce \textbf{LessLeak-Bench}, a new benchmark that removes leaked samples from the 83 SE benchmarks, enabling more reliable LLM evaluations in future research. Our study enhances the understanding of data leakage in SE benchmarks and provides valuable insights for future research involving LLMs in SE.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。