Suspect leakage whenever performance is surprisingly good. The main checks: look for features with implausibly high importance, confirm every feature was knowable at prediction time, verify preprocessing was fit inside the training fold, and check that no entity appears in both train and test. A sharp drop from offline to production is often leakage revealing itself.
Why interviewers ask this
Leakage is the failure that survives all the standard checks, because it makes the model look excellent, so interviewers want to know your suspicion is triggered by good news rather than bad. They listen for the timestamp discipline (was this knowable at prediction time), fold hygiene for preprocessing, and grouping for duplicated entities, which are the three ways it usually sneaks in.
How to structure your answer
- Say that unexpectedly high performance is the first alarm.
- Apply the knowable at prediction time test to every feature.
- Check preprocessing and resampling happened inside the fold.
- Check for duplicate entities across the split.
- Give a concrete leak you have found.
Example answer
My trigger is good news. If a model jumps to 0.97 AUC on a problem the business finds hard, I assume I have leaked something until I prove otherwise. The main test I run on every feature is a timestamp question: at the moment we score this record in production, would this value exist, and would it have this value? A surprising number fail. The nastiest one I caught was a feature called account status. It looked innocent, but the operations team updated it to closed after a customer churned, and the training snapshot held the current value rather than the value at the prediction date, so the model was reading the answer. Removing it dropped AUC from about 0.94 to 0.79, which was the real number. Beyond that I check that scalers, encoders, and any resampling were fit inside the fold, that no customer ID spans train and test, and that target encodings were computed out of fold. And I look at feature importance early rather than as a reporting step at the end, because one feature carrying most of the model is usually a leak, not a discovery.
Walking into this interview soon? GhostPilot listens to your live call, spots the question the moment it is asked, and puts a structured answer on your screen in real time. Try it on your next mock, or grab a $29 Session Pass, no subscription, for the real thing.
See how it worksFollow-up questions to expect
- How does target encoding leak, and how do you do it safely?
- What is the difference between leakage and legitimate signal from a strong feature?
- How would you audit a model someone else built for leakage?
Related data scientist questions
Your interviewer will ask their own version of this. Paste your actual job description into the free Question Predictor and get the 20 questions that role is most likely to ask, with what each one is really probing.
Predict my questions