Skip to content
AI.info

Advanced techniques

Transfer Learning and Feature Reuse

Understand what can transfer, why negative transfer occurs, and how to validate pretrained representations on a target task.

By the end you can

Pretraining changes the starting point, not the target evidence

Training from scratch asks the target dataset to teach two things at once: general structure and task-specific behavior. Transfer learning starts somewhere else. It brings in knowledge acquired elsewhere — visual edges and shapes, language regularities, acoustic patterns, user behavior, a representation of related tasks — and the target training process reuses or adapts it. The benefit is strongest when target labels are scarce and the source experience captures useful invariances.

A large source model is not automatically a good source model. If the source rewards shortcuts, ignores target-relevant detail, or represents a substantially different population, transfer can slow learning or cap performance. That is negative transfer, and it is not a loose figure of speech. Pan and Yang's 2010 survey of the field defines it: negative transfer happens “when the source domain data and task contribute to the reduced performance of learning in the target domain”. So treat transfer as a hypothesis. The claim being made is that the source representation reduces target sample complexity or improves target robustness. The target validation protocol is the judge of it.

Where the general part ends and the specific part begins can be measured. In 2014 Yosinski and three co-authors split ImageNet’s 1,000 classes into two halves of 500, roughly 645,000 examples each, and trained eight-layer networks on both. Features, they report, “must eventually transition from general to specific by the last layer of the network.” Transfer still paid off after fine-tuning. The average boost across layers one to seven was 1.6%, and 2.1% when at least five layers were kept.

A pretrained model is a prior shaped by source data; the target task must confirm that the prior is useful.

Example

Questions that reveal source–target relatedness

Relatedness is multidimensional. A source can match in one way and differ in another. Which dimension actually pays? Kornblith and colleagues put numbers on that question in 2019, running 16 classification networks across 12 image classification datasets. Fine-tuning beat random initialization on 189 of the 192 dataset/model combinations. On two fine-grained sets the margin nearly disappeared. Inception v4 at 299x299 scored 92.7% on Stanford Cars from scratch against 93.3% fine-tuned, and 88.8% on FGVC Aircraft from scratch against 89.0% fine-tuned.

The diagnosis is semantic, not one of scale. The ImageNet training set holds more car images than Stanford Cars does — 12,455 against 8,144 — but sorts them into only 10 high-level car classes. Stanford Cars uses 196 classes, by make, model and year. More source data about cars, carrying none of the distinctions the target labels need. Their conclusion: “ImageNet pretraining thus appears to have only marginal accuracy benefits for fine-grained classification tasks where labels are not well-represented in ImageNet.” Their headline result does not rescue those two cases. Measured across all the datasets, ImageNet accuracy correlates with transfer accuracy at r = 0.99 for fixed feature extractors and 0.96 for fine-tuning. Aggregate relatedness and the relatedness your labels need are different quantities.

  • Input similarity: Are the sensors, image styles, languages, or feature ranges comparable?
  • Semantic similarity: Do source distinctions preserve information needed by the target labels? ImageNet's 10 high-level car classes cannot express Stanford Cars' 196 make-model-year classes, and 12,455 source car images do not compensate for the missing distinction.
  • Population similarity: Are the people, environments, devices, or markets represented in both domains?
  • Objective similarity: Did source training reward behavior that supports the target decision?
  • Operational similarity: Will the target system face compression, latency, or missing-data patterns absent during pretraining?

Visual

What exactly is being transferred?

Transfer learning is broader than copying neural-network weights. Four different things can move, and the four boxes here are not a house categorisation. They are the four published cases, from Pan and Yang’s 2010 survey in IEEE Transactions on Knowledge and Data Engineering. The survey puts it this way: “Approaches to transfer learning in the above three different settings can be summarized into four cases based on “What to transfer”.”

Table 3 of that survey defines each case in a line. Instance-transfer: “To re-weight some labeled data in the source domain for use in the target domain”. Feature-representation-transfer: “Find a 'good' feature representation that reduces difference between the source and the target domains”. Parameter-transfer: “Discover shared parameters or priors between the source domain and target domain models”. Relational-knowledge-transfer: “Build mapping of relational knowledge between the source domain and the target domains”.

