AIExplainer
Machine Learning AI Agents Intermediate 2 min read

What is label leakage?

A problem in machine learning where the model is inadvertently trained on information that will not be available during prediction

Label leakage occurs when the data used to train a machine learning model contains information that will not be available when the model is used to make predictions. This can cause the model to perform well during training, but poorly when applied to real-world data.

Label leakage is like trying to predict how well a student will do on a test by looking at the answers. The model is learning from information that it won't have access to when it's actually making predictions, so it's not learning to make good predictions based on the available data.

For example, a model that predicts whether a customer will churn based on their usage patterns may be trained on data that includes the customer's future usage patterns. However, when the model is used to make predictions, it will not have access to this information, and may therefore perform poorly.

Label leakage can occur in a variety of ways, such as when a feature is used in training that is not available during prediction, or when the target variable is correlated with a feature that is not available during prediction.

One common misconception about label leakage is that it only occurs when the target variable is directly correlated with a feature. However, label leakage can also occur when there are indirect correlations or when the feature is correlated with other features that are used in the model.

The concept of label leakage has been recognized as a problem in machine learning for many years, and is closely related to other concepts such as data leakage and feature leakage.

data leakage feature leakage target leakage

Three products for different needs — explore what’s relevant to you.