Transfer Learning
Transfer learning means taking knowledge learned on one task and carrying it over to another related task. The core insight is that low-level features a model learns from large amounts of data (edges, textures, semantic structure) are general and can be reused directly, instead of training from scratch every time.
Why It Is Needed
Training a high-quality deep learning model usually requires millions of labeled examples and expensive compute. In real settings, however, a company often has only a few thousand or even a few hundred labeled samples, such as defect photos from one particular factory or rare-disease scans from one hospital. Training from scratch would inevitably overfit. Transfer learning makes these cases feasible.
Three Main Approaches
Feature extraction: freeze every layer of the pretrained model and retrain only the final classification head. This suits new tasks with very little data (hundreds to thousands of samples) that are similar to the original task. Training cost is minimal.
Fine-tuning: unfreeze some or all layers and keep training with a small learning rate (typically 1/10 to 1/100 of the pretraining rate). This suits medium-sized datasets that differ from the original task. It is the most common approach today.
Domain adaptation: when the source and target distributions differ greatly (for example synthetic data versus real data), adversarial training or distribution-alignment losses are used to align the feature space.
Key Points
The learning rate decides whether fine-tuning succeeds: too large destroys the pretrained weights, too small learns nothing about the new task. A common practice is layered learning rates, with small rates or freezing at the bottom (general features) and larger rates at the top (task-specific features).
Another technique is discriminative fine-tuning: a different learning rate per layer, increasing toward the output. The ULMFiT paper showed this works markedly better on text tasks.
Common Misconceptions
Many people assume fine-tuning must use a large learning rate to converge quickly, then find the pretrained weights washed away and results worse than frozen features. The right approach is a small learning rate, few epochs, and early stopping.
Applications
Medical imaging diagnosis (fine-tuning ImageNet-pretrained models), legal document classification, industrial defect detection, and low-resource speech recognition. In the large-model era, LoRA is essentially a lightweight form of transfer learning on hundred-billion-parameter models.