Machine-learning interviews rarely reward a definition by itself. A useful answer connects the concept to assumptions, evidence, a practical decision, and a failure mode.
This 2026-expanded bank covers the durable ML fundamentals plus applied questions that recur in big-tech interviews: imbalance, calibration, experimentation, recommender cold start, feature interpretation, offline-versus-online gaps, and launch decisions.
This is the expanded interview-preparation version
Current, research-driven questions are shown first so you can immediately see what changed. Each question keeps the detailed answer, example, likely follow-up, and weak-answer warning.
What you will be able to do
- Answer ML questions in layers
- Calculate and interpret common metrics
- Compare algorithms from their assumptions
- Recognize leakage and validation defects
- Diagnose practical model failures
Build an interview answer in layers
Lead with the answer, then add depth when invited
Choose a metric from the cost of errors
Which mistake is more costly?
A reusable answer method
Lead with a direct interview-ready answer. Then explain the intuition, name the assumption or decision criterion, use a small example, and close with one limitation or likely follow-up. The interviewer can stop you after any layer without losing the main answer.
Metric and algorithm reminders
Choose from the decision, not from habit
23 interview questions with detailed answers
The 9 questions marked 2026 SIGNAL are shown first because they reflect current public big-tech interview patterns. Core fundamentals follow after them.
These were added or elevated from the latest research pass. They are intentionally placed before the older core bank so the update is visible immediately.
Common big-tech ML pattern: imbalance, thresholds, and business cost are frequent follow-ups in applied-model questions.
How do you handle a highly imbalanced classification problem?
Start with a metric and operating point that reflect the minority-class decision cost, then compare class weighting, threshold tuning, resampling, better features, and calibrated probabilities under the same validation design.
Resampling changes the training distribution, not the real prevalence. Class weights change the loss. Threshold tuning changes the decision policy. For rare events, PR-AUC, recall at fixed precision, or recall under a review-capacity constraint are often more informative than accuracy.
Frequently tested in senior ML and production interviews because many real systems consume scores as probabilities.
What is probability calibration, and why can a high-AUC model still be badly calibrated?
AUC asks whether positives tend to rank above negatives; calibration asks whether predicted probabilities match observed frequencies. A model can rank perfectly but systematically output probabilities that are too high or too low.
Calibration matters when probabilities drive pricing, capacity, risk, or intervention thresholds. Reliability diagrams, Brier score, and held-out Platt scaling or isotonic regression can diagnose and repair it without contaminating the final test set.
Google and Meta data/ML interview reports repeatedly emphasize experiments, product metrics, and offline-versus-online evaluation.
How would you launch a new model with an A/B test?
Define the unit of randomization, primary business metric, guardrails, sample-size or power plan, ramp strategy, and logging before exposing users. Compare treatment against the current policy and keep the model version and assignment stable.
Offline metrics are necessary but not sufficient because user behavior, latency, feedback loops, and intervention effects appear only online. Avoid interference when users affect one another, and watch novelty effects and repeated peeking.
A recurring system-design follow-up in ranking and recommendation interviews.
Why can offline metrics improve while online product metrics get worse?
Offline evaluation can optimize the wrong proxy, use a nonrepresentative sample, miss latency or UX costs, or ignore how the new policy changes future data.
Check data freshness, eligibility, position bias, serving parity, threshold policy, slice performance, and whether the offline label actually represents the business goal. Online systems also create feedback loops that static datasets do not capture.
Common applied-ML follow-up after confusion-matrix, calibration, or fraud questions.
How do you choose a decision threshold from a probability score?
Choose the threshold using expected cost, capacity, or a required precision/recall constraint on validation data; do not default to 0.5.
The best threshold depends on prevalence, calibration, business cost, and resource limits. Revisit it when those change. If actions are capacity-limited, ranking and top-k selection may be more natural than a single global threshold.
Project deep-dives often probe whether candidates can explain model behavior responsibly.
How would you explain feature importance without overstating causality?
Feature importance explains how a fitted model uses information for prediction; it does not establish that changing the feature will cause the outcome to change.
Tree gain can favor high-cardinality features, permutation importance can be diluted by correlated substitutes, and SHAP values explain predictions relative to a background distribution. Always pair importance with stability checks, leakage review, and domain interpretation.
Recent Apple and Meta ML question banks explicitly include Random Forest explanations and tree-ensemble comparisons.
Random Forest or gradient boosting: how do you choose?
Random Forest averages many independent trees for robust low-tuning baselines; gradient boosting builds trees sequentially to correct residual errors and often wins on tabular accuracy but is more sensitive to tuning and leakage.
Compare under the same split and metric. Consider latency, calibration, class weighting, missing-value handling, interpretability, training cost, and how much tuning the team can operate.
Recommendation and ranking systems are repeatedly reported in Meta, Netflix, Google, and Amazon ML loops.
How do you handle cold start in a recommendation system?
Use content and context features, popularity or editorial priors, onboarding signals, exploration, and fast feedback collection until collaborative signals become reliable.
New-user and new-item cold start are different. New items can borrow content embeddings; new users can use context, declared interests, regional trends, or diversified exploration. Measure the transition from prior-based to personalized ranking.
Production MLE interviews frequently probe drift, retraining criteria, and delayed-label reasoning.
What is covariate shift, and when should you retrain?
Covariate shift means the input distribution changes; it does not automatically mean the mapping from inputs to outcomes changed. Retrain only when trustworthy evidence shows the current model no longer meets the decision objective and a candidate improves it safely.
Monitor feature distributions, score distributions, slices, delayed labels, and business outcomes. A changed input mix may be harmless if the conditional relationship is stable, while concept drift can hurt quality even with small marginal feature changes.
What do mean and variance tell you, and what can they hide?
The mean estimates a center; variance averages squared distance from that mean. Neither describes skew, multimodality, or outliers by itself.
Squaring makes variance sensitive to extreme observations. Median and IQR may be more representative for skewed income or latency data, while segments can reveal two populations hidden by one average.
Explain conditional probability and Bayes' rule with a screening test.
Bayes updates a prior probability after observing evidence: P(A|B)=P(B|A)P(A)/P(B). A strong test can still have a low positive predictive value when the condition is rare.
Sensitivity and specificity describe test behaviour conditional on disease state; the patient needs P(disease|positive), which also depends on prevalence.
What does a 95% confidence interval mean?
Under repeated identical sampling, 95% of intervals produced by the method would contain the fixed population parameter.
For one computed frequentist interval, the parameter is not randomly moving. Width depends on sample size, variability, and assumptions. A narrow interval can still be biased by bad sampling.
Explain p-values and hypothesis-test errors.
A p-value is the probability of data at least this extreme assuming the null is true; it is not the probability that the null is true. Type I is a false positive, Type II a false negative.
The significance level controls long-run Type I error under assumptions. Power is the chance to detect a chosen real effect. Large samples can make tiny, commercially irrelevant effects statistically significant.
Correlation is not causation—why does that matter to an ML model?
A model can exploit association without identifying what causes the outcome. Changing a correlated feature may not change the target and may break the historical relationship.
Confounding, selection, and reverse causality can produce stable-looking correlations. Predictions can still be useful, but intervention claims need experiment or causal assumptions.
Explain bias versus variance and diagnose each from learning curves.
High bias underfits: training and validation error remain high. High variance overfits: training error is low while validation error is much higher.
More data often narrows a variance gap but usually cannot repair a model whose representational bias keeps both curves poor. Regularization trades some training fit for stability.
What is data leakage, and how do you prevent it?
Leakage occurs when training uses information unavailable at the real prediction time. Split first and fit every learned transformation only on training data or inside cross-validation folds.
Leakage can come from future events, target-derived columns, the same entity in train and test, preprocessing on all rows, or a random split for time data.
How do you choose cross-validation strategy?
Use ordinary or stratified folds for independent rows, group folds when entities repeat, and forward time splits when predictions concern the future.
The validation design should reproduce the independence, chronology, labels, and distribution of production decisions. Nested validation may be needed to estimate performance after hyperparameter tuning.
How do L1 and L2 regularization differ?
L1 adds λΣ|w| and can set coefficients exactly to zero; L2 adds λΣw² and smoothly shrinks large coefficients.
L1 can select among redundant features unstably, while L2 tends to share weight across correlated predictors. Elastic Net combines both.
Compare linear/logistic models, trees, random forests, and boosting.
Linear models are fast and interpretable under linear structure; trees capture interactions; forests average unstable trees; boosting sequentially corrects residual errors and is often strong on tabular data.
Choose using data size, non-linearity, missingness, latency, calibration, interpretability, and validation—not a universal ranking.
When do kNN, SVM, clustering, and PCA become fragile?
Distance-based methods need meaningful scaled distances; high dimensions make neighborhoods sparse. PCA is a linear projection that may remove predictive low-variance directions and reduces interpretability.
kNN also has inference cost proportional to stored examples; kernel SVMs can scale poorly; k-means assumes centroid-like clusters and a chosen k.
Calculate precision, recall, F1, and accuracy from a confusion matrix.
Precision=TP/(TP+FP), recall=TP/(TP+FN), F1=2PR/(P+R), and accuracy=(TP+TN)/all examples.
The operating threshold trades false positives against false negatives. PR-AUC summarizes ranking under rare positives; calibration asks whether a stated probability is reliable.
When use ROC-AUC, PR-AUC, calibration, or a fixed-threshold metric?
ROC-AUC measures ranking across thresholds, PR-AUC emphasizes positive-class retrieval, calibration measures probability reliability, and threshold metrics measure the chosen operating policy.
A model can rank well but be poorly calibrated, or have better AUC yet worse recall at the only threshold the business can use.
How do you debug poor validation or production degradation?
Check metric and slice definitions, split integrity, label/data quality, preprocessing parity, feature drift, version changes, and service behaviour before changing algorithms or retraining.
Reproduce one prediction end to end. Compare current and reference data, features, scores, threshold, latency, and delayed labels. Separate ranking drift from threshold or calibration drift.
Review the deeper lessons
Use these links when an interview question exposes a gap. The interview guide focuses on explanation and decision-making; the linked lesson teaches the full concept.
Keep the answer honest: role boundaries, interview processes, and project outcomes vary. Never invent experience, impact, salary, or certainty to make an answer sound stronger.
Summary / Key Takeaways
- Interview-ready answers connect a direct response to assumptions, examples, and limitations.
- Statistics questions test interpretation of uncertainty, base rates, experiments, and causal claims.
- Leakage prevention requires prediction-time thinking, correct splits, and training-only preprocessing.
- Bias and variance diagnostics determine whether capacity, regularization, or more data is likely to help.
- Algorithm choice depends on geometry, scale, interpretability, latency, and validated performance.
- Metric choice must reflect class balance, probability use, threshold policy, and error cost.
- Production degradation should be localized with evidence before rollback, repair, or retraining.