Table of Contents
Fetching ...

PACE: Marrying generalization in PArameter-efficient fine-tuning with Consistency rEgularization

Yao Ni, Shan Zhang, Piotr Koniusz

TL;DR

PACE addresses generalization in Parameter-Efficient Fine-Tuning by combining gradient regularization with consistency regularization to avoid gradient explosion and forgetting. It perturb adapter outputs with multiplicative noise and enforce output consistency while implicitly aligning the fine-tuned and pre-trained models, supported by theory linking gradient norms and data size to generalization. Empirically, PACE improves across VTAB-1K, FGVC, domain adaptation, GLUE, and GSM-8K, and offers efficient variants (PACE_fast, PACE_lazy_half) with reduced compute. The work provides a theoretical and practical framework for robust, resource-efficient PEFT applicable across vision and language tasks.

Abstract

Parameter-Efficient Fine-Tuning (PEFT) effectively adapts pre-trained transformers to downstream tasks. However, the optimization of tasks performance often comes at the cost of generalizability in fine-tuned models. To address this issue, we theoretically connect smaller weight gradient norms during training and larger datasets to the improvements in model generalization. Motivated by this connection, we propose reducing gradient norms for enhanced generalization and aligning fine-tuned model with the pre-trained counterpart to retain knowledge from large-scale pre-training data. Yet, naive alignment does not guarantee gradient reduction and can potentially cause gradient explosion, complicating efforts to manage gradients. To address such an issue, we propose PACE, marrying generalization of PArameter-efficient fine-tuning with Consistency rEgularization. We perturb features learned from the adapter with the multiplicative noise and ensure the fine-tuned model remains consistent for same sample under different perturbations. Theoretical analysis shows that PACE not only implicitly regularizes gradients for enhanced generalization, but also implicitly aligns the fine-tuned and pre-trained models to retain knowledge. Experimental evidence supports our theories. PACE surpasses existing PEFT methods in visual adaptation tasks (VTAB-1k, FGVC, few-shot learning, domain adaptation) showcasing its potential for resource-efficient fine-tuning. It also improves LoRA in text classification (GLUE) and mathematical reasoning (GSM-8K). The code is available at https://github.com/MaxwellYaoNi/PACE

PACE: Marrying generalization in PArameter-efficient fine-tuning with Consistency rEgularization

TL;DR

PACE addresses generalization in Parameter-Efficient Fine-Tuning by combining gradient regularization with consistency regularization to avoid gradient explosion and forgetting. It perturb adapter outputs with multiplicative noise and enforce output consistency while implicitly aligning the fine-tuned and pre-trained models, supported by theory linking gradient norms and data size to generalization. Empirically, PACE improves across VTAB-1K, FGVC, domain adaptation, GLUE, and GSM-8K, and offers efficient variants (PACE_fast, PACE_lazy_half) with reduced compute. The work provides a theoretical and practical framework for robust, resource-efficient PEFT applicable across vision and language tasks.

Abstract

Parameter-Efficient Fine-Tuning (PEFT) effectively adapts pre-trained transformers to downstream tasks. However, the optimization of tasks performance often comes at the cost of generalizability in fine-tuned models. To address this issue, we theoretically connect smaller weight gradient norms during training and larger datasets to the improvements in model generalization. Motivated by this connection, we propose reducing gradient norms for enhanced generalization and aligning fine-tuned model with the pre-trained counterpart to retain knowledge from large-scale pre-training data. Yet, naive alignment does not guarantee gradient reduction and can potentially cause gradient explosion, complicating efforts to manage gradients. To address such an issue, we propose PACE, marrying generalization of PArameter-efficient fine-tuning with Consistency rEgularization. We perturb features learned from the adapter with the multiplicative noise and ensure the fine-tuned model remains consistent for same sample under different perturbations. Theoretical analysis shows that PACE not only implicitly regularizes gradients for enhanced generalization, but also implicitly aligns the fine-tuned and pre-trained models to retain knowledge. Experimental evidence supports our theories. PACE surpasses existing PEFT methods in visual adaptation tasks (VTAB-1k, FGVC, few-shot learning, domain adaptation) showcasing its potential for resource-efficient fine-tuning. It also improves LoRA in text classification (GLUE) and mathematical reasoning (GSM-8K). The code is available at https://github.com/MaxwellYaoNi/PACE
Paper Structure (31 sections, 5 theorems, 36 equations, 10 figures, 19 tables)

This paper contains 31 sections, 5 theorems, 36 equations, 10 figures, 19 tables.

Key Result

Lemma 1

(Theorem 1 from foret2021sharpnessaware) Let $\mathcal{L}_{\mathcal{D}^n}(\boldsymbol{\theta})$ be the empirical loss function over $f$ on training set $\mathcal{D}^n$ and $\mathcal{L}_{\mathscr{D}}(\boldsymbol{\theta})$ be the population loss. For any $\rho>0$, with high probability over $\mathcal{ where $R:(\mathbb{R}_+, \mathbb{R}_+)\rightarrow\mathbb{R}_+$ is an increasing function (under cond

Figures (10)

  • Figure 1: Thm. \ref{['thm:grad']}: A flatter minimum has smaller gradient and Hessian norms, yielding better generalization. Thm. \ref{['thm:pace']}: Large gradient norms indicate large differences among perturbations. PACE minimizes these differences, reducing gradient norms. Thm. \ref{['thm:pace_compare']}: Minimizing all pairs of distances between $f(\boldsymbol{\theta}_0\!+\!\boldsymbol{z}_1\!\odot\!\Delta\boldsymbol{\theta})$ and $f(\boldsymbol{\theta}_0\!+\!\boldsymbol{z}_2\!\odot\!\Delta\boldsymbol{\theta})$ where $\boldsymbol{z}_1, \boldsymbol{z}_2\!\sim\!\mathcal{N}(\boldsymbol{1}, \sigma^2\boldsymbol{I})$ also reduces FP-distance (between fine-tuned $f(\boldsymbol{\theta}_0\!+\!\Delta\boldsymbol{\theta})$ and pre-trained $f(\boldsymbol{\theta}_0)$), especially when $\boldsymbol{z}_1\!\!=\!\!\boldsymbol{1}$, $\boldsymbol{z}_2 \!=\!\boldsymbol{0}$ or vice versa.
  • Figure 2: Our pipeline. Adapter $\Delta h(\cdot)$ and $h_0(\cdot)$ from pre-trained model form the linear layer $h$ of Multi-Head Attention and MLP in fine-tuned model. We perturb $\Delta h(\cdot)$ with multiplicative noise and ensure the network remains consistent to same inputs under varying perturbations.
  • Figure 3: Analysis for PACE. (a) gradient norm, (b) FP-Distance and (c) train & val. accuracy are evaluated on validation set of CIFAR-100 (VTAB-1K) with baseline LoRA$_\text{mul}$+VPT$_\text{add}$ on ViT-B/16.
  • Figure 4: Analysis for PACE. (a) gradient norm, (b) FP-Distance and (c) train & val. accuracy are evaluated on the validation set of Camelyon (VTAB-1K) with baseline LoRA$_\text{mul}$+VPT$_\text{add}$ on Swin-B.
  • Figure 5: Gradient norms of models across wide range of regularization strengths $\lambda$ on CIFAR-100 (VTAB-1K) w/ ViT-B/16. Line and shadow represent mean and std across training epochs.
  • ...and 5 more figures

Theorems & Definitions (5)

  • Lemma 1
  • Theorem 1
  • Proposition 1
  • Theorem 2
  • Theorem 3