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.
For an unsupervised model like an autoencoder or a clustering algorithm, there's no labeled validation metric to watch for overfitting the way there is in supervised learning. How would you detect that such a model is overfitting anyway?
What do we mean by a model's 'capacity' (or 'effective capacity')? Name the concrete architectural factors that increase it for a neural network, and the analogous factors for a tree-based model, then give three signals you'd look at in practice to tell whether a model's capacity is currently too high or too low for the data available.
You can either increase training data by 3x or increase model capacity (more layers/trees), but not both, to close a validation gap you're seeing. How do you decide which lever to pull, and what evidence would change your answer?
Design an end-to-end hyperparameter optimization system for a team that trains large models (billions of parameters), supporting multi-fidelity methods (ASHA/Hyperband), Bayesian optimization, experiment tracking, and autoscaling. Describe the main components (scheduler, workers, results store), cost-control mechanisms, and how checkpoints and metadata support reproducibility.
Implement a successive halving scheduler in Python. It should accept a list of hyperparameter configurations, a maximum resource budget (e.g. max epochs), and an evaluation function eval_fn(config, resource) returning a scalar metric; it should iteratively allocate resources, evaluate, and promote the top fraction of configurations at each rung, returning the best config found. Handle the case where a configuration's evaluation raises an error for a given resource level.
Unlock Full Question Bank
Get access to all Model Selection, Tuning, and Generalization interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.