Analyzing Feed-Forward Blocks in Transformers Through the Lens of Attention Maps
Abstract
Transformers are ubiquitous in wide tasks. Interpreting their internals is a pivotal goal. Nevertheless, their particular components, feed-forward (FF) blocks, have typically been less analyzed despite their substantial parameter amounts. We analyze the input contextualization effects of FF blocks by rendering them in the attention maps as a human-friendly visualization scheme. Our experiments with both masked- and causal-language models reveal that FF networks modify the input contextualization to emphasize specific types of linguistic compositions. In addition, FF and its surrounding components tend to cancel out each other's effects, suggesting potential redundancy in the processing of the Transformer layer.
Cite
Text
Kobayashi et al. "Analyzing Feed-Forward Blocks in Transformers Through the Lens of Attention Maps." International Conference on Learning Representations, 2024.Markdown
[Kobayashi et al. "Analyzing Feed-Forward Blocks in Transformers Through the Lens of Attention Maps." International Conference on Learning Representations, 2024.](https://mlanthology.org/iclr/2024/kobayashi2024iclr-analyzing/)BibTeX
@inproceedings{kobayashi2024iclr-analyzing,
title = {{Analyzing Feed-Forward Blocks in Transformers Through the Lens of Attention Maps}},
author = {Kobayashi, Goro and Kuribayashi, Tatsuki and Yokoi, Sho and Inui, Kentaro},
booktitle = {International Conference on Learning Representations},
year = {2024},
url = {https://mlanthology.org/iclr/2024/kobayashi2024iclr-analyzing/}
}