Table of Contents
Fetching ...

Rethinking Weight Decay for Robust Fine-Tuning of Foundation Models

Junjiao Tian, Chengyue Huang, Zsolt Kira

TL;DR

This paper proposes a new weight decay technique, Selective Projection Decay (SPD), that selectively imposes a strong penalty on certain layers while allowing others to change freely.

Abstract

Modern optimizers such as AdamW, equipped with momentum and adaptive learning rate, are designed to escape local minima and explore the vast parameter space. This exploration is beneficial for finding good loss basins when training from scratch. It is not necessarily ideal when resuming from a powerful foundation model because it can lead to large deviations from the pre-trained initialization and, consequently, worse robustness and generalization. At the same time, strong regularization on all parameters can lead to under-fitting. We hypothesize that selectively regularizing the parameter space is the key to fitting and retraining the pre-trained knowledge. This paper proposes a new weight decay technique, Selective Projection Decay (SPD), that selectively imposes a strong penalty on certain layers while allowing others to change freely. Intuitively, SPD expands and contracts the parameter search space for layers with consistent and inconsistent loss reduction, respectively. Experimentally, when equipped with SPD, Adam consistently provides better in-distribution generalization and out-of-distribution robustness performance on multiple popular vision and language benchmarks. Code available at~\url{https://github.com/GT-RIPL/Selective-Projection-Decay.git}

Rethinking Weight Decay for Robust Fine-Tuning of Foundation Models

TL;DR

This paper proposes a new weight decay technique, Selective Projection Decay (SPD), that selectively imposes a strong penalty on certain layers while allowing others to change freely.

Abstract

Modern optimizers such as AdamW, equipped with momentum and adaptive learning rate, are designed to escape local minima and explore the vast parameter space. This exploration is beneficial for finding good loss basins when training from scratch. It is not necessarily ideal when resuming from a powerful foundation model because it can lead to large deviations from the pre-trained initialization and, consequently, worse robustness and generalization. At the same time, strong regularization on all parameters can lead to under-fitting. We hypothesize that selectively regularizing the parameter space is the key to fitting and retraining the pre-trained knowledge. This paper proposes a new weight decay technique, Selective Projection Decay (SPD), that selectively imposes a strong penalty on certain layers while allowing others to change freely. Intuitively, SPD expands and contracts the parameter search space for layers with consistent and inconsistent loss reduction, respectively. Experimentally, when equipped with SPD, Adam consistently provides better in-distribution generalization and out-of-distribution robustness performance on multiple popular vision and language benchmarks. Code available at~\url{https://github.com/GT-RIPL/Selective-Projection-Decay.git}

Paper Structure

This paper contains 22 sections, 1 theorem, 14 equations, 1 figure, 6 tables, 4 algorithms.

Key Result

Lemma 1

$\underbrace{\mathbb{E}[f(\theta_{k+1})] - f(\theta_k)}_\text{Expected Performance Gain} \leq \underbrace{- \eta_k(1-\frac{\eta_kL}{2})}_{\leq0}\|\Bar{g}_k\|^2 + \underbrace{\frac{\eta_k^2L}{2}}_{\geq0}Var(g_k)$,

Figures (1)

  • Figure 1: Selective Projection Decay (SPD) imposes regularization on layers selectively during fine-tuning. It regularizes $\|W_t-W_0\|_2$ for full fine-tuning and $\|\Delta W_t\|_2$ for PEFT fine-tuning.

Theorems & Definitions (1)

  • Lemma 1