Naming the case is not pedantry. The object you transfer decides what can go wrong with it. Reweighted instances import the source population. A reused feature representation imports the source’s distinctions. Shared parameters import the source’s inductive bias. Transferred relational structure imports the source’s assumptions about how entities relate.

FigureHierarchy · 4 levels
  • Representations

    Reuse features or embeddings learned from a source dataset.

    • Parameters

      Initialize some or all target parameters from a source model.

      • Instances or weights

        Reweight or select source examples that resemble the target domain.

        • Relations or structure

          Transfer graphs, constraints, label relationships, or task geometry.

The transfer object determines both the opportunity and the failure mode.

Comparison

Three target-task starting points

A credible transfer study compares more than one adaptation depth, and the frozen middle option is the one with the strongest published pedigree. Razavian and three co-authors established it in 2014. They took the OverFeat network trained for object classification on ILSVRC13 and froze it. Out of a single layer came a 4096-dimensional representation, with a linear SVM on top — L2 distance in the retrieval case. The datasets were picked to “gradually move further away from the original task and data the OverFeat network was trained to solve”. They run from object image classification through scene recognition, fine-grained recognition and attribute detection to image retrieval. That frozen pipeline beat highly tuned state-of-the-art systems on every visual classification task tested. Their closing sentence: “The results strongly suggest that features obtained from deep learning with convolutional nets should be the primary candidate in most visual recognition tasks.”

So the frozen encoder is not a formality on the way to the real experiment. It is the baseline a fine-tuning result has to beat before the extra parameters, the extra compute and the extra forgetting risk are justified. And the scratch model is the baseline that says whether the source was needed at all.

FigureComparison · 3 columns

Train from scratch

Learn all parameters only from target data.

  • Provides a clean lower-complexity baseline
  • May need many labels and careful initialization
  • Avoids inherited source bias
  • Useful when domains are unrelated

Frozen encoder

Keep the source representation fixed and train a small target head.

  • Fast and data efficient
  • Tests representation usefulness directly
  • Cannot reshape weak source features
  • Strong first transfer baseline

Fine-tuned model

Update some or all pretrained parameters on target data.

  • Can adapt the representation
  • Needs careful learning rates and regularization
  • Can forget useful source structure
  • Best judged with target-domain slices

Key idea

Negative transfer is not always dramatic

Negative transfer can appear as lower final accuracy, but it can also be subtler: slower adaptation, poor calibration, degraded minority-slice performance, or excessive dependence on source-specific features. A pretrained model may look better at small sample sizes and worse after the scratch model has enough data.

The definition has a comparison built into it. Wang and three co-authors formalised negative transfer in 2019, evaluating six state-of-the-art deep transfer methods on four benchmark datasets. The comparison has to be like for like: “Therefore, to study negative transfer, one should focus on a specific algorithm at a time and compare its performance with and without the source-domain data.” Not against the best target-only algorithm you can imagine. Against your own algorithm with the source data removed. Two further findings tell you where to look: “Negative transfer largely depends on the size of the labeled target data”, and “the distribution shift is the actual root to negative transfer” — the divergence between the source and target joint distributions, rather than any property of the architecture.

The low-data end of the curve has a published number on it. ULMFiT, from Howard and Ruder in 2018, beat the state of the art on six text classification tasks and cut error by 18–24% on the majority of datasets. Its abstract states: “Furthermore, with only 100 labeled examples, it matches the performance of training from scratch on 100 times more data.” A hundredfold label advantage at the left of the curve says nothing about the right of it.

So run learning curves across target-data sizes. Compare frozen, partial, full, and scratch baselines. If transfer helps only one aggregate metric while harming target-critical slices, the source knowledge is not unconditionally useful.

Transfer value is conditional on the target dataset size, slice, and adaptation strategy.

Case

Retinopathy grading barely noticed ImageNet pretraining

Pretrained or randomly initialized, on this task, made almost no difference. Raghu and colleagues compared the two on medical images in 2019. Grading diabetic retinopathy, a ResNet-50 with 23.6 million parameters scored 96.7% AUC after ImageNet pretraining and 96.4% from random initialization. A small convolutional model with 2.1 million parameters reached 95.8% and 95.7%. Eleven times the parameters and a pretrained start, together worth about one point. Their conclusion: “transfer offers little benefit to performance, and simple, lightweight models can perform comparably to ImageNet architectures.”

