Of Non-Linearity and Commutativity in BERT
By Sumu Zhao, Damian Pascual, Gino Brunner, Roger Wattenhofer. 2021
20 citations recorded by the source corpus.
In this work we provide new insights into the transformer architecture, and in particular, its best-known variant, BERT. First, we propose a method to measure the degree of non-linearity of different elements of transformers. Next, we focus our investigation on the feed-forward networks (FFN) inside transformers, which contain two thirds of the model parameters and have so far not received much attention. We find that FFNs are an inefficient yet important architectural element and that they cannot simply be replaced by attention blocks without a degradation in performance. Moreover, we study the interactions between layers in BERT and show that, while the layers exhibit some hierarchical structure, they extract features in a fuzzy manner. Our results suggest that BERT has an inductive bias towards layer commutativity, which we find is mainly due to the skip connections. This provides a justification for the strong performance of recurrent and weight-shared transformer models.
Subfields: Natural Language Processing, Model Architectures
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Natural Language Processing
- David Bau
- Asli Celikyilmaz
- Yonatan Belinkov
- Alex Andonian
- Kevin Meng
- Mona T. Diab
- Marjan Ghazvininejad
- Badr AlKhamissi
In Model Architectures
- David Bau
- Kevin Meng
- Mona T. Diab
- Asli Celikyilmaz
- Badr AlKhamissi
- Yonatan Belinkov
- Millicent Li
- Marjan Ghazvininejad
Citations in the corpus
- Locating and Editing Factual Associations in GPT (2022, background): “Furthermore, informed by the Zhao et al. (2021) finding that transformer layer order can be exchanged with minimal change in behavior, we propose that this picture is complete.”
- A Review on Language Models as Knowledge Bases (2022, methodology): “Transformer Mechanisms We evaluate transformers and whether they are explainable via other mechanisms, such as the feedfoward layers (Zhao et al., 2021; Geva et al., 2021; Meng et al., 2022).”
- Locating and Editing Factual Knowledge in GPT (2022, background): “Furthermore, informed by the Zhao et al. (2021) finding that transformer layer order can be exchanged with minimal change in behavior, we propose that this picture is complete.”