Measurement · 2026-10-17
65% of a NeurIPS benchmark’s test set has a near-duplicate in training.
I measured train/test sequence overlap across thirteen published splits from five benchmark families. Seven leak and six are clean. Then I measured what the contamination actually costs, against a gate fixed in advance, and the answer turned out to depend on the model: null for a 26-feature baseline, +0.13 Spearman for a protein language model, on identical data.
Every file is downloaded from its own published location and hashed at run time. For the LRGB row both checksums match the values hard-coded in that benchmark’s own loader.
| Published split | Homology control, as published | Exact overlap | Twin ≥ 0.80 |
|---|---|---|---|
| LRGB Peptides-func NeurIPS 2022 Datasets & Benchmarks |
None. Stratified random split. | 7.72% | 65.29% |
| AMPlify, positive class BMC Genomics 2022 |
None, by design (paper’s Methods; see the note below) | 0.00% | 63.47% |
| AMPlify, negative class same paper, same download, same run |
None, by design (paper’s Methods; see the note below) | 0.00% | 30.18% |
PepBenchmark, hybrid_splitICLR 2026, the paper’s documented default |
k-mer, then MMseqs2 at 30% identity | 0.00% | 29.97% / 48.56% |
| AMP Scanner v2, positive class Bioinformatics 2018 |
CD-HIT at 90% identity, pool filtered before splitting | 0.00% | 16.71% |
| AMP Scanner v2, negative class same paper, same tool, same run |
CD-HIT at 40% identity, pool filtered before splitting | 0.00% | 0.00% |
FLIP meltome mixedNeurIPS 2021, full-length proteins |
MMseqs2 at 20% identity, whole clusters assigned 80/20 | 0.00% | 0.29% |
FLIP meltome humansame benchmark, human proteins only |
as above | 0.00% | 0.05% |
FLIP meltome human_cellsame benchmark, human cell lysate |
as above | 0.00% | 0.00% |
FLIP scl mixed_harddifferent task: 10-class localisation |
as above | 0.00% | 0.00% |
FLIP conservation sampledsame benchmark, random split |
Random 95/5. No clustering. | 0.00% | 0.00% |
FLIP secondary_structure sampledsame benchmark, same random design |
Random 95/5. No clustering. | 0.00% | 65.38% |
Correction, 25 Oct 2026. This table first said AMPlify’s homology control was “not documented in the repository”. Its maintainers replied on issue #21 (22 Oct): near-identical sequences were kept deliberately, as the paper’s Methods explain, because a single amino-acid substitution can change or abolish antimicrobial activity. They also point to the paper’s Fig. 2, which evaluates AMPlify and other tools on test subsets filtered by similarity to each tool’s training set and, they report, finds AMPlify ahead at every threshold. That is the paired control a contamination rate lacks, and it was in the paper; we had not read the full paper before measuring. The 63.47% and 30.18% stand as measured; what they cost in reported performance is the question Fig. 2 addresses and this table does not.
“Twin” means a Levenshtein ratio of
at least 0.80 against any training sequence. LRGB: 2,331 test rows against 10,873 train.
AMPlify: 835 test rows per class; 3,338 train for the positive class. PepBenchmark: mean over its five shipped seeds, on
antimicrobial_E_coli_mic and hemolytic_hc50. AMP Scanner v2: 712 per
class per side. FLIP meltome: 3,134 against 24,817, of which 20,206 unique.
01 The six clean rows
They are why the rest of the table is believable.
If a check reports contamination everywhere, it is a false-positive generator and you should ignore it. This one returns 0.00% five times and 0.29% once, on six splits I had no hand in, from two different groups, across peptides and full-length proteins and across regression, 10-class classification and per-residue prediction.
The AMP Scanner v2 pair is the sharpest single version. One paper, one tool, one preprocessing run, two classes: positives filtered at 90% identity come back at 16.71%, negatives filtered at 40% come back at exactly zero. The check discriminates on the threshold alone. It also localises the damage, because contamination confined to the positive class inflates sensitivity specifically rather than accuracy uniformly.
FLIP matters for a different reason: it is the only benchmark here that appears on both sides of the table, and that contrast is the most useful thing on this page. See the correction below.
02 What actually separates them
30% identity was not enough. 20% with cluster-level assignment was.
Both PepBenchmark and FLIP do the right thing in principle: cluster by sequence identity, then assign to splits. They land 100x apart.
| Benchmark | Threshold | Unit assigned to the split | Twin ≥ 0.80 |
|---|---|---|---|
PepBenchmark hybrid_split | 30% | k-mer group, then MMseqs2 | 29.97% / 48.56% |
FLIP meltome mixed | 20% | whole MMseqs2 cluster | 0.29% |
Representative-based clustering compares each sequence to cluster representatives rather than to every member. On a transitive chain where A resembles B and B resembles C but A does not resemble C, the chain gets broken and relatives land on opposite sides. Lowering the threshold makes the chains harder to break, and assigning whole clusters rather than looser groupings stops the break from crossing the split boundary.
This is the same defect I found in my own pipeline first: a splitter whose docstring described single-linkage clustering and which actually performed greedy first-match assignment. Every check I had written passed, because none of them measured the quantity the guard existed to bound. That is how I knew to look here.
A second thing, found by reading rather than by the check. In the
PepBenchmark release, kmer_split.json and random_split.json are
byte-different files with different checksums whose train and test index sets are identical
across all five seeds, on both datasets. The k-mer motif split has collapsed into the random
split.
02a The correction
One benchmark sits on both sides of the line, and that is the finding.
Earlier today this page said FLIP was clean on four splits out of four. I then measured three more and one of them is not clean at all.
| FLIP split | How it is built, per FLIP’s own README | Twin ≥ 0.80 |
|---|---|---|
meltome/mixed, human, human_cell | MMseqs2 at 20% identity, whole clusters assigned | 0.29% / 0.05% / 0.00% |
scl/mixed_hard | cluster-based | 0.00% |
conservation/sampled | “Randomly split sequences into train/test with 95/5% probability” | 0.00% |
secondary_structure/sampled | the same sentence, verbatim, in its own README | 65.38% |
The two random splits are built by the identical documented procedure and both carry FLIP’s green status marker. They land at opposite ends of the table. So the variable here is not the split method at all. It is how redundant the underlying corpus is: the PDB is full of near-identical chains, and the conservation sequences are not.
This sharpens the rule rather than breaking it. “Cluster your splits” was never the whole story. A random split is perfectly safe when the corpus is not redundant, and badly unsafe when it is, and there is no way to know which case you are in without measuring. That is the argument for measuring, and it is a better argument than the one I had this morning.
Measured but excluded: FLIP bind returns 98.33% on its
from_publication split. I am not reporting that as leakage. Its six splits test
generalisation across ligand type (one_vs_many, one_vs_sm,
one_vs_sn), not across sequence similarity, so the same protein recurring with a
different ligand is the design rather than a defect. A sequence-overlap number there does not
mean what it means elsewhere on this page.
02b A result I am not counting
Peptides-struct is the same split, not a second data point.
LRGB ships a second peptide task, Peptides-struct, and measuring it returns 7.72% exact and 65.29% twins: identical to Peptides-func to the digit. That is not a confirmation, and I am not presenting it as one.
The structure dataset file is genuinely different
(9786061a34298a0684150f2e4ff13f47, matching the loader). But
splits_random_stratified_peptide_structure.pickle hashes to
5a0114bdadc80b94fc7ae974f13ef061, byte-identical to the func split,
and its train, val and test index sets are identical as sets. LRGB uses one split for both
peptide tasks over the same 15,535 molecules; only the label column differs. So this is the
same computation on the same sequences, and counting it twice would be the exact error this
page is about.
The honest framing is stronger than the double-count would have been: a single contaminated split sits underneath both LRGB peptide leaderboards and the thirty-plus published models scored on them.
03 Reproduce it
Three scripts, no credentials.
Each downloads the benchmarks’ own published files and hashes them at run time.
cd silicyte-design-loops/thirdparty
pip install rapidfuzz numpy
python verify_thirdparty.py # LRGB + AMP Scanner v2
python verify_pepbench.py # PepBenchmark, 4 strategies x 5 seeds
python verify_more.py # AMPlify + FLIP meltome mixed
python verify_sweep.py # FLIP human/human_cell/scl + Peptides-struct
LRGB data 701eb743e899f4d793f0e13c8fa5a1b4 and split
5a0114bdadc80b94fc7ae974f13ef061, both matching the values hard-coded in
graphgps/loader/dataset/peptides_functional.py. AMP Scanner v2 zip
c32196cca2f4ac9adf728409e4129797. FLIP meltome splits.zip
72b9257e8d6714d203c64bedaef0724e.
03a Run it on your split
One line in GitHub Actions.
twin-check is a GitHub Action applying the same 0.80 rule as this page’s record. Point it at your own train and test files (FASTA or CSV) and it writes the twin rate, the exact-overlap rate, a JSON record and a badge to the job.
with: { train: data/train.fasta, test: data/test.fasta }
Its own CI reruns this record from the upstream files with every MD5 checked: LRGB Peptides-func 65.29%, AMPlify positives 63.47%, FLIP meltome mixed 0.29%, and 0.00% on the corrected LRGB split. Latest reproduce-record run. A twin rate is not a score inflation; for proper similarity-aware splitting, DataSAIL and GraphPart already exist.
03b What the contamination actually costs
It depends on whether your model can exploit it.
Everything above is a contamination rate, and this page said for a long time that a rate is not an inflation. So I measured the inflation, against a gate written down before anything was trained: support needed 0.03 Spearman with the same sign in four of five seeds.
PepBenchmark makes this unusually clean. It ships four split strategies over the identical rows, five seeds each. Same data, same labels, same ridge, same averaged penalty grid. I ran it twice, changing only the features.
| Features | random | mmseqs2 | hybrid | cdhit | random − cdhit | Verdict |
|---|---|---|---|---|---|---|
| 26 hand-built descriptors | +0.4771 | +0.4920 | +0.4700 | +0.4871 | −0.0100 | null |
| ESM2-35M embeddings | +0.5798 | +0.4997 | +0.4795 | +0.4497 | +0.1301 | supported |
Held-out Spearman on
antimicrobial_E_coli_mic, mean over PepBenchmark’s five shipped seeds.
ESM2 arm: SE 0.0143, every one of five seeds positive (+0.1039, +0.1704, +0.1491, +0.0927,
+0.1344). Contamination on those two splits is 66.54% and 19.11%.
Why this matters more than another rate
A contamination rate on its own does not tell you what your evaluation is worth. You need the rate and the model, because capacity is what converts near-duplicates into score. That is the thing I could not say this morning and can say now, and it is the reason to measure rather than to assume.
What stayed null, which is most of it
hemolytic_hc50 is null under both models: +0.0734 with descriptors
and +0.0744 with ESM2, and in both cases the sign holds in only three of five seeds, so the
pre-registered sign condition fails. Per-seed on the ESM2 arm it runs +0.0516,
−0.0108, −0.0190, +0.1440, +0.2061. That set has 1,926 rows against 3,204, which
is the obvious explanation and one I have not tested.
One of four dataset-model cells is supported. The effect is real where it appears and it is not universal, and anyone quoting the 0.13 without that sentence is quoting me badly.
LRGB Peptides-func, retrained: the published fingerprint baseline on both splits
At 65.29% contamination, does the shipped split inflate a retrained model? I preregistered the same gate (support needs +0.03 macro AP with the same sign in four of five resamples; below +0.01 is a null; between is inconclusive) and ran it in public CI on two models: M1, the count ECFP + LightGBM baseline of arXiv:2501.17901, and M2, the descriptor ridge from my earlier one-off read. Each was scored on LRGB’s shipped split and on five rebuilds of the identity-separated split (contrast A), and, with training held identical, on the shipped test rows that have a training twin versus those that do not (contrast C).
| Model | Contrast | Contaminated | Clean | Difference | sd | Verdict |
|---|---|---|---|---|---|---|
| M1 count ECFP + LightGBM | A, shipped vs corrected split | 0.7460 | 0.5687 | +0.1773 | 0.0094 | supported (H1) |
| M2 descriptor ridge | A, shipped vs corrected split | 0.3542 | 0.3229 | +0.0312 | 0.0054 | supported (H1) |
| M1 count ECFP + LightGBM | C, twinned vs untwinned test rows | 0.7966 | 0.5847 | +0.2119 | 0.0280 | supported (H1) |
| M2 descriptor ridge | C, twinned vs untwinned test rows | 0.3775 | 0.3147 | +0.0629 | 0.0088 | supported (H1) |
Macro average precision over the 10 labels, mean of 5 resamples, every resample positive in all four rows. M1 on the shipped split scores 0.7460, the figure the paper reports. Controls in the same jobs: twin rate 65.29% on the shipped split and 0.00% on every corrected split, label-shuffled training at the base rate, identical numbers on rerun. Record: peptides-func-split-rerun (v1.0.0, machine-readable copy); fork it and press Run workflow to rerun every number.
What this does not show: contrast A changes the test rows, and contrast C compares rows of different kinds (peptides from large families may be easier or harder for reasons other than having a relative in training), so neither isolates contamination from row difficulty. Two named models on one benchmark; it says nothing about the graph networks and transformers on the LRGB leaderboard, and the number must be quoted with the model named.
Limits worth stating plainly: ridge on frozen embeddings, not a fine-tuned encoder and not a GNN, so none of this transfers to PepBenchmark’s or LRGB’s leaderboard numbers. ESM2-35M is the smallest ESM2 there is. One benchmark, two datasets, four cells. The capacity story is a hypothesis with one contrast behind it.
04 Limits
What this does not show.
A contamination rate is not a score inflation. The rates were measured without retraining. The only retrained comparisons are the ones in section 03b (PepBenchmark E. coli and HC50; LRGB Peptides-func with two named models), and each belongs to its model. Anyone quoting a rate on this page as “benchmark X is overstated by Y points” is quoting something I did not measure.
For LRGB, only 30 of the 180 exact matches are the same molecule. 180 test rows share a primary sequence with training and 30 of those also share a SMILES. For a sequence model all 180 are leakage; for the graph models LRGB is actually used to benchmark, the other 150 differ in stereochemistry or modification and are near-duplicates rather than duplicates. I say “shares a primary sequence” and never “duplicate molecule”.
Pool filtering and split-aware clustering are different operations. AMP Scanner’s 40% filter removed redundant sequences from the pool entirely, so nothing similar survived anywhere. PepBenchmark and FLIP assign clusters to splits. The first can reach zero trivially by deleting data; the second cannot do better than its clustering. The rows are not in tension.
0.80 Levenshtein is a choice, and it is the threshold the evaluations I work with are meant to mimic. The scripts take it as a parameter and the rates at 0.85, 0.90 and 0.95 are in the output.
PepBenchmark published redundancy rates of its own, and they are not these. Its paper reports per-dataset redundancy in Appendix D.1 and Table 10, measured at 90% MMseqs2 identity over the raw corpus, ranging from about 19% to 47% across its datasets, and it states plainly that near-duplicate peptides promote memorisation. Those figures overlap the range I report almost exactly, and they are a different quantity. Theirs describes how redundant the corpus is before a split is drawn. Mine describes what survives after their own 30%-identity control has been applied, at a different threshold, between the train and test sides specifically. The authors identified the redundancy; the open question was whether their control removed it, and the answer I measured is that it removes between half and two thirds. They also name a k-mer leakage mechanism without quantifying it, which remains unmeasured by anyone as far as I can find.
The existing critique of LRGB does not look at the data. Tönshoff, Ritzert, Rosenbluth and Grohe (arXiv:2309.00367, TMLR 2024) re-ran the LRGB baselines and concluded the reported advantage of graph transformers was substantially an artifact of hyperparameter choice, feature normalisation and the link-prediction metric. That is a different and well-established finding, and it concerns the models rather than the split. I am not restating it.
Related work, and a connection I have not tested. Adamczyk, Ludynia and Czech (arXiv:2501.17901, also in Bioinformatics 42(5)) show that count-based molecular fingerprints with short-range features outperform GNNs and transformers across LRGB and five other peptide benchmarks, which challenges the assumption that long-range interaction modelling is necessary. They do not measure sequence overlap, and I am not claiming they did. But the two results sit next to each other in an interesting way: if 65% of test rows have a close relative in training, a model that can recognise local motifs has a route to a good score that does not require learning the property. For the fingerprint family this is now measured (section 03b): their count ECFP + LightGBM baseline loses 0.18 macro AP on corrected splits. The GNN and transformer side has not been retrained, so whether fingerprints lose more than graph models do is still untested.
A stronger version of this argument already exists, and it is not mine. Mattsson and Walters, in work covered by Derek Lowe in July 2026, show for protein-ligand affinity that a ligand-only baseline carrying no protein information at all still reaches r = 0.66 on one standard benchmark, and that leakage persists even at very low sequence identity. If that generalises, the problem is not that 30% was the wrong threshold but that sequence identity is the wrong axis to split on. My result is consistent with theirs and weaker than it: I show a specific control underperforming, not that the whole approach is unsound.
What I deliberately did not measure, and why. FLIP’s
aav and gb1 tasks, ProteinGym, and TAPE’s fluorescence and
stability tasks are single-parent mutant libraries: every sequence is a variant of one wild
type, so an edit-distance check returns about 100% by construction. The number would be real
and meaningless. Running them to make the table longer would be the same kind of move this
page criticises. FLIP’s bind is measured and excluded for the reason given above: its splits control for ligand type, not sequence identity.
Homology leakage is not a new concern. It is well documented in general. The only thing I am adding is the measurement on these specific published splits, and the comparison between the ones that handled it and the one that handled it well.
I found this class of defect in my own work first, along with three others, and withdrew the claims that depended on them. That record is in the paper, including the register of what I retracted.
04b Questions
Short answers, with the numbers above.
Why do two splits built by the same documented procedure leak 0% and 65%?
Because the split method is not the variable, corpus redundancy is. FLIP conservation and FLIP secondary_structure both state 'Randomly split sequences into train/test with 95/5% probability' verbatim in their own READMEs, both are flagged green, and they measure 0.00% and 65.38% respectively. The PDB contains an enormous number of near-identical chains, which the secondary structure corpus draws on, and the conservation sequences do not. A random split is safe on a non-redundant corpus and badly unsafe on a redundant one, and there is no way to know which case applies without measuring it.
Is a 65% contamination rate the same as a benchmark being overstated by 65 points?
No. A contamination rate is not a score inflation. The rates were produced without retraining, so on their own they do not say by how much any reported accuracy is overstated. Where an inflation was measured, it is reported separately with the model named: on LRGB Peptides-func, the count-ECFP + LightGBM baseline of arXiv 2501.17901 scores 0.7460 macro AP on the shipped split and 0.5687 on corrected splits, a difference of +0.1773 (sd 0.0094). That figure belongs to that model and does not transfer to other models.
What identity threshold produces a clean protein train/test split?
In the splits measured here, 20% identity with whole-cluster assignment was clean and 30% identity was not. FLIP meltome clusters with mmseqs easy-cluster at min-seq-id 0.2 and assigns whole clusters 80/20, retaining 0.29%. PepBenchmark clusters at 30% identity after a k-mer step and retains 29.97% to 48.56%. Both cluster and then split, and they land two orders of magnitude apart, so the threshold and the unit assigned to the split both matter.
Which measured splits came back clean, and why does that matter?
Six rows returned at or near zero: AMP Scanner v2 negatives 0.00%, FLIP meltome human_cell 0.00%, FLIP scl mixed_hard 0.00%, FLIP conservation sampled 0.00%, FLIP meltome human 0.05%, and FLIP meltome mixed 0.29%. These are load-bearing. AMP Scanner v2 positives and negatives come from the same paper, the same tool and the same run, differing only in CD-HIT threshold, 90% against 40%, and return 16.71% and exactly 0.00%. A measurement that found contamination everywhere would be worthless as evidence.
05 Your turn
Check your own evaluation table.
The same check runs in your browser on a CSV, with no account and no upload. If it finds nothing, that is a useful result too, and two of the six rows above are exactly that.