Data leakage
Information crosses the boundary intended to make a model evaluation representative of its claimed use.
Definition
Data leakage occurs when information unavailable under the intended prediction setting enters model development or evaluation in a way that makes the test misleadingly easy. In MS, repeated spectra, shared peptide sequences, duplicate molecules, or fitted preprocessing can cross an intended train-test boundary. The appropriate boundary depends on the generalization claim. [1] [2]
A new spectrum need not be new chemistry
Constructed example: training contains spectrum A of peptide P, and testing contains spectrum B of the same sequence. This can be legitimate for predicting another measurement of known P. It cannot establish performance on unseen peptide sequences. Distinct filenames and different charge states do not repair a sequence-level overlap.
Common confusion
Not every train-test similarity is leakage: define which overlap the claim excludes. Keep related units together accordingly, and disclose remaining structural or experimental similarity. Fit normalization parameters, feature selection, and hyperparameters without final-test information. Audit pretrained models and libraries, not just the current training file. A species partition may share sequences; an instrument partition may share molecules. These designs answer different questions, and a large test set cannot compensate for a violated boundary.
Use it in a Guide
References & further reading
- Wen & Noble (2024). A multi-species benchmark for training and validating mass spectrometry proteomics machine learning models. Scientific Data 11, 1207.
Primary benchmark with explicit removal of shared peptide sequences across species. Search-derived labels are not presented here as independently known molecular truth.
- Bushuiev et al. (2024). MassSpecGym: A benchmark for the discovery and identification of molecules. NeurIPS Datasets and Benchmarks Track.
Primary benchmark defining molecular retrieval, generation, spectrum simulation, and a generalization-demanding split. Dataset scope is not a guarantee for all structures or acquisition settings.