Detect and Prevent Training-Serving Skew in Ranking Features
Last updated: November 29, 2026
Quick Overview
Define training-serving skew, give concrete examples of how it arises in a real-time ranking system, and describe how you would detect and prevent it.
Meta
November 29, 20260
0
0 solved
Define training-serving skew, give concrete examples of how it arises in a real-time ranking system, and describe how you would detect and prevent it.
Meta ranking models consume thousands of features computed by both batch and online pipelines, and skew is a frequent root cause of bad launches. This screen question checks practical production ML knowledge.
What the Interviewer Expects
- Precise definition: the model sees different feature values or distributions in training than at serving
- Concrete causes: dual code paths, time travel leakage, freshness gaps, defaults
- Detection via logged serving features and distribution comparisons
- Prevention by logging features at serving time and training on those logs
- Point-in-time correct joins for features not logged
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- How would you monitor skew for thousands of features without alert fatigue?
- What is the difference between skew and drift?
- How do you handle a feature that is expensive to log?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Skew means the input for the same request differs between training and serving, or the training distribution differs systematically from what the model sees in production because of the pipeline (...
Approach
List causes, then detection, then prevention, with an example of each....