Uncovering the Tells: Efficient Black-Box Audits for LLM Data Contamination

Dominik B. Lau1*, Filip Pawlicki1,2*, Jan Dubiński1, Sebastian Cygert1,2
1NASK National Research Institute, 2Gdańsk University of Technology
Preprint, 2026

*Equal contribution; order determined by a coin flip
Overview of the black-box contamination audit

Abstract

Existing methods for assessing training data contamination in Large Language Models achieve high accuracy, but fundamentally rely on gray-box access, rendering them inapplicable to fully black-box environments. This limitation forces auditors to rely on full-sequence sampling or rigid heuristics, both of which incur prohibitive inference costs and struggle to isolate the underlying memorization signal. To overcome this, we propose a generation-based black-box framework that infers context-induced information gain from targeted token discrepancies. We introduce a budget-constrained auditing regime, building on the empirical observation that the membership signal is highly sparse and concentrated in a few highly informative tokens. We formalize this sparsity, showing why uniform sampling needs many more samples than a policy that targets informative positions. Empirically, our approach achieves state-of-the-art black-box separation accuracy while needing about 3× fewer queries than uniform position sampling. Finally, we apply this methodology to closed frontier models, exploring its capacity and limits in surfacing potential training data overlaps on commercial APIs.

Method

For each document we ask the model for its next token at a chosen position twice: once with and once without a short context built from the most similar other documents in the audited dataset. We record only whether the greedy token matches the ground truth, giving a shift δj ∈ {−1, 0, +1} per position. No log-probabilities are needed.

  • Memorized text already has strong exact-match priors, so extra context mostly hurts (δ = −1).
  • Unseen text has more room to improve, so context mostly helps (δ = +1) through in-context learning.
  • Sparsity. Only ρ ≈ 0.1 of positions change at all. A Bernstein-bound argument shows uniform sampling needs about 1/ρ times more positions than a policy that targets informative ones.
  • LCS token selection. We query tokens within the Longest Common Subsequence between the target document and the context, which concentrates the budget on informative positions.

Counting the shifts over the queried positions of a dataset D, with n+ positions where context helps (δ = +1) and n− positions where it hurts (δ = −1), the dataset-level contamination score is

S(D)  =  n− n+ + n−  =  (1 − μ) / 2,   μ = E[δ | δ ≠ 0]

It is the share of changed positions where context hurt. Seen data scores high, unseen data low. Positions with δ = 0 are ignored.

Uncovering the Tells

Run an audit step by step.

1 Pick a dataset Pythia was trained only on the Pile and OLMo only on Dolma, so each model has seen one group and not the other. The last group was published after both were trained.
The Pile (seen by Pythia, unseen by OLMo)
Dolma (seen by OLMo, unseen by Pythia)
Published later (unseen by both)
2 Pick a model to audit We only see the text it generates, one greedy token at a time.
3 Run the audit For every document we take the most similar other documents in the dataset as context and select the tokens whose preceding text also appears in the context, longest matches first. At each selected token we ask the model for the next token twice, without and with the context.
Context · 3 similar documents
Audited document
Hover over or click a selected token to see what the model predicted.
shared with context matching span selected context helped context hurt no change
4 Contamination score A model that memorised the data already knows the continuation, so the context more often hurts than helps. Each dot is one dataset scored by the same model.
seen unseen

Results

We audit 11 open-weights base models (GPT-Neo, Pythia, RWKV-4, OLMo) whose training data is known, using 100 documents per dataset and only W = 16 queried tokens per document. Each model is tested on datasets it was trained on (seen) and on temporally separated datasets it could not have seen (unseen).

Seen and unseen data separate cleanly

With LCS, seen datasets score around 0.4–0.8 on every model, while unseen datasets stay mostly below 0.3. The two groups barely overlap, with a mean dataset-level AUC of 0.95. The other black-box methods are much weaker. Carlini's extraction attack and SimMIA pick out only a few seen datasets, and SA-MIA is close to chance.

Contamination scores of seen and unseen datasets across 11 base models for LCS, Carlini, SA-MIA and SimMIA
Contamination scores across 11 base checkpoints. Red: seen corpora, blue: unseen. Each dot is one dataset; boxes show quartiles with 5–95% whiskers.
Black-box methodMean dataset-level AUC
Carlini (extraction)0.732
SimMIA0.674
SA-MIA0.562
LCS (Ours)0.952

On par with gray-box methods

LCS only sees the tokens a model returns, yet it beats Loss, Min-K% and zlib, which need log-probabilities. It matches CoDeC in AUC (0.952 vs. 0.961) and detects more contaminated datasets at a 5% false-positive rate (TPR 0.893 vs. 0.698).

MethodAUCTPR@5%FPR
Loss0.5850.120
Min-K%0.5990.134
zlib0.7590.147
CoDeC (gray-box)0.9610.698
LCS (Ours, black-box)0.9520.893

Few queries are enough

Detection saturates at W ≤ 30 tokens per document, close to an Oracle that knows which positions are informative. A naive audit needs about 3× more queries to reach the same accuracy. The signal also survives post-training: AUC stays the same or goes up after SFT and DPO for every model except OLMo 7B (0.910 → 0.859 after SFT).

Frontier models

We ran the audit through public APIs on Kimi-k2.6, DeepSeek-V3, DeepSeek-V4-Pro, Claude Sonnet 4.5 and Claude Opus 4.5, with at most 3,200 calls per dataset. Without public training data for these models, we use two 2026 datasets (AIME 2026, Reddit 2026) as controls that were published after the models' training.

Heatmap of contamination scores for five frontier models on twelve datasets
Contamination score per model and dataset. The small numbers below each score are the counts of positive and negative flips. AIME 2026 and Reddit 2026 are the controls.
  • Kimi-k2.6 and DeepSeek. Older datasets score 0.4–0.6, but so do the controls (0.30–0.52). No dataset stands clearly above the baseline. MMLU scores at or below the controls on all five models.
  • Saturation. Frontier models already predict most tokens of common text correctly without context, so fewer positions can flip and the score rests on only a handful of them.
  • Claude. Even with assistant prefill, 93% of replies without context come back in assistant voice, and the target token appears at only about 1% of positions. Flip counts are tiny (for example 0/3 or 3/8), so the scores swing between 0 and 1.

The frontier model results are exploratory. The whole suite cost about $133 in API calls.

BibTeX

@article{uncoveringthetells,
  title={Uncovering the Tells: Efficient Black-Box Audits for LLM Data Contamination},
  author={Lau, Dominik B. and Pawlicki, Filip and Dubi{\'n}ski, Jan and Cygert, Sebastian},
  journal={arXiv preprint arXiv:2611.30639},
  year={2026},
  url={https://arxiv.org/abs/2611.30639}
}