Hyperparameter Tuning

Hyperparameter tuning searches over choices that are not directly learned by gradient descent but strongly affect training and generalization. Examples include learning rate, weight decay, batch size, model width, dropout rate, augmentation strength, and scheduler settings.

A tuning problem can be written as:

where is the search space and is validation risk. The final claim should not use validation risk as the test estimate.

Search Methods

  • Manual tuning: small, interpretable changes guided by diagnostics.
  • Grid search: exhaustive combinations over a small discrete space.
  • Random search: sampled configurations, often stronger than naive grids.
  • Bayesian optimization: model-based search over promising regions.
  • Successive halving or bandit search: early resource allocation based on partial runs.
  • Population-based training: jointly changes weights and hyperparameters during training.

Each method changes the selection budget and must be recorded when it affects the final model.

Common Hyperparameters

AreaExamplesMain risk
Optimizationlearning rate, warmup, schedule, optimizerunstable or slow training
Regularizationweight decay, dropout, label smoothingoverfit or underfit
Databatch size, sampling, augmentationbiased gradient or distribution mismatch
Architecturedepth, width, heads, hidden sizecapacity and compute tradeoff
Selectionearly-stopping patience, checkpoint rulevalidation overuse
Inferencethreshold, temperature, decodingmetric mismatch or calibration drift

Budget and Overfitting

If many trials are evaluated on the same validation set, tuning can overfit validation:

The selected can exploit noise . A larger search space should therefore be paired with a stronger final test boundary or nested validation design.

Checks

  • Is the search space documented before interpreting results?
  • Are random seeds, failed trials, and early-stopped trials included in the selection story?
  • Are preprocessing parameters fit only inside the train split for each trial?
  • Does the tuning metric match the final deployment metric?
  • Is the final test set untouched until the selected configuration is fixed?
  • Is compute budget comparable when comparing methods?