How to prepare your task head for finetuning

Yi Ren, Shangmin Guo, Wonho Bae, Danica J. Sutherland
2/11/2023
cs.LGcs.AI

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

In deep learning, transferring information from a pretrained network to a downstream task by finetuning has many benefits. The choice of task head plays an important role in fine-tuning, as the pretrained and downstream tasks are usually different. Although there exist many different designs for finetuning, a full understanding of when and why these algorithms work has been elusive. We analyze how the choice of task head controls feature adaptation and hence influences the downstream performance. By decomposing the learning dynamics of adaptation, we find that the key aspect is the training accuracy and loss at the beginning of finetuning, which determines the "energy" available for the feature's adaptation. We identify a significant trend in the effect of changes in this initial energy on the resulting features after fine-tuning. Specifically, as the energy increases, the Euclidean and cosine distances between the resulting and original features increase, while their dot products (and the resulting features' norm) first increase and then decrease. Inspired by this, we give several practical principles that lead to better downstream performance. We analytically prove this trend in an overparamterized linear setting and verify its applicability to different experimental settings.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{ren2023prepare,
  title  = {How to prepare your task head for finetuning},
  author = {Yi Ren and Shangmin Guo and Wonho Bae and Danica J. Sutherland},
  year   = {2023},
  eprint = {2302.05779},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2302.05779v1},
  journal = {ICLR 2023 2023}
}

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/2302.05779.svg)](https://codeofpaper.com/paper/2302.05779)

Discussion