Surgical Fine-Tuning Improves Adaptation to Distribution Shifts

Yoonho Lee, Annie S. Chen, Fahim Tajwar, Ananya Kumar, Huaxiu Yao +2 more
10/20/2022
cs.LGcs.AI

Official code: anniesch/surgical-finetuning (29 stars, Python, last commit 2023-06-27).

Abstract

A common approach to transfer learning under distribution shift is to fine-tune the last few layers of a pre-trained model, preserving learned features while also adapting to the new task. This paper shows that in such settings, selectively fine-tuning a subset of layers (which we term surgical fine-tuning) matches or outperforms commonly used fine-tuning approaches.

Show full abstract

Moreover, the type of distribution shift influences which subset is more effective to tune: for example, for image corruptions, fine-tuning only the first few layers works best. We validate our findings systematically across seven real-world data tasks spanning three types of distribution shifts. Theoretically, we prove that for two-layer neural networks in an idealized setting, first-layer tuning can outperform fine-tuning all layers. Intuitively, fine-tuning more parameters on a small target dataset can cause information learned during pre-training to be forgotten, and the relevant information depends on the type of shift.

View on arXivView PDF

Code Implementations(1)

Code for "Surgical Fine-Tuning Improves Adaptation to Distribution Shifts" published at ICLR 2023

295PythonJun 7, 20233 years ago

Similar Papers

Cite this paper

@article{lee2022surgical,
  title  = {Surgical Fine-Tuning Improves Adaptation to Distribution Shifts},
  author = {Yoonho Lee and Annie S. Chen and Fahim Tajwar and Ananya Kumar and Huaxiu Yao and Percy Liang and Chelsea Finn},
  year   = {2022},
  eprint = {2210.11466},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.11466}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2210.11466.svg)](https://codeofpaper.com/paper/2210.11466)

Discussion