---
title: "An Empirical Study on the Transferability of Transformer Modules"
description: "This study compares which parts of BERT can be fine-tuned for new tasks and tests how far a small set of layer normalization weights can go."
canonical: "https://research.elamur.ai/free/en/papers/akbartajari-2022-empirical-study-transferability-transformer-modules/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/akbartajari-2022-empirical-study-transferability-transformer-modules/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2022](https://md.research.elamur.ai/free/en/papers/2022/) / An Empirical Study on the Transferability of Transformer Modules in Parameter-efficient Fine-tuning

# An Empirical Study on the Transferability of Transformer Modules in Parameter-efficient Fine-tuning

Paper · 2022 · Mohammad AkbarTajari, Sara Rajaee and Mohammad Taher Pilehvar

**Authors:** Mohammad AkbarTajari, [Sara Rajaee](https://md.research.elamur.ai/free/en/authors/sara-rajaee/) and [Mohammad Taher Pilehvar](https://md.research.elamur.ai/free/en/authors/mohammad-taher-pilehvar/) · **Year:** 2022 · **Venue:** Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2022.emnlp-main.726/)
- [PDF](https://aclanthology.org/2022.emnlp-main.726.pdf)
- [DOI 10.18653/v1/2022.emnlp-main.726](https://doi.org/10.18653/v1/2022.emnlp-main.726)

## Summary

How much of a pretrained language system needs to change when it takes on a new task? In ordinary [fine-tuning](https://md.research.elamur.ai/free/en/concepts/fine-tuning/), training on task examples can update the entire network. AkbarTajari and colleagues ask how much of that flexibility BERT actually needs. They let only a particular kind of component change, such as the attention modules, the feed-forward modules, or the layer normalization modules. The other pretrained weights stay fixed, so the same network still processes the input from beginning to end. The experiment measures how well each selected group can adapt that existing computation to a new prediction problem.

Several components prove capable of supporting transfer. The feed-forward and attention settings often approach full fine-tuning on [GLUE](https://md.research.elamur.ai/free/en/papers/wang-2018-glue-multi-task-benchmark-analysis/), and layer normalization offers especially strong results for the number of weights it updates. The paper gives the precise share for tuning both kinds of LayerNorm across the network as 0.034% of the full fine-tuning parameter count. On the MRPC development set, which tests whether sentences are paraphrases, this setting reaches 91.0 F1 and full fine-tuning reaches 90.9. On the matched MNLI development set, which tests inference between sentences, LayerNorm tuning reaches 79.3 accuracy and full fine-tuning reaches 83.4. The authors also find competitive LayerNorm results for assigning grammatical tags and recognizing names at the token level.

The authors then narrow the set of trainable weights in two ways. They restrict tuning to the LayerNorms in a single block and find that blocks around the middle of BERT tend to be better choices. These runs use about 0.003% of all parameters for the block’s LayerNorm weights, with a task classifier also trained. In a separate experiment, they tune only the weights within each LayerNorm whose values lie farthest from its mean. These outliers usually give better development-set scores than equally small random selections from the LayerNorms. With 256 selected weights per module, outlier tuning reaches 88.1 Spearman correlation on the STS-B development set, compared with 89.0 for full fine-tuning.

These results show that a small, structured set of updates can put a much larger frozen network to work for a new task. The outlier comparison supports the authors’ explanation that unusually large departures from the average weight contribute to LayerNorm’s effectiveness. The size of that advantage varies by task and parameter budget. The study establishes the pattern for BERT-base, and its most restrictive comparisons cover only a small subset of GLUE.

## Deep dive: An Empirical Study on the Transferability of Transformer Modules in Parameter-efficient Fine-tuning

This study compares which parts of BERT can be fine-tuned for new tasks and tests how far a small set of layer normalization weights can go. · about 30 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Where task-specific training can act

Pretraining produces a set of parameters that a language system can carry into more specialized work. Fine-tuning gives that system examples of a particular task and adjusts its parameters to improve its predictions. A task could ask whether a sentence is grammatically acceptable, whether two sentences express the same meaning, or which grammatical category a particular word belongs to. The same pretrained BERT can be the starting point for all of them. The task determines what counts as a successful output and which training examples supply evidence about it.

Updating the entire network gives task training many opportunities to affect the output. It also makes adaptation expensive when the network is large. The paper describes parameter-efficient fine-tuning as an attempt to reduce the number of weights that need to be updated. The distinction matters when the same pretrained starting point is meant to support multiple downstream tasks. If a small set of task-specific changes works, much of the pretrained network can stay fixed across adaptations. The study asks how much predictive performance is available under that restriction and which existing components are good places to apply it.

A [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/) consists of successive blocks, each of which contains several operations. Attention enables a token’s representation to depend on information at other positions. The feed-forward component applies a learned transformation to a representation at each position. Layer normalization, called LayerNorm in the paper, normalizes representations and uses learned parameters in producing its output. Each of these operations has parameters of its own. An experimenter can freeze the parameters in an operation while continuing to use it on every input.

This gives the authors a way to ask what it means for a component to transfer well. In this study, a module transfers well when letting its parameters change is sufficient to produce strong downstream predictions in the surrounding pretrained network. A module might be a good place to make changes because it can affect useful information computed elsewhere. The results therefore concern how the network can be adapted through that component. They provide an indirect view of what the network learned during pretraining, since the experiment observes predictions after the selected weights have been trained on task examples.

There are several scales at which this question can be posed. One concerns the kind of component, such as attention or normalization. Another concerns where the component sits in the network, since the same operations recur from block to block. A third concerns the particular weights within a component. At the first scale, a category can be trainable everywhere. At the next, the trainable category can be confined to a single location. At the last, training can be limited to individual coordinates. The paper moves through these scales as it examines the case for LayerNorm.

#### Extra modules and existing subnetworks

The paper describes adapters as one established route to parameter-efficient adaptation. An adapter adds a small trainable component to a Transformer, giving downstream training a place to make changes while much of the pretrained network stays fixed. The attraction is that a relatively small update budget can yield results close to those of full fine-tuning. The authors also point out that the additional components introduce their own parameters into a system that is already large. Their experiments focus on weights BERT already has. [Parameter-Efficient Transfer Learning for NLP](https://md.research.elamur.ai/free/en/papers/houlsby-2019-parameter-efficient-transfer-learning-nlp/)

Another line of work looks for a small trainable subset inside a larger network. The paper connects this line of research to the Lottery Ticket Hypothesis, using the term “winning ticket” for a subset whose training can yield performance comparable to training the larger system. Previous studies described in the paper look for promising subsets using such signals as weight magnitude or patterns in the network’s mappings. The authors identify a practical cost in locating a good subset when the search itself requires substantial time and memory. BERT’s repeated architecture gives them candidate subsets that can be named before any downstream run begins.

BitFit is a close precedent because it selects existing parameters by a recognizable role in the architecture. Its trainable parameters are bias terms selected consistently across the blocks. A bias is an additive parameter in an operation, so making biases trainable gives task learning a way to change that operation’s output while keeping other weights fixed. BitFit raises the question of whether biases are an unusually effective choice or one example of a broader principle. The authors compare it with other groups that can also be picked by their purpose and repeated position in the network. [BitFit](https://md.research.elamur.ai/free/en/papers/ben-zaken-2021-bitfit-simple-parameter-efficient-fine/)

The paper also draws on earlier studies that find differences among BERT’s layers. If a component recurs through the network, setting all instances of it to be trainable can hide how much the choice of depth matters. A strong score from LayerNorms distributed throughout BERT could come from a few especially adaptable locations, from contributions spread across the stack, or from a combination of the two. Earlier work on the transferability of contextual representations makes depth a natural variable to examine. [Linguistic Knowledge and Transferability of Contextual Representations](https://md.research.elamur.ai/free/en/papers/liu-2019-linguistic-knowledge-transferability-contextual-representations/)

The different precedents motivate different comparisons. A comparison with full fine-tuning shows how much of the usual prediction performance is available when updates are restricted. A frozen condition shows what the original representation supports with the task predictor trained on top. A random selection helps distinguish the value of a particular group of weights from the general value of letting some weights move. Comparing the same component at different depths then asks where that opportunity is most valuable. Each comparison concerns the effects of training a subset within the complete network.

### The method, step by step

#### Start with a shared pretrained network

For the GLUE experiments, the authors use `bert-base-uncased` from the Hugging Face Transformers library, implemented in TensorFlow. Using the same pretrained starting point means every fine-tuning condition has access to the same initial attention, feed-forward, and normalization parameters. A task-specific predictor turns the resulting BERT representations into outputs that can be scored on the downstream examples. The task determines the output to learn, such as a sentence label or a similarity score. [Transformers](https://md.research.elamur.ai/free/en/papers/wolf-2020-transformers-state-art-natural-language/)

The trainable subset determines which pretrained weights the optimizer can change in response to an error on a training example. A frozen weight retains its pretrained value throughout the run. A frozen operation can still receive a different input as training changes the outputs of earlier operations. Similarly, training a later component can alter how it uses a representation that was computed by fixed earlier components. This is how a small trainable subset can affect the overall calculation even though most of the parameters stay at their original values.

Consider the LayerNorm condition. A task example still moves through the attention and feed-forward operations of the network. Their settings are inherited from pretraining. Changing a normalization operation can alter the representation supplied to the next operation, which in turn affects later representations and the eventual task output. In a condition that trains LayerNorms across the network, these changes can occur at successive stages. In a condition that trains them in one block, later frozen operations still process the changes made at that location.

How the paper tests trainable subsets of BERT The steps in order.

#### Select the same kind of component across blocks

The broad module comparison begins by choosing corresponding components wherever they appear in the stack. In Feed-Forward, the feed-forward parameters are eligible for updates in every block. In Multi-Head, the trainable parameters belong to the multi-head attention components. “Multi-head” refers to the several attention operations within the component. In LayerNorms, both normalization positions in every block are eligible. All these selections follow the architecture, so the same rule can be applied across tasks without first searching the network for a suitable set.

Each block has a normalization operation associated with attention and another associated with the feed-forward component. The attention-side condition, LayerNorms A, trains the normalization at the attention position across the stack. The feed-forward-side condition, LayerNorms F, trains the normalization at the feed-forward position across the stack. In both conditions, the associated attention or feed-forward computation can still use its pretrained weights. The A and F labels identify the location of the normalization operation whose own parameters are eligible for training.

The paper gives the size of the complete LayerNorm group as 37k weights out of BERT-base’s 110M parameters. In the main results, Feed-Forward uses 51.76% of the full fine-tuning parameter count and Multi-Head uses 25.89%. At the precision used in the prose, both normalization positions together account for 0.034%, and either position alone accounts for 0.017%. Those budgets are inherent to the groups selected. The comparison between attention and normalization is thus a comparison of families with different numbers of adjustable weights as well as different places in the architecture.

The authors introduce a size-matched control for the complete LayerNorm condition. They select weights randomly from the network, using the same budget as the LayerNorm group. This is a test of whether a set of that size drawn throughout BERT offers the same opportunity for adaptation as a coherent set of normalization parameters. BitFit supplies a different structured comparison. It also selects a recognizable kind of parameter across blocks, and its reported trainable share is 0.12% of the full fine-tuning count. The results can therefore place LayerNorm tuning beside both a random draw and an established choice of existing weights.

At the ends of the comparison are Full-FT and Frozen. Full-FT makes the entire pretrained network available for training on the task. Frozen keeps the pretrained representation fixed and learns to predict the task output using it. The authors treat these as upper and lower reference settings. The result for either setup is an empirical score obtained with the training procedure. A restricted run can exceed a fully tuned run on an individual development metric, and the frozen representation can be stronger than a poorly chosen set of updates.

#### Keep training settings comparable

For GLUE, the maximum input sequence length is 128. The batch size is 16, so training groups examples into batches of that size for updates. Optimization uses Adam with epsilon set to 1e-6. Epsilon is a numerical setting used in the optimizer, distinct from the learning rate that controls the size of the training steps. The warmup ratio is 10%, meaning that warmup occupies that share of the training schedule. The authors report that the runs use NVIDIA Tesla V100S-32G GPUs.

The full fine-tuning baseline trains for five epochs, with an epoch representing a pass over the task’s training data. In the other settings, the authors assign 10 epochs to QQP, QNLI, SST-2, and MNLI. The remaining GLUE tasks receive 20 epochs in those settings. The paper bases the choice between those schedules on task size. A restricted set of weights and the full network are therefore evaluated under different training durations. The resulting comparison is between the procedures as run.

The authors vary the learning rate over the set `{1e-5, 5e-5, 1e-4, 5e-4, 1e-3, 5e-3, 1e-2}`. They describe this as the only hyper-parameter search. They report the mean and standard deviation from three runs with different random seeds. The mean summarizes the score obtained under those runs, and the standard deviation records how scores vary across them. An exception applies to some BitFit entries. Where the authors could not complete the search under their resource constraints, the table uses values from the original BitFit study and identifies them as such.

Sentence-level and token-level tasks share the idea of setting a trainable subset, but the token tasks use a cased version of BERT. The paper motivates that choice by the importance of letter case for those predictions. In the sentence-level experiments, a prediction applies to an input sentence or sentence pair. With token labeling, predictions apply to positions within the input. Using both kinds of task tests whether a small update set can support outputs at different levels of granularity. The authors make their implementation available in the transformer-transferability repository.

#### Restrict LayerNorm training to one block

The comparison across modules asks whether an entire family of LayerNorms is an effective place to make updates. The depth experiment chooses a single block and trains its attention-side and feed-forward-side LayerNorms along with the final classifier. The choice of block changes from one run to the next. Other blocks keep the pretrained values of their normalization parameters as well as their other weights. The paper refers to this as single-norm tuning, and the configuration described for each result in the layer-wise comparison uses the pair of LayerNorms in the chosen block.

For a selected block, the paper lists 3,072 LayerNorm parameters and 1,538 classifier parameters for the classification settings. The STS-B predictor has 769 parameters. The authors describe the trainable total including the predictor as less than 5K, and give about 0.003% as the scale of the layer-wise restriction relative to all BERT parameters. The separate counts matter because the small budget refers to the pretrained weights available to adapt, while the predictor still has to learn how to turn the output representation into a task prediction.

The layer-wise comparison covers CoLA, STS-B, MRPC, and RTE. Since the eligible normalization pair follows the same rule in every run, changes in score across placements can be read as evidence about where the opportunity to adjust that pair is most effective. The input still travels through the whole stack. The procedure changes the location where the task can alter BERT, and it measures the final task prediction after that alteration has passed through the rest of the network.

#### Select individual weights by distance from the mean

The authors then make a more selective intervention within LayerNorm. Their starting observation is that the values in these modules have a different distribution from those in attention and feed-forward components. To test whether especially unusual values help account for strong adaptation, they rank weights within each LayerNorm by how far the values are from the module’s mean. A weight on either side of the mean can qualify. This distinguishes the rule from choosing just the largest positive values.

The selection rule can be written as follows.

```
Sₙ = Topₙᵢ |wᵢ − μ|
```

Here, `Sₙ` is the set of selected weight indices for a particular LayerNorm. The subscript `n` is the number of weights to choose in that module, and `i` indexes a candidate weight. The value of the weight at index `i` is `wᵢ`, and `μ` is the mean weight value for the module. The minus sign gives the difference from the mean, and the vertical bars take its absolute value. `Topₙᵢ` selects the indices with the `n` largest values of that distance, and the equals sign defines `Sₙ` as the resulting set.

The paper calls the selected weights outliers. It uses 4, 16, 64, and 256 as the values of `n`. That number applies in every LayerNorm module in a run. Every module gets its own selected set, so corresponding coordinate positions need not be selected in different layers. This differs from the depth comparison, where the restriction applies to a particular block and all of that block’s normalization parameters can change. Outlier tuning keeps access to normalization weights across the network while limiting which weights within each module are available.

For each value of `n`, the accompanying control selects the same number of weights at random within each LayerNorm. Both conditions already concentrate the update budget in normalization. A score difference therefore tests the value of ranking weights by distance from the mean within that family. The earlier network-wide random condition addresses a separate question about where to allocate the complete LayerNorm budget. The paper uses both controls because a good choice of a module and a good choice of weights within it are distinct claims.

### Experiments and results

#### What the benchmarks measure

The main GLUE experiments cover acceptability, sentiment, paraphrase, similarity, and inference. CoLA asks for judgments about linguistic acceptability. SST-2 provides sentence sentiment labels. MRPC evaluates whether pairs of sentences are paraphrases, and QQP evaluates whether question pairs convey the same question. These tasks give the authors a way to check whether a parameter subset useful for a judgment about one sentence also works when the input contains a pair. [Stanford Sentiment Treebank](https://md.research.elamur.ai/free/en/papers/socher-2013-recursive-deep-models-semantic-compositionality/) · [Microsoft Research Paraphrase Corpus](https://md.research.elamur.ai/free/en/papers/dolan-2005-automatically-constructing-corpus-sentential-paraphrases/)

STS-B asks for a score that reflects the degree of [semantic similarity](https://md.research.elamur.ai/free/en/concepts/semantic-similarity/) between texts. This differs from predicting a discrete paraphrase label. MNLI evaluates inference between sentences, with matched and mismatched development results reported separately. QNLI is the question-related inference task derived from SQuAD, and RTE evaluates textual entailment. The authors omit WNLI because they report that BERT’s performance there is close to that of a random classifier. All of the reported GLUE results use the development sets. [Semantic Textual Similarity](https://md.research.elamur.ai/free/en/papers/cer-2017-semeval-2017-task-1-semantic/) · [Multi-Genre Natural Language Inference](https://md.research.elamur.ai/free/en/papers/williams-2018-broad-coverage-challenge-corpus-sentence/) · [SQuAD](https://md.research.elamur.ai/free/en/papers/rajpurkar-2016-squad-100-000-questions-machine/)

The paper uses Matthews correlation for CoLA, F1 for MRPC and QQP, and Spearman correlation for STS-B. It uses accuracy for the other GLUE tasks it includes. Matthews correlation evaluates agreement between the predicted and reference classes while taking the different kinds of correct and incorrect decisions into account. F1 combines precision, the reliability of the positive predictions, with recall, their coverage of the reference positives. Spearman correlation compares the ordering induced by the predicted similarity scores with the reference ordering. Accuracy measures the share of predictions that match the reference. The meaning of a score depends on its task and metric.

The CoNLL-2003 entity data and the Penn Treebank’s Wall Street Journal section, which is available through the Natural Language Toolkit, serve as the datasets for the token experiments. [Part-of-speech tagging](https://md.research.elamur.ai/free/en/concepts/part-of-speech-tagging/) calls for a grammatical label at a token, and [named entity recognition](https://md.research.elamur.ai/free/en/concepts/named-entity-recognition/) identifies names in the text. For the Penn Treebank the paper reports accuracy. For CoNLL it gives macro and micro F1. Macro F1 gives each category equal influence in the average, whereas micro F1 pools decisions across categories before calculating the score. A single run can therefore have quite different macro and micro scores. [Penn Treebank](https://md.research.elamur.ai/free/en/papers/marcus-1993-building-large-annotated-corpus-english/) · [CoNLL-2003 shared task](https://md.research.elamur.ai/free/en/papers/sang-2003-introduction-conll-2003-shared-task/)

#### Which module can carry task adaptation?

On the CoLA development set, the strongest score in the broad module comparison comes from Feed-Forward, with 59.0 Matthews correlation. Multi-Head reaches 56.2, and Full-FT reaches 54.7. The result shows that the largest trainable set is not required to achieve the highest observed score on this task. It also establishes a difference between the more expansive attention and feed-forward selections and the much smaller normalization selection. LayerNorms reach 52.8 on CoLA. This is close to the full fine-tuning result in the context of the budget change, while the feed-forward setting obtains a higher score with its larger set of adjustable weights.

On SST-2 development accuracy, Full-FT reaches 93.1, Feed-Forward 92.9, and Multi-Head 92.7. LayerNorms reach 92.2. Here, a trainable set comprising just the normalization parameters retains much of the performance seen when attention or feed-forward weights can move. The contrast with CoLA matters because it shows that the ordering and the spread between the conditions are properties of the task as well as the trainable group.

On MRPC, the development F1 scores for Feed-Forward, Multi-Head, and LayerNorms are 91.2, 91.1, and 91.0, compared with 90.9 for Full-FT. The margins among these means are small relative to the reported variation for full fine-tuning, which is 90.9 ±1.0. The LayerNorm result is 91.0 ±0.2. The point of the comparison is that the normalization setting reaches the same range under a much smaller update budget. The data support that conclusion without requiring any of the close means to be treated as a decisive winner.

Fine-tuning settings on the MRPC development set by F1 LayerNorm tuning reaches the range of the larger trainable settings and exceeds the size-matched random selection.

**The numbers**

| System or setting | F1 |
| --- | --- |
| Full fine-tuning | 90.9 |
| Feed-forward | 91.2 |
| Multi-head attention | 91.1 |
| Both LayerNorm positions (this paper) | 91.0 |
| Random weights across BERT | 80.7 |
| Frozen BERT | 85.1 |

STS-B also gives the small normalization group a score near full fine-tuning. On the development set, the Spearman correlations are 89.0 for Full-FT, 89.1 for Feed-Forward, and 88.9 for Multi-Head. The LayerNorm result is 88.4. This task compares predicted and reference rankings of similarity, whereas MRPC rewards the success of discrete paraphrase decisions. Agreement with full fine-tuning in both comparisons shows that strong transfer through normalization extends beyond a single type of output or metric.

The QQP comparison makes the limits of the small budget clearer. Full-FT achieves 87.3 development F1, Multi-Head reaches 87.1, and Feed-Forward reaches 86.7. LayerNorms reach 81.5. The MRPC and QQP results both involve judgments of equivalence and are both reported using F1, yet the normalization setting stays closer to full fine-tuning on MRPC. The score from one paraphrase-style task is consequently a poor basis for predicting the outcome on the other.

The inference tasks reveal a similar dependence on the benchmark. On matched MNLI development accuracy, Full-FT reaches 83.4 and Feed-Forward reaches 83.2. Multi-Head records 81.9, and LayerNorms record 79.3. On mismatched MNLI, Full-FT scores 83.7 and Multi-Head scores 83.6, while the complete LayerNorm setting reaches 80.7. On QNLI, the development accuracy of LayerNorm tuning is 89.4 against 91.5 for Full-FT. RTE gives 70.2 accuracy with LayerNorms and 71.7 with Full-FT. The trainable normalization group remains useful across these tasks, with varying amounts of performance retained.

Taken together, the comparisons support the paper’s broad use of “winning ticket.” The attention, feed-forward, and normalization groups each give the system an effective way to specialize for multiple tasks. Their parameter budgets differ substantially, and so does their closeness to full fine-tuning on particular tasks. The case for LayerNorm is based on the combination of a very small update budget and good scores across several evaluation settings. The attention and feed-forward results establish a separate point about the flexibility of pretrained BERT: effective adaptation can also proceed through other existing components.

#### What the baselines change about the result

On MRPC, training the random network-wide subset gives 80.7 development F1, compared with 85.1 for Frozen and 91.0 when both LayerNorm positions are trainable. On STS-B, random tuning gives 68.3 development Spearman correlation, and Frozen gives 84.3. LayerNorm tuning reaches 88.4. In these examples, the randomly trainable weights lead to a poorer result than training the prediction component on an unchanged BERT. A restricted optimization procedure can make the final output worse when the adjustable weights are poorly chosen. The paper does not trace the source of those declines to individual operations.

On CoLA, the two weaker reference settings are nearly level, with 35.2 Matthews correlation for Random and 35.5 for Frozen on the development set. The strong result of the structured normalization setting on that same task makes the distinction between weight count and weight selection especially clear. A random budget equal to the LayerNorm budget supplies opportunities to make changes throughout the network, but the LayerNorm rule guarantees that the changed values control a specific recurring operation.

BitFit sometimes matches or exceeds the normalization result. Its MRPC development F1 is 90.5 and its STS-B development Spearman correlation is 88.2, both close to LayerNorm tuning. For RTE it reports 76.4 development accuracy, ahead of the 70.2 for LayerNorms and the 71.7 for the paper’s Full-FT run. This is a counterexample to treating LayerNorms as the strongest restricted choice on every task. It also highlights the broader finding that pretrained weights selected for their consistent architectural role can provide a practical route to adaptation.

The BitFit comparison has a reporting qualification. The MNLI and QNLI values marked in the table come from the original BitFit paper. The authors explain that computational constraints prevented them from completing their own hyper-parameter search for the larger evaluations in question. They report that the borrowed scores are around 5% better than the best values they obtained under those settings. Those entries let readers see how the methods compare against the published BitFit results, with a different degree of experimental control from the runs completed in the same setup.

#### How well the result carries over to token labeling

Full fine-tuning scores 98.5 accuracy on the Penn Treebank tagging evaluation. On the CoNLL-2003 evaluation, it reaches 94.2 macro F1 and 98.6 micro F1. These baselines define different targets for restricted tuning. The Penn Treebank result concerns how frequently the grammatical tag is correct, while the CoNLL results reflect how predictions are distributed across entity categories and across the pooled decisions. A similar micro F1 can coexist with a more visible change in macro F1, so the paper reports both.

Tuning LayerNorms gives competitive results on both of these token tasks, and the authors report a clear advantage over a network-wide random selection of the same size. The token comparison uses the same 0.03% share for LayerNorms and Random at the precision displayed in the results table. It includes Frozen, Full-FT, and BitFit alongside those conditions. At this scale, the experiments test whether the value of structured updates survives a switch from labeling whole inputs to making predictions at token positions. The result extends the evidence for LayerNorm within BERT-base and within the tasks examined.

The token experiments also clarify what stays common across the paper’s applications. The successful intervention is a rule about which pretrained weights can change, and it is available for a new task even when the meaning of the output changes. The sentence-level tasks and token-level tasks still differ in their input handling, their predictors, their metrics, and the cased or uncased BERT variant. The shared observation is that task learning can often do substantial work through the normalization parameters under both setups.

### What the ablations show

#### Both normalization positions contribute

Training all LayerNorms leaves open the question of whether most of the observed benefit comes from one position inside each block. The attention-side and feed-forward-side conditions make that question testable. Each allows one family of normalization parameters to change across the stack. Their parameter counts are the same, at 0.017% of the full fine-tuning count in the paper’s more precise description. A comparison between them therefore concerns their positions and their interaction with the rest of the pretrained network.

On MRPC, the attention-side condition reaches 90.6 development F1 and the feed-forward-side condition reaches 91.0. Tuning both also reaches 91.0. On STS-B, both positions yield 88.4 development Spearman correlation together. Feed-forward-side tuning also yields 88.4, and attention-side tuning gives 88.3. For these tasks, the result from one position can be very close to that of the complete normalization set. A single family of normalizations provides ample opportunity for training in these particular comparisons.

The divergence is easier to see on some of the inference results. For matched MNLI development accuracy, the attention-side setting gives 76.3 and the feed-forward-side setting gives 77.0. Tuning both gives 79.3. On the mismatched set, the corresponding results are 75.9 for the attention side, 77.2 for the feed-forward side, and 80.7 for both. QNLI has a different ordering between the two single-position runs. The attention side gives 88.8 development accuracy and the feed-forward side gives 88.3, while training both reaches 89.4. The value of each position varies with the task, and in these results the larger normalization budget improves on either position alone.

These settings isolate training access to normalization sites. The attention-side result depends on the surrounding pretrained attention, feed-forward computation, and the task predictor. The feed-forward-side result has the same dependence on the other operations that stay in the network. A small performance gap between the two says that both positions are useful places to intervene under their respective conditions. The experiment leaves open how much each site contributes to an ordinary fully fine-tuned prediction when all weights are free to move together.

#### Where the trainable block sits matters

Training both LayerNorms in a single block reveals a pattern that the across-block comparison cannot show. On CoLA, the layer-wise development scores include 44.0 Matthews correlation for the first block, 48.1 for the strongest block, and 36.9 for the last block. All three runs give the task the same kind of trainable component at a different depth. The best single-block result is below the 52.8 obtained by tuning both normalization positions throughout BERT and the 54.7 obtained by training the whole network. At the same time, the variation across blocks shows that placement is a consequential choice within the small budget.

On MRPC, the strongest block gives 89.0 development F1. The next result in the sequence across depth is 88.8, while the final block gives 82.6. Tuning both positions throughout the stack reaches 91.0. This is a case where a well-placed block retains much of the result of the larger normalization set, while a block placed near the output yields a substantially weaker score. Proximity to the classifier is therefore an inadequate rule for selecting the trainable block in this experiment.

On STS-B, the best single-block development Spearman correlation is 87.2, against 88.4 with both normalization positions trained across the stack and 89.0 for full fine-tuning. The first block gives 85.1 and the last gives 83.5. RTE shows a broader pattern across the upper part of the stack. The best development accuracy is 67.5, and another later block reaches 67.0. The last block drops to 60.5. Full fine-tuning reaches 71.7. The comparison supports the authors’ description of the middle layers as strong choices, while showing that a task’s best region need not have sharp boundaries.

The authors relate the pattern to earlier findings on the transferability of intermediate BERT representations. Their setup offers a different kind of evidence. It asks how well task training can use the adjustable weights at a location, with other blocks still contributing to the computation. A middle block receives a representation already transformed by earlier blocks, and its own output is processed by later ones. Either part of that context can matter to the eventual score. The layer-wise runs establish a preference in these tasks, while leaving its exact mechanism open.

#### The weight distributions motivate a more specific test

To investigate why LayerNorm works well, the authors inspect weight values from the normalization, feed-forward, and attention components. Their main distribution figure shows BERT weights for RTE and STS-B, with corresponding plots for MRPC and CoLA in the appendix. The analysis examines the pretrained weights and considers changes under full fine-tuning. In the displayed distributions, the feed-forward and multi-head weights show broadly similar shapes. The normalization weights tend to have two modes, meaning that their values are concentrated around two regions. One region reaches substantially higher magnitudes. The pattern occurs on both sides of the Transformer block.

The distribution figure uses a random subset of weights for visualization and leaves out outliers to make the distributions easier to see. The prominent high-magnitude region and the weights picked for outlier tuning are therefore related observations with different roles in the argument. The first provides a reason to ask about the values inside LayerNorm. The second gives a rule for deciding which coordinates can be trained in a new run. The figure alone cannot show whether the extreme values provide an advantage as trainable parameters.

Earlier work discussed in the paper reports that LayerNorm outliers appear early in pretraining and that suppressing them after fine-tuning can worsen downstream performance. The authors here test a different intervention. They preserve the pretrained values in the network and give the optimizer permission to adjust a selected set. Suppression after learning asks how a trained system reacts when those values are disabled. Allowing updates during learning asks whether those coordinates offer particularly effective access to the pretrained computation. The new experiment is about the second question.

#### Magnitude helps most clearly against a matched control

The comparison within LayerNorm makes the effect of the selection rule visible. On CoLA, at 256 trainable weights in each LayerNorm, distance-from-mean selection gives 55.9 development Matthews correlation, compared with 54.3 for the matched random choice. At 64 weights per module, the scores are 51.6 and 48.3. The outlier setting is ahead at both budgets. The result at 256 is also above the 54.7 of full fine-tuning in the main CoLA comparison. It gives a concrete instance where a tiny update set can match the scale of the unrestricted score.

STS-B shows an advantage at the smallest budget as well as a strong result at the largest. At 4 trainable weights per LayerNorm, the outlier setting gives 83.8 development Spearman correlation and the random one gives 80.0. At 256 weights, their results are 88.1 and 87.9, while Full-FT reaches 89.0. At 64 weights, both selections give 86.5. Higher budgets support higher similarity scores in this comparison, and the size of the advantage attributable to the selection rule changes along the way.

Outlier and random selection on the STS-B development set by Spearman correlation Selecting weights far from the mean helps at the tightest budget, and both selection rules approach full fine-tuning at the largest budget.

**The numbers**

| System or setting | Spearman correlation |
| --- | --- |
| Random, 4 weights per LayerNorm | 80.0 |
| Outlier, 4 weights per LayerNorm | 83.8 |
| Random, 64 weights per LayerNorm | 86.5 |
| Outlier, 64 weights per LayerNorm | 86.5 |
| Random, 256 weights per LayerNorm | 87.9 |
| Outlier, 256 weights per LayerNorm (this paper) | 88.1 |
| Full fine-tuning | 89.0 |

The MRPC and RTE comparisons show why the paper describes an advantage in most cases. For MRPC at 256 weights per LayerNorm, outlier tuning yields 90.3 development F1 and random tuning yields 89.4. At 64 weights, the random result is 88.1 and the outlier result is 87.5. On RTE, outlier tuning gives 68.8 development accuracy at 256 weights compared with 67.8 for the random choice. At 64 weights, the direction reverses. Random reaches 64.8 and outlier tuning reaches 63.5. These reversals show that the rule’s value is an empirical tendency with task- and budget-dependent exceptions.

The budget labels in the outlier results make the scale of the intervention explicit. In the paper’s table, using 256 weights per LayerNorm corresponds to 0.0056% of all parameters. At 64 weights per module the reported share is 0.0014%, at 16 it is 0.0004%, and at 4 it is 0.0001%. These shares describe a setting spread through the network. The experiment can adjust a small number of weights at many normalization sites, whereas the single-block experiment concentrates more freedom at one depth.

The small-budget STS-B comparison also benefits from keeping the two kinds of baseline in view. The outlier setting at 4 weights per module exceeds the random selection at that budget. Its 83.8 development Spearman correlation is below the 84.3 Frozen result in the broad comparison. The evidence for a beneficial selection rule comes from comparing outliers with the same number of randomly chosen LayerNorm weights. The evidence for the practical benefit of adaptation depends on whether the resulting score also exceeds what the frozen network and task predictor already achieve.

Together, the outlier runs show that weight values carry useful information about where to permit updates. Their advantage against random selection holds within LayerNorm, which makes the comparison more specific than a comparison between normalization and attention. The strong performance of random LayerNorm weights at some budgets also leaves room for a broader explanation. LayerNorm’s place in the computation can make many of its weights useful, with unusually distant values providing especially effective choices under some constraints.

### Limitations

#### Limits the authors state

The authors identify available computation as a constraint on the scope of the experiments. They report results for BERT-base and confine the layer-wise and outlier comparisons to CoLA, MRPC, RTE, and STS-B, which they identify as the smallest GLUE tasks in their selection. The broader module experiment has wider task coverage. The most detailed evidence about the location and magnitude of useful weights comes from the smaller group. The study therefore gives a stronger basis for saying that module-wise tuning can work across GLUE than for predicting the best layer or outlier budget for any GLUE task.

The authors also point to a capacity limit from making so few weights trainable. In their limitations discussion, outlier tuning uses less than 0.006% of BERT’s weights. This constrains the changes downstream training can make to the network. The task can benefit from a compact intervention insofar as existing representations and transformations respond usefully to it. Some development scores remain below full fine-tuning, especially for the smallest outlier budgets. The authors’ argument for outlier tuning rests on the performance attainable within those budgets.

Computational limits also affect the comparison with BitFit. The imported entries preserve information about how BitFit performed in its own study on the larger tasks. The results produced in the same experimental setup with a completed learning-rate search offer a closer comparison of training settings. The paper identifies the imported entries, so their provenance can be taken into account when judging differences between the methods. Small gaps that involve those entries carry less information about the isolated effect of changing the trainable subset.

#### Limits that follow from the experimental design

The reported GLUE numbers are development scores. They show how the methods perform under the data splits and tuning procedure used in the paper. The study supplies no corresponding test-set results for those comparisons. Similarly, reporting means and standard deviations across seeds gives a measure of variation under repeated runs. It does not establish statistical equivalence between a restricted setting and full fine-tuning. Describing two methods as comparable is most persuasive when the scores sit in the same range across evaluations, even if individual means are ordered differently.

The full fine-tuning and restricted conditions also use different epoch schedules. This means the experiments evaluate workable versions of the procedures as configured. They do not isolate the effect of changing the trainable subset while holding the number of training passes fixed. A trainable subset and its learning rate can interact with the schedule, so the measured ranking is conditional on those choices. Close results are appropriately read as evidence that the restricted procedure can compete with the full fine-tuning baseline as run.

The broad comparison establishes that different groups of weights can support adaptation with the rest of BERT still present. It does not determine what the selected modules could accomplish in isolation or how much of the downstream knowledge they contain. A LayerNorm has access to a representation produced through embedding, attention, and feed-forward operations. Changing its parameters can change what those operations subsequently receive. The tested property is the effectiveness of a place to update, which leaves open how the information used in a prediction is distributed through the network.

Likewise, the near equality of two parameter budgets does not make the selected groups equivalent in function. A random selection across BERT can place sparse updates inside many operations, whereas choosing LayerNorms makes coherent parts of a repeated operation trainable. The size-matched test supports the value of the latter choice under the specific random selection procedure. It does not show that every search over other structured groups of the same size would yield a worse set. The paper looks for accessible candidates in the architecture and leaves the optimal subset across all possible selections undetermined.

The outlier comparison improves the case for a role of magnitude because the random control uses the same budget in the same modules. Distance from the mean can nevertheless correlate with other properties of a coordinate that also affect training. The experiments start from a pretrained network where those values and the surrounding computation already occur together. A better outcome from training the selected weights is evidence that the ranking rule identifies useful parameters. It leaves unresolved how those parameters acquired their usefulness and how much of the complete LayerNorm result can be attributed to them.

The LayerNorm experiments also establish trends at different parameter budgets through interventions that vary in location. Selecting one block changes the depth of the intervention. Selecting outliers affects many blocks at once. Differences between those procedures cannot be attributed to the count of trainable weights alone. Their relative usefulness can depend on whether a task benefits more from a local transformation or from opportunities to alter representations repeatedly as they travel through the stack.

Finally, parameter count and runtime are distinct measurements. The paper reports how few BERT weights need updates and how well the resulting system predicts. The full stack still processes the input, with frozen weights contributing to the calculation. The results establish parameter efficiency in the sense tested here. They give no measured amount of training-time speedup, memory savings, or inference acceleration. The relationship between the parameter budget and those practical costs depends on how the procedure is implemented.

### What came after

[Scaling Down to Scale Up: A Guide to Parameter-Efficient Fine-Tuning](https://md.research.elamur.ai/free/en/papers/lialin-2023-scaling-down-scale-up-guide/) (2023) cites the study in a guide to the wider area of parameter-efficient fine-tuning. That citation places the BERT experiments in a broader discussion of how to adapt pretrained systems with fewer trainable weights. Within that subject, AkbarTajari and colleagues contribute evidence about the choice among components already present in a network. Their comparisons cover an entire module family, a block at a selected depth, and a small set of weights distinguished by their pretrained values.

The documented connection is a citation. The guide’s use of the individual LayerNorm and outlier results, and any new experiments it may report with those settings, are unspecified. The concrete contribution available to later work is the empirical distinction established in BERT-base: choosing where task training can act matters alongside the size of the update budget, and both the location of a normalization module and the values of its weights can inform that choice.

## Cite

Cite as Mohammad AkbarTajari, Sara Rajaee and Mohammad Taher Pilehvar. 2022. An Empirical Study on the Transferability of Transformer Modules in Parameter-efficient Fine-tuning. Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2022.emnlp-main.726](https://doi.org/10.18653/v1/2022.emnlp-main.726)

```bibtex
@inproceedings{akbartajari2022empirical,
  title = {{An Empirical Study on the Transferability of Transformer Modules in Parameter-efficient Fine-tuning}},
  author = {Mohammad AkbarTajari, Sara Rajaee and Mohammad Taher Pilehvar},
  booktitle = {Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.726},
  url = {https://doi.org/10.18653/v1/2022.emnlp-main.726}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
