Volume 1 / Part 3 Mechanics — What Happens Inside / Chapter 24
Learning Means Turning Dials to Reduce Mistakes
Last time, we said an AI is packed with trillions of dials called weights. So who turns those dials, and how do they land in the right position? This time we unpack three mechanisms — the loss function, gradient descent, and backpropagation — using the image of hiking down a mountain.
Trillions of Dials — Who Turns Them?
Last time we explained that an AI's insides are packed with countless numbers called weights, each one acting like a dial. In a large language model, you're talking billions to hundreds of billions of these dials. But dials just sitting there don't do anything on their own.
The real question is: which way, and how far, do you turn each one to get closer to the right answer? Having a human adjust each dial by hand is simply not realistic. That's exactly why AI training is designed as a system that automates this work using math and data.
This is where three tools come in: the loss function, gradient descent, and backpropagation. Only when all three work together can we say an AI is actually "learning." Let's start with how we measure the size of a mistake in the first place.
The Loss Function — Turning "How Wrong" Into a Number
A loss function is a formula that boils down the gap between an AI's prediction and the correct answer into a single number. The closer the prediction is to reality, the smaller the loss; the further off, the bigger the loss. Technical documentation from the machine learning platform Edge Impulse describes loss functions the same way: they quantify the error between prediction and ground truth, and the whole point of training is to minimize that loss.
Here's a concrete example. Imagine an AI predicting tomorrow's temperature. The actual temperature turns out to be 77°F, but the AI predicted 68°F. That 9-degree gap is the error, and the loss function converts this gap into a single score.
What matters here is that loss isn't a vague feeling — it's a number you can compare directly. If today's loss is smaller than yesterday's, the AI has gotten measurably better. Once we have this destination — "make the number smaller" — the next mechanism can kick in.
Try this thought experiment: if you were grading a test, what criteria would you use to score "how wrong" an answer is? Building a loss function is essentially designing that grading rubric, but for an AI.
A loss function is a scorecard that turns "how big is the mistake" into a single number. Smaller is better.
Gradient Descent — Moving Step by Step, Like Walking Downhill
Once we have loss as our marker, the next step is nudging the dials in the direction that shrinks it. That's the job of gradient descent, an optimization method that moves the weights little by little in whatever direction reduces the loss.
A common way to picture this is hiking down a mountain in thick fog. You can't see the valley floor, so you feel the slope under your feet, take a step in whichever direction feels downhill, check again, and repeat. That repeated process is gradient descent.
A machine learning course from apxml explains the gradient the same way: it tells you the "steepest downhill direction." AI training works identically — the model calculates the slope (the gradient) of the terrain defined by the loss function, then nudges the weights slightly in the direction that reduces loss. Repeat this thousands or millions of times, and the overall loss keeps dropping.
The key word here is "little by little." If you try to leap straight to the valley floor in one giant bound, you might overshoot and land on the opposite slope. So who decides how big that one step should be?
Learning Rate — The Setting That Decides Step Size
Gradient descent tells you which way is downhill, but how far you step is a separate question entirely. That's governed by the learning rate. Google's Machine Learning Crash Course explains that the learning rate is a value a human sets before training even begins — unlike weights, which the model adjusts on its own during training.
If the learning rate is too small, each step toward the valley is tiny, and training crawls along painfully slowly. If it's too large, you can overshoot the valley entirely and land on the opposite slope — sometimes the loss doesn't even shrink, it blows up instead. The apxml course notes that the learning rate affects not just how fast training converges, but whether it converges at all.
Picture it this way: stride too wide and you step clean over the valley; stride too narrow and you're still wandering the mountainside after dark. Finding just the right step size is a constant trial-and-error process for AI engineers.
If weights are "dials that get learned as a result," the learning rate is "an outside knob that decides how the learning itself happens." Keep that distinction in mind — it'll make the next topic, backpropagation, much easier to follow.
The learning rate is the step size a human decides in advance. Unlike weights, it isn't learned automatically.
Backpropagation — Calculating Trillions of Corrections at Once
We now know gradient descent moves things "downhill." But with trillions of dials, how do you figure out which direction and how far to turn each one? That's the efficient calculation trick called backpropagation.
Backpropagation takes the error calculated at the output and sends it backward toward the input, using a mathematical idea called the chain rule. This lets the system calculate, one by one, exactly how much every single weight along the way contributed to the final error. Think of a factory assembly line: when a defective product turns up, you trace backward from the last station to figure out exactly where things went wrong.
This method became widely known through a 1986 paper published in Nature by Rumelhart, Hinton, and Williams. Hinton himself acknowledged in a later interview, in 2018, that the core idea behind backpropagation had actually been worked out independently by several researchers before that paper. So it's more accurate to say the paper wasn't the first to invent the idea — it was the one that demonstrated the idea actually worked for training neural networks, and popularized it.
Thanks to backpropagation, nobody has to hand-calculate corrections for trillions of dials one at a time. A computer can run a single backward pass and work out the correction for every dial at once. But does repeating this process really guarantee we'll land on the "right" answer?
The Valley Isn't Always One Spot — Where Optimization Hits a Wall
At this point, it might sound like repeating gradient descent and backpropagation will always land you on the best possible answer. It's not that simple. When the loss function has a complicated, bumpy shape — what's technically called a non-convex shape — gradient descent can get stuck in a small dip along the way (a local optimum) instead of reaching the truly best answer (the global optimum).
A regression analysis tutorial posted on arXiv lays out the technical details of this behavior. It's like hiking downhill in fog, stumbling into a small dip, and mistaking it for the true valley floor. Which dip you end up in even depends on your starting point — that is, the random values the weights happened to begin with.
That said, this problem doesn't show up everywhere. For simple loss function shapes, like in linear regression, gradient descent is guaranteed to reach the true valley floor — the global optimum. The trouble tends to show up when the loss function is complicated, as it typically is in neural networks.
Because a perfect valley floor can't be guaranteed, AI development leans on tricks like tuning the learning rate or restarting from different starting points and trying again. "Optimization" is really just the umbrella term for all this patient, ongoing work of getting as close as possible to a good answer.
Gradient descent gets you close to a good answer — it doesn't guarantee the best one.
FAQ
Does gradient descent always find the best possible answer?
Not always. When the loss function has a complicated, bumpy shape, gradient descent can get stuck in a local optimum rather than reaching the global optimum. For simpler shapes, like linear regression, reaching the global optimum is guaranteed.
Does a higher learning rate make training faster?
Not necessarily. If the learning rate is too high, you can overshoot the valley floor and the loss can actually get worse, or even diverge. Too low, and training slows to a crawl. Finding the right value takes trial and error.
Who invented backpropagation?
It became widely known through a 1986 paper in Nature by Rumelhart, Hinton, and Williams. But Hinton himself later acknowledged that the underlying idea had been developed independently by several other researchers before that paper.
Now that we know how the dials get turned, next we'll look at how AI actually 'reads' text. It turns out AI isn't looking at words at all — it's looking at much smaller fragments.
Primary sources
- Learning representations by back-propagating errors (Nature) — The original backpropagation paper (primary source)
- Deep learning applied to computational mechanics (arXiv) — References Hinton's comments on the history of backpropagation's invention
- A Tutorial on Regression Analysis: From Linear Models to Deep Learning (arXiv) — Technical explanation of gradient descent getting stuck in local optima
- Linear regression: Hyperparameters (Google Machine Learning Crash Course) — Official explanation that the learning rate is a hyperparameter
- Learning Rate and Its Importance (apxml) — Explains the role of the learning rate using the downhill-hiking analogy
- Loss functions (Edge Impulse Documentation) — Definition of loss functions
- Predictive accuracy of recommender algorithms (arXiv) — Explanation of how backpropagation calculates gradients
This article organizes general knowledge based on our experience and public sources. Product specs, prices, and regulations reflect the time of writing (October 5, 2026) and may change.