NoisyTune: A Little Noise Can Help You Finetune Pretrained Language Models Better

Chuhan Wu, Fangzhao Wu, Tao Qi, Yongfeng Huang

Abstract

Finetuning Pretrained Language Models (PLMs) has become the standard paradigm in Natural Language Processing. However, these models often suffer from "pretraining overfitting," where they become too specialized to their original self-supervised objectives, creating a gap that hinders adaptation to downstream tasks. We introduce NoisyTune, a remarkably simple technique that adds a small amount of noise to PLM parameters before finetuning. By perturbing parameter matrices based on their own standard deviations, NoisyTune facilitates better exploration of the parameter space. Our empirical evaluation across the GLUE and XTREME benchmarks demonstrates consistent performance gains across various models and tasks, especially in scenarios with limited labeled data.

Introduction

While models like BERT and RoBERTa provide powerful representations, the transition from pretraining to finetuning is not always seamless. Standard finetuning often struggles to overcome the "pretraining gap"—the discrepancy between the pretrained state and the requirements of a specific downstream task. Existing regularization methods like Mixout or RecAdam primarily focus on preventing overfitting to the downstream data. In contrast, NoisyTune addresses the model's tendency to remain "locked in" to its pretraining state.

Methodology

The core innovation of NoisyTune is a matrix-wise perturbation strategy applied immediately before the finetuning process begins. Unlike global noise addition, which can degrade model utility, NoisyTune scales the noise based on the characteristics of each individual parameter matrix (e.g., query, key, value, or feed-forward weights).

Comparison between standard finetuning and NoisyTune.

The perturbation is defined as: $$\tilde{W}_i = W_i + U(-\frac{\lambda}{2}, \frac{\lambda}{2}) \cdot \text{std}(W_i)$$

Where $W_i$ is a parameter matrix, $U$ is a uniform distribution, $\text{std}(W_i)$ is the standard deviation of the matrix, and $\lambda$ is a hyperparameter controlling noise intensity (typically 0.1 to 0.15). This approach ensures that matrices with higher variance receive more significant perturbations, while more stable weights are less affected.

Experimental Setup

We evaluated NoisyTune using several prominent PLMs, including BERT, XLNet, RoBERTa, and ELECTRA. Performance was measured on:

  • GLUE Benchmark: A collection of diverse English NLU tasks.
  • XTREME Benchmark: A multilingual benchmark covering 40 languages to test cross-lingual transfer capabilities.

Results and Analysis

NoisyTune yielded consistent improvements in average GLUE scores across all tested models. For instance, BERT-base improved from 79.6 to 80.3, and RoBERTa-base rose from 82.9 to 83.6.

Noise Type and Granularity

A critical finding is that the type and granularity of noise matter significantly. As shown in the ablation study, matrix-wise uniform noise consistently outperforms global noise and Gaussian alternatives.

Impact of different noise types and scales on GLUE performance.

The superiority of uniform noise over Gaussian noise suggests that the bounded nature of the uniform distribution prevents extreme values from excessively disrupting pretrained knowledge. Furthermore, matrix-wise scaling ensures the noise is proportional to the "utility" of each weight group.

Performance in Data-Scarce Scenarios

The benefits of NoisyTune are most pronounced on smaller datasets (e.g., RTE, CoLA). By nudging the weights away from their pretrained local minima, the noise acts as an exploration mechanism, allowing the model to find better optima even when downstream signals are sparse.

Complementarity

Because NoisyTune is a pre-finetuning step, it is fully compatible with other optimization techniques. Experiments show that combining NoisyTune with methods like RecAdam or Mixout leads to further performance enhancements.

Conclusion

NoisyTune is a "plug-and-play" method that requires minimal architectural changes—often just a few lines of code. By introducing controlled noise before finetuning, it helps PLMs break free from pretraining biases and adapt more effectively to new tasks. Future work includes exploring its impact on generative tasks and developing a deeper theoretical understanding of the uniform noise advantage.

Summary updated

BibTeX
@inproceedings{wu2022noisytune,
  author = {Chuhan Wu and Fangzhao Wu and Tao Qi and Yongfeng Huang},
  title = {{NoisyTune: A Little Noise Can Help You Finetune Pretrained Language Models Better}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.acl-short.76},
}
Figure