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 3x 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.
Figures & tables
Figure 1: (a) With the same query budget, naive sampling mostly hits uninformative tokens, while LCS targets the informative ones. (b) Mean AUC vs. query budget on base models: LCS matches the naive black-box audit with 3× fewer queries, far exceeds prior black-box methods, and approaches the gray-box CoDeC ( Zawalski et al., 2026 ) . Details in Sections 3 – 4 .
Figure 3: Cost-effectiveness of token selection policies across 15 models (11 pre-trained base models on the left and 4 post-trained Pythia ( Biderman et al., 2023 ) checkpoints on the right). Pre-trained (left) and post-trained (right) results show mean document-level AUC per budget. LCS demonstrates superior sample efficiency, reaching the level close to the Oracle at W≤30 .
Figure 4: Hyperparameter ablation grid across 7 off-the-shelf models, displaying the document-level AUC given varying token budgets ( W ) and number of conext document ( K ).
Figure 5: Contamination scores across 11 base checkpoints. Red and blue denote seen and unseen corpora, respectively. Box plots show quartiles and 5–95% whiskers with dots as individual corpora. The 2x2 grid compares our approach against standard black-box baselines. Top-left: Our LCS method achieves clear separation between seen and unseen data (mean dataset-level AUC 0.95 ). Remaining panels: SA-MIA is near chance ( 0.56 ), Carlini ( 0.73 ) and SimMIA ( 0.67 ) separate the datasets only partially.
Model
Carlini
SA-MIA
SimMIA
LCS (Ours)
GPT-Neo 125M
0.726
0.558
0.729
0.977
GPT-Neo 1.3B
0.776
0.596
0.801
0.964
GPT-Neo 2.7B
0.764
0.572
0.787
0.977
Pythia 410M
0.798
0.582
0.860
0.968
Pythia 1.4B
0.779
0.601
0.882
0.968
Pythia 12B
0.740
0.548
0.783
0.950
Table 1: Black-box baseline comparison, per base model. Dataset-level AUC separating each model’s seen corpora from its unseen ones (one score per dataset).
Method
AUC
TPR@5%FPR
Loss
0.585
0.120
Min-K%
0.599
0.134
zlib
0.759
0.147
CoDeC
0.961
0.698
LCS (Ours)
0.952
0.893
Table 2: Comparison of our black-box method (LCS) to competing gray-box methods requiring log-probabilities (dataset-level metrics).
Model
AUC
TPR@5%FPR
Pythia 410M
0.968
0.846
+ SFT
0.968
0.923
+ DPO
0.968
0.923
Pythia 1.4B
0.968
0.923
+ SFT
0.968
0.923
+ DPO
0.968
0.923
Table 3: Dataset-level detection performance on post-trained checkpoints. The contamination signal is preserved across post-training.
Figure 6: Contamination scores ( S ) for frontier models evaluated via public APIs. Recent datasets ( aime2026 , reddit_2026 ) act as internal negative controls to account for varying base capabilities. Below each score we present counts of positive / negative flips.
Appendix figures & tables18 assets
Supplementary material from the paper’s appendix.
Appendix
Family
Base Sizes
SFT
RL / Aligned
Corpus: The Pile
Pythia
410M, 1.4B, 12B
410M, 1.4B
410M, 1.4B †
GPT-Neo
125M, 1.3B, 2.7B
–
–
RWKV-4
430M, 3B, 14B
3B, 14B ‡
–
Corpus: Dolma
OLMo
1B, 7B
7B
7B
Appendix
Table 4: Model families used in Sections 3 and 4 ( Biderman et al., 2023 ; Black et al., 2021 ; Peng et al., 2023 ; Groeneveld et al., 2024 ) .
Model
Prompt Tokens
Completion Tokens
Cost (USD)
Claude Opus 4.5
8,314,517
1,280,741
$73.59
Claude Sonnet 4.5
8,314,517
853,024
$37.74
DeepSeek-V4-Pro
7,245,621
4,609,999
$9.74
DeepSeek-V3
7,200,410
857,710
$3.07
Kimi-k2.6
7,495,784
862,260
≤ $8.92
Total
≤ $133.06
Appendix
Table 5: Total API usage and costs aggregated across all dataset evaluations.
Figure 7: Context selection policy ablation. Left: Mean separation gap ( ΔS ). Right: Contamination-detection AUC. Both metrics use K=3 context documents, W=16 selected tokens, and are averaged over gpt-neo-125m and pythia-410m .
Figure 8: The effect of varying the number of context documents ( K ) on the separation gap.
Figure 9: Detection robustness under non-zero temperature sampling. Left: Contamination-detection AUC as temperature varies. Right: Mean score separation gap ( ΔS ) between contaminated and held-out corpora. Results are averaged over 6 models.
Method
Access
Unseen flagged (FP)
Seen detected (TP)
LCS, W=16 (ours)
black-box
9 / 179 (5.0%)
116 / 129 (89.9%)
Carlini ∗
black-box
8 / 168 (4.8%)
51 / 129 (39.5%)
SA-MIA ∗
black-box
10 / 168 (6.0%)
35 / 129 (27.1%)
SimMIA
black-box
11 / 179 (6.1%)
16 / 129 (12.4%)
Loss
gray-box
11 / 179 (6.1%)
21 / 129 (16.3%)
Min-K%
gray-box
10 / 179 (5.6%)
16 / 129 (12.4%)
Appendix
Table 6: Dataset-level false positives at a leave-one-model-out threshold on the 11 base models. For each model, the threshold is set to give at most 5% FPR on the other models’ unseen datasets and applied to the held-out model. ∗ global_news is excluded for these methods, which require at least 100 tokens per document.
Table 15
Figure 10: AUC performance of selection policies in random-exposure setting. The LCS policy shifts flip balance and outperforms the indiscriminate Oracle aggregation.
Document level
Dataset level
Method
Access
AUC
TPR
AUC
TPR
LCS, W=16 (ours)
black-box
0.706
0.120
0.858
0.680
LCS, W=32 (ours)
black-box
0.714
0.144
0.844
0.625
Carlini
black-box
0.571
0.090
0.757
0.310
SA-MIA
black-box
0.738
0.218
0.835
0.542
SimMIA
black-box
0.531
0.067
0.607
0.183
Appendix
Table 9: Comparison with baselines in the randomized-exposure setting. Metrics are computed per checkpoint and averaged over the 56 checkpoints. Dataset-level scores are pooled over documents within each dataset. TPR is at 5% FPR.
Figure 11: Scores S(Dseen) and S(Dunseen) across training stages.
Method
AUC
TPR@5%FPR
Blind classifier
0.718
0.000
LCS, W=16
0.952
0.893
Appendix
Table 10: Blind baseline vs. LCS on the main experiments (dataset level).
Scenario
Classifier AUC †
s(D1)
s(D2)
LCS AUC ‡
A (neither)
1.000
0.071
0.056
0.511
B (both)
1.000
0.626±0.047
0.602±0.055
0.529±0.039
C1 (only D1 )
1.000
0.533±0.066
0.067±0.004
0.949±0.014
C2 (only D2 )
1.000
0.074±0.010
0.638±0.034
0.960±0.008
Appendix
Table 11: Two-dataset exposure experiment. † : the AUC of the text-only classifier for separating D1 from D2 . ‡ : oriented toward the more exposed dataset.
Top- K
1
2
3
5
10
20
50
100
500
1000
10000
U-mode
0.741
0.805
0.836
0.859
0.886
0.914
0.950
0.965
0.988
0.995
0.999
M-mode
0.726
0.796
0.833
0.857
0.886
0.911
0.948
0.964
0.990
0.995
0.999
I-mode
0.016
0.018
0.022
0.028
0.086
0.133
0.197
0.230
0.298
0.349
0.715
Appendix
Table 12: Fraction of target tokens ranked within the top- K predictions under U-mode, M-mode, and I-mode. The K=1 column corresponds to the audit’s rule.
Flip rate
Context helped
Context hurt
(of selected)
(of selected)
(of flipped)
Policy
Seen
Unseen
Seen
Unseen
Seen
Unseen
Oracle
100.0
100.0
55.1
69.6
44.9
30.4
LCS
14.2
25.3
11.3
23.5
20.4
7.4
Uniform
11.6
14.6
7.5
11.6
35.7
20.5
Appendix
Table 13: Which positions each selection policy picks, on seen and unseen data. Flip rate is the share of selected positions with δ=0 (the Oracle selects flipped positions by construction). Context helped counts wrong → right and context hurt right → wrong flips. All values in %.
Calls
Document level
Dataset level
Method
/doc
AUC
TPR@5%
AUC
TPR@5%
Base
AccprefixW=16
16
0.610
0.141
0.687
0.273
AccprefixW=32
32
0.628
0.182
0.674
0.344
AccLCSW=16
16
0.682
0.141
0.771
0.393
AccLCSW=32
32
0.682
0.215
0.791
0.441
LCS
32
0.780
0.173
0.952
0.893
Appendix
Table 14: Accuracy baselines vs. our score (LCS, W=16 ). Document-level metrics pool documents; dataset-level metrics are computed per model and averaged over models. Calls/doc is the number of queries per document.
Dataset
Kimi K2.6
DeepSeek V3
DeepSeek V4 Pro
Claude Sonnet 4.5
Claude Opus 4.5
mmlu
0.21 [0.16,0.28]
0.25 [0.16,0.34]
0.34 [0.27,0.42]
0.00 [0.00,0.00]
0.00 [0.00,0.00]
pile_freelaw
0.49 [0.41,0.57]
0.51 [0.43,0.60]
0.60 [0.54,0.65]
0.42 [0.26,0.63]
0.38 [0.00,0.88]
pile_dm_mathematics
0.43 [0.37,0.49]
0.38 [0.29,0.48]
0.45 [0.39,0.51]
1.00 [0.00,1.00]
0.73 [0.44,1.00]
pile_pubmed_central
0.54 [0.46,0.61]
0.44 [0.33,0.57]
0.60 [0.53,0.67]
0.40 [0.28,0.53]
0.95 [0.82,1.00]
pile_wikipedia
0.49 [0.42,0.57]
0.42 [0.35,0.50]
0.58 [0.52,0.64]
0.11 [0.06,0.18]
0.86 [0.71,1.00]
math500_2021
0.42 [0.34,0.51]
0.40 [0.29,0.50]
0.52 [0.46,0.59]
0.33 [0.00,1.00]
1.00 [0.00,1.00]
Appendix
Table 15: Contamination scores (95% intervals) per dataset and model. n/a: score undefined because no flips were observed.
Model
Carlini
SA-MIA
SimMIA
LCS (Ours)
GPT-Neo 125M
0.526 [0.504,0.546]
0.578 [0.553,0.601]
0.577 [0.556,0.598]
0.822 [0.807,0.838]
GPT-Neo 1.3B
0.536 [0.514,0.558]
0.578 [0.553,0.600]
0.609 [0.587,0.631]
0.808 [0.792,0.821]
GPT-Neo 2.7B
0.540 [0.516,0.562]
0.565 [0.542,0.588]
0.606 [0.585,0.629]
0.812 [0.798,0.825]
Pythia 410M
0.557 [0.533,0.580]
0.565 [0.541,0.588]
0.607 [0.585,0.630]
0.811 [0.799,0.826]
Pythia 1.4B
0.562 [0.541,0.583]
0.569 [0.546,0.591]
0.613 [0.592,0.635]
0.816 [0.801,0.829]
Pythia 12B
0.558 [0.536,0.582]
0.559 [0.535,0.582]
0.583 [0.561,0.604]
0.796 [0.780,0.810]
Appendix
Table 16: AUC scores (95% CIs) separating seen and unseen corpora per model and method. Pooled over documents .
Model
Carlini
SA-MIA
SimMIA
LCS (Ours)
GPT-Neo 125M
0.726 [0.514,0.899]
0.558 [0.327,0.774]
0.729 [0.534,0.896]
0.977 [0.910,1.000]
GPT-Neo 1.3B
0.776 [0.577,0.928]
0.596 [0.351,0.803]
0.801 [0.620,0.937]
0.964 [0.864,1.000]
GPT-Neo 2.7B
0.764 [0.562,0.923]
0.572 [0.327,0.788]
0.787 [0.593,0.932]
0.977 [0.910,1.000]
Pythia 410M
0.798 [0.591,0.952]
0.582 [0.351,0.798]
0.860 [0.706,0.977]
0.968 [0.891,1.000]
Pythia 1.4B
0.779 [0.572,0.942]
0.601 [0.361,0.817]
0.882 [0.747,0.986]
0.968 [0.891,1.000]
Pythia 12B
0.740 [0.529,0.913]
0.548 [0.303,0.774]
0.783 [0.597,0.928]
0.950 [0.824,1.000]
Appendix
Table 18: Dataset-level AUC (95% CIs) separating seen and unseen corpora per model and method. Pooled over datasets .
Large language model auditing tests models and deployed systems for bias, safety, privacy, reliability, and provenance using behavioral and internal evidence.