Table of Contents
Fetching ...

LayerNorm: A key component in parameter-efficient fine-tuning

Taha ValizadehAslani, Hualou Liang

TL;DR

It is found that output LayerNorm changes more than any other components when fine-tuned for different General Language Understanding Evaluation (GLUE) tasks and it is shown that only fine-tuning the LayerNorm can reach comparable, or in some cases better, performance to full fine-tuning and other parameter-efficient fine-tuning methods.

Abstract

Fine-tuning a pre-trained model, such as Bidirectional Encoder Representations from Transformers (BERT), has been proven to be an effective method for solving many natural language processing (NLP) tasks. However, due to the large number of parameters in many state-of-the-art NLP models, including BERT, the process of fine-tuning is computationally expensive. One attractive solution to this issue is parameter-efficient fine-tuning, which involves modifying only a minimal segment of the model while keeping the remainder unchanged. Yet, it remains unclear which segment of the BERT model is crucial for fine-tuning. In this paper, we first analyze different components in the BERT model to pinpoint which one undergoes the most significant changes after fine-tuning. We find that output LayerNorm changes more than any other components when fine-tuned for different General Language Understanding Evaluation (GLUE) tasks. Then we show that only fine-tuning the LayerNorm can reach comparable, or in some cases better, performance to full fine-tuning and other parameter-efficient fine-tuning methods. Moreover, we use Fisher information to determine the most critical subset of LayerNorm and demonstrate that many NLP tasks in the GLUE benchmark can be solved by fine-tuning only a small portion of LayerNorm with negligible performance degradation.

LayerNorm: A key component in parameter-efficient fine-tuning

TL;DR

It is found that output LayerNorm changes more than any other components when fine-tuned for different General Language Understanding Evaluation (GLUE) tasks and it is shown that only fine-tuning the LayerNorm can reach comparable, or in some cases better, performance to full fine-tuning and other parameter-efficient fine-tuning methods.

Abstract

Fine-tuning a pre-trained model, such as Bidirectional Encoder Representations from Transformers (BERT), has been proven to be an effective method for solving many natural language processing (NLP) tasks. However, due to the large number of parameters in many state-of-the-art NLP models, including BERT, the process of fine-tuning is computationally expensive. One attractive solution to this issue is parameter-efficient fine-tuning, which involves modifying only a minimal segment of the model while keeping the remainder unchanged. Yet, it remains unclear which segment of the BERT model is crucial for fine-tuning. In this paper, we first analyze different components in the BERT model to pinpoint which one undergoes the most significant changes after fine-tuning. We find that output LayerNorm changes more than any other components when fine-tuned for different General Language Understanding Evaluation (GLUE) tasks. Then we show that only fine-tuning the LayerNorm can reach comparable, or in some cases better, performance to full fine-tuning and other parameter-efficient fine-tuning methods. Moreover, we use Fisher information to determine the most critical subset of LayerNorm and demonstrate that many NLP tasks in the GLUE benchmark can be solved by fine-tuning only a small portion of LayerNorm with negligible performance degradation.
Paper Structure (23 sections, 6 equations, 6 figures, 4 tables)

This paper contains 23 sections, 6 equations, 6 figures, 4 tables.

Figures (6)

  • Figure 1: Heat map of change in each component after fine-tuning for different GLUE tasks.
  • Figure 2: Validation results after training only a fraction of LayerNorm for different values of the trainable fraction.
  • Figure 3: Heat map of Fisher information of LayerNorm in different layers. The X-axis is the task, the Y-axis is the Layer number.
  • Figure 4: Heat map of Fisher information of LayerNorm in different layers. X-axis is the task and Y-axis is the Layer number. Left: Weight, right: Bias
  • Figure 5: Validation results after training only a fixed fraction of LayerNorm for different values of the trainable fraction. For each task, the results of 3 experiments are plotted. Individual: The mask of each task is calculated based on information of that task. Global: The mask of each task is calculated based on information of all tasks. CV: The mask of each task has been calculated based on information of all tasks, excluding itself.
  • ...and 1 more figures