Is logical analysis performed by transformers taking place in self-attention or in the fully connnected part?
Evgeniy Shin, Heinrich Matzinger · 2025
Read Is logical analysis performed by transformers taking place in self-attention or in the fully connnected part? by Evgeniy Shin, Heinrich Matzinger (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2501-11765.txt.
Description
A transformer block has two engines: self-attention, which mixes information across tokens, and a fully connected layer, which is usually credited with the logic. Evgeniy Shin and Heinrich Matzinger challenge that division. They handcraft a single encoder layer that performs logical analysis inside the self-attention itself. Then they study a one-level transformer that learns by gradient descent on a grammar task. The task is predicting category pairs of neighboring tokens.
The setup lets them ask which part the learning model actually uses when both are available. They also compute the unwanted zeros where gradient descent can stall, and they show how to avoid them. The authors argue the result matters beyond the toy task. Self-attention may carry more of the logical load in real transformers than the standard picture admits.
Catalog record
| CREATOR | Evgeniy Shin, Heinrich Matzinger |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 93 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2501-11765