重新审视数据污染在代码智能中的影响
Contamination Means Overestimation? A Fine-Grained Empirical Study in Code Intelligence
AI总结:
本文重新审视了数据污染对代码智能模型的影响,发现不同模型在不同污染场景下的表现差异显著,挑战了污染必然导致性能高估的传统观点。
摘要:
近年来,代码智能在自动化软件工程领域的重要性日益增加。同时,预训练语言模型(PLMs)和大语言模型(LLMs)的广泛应用引发了对数据污染及其对模型性能评估潜在影响的关注。先前的研究主要集中在样本层面的污染,忽略了在代码智能中普遍存在的部分污染场景。本文填补了这一空白,提出了一项系统性的实证研究,以调查主流代码任务中的细粒度数据污染。我们的研究涵盖了多种代表性的PLMs:RoBERTa和GPT-2,以及LLMs:LLaMA和StarCoder,在Java和Python两种编程语言上覆盖了三个主要任务:代码翻译、代码生成和代码摘要。我们根据代码智能实践将污染场景分为四类:仅输入、仅输出、未配对和配对污染设置,并为探索构建了相应的实验组和对照组。实验结果表明,在PLMs采用的预训练、微调和推理范式下,即使故意注入配对污染也不会导致性能高估。但直接推理或小规模微调会揭示污染的影响。相比之下,具有预训练和推理范式的LLMs对配对污染有显著影响。此外,其他污染场景对PLMs和LLMs都没有影响。我们的发现挑战了传统观点,即污染必然导致性能高估,为代码智能模型的评估和部署提供了新的见解。
英文摘要:
In recent years, code intelligence has gained increasing importance in the field of automated software engineering. Meanwhile, the widespread adoption of Pretrained Language Models (PLMs) and Large Language Models (LLMs) has raised concerns regarding data contamination and its potential impact on model performance evaluation. Previous studies mainly focused on sample-level contamination, ignoring partial contamination scenarios that are pervasive in code intelligence. This paper fills this gap and presents a systematic empirical study to investigate the fine-grained data contamination on mainstream code tasks. Our study involves diverse representative PLMs: RoBERTa and GPT-2, and LLMs: LLaMA and StarCoder, covering three major tasks: code translation, code generation, and code summarization, across two Programming Languages (PLs): Java and Python. We categorize contamination scenarios into four types according to the code intelligence practice, namely input-only, output-only, unpaired, and paired contamination settings, and construct corresponding experimental and control groups for exploration. Experimental results show that, under the pre-training, fine-tuning, and inference paradigm adopted by PLMs, even deliberately injecting paired contamination does not lead to significant performance overestimation. But direct inference or small-scale fine-tuning uncovers the contamination effects. In contrast, LLMs with pre-training and inference paradigm are significantly affected by the paired contamination. Apart from the above, other contamination scenarios have no impact on both PLMs and LLMs. Our findings challenge the conventional belief that contamination inevitably leads to performance overestimation, providing new insights into the evaluation and deployment of code intelligence models.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。