Tools that audit language models for benchmark contamination (evidence that test questions were in the training data) work by asking whether the model finds a piece of text unusually easy to predict. Famous entities are also unusually easy to predict. A question about Barack Obama will look "memorized" to these detectors whether or not the question itself ever appeared online, because the model has seen Obama's name and facts millions of times. A question about an obscure namesake will look "fresh" even if it was leaked. If that holds, current contamination estimates are partly popularity estimates, and they are least trustworthy on exactly the entity-centric knowledge benchmarks where contamination claims matter most.
We propose to measure this confound directly and remove it. We build a controlled testbed with known ground-truth membership: an open model is continued-pretrained on entity questions whose leakage rate and subject popularity vary independently. We then introduce a calibration that compares each test item against control items that share its entity but were never leaked. The goal is a contamination score that separates three things current detectors merge: knowing an entity, knowing a fact, and having seen the benchmark string.
Core Claim
Reference-free detectors such as Min-K% Prob average the log-probability of a text's least likely tokens. Its successor Min-K%++ normalizes each token's log-probability against the full vocabulary distribution. The black-box method PAC contrasts a text's token confidences with those of perturbed neighbors. All three rest on the idea that training smooths away low-probability outlier tokens.
The popularity literature supplies a reason to expect that smoothing without any leakage. Mallen et al. show that factual recall on PopQA rises steeply with subject page views. Razeghi et al.'s Snoopy show that few-shot accuracy tracks pretraining term frequency. Chen et al.'s AmbER study show that even sparse retrieval favors head entities because their text is richer.
These two lines have not been crossed. WikiMIA, the benchmark on which Min-K%, Min-K%++ and PAC all report gains, splits articles by creation date (pre-2017 as seen, post-2023 as unseen). That split plausibly also separates established, popular topics from new, obscure ones.
Our claim has two parts. First, among items that were never leaked, existing detector scores rank items by entity popularity, so detection accuracy measured without popularity matching is inflated. Second, an entity-matched contrast removes most of this confound while keeping sensitivity to real leakage. The contrast scores an item relative to never-seen control items about the same entity, and separately about the same fact phrased differently.
Research Program
Testbed. The foundation is a testbed where membership is known rather than inferred. We start from a Pythia checkpoint trained on The Pile, which can be searched exhaustively for natural occurrences of our items. We continue pretraining it on a Pile-like mixture into which we inject entity-centric question–answer strings, the formatted benchmark item rather than the bare fact.
Items come from PopQA and from AmbER-H name-twin sets. Injection is fully crossed along two axes: duplication count (0, 1, 10, 100) and subject popularity decile. The zero-duplication half serves as ground-truth non-members. Popularity is measured two ways: Wikipedia page views, and entity-linked mention counts in The Pile. The file flags page views as a crude proxy for real token exposure (Chen et al.; Mallen et al.), so we measure both.
Following Magar and Schwartz, who showed that exploitation depends on duplication, injection timing and batch size, we hold injection position and batch size fixed so that popularity is the only new variable. Their controlled-injection design is the method we reuse, moved from BERT and sentiment data to an autoregressive model and entity facts. Unlike their study, we vary entity frequency inside the contaminated samples, which they left open.
Calibration. The proposed score is a contrast. Let $s(\cdot)$ be any base detector score, such as Min-K%++. Let $x$ be a benchmark item stating fact $f$ about entity $e$. We define
$$\delta_{\text{ent}}(x) = s(x) - \operatorname{median}_k\, s(c^{\text{ent}}_k), \qquad \delta_{\text{str}}(x) = s(x) - \operatorname{median}_k\, s(c^{\text{fact}}_k),$$
The two kinds of controls are defined as follows:
- Entity controls $c^{\text{ent}}_k$ are never-injected, same-format questions about $e$ that ask for other attributes. Subtracting them removes the entity prior.
- Fact controls $c^{\text{fact}}_k$ are never-injected rewordings of the same fact $f$. Subtracting them removes legitimately learned knowledge and leaves string-level leakage.
This borrows the logic of the context-free "neutral probes" that Provatorova et al. used to isolate an entity linker's prior from its use of context. Here the probe isolates the model's entity prior from its memory of a specific test string. The medians are over $K$ controls, taken for robustness to a single odd control.
Name twins. AmbER gives a sharp stress case. A question about a tail twin shares its surface name with a head twin, so a detector confounded by popularity should rate an uninjected tail-twin question as "seen." Entity controls built from the correct referent's attributes should undo this. Controls that merely reuse the surface name should not.
Exploitation. On the same testbed we measure exploitation, meaning the accuracy gain on injected versus non-injected items, as a function of duplication within each popularity decile. This asks whether head facts cross the exploitation threshold at lower duplication than tail facts. Zhou et al. found entity-pair reconstruction reaching 61.2% only above about 200 training occurrences, but in a privacy setting on Enron emails, not benchmarks.
Baselines
Model-free popularity reference. The naive reference is a detector that never looks at the model: it predicts membership from log page views, or from Pile mention count, alone. On our testbed it should sit near chance, because injection is balanced across popularity. On WikiMIA, any AUC well above chance means the benchmark rewards popularity rather than membership. Every model-based detector must be read relative to this number.
Raw reference-free detectors. The strongest existing reference-free detectors are Min-K% Prob and Min-K%++. Min-K%++ is reported to outperform Min-K% by 6.2% to 10.5% AUROC on WikiMIA across ten models (Min-K%++). The file gives relative gains only, no absolute AUROC. We found no reported result on Lacuna for any detector on a popularity-balanced or entity-injection membership benchmark.
We run both at their published default $k$ on the same model, items and token budget. We add PAC, reported to improve AUC by 4.5% on WikiMIA (PAC), and CDD, the output-distribution-peaking detector of Dong et al.. CDD is reported to improve accuracy and AUC by 21.8% to 30.2% over baselines on code and math. It is the most at risk here, because a dominant head-entity answer produces peaked generations without leakage.
Reference-model calibration. This divides the target model's likelihood by that of a smaller model trained on similar data. It is the most dangerous competitor, since a reference model shares the popularity prior and may cancel it for free. Min-K%++ reports parity with such reference methods on MIMIR, with no number given in the file. We use a smaller Pythia model that never saw the injections as the reference. It gets the same items and the same number of forward passes as our controls: $K$ controls cost $K$ extra passes, and we match that by averaging over reference prompts.
Ablation. The ablation that isolates our key ingredient replaces same-entity controls with controls about different entities from the same popularity decile. If this works equally well, entity identity does not matter and a simple popularity-bin normalization suffices.
What counts as winning. Beating the baselines means two things. First, higher AUROC within each popularity decile at duplication 1 and 10, where detection is hardest. Second, near-zero correlation between score and popularity among true non-members.
Why not just…?
Why not just stratify existing detectors by popularity and report per-bin AUROC? Stratification is part of our diagnosis, and if it were enough we would say so. It fails as a fix in two ways. It needs popularity bins fine enough to absorb within-bin variation, which page views may not provide given the proxy problem flagged above. It also cannot handle name twins, where the confound follows the surface string rather than the referent's popularity. The within-decile comparison and the AmbER twin test show whether our contrast adds anything beyond binning. If per-bin raw Min-K%++ matches $\delta_{\text{ent}}$, we will report binning as the recommendation.
Why not just use a reference model, which already cancels shared priors? This is a real threat. A reference model trained on similar data will also assign high probability to famous entities. Its weakness is that it cancels popularity only to the extent that the two models' priors match, and larger models memorize more (Magar and Schwartz). The residual should grow with popularity. Our controls are computed on the target model itself, so there is no mismatch. The head-to-head at matched compute, broken down by decile, settles the question. If the reference method wins, the contribution narrows to the fact-control decomposition, which reference methods do not provide.
Why not just rephrase the benchmark and measure the accuracy drop? This is the HumanEval_R-style test of Dong et al.. It is close to our fact control. Their reported leak ratio of about 41.5% for ChatGPT on HumanEval is its best-known result. However, an accuracy drop under rephrasing measures exploitation, not membership. It also inherits popularity bias: Provatorova et al. show that systems keep choosing the popular entity even when reworded context says otherwise. Rephrasing also says nothing when the model gets both versions wrong, which is the tail case in PopQA. We include the rephrase-drop score as a baseline and test its correlation with ground-truth duplication in each decile.
Proposed Experiments
Testbed checks. The first decisive check runs on the testbed. Among non-injected items, compute the rank correlation between each detector's score and Pile mention count. The confound is real if raw Min-K%++, PAC and CDD show clearly positive correlation while $\delta_{\text{ent}}$ does not.
The second check measures AUROC separately at each duplication level and popularity decile. If the confound matters, raw detectors should show high AUROC on popularity-pooled data but a visible drop within deciles, especially at duplication 1. The calibrated score should hold up in both views.
The third check is the name-twin test. Take uninjected tail-twin AmbER-H questions and compare their raw scores against uninjected questions about unambiguous tail entities of equal popularity. If shared names inflate raw scores, the gap should close under referent-level entity controls but not under surface-name controls.
WikiMIA re-analysis. We rerun Min-K%, Min-K%++ and PAC on a popularity-matched subsample of WikiMIA, matching seen and unseen articles on page views, alongside the model-free popularity reference. A large AUROC drop after matching would imply that part of the published WikiMIA gains reflect popularity. That would change how the field reads those numbers.
Exploitation curves. The fourth analysis plots exploitation against duplication for head and tail deciles. This tests whether head items are exploited at lower duplication. If so, part of the high head-entity accuracy on PopQA, where GPT-3 davinci-003 reaches only 19% on the 4,000 least popular questions (Mallen et al.), could come from leakage, not capacity.
Application to real models. We apply $\delta_{\text{str}}$ to open models on the public PopQA and EntityQuestions test sets. We report contamination estimates stratified by popularity, verified against n-gram search in The Pile wherever the model's corpus is searchable.
Falsification. The proposal fails if raw detector scores among non-members are flat across popularity, or if the reference-model baseline matches $\delta_{\text{ent}}$ within noise at equal compute. Either outcome would itself be a useful, publishable correction to the gap this note posits.
References
- Detecting Pretraining Data from Large Language Models
- Min-K%++: Improved Baseline for Pre-Training Data Detection from Large Language Models
- Data Contamination Calibration for Black-box LLMs
- When Not to Trust Language Models: Investigating Effectiveness and Limitations of Parametric and Non-Parametric Memories
- Snoopy: An Online Interface for Exploring the Effect of Pretraining Term Frequencies on Few-Shot LM Performance
- Evaluating Entity Disambiguation and the Role of Popularity in Retrieval-Based NLP
- Data Contamination: From Memorization to Exploitation
- Robustness Evaluation of Entity Disambiguation Using Prior Probes: the Case of Entity Overshadowing
- Quantifying and Analyzing Entity-Level Memorization in Large Language Models
- Generalization or Memorization: Data Contamination and Trustworthy Evaluation for Large Language Models