The useful part, up front

What you’ll take away

  • An ordering test needs both an appropriate data-order assumption and a fixed measurement.
  • An inclusive exact tail includes the observed order and equal scores.
  • Randomized tail counting has a finite resolution set by its declared number of draws.
  • False-positive rate, exposure among flags and an observed p-value condition on different events.
  • A negative ordering finding leaves other forms of exposure open.
01

What does the test actually ask?

Imagine a model scores unusually well on a public benchmark. One possible explanation is that some benchmark material appeared in its training data. But a high task score alone does not tell us what the model saw. Researchers have proposed another clue: compare how likely the model finds the benchmark's original order with how likely it finds shuffled orders of the same examples. Oren and colleagues study this approach using access to sequence log probabilities. [1] Their question is about a particular statistical signal in the ordering, not simply whether the model answers correctly.

The result can include a p-value. A small number is easy to turn into a stronger claim than the analysis supports: for example, saying that p=0.01 means there is a 99% chance the model saw the benchmark. That reverses the conditioning. The American Statistical Association explicitly distinguishes a p-value from the probability that a hypothesis is true. [3] We will work through a small ordering example, then a separate screening example, to make the difference visible. All numbers in those examples are stipulated or calculated here. They are not measurements of any commercial model. The useful outcome is a way to read a contamination report without losing its assumptions or treating a single number as a complete training history.

Two assumptions do different work. Original toy uses four arbitrary labels and a score fixed before observing a uniformly selected order.
Original toy uses four arbitrary labels and a score fixed before observing a uniformly selected order. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
02

An interchangeable order is an assumption about how data arose

The ordering comparison needs a reason why shuffled orders provide a fair reference. In the paper, that reason is exchangeability: under the relevant data-generating process, changing the order does not change the joint distribution of the examples. The null also assumes the model is independent of the benchmark. [1] These are two different requirements. A model may be independent of a newly collected dataset while still preferring the way that dataset was deliberately sorted.

For our toy calculation, give four distinct items the arbitrary labels A, B, C and D. Before choosing the observed order, fix a scoring rule: list the 24 orders alphabetically and assign scores 1 through 24 in that order. ABCD receives 1 and DCBA receives 24. These numbers are just fixed ordering scores, not probabilities. Under our toy null, choose the observed order uniformly from all 24 possibilities. The scoring rule stays fixed throughout. It would be invalid to look at the observed order first and then define the score to reward matching that same order. That would manufacture an unusually high score by construction. The distinction is practical: keep the model, serialization and scoring choices fixed before interpreting how surprising the observed ranking is.

03

Count the observed order as part of the exact comparison

Suppose the observed order in our toy is DCBA, with score 24. We compare its score with every one of the 24 possible orders. Our one-sided rule counts scores at least as large as the observed score. Only DCBA qualifies, so the exact tail proportion is 1/24, approximately 0.04167. The observed order belongs in the comparison. Removing it and reporting zero would answer a different question. SciPy's documented upper-tail convention similarly includes values equal to the observed statistic. [2]

If the observed order instead has score 22, then scores 22, 23 and 24 qualify. The proportion becomes 3/24=0.125. The same scoring rule and reference set now produce a less extreme result. Neither number says what fraction of model training examples were contaminated. They describe positions in this particular ordering comparison. There are only 24 possibilities, so the smallest attainable exact value here is 1/24. Repeating the arithmetic more often cannot create a smaller exact tail for this same finite setup. A larger benchmark may have many more possible orderings, but the resulting calculation must still specify what was shuffled, which direction was counted, and whether the full set or a random sample was used.

Count the full reference set, including the observed ordering. Original enumeration of all 24 permutations; fixed unique scores 1…24; upper tail includes equality.
Original enumeration of all 24 permutations; fixed unique scores 1…24; upper tail includes equality. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
04

A five-percent rule describes repeated null cases

Now imagine repeating our toy experiment under its null. Each time, choose the observed order uniformly from the 24 possibilities and use the same fixed scores. Adopt the rule “flag when p is at most 0.05.” Only the order with score 24 is flagged. The next score gives 2/24, about 0.08333, which is above the threshold. Therefore the fraction of null cases flagged is 1/24, about 4.17%. This is below 5% because our possible p-values occur in discrete steps.

