3.4.11 · D5Convolutional Neural Networks
Question bank — Transfer learning and fine-tuning
This bank sharpens the ideas built in Transfer learning and fine-tuning. Prerequisites worth having fresh: 3.4.1-Introduction-to-CNs, 3.2.3-Gradient-descent-and-backpropagation, 3.2.5-Regularization-techniques, 3.4.7-Batch-normalization.
True or false — justify
True or false: Freezing the base always gives worse accuracy than fine-tuning it.
False — with a tiny target set the frozen base acts as strong regularization, so unfreezing can overfit and score lower; fine-tuning only wins when you have enough data to update those weights safely.
True or false: Transfer learning only helps when the source and target classes overlap.
False — the early layers learn generic edges and textures that appear in nearly every visual task, so even unrelated targets (satellite, medical) benefit from the low-level features.
True or false: A frozen feature extractor followed by a single linear layer gives a convex optimization problem.
True — with the base fixed, the feature vector is a constant list of numbers, so training is exactly a linear classifier, whose cross-entropy loss is a single convex bowl in with no false local minima.
True or false: Using a smaller learning rate for fine-tuning slows learning but changes nothing about the final solution.
False — the small rate keeps updates inside the basin of the pretrained minimum, so it changes which solution you converge to, preventing catastrophic forgetting.
True or false: If you freeze the whole base, batch-norm layers inside it behave exactly like during pretraining.
Careful — freezing weights is not enough; you must also stop BN from updating its running mean/variance, or it will drift to your small dataset's statistics and corrupt the frozen features (see 3.4.7-Batch-normalization).
True or false: Transfer learning removes the need for data augmentation on the target set.
False — a small target set still overfits the trainable head; augmentation (see 4.1.3-Data-augmentation) remains one of the cheapest ways to lower variance.
True or false: More trainable parameters always mean a more powerful, better model.
False — sample complexity scales as , so with little data, more trainable parameters raise variance and hurt generalization.
Spot the error
"I loaded a pretrained base, immediately unfroze all layers, and trained end-to-end from epoch 1." — what's wrong?
The head is random, so its large early gradients flow back and destroy the pretrained features before they can help; you should first warm up the head with the base frozen.
"I set base.trainable = False but forgot to recompile the model, then complained the base still updated." — what's wrong?
In most frameworks the
trainable flag only takes effect after recompiling; without it the optimizer still holds the old (trainable) variable list."I used the same learning rate () for the pretrained base and the new head." — what's wrong?
A rate good for a random head is far too large for near-optimal pretrained weights — it overshoots the good minimum; use differential rates (small for base, large for head).
"To adapt faster I unfroze the earliest conv layers and kept the last block frozen." — what's wrong?
Backwards: early layers hold the most transferable generic features and should change least; the late task-specific layers are the ones worth unfreezing.
"My GAP (global average pooling) layer feeds a Dense, so I flatten the map into features first." — what's wrong?
Flattening defeats the purpose of GAP; global average pooling already collapses each channel to one number, giving features with no huge spatial FC layer.
"Fine-tuning made validation loss rise while training loss fell, so I lowered the learning rate further." — is the diagnosis right?
The symptom is overfitting, and a smaller rate barely helps; better fixes are more regularization (3.2.5-Regularization-techniques), augmentation, or refreezing more layers.
"I fine-tuned with a huge learning rate and got great training accuracy but terrible test accuracy — must be a bad architecture." — what's the real cause?
Catastrophic forgetting: the large step drove weights far from the pretrained basin, wrecking the general features, not an architecture flaw.
Why questions
Why do we freeze the base first rather than fine-tuning everything at once?
So the randomly-initialized head reaches a sensible state before its gradients are allowed to reach and corrupt the fragile pretrained features.
Why do earlier layers get the smallest learning rate in differential fine-tuning?
They encode the most general, most reusable features (edges, colors), so they need the least task-specific adjustment and are the costliest to damage.
Why does freezing most parameters act as regularization?
It shrinks the effective hypothesis space — fewer free parameters means fewer configurations that can memorize noise, lowering variance just like an explicit penalty.
Why is a small target dataset "severely underconstrained" without transfer learning?
Many parameter settings fit the few training points equally well, so the optimizer has no signal to pick the one that generalizes — high variance.
Why does starting from pretrained weights reduce sample complexity even if we unfreeze everything?
You begin near a good minimum, so far fewer gradient steps (and thus fewer labeled examples) are needed to reach a good solution than starting from random init.
Why can residual connections make deep pretrained models easier to fine-tune?
The skip paths (3.4.8-Residual-connections) keep gradients flowing cleanly to unfrozen deep blocks, so those layers actually receive a useful signal instead of a vanished one.
Edge cases
Your target task is identical to the source task but on a new camera's images — feature-extract or full fine-tune?
Feature extraction (or light fine-tuning) — the tasks match, so the pretrained head is nearly correct; heavy unfreezing risks overfitting the small new-domain set.
Your target task is medical CT scans, wildly unlike natural images, and you have 500k labeled scans — which strategy?
Full fine-tuning with differential rates — big data supports updating everything, and the large domain gap means even mid/late features must be relearned.
You have only 200 total target images across 50 classes — should you unfreeze any base layers?
No — with ~4 images per class, unfreezing invites severe overfitting; keep the base frozen and train only a small regularized head.
What happens in the limit where the target dataset grows toward the source dataset's size?
The advantage of transfer shrinks: with abundant data even random init can find a good minimum, so transfer mainly saves training time rather than final accuracy.
What happens if the source domain and target domain share zero useful structure (e.g. audio spectrograms vs. random noise labels)?
Transfer gives no benefit and can even hurt — the pretrained init sits in an irrelevant basin, so you're better off training the small parts from scratch.
Degenerate case: you set the fine-tuning learning rate to exactly for the base — what have you actually built?
Plain feature extraction — a zero step size means the base never updates, identical to freezing it.