atlas

Research map / Large language models / Instruction and fine-tuning

How Contaminated Is Your Benchmark? Measuring Dataset Leakage in Large Language Models with Kernel Divergence

ICML 2025 · Large language models › Instruction and fine-tuning · approach: Safety alignment after fine-tuning

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes Kernel Divergence Score (KDS), which measures benchmark contamination by how much LoRA fine-tuning changes the RBF kernel similarity matrix of sample embeddings, and shows near-perfect monotonicity on controlled seen/unseen mixtures.

Problem

Measuring how much an evaluation benchmark has overlapped with an LLM's pre-training data at the dataset level, when the pre-training corpus is unavailable, with scores that are monotonic in contamination rate and consistent across subsets.

Approach

Fine-tuning (LoRA SFT) on a benchmark changes embedding relationships among unseen samples more than among seen ones; KDS computes a normalized, soft-gated divergence between the RBF kernel matrices of embeddings before and after fine-tuning, and negates it so higher means more contamination.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use Kernel Divergence Score instead of the strongest baselineMistral-7B-Instruct-v0.2 contamination scoring · WikiMIASpearman correlation: 0.979 -> 0.999Helped
Use Kernel Divergence Score instead of Min-K%Mistral-7B-Instruct-v0.2 contamination scoring · BookMIASpearman correlation: 0.998 -> 0.997Hurt
Use Kernel Divergence Score instead of PerplexityMistral-7B-Instruct-v0.2 contamination scoring · ArxivTectionSpearman correlation: 1.000 -> 0.975Hurt
Use Kernel Divergence Score instead of the strongest baselineMistral-7B-Instruct-v0.2 contamination scoring · Average across WikiMIA, BookMIA, and ArxivTectionSpearman correlation: 0.966 -> 0.990Helped
Remove soft gating (ablation)Kernel Divergence Score · WikiMIASpearman correlation: 0.999 -> 0.998Hurt
Add fine-tuning-induced pairwise distance changes (ablation)Kernel Divergence Score · WikiMIASpearman correlation: 0.683 -> 0.999Helped
Replace RBF with Euclidean Distance Kernel (ablation)Kernel Divergence Score · WikiMIASpearman correlation: 0.999 -> 0.999No clear effect
Replace RBF with Cosine Similarity Kernel (ablation)Kernel Divergence Score · WikiMIASpearman correlation: 0.999 -> 0.998No clear effect
Replace RBF with Dot-product Kernel (ablation)Kernel Divergence Score · WikiMIASpearman correlation: 0.999 -> 0.998No clear effect
Set kernel bandwidth γ to 0.001, 0.01, 0.1, or 1.0 instead of the median heuristic (ablation)Kernel Divergence Score · WikiMIASpearman correlation: 0.999 -> 0.999No clear effect
Set kernel bandwidth γ to 10.0 instead of the median heuristic (ablation)Kernel Divergence Score · WikiMIASpearman correlation: 0.999 -> 0.801Hurt
Replace stochastic GD with batch GD (ablation)Kernel Divergence Score with 1 fine-tuning epoch · WikiMIASpearman correlation: 0.999 -> 0.908Hurt

Surprising findings

Limitations

Experimental setup

Datasets: WikiMIA BookMIA ArxivTection The Pile subsets (Wikipedia, PhilPapers, Enron, HackerNews, Pile-CC, StackExchange)

Benchmarks: WikiMIA BookMIA ArxivTection The Pile subsets

Metrics: Spearman correlation Pearson correlation MAPE (consistency)

Baselines: Zlib Zlib + FSD Perplexity Perplexity + FSD Min-K% Min-K% + FSD Min-K%++ Min-K%++ + FSD SRCT

Builds on: Fine-tuned Score Deviation Sharded Rank Comparison Test Min-K% Prob LoRA

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy