Stockertim Dictionary · Technology · Artificial intelligence
Data leakage
Also called leakage, target leakage, information leakage, look-ahead leakage
In short
When information a model would not really have at prediction time, from the future or from the answer itself, slips into its training data or features and makes test results look better than they are.
- Advanced
- Concept
- Checked
In detail
A model is meant to be tested under the same conditions it will face in real use. Data leakage breaks that rule. Somewhere in the pipeline, information that would not be available when a real prediction is made has reached the model, so it learns a shortcut that disappears in live use. The symptom is a model that scores brilliantly in testing and disappoints, sometimes badly, once deployed.
Leakage takes several forms. Target leakage happens when a feature is a consequence of the outcome, such as including a collections flag in a model meant to predict default. Look-ahead leakage uses data stamped with a date but published later, such as quarterly earnings revised months afterwards. Train-test contamination occurs when preprocessing steps such as scaling, filling gaps or selecting features are fitted on the whole data set, or when the same customer appears in both training and test data.
In finance, leakage is a common reason backtested strategies fail in live trading. Using a current index membership list for past years, using closing prices to make decisions supposedly taken at the open, or tuning a strategy on the same period used to report results all leak information. Prevention relies on point-in-time data, strict time-ordered splits, fitting every transformation only on training data and asking of each feature: would this have been known at that moment?
Worked example
A fraud model at Kestrel Pay includes a feature showing whether the card was blocked within 24 hours. In testing it catches 98% of fraud.
- Blocks happen because fraud was already reported, so the feature encodes the answer.
- Without that feature, test recall falls to 70%.
- Inflation of the result: 98% − 70% = 28%
The leaked feature added 28 percentage points of apparent performance that would never exist in live use.
In practice
Model validators in banks and investment firms look for leakage first when results seem too good. Quant teams use point-in-time databases and purge or embargo gaps between training and test periods to block it.
Watch out
- Data leakage in machine learning differs from a data leak, which is confidential information escaping an organisation.
- Unusually high test scores are a warning sign, not a cause for celebration.
Learn it properly
Official sources
- Artificial Intelligence Risk Management Framework (AI RMF 1.0) · National Institute of Standards and Technology
- AI data security: best practices for securing data used to train and operate AI systems · Cybersecurity and Infrastructure Security Agency
Facts last checked on 4 November 2026.
Education, not advice: the Stockertim Dictionary explains what terms mean. It never recommends buying or selling anything.