Source-linked AI summary
What is being transferred in transfer learning?
Behnam Neyshabur, Hanie Sedghi, Chiyuan Zhang
TL;DR
Transfer learning is widely used to adapt models to data-scarce target domains, but it remains unclear what knowledge transfers and which network parts are responsible. The paper uses block-shuffled images and analyses of model features, parameters, and loss landscapes to investigate these questions. It finds that both feature reuse and low-level data statistics contribute, while pre-trained models remain in shared basins and exhibit similar features and nearby parameters.
Problem
Transfer learning is widely used for data-scarce target domains, but the mechanisms enabling successful transfer and the responsible network components remain unclear.
Method
The paper studies diverse target domains using block-shuffled images and compares feature similarity, parameter distance, loss-landscape barriers, and module sensitivity.
Results
Both feature reuse and low-level data statistics contribute to successful transfer, while pre-trained models share features, remain in the same basin, and are close in parameter space.
Takeaways & Limitations
Transfer benefits reflect both reusable representations and preserved data statistics, with pre-training guiding models toward similar solutions and lower layers carrying more general features.
Abstract
from arXiv · showhide
One desired capability for machines is the ability to transfer their knowledge of one domain to another where data is (usually) scarce. Despite ample adaptation of transfer learning in various deep learning applications, we yet do not understand what enables a successful transfer and which part of the network is responsible for that. In this paper, we provide new tools and analyses to address these fundamental questions. Through a series of analyses on transferring to block-shuffled images, we separate the effect of feature reuse from learning low-level statistics of data and show that some benefit of transfer learning comes from the latter. We present that when training from pre-trained weights, the model stays in the same basin in the loss landscape and different instances of such model are similar in feature space and close in parameter space.
1 Introduction
The paper examines what enables successful transfer across diverse target domains, separating feature reuse from low-level data statistics. It finds that pre-trained models share features and loss-landscape basins, while lower and higher network modules play different roles.
- Transfer learning aims to adapt source-domain knowledge to data-scarce or rapidly trained target domains, but the mechanisms enabling success remain unclear.
- Block-shuffling experiments separate feature reuse from low-level data statistics and show that both contribute to successful transfer.Shuffling disrupts visual features while preserving some low-level statistics.
- Pre-trained models have similar target-domain mistakes and features, and are closer in parameter space than models trained from random initialization.Feature similarity is measured with centered kernel alignment, while parameter similarity uses ℓ2 distance.
- Models fine-tuned from pre-trained weights occupy the same loss-landscape basin without a performance barrier, unlike models trained from random initialization.The pre-trained weights appear to guide optimization into a flat basin.
- Lower-layer modules carry more general features, whereas higher-layer modules are more sensitive to parameter perturbations.
- Fine-tuning can begin from earlier pre-training checkpoints without losing target-domain accuracy once the pre-trained model has entered its final basin.
2 Problem Formulation and Setup
The study analyzes transfer learning by comparing pre-training, random initialization, fine-tuning, and target-domain training from scratch.
- The analysis compares four cases: the pre-trained network, random initialization, target fine-tuning after source pre-training, and target training from random initialization.
3 What is being transferred?
Transfer learning benefits arise from both reusable visual features and low-level data statistics, while pre-trained initialization also shapes model similarity and loss-landscape geometry. These effects vary with target-domain similarity and network depth.
- Decreasing block size reduces final performance for both initializations and narrows the relative accuracy gap on real and clipart domains.The shrinking gap is consistent with diminishing feature reuse as visual structure is disrupted.
- Quickdraw retains transfer benefits despite visually dissimilar inputs, implicating pre-trained information beyond reusable visual features.
- Feature reuse contributes strongly when downstream images share visual features with the pre-training domain.
- Low-level pixel statistics preserved by shuffling provide significant transfer benefits, especially for optimization speed.The preserved information is described as the histogram or distribution of pixel values, without visual or semantic structure.
- Two pre-trained models show highly similar features and smaller parameter distances than models trained from random initialization.CKA comparisons support feature similarity across layers, while ℓ2 comparisons show random-initialized models are farther apart.
- Pre-trained solutions generally share a flat loss-landscape basin with no performance barrier, whereas randomly initialized solutions exhibit barriers.The basin analysis uses convex-hull and linear-interpolation constraints, and the reported pattern spans DOMAINNET and CHEXPERT.
- Higher network layers have tighter valleys and become more critical, while pre-training checkpoint benefits differ between optimization speed and final performance.For real and clipart, final-performance gains continue after speedups plateau; quickdraw’s final-performance benefit plateaus earlier.
4 Related work
Prior work questions whether transfer learning reliably improves performance and how general pretrained features are, while also studying transfer across language and vision domains and loss-landscape connectivity.
- Transfer learning does not always improve performance, even between similar tasks, and pretrained features may be less general than previously thought.
- Transfer learning has supported breakthroughs in natural language processing through pretrained, task-agnostic Transformer representations applied to downstream tasks.
- Prior loss-landscape studies examine basin flatness and show that different solutions can be connected by nonlinear low-loss paths.
5 Conclusion and future work
The paper concludes that transfer involves feature reuse, low-level data statistics, basin structure, and layer-specific roles, while suggesting initialization and ensemble applications for future work.
- Block shuffling shows that low-level data statistics contribute to successful transfer alongside feature reuse.
- Pretrained initialization keeps networks in the same solution basin, with similar features and nearby parameters.
- Lower network layers are associated with more general features.
- The basin findings may improve ensemble methods, while low-level-statistics findings could inform network initialization methods.
- Future work proposes testing minimal pretrained information or randomized same-basin initialization for transfer performance and ensemble diversity.
Appendix A: Experiment Setup
The experiments use ImageNet-pretrained models and selected CHEXPERT and DOMAINNET transfer tasks, with specified architectures, data handling, and training setups.
- ImageNet pretraining is used, with CHEXPERT and three DOMAINNET domains serving as downstream transfer tasks.
- CHEXPERT contains chest X-rays for diagnosing five thoracic pathologies, while the experiments use DOMAINNET real, clipart, and quickdraw domains.
- CHEXPERT’s default split has 200k training images and only 200 manually labeled validation studies, motivating an alternative sampling strategy to reduce variance and distribution shift.
- All experiments use ResNet-50 with fixup initialization, removing batch normalization and randomly initializing the final classifier.
- CHEXPERT training uses two V100 GPUs, batch size 256, momentum SGD, weight decay 0.0001, and different epoch budgets for pretrained and random-initialization training.
- DOMAINNET training uses one V100 GPU, batch size 32, momentum SGD, weight decay 0.0001, piecewise learning-rate decay, and 100 epochs.
B.1 Discussions of learning curves
Pretrained-transfer and random-initialization models respond differently to learning rates, while pretrained transfer outperforms random initialization across all four datasets.
- Pretrained-transfer models generally prefer smaller learning rates, whereas random-initialization models generally benefit from larger learning rates.
- On CHEXPERT, large-learning-rate pretrained transfer fails to converge, while large-learning-rate random initialization converges faster despite similar optimal and final performance.
- On DOMAINNET real, clipart, and quickdraw, larger learning rates significantly improve random-initialization results, while smaller rates remain better for pretrained transfer.
- Pretrained transfer outperforms random initialization in optimization speed and test performance on all four datasets.
- Despite equal subsampling to 50,000 training examples, severe overfitting appears only on CHEXPERT, suggesting influences beyond problem size.
B.2 Common and uncommon mistakes
The analysis compares common and uncommon mistakes across models trained from pre-trained or random weights, using per-class accuracy and mistake-overlap measures. It also examines how accuracy relates to class size in clipart.
- Comparison setup: The study compares RI-T, P-T, two RI-T instances, and two P-T instances using common and uncommon mistakes.The analysis considers every pairwise combination of these model types.
- Reported analyses: The comparison is reported in Tables 3–6 for CHEXPERT and clipart.Tables 3–5 cover CHEXPERT, while Table 6 covers clipart.
- CHEXPERT analysis: For CHEXPERT’s five binary disease tasks, the analysis records per-model accuracy, one-sided correct classifications, common mistakes, and uncommon-to-total mistake ratios.g1 and g2 count samples only the first or second model classifies correctly; r1 and r2 are the corresponding mistake ratios.
- Class-size analysis: For clipart, P-T and RI-T accuracy both correlate positively with class size, with Pearson coefficients 0.36983 and 0.32880, respectively.The reported p-values are 1.26e −12 for P-T and 3.84e −10 for RI-T.
B.3 Feature similarity and different distances
Additional analyses examine feature similarity and distances between P-T and RI-T models across target domains. They report layerwise CKA similarity, parameter distances, class-size accuracy trends, and illustrative disagreement examples.
- Feature similarity: Layerwise CKA feature similarity for clipart shows a trend similar to CHEXPERT, with comparable observations also reported for quickdraw and real.The analysis uses outputs from different ResNet-50 layers.
- Supplementary figures: Figure 8 plots P-T and RI-T accuracy against class size for clipart, while Figure 9 displays examples of mistakes unique to either model.The mistake examples cover barn, apple, backpack, and angel classes.
- Parameter distance: P-T models are closer in ℓ2 parameter distance than RI-T models for CHEXPERT and clipart, with the same conclusion for real and quickdraw.Figure 10 shows module-level distances, while Table 2 reports overall network distance.
- Initialization distance: Distance to initialization is reported per module and for the overall network across P-T and RI-T models and target domains.The corresponding supplementary table is Table 8.
B.4 Additional plots for performance barriers
Supplementary barrier plots extend the comparison of P-T and RI-T solutions across DOMAINNET and CHEXPERT. They examine accuracy, loss, learning-rate settings, and distances to initialization.
- DOMAINNET barriers: Across all three DOMAINNET datasets, performance barriers appear between two RI-T solutions but not between two P-T solutions.The plots measure performance barriers using test accuracy, with corresponding loss barriers shown separately.
- CHEXPERT barriers: CHEXPERT performance and loss barrier plots compare RI-T trained with base learning rates 0.1 and 0.02.The plots use test AUC for performance and cross-entropy loss for the loss analysis.
- Training behavior: CHEXPERT models overfit after a certain number of epochs, so final performance can be worse than the optimal performance along training.The analysis therefore includes more interpolation pairs than the DOMAINNET analysis.
- Distance plots: Figures 10 and 11 provide module-level feature-distance and initialization-distance plots, respectively.The associated table reports distance to initialization for P-T and RI-T across target domains.
- Metric comparison: For CHEXPERT, final P-T performance is better than RI-T on test AUC, while P-T has higher test loss than RI-T.This result is reported alongside the supplementary barrier analyses.
B.5 Performance barrier experiments with identical initialization for RI-T
The paper tests whether RI-T models share a loss-landscape basin when they start from identical random weights, and extends interpolation experiments across domains. These analyses contrast RI-T with P-T solutions under interpolation and extrapolation.
- Identical initialization: The identical-initialization experiment trains two RI-T models from the same random weights and compares their interpolated performance and loss with P-T models.Earlier experiments used independently sampled random weights for RI-T, whereas P-T models shared pre-trained initialization.
- Basin boundary: Extrapolating interpolation coefficients from [0, 1] to [−1, 2] places P-T solutions near the basin boundary, while RI-T solutions remain separated by interpolation barriers.This conclusion concerns the one-dimensional interpolation subspace.
- Cross-domain interpolation: Because DOMAINNET domains share target classes, the study directly evaluates cross-domain models and interpolates weights between models trained on different domains.The experiments cover multiple training-domain and evaluation-domain scenarios.
- Cross-domain results: Cross-domain evaluation retains non-trivial test performance, P-T consistently outperforms RI-T, and interpolating P-T models can produce a performance boost in the middle.The authors interpret the middle boost as evidence that P-T models trained on different domains occupy one shared basin.
B.8 Cross-domain weight interpolation with training on combined domains
The section examines cross-domain interpolation, including models trained on combined domains, and extends the analysis to module criticality and weight-matrix spectra. It also relates spectral-norm comparisons to predicted generalization performance.
- Cross-domain interpolation: Combined-domain models are evaluated through interpolation with models trained on individual DOMAINNET domains, using accuracy and cross-entropy on real or clipart targets.The listed scenarios include real+clipart, real+quickdraw, and clipart+quickdraw training combinations.
- Module criticality: Figure 30 analyzes Conv1 criticality using training error, test error, and generalization error, with distance from initial to optimal parameters on one axis and Gaussian-noise variance on the other.Heat-map colors encode the value of each measure across four criticality paths.
- Spectrum of weight matrices: The spectral analysis recovers singular values for individual modules and whole networks, using 2D-FFT of convolution kernels followed by singular-value aggregation across blocks.The analysis includes CHEXPERT and clipart target-domain spectra.
- Spectrum of weight matrices: RI-T is more concentrated toward zero in both individual-module and whole-network spectra, indicating a higher density of smaller singular values.Figure 33 depicts the count of singular values below a threshold as the threshold varies.
- Generalization analysis: Comparing the product of spectral norms gives RI-T a bigger generalization bound, which predicts worse generalization performance than the comparison network.The comparison treats margin, input norm, input dimension, and depth as shared or fixed quantities.