LearnQuestion bank

Your offline AUC is 0.99 on a churn model. Walk through how you would hunt for leakage.

ML engineeringTechnicalMedium

Answer it yourself first, out loud or on paper, then compare.

Answer

Model answer, written in a candidate's voice

In short

  • Treat 0.99 AUC as a red flag and re-check the label and prediction timestamp first.
  • Scan features for post-event or target-derived fields such as account closed, cancellation, churn reason, or post-churn activity.
  • Check split integrity for duplicate or near-duplicate customers/rows across train and test, and remove ID-like or high-cardinality outcome-encoding fields.
  • Verify point-in-time joins and transforms: feature timestamps precede label time; scalers, encoders, imputers, and selection are fit on train only.
  • Ablate top features and re-evaluate on a strictly later time window; compare with a simple baseline and treat implausible jumps as suspicious.

In full

A 0.99 AUC is not something I would trust at face value; I would start by re-reading the label and the exact prediction timestamp, then audit every feature for anything computed after that moment, like account closed, cancellation, churn reason, or post-churn activity. Next I would check the split for duplicate or near-duplicate customers and rows across train and test, and remove ID-like or high-cardinality fields that could memorise the outcome. I would also verify point-in-time joins so each feature is timestamped before the label time, and confirm that scaling, encoding, imputation, and any feature selection were fit on train only. Then I would ablate the top features and test on a strictly later window, comparing against a simple baseline; if the model collapses or the gain is implausible, that is evidence of leakage rather than a real signal. If it still holds up, I would document the checks and treat the result as promising but not final.

Corrected by an independent AI reviewer.

What a strong answer covers

  • Check features computed after the prediction time (target leakage, e.g. “account closed” flags).
  • Check duplicate or near-duplicate rows across splits, and ID-like features.
  • Fit transforms on train only. Check that point-in-time joins use feature timestamps earlier than the label time.
  • Ablate the top features and test on a strictly later time window.
  • Compare with a simple baseline. Implausible jumps are suspicious.

Common mistakes

  • trusting a single random split
  • assuming the warehouse snapshot equals what was known at prediction time.