skip to content
Victor Guerra

Notes / Learning Paradigms & Workflow

Hyperparameters & Tuning

Updated Sep 10, 20261 min read
Table of Contents

Parameters are learned from data (weights/biases, updated by the optimizer). Hyperparameters are set before training and control how learning happens (tuned manually or by search). Parameters = what the model learns; hyperparameters = what you choose to help it learn.

Key hyperparameters

HyperparameterRole
Learning ratestep size (too high → diverge; too low → slow/stuck)
Batch sizegradient stability vs memory
Epochswhen to stop
Dropout rateregularization strength
Optimizerupdate behavior (Adam vs SGD)
Architecturedepth, width, kernel sizes

They control model complexity and the bias-variance tradeoff (regularization, depth/width, dropout — overfitting-underfitting). Bad choices waste compute (exploding/vanishing gradients, hours with no improvement); good ones give faster convergence, better accuracy, stable training, better generalization.

Tuning methods

MethodIdeaTrade-off
Grid searchtry every combo from a predefined setthorough on small spaces; exponential, not scalable
Random searchsample configs randomlymore efficient than grid; may miss optima, doesn’t learn
Bayesian optimizationprobabilistic model of the objective picks promising configs nextefficient for expensive models, learns from past; complex, slower per trial
Successive halving / Hyperbandtrain many configs briefly, keep the best, give them more budgetgreat under limited compute (early stopping); needs well-defined resource limits
Evolutionarypopulation of configs, mutate/combine top performersgood for dynamic/online tuning; expensive

Random search beats grid because good configs usually depend on a few important hyperparameters, and random sampling covers those dimensions better per trial.


Related: learning-rate, lr-schedulers, overfitting-underfitting, regularization, deep-learning-theory