Better Fine-Tuning by Reducing Representational Collapse

Armen Aghajanyan, Akshat Shrivastava, Anchit Gupta, Naman Goyal, Luke Zettlemoyer, Sonal Gupta

Abstract

Although widely adopted, existing approaches for fine-tuning pre-trained language models have been shown to be unstable across hyper-parameter settings, motivating recent work on trust region methods. In this paper, we present a simplified and efficient method rooted in trust region theory that replaces previously used adversarial objectives with parametric noise (sampling from either a normal or uniform distribution), thereby discouraging representation change during fine-tuning when possible without hurting performance. We also introduce a new analysis to motivate the use of trust region methods more generally, by studying representational collapse; the degradation of generalizable representations from pre-trained models as they are fine-tuned for a specific end task. Extensive experiments show that our fine-tuning method matches or exceeds the performance of previous trust region methods on a range of understanding and generation tasks (including DailyMail/CNN, Gigaword, Reddit TIFU, and the GLUE benchmark), while also being much faster. We also show that it is less prone to representation collapse; the pre-trained models maintain more generalizable representations every time they are fine-tuned.

Introduction

Fine-tuning large pre-trained language models like BERT and RoBERTa is the standard for modern NLP, yet the process remains notoriously fragile. Researchers frequently encounter high variance between runs and a tendency for models to overfit narrow downstream tasks. This paper identifies a core driver of this instability: Representational Collapse.

Representational collapse occurs when a model's internal representations—the rich, general-purpose knowledge acquired during massive pre-training—degrade as the model aggressively optimizes for a specific target task. While existing "trust region" methods like SMART or FreeLB attempt to mitigate this using adversarial perturbations, they are computationally expensive, requiring multiple iterative passes to find "worst-case" noise. We propose a more efficient alternative that achieves similar or better results with significantly less overhead.

Methods

We introduce R3F (Robust Representations through Regularized Finetuning) and its extension, R4F, which replace complex adversarial attacks with simple parametric noise.

  1. R3F: Instead of searching for an adversarial perturbation, we sample noise from a normal or uniform distribution and add it to the input representations. A Symmetric KL Divergence penalty is added to the loss function, discouraging the model's output from changing significantly in the presence of this noise.
  2. R4F (Reparameterized R3F): This version adds a constraint to the classification head using Spectral Normalization. By ensuring the head is 1-Lipschitz, we can more directly bound the change in representations, preventing small input changes from causing large output shifts.

This noise-based regularization provides the benefits of adversarial training without the iterative "ascent" steps, making it significantly faster and applicable to large-scale generation tasks where adversarial methods were previously impractical.

Experimental Results

Efficiency and Stability

One of the primary advantages of R3F/R4F is its computational efficiency. Because it avoids extra backward passes to generate perturbations, it is much faster than previous state-of-the-art (SOTA) trust region methods.

SST-2 Walltime Analysis comparing R3F/R4F with SMART and Standard++.

As shown in the walltime analysis, R3F and R4F maintain training times comparable to standard fine-tuning while being significantly faster than SMART. Furthermore, the method exhibits lower variance across different random seeds, providing a more reliable fine-tuning process for practitioners.

Mitigating Representational Collapse

To verify the existence of representational collapse, we conducted "probing" experiments. We found that after standard fine-tuning on a single task, a model's ability to perform other tasks using a simple linear probe dropped significantly. R3F and R4F effectively mitigate this degradation.

Probing accuracy across tasks showing R4F's ability to maintain generalizable representations compared to Standard++.

Our methods set a new SOTA for RoBERTa-Large fine-tuning on the GLUE benchmark and reached SOTA on XNLI (average score of 81.4). In summarization tasks, such as on the Reddit TIFU dataset, R3F improved the ROUGE-1 score by 4 points over standard BART fine-tuning.

Conclusion

Our findings suggest that complex adversarial perturbations are not strictly necessary for stabilizing fine-tuning; simple Gaussian or Uniform noise, when used to enforce smoothness, is equally effective. R3F/R4F offers a high-performance, efficient, and stable alternative to existing methods. Future work may explore extending this "noise-as-regularizer" framework to other domains like computer vision or more complex architectural components.

Summary updated

BibTeX
@inproceedings{aghajanyan2021better,
  author = {Armen Aghajanyan and Akshat Shrivastava and Anchit Gupta and Naman Goyal and Luke Zettlemoyer and Sonal Gupta},
  title = {{Better Fine-Tuning by Reducing Representational Collapse}},
  booktitle = {International Conference on Learning Representations},
  year = {2021},
  url = {https://openreview.net/forum?id=fbH5_lOLUVt},
}
Figure