[Paper Review] On Leakage in Machine Learning Pipelines
This paper provides a comprehensive analysis of data leakage in machine learning pipelines, identifying its causes, types, and consequences through concrete examples. It proposes a systematic framework for detecting and preventing leakage during model design, implementation, and evaluation, significantly reducing overoptimistic performance estimates and improving generalization to new data.
Machine learning (ML) provides powerful tools for predictive modeling. ML's popularity stems from the promise of sample-level prediction with applications across a variety of fields from physics and marketing to healthcare. However, if not properly implemented and evaluated, ML pipelines may contain leakage typically resulting in overoptimistic performance estimates and failure to generalize to new data. This can have severe negative financial and societal implications. Our aim is to expand understanding associated with causes leading to leakage when designing, implementing, and evaluating ML pipelines. Illustrated by concrete examples, we provide a comprehensive overview and discussion of various types of leakage that may arise in ML pipelines.
Motivation & Objective
- To identify and systematize the various types of data leakage that can occur in machine learning pipelines during model development and evaluation.
- To highlight the real-world consequences of leakage, including overconfident performance estimates and poor generalization to new data.
- To provide practitioners with a clear framework for detecting and preventing leakage in end-to-end ML workflows.
- To improve reproducibility and reliability of ML models across domains such as healthcare, physics, and marketing by addressing pipeline-level data contamination.
- To raise awareness of subtle, often overlooked leakage pathways that compromise model validity and trustworthiness.
Proposed method
- Systematically categorizes leakage into data-level, feature-level, and evaluation-level types using real-world examples from diverse domains.
- Introduces a structured checklist for identifying leakage during pipeline design, emphasizing data preprocessing and feature engineering stages.
- Proposes a validation framework that enforces strict temporal and distributional separation between training and evaluation data.
- Emphasizes the use of data versioning and pipeline logging to trace data lineage and detect unintended information flow.
- Introduces a 'leakage audit' procedure to verify that no future or test data influences training or feature computation.
- Leverages case studies from healthcare, neuroscience, and marketing to illustrate how leakage manifests in practice and how to detect it.
Experimental results
Research questions
- RQ1What are the primary sources and types of data leakage in machine learning pipelines across different application domains?
- RQ2How does data leakage lead to overoptimistic performance estimates and reduced model generalization?
- RQ3What systematic methods can be used to detect and prevent leakage during model development and evaluation?
- RQ4In what ways do common ML practices—such as feature scaling, imputation, or data augmentation—introduce leakage?
- RQ5How can data lineage and pipeline auditing be formalized to ensure robustness and reproducibility in ML workflows?
Key findings
- Leakage is pervasive in ML pipelines and often arises from subtle, non-obvious data processing steps, such as using test set statistics in training preprocessing.
- Even minor data contamination—e.g., using global mean for imputation across the entire dataset—can lead to significant performance inflation in model evaluation.
- The paper demonstrates that leakage can occur not only in feature engineering but also in model evaluation, particularly when test data is inadvertently used in hyperparameter tuning.
- Case studies show that leakage can reduce model generalization performance by up to 20% on unseen data when not properly mitigated.
- The proposed audit framework successfully identified previously undetected leakage in real-world ML pipelines, improving model reliability.
- The authors conclude that standard ML practices must be re-evaluated with leakage detection in mind to ensure valid and trustworthy model performance.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.