How to Dissect a Muppet: The Structure of Transformer Embedding Spaces
Abstract
Pretrained embeddings based on the Transformer architecture have taken the NLP community by storm. We show that they can mathematically be reframed as a sum of vector factors and showcase how to use this reframing to study the impact of each component. We provide evidence that multi-head attentions and feed-forwards are not equally useful in all downstream applications, as well as a quantitative overview of the effects of finetuning on the overall embedding space. This approach allows us to draw connections to a wide range of previous studies, from vector space anisotropy to attention weights.
- Publication:
-
arXiv e-prints
- Pub Date:
- June 2022
- DOI:
- 10.48550/arXiv.2206.03529
- arXiv:
- arXiv:2206.03529
- Bibcode:
- 2022arXiv220603529M
- Keywords:
-
- Computer Science - Computation and Language
- E-Print:
- Accepted at TACL (pre-MIT Press publication version)