Every model in this course has started from scratch — random or zero weights, learning everything from its own training data. What if a huge chunk of the problem was already solved by someone else's model, and only a small piece was actually specific to your task?
Two points, one shared slope. One approach starts from a pretrained slope and only has to learn where to shift it; the other has to rediscover the slope and the shift together, from nothing, using the exact same two points.
Transfer learning freezes parameters already learned on a large source task and fine-tunes only the remainder on a small target task:
- — the pretrained weight, kept fixed during fine-tuning.
- — the one remaining parameter, updated to fit the target task.
- From scratch means every parameter, coupled together
Training from scratch instead optimizes every parameter jointly, starting from nothing.
- Freezing simplifies the optimization problem itself
Freezing turns a coupled, multi-parameter optimization problem into a much simpler one — often, as here, a single parameter with an easy, well-behaved loss curve.
The learning rate that solves transfer's one-parameter problem exactly, in a single step, sends the joint two-parameter problem into an explosive spiral within 3 steps. The same underlying data, the same starting point conceptually — but coupling two unknowns together changes what "safe" even means.
Pretrained slope ; target task , observed at just two points, and :
- Freezing turns two unknowns into one
With fixed at , the loss in alone is exactly -shaped — the same quadratic form from the hyperparameter-tuning chapter, whose gradient with respect to is . Starting from : gradient , so one step at gives exactly. MSE (short for Mean Squared Error): .
- The same rate wrecks the joint problem
Training and together from at that same , using the joint gradient each step:
- Step 1:
- Step 2:
- Step 3:
Overshooting further each step, nowhere near the target .
- Even a safe rate is slow when there's more to learn
At a stable , from-scratch training reaches after 5 steps — MSE . After 20 steps, 4x the budget, it's only improved to — MSE , still far from the transfer model's exact .
Find the learning rate, among the three candidates, that makes from-scratch training explode after just 3 steps.
Freezing pretrained weights doesn't just save compute — it changes the shape of the optimization problem itself, often turning a fragile, coupled search into something closer to the single-parameter toy problems from early in this course. That's the real reason transfer learning works so well with so little target-task data: there's simply less left to learn, and what's left tends to be far better-behaved. The next chapter turns from classification and reconstruction to a task with its own coordinates entirely: not just naming what's in an image, but drawing a box around exactly where it is.