Improving Stability of Fine-Tuning Pretrained Language Models via Component-Wise Gradient Norm Clipping

Chenghao Yang, Xuezhe Ma
10/19/2022
cs.CL

Official code: yangalan123/FineTuningStability (13 stars, Python, MIT, last commit 2022-10-21).

Abstract

Fine-tuning over large pretrained language models (PLMs) has established many state-of-the-art results. Despite its superior performance, such fine-tuning can be unstable, resulting in significant variance in performance and potential risks for practical applications.

Show full abstract

Previous works have attributed such instability to the catastrophic forgetting problem in the top layers of PLMs, which indicates iteratively that fine-tuning layers in a top-down manner is a promising solution. In this paper, we first point out that this method does not always work out due to the different convergence speeds of different layers/modules. Inspired by this observation, we propose a simple component-wise gradient norm clipping method to adjust the convergence speed for different components. Experiment results demonstrate that our method achieves consistent improvements in terms of generalization performance, convergence speed, and training stability. The codebase can be found at https://github.com/yangalan123/FineTuningStability.

View on arXivView PDF

Code Implementations(1)

MIT

Code and data of the EMNLP 2022 paper "Improving Stability of Fine-Tuning Pretrained Language Models via Component-Wise Gradient Norm Clipping""

130Python, ShellOct 12, 20224 years agoMIT

Similar Papers

Cite this paper

@article{yang2022improving,
  title  = {Improving Stability of Fine-Tuning Pretrained Language Models via Component-Wise Gradient Norm Clipping},
  author = {Chenghao Yang and Xuezhe Ma},
  year   = {2022},
  eprint = {2210.10325},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2210.10325}
}

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

Discussion