Training Methods Intermediate

Hyperparameter

A setting a person picks before training begins

Key points
  • A hyperparameter is a value a person sets by hand before training ever begins.
  • The value that settles into place on its own through training is called a parameter instead. Training decides parameters; a person decides hyperparameters.
  • The size of one step, how many passes to run, how many examples per chunk, how many layers to stack — all of these fall into this category.
  • Whether you got it right only shows up once training finishes. So it's common to run several settings and compare.
  • Always score the choice on a separate validation set held back for exactly this. Score it against the final exam and the number can't be trusted.
Contents

1The analogy

Walk up to a washing machine at a coin laundromat and there's a round of decisions to make first: what water temperature, standard cycle or heavy duty, how many minutes to spin dry, how many scoops of detergent. Only once every dial is set does the start button get pressed.

Once it's running, the dials can't be touched. The door locks too. How clean the clothes came out, whether the fabric held up — none of that is knowable until the door opens. If the result isn't good, the only option is setting the dials differently and running it again. No amount of staring at the machine mid-cycle tells you whether this run will beat the last one. The values a person sets before training even starts are those dials.

2In detail

What gets decided before the start button

The most important dial is the size of one step — how far to move the values by, in proportion to how wrong they were. Too big and it overshoots the target and bounces; too small and progress crawls forever. On the washing machine, this is the water pressure.

How many passes to run gets decided in advance too. Too short and it undertrains; too long and it memorizes the data outright. How many examples to group into one chunk also has to be set. A bigger chunk stabilizes the calculation but eats more memory; a smaller one wobbles more, but escapes a shallow dip more easily.

The model's shape is a dial too — how many layers to stack, how many units per layer, what percentage to randomly switch off during training, how hard to press down to keep values from growing too large. None of these get produced by training itself. A person has to write them in before training can even start.

Where training's values and these live apart

Inside a model sits a separate class of numbers that training sets on its own. Those are called parameters. A person never has to touch them, and couldn't anyway — there are hundreds of millions of them or more.

Hyperparameters sit one level above that. If parameters are the clothes tumbling and rinsing inside the drum, hyperparameters are the dials that decide how that whole process happens. There are far fewer of them, usually around ten, and a person weighs each one deliberately. The names get confused often, but the split is clean once you ask who decides the value.

Finding a good combination

Getting it right in one try is hard, because the dials influence each other. Raise the water temperature and you can shorten the wash time; the same way, a bigger step size usually means fewer passes are needed.

So several runs get tried. The simplest approach sets a handful of candidate values for each dial and tries every combination without missing one. When the number of combinations gets too large, values get sampled at random instead — some dials barely affect the outcome anyway, which often makes this the more efficient choice. There's also an approach that narrows down the next combination to try based on how earlier attempts turned out.

The longer a single run takes, the more this needs a strategy: run short trials on a small slice of the data to get a rough feel first, then run the promising combinations in full.

What gets used to judge the winner

After several runs, the last hurdle is deciding what to judge them by. Judging by the score on training data doesn't work — the run that memorized the data always wins. So they get scored on a separate set of data held back specifically for this.

There's a trap here too. Pick a winner using the same held-back set dozens of times, and you end up with a combination that just fits that particular set especially well — effectively memorizing it by hand. So whatever data will play the role of the final exam gets kept completely untouched the entire time the dials are being chosen.

3More precisely

A hyperparameter is a value that governs how a training algorithm behaves, given from outside the training process and never updated during it. The learning rate, epoch count, chunk size, layer count and width, dropout rate, regularization strength, and choice of optimizer are the classic examples. Adjusting these is called hyperparameter tuning; trying every combination without missing one is called a grid search, and sampling combinations at random is called a random search.

The comparison breaks down in places too. A washing machine's dials stay put once the cycle starts, but some hyperparameters — the learning rate, for instance — get changed on purpose partway through, following a plan. Even then, the fact that a person decided "when and by how much to change it" ahead of time hasn't changed. And a washing machine only has half a dozen dials or so, while real training juggles dozens that are all tangled together — change one, and the good range for another shifts along with it. There's no door that opens mid-run either. Results only become visible once a full training run finishes, which is exactly why each attempt costs real time and money to find out.

4Try it yourself

5Common misconceptions

  • It's easy to think hyperparameters get figured out by training too, but actually they're set by a person from outside training, or found through a separate search run on purpose.

  • It's easy to think parameter and hyperparameter are basically the same word, but actually they're completely different — the split is entirely about whether training or a person decides the value.

  • It's easy to think sticking with the defaults is a loss, but actually widely used defaults have already been proven across plenty of situations, so it's usually better to start there and adjust just one or two.

7One-line summary

In shortA hyperparameter is a dial a person sets before pressing the start button, and the standard approach is running several combinations and picking the winner by its validation-set score.

Spotted an error or have a better analogy? Suggest an edit · Last updated2026-09-02