InterviewStack.io LogoInterviewStack.io

Model Selection, Tuning, and Generalization Questions

Choosing and tuning models so they generalize to unseen data rather than memorizing the training set. Covers the bias-variance tradeoff and its decomposition, diagnosing over- and under-fitting from learning curves, and regularization techniques such as L1/L2 penalties, dropout, and early stopping, alongside cross-validation strategies and grid, random, and Bayesian hyperparameter search. Emphasizes a principled, reproducible process for selecting model complexity and tuning against a real compute-versus-accuracy budget rather than ad-hoc trial and error.

EasyTechnical
87 practiced

Compare exhaustive grid search with random search for hyperparameter optimization. In which situations is random search more efficient, and how does the dimensionality of the search space affect each approach?

MediumTechnical
74 practiced

You're tuning an XGBoost model with a large number of available hyperparameters. Describe a principled approach to deciding which ones to prioritize tuning first, given limited trials.

MediumTechnical
70 practiced

You must fine-tune a pre-trained transformer on a classification task with only 2,000 labeled examples. What regularization strategy would you apply (and why), given how easy it is to overfit a large pre-trained model on a small fine-tuning set?

HardTechnical
66 practiced

Compare grid search, random search, Bayesian optimization, Hyperband, and population-based training for hyperparameter tuning at production scale. For each, cover parallelism, how it handles noisy objectives, and the situations (budget, parameter dimensionality) where you'd prefer it over the others.

MediumTechnical
88 practiced

When would you prefer an ensemble of models over a single model in production, and when would the latency and memory cost not be worth it? For a service with a strict p99 latency budget, how would you decide, and what quantitative check would you run before committing to an ensemble that improves offline accuracy?

Unlock Full Question Bank

Get access to all Model Selection, Tuning, and Generalization interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.