That repeated-case statement is not a probability that one flagged case is innocent. It describes how the rule behaves when the stipulated null generates cases. Also notice what happens with ties. If every order receives the same score, every score is at least as large as the observed score. The inclusive tail is then 24/24=1, and nothing is flagged. Finally, deliberately choosing DCBA as the stored order every time would break our uniform-order assumption. Our fixed rule would then flag every case, even without adapting the scorer to the dataset. A correct division cannot rescue an inappropriate reference assumption. Check how the benchmark acquired its order before treating a low value as evidence about training exposure.

05

Why zero exceedances does not mean a zero p-value

Enumerating every order soon becomes impractical. A randomized procedure instead samples a declared number of shuffled orders and compares their scores with the observed score. Let m be the number of sampled permutations, and b the number whose scores are at least as large as the observed score. Under the plus-one convention we use, the reported value is (b+1)/(m+1). SciPy documents this adjustment for randomized permutation tests. [2] It includes the observed statistic in the comparison rather than treating a finite sample as every possible outcome.

For a separate example with 99 sampled permutations, suppose none reaches the observed score. Then b=0 and the value is 1/100=0.01, not zero. If four do, it is 5/100=0.05. With 999 sampled permutations and no exceedances, the smallest result is 1/1000=0.001. More samples change the attainable resolution, but do not repair a wrongly chosen null, a changing model, or a score chosen after inspecting the data. These examples concern random samples from an appropriate permutation reference; they are separate from our complete enumeration of 24 orders. Keep the sampling design and random seed with the result so another reader can distinguish a reproducible simulation from a full exact count.

06

Reverse the conditioning only with additional information

To see why a false-alarm rate is not the fraction of flags that are wrong, use a separate invented screening population. Imagine 1,000 model–benchmark pairs. Suppose 100 were exposed and 900 were not. Assume a particular screening rule flags 80% of exposed pairs and 5% of unexposed pairs. These rates are invented for the example; they are not measured properties of the research method and are not calculated from a p-value.

The rule flags 80 of the 100 exposed pairs. It also flags 45 of the 900 unexposed pairs. There are therefore 125 flags, of which 80 correspond to exposure: 80/125=64%. A 5% false-alarm rate did not produce 95% exposed cases among the flags. The two percentages divide by different groups. If exposure were rarer while the assumed screening rates stayed the same, false flags could make up a larger share of all flags. This does not make screening useless. It shows what extra information is needed to interpret an individual flag: the prevalence of the condition and the rule's behavior in both exposed and unexposed cases. A p-value alone supplies neither of those missing inputs. The example is a counting demonstration, not an estimate of contamination in available models.

False-positive rate and exposure among flags use different denominators. Separate invented 1,000-case population: 10% exposed, 80% sensitivity and 5% false-positive rate. Not measured model-audit performance.
Separate invented 1,000-case population: 10% exposed, 80% sensitivity and 5% false-positive rate. Not measured model-audit performance. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
07

A missing ordering signal leaves other exposure routes open

A report may find no unusual preference for the benchmark's stored order. That is a result about the chosen signal under the tested conditions. It does not establish that the model never encountered related material. The paper explicitly limits what its tests can rule out: exposure can occur through material used to build a benchmark, rather than through ingestion of the full test set in its original form. [1] The assumptions needed for reliable detection are different from the assumptions used to control false alarms.

An ordering test is easiest to understand as a question about a particular trace: does the original arrangement receive an unusually favorable score? Other traces could require other investigations. For example, examining known data records, comparing overlap with source documents, or evaluating on newly constructed examples would ask different questions. Those approaches also need their own methods and limitations; listing them does not certify a model as clean. Phrase a negative finding at its actual scope: this procedure did not detect its target signal in this model version and benchmark representation. Preserve the number of items, the ordering, the score definition and the test settings. That record gives later reviewers a clear starting point if new training-data information becomes available.

08

Searching across many tests changes the reporting question

