Investigating the Role of Feed-Forward Networks in Transformers Using Parallel Attention and Feed-Forward Net Design
Shashank Sonkar, Richard G. Baraniuk

TL;DR
This paper explores the role of Feed-Forward Networks in transformer models by proposing a parallel architecture, validating key assumptions through experiments on large language models, and enhancing understanding of their interactions.
Contribution
It introduces the PAF architecture for transformers, empirically validates its assumptions, and deepens understanding of FFN and attention interactions in transformer models.
Findings
Both assumptions about FFN and attention blocks hold true in PAF.
PAF variants perform effectively on large language models.
The study clarifies the roles of FFNs in maintaining token embedding isotropy.
Abstract
This paper investigates the key role of Feed-Forward Networks (FFNs) in transformer models by utilizing the Parallel Attention and Feed-Forward Net Design (PAF) architecture, and comparing it to their Series Attention and Feed-Forward Net Design (SAF) counterparts. Central to the effectiveness of PAF are two main assumptions regarding the FFN block and the attention block within a layer: 1) the primary function of the FFN block is to maintain isotropy among token embeddings and prevent their degeneration, and 2) the residual norm computed in the attention block is substantially smaller than the input token embedding norm. To empirically validate these assumptions, we train PAF variants of two large language models (RoBERTa-large and bert-large-uncased). Our results demonstrate that both assumptions hold true in the PAF design. This study contributes to a deeper understanding of the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsAdvancements in Battery Materials · Low-power high-performance VLSI design · Advanced Battery Technologies Research
MethodsMulti-Head Attention · Attention Is All You Need · Softmax · Layer Normalization · Byte Pair Encoding · Dropout · Linear Layer · Label Smoothing · Position-Wise Feed-Forward Layer · Adam
