Hyperparameter Tuning interview question

Machine LearningHyperparameter Tuningeasy

A telecom team tunes a churn network with successive halving: 81 configurations, a minimum budget of 1 epoch, a maximum of 81 epochs and η = 3 (keep the best third and triple the budget at each rung). Survivors are retrained from scratch with each rung's budget. What do the rungs look like, and how many epochs does the whole run cost?

  1. ARungs of 81, 27, 9, 3 and 1 configurations, each trained for the full 81 epochs because only the number of configurations shrinks: 121 × 81 = 9,801 epochs, more than training all 81 once.
  2. BRungs of 81, 40, 20, 10, 5, 2 and 1 configurations at doubling budgets of 1 to 64 epochs, because successive halving always keeps the better half; η = 3 only sets the number of brackets.
  3. CRungs of 81, 27, 9, 3 and 1 configurations at 1, 3, 9, 27 and 81 epochs: 81 epochs per rung, 405 in total, only about 6% of the 6,561 needed to train all 81 to 81 epochs.
  4. DRungs of 81, 27, 9, 3 and 1 configurations at 1, 3, 9, 27 and 81 epochs: 81 + 27 + 9 + 3 + 1 = 121 epochs in total, because each configuration is charged only once.
Show the answer and explanation

Correct answer: C, Rungs of 81, 27, 9, 3 and 1 configurations at 1, 3, 9, 27 and 81 epochs: 81 epochs per rung, 405 in total, only about 6% of the 6,561 needed to train all 81 to 81 epochs.

Explanation Hyperparameter Tuning

Successive halving starts many configurations on a small budget and repeatedly keeps the best 1/η of them while multiplying the budget by η. With 81 configurations, η = 3 and budgets from 1 to 81 epochs:

RungConfigurationsEpochs eachEpochs in rung
081181
127381
29981
332781
418181
Total405

Every rung costs the same (configurations × epochs stays 81), so the total is 5 rungs × 81 = 405 epochs, versus 81 × 81 = 6,561 for training every configuration fully: about 6% of the cost. If survivors resume from checkpoints instead of restarting, each rung only adds the extra epochs and the total drops to 297.

The catch is the assumption that early performance predicts final performance: a configuration that starts slowly (small learning rate, strong regularisation) can be killed after 1 epoch. Hyperband hedges against this by running several brackets that start fewer configurations at larger minimum budgets, and ASHA is an asynchronous variant that promotes configurations without waiting for a rung to finish.

Why the others fail: survivors get η times more budget at each rung rather than the full budget from the start; η = 3 means keeping one third, not one half; and charging one epoch per configuration ignores that survivors train for 3, 9, 27 and 81 epochs.

Interview tip: compute rungs as nᵢ = n / ηⁱ configurations at rᵢ = r_min · ηⁱ epochs, and name the main risk: low-budget rankings that disagree with full-budget rankings.

Practice it as a quiz

Answer this and the other free questions with instant grading, streaks and weak-topic tracking, or unlock all 4,000 questions.

More Machine Learning questions

  1. What is the difference between model parameters and hyperparameters?
  2. What does the bias–variance trade-off describe?
  3. What does the mean squared error cost J(w) = (1/n) Σ (yᵢ − ŷᵢ)² measure for a linear regression model?
  4. What does the Gini impurity of a decision-tree node measure?
  5. Which statement correctly contrasts bagging and boosting?