Diagnose Overfitting in a Gradient Boosted Search Ranking Model

Last updated: November 29, 2026

Quick Overview

Your new gradient boosted ranking model for web search shows NDCG@10 rising on the training set but flat or falling on validation as you add trees. Explain how you would diagnose the problem and what you would change.

Microsoft
Machine Learning
Machine Learning Engineer
Microsoft
November 29, 2026
Machine Learning Engineer
Onsite
Machine Learning
Medium

0

0

0 solved


Your new gradient boosted ranking model for web search shows NDCG@10 rising on the training set but flat or falling on validation as you add trees. Explain how you would diagnose the problem and what you would change.

Bing has used gradient boosted trees such as LambdaMART for ranking for many years, and the LightGBM library came out of Microsoft. Interviewers check that you can read learning curves, know the regularization knobs of boosted trees, and recognize ranking-specific issues like query-level splits and feature leakage from click logs.

What the Interviewer Expects
  • Reads train versus validation curves to separate variance from bias
  • Lists concrete regularizers: learning rate, depth or leaves, min data per leaf, subsampling, L1/L2, early stopping
  • Ensures splits are by query (and by time) to avoid leakage
  • Checks for leaky features derived from post-click signals
  • Uses a ranking metric and loss aligned with the product
  • Validates gains with online interleaving or A/B tests
Key Topics to Cover
Bias-variance
Gradient boosting
Learning to rank
Regularization
Data leakage
How to Approach This
  1. Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
  2. Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
  3. Feature engineering is often more impactful than model selection.
  4. Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
  5. Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
  • Why must the validation split group documents by query?
  • How would you detect that a click-derived feature is leaking the label?
  • What does lowering the learning rate trade off, and how should the number of trees change with it?
  • Offline NDCG improved but online clicks did not: what could explain that?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Explore ML Interview Prep
Sample Answer
Clarify

How are labels produced (human relevance judgments, click models, or both)? How was data split? Which hyperparameters were used (learning rate, number of leaves)? How large is the gap: is training NDC...

Approach

First rule out a broken setup, then treat true overfitting. Check splits: documents for the same query must never span train and validation, or the model memorizes query-specific patterns. Use a time ...


Submit Your Answer
Markdown supported