Transfer learning & fine-tuning
Freezing layers, discriminative learning rates, when a pretrained backbone plus 1k labels beats training from scratch with 100k.
The mental model
Transfer learning is hiring an experienced professional instead of training a graduate from scratch. A model pretrained on millions of images or billions of words has already learned the general skills — edges, textures, shapes, grammar, world knowledge — the same way a senior engineer already knows how to program. Fine-tuning is the two-week onboarding: you teach the specifics of your problem on top of skills that took someone else a fortune in compute to build. You do not re-teach what an edge is; you teach what your defect looks like.
The analogy that makes the mechanics click: a deep network is a stack of increasingly specific skills. The early layers learn universal, task-agnostic features (edges and colors in vision; syntax and word relationships in language) that transfer to almost anything. The late layers learn task-specific features (this breed of dog, this legal clause). So the standard move is to keep the general early layers and re-teach the specific late layers — freeze the backbone, replace and train the head, and optionally unfreeze more of the network gently. This is why a pretrained backbone plus 1,000 labels routinely beats training from scratch with 100,000: the pretrained model is not starting from noise, it is starting from a representation that already encodes what images or text are.
The WHY that dominates interviews: transfer learning inverts the usual data-hunger of deep learning. Deep nets normally need enormous labeled data because they must learn everything from raw pixels; a pretrained model has already paid that cost, so your labeled data only needs to cover the *last mile* of specificity. The two failure modes you must be able to name are overfitting (too much capacity, too few labels — you unfroze everything and it memorized your 1,000 examples) and catastrophic forgetting (you fine-tuned too aggressively and destroyed the general features that made the model valuable). The whole craft is turning the learning up just enough to adapt and not so much that you either memorize or forget.
- Deep dive
- Internal architecture
- Real-world use cases
- Best practices
- Common mistakes
- Performance
- Security
- Production troubleshooting
- Advantages & disadvantages
- Alternatives
- Interview expectations
- Interview questions
- Facts to remember
- Cheat sheet
- Quick revision