What are the most common causes when a model's cross-validation score significantly exceeds its test set score?

Quick Overview

Asks what usually explains a cross-validation score that is much higher than the score on a held-out test set. It tests your understanding of leakage, split design, selection bias from tuning, distribution shift and evaluation noise, and how to tell them apart.

What are the most common causes when a model's cross-validation score significantly exceeds its test set score?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: medium

Interview Round: Other

What are the most common causes when a model's cross-validation score significantly exceeds its test set score? ```hint Audit what each fold saw Walk through the pipeline step by step and ask whether any step used rows from the validation fold before that fold was scored. ``` ```hint Compare how the data was split Compare how the CV folds were formed with how the test set was drawn: by time, by user or entity, or from a different source. ``` ### What a Strong Answer Covers - Leakage paths inside the CV loop, including preprocessing fitted outside the folds and related rows spread across folds - Whether the split scheme matches the structure of the data, such as time order or groups - Optimism from heavy tuning and model selection on the same folds - Differences between the training and test distributions, and how to detect them - Whether the gap exceeds noise, and whether the test-time evaluation path matches the CV one ### Follow-up Questions - How does nested cross-validation remove selection bias, and what does it cost? - How does adversarial validation work, and what would you do if the classifier separates train from test with an AUC of 0.9? - How do you compute target encoding inside cross-validation without leaking the label? - If the test set is a later time period and the gap comes from drift, how would you change the validation scheme?

Overview: Asks what usually explains a cross-validation score that is much higher than the score on a held-out test set. It tests your understanding of leakage, split design, selection bias from tuning, distribution shift and evaluation noise, and how to tell them apart.

General logo
General
Nov 24, 2026
mediumMachine Learning EngineerOtherMachine Learning
0
0

What are the most common causes when a model's cross-validation score significantly exceeds its test set score?

What a Strong Answer Covers Guidance

  • Leakage paths inside the CV loop, including preprocessing fitted outside the folds and related rows spread across folds
  • Whether the split scheme matches the structure of the data, such as time order or groups
  • Optimism from heavy tuning and model selection on the same folds
  • Differences between the training and test distributions, and how to detect them
  • Whether the gap exceeds noise, and whether the test-time evaluation path matches the CV one

Follow-up Questions Guidance

  • How does nested cross-validation remove selection bias, and what does it cost?
  • How does adversarial validation work, and what would you do if the classifier separates train from test with an AUC of 0.9?
  • How do you compute target encoding inside cross-validation without leaking the label?
  • If the test set is a later time period and the gap comes from drift, how would you change the validation scheme?