How would you investigate whether a feature with near-perfect validation performance is leaking the target?

Quick Overview

One engineered feature gives near-perfect validation scores, and you need to find out whether it leaks the target. Tests how you check a feature against the label, trace its lineage and timing against the prediction cutoff, spot leaks in the split, and re-validate it under realistic conditions.

How would you investigate whether a feature with near-perfect validation performance is leaking the target?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

A single engineered feature gives near-perfect validation performance. How would you investigate whether it is leaking the target? ```hint When does the value exist? Compare the moment each feature value gets written with the moment the model would have to make its prediction. ``` ```hint Cheap checks first Before reading pipeline code, look at how well the feature separates the classes on its own, and at which rows have it missing. ``` ### What a Strong Answer Covers - How to measure how much the model depends on this one feature - Direct checks of the feature's values against the label - Tracing the feature's source and timestamps against the prediction cutoff - How the feature's computation and the train/validation split could let label information through - A realistic re-test and the rule for keeping or dropping the feature ### Follow-up Questions - The feature turns out to be legitimate, but in production it arrives several hours after the prediction is made. What do you do? - What checks would you add to the feature pipeline so a leak like this is caught before anyone trains on it? - How would you detect near-duplicate rows that appear in both the training and validation sets?

Overview: One engineered feature gives near-perfect validation scores, and you need to find out whether it leaks the target. Tests how you check a feature against the label, trace its lineage and timing against the prediction cutoff, spot leaks in the split, and re-validate it under realistic conditions.

Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

A single engineered feature gives near-perfect validation performance. How would you investigate whether it is leaking the target?

What a Strong Answer Covers Guidance

  • How to measure how much the model depends on this one feature
  • Direct checks of the feature's values against the label
  • Tracing the feature's source and timestamps against the prediction cutoff
  • How the feature's computation and the train/validation split could let label information through
  • A realistic re-test and the rule for keeping or dropping the feature

Follow-up Questions Guidance

  • The feature turns out to be legitimate, but in production it arrives several hours after the prediction is made. What do you do?
  • What checks would you add to the feature pipeline so a leak like this is caught before anyone trains on it?
  • How would you detect near-duplicate rows that appear in both the training and validation sets?