Reducing the Transformer Architecture to a Minimum
Not on the map. Why?
Abstract (arXiv)
Transformers are a widespread and successful model architecture, particularly in Natural Language Processing (NLP) and Computer Vision (CV). The essential innovation of this architecture is the Attention Mechanism, which solves the problem of extracting relevant context information from long sequences in NLP and realistic scenes in CV. A classical neural network component, a Multi-Layer Perceptron (MLP), complements the attention mechanism. Its necessity is frequently justified by its capability of modeling nonlinear relationships. However, the attention mechanism itself is nonlinear through its internal use of similarity measures. A possible hypothesis is that this nonlinearity is sufficient for modeling typical application problems. As the MLPs usually contain the most trainable parameters of the whole model, their omission would substantially reduce the parameter set size. Further components can also be reorganized to reduce the number of parameters. Under some conditions, query and key matrices can be collapsed into a single matrix of the same size. The same is true about value and projection matrices, which can also be omitted without eliminating the substance of the attention mechanism. Initially, the similarity measure was defined asymmetrically, with peculiar properties such as that a token is possibly dissimilar to itself. A possible symmetric definition requires only half of the parameters. We have laid the groundwork by testing widespread CV benchmarks: MNIST and CIFAR-10. The tests have shown that simplified transformer architectures (a) without MLP, (b) with collapsed matrices, and (c) symmetric similarity matrices exhibit similar performance as the original architecture, saving up to 90% of parameters without hurting the classification performance.
Key facts. Cited by 2 papers in the map (data through 14 Oct 2026). Builds on 8 of its 13 references that are in the map. First posted on arXiv 17 Oct 2024.
Builds on
8 of 13 references.
References · 8
- 2017Attention Is All You Needcited by 60,361
- 2020An Image is Worth 16x16 Words: Transformers for Image Recognition at Scalecited by 30,186
- 2015Distilling the Knowledge in a Neural Networkcited by 10,324
- 2014ImageNet Large Scale Visual Recognition Challengecited by 8,498
- 2014Neural Machine Translation by Jointly Learning to Align and Translatecited by 4,548
- 2016Gaussian Error Linear Units (GELUs)cited by 3,502
- 2019Patient Knowledge Distillation for BERT Model Compressioncited by 508
- 2023Simplifying Transformer Blockscited by 37
Built on by
Citing papers per year: 2025: 1; 2026: 1.
2 papers.