Abstract
Pretrained Language Models (PLMs) have revolutionized natural language processing, yet they often suffer from overfitting to their original pretraining data and objectives. This "rigidity" can hinder their ability to adapt to downstream tasks, especially when the target domain differs significantly from the pretraining domain. We introduce NoisyTune, a "plug-and-play" method that adds a small amount of matrix-wise uniform noise to PLM parameters prior to finetuning. Our experiments on GLUE and XTREME benchmarks show that NoisyTune consistently improves performance across various architectures (BERT, RoBERTa, ELECTRA, etc.) and is particularly effective in data-scarce environments.
Introduction
The standard paradigm for using PLMs involves a two-stage process: massive self-supervised pretraining followed by task-specific finetuning. While effective, a significant gap often exists between the pretraining and downstream domains. Most existing research focuses on regularizing the finetuning process to prevent overfitting the downstream data. NoisyTune addresses the inverse problem: the model being too anchored in its pretrained state. By introducing controlled perturbation, we enable the model to better explore the parameter space and find more optimal solutions for the target task.
Methodology
NoisyTune perturbs the PLM's parameters just before the finetuning process begins. Unlike naive noise addition, NoisyTune employs a matrix-wise perturbation strategy. The noise is scaled according to the standard deviation of each specific parameter matrix (e.g., query, key, or value matrices in Transformer layers).
The perturbed matrix $\tilde{\mathbf{W}}_i$ is calculated as: $$\tilde{\mathbf{W}}_i = \mathbf{W}_i + U(-\frac{\lambda}{2}, \frac{\lambda}{2}) \cdot \text{std}(\mathbf{W}_i)$$
Here, $\mathbf{W}_i$ represents the original parameter matrix, $U$ is a noise matrix drawn from a uniform distribution, and $\lambda$ is a hyperparameter controlling the noise intensity. Scaling by the standard deviation ensures that the perturbation is proportional to the original parameter scale, preventing layers with low variance from being overwhelmed while ensuring high-variance layers receive sufficient nudge for exploration.
Results and Key Insights
The authors evaluated NoisyTune using the GLUE (English) and XTREME (multilingual) benchmarks across several popular models.
Matrix-Wise vs. Global Noise
A critical finding is that the granularity of noise matters. Adding a single "global" noise level to all parameters can actually degrade performance. Because different Transformer components (attention vs. feed-forward) exhibit different statistical characteristics, matrix-wise scaling is essential for maintaining model stability while encouraging adaptation.
Uniform vs. Gaussian Noise
Empirical results indicate that uniform noise generally outperforms Gaussian noise. The authors suggest that the "long tails" of a Gaussian distribution might introduce extreme values that excessively distort the valuable knowledge captured during pretraining.
Performance in Low-Resource Settings
NoisyTune proves to be a "small data hero." The most significant performance gains were observed on smaller datasets within the GLUE benchmark, such as RTE and CoLA. This suggests that the added noise is vital when the downstream signal is too weak to pull the model out of its pretrained local minima.
Conclusion
NoisyTune offers a simple, effective, and computationally inexpensive way to boost the performance of PLMs on downstream tasks. By nudging the model out of its pretrained state through matrix-wise uniform noise, it facilitates better task adaptation. While the optimal noise intensity $\lambda$ may vary slightly by task, the method is largely robust and shows strong synergy with other finetuning techniques like RecAdam and Mixout. Future work may explore the theoretical underpinnings of these empirical choices and the applicability of NoisyTune to other domains like computer vision.
Summary updated