Improved Regularization and Robustness for Fine-tuning in Neural Networks

Dongyue Li, Hongyang R. Zhang
11/8/2021
cs.LGcs.CVstat.ML

Official code: VirtuosoResearch/Regularized-Self-Labeling (26 stars, Python, MIT, PyTorch, last commit 2022-06-07).

Abstract

A widely used algorithm for transfer learning is fine-tuning, where a pre-trained model is fine-tuned on a target task with a small amount of labeled data. When the capacity of the pre-trained model is significantly larger than the size of the target dataset, fine-tuning is prone to overfitting and memorizing the training labels.

Show full abstract

Hence, a crucial question is to regularize fine-tuning and ensure its robustness against noise. To address this question, we begin by analyzing the generalization properties of fine-tuning. We present a PAC-Bayes generalization bound that depends on the distance traveled in each layer during fine-tuning and the noise stability of the fine-tuned model. We empirically measure these quantities. Based on the analysis, we propose regularized self-labeling -- the interpolation between regularization and self-labeling methods, including (i) layer-wise regularization to constrain the distance traveled in each layer; (ii) self-label-correction and label-reweighting to correct mislabeled data points (that the model is confident) and reweight less confident data points. We validate our approach on an extensive collection of image and text datasets using multiple pre-trained model architectures. Our approach improves baseline methods by 1.76% (on average) for seven image classification tasks and 0.75% for a few-shot classification task. When the target data set includes noisy labels, our approach outperforms baseline methods by an average of 3.56% in two noisy settings.

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

A regularized self-labeling approach to improve the generalization and robustness of fine-tuned models

261Python, ShellOct 25, 20214 years agoMIT
fine-tuningnoisy-labelspytorch

Similar Papers

Cite this paper

@article{li2021improved,
  title  = {Improved Regularization and Robustness for Fine-tuning in Neural Networks},
  author = {Dongyue Li and Hongyang R. Zhang},
  year   = {2021},
  eprint = {2111.04578},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2111.04578}
}

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

Discussion