TL;DR
Researchers have demonstrated that "data leakage" during the pretraining of protein language models (pLMs) can significantly inflate performance on downstream tasks without improving actual generalization. By carefully controlling for evolutionary relationships (homology), the study shows that even when standard training metrics like perplexity look identical, models that "saw" test sequences during pretraining appear much smarter than they actually are.
What Problem Does This Paper Address?
Protein language models (pLMs) like ESM-2 are the "LLMs of biology," trained on billions of sequences to predict missing amino acids. We use them to predict protein functions, but there’s a catch: homology. In biology, sequences aren't independent; they are related through evolution.
If a pLM is pretrained on a massive database and then evaluated on a "new" test set, there is a high risk that the test sequences (or their close evolutionary cousins) were already in the pretraining data. This is data leakage. The challenge is that pLMs are so computationally expensive to train that most researchers use off-the-shelf models, making it nearly impossible to know if a model is genuinely generalizing to novel biology or simply recalling patterns it saw during pretraining.
Methods
The authors designed a "controlled leakage" experiment to isolate this effect.
- Rigorous Splitting: They used a tool called CHISEL to partition 81 million sequences from the Pfam database into train, validation, and test sets. Crucially, they ensured there was no detectable homology (evolutionary relationship) between these splits using a battery of sequence alignment tools (HMMER, BLASTp, etc.).
- Controlled Pretraining: They trained three versions of a 650M-parameter ESM-2 architecture:
- Clean: Pretrained only on the training split.
- Leaky: Pretrained on the training split + one copy of the test set.
- Leaky 10x: Pretrained on the training split + ten copies of the test set.
- Downstream Task: They evaluated these models on domain annotation (identifying functional units within a protein) using the PSALM framework. To ensure the results were due to the pLM's embeddings and not the downstream classifier, they kept the pLM weights frozen during the task-specific training.
Datasets
- Pfamseq: An 81M sequence database used for the primary controlled experiments.
- Pfamseq90: A subset clustered at 90% identity (24M sequences) used for training.
- UniRef50: A standard 50M sequence database used to train a "positive control" model (UR50) to compare against the industry-standard ESM-2.
- Ground Truth: Annotations were derived from Pfam 37.2, a curated collection of protein families.
Key Insights and Ideas
- The Invisible Leak: Perhaps the most striking finding is that training loss and validation perplexity are blind to leakage. The "Leaky" and "Clean" models had nearly identical pretraining curves, yet their downstream performance differed significantly. This means you cannot rely on standard pretraining metrics to tell you if your model is contaminated.
- Early Bloomers: The models began learning biologically meaningful features—like protein domains—very early in the pretraining process (within the first 50k–200k steps). This suggests that pLMs prioritize broad structural motifs before fine-tuning on specific sequence nuances.
- Homology vs. Exact Matches: While the study focused on exact-sequence leakage, the authors noted that "homologous leakage" (seeing a relative of the test sequence) is likely even more prevalent and damaging in real-world models like ESM-2, as it provides a "bridge" that helps the model interpolate rather than generalize.
Key Results
- Performance Inflation: Sensitivity on the test set increased by 1.7% for the "Leaky" model and 5.4% for the "Leaky 10x" model compared to the "Clean" model.
- The Negative Control: Crucially, performance on the validation set (which remained non-homologous to all training data) stayed flat across all models. This confirms that the performance boost was purely due to the model "memorizing" the test set, not becoming a better general-purpose learner.
- ESM-2 Recovery: Their reduced-compute model (UR50) recovered most of the performance of the original ESM-2, validating that their experimental setup was representative of state-of-the-art models.
Limitations and Future Work
- Single Task Focus: The study focused primarily on domain annotation. The authors acknowledge that leakage might affect other tasks—like protein-protein interaction or stability prediction—differently.
- The Scale Question: It remains to be seen if the "inflation" effect scales linearly with model size. Does a 3-billion parameter model "leak" more or less than a 650-million parameter one?
- Defining "Generalization": The authors suggest that future work should more precisely characterize the "gray zone" of homology—at what percentage of sequence identity does a model stop generalizing and start interpolating?
In summary, the paper serves as a cautionary tale for the biotech AI community: without homology-informed splits that account for the pretraining stage, our benchmarks may be measuring memory rather than intelligence.
Summary updated