3.2.15 · D5Training Deep Networks
Question bank — Hyperparameter tuning for deep nets
True or false — justify
The learning rate is a parameter of the network, learned by gradient descent.
False — it is a hyperparameter set before training; gradient descent tunes weights and biases, not the knob that multiplies its own step.
If validation loss keeps dropping, you should keep the test set involved to double-check.
False — the test set is touched once, at the very end; using it to make choices leaks its information and biases your reported accuracy upward.
A larger model always achieves lower training loss.
Roughly true — more capacity can memorise the training set better, so training loss usually falls; but this says nothing about generalisation, which is why we judge capacity on validation loss.
A larger model always achieves lower validation loss.
False — beyond a point extra capacity overfits, so validation loss rises even while training loss falls (see Bias-Variance Tradeoff).
Doubling the batch size while keeping the learning rate fixed leaves training dynamics unchanged.
False — doubling batch halves gradient noise, so the effective step character changes; the linear scaling rule says you should roughly double the learning rate too.
Grid search always explores each hyperparameter more thoroughly than random search for the same budget.
False — grid repeats identical values along unimportant axes; random search gives every run a distinct value of the important knob, so it explores that dimension far more thoroughly.
Sampling learning rates uniformly from is a fair way to cover the range.
False — ~90% of samples land in ; a multiplicative knob needs log-uniform sampling so each decade gets equal probability.
Weight decay with a huge can only help, since it fights overfitting.
False — too large a pulls weights toward so hard the model underfits; regularisation strength is itself a hyperparameter to balance (see Regularization - L2 and Dropout).
Once you find a good learning rate, the LR schedule no longer matters.
False — the schedule controls how changes over training; warmup avoids early instability and decay lets you settle into the minimum (see Learning Rate Schedules and Warmup).
If overfitting a tiny 10-sample batch to near-zero loss fails, the bug is probably in your hyperparameters.
False — that sanity check tests whether your code can learn at all; a failure usually means a bug in the model or loss, not the hyperparameter values.
Spot the error
"I tuned dropout and weight decay by picking the values that gave the lowest training loss."
Error — training loss rewards memorisation, so it picks zero regularisation; hyperparameters that control overfitting must be chosen on validation loss.
"My LR range test showed loss exploding at , so I'll use exactly for the best speed."
Error — the explosion point sits right at instability; pick roughly one order below it (e.g. ) for a safety margin.
"With 5 hyperparameters at 5 values each, grid search is only 25 trainings."
Error — grid cost multiplies: trainings, not ; the combinatorial product is exactly why grid search is infeasible for deep nets.
"Random search wastes runs because it might sample the same region twice."
Error — the occasional near-duplicate is far cheaper than grid's guaranteed duplicates along unimportant axes; random still tests the important knob at many distinct values.
"Weight decay shrinks the gradient, that's why it's called decay."
Error — it shrinks the weights: the update becomes , so decays by the factor each step, independent of the gradient term.
"Batch normalization is a parameter, so I don't need to tune anything about it."
Error — Batch Normalization introduces choices (whether to use it, its interaction with LR and batch size) and changes the loss landscape, which shifts the good learning-rate range.
Why questions
Why do we need a separate validation set instead of reusing the training set to pick ?
Because we need a held-out signal for generalisation; on training data the best hyperparameters are whatever memorises it, which tells us nothing about unseen data.
Why is the learning rate ranked above every other hyperparameter?
It multiplies every gradient step, so it alone decides whether training converges, oscillates, or diverges — all other knobs only refine an already-reasonable run.
Why does log-scale sampling give equal probability to each decade?
Sampling the exponent uniformly makes the density , so the integrated probability over is the same for every .
Why does the linear scaling rule ( when ) only hold approximately?
Matching expected displacement over examples assumes gradients stay roughly constant; for very large , curvature makes one big step overshoot, which is why warmup is added.
Why does random search "automatically" allocate budget to the important dimension?
Every run draws a fresh random value on each axis, so no matter which axis matters, that axis is explored at as many distinct values as there are runs.
Why can't we just minimise validation loss with gradient descent like we do the weights?
Validation loss depends on , the result of a whole training run, and many hyperparameters (depth, layer count) are discrete — so no usable gradient w.r.t. exists.
Why does momentum () get searched linearly in rather than in ?
The meaningful quantity is the averaging window ; small changes near swing that window hugely, so spacing evenly in is the multiplicative-correct scale (see Adam and Momentum Optimizers).
Edge cases
What happens to training if is set to exactly ?
The update never moves; loss stays flat forever — the degenerate "too small" limit taken to its extreme.
What does the loss-vs- curve look like in its very first (leftmost) region, and why?
It is flat, because is so tiny that each step barely changes the weights — negligible but not divergent progress.
If weight decay factor becomes negative (huge ), what does it mean?
The decay term flips the sign of the weights each step, causing oscillation/divergence — a sign that or is set far too large.
You have almost no data. Should you use a large validation split or a large training split?
Prefer keeping enough training data to learn at all, and use cross-validation to reuse data as validation across folds instead of sacrificing a big fixed chunk.
Two hyperparameter configs give identical validation loss but very different test loss. Which do you report, and why?
You still report the test number from the config chosen on validation, and you do not re-pick using test loss — otherwise you overfit the test set and bias the result.
If dropout and on a huge network, what regime are you in?
Zero regularisation with high capacity — the classic overfitting corner where training loss goes near zero but validation loss climbs.