How do successive halving and Hyperband allocate a fixed tuning budget?
answer
- a resource you can dial down
- race, cut, multiply, repeat
- each rung costs about the same
- you must choose how aggressive to cut
- sweep the aggressiveness instead of guessing
basics
~20 sSuccessive halving trains many configurations on a small budget, keeps the best fraction, multiplies the budget, and repeats. Hyperband runs several such brackets with different starting aggressiveness, hedging against early stopping that discards a slow starter.
solid answer
~50 sSuccessive halving treats tuning as a race under a resource that can be dialled up — epochs, boosting rounds, or training-set fraction. Start `n` configurations at a small budget `r`, score them, keep the top `1/eta`, multiply the budget by `eta`, repeat until one survives. With `eta = 3` and 81 configurations at one epoch, the rungs are 81 at 1, 27 at 3, 9 at 9, 3 at 27, and 1 at 81 — every rung costs about the same total epochs while the survivor gets 81 times the budget of the first rung. The catch is that you must choose `n` and `r` up front: many cheap trials risk cutting a slow starter, few expensive trials waste budget on obvious losers. Hyperband removes that choice by sweeping several brackets, from very aggressive to barely aggressive at all, spending comparable budget on each, so one bracket is always a reasonable bet.
code
python · 14 lineseta = 3
n = 81 # configurations in the first rung
r = 1 # budget (epochs, boosting rounds) per configuration
total = 0
while True:
cost = n * r
total += cost
print(f"{n:3d} configs x {r:2d} units = {cost:3d} units")
if n == 1:
break
n //= eta
r *= eta
print("successive halving total:", total)
print("training all 81 to full budget:", 81 * 81)go deeper
Know the shape of the idea: try many settings briefly, throw away the worst, give the survivors more training time, and repeat until one is left. Be able to say what resource is being handed out.
Reproduce the rung arithmetic for a given cut factor and starting population, and explain why every rung costs roughly the same. State the assumption that short-run ranking predicts full-run ranking.
Discuss choosing the cut factor and the minimum rung budget for a real model, what a fidelity means when the budget knob is a data subsample, and how rung synchronisation interacts with your compute setup.
Own the call on whether an early-stopping search is worth the operational complexity at all, and how bracket budget is split against other uses of the same cluster time.
## The resource dimension Both methods need a **budget knob**: something you can give a configuration less of to get a cheaper, noisier estimate of how good it would eventually be. Common choices are training epochs or iterations, the number of boosting rounds in a gradient-boosted ensemble, the size of a training subsample, or the number of cross-validation folds evaluated. Without such a knob neither method applies — that is the first thing to check before proposing them. ## Successive halving Parameters: a set of `n` sampled configurations, a starting budget `r` per configuration, and a cut factor `eta` (3 is the common default despite the name "halving", which implies 2). 1. Train all `n` configurations with budget `r`; score each. 2. Keep the top `n / eta`, discard the rest. 3. Multiply the budget by `eta`. 4. Repeat from step 1 until one configuration remains. With `eta = 3`, `n = 81`, `r = 1`: ``` 81 configs x 1 unit = 81 units 27 configs x 3 units = 81 units 9 configs x 9 units = 81 units 3 configs x 27 units = 81 units 1 config x 81 units = 81 units ``` Total about 405 budget units. Training all 81 configurations to full budget would cost 81 x 81 = 6561 units — roughly sixteen times more for the same final winner, *provided* the early rankings were informative. The equal cost per rung is not a coincidence: dividing the population by `eta` while multiplying the budget by `eta` holds the product constant, and that is the design. ## The n-versus-r dilemma For a fixed total budget `B`, you may run many configurations each briefly, or few configurations each at length. These are opposite bets: - **Aggressive** (large `n`, tiny `r`): broad coverage of the space, but ranking is decided on very short runs, so a configuration that converges slowly and finishes strongest can be eliminated at the first rung. - **Conservative** (small `n`, large `r`): rankings are trustworthy, but you only ever look at a few points in the space. Which is right depends on how strongly the low-budget ranking correlates with the full-budget ranking, and you do not know that in advance for a new problem. ## Hyperband Hyperband's answer is to refuse to guess. It runs a sequence of successive-halving **brackets**, indexed by `s`, each with its own `(n, r)` pair, and gives each bracket a comparable share of the total budget. The largest `s` is the most aggressive bracket — the most configurations, the smallest starting budget. As `s` decreases, brackets start with fewer configurations at larger budgets, and the `s = 0` bracket does no early stopping at all: it simply trains its configurations at full budget and picks the best. The number of brackets follows from the ratio of maximum to minimum budget, roughly `log_eta(R)` where `R` is the maximum budget one configuration may receive. Because one of those brackets matches whatever the true low-fidelity/high-fidelity relationship happens to be, Hyperband is only a logarithmic factor worse than having known the right aggressiveness up front — while a single badly chosen successive-halving run can be arbitrarily bad. The price is that the brackets you did not need still consumed budget. ## Practical notes Configurations for the brackets are usually drawn independently, which means Hyperband decides *how long to run* candidates but not *which candidates to try*. That is why hybrids exist that sample each bracket's configurations from a surrogate fitted to all completed rungs, keeping Hyperband's budget schedule and adding model-based sampling. Within a rung, all configurations can train in parallel, but the rung boundary is a synchronisation point: fast finishers wait for the slowest. Asynchronous successive halving removes that barrier by promoting a configuration as soon as it ranks in the top `1/eta` of the finished results at its rung, which keeps workers busy at the cost of promoting on partial rung information. Finally, remember what the score at each rung means. It is the model's quality *at that budget*, which is not the same as its eventual quality. Reporting the final survivor's small-budget score, or comparing configurations across different rungs, are both mistakes. ## What interviewers listen for That you name the budget knob explicitly, that you can produce the rung arithmetic, and that you can state the assumption both methods rest on — early ranking predicts late ranking — rather than presenting them as free speedups.
- What does the least aggressive Hyperband bracket actually do?It performs no early stopping. That bracket takes a small number of configurations and trains each at the maximum budget straight away, then picks the best. It exists as insurance: if short runs rank configurations badly on this problem, that bracket is the one that still finds the winner.
- What breaks if there is no natural budget dimension for your model?Both methods lose their lever. For a learner with no iterative training you can still fake a fidelity with a training-set subsample, but that changes the problem — smaller data systematically penalises higher-capacity, lower-regularisation configurations. If no honest cheap fidelity exists, spend the budget on a model-based search instead.
- Why does a rung boundary hurt throughput on a parallel cluster?A rung is a synchronisation barrier: the top fraction cannot be chosen until every configuration in the rung has finished, so fast workers idle while the slowest run completes. Asynchronous successive halving promotes a configuration as soon as it is in the top fraction of what has finished, trading a little ranking accuracy for near-full worker utilisation.
saying these in an interview costs you the question
- Presents early stopping of trials as a free speedup with no assumption
- Cannot name what resource is being scaled between rungs
- Thinks Hyperband chooses which configurations to try, not how long
- Says each rung costs progressively more than the last
- Compares scores of configurations measured at different rungs