AI Paper Atlas

Research map / Architectures and efficiency / Attention and transformers

Transformer Feed-Forward Layers Are Key-Value Memories

Mor Geva, Roei Schuster, Jonathan Berant, Omer Levy

EMNLP 2021Architectures and efficiency › Attention and transformersapproach: Transformer block and depth design1,936 citations (OpenAlex)

Allen Institute for Artificial Intelligence · Cornell Tech

Read the paperPlace an idea next to itCheck your own paper ↗

8measured effects
6improved
1hurt
1mixed

AI-extracted. The measured effects below were read by AI from the paper's full text (no summary yet). Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

This paper tried a common change: Add residual connections

add residual connection refinement across layers · validation prefixes · residual top prediction matches output: about a third decided in bottom few layers, rises rapidly from layer 10 Improved

What 561 accepted papers report for this change

See this change in detailMatched by the wording of each paper's own result, read by AI from the full text. Papers report gains more often than failures, so this shows what gets published, not the chance a change works.

Measured effects reported in the paper

What was changedWhereMeasuredEffect
go from lower layers (1-9) to upper layers (10-16)key patterns · expert pattern annotationpattern type: shallow dominate layers 1-9, semantic in 10-16Improved
remove the last token from key trigger prefixes in upper layers (ablation)memory coefficient · 1600 random keysrelative change in memory coefficientHurt
project value vectors on output embeddings, upper layers (11+) vs lower layers (1-10)value-key agreement · WikiText-103 LMagreement rate: near zero -> up to 3.5%Improved
compare value top-token agreement to random tokenvalue predictions · upper layersagreement rate: 0.0004% -> up to 3.5%Improved
select values with highest max probabilityvalue detection · top-100 valuesvalues with agreeing trigger example: 46 of 100Improved
move toward layer 10 in the model depthactive memories per layer · 4,000 validation prefixesfraction of active memories: 10%-50% of 4096 active; drops towards layer 10Mixed
compose multiple memories in a layerlayer prediction · 4,000 validation prefixestop prediction differs from all memories: >=~68% of examplesImproved
add residual connection refinement across layersfinal prediction · validation prefixesresidual top prediction matches output: about a third decided in bottom few layers, rises rapidly from layer 10Improved

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy