Reproduce “Analyzing Feed-Forward Blocks in Transformers through the Lens of Attention Maps” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Goro Kobayashi, Tatsuki Kuribayashi, Sho Yokoi, Kentaro Inui
This research extends norm-based analysis to Feed-Forward (FF) blocks in Transformers using Integrated Gradients, revealing that FFs dynamically modify input contextualization by amplifying specific linguistic relationships. However, these changes are largely canceled out by subsequent residual connections and layer normalization within the same Transformer layer.
Key insights
- FF blocks dynamically shape input contextualization, selectively amplifying specific linguistic compositions (e.g., subword-to-word, compound nouns) rather than merely reinforcing co-occurrence.
- The contextualization modifications introduced by FF blocks are frequently attenuated or 'canceled out' by the subsequent residual connections and layer normalization within the same Transformer layer.
- Layer Normalization actively contributes to this cancellation by shrinking 'outlier' dimensions produced by FF networks, thus suppressing FF's attempts to alter contextualization.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.