Figure

On one medical task, eleven times the parameters and a pretrained initialization together move the score by about one point — drawn on a zero-based axis so the near-equality is visible.

Analogy

The experienced musician learning a related instrument

Reading music, timing, and keyboard coordination carry over the moment a pianist sits down at an organ, while pedal technique and sustained tone require adaptation. A guitarist brings musical knowledge but less direct motor reuse. An athlete may bring discipline yet transfer little instrument-specific technique.

Nothing in the model separates the habits worth preserving from the ones worth discarding. The adaptation protocol must create that separation and test it.

Taking the pretraining away entirely is a test somebody has run. Kaiming He and two co-authors did it on real detectors. Detection models trained from random initialization on COCO came out “no worse than their ImageNet pre-training counterparts,” provided training ran long enough to converge. That held with only 10% of the training data. Their from-scratch detector reached 50.9 AP without any external data. Pretraining sped up early convergence. It did not necessarily improve final accuracy.

Good transfer preserves general structure while allowing target-specific habits to change.

Steps

A transfer-learning study that can support a decision

The experiment should reveal where the gain comes from and when it disappears. That design has been run at full scale, and the steps below are worth reading against what it actually did.

In 2018 Zamir and five co-authors took 26 2D, 2.5D, 3D and semantic tasks and trained every one of them on the same pixels. The pixels came from a purpose-built dataset: 4 million images of indoor scenes from about 600 buildings, annotated for every task. A difference between two tasks could not be a difference between two datasets. That is step 1 taken seriously.

Step 5 is in their protocol as well. The transfer networks were deliberately trained on 1,000 to 16,000 images “in order to model the transfer patterns under different data regimes”, which is a data-size curve rather than a single number. Measuring relatedness instead of assuming it paid for itself. Their abstract: “the total number of labeled datapoints needed for solving a set of 10 tasks can be reduced by roughly 2/3”, at nearly unchanged performance. The map, not the intuition, bought the labels back.

FigureProcess · 6 steps
  1. 1. Define the target protocol

    Use target-domain splits, slices, and metrics that match deployment.

  2. 2. Train a scratch baseline

    Measure the cost and ceiling of learning only from target data.

  3. 3. Probe frozen features

    Test whether the representation is useful before adaptation.

  4. 4. Increase adaptation gradually

    Unfreeze blocks or use discriminative learning rates.

  5. 5. Plot data-size curves

    Compare methods at several target label budgets.

  6. 6. Audit inherited bias

    Inspect target groups and features that differ from the source domain.

Comparison

Freeze, probe, or adapt?

The right amount of adaptation depends on target evidence, representation mismatch, and operational cost. The middle column now has a price tag rather than an adjective. In 2019 Houlsby and seven co-authors transferred BERT to 26 diverse text classification tasks using adapter modules, with the pretrained network’s own parameters left frozen. Their abstract reports: “On GLUE, we attain within 0.4% of the performance of full fine-tuning, adding only 3.6% parameters per task. By contrast, fine-tuning trains 100% of the parameters per task.”

Read the columns with those two figures in hand. Full adaptation buys the last 0.4% on that benchmark at 100% of the parameters per task. Partial adaptation gives most of the quality back for 3.6%. Whether the remaining fraction of a point is worth a separate copy of the model for every task is a target-domain and governance question. It is answerable only after the frozen probe and the partial-adaptation run have both been measured.

FigureComparison · 3 columns

Frozen representation

Use pretrained features with a new lightweight head.

  • Fastest and easiest to compare
  • Useful when target data is scarce
  • Can expose representation mismatch clearly
  • Fails when important target distinctions are absent

Partial adaptation

Unfreeze selected blocks or use small adaptation modules.

  • Adds task-specific capacity gradually
  • Supports layer-wise learning rates
  • Requires careful forgetting checks
  • Good default after a frozen probe plateaus

Full adaptation

Update the complete network on target data.

  • Offers the largest parameter freedom
  • Consumes the most memory and governance effort
  • Can overwrite broadly useful behavior
  • Needs strong target-domain validation

Key takeaways