← All tools
EDTOOLKITS GUIDES

Separate contextual mixing from a token-wise transformation

By Team Edtoolkits · AI learning

Use the ambiguous bank example to compare attention with the feed-forward block's effect on the resulting vector.

Use the guide alongside the working tool.

Open The Feed-Forward Block: Thinking Alone →

Explore the lesson

Watch tokens talk, then think alone.

Pick a word and step it through the layer.

Switch attention or feed-forward off and compare.

A comparison to try

Select bank in a river sentence and switch attention and the feed-forward part off and on separately. Repeat in a money sentence. Inspect the hidden detector activations rather than only the final sense label.

Read the result

Attention brings information from other positions; the feed-forward part transforms the representation at one position. Holding the sentence fixed makes these two operations easier to distinguish.

A mistake to avoid

The detector neurons and sense labels are hand-made. Real learned features need not align with tidy human categories, and a successful bank example is not evidence that all ambiguity is resolved by one layer.

Teaching model and privacy

A tiny layer with six hand-made detector neurons, not a trained one. Real feed-forward blocks have thousands of learned neurons. Nothing leaves your browser.

Explore a related workflow

All practical guides →

Found unclear instructions or an unexpected result? Contact Team Edtoolkits.

YOUR BROWSER, YOUR CHOICE