Suppose an analyst tests many benchmarks, serialization choices or model versions, then highlights only the smallest result. The reported number has been selected from a larger search. To illustrate the effect, imagine 20 independent tests, each with exactly a 5% false-alarm probability under its null. The chance of no false alarms is 0.95 multiplied by itself 20 times, about 0.3585. The chance of at least one is therefore about 0.6415, or 64.15%. These assumptions define a new toy example; this is not the false-alarm rate of our discrete 24-order calculation.

Real audit tests may be dependent, so that 64.15% figure cannot simply be copied into a report. Its purpose is to show why the complete family of comparisons matters. Decide which question is primary, record the alternatives tried, and state any adjustment or separate confirmation procedure. The contamination paper itself notes that its reported p-values did not receive multiple-test corrections. [1] That limitation belongs beside the findings when interpreting them. Searching is often part of learning how a method behaves, but a result chosen during exploration should be identified as such. Transparency lets readers distinguish a predeclared comparison from the most striking outcome found after many attempts.

One selected result can come from many comparisons. Separate toy: 20 independent tests, each with exact 5% false-alarm probability. These are not the discrete 24-order test rates.
Separate toy: 20 independent tests, each with exact 5% false-alarm probability. These are not the discrete 24-order test rates. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
09

Keep the exact test separate from the paper’s sharded method

The paper also presents a method that divides the dataset into shards. Within each shard, it compares the original ordering's log probability with an average from shuffled orderings, then combines the shard differences using a one-sided t-test. Its guarantee is described as asymptotic and uses additional assumptions, including independent identically distributed examples. [1] That is a different procedure from counting all 24 orders in our small example.

This distinction matters when reading a very small reported p-value. The minimum 1/(m+1) discussed earlier belongs to the randomized rank-counting rule we specified. It is not a universal minimum for every statistical method. Similarly, a result from a t-test should not inherit the exact finite enumeration argument just because both procedures shuffle data. Start by identifying the actual algorithm. The paper's audit setting also requires sequence log-probability access. [1] A chat interface that only returns generated text does not automatically provide that measurement. Before attempting replication, establish which scores the interface supplies, how the sequence is serialized, and whether the model version is fixed. A fluent answer about its own training data would be a different kind of response, not the ordering-likelihood measurement defined by this test.

10

Write a result that another reader can reconstruct

A useful audit record begins with the model version, benchmark version and the exact ordered data representation. Add the score definition, the reason shuffled orders form the chosen reference, the direction of the comparison and the treatment of equal scores. State whether you enumerated all possibilities or sampled permutations. For sampling, preserve the number of draws and the randomness settings. Include the full family of comparisons and explain any exploratory changes. These are proposed record fields drawn from the distinctions we have worked through, rather than a claim that one universal checklist validates every audit.

Our toy report can be precise: with a fixed lexicographic score, a uniformly selected canonical order and all 24 permutations enumerated, observed score 24 has an inclusive upper-tail proportion of 1/24. At a predeclared threshold of 0.05, the rule flags one of the 24 equally likely null orders. That is the result we have actually established. We have not established a 95.83% probability of exposure, identified copied text, or estimated benchmark inflation. Keeping the conclusion attached to the calculation makes the report useful. A later reader can inspect its assumptions, reproduce its counts and decide which additional evidence would be needed for a broader claim about the model's training history.

Keep enough information to reconstruct the conclusion. Proposed audit record. No model was tested in the original analytical examples in this article.
Proposed audit record. No model was tested in the original analytical examples in this article. · Ameer Journal — original explanatory diagramOriginal editorial illustration; no third-party artwork reused.
Follow the evidence

Sources & further reading

Explore the references behind this guide. External pages may change after our review.

  1. Proving Test Set Contamination in Black Box Language Models
    Oren, Meister, Chatterji, Ladhak and Hashimoto / arXiv · Accessed 6 Nov 2026
  2. permutation_test — SciPy v1.16.0 Manual
    SciPy · Accessed 6 Nov 2026
  3. ASA Releases Statement on Statistical Significance and P-Values, 7 March 2016
    American Statistical Association · Accessed 6 Nov 2026

Article updated 6 Nov 2026.

Found something we should revisit?

Good explanations get better with thoughtful feedback.

Suggest a correction