DL0005 Transfer Learning

Why use transfer learning in deep learning instead of training from scratch?

Answer

Transfer learning reuses knowledge from a pre-trained model to improve performance, reduce training time and data requirements, and lower computational cost on a new but related task. Instead of learning low-level features from random weights, the model starts from representations that already capture generalizable patterns such as edges, textures, and shapes, so far less target data is needed to reach strong accuracy.

(1) Leverages Existing Knowledge & Reduced Data Requirements: Pre-trained weights encode useful representations learned from large datasets, so good performance is possible with significantly less task-specific data.
(2) Faster Convergence & Training Time: Starting from pre-trained weights is a much better initialization than random weights, leading to faster convergence and often better local optima.
(3) Improved Performance on Limited-Data Tasks: When data is scarce, transfer learning typically yields higher accuracy and better generalization than training from scratch.

Transfer learning pipeline showing a backbone pre-trained on a large source dataset being copied to a target task where the backbone is frozen or fine-tuned with a low learning rate and a new head is trained.

Figure 1: The backbone’s weights are copied from pre-training; only the new head (and optionally upper layers) must be learned from limited target data.

Mathematical Formulation:
\theta^* = \arg\min_{\theta}\ \mathcal{L}_{target}(\theta;\ \theta_{init} = \theta_{pretrained})
\eta_l = \eta_{base} \cdot \gamma^{\,L-l}

Where:

  • \theta_{pretrained} is the weight set learned on the source task; fine-tuning minimizes the target loss starting from this initialization.
  • \eta_l is the learning rate of layer l out of L; a decay factor \gamma below 1 gives earlier (more general) layers smaller updates than later (task-specific) layers.
Log-scale chart showing transfer learning achieving high validation accuracy with little target data while training from scratch needs much more data to catch up.

Figure 2: Transfer learning dominates in the low-data regime; the advantage shrinks as the target dataset grows.

Faster Convergence: Because pre-trained weights are already a strong initialization, the model reaches its accuracy plateau in far fewer epochs than training from random weights.

Accuracy versus epoch chart showing transfer learning converging quickly to a high plateau while training from scratch improves slowly over many more epochs.

Figure 3: Transfer learning converges faster and plateaus higher; training from scratch improves slowly over many epochs.


Login to view more content


Log in to track your progress

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *