- Concepts
- Designing production ML systems
- Evaluation and experimentation
- Evaluation validity threat
- Data leakage
Data leakage
PhenomenonData leakage is inappropriate information transfer across fitting, selection, or evaluation boundaries that invalidates the intended estimate of deployment performance.
In plain terms: When information the model should not have at prediction time sneaks into training or evaluation, making test scores look better than real-world results.
For example: Including a hospital's discharge code as a feature for predicting readmission leaks the outcome, and a 0.99 AUC falls to 0.7 in production.
Read
Docs
- scikit-learn: Cross-validation: evaluating estimator performance (opens in a new tab)scikit-learn project
About this resource
Study Data leakage at cross-validation iterators; grouped and time-series splits; nested selection and evaluation.
Where to read: Cross-validation iterators; grouped and time-series splits; nested selection and evaluation
Checked 2026-10-08
Authority for this purpose: Official maintainer documentation for the relevant method, assumptions, parameters and evaluation behavior.
Destination inspection: Bounded GET; public DNS/IP pinned; redirect-by-redirect validation; destination text inspection required; bounded full HTML after removing script/style blocks; reviewed destination title, provenance and concept-specific subject
Useful destination; no explanatory claim is asserted from this link.
- Implementation guidance for scikit-learn; it does not establish original invention or independent superiority.
Reviewed authoritative resource
Where to read: Cross-validation iterators; grouped and time-series splits; nested selection and evaluation
A first-party destination supports its documented scope; it does not establish independent performance validation or historical priority.
- Point-in-time feature joins (opens in a new tab)Databricks Documentation · 2026
About this resource
Databricks shows how timestamp-aware feature lookups stop values recorded after a label's time from entering training data, a common and hard to detect leakage source.
Where to read: Full page
Checked 2026-10-31
Authority for this purpose: Databricks Documentation publishes this official documentation.
Destination inspection: Bounded public-address-pinned GET followed by destination text and concept-scope inspection
Useful destination; no explanatory claim is asserted from this link.
- Vendor documentation for one feature store API.
- Vendor documentation describes its own product and may change between versions.
Reviewed authoritative resource
Where to read: Full page
A first-party destination supports its documented scope; it does not establish independent performance validation or historical priority.
Related concepts
Broader
- Evaluation validity threatPhenomenon
Narrower
- Time-series leakagePhenomenon
- Benchmark contaminationPhenomenon
Asked in interviews
- Debug a leaky preprocessing step with documentation and a revealing checkAnthropic · Coding
- Locate leakage inside a preprocessing experimentML fundamentals
- Design leaf recognition with retrieval and uncertaintyGoogle · System design
Books to go deeper
Designing Machine Learning Systems
Chip Huyen · 1st edition
Data, evaluation, deployment and monitoring decisions in production ML.
View on Amazon (affiliate link) ↗Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow
Aurélien Géron · 3rd edition
Build and evaluate predictive models and practical preprocessing pipelines.
View on Amazon (affiliate link) ↗As an Amazon Associate I earn from qualifying purchases.
Loading discussion…
