Question 4 of 9 Intermediate Scenario
How do feature leakage and label leakage differ?
Short answer
Feature leakage includes predictors or processing informed by data unavailable at decision time. Label leakage is a narrower case where outcome information enters inputs or model selection.
Why
Imagine predicting sepsis at admission. A lab result obtained after diagnosis is a leaking feature because it would not exist when the model is used. A column generated from the confirmed sepsis code is even more direct label leakage.
Leakage also occurs during preprocessing: imputing, selecting genes or scaling using the entire dataset transmits test-set information into training, even if no outcome field was copied. Define a prediction timestamp and map exactly when every predictor is collected, then build all learned transformations in a training-only pipeline. Review repeated measures and derived patient identifiers.
A high validation score cannot rule out leakage when the validation design shares the same shortcuts as training.
Common mistakes
- Treating leakage only as literally including the target column in the feature matrix
The interviewer might ask next
What audit would you run when a model predicts outcomes with suspiciously high accuracy?