SrDetection: A Self-Referential Framework for Data Leakage Detection in Code Large Language Models

Shuaimin Li, Liyang Fan, Zeyang Li, Zhuoyue Wan, Yufang Lin +7 more
6/29/2026
cs.CL

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Evaluating code large language models (Code LLMs) requires reliable detection of data leakage, where benchmark performance is artificially inflated by exposure to benchmark data during pre-training. Existing approaches either assume access to proprietary training corpora, rely on brittle heuristics such as timestamp filtering, or use external reference sets with manually tuned, non-generalizable thresholds.

Show full abstract

To address these limitations, we introduce \textbf{SrDetection}, a unified \textbf{s}elf-\textbf{r}eferential leakage detection framework for both gray-box (access to model logits) and black-box (access to model outputs) settings. SrDetection generates semantically equivalent variants of a benchmark sample and detects leakage by contrasting the model's behavior on the original versus its variants, flagging cases where the original is disproportionately easier for the model. We further design a controlled leakage detection testbed and evaluate SrDetection in this environment. Across different models and training stages, SrDetection improves average F1 by 21.52 points in the gray-box setting and 14.46 points in the black-box setting over strong baselines, demonstrating robust, threshold-independent leakage detection. Finally, a gray-box study of 15 widely used Code LLMs on four popular benchmarks reveals benchmark-specific leakage patterns beyond prior overlap-based analyses\footnote{\footnotesize Source code and data are available at https://github.com/SMinL/SrDetectionCode

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2026srdetection,
  title  = {SrDetection: A Self-Referential Framework for Data Leakage Detection in Code Large Language Models},
  author = {Shuaimin Li and Liyang Fan and Zeyang Li and Zhuoyue Wan and Yufang Lin and Shiwen Ni and Feiteng Fang and Hamid Alinejad-Rokny and Yuanfeng Song and Kun Jing and Chen Jason Zhang and Min Yang},
  year   = {2026},
  eprint = {2606.29815},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.29815v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.29815.svg)](https://codeofpaper.com/paper/2606.29815)

Discussion