Machine Learning Foundations · entry 02/05
How models learn
Training is three steps in a loop: measure how wrong the model is, work out which knob turns which way, nudge every knob slightly.
Loss: wrongness as a number
Training starts by defining a loss function — a single number scoring how badly the model just did. Predict a house price, miss by $40k: the loss encodes that miss. Predict the next word with 2% probability when it was the right answer: large loss. The loss is the only voice the data has; the model optimizes exactly what it says, not what you meant.
Gradients: which way is downhill
For every weight, ask: if this knob turned slightly up, would loss rise or fall? That direction-and-strength is the gradient, and backpropagation computes it for billions of weights at once — one efficient sweep backward through the network's arithmetic, splitting the blame for the error among every weight that contributed.
Descent: many tiny steps
for batch in data:
predictions = model(batch.inputs)
loss = measure_wrongness(predictions, batch.answers)
gradients = backpropagate(loss)
for w in weights:
w -= learning_rate * gradients[w] # nudge downhill
Each step is tiny — the learning rate — because the landscape is tangled and big steps overshoot. Training a frontier model is this loop run trillions of times on thousands of GPUs; the engineering is in keeping that loop fed, stable, and cheap, not in any exotic learning principle.
What "learning" turns out to be
Nothing is memorized in the human sense. The weights drift into a configuration where the training data — and, if generalization holds, data like it — produces low loss. Learning is the residue of error correction: the model is the shape the mistakes carved.
Failure mode
Reward hacking by proxy. The model optimizes the loss you wrote, not the goal you had — score "sounds helpful" and you train confident tone, not correctness. Every training story on this site, from RLHF to hallucination, is this failure wearing a different coat.