Learn AI Math

Feed-Forward Network (FFN)

What is Feed-Forward Network (FFN)?

In one sentence: A feed-forward network is the part of each Transformer block that processes each token on its own after attention.

Attention mixes information between tokens. Then the FFN works on each token separately, like a little thinking step that transforms its meaning. It usually expands the numbers to a bigger size, applies an activation function, and shrinks them back. Much of a model's stored knowledge lives in these layers.

What does Feed-Forward Network (FFN) look like?

After attention links "Paris" to "capital," the FFN might help bring up facts like "France" and "Eiffel Tower."

Why does Feed-Forward Network (FFN) matter?

FFN layers hold most of a Transformer's parameters, so they matter a lot for size and knowledge.

Last updated · Fact-checked by The AI Math

Linking to this page from a lesson or article?

Like this explanation? Get one every week.

The AI Math newsletter turns confusing AI news into plain English. No hype, no jargon walls.