The Machine's Knobs — Parameters vs. Hyperparameters
The fine line between "learned by the machine" and "guessed by you".
When headlines announce that GPT-4 has "trillions of parameters," most people imagine a developer sitting at a console, manually adjusting trillions of knobs. The reality is the exact opposite: those parameters are values the machine figured out entirely on its own. The actual knobs the developer turns — the hyperparameters — number in the dozens at most.
Confusing these two categories is a common beginner mistake in machine learning. In this article, you'll learn what the difference is, why it matters, and how to systematically find the right settings.
Parameters — The Machine's Internal Wiring
Definition
Parameter
Analogy
Definition
The hi-fi analogy breaks at three points: an audio system has hundreds of components — Llama 3 70B has 70 billion parameters. Calibration takes seconds — LLM training takes weeks to months. A technician could theoretically open the system and adjust components manually — the parameter space of a neural network is so high-dimensional that any manual intervention is impossible.
Concrete Example: Spam Filter
A spam filter using logistic regression with 5 features (exclamation marks, links, capitalization ratio, sender reputation, word count). The model automatically learns 5 weights (one per feature) plus 1 bias = exactly 6 parameters. After training on 1,000 emails, the weight for exclamation marks might be 0.8 (strong spam signal), sender reputation -0.3 (negative: a good reputation lowers the spam suspicion), and the bias -0.5. These 6 numbers ARE the trained model.
Caution
Common Misconception
"The billions of parameters mentioned in the news are settings the developer chose." — Wrong. They are weights the model learned by itself. A developer of GPT-4 chose perhaps a few dozen hyperparameters. The parameters — trillions, by estimates — were found by the training algorithm over months of computation.
Hyperparameters — The Developer's Control Panel
Definition
Hyperparameter
Analogy
Definition
This analogy also breaks: a radio has about 5 knobs with immediately audible effects — an ML model has dozens of hyperparameters with complex, often counter-intuitive interactions. On a radio you hear the result instantly — after changing a hyperparameter you wait hours or days for the training run.
The learning rate determines the step size of the optimization. Too high: the model overshoots the optimum and loses all sense of direction. Too low: training takes forever and gets stuck in a good-but-not-best valley (a so-called local minimum). Epochs determine how many times the model processes all training data. Batch size determines how many data points are processed per update step.
| Run | Learning Rate | Epochs | Result |
|---|---|---|---|
| 1 | 0.1 | 10 | 85% — Solid baseline run |
| 2 | 0.001 | 10 | 72% — Learning rate too low, model barely learns |
| 3 | 0.1 | 100 | 92% — More passes find deeper patterns |
| 4 | 10.0 | 10 | 50% — Far too high, model lost all sense of direction (50% in spam-or-not means blind guessing) |
Caution
Common Misconception
"More epochs always produce a better model." Wrong — beyond a certain point, the model starts memorizing the training data instead of finding generalizable patterns. That's overfitting (topic of the next article). Equally wrong: "A higher learning rate means faster, better learning." Too-high values cause the model to overshoot the optimum — it loses all sense of direction.
Parameters vs. Hyperparameters — Inside vs. Outside
Learned by the model itself (weights, biases). Billions in large models. Automatically optimized via gradient descent. Cannot be set manually. Analogy: the internal circuitry of a hi-fi system.
Set by the developer before training (learning rate, epochs, batch size). Dozens, not billions. Must be found manually or by search. Analogy: the external knobs on a radio.
Finding the Right Settings
There is no formula that computes the perfect hyperparameters. ML engineers spend a large fraction of their working time systematically trying different combinations — hyperparameter tuning.
- 1. Define search spaceWhich hyperparameters should be tested? What value ranges make sense?
- 2. Choose strategyGrid Search (all combinations), Random Search (random samples), Bayesian optimization (learns from previous trials), or AutoML (automated)
- 3. Run experimentsTrain each candidate and evaluate on a validation dataset (held-out data the model does not see during training)
- 4. Compare resultsWeigh accuracy, training time, and resource usage against each other
- 5. Select best configurationDo a final training run with the best hyperparameters and deploy
Grid Search defines a fixed grid of values and tests every combination. Guaranteed to find the best option within the grid — but expensive.
Random Search draws random combinations from the search space. Bergstra and Bengio showed in 2012 that Random Search is often more efficient than Grid Search, especially when only a few hyperparameters actually matter. Bayesian optimization goes one step further: it looks at the previous trials and tries next wherever things look most promising. Widely used tools such as Optuna use this kind of method by default.
AutoML goes further: a secondary ML system searches for the best hyperparameters of the primary model. AI optimizing AI. Google presented its approach, called “AutoML”, in 2017 and began offering it as a cloud service for businesses in 2018.
A fitting analogy: a chef developing a new recipe. He doesn't know if the cake bakes better at 180°C or 200°C, or whether 30 or 45 minutes is the right baking time. Grid Search: systematically try all combinations. Random Search: test random temperature-time pairs. AutoML: hire an autonomous sous-chef.
Grid Search
18 exp. / 36 hrs
3 learning rates × 3 batch sizes × 2 epoch values = 18 combinations — Best result: 94.2%
Random Search
8 exp. / 16 hrs
8 random trials — Best result: 93.8% — nearly as good in less than half the time
Caution
Common Misconception
"Just test every possible combination to guarantee the best model." — In theory, yes. In practice, impossible. Even a modest setup with 5 values for each of 6 hyperparameters yields 5⁶ = 15,625 experiments. At 2 hours each, that's 3.6 years of compute time.
Interactive: Why Grid Search Explodes
Grid Search tests all combinations. With n values per hyperparameter, the number of experiments grows with every additional hyperparameter: 1 hyperparameter = n trials, 2 = n², 3 = n³. Move the slider and observe how quickly costs explode — and why Random Search with a fixed number of trials becomes attractive.
Summary
Note
Key Takeaways
- Parameters are learned by the model during training (weights, biases) — the developer never touches them. When someone says a model has "70 billion parameters," they mean learned weights.
- Hyperparameters are configured by the developer before training (learning rate, epochs, batch size). They control HOW the model learns, not WHAT it learns.
- Finding good hyperparameters is trial-and-error, not calculation. Grid Search tests all combinations; Random Search samples randomly and is often faster. AutoML automates the search entirely.
Check
Quiz: Parameters vs. Hyperparameters
A neural network has 1,000 weights and 50 biases. How many parameters does it have?
Select one answer
1. A neural network has 1,000 weights and 50 biases. How many parameters does it have?
2. A developer trains a spam filter with learning rate 0.1 and achieves 85% accuracy. She then retrains with learning rate 10.0 and achieves only 50%. What most likely happened?
3. A researcher has 4 hyperparameters, each with 5 candidate values. She uses Grid Search. How many experiments must she run?
4. Two teams train the same network architecture on the same dataset. Team A achieves 94% accuracy; Team B achieves 72%. Architecture and data are identical. What is the most likely explanation?
Checkpoint
Check
Learning Goals
Can you explain this in your own words? Tick what you've got.
0 of 3 done