Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distribution

By Ananya Kumar, Aditi Raghunathan, Robbie Jones, Tengyu Ma, Percy Liang. 2022

972 citations recorded by the source corpus.

When transferring a pretrained model to a downstream task, two popular methods are full fine-tuning (updating all the model parameters) and linear probing (updating only the last linear layer—the “head”). It is well known that fine-tuning leads to better accuracy in-distribution (ID). However, in this paper, we find that fine-tuning can achieve worse accuracy than linear probing out-of-distribution (OOD) when the pretrained features are good and the distribution shift is large. On 10 distribution shift datasets (Breeds-Living17, Breeds-Entity30, DomainNet, CIFAR → STL, CIFAR10.1, FMoW, ImageNetV2, ImageNet-R, ImageNet-A, ImageNet-Sketch), fine-tuning obtains on average 2% higher accuracy ID but 7% lower accuracy OOD than linear probing. We show theoretically that this tradeoff between ID and OOD accuracy arises even in a simple setting: fine-tuning overparameterized two-layer linear networks. We prove that the OOD error of fine-tuning is high when we initialize with a fixed or random head—this is because while fine-tuning learns the head, the lower layers of the neural network change simultaneously and distort the pretrained features. Our analysis suggests that the easy two-step strategy of linear probing then full fine-tuning (LP-FT), sometimes used as a fine-tuning heuristic, combines the benefits of both fine-tuning and linear probing. Empirically, LP-FT outperforms both fine-tuning and linear probing on the above datasets (1% better ID, 10% better OOD than full fine-tuning).

Subfields: Artificial Intelligence, Biomedical Engineering, Computer Vision and Pattern Recognition, Representation & Self-Supervised Learning

How researchers see this paper

The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.

In Artificial Intelligence

  1. Percy Liang
  2. Mohit Bansal
  3. Quoc V. Le
  4. Luke S. Zettlemoyer
  5. Sergey Levine
  6. Jianfeng Gao
  7. Ruslan Salakhutdinov
  8. Tengyu Ma

In Biomedical Engineering

  1. Pieter Abbeel
  2. Jitendra Malik
  3. Ali Farhadi
  4. Ilya Sutskever
  5. Aravind Rajeswaran
  6. Dhruv Batra
  7. Dimitris N. Metaxas
  8. Tengyu Ma

In Computer Vision and Pattern Recognition

  1. Luc Van Gool
  2. Dacheng Tao
  3. Trevor Darrell
  4. Ming-Hsuan Yang
  5. Xiaogang Wang
  6. Jitendra Malik
  7. Bernt Schiele
  8. Andrea Vedaldi

In Representation & Self-Supervised Learning

  1. Tengyu Ma
  2. Sanjeev Arora
  3. Percy Liang
  4. Ali Farhadi
  5. Tat-seng Chua
  6. Pieter Abbeel
  7. Jitendra Malik
  8. Dhruv Batra

Citations in the corpus