arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2302.00456cs.CL
收藏

通过注意力图视角分析Transformer中的前馈块

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

Tohoku University(东北大学);RIKEN(理化学研究所);MBZUAI(穆罕默德·本·扎耶德人工智能大学)

Goro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro Inui

AI总结:

本研究针对Transformer中前馈块研究不足的问题,提出通过注意力图可视化分析其输入语境化效果,实验发现前馈网络会突出特定语言组合,且前馈块与周围组件作用存在抵消,提示Transformer层处理可能有冗余。

摘要:

Transformer在各类任务中应用广泛,解读其内部机制是一项核心目标。然而,尽管前馈(FF)块参数量庞大,这类Transformer的特定组件通常较少得到分析。我们通过将前馈块的输入语境化效果以注意力图的形式呈现,作为一种便于人类理解的可视化方案,来分析前馈块的该类效果。我们在掩码语言模型和因果语言模型上开展的实验表明,前馈网络会调整输入语境化过程,以突出特定类型的语言组合结构。此外,前馈块与其周围组件的作用往往会相互抵消,这表明Transformer层的处理过程可能存在冗余。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