Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention Maps

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Kobayashi, Goro, Kuribayashi, Tatsuki, Yokoi, Sho, Inui, Kentaro
Formato: Preprint
Publicado: 2023
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866917639548305408
author Kobayashi, Goro
Kuribayashi, Tatsuki
Yokoi, Sho
Inui, Kentaro
author_facet Kobayashi, Goro
Kuribayashi, Tatsuki
Yokoi, Sho
Inui, Kentaro
contents 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.
format Preprint
id arxiv_https___arxiv_org_abs_2302_00456
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention Maps
Kobayashi, Goro
Kuribayashi, Tatsuki
Yokoi, Sho
Inui, Kentaro
Computation and Language
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.
title Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention Maps
topic Computation and Language
url https://arxiv.org/abs/2302.00456