Information Guided Regularization for Fine-tuning Language Models

Mandar Sharma, Nikhil Muralidhar, Shengzhe Xu, Raquib Bin Yousuf, Naren Ramakrishnan

TL;DR

This paper introduces "guided dropout," a novel regularization technique for fine-tuning large language models (LLMs). By analyzing the Fisher information of model parameters, they identify which parts of the model are most crucial for generalization and selectively apply regularization, leading to improved performance, especially with limited data.

What Problem Does This Paper Address?

The current paradigm for adapting large language models (LLMs) to specific tasks involves fine-tuning. While effective, this process can be prone to overfitting, especially when the target dataset is small. Standard regularization techniques often treat all model parameters equally, which might not be optimal given that some parameters are more critical for generalization than others. The authors aim to develop a more "surgical" approach to regularization that leverages this understanding of parameter importance to improve fine-tuning efficiency and downstream performance.

Methods

The core of the paper's methodology revolves around using Fisher Information as a proxy for the Hessian to understand the loss landscape of LLMs.

  1. Fisher Information Analysis: They compute the empirical Fisher Information Matrix for pre-trained LLMs. This metric helps quantify how much information each parameter contributes to the model's output.
  2. Loss Landscape Visualization: Using techniques from prior work, they visualize the loss landscape by perturbing model parameters. They specifically examine how perturbing parameters with high Fisher scores versus low Fisher scores affects the landscape, revealing that parameters with high Fisher scores have a disproportionately large impact on the loss geometry.
  3. Guided Dropout: Based on these insights, they propose "guided dropout." Instead of using a uniform dropout probability across all layers, they devise a layer-wise dropout schedule. This schedule is informed by the aggregate Fisher scores of parameters within each layer. Layers with parameters that have higher Fisher scores (deemed more important for generalization) receive less regularization (lower dropout probability), while layers with lower Fisher scores receive more regularization (higher dropout probability). This is implemented as a linear schedule.
  4. Task and Architecture Agnosticism: A key design choice is that this guided dropout approach is independent of the specific downstream task and the model architecture, making it broadly applicable.

Datasets

  • Pre-training Corpus: The paper mentions using the WikiText-103 dataset for approximating the Fisher Information of pre-trained models.
  • Downstream Tasks: The models are evaluated on the GLUE benchmark, specifically using subsets of the following tasks:
  • CoLA (Corpus of Linguistic Acceptability)
    • SST-2 (Stanford Sentiment Treebank)
    • MRPC (Microsoft Research Paraphrase Corpus)
    • QQP (Quora Question Pairs)
    • STS-B (Semantic Textual Similarity Benchmark)
    • MNLI (Multi-Genre Natural Language Inference Corpus)
    • RTE (Recognizing Textual Entailment)
    • QNLI (Stanford Question Answering Dataset)
    • WNLI (Winograd Schema Challenge)

Key Insights and Ideas

  • Parameter Importance Varies Dramatically: A surprisingly small fraction of parameters in LLMs hold a disproportionately high amount of Fisher information. These "Fisher-sensitive" parameters have a significant impact on the model's loss landscape and generalization.
  • Loss Landscape Geometry Matters for Generalization: The paper visually demonstrates how perturbing parameters with high Fisher scores leads to sharper, less generalizable minima in the loss landscape, while perturbing parameters with low Fisher scores does not.
  • Targeted Regularization is Key: Standard regularization methods might be too blunt. By identifying and treating parameters/layers differently based on their Fisher information, we can achieve more effective regularization.
  • Fisher Information is Efficiently Estimable: The authors show that reliable estimates of Fisher Information can be obtained from a small fraction (as little as 1-5%) of the training corpus, making this approach computationally feasible.
  • Layer-wise Regularization is Effective: Applying regularization (dropout) in a layer-wise manner, guided by Fisher scores, leads to better performance than uniform dropout.

Key Results

  • Improved Performance on GLUE Tasks: Guided dropout consistently outperformed standard dropout and Gaussian dropout across various GLUE tasks, especially in scenarios with limited training data (data paucity).
  • Data Paucity Advantage: The performance gains of guided dropout were most pronounced when the training dataset size was reduced, demonstrating its effectiveness in preventing overfitting. For example, on CoLA, guided dropout achieved a Matthew's correlation score of 0.6877 compared to 0.6678 for Gaussian dropout and 0.6480 for standard dropout when using a reduced dataset.
  • No Computational Overhead: The proposed guided dropout adds no computational overhead during fine-tuning, as the layer-wise probabilities are pre-determined based on the pre-trained model's Fisher information.
  • Universally Applicable: The authors suggest their regularizer is universally applicable to different transformer architectures (BERT, GPT2, T5) and downstream tasks.

Limitations and Future Work

  • Computational Cost of Fisher Information: While the paper shows that Fisher information can be approximated with a small subset of data, computing it for very large models can still be computationally intensive, even if done only once for the pre-trained model.
  • Empirical Evaluation Scope: The extensive empirical evaluations were primarily conducted on the BERT model due to computational constraints. While theoretical motivations suggest applicability to other architectures, further broad empirical validation would be beneficial.
  • Linear Schedule: The paper uses a linear schedule for dropout probabilities. Future work could explore non-linear schedules or more adaptive methods for assigning dropout probabilities.
  • Exploration of Other Regularizers: The current work focuses on dropout. Extending the information-guided approach to other regularization techniques (e.g., L2 regularization, weight decay) could yield further insights and improvements.

Summary updated

BibTeX
@inproceedings{sharma2024information,
  author = {Mandar Sharma and Nikhil Muralidhar and Shengzhe Xu and Raquib Bin Yousuf and Naren Ramakrishnan},
  title = {{Information Guided Regularization for Fine-tuning Language Models}},
  booktitle = {COLM},
  year = {2024},
  url = {https://openreview.net/forum?id=MkppMETE49},
}
Figure