LearnBenchStart learning →

AI Research Scientist · Transformer Architecture Components

Feed-forward and normalization sublayers

Real lesson card · Page 1 of 3

Feed-forward and normalization sublayers

Feed-forward sublayer (FFN)

The feed-forward sublayer is the second sublayer in a transformer block, sitting right after attention. Unlike attention, which mixes information across positions, the FFN processes each position’s vector entirely on its own.
Example
After attention lets token 5 gather context from tokens 1-4, the FFN then transforms token 5’s vector alone, with no reference to any other token’s vector.

Recall check from the same lesson

Because the FFN sublayer's weight matrices are shared across positions, two different tokens at two different sequence positions in the same block are transformed using the exact same $W_1$ and $W_2$, even though each token still gets its own distinct output vector.

Sources

· Editorial policy

One sitting · 20–30 minutes

A focused session on your AI Research Scientist interview

LearnBench starts from what you already know — skip what you have, master what you’re missing.

Start now

More Transformer Architecture Components questions