Elamur Research

Transformer Feed-Forward Layers Are Key-Value Memories

Paper · 2021 · Mor Geva, Roei Schuster, Jonathan Berant et al.

Summary

A transformer spends much of its parameter budget on a component whose role is less obvious than attention: the feed-forward layer. Attention allows information from different positions to interact. The feed-forward computation then transforms the representation at each position separately. This paper asks what that transformation has learned to do. Its answer is that the layer can be understood as a collection of memories: keys respond to patterns in the preceding text, and associated values contribute information that helps shape the next-token prediction.

The central argument begins with the architecture. A transformer feed-forward layer compares an incoming representation with rows of its first parameter matrix. A nonlinear activation converts these comparisons into coefficients. Those coefficients weight rows of the second matrix, producing the layer’s output. This resembles a neural memory that retrieves values through matching keys. The important difference is normalization: the feed-forward layer studied here uses ReLU, rather than turning the key scores into a softmax probability distribution. Its coefficients therefore describe independent activation strengths rather than shares of a fixed probability budget.

The authors investigate what these memories contain in a trained language model. Their experiments use a transformer with 16 layers, trained on WikiText-103. For sampled keys, they search the training corpus for sentence prefixes that produce especially strong activations. Human annotators find recurring patterns in these examples. Some involve wording, including shared final words or n-grams; others involve similar subjects or contexts in spite of different surface expressions. Across the annotated sample, every key receives at least one recognizable pattern. The lower layers are dominated by surface regularities, whereas the upper layers show more patterns involving semantics.

The values provide the complementary side of the interpretation. By projecting a value vector through the vocabulary output mechanism, the authors inspect which tokens it favors. In upper layers, these preferred tokens are related to what actually follows the corresponding key’s strongest training examples. The relationship is measurable but far from universal: exact agreement with the continuation of the strongest trigger reaches 3.5%, compared with 0.0004% for the paper’s random-vocabulary baseline. Lower-layer values show much weaker agreement under the same projection. The authors therefore present direct next-token prediction as a particularly useful interpretation of upper-layer memories, while leaving the meaning of lower-layer output spaces unresolved.

The complete computation is more distributed than a lookup metaphor might suggest. A prefix activates hundreds of cells within a layer, and their combined output frequently prefers a token that none of the individual values ranks first. Across layers, residual connections carry forward an evolving representation that typically retains its preferred token while receiving further adjustments. When a feed-forward update changes that preference, the result frequently differs from the favorite token of either component considered alone. The paper’s contribution to interpretability is this connected account of detection, stored contributions, composition, and refinement. It does not establish that a cell contains a literal sentence or an independently usable fact, nor that inspecting a few cells fully explains an individual prediction.

Interesting ideas

Read an operation through its algebra. The memory interpretation comes from identifying the roles already played by existing parameter matrices. Nothing needs to be added to the trained network to see a key-matching stage followed by a weighted combination of values. This is useful whenever an architectural component has an opaque name but a simple mathematical structure. Recasting the computation in familiar terms can generate testable questions about what its parameters represent, while preserving the actual operation instead of replacing it with a different system.

Inspect what activates a component. The authors connect internal vectors to readable text by retrieving inputs that give them large coefficients. This makes a parameter easier to study: instead of interpreting coordinates directly, an analyst examines a collection of examples associated with its behavior. The same strategy can help investigate other hidden units or learned features. Its strength is that it turns a vague hypothesis about a feature into a concrete set of cases that can support, complicate, or contradict the proposed interpretation.

Allow several descriptions of one feature. The annotation procedure does not require every key to have a single meaning. Experts can identify multiple recurring patterns, and a prefix can support more than one pattern. That flexibility matters because a learned direction may respond to several related expressions or to different regularities. Researchers studying learned components elsewhere can borrow this approach to avoid forcing a clean label onto evidence that is genuinely mixed. Coverage becomes as important as the appeal of the label: a description should account for examples, rather than merely sound plausible.

Pair input sensitivity with output effect. A detector’s preferred inputs do not explain what the system does with its activation. The paper therefore studies both the key and its associated value. This yields a more informative question: when a feature recognizes something, what prediction does its contribution favor? That pairing applies broadly to systems whose internal features feed into downstream decisions. It encourages an analysis that connects recognition to action, rather than treating activation examples as a complete explanation.

Use controlled changes to check an interpretation. Human annotations suggest that lower layers rely more on surface patterns. Deleting different tokens from highly activating prefixes provides a separate behavioral check. The interpretation becomes stronger when an intervention changes the activation in the expected direction. This is a reusable pattern for empirical work: formulate an explanation from observations, then choose a small modification that tests a specific implication. Such a test can be informative without establishing every causal detail of the mechanism.

Measure the mixture as well as its ingredients. The paper explicitly asks whether a layer’s preferred token can be recovered from the preferred tokens of its individual cells. Often it cannot. This makes composition an empirical question instead of an assumption. The same idea is useful for ensembles, additive architectures, and systems with several contributing signals: understanding each contribution separately may still leave the aggregate unexplained. A good diagnostic should therefore inspect the combined result and identify where it introduces behavior absent from the isolated components.

Track the decision as it develops. Residual representations are examined at successive depths, allowing the authors to distinguish changes in the leading token from changes in its probability. An apparently stable prediction may still be receiving substantial refinement. Researchers can reuse this distinction when studying any staged decision process. It helps separate early availability of an answer from final confidence, and it discourages treating the last computation as the sole place where a decision is made.

Deep dive: Transformer Feed-Forward Layers Are Key-Value Memories

How transformer feed-forward layers detect text patterns, combine stored values, and refine predictions through residual connections. · about 38 minutes to read

How Mova uses it

For Mova, a small transparent language system implemented in Rust, the most useful lesson is a way to organize explanations around observable computation. The paper connects a pattern detector to examples that activate it, then connects its output contribution to the prediction being assembled. That suggests a practical standard for transparency: a readable explanation should identify both the evidence that mattered and the effect that evidence had.

This is a possible application, rather than an established description of Mova’s implementation. The paper studies a particular transformer language model and does not evaluate Mova. It provides no evidence that Mova already has corresponding key and value matrices, uses the same activation function, or constructs predictions through the same residual architecture. Any adoption would need to begin with the operations Mova actually performs.

Make a detected pattern inspectable

If Mova contains learned or explicit pattern detectors, it could retain examples that strongly activate each detector. An inspection view could then display the examples alongside a short description of their shared regularity. The important borrowed idea is the connection between a description and supporting cases. Calling a component a topic detector or a phrase detector becomes more useful when a reader can see why that description fits.

The annotation procedure also offers a useful discipline. A proposed description should explain several examples, and examples that do not fit should remain visible. Mova could support several descriptions for a component rather than insist on a single label. This would make uncertainty part of the explanation rather than hiding it behind an overly tidy name.

For a transparent system, such records could help distinguish a pattern that is narrow and dependable from one that responds to varied contexts. This would be an engineering use of the paper’s analysis, not a result demonstrated for Mova. The relevant validation would be whether the recorded examples accurately characterize the component’s behavior on further inputs.

Separate recognition from contribution

A second possible use is to expose what happens after a pattern is recognized. Suppose a component responds strongly to a prefix. An explanation could show which candidate continuations its contribution supports, how strongly it contributes in that context, and what the full system ultimately chooses. This follows the paper’s separation between keys, coefficients, and values without assuming that Mova must reproduce the transformer architecture.

That distinction would help explain why detecting an apparently relevant pattern need not determine the answer. Another component may support a competing continuation, or the aggregate may prefer a candidate that no individual component places first. An explanation that shows only the detected pattern could make the result look arbitrary. Showing the contribution and its interaction with other evidence would make the decision more concrete.

The paper also suggests a useful debugging question: was the relevant evidence never detected, or was it detected and then outweighed? These failures call for different changes. The authors identify suppression during aggregation as a direction for further investigation. Mova could adopt the question as an inspection tool without claiming that the paper has already supplied a repair method.

Record the evolving prediction

If Mova constructs an answer through successive stages, it could record the leading candidates before and after each stage. This would make it possible to distinguish a stage that changes the chosen token from one that strengthens an existing preference. Such a trace would serve the system’s transparency goal while remaining faithful to its own implementation.

The paper gives no basis for claiming that this would improve Mova’s accuracy, speed, or privacy. Those would require separate evaluation. Its immediate contribution is a set of concrete things worth exposing: activating examples, intermediate coefficients or scores, candidate effects, and the final composition of evidence.

The problem and its context

The paper addresses an imbalance in how transformers were being understood. Self-attention had attracted extensive analysis, while feed-forward layers remained less well characterized in spite of holding a larger share of the parameters. For a typical layer in the accounting used by the authors, attention contributes 4d² parameters and the feed-forward component contributes 8d², where d is the hidden representation width. That imbalance makes the neglected component difficult to dismiss as a minor implementation detail.

The parameter comparison motivates an explanatory problem. A successful architecture can be used without knowing exactly what each component learns, but that leaves important questions unresolved. What information is represented in the larger parameter matrices? How does that information affect a prediction? Why do representations at different depths behave differently? The authors seek a mechanism-level account that connects the architecture to learned regularities in text.

This is different from asking whether attention or feed-forward layers are more important in every possible sense. Parameter counts do not directly measure causal influence, computational cost, or the quality of an explanation. The paper uses the count to show why a component deserves closer investigation. Its experiments then examine what that component appears to encode and how its output participates in prediction.

Earlier studies of attention and depth

The transformer architecture comes from Attention Is All You Need. In the research landscape described by the authors, much subsequent analysis focused on attention. Examples include Analyzing Multi-Head Self-Attention and Analyzing the Structure of Attention. These studies form part of the background against which the relative lack of feed-forward analysis becomes noticeable.

Another line of work examined differences between lower and upper layers. The paper places its findings alongside Deep Contextualized Word Representations, Linguistic Knowledge and Transferability, and BERT Rediscovers the Classical NLP Pipeline. The relevant connection is a broad distinction between surface-oriented information at lower depths and more semantic information higher up.

The new study gives that distinction a more specific architectural location. Rather than only asking what information can be found in a layer’s representation, it asks which feed-forward keys activate on which inputs. This produces a proposed explanation for part of the depth pattern: the individual detectors themselves show different kinds of regularity across the network.

The paper also acknowledges prior research on neuron functionality across architectures. Such work investigated properties associated with individual units or groups of units. An earlier analysis of convolutional text classifiers, for example, linked their behavior to salient n-grams. Retrieving highly activating examples was therefore an established analytical strategy. The novelty here lies in combining that strategy with the particular key-value structure of transformer feed-forward computation.

Earlier memory interpretations

The algebraic resemblance to neural memory was not introduced without precedent. The authors refer to end-to-end memory networks as the basis for the key-value comparison. They also credit Sukhbaatar and colleagues with an earlier observation connecting feed-forward parameters and persistent memories.

That earlier work incorporated such parameters into attention as persistent memory cells. According to this paper, the reparameterization demonstrated that the arrangement could work in practice. It did not establish what feed-forward layers in an ordinary transformer had learned to store. This distinction defines the contribution: the present paper investigates the contents and behavior of the existing component, rather than primarily proposing a new architecture.

Calling the component a memory is therefore a starting hypothesis with several empirical consequences. Keys should respond to identifiable kinds of input. Values should contain useful contributions associated with those inputs. Multiple memories should combine in a way that helps account for the network’s output. The experiments follow this sequence.

Mechanism rather than a single explanation

The authors distinguish their objective from methods that explain a particular prediction. They cite prediction-oriented interpretability work, including Attention is not not Explanation, but pursue a broader architectural question. They want to describe a recurring computation across inputs and layers.

That choice affects the evidence. The study uses collections of training examples to characterize keys, vocabulary projections to characterize values, and validation prefixes to characterize composition. A successful result is not a complete explanation of why one sentence received one continuation. It is a consistent account of what the feed-forward mechanism contributes across many cases.

The broader motivation includes understanding, data security, and architectural development. The paper treats these as reasons to investigate the mechanism and as possible future applications. It does not report a privacy attack, an automatic explanation system, or a new architecture that improves a benchmark.

The method, step by step

The investigation moves from an exact architectural comparison to empirical tests of the memory interpretation. The authors first identify the candidate keys and values. They then retrieve text that activates the keys, annotate its regularities, inspect the values through the vocabulary output mechanism, and study how the contributions combine within and across layers.

From feed-forward parameters to prediction behavior

The steps in order.

From feed-forward parameters to prediction behaviorStep 1: Interpret parameter matrices as keys and values1. Interpret parameter matrices as keys and valuesStep 2: Retrieve prefixes with strong key activation2. Retrieve prefixes with strong key activationStep 3: Annotate recurring patterns in those prefixes3. Annotate recurring patterns in those prefixesStep 4: Test sensitivity by deleting input tokens4. Test sensitivity by deleting input tokensStep 5: Project values into vocabulary predictions5. Project values into vocabulary predictionsStep 6: Measure composition within each layer6. Measure composition within each layerStep 7: Track prediction refinement through residual connections7. Track prediction refinement through residual connections

Begin with the feed-forward computation

A feed-forward layer acts separately on each position’s representation. This does not mean that the representation contains only the current token. At the point where it enters the feed-forward component, it represents the preceding text through the network’s earlier computations. The position-wise property describes how the feed-forward operation is applied, not an absence of contextual information.

With bias terms left out, the paper writes the operation as:

FF(x) = f(x · Kᵀ) · V

Here, x is a vector of width d representing an input prefix. K and V are learned matrices, each with dₘ rows and d columns. The symbol Kᵀ denotes the transpose of K, and the dots indicate matrix multiplication. The function f is a nonlinearity, such as ReLU. FF names the complete feed-forward transformation.

The multiplication by Kᵀ compares x with every row of K. Applying f produces an intermediate vector with dₘ entries. Multiplication by V then combines its rows using those entries as weights. This is the structural basis for calling rows of K keys and rows of V values.

The memory analogy can be made explicit by first writing the probability associated with a key in a normalized neural memory:

p(kᵢ | x) ∝ exp(x · kᵢ)

The vector kᵢ is the key for cell i. The dot product measures its match with input x. The exponential function converts that score into a positive quantity. The proportionality sign means that these quantities are normalized across keys to obtain probabilities. The notation p(kᵢ | x) refers to the resulting weight for key i given x.

The retrieved output of that neural memory is:

MN(x) = Σᵢ₌₁ᵈₘ p(kᵢ | x) vᵢ

MN denotes the neural-memory operation. The vector vᵢ is the value associated with key kᵢ. The summation ranges over the dₘ cells, so the output is an average of value vectors weighted by the key probabilities.

In matrix form, the same operation becomes:

MN(x) = softmax(x · Kᵀ) · V

The matrices have the same roles as in the feed-forward equation. Softmax converts the key scores into normalized weights. Comparing the expressions shows precisely where the analogy holds and where it stops: the feed-forward component uses its own activation function in the place occupied by softmax.

For the ReLU-based system analyzed in the experiments, the coefficient vector is:

m = ReLU(x · Kᵀ)

The vector m contains a coefficient for every cell. ReLU removes negative scores and preserves positive ones. A positive entry indicates an active cell; a zero entry indicates an inactive cell. These weights are not normalized probabilities, so activating one cell does not inherently require reducing the coefficients of others.

This distinction matters for interpretation. The layer can activate many memories at once, and their total coefficient mass can vary with the input. The architecture does not force a choice among a small set of mutually exclusive memories.

Use an existing trained system

The experiments examine the language model associated with Adaptive Input Representations. The implementation is the fairseq checkpoint named transformer_lm.wiki103.adaptive. It has 247M parameters and 16 layers.

Its hidden width is d = 1024, and the feed-forward intermediate width is dₘ = 4096. Under the memory interpretation, each feed-forward layer therefore contains 4096 potential cells. The paper reports 65,536 possible keys across the full network.

The training corpus is WikiText-103, which the paper connects to Pointer Sentinel Mixture Models. It contains over 100M tokens drawn from Wikipedia. The authors use spaCy to divide examples into sentences, making the retrieved prefixes easier to annotate and analyze.

The study does not train a new language model to test its hypothesis. It analyzes an existing trained checkpoint. Its additional procedures consist of retrieval, human annotation, input modifications, vocabulary projection, and measurements of intermediate behavior.

Retrieve the strongest examples for a key

For each selected key, the authors run the training sentences through the network and consider every sentence prefix. A prefix ends at a particular token and contains all tokens from the beginning of that sentence up to that point. Therefore, one sentence yields several candidate contexts.

The key’s activation at a given position is:

mᵢˡ = ReLU(xⱼˡ · kᵢˡ)

The superscript l identifies the layer. The subscript i identifies a cell within that layer, and j identifies the endpoint of the prefix. The vector xⱼˡ is the prefix representation entering that layer’s feed-forward component. The vector kᵢˡ is the selected key. The scalar mᵢˡ measures how strongly that cell responds.

The retrieval procedure ranks prefixes by this coefficient and retains the strongest ones. These are trigger examples: text contexts empirically associated with high activation. The method does not begin with a human description of the key, and it does not search for text matching an already chosen label.

For the main annotation experiment, the authors randomly select 10 keys from each layer, giving 160 keys altogether. They retrieve the top-25 prefixes for every selected key. This makes the annotation task a comparison among examples associated with the same internal component.

Training data serves a specific purpose here. The hypothesis concerns patterns acquired during training, so the authors look for strong examples in that corpus. Later, when examining ordinary prediction behavior, they switch to validation data.

Ask experts to describe recurring regularities

NLP graduate students inspect the retrieved prefixes. Their task is to identify patterns appearing in at least 3 examples, describe each pattern, and classify it as shallow or semantic. Shallow patterns involve visible wording or similar surface regularities. Semantic patterns involve related meanings or topics.

The procedure requires an explicit link between descriptions and examples. Annotators identify which patterns apply to each prefix. A prefix can support several descriptions, including descriptions from different categories. This allows the resulting account to reflect overlapping regularities.

Each key’s set of prefixes is assigned to one expert. The analysis therefore measures whether an expert can find recurring structure in the retrieved examples. It does not provide a reported estimate of agreement among several independent annotators examining the same key.

The paper’s introductory illustration provides an intuitive case. A key responds to contexts describing a duration and ending with the article a. Its paired value favors while. The interesting object is the association between the contextual pattern and a plausible continuation, rather than the final word considered in isolation.

Check sensitivity with token deletion

The authors supplement annotation with a larger controlled comparison. They sample 1600 keys, with 100 selected from each layer, and retrieve the top-50 examples for each. Each prefix is modified by removing its first token, its final token, or a randomly selected token.

The measured outcome is the relative change in the cell’s coefficient. If a detector relies heavily on a particular final word, deleting that word should substantially alter its response. If the detector draws on a broader contextual pattern, the same deletion may matter less.

This comparison tests an implication of the shallow-versus-semantic interpretation. It does not require the human labels to be mechanically correct for every example. Instead, it asks whether the network exhibits a corresponding difference in sensitivity across depth.

Deleting a token changes the input itself, so the intervention is not a perfect isolation of one abstract linguistic feature. Nevertheless, comparing deletion positions gives a concrete behavioral check on whether strong activations depend especially on the end of the prefix.

Inspect a value through the vocabulary

The next stage asks what the associated value contributes. A value vector has the same width as a hidden representation, so the authors pass it through the output mechanism to obtain a vocabulary distribution:

pᵢˡ = softmax(vᵢˡ · E)

The vector vᵢˡ is the value of cell i at layer l. E is the output embedding matrix that maps a hidden vector to vocabulary scores. Softmax converts those scores into the probability vector pᵢˡ. The actual implementation uses adaptive softmax; the expression presents the conceptual projection.

The probabilities require caution. During normal computation, a value is multiplied by an input-dependent coefficient before contributing to the output. Projecting the value on its own does not reproduce that context-dependent contribution’s probability scale. The resulting distribution is therefore uncalibrated.

The ranking is still informative when the value receives a positive coefficient: scaling its scores by that coefficient changes their spread without changing their ordering. The authors can therefore ask which tokens the value favors, while avoiding the stronger claim that its isolated probabilities are the probabilities used in the complete prediction.

There is another assumption. Applying the same vocabulary projection at every depth treats representations as though they occupy a compatible space. The paper explicitly recognizes that this may be inadequate, particularly for lower layers.

Compare preferred tokens with observed continuations

For every key, the authors identify the next token after its strongest trigger prefix. They then compare that token with the highest-ranked token in the paired value’s vocabulary projection.

The exact-match condition is:

argmax(pᵢˡ) = wᵢˡ

The argmax operation selects the token with the largest entry in pᵢˡ. The symbol wᵢˡ denotes the actual continuation of the key’s top-ranked trigger example. Agreement means that the value’s preferred token matches that continuation.

The authors also examine the rank assigned to the observed continuation. This retains information that exact matching discards. A value may be associated with the relevant continuation without placing it above every other vocabulary item.

A further analysis uses the maximum probability in each isolated value distribution as a confidence-like signal. The authors select the 100 values with the largest such probabilities, then inspect whether their preferred tokens occur after any of their keys’ top-50 triggers. This asks whether sharply focused values are easier to connect to predictive patterns.

Measure composition within a layer

The complete feed-forward output includes all weighted values and an output bias:

yˡ = Σᵢ ReLU(xˡ · kᵢˡ) vᵢˡ + bˡ

Here, xˡ is the layer input, kᵢˡ and vᵢˡ are its keys and values, and bˡ is the output bias. The vector yˡ is the combined feed-forward output. The summation makes clear that the layer’s result depends on several contributions whenever several coefficients are positive.

To compare predictions induced by different vectors, the authors introduce a shorthand:

top(h) = argmax(h · E)

The vector h may be a value, a layer output, or a residual representation. Multiplication by E gives vocabulary scores, and top returns the token with the highest score. Softmax is unnecessary when only the ranking matters.

Their composition diagnostic checks:

∀i: top(vᵢˡ) ≠ top(yˡ)

The symbol ∀ means that the condition applies to every cell i. A qualifying example is one where the whole layer prefers a token different from the favorite of every individual value. Such a case cannot be explained by simply selecting an individual value’s preferred token.

These measurements use 4,000 randomly selected prefixes from the validation split. This change of split reflects a change of question: the authors are now characterizing behavior on prediction inputs, instead of searching training examples for evidence about learned patterns.

Follow the residual through depth

The final stage studies how a feed-forward update interacts with information already present in the residual connection. The residual carries information from previous computations, including attention. The input to the feed-forward component is normalized:

xˡ = LayerNorm(rˡ)

The vector rˡ is the residual entering the component at layer l. LayerNorm is the layer-normalization operation. Its output xˡ becomes the feed-forward input.

The component then produces its update:

yˡ = FF(xˡ)

The notation FF refers to the feed-forward function defined earlier, and yˡ is its output. This vector is a contribution to the layer representation.

The residual addition gives:

oˡ = yˡ + rˡ

The vector oˡ is the representation after adding the update to the incoming residual. This addition permits both preservation and alteration of the information already present.

To track early agreement with the final decision, the authors measure:

top(rˡ) = top(oᴸ)

The superscript L denotes the final layer. The comparison asks whether the current residual already favors the token favored by the complete network.

They also identify that final token explicitly:

w = top(oᴸ)

Here, w is the network’s final preferred token. It serves as the target for a separate confidence measurement at earlier depths.

The residual’s vocabulary distribution is:

p = softmax(rˡ · E)

The probability vector p is obtained by projecting the residual through E and applying softmax. It describes the prediction induced by that intermediate representation under the chosen output projection.

The probability assigned to the eventual choice is:

p_final = p_w

The scalar p_final is the entry of p corresponding to token w. Tracking it separates agreement on token identity from the strength of support for that identity.

Finally, the authors compare the preferred tokens of rˡ, yˡ, and oˡ. This reveals whether the update preserves the residual’s choice, replaces it with the feed-forward component’s choice, or produces a choice favored by neither component alone.

Experiments and results

The experiments form a sequence of linked diagnostics instead of a competition to improve a downstream score. The central evidence concerns pattern coverage, sensitivity to input changes, agreement between values and continuations, activation sparsity, and prediction composition. There is no newly trained system whose accuracy is compared with a collection of task baselines.

All experiments use the same 247M-parameter checkpoint trained on WikiText-103. The corpus and training split supply trigger examples for the memory-content analyses. The validation split supplies the 4,000 prefixes used to study how ordinary predictions are assembled. Keeping these roles distinct is essential: a strong association with a training prefix and a pattern of inference behavior are different kinds of evidence.

Recognizable patterns in sampled keys

The annotation experiment covers 160 randomly selected keys, drawing 10 from every layer. Experts examine the top-25 training prefixes for each key and identify patterns supported by at least 3 examples.

Every sampled key receives at least one pattern description. The average is 3.6 patterns per key. Across layers, between 65%-80% of the retrieved prefixes are associated with an identified pattern. These measurements support the claim that strongly activating examples share structure a human can recognize.

The result does not mean that every example is explained. Some prefixes remain outside the identified patterns. It also does not mean that a single concise label captures a cell’s complete behavior. The average number of descriptions and the allowance for overlapping annotations both point to more varied associations.

The depth comparison is qualitative but consistent. In layers 1-9, shallow regularities dominate. A recurring final word is one example of the kind of commonality the authors observe. In layers 10-16, the retrieved prefixes more often share contexts or topics without obvious matching wording.

This finding supports a structured interpretation of the keys. They are not merely arbitrary coordinates that happen to fire. Their strongest examples reveal recurring input properties, and those properties vary systematically with depth.

Sensitivity supports the depth distinction

The deletion experiment broadens the sample to 1600 keys, with 100 from each layer. It applies the input modifications to the top-50 triggers of each key. The outcome is the relative change in activation, rather than task accuracy or continuation quality.

Removing the final token has a greater effect than removing the beginning of the prefix. This is consistent with the importance of recent context for the next-token computation. More specifically, the effect of deleting the final token weakens in upper layers.

The paper interprets that weakening as support for the annotation results. If higher keys rely less directly on particular final words, then removing such a word should have less impact. The result is therefore a behavioral complement to the human distinction between shallow and semantic patterns.

The figures show the trend across layers, but the text does not supply numerical values for each plotted point. The defensible result is the stated direction of the effect, instead of an invented estimate of its size at a particular depth.

Upper-layer values have predictive associations

For each cell, the authors compare the value’s preferred vocabulary token with the actual continuation of its key’s strongest training prefix. Exact agreement is close to zero in layers 1-10. Starting at layer 11, it increases, eventually reaching the rate shown below.

WikiText-103 training triggers, exact next-token agreement

Upper-layer value projections exceed the random-vocabulary baseline.

WikiText-103 training triggers, exact next-token agreementRandom vocabulary prediction: 0.0004Random vocabulary prediction0.0004Upper-layer value projection (this paper): 3.5Upper-layer value projection (thispaper)3.5
The numbers
System or settingagreement %
Random vocabulary prediction0.0004
Upper-layer value projection (this paper)3.5

The metric is agreement with the next token of the top-ranked trigger, not overall language-model accuracy. The baseline is a random vocabulary prediction. The comparison shows a meaningful association between upper-layer values and their keys’ continuations, but it does not show that isolated values reliably predict arbitrary inputs.

The rank analysis gives complementary evidence. Across depth, the observed continuation of the strongest trigger receives a more favorable position in the value-induced ranking. This is useful because a strict top-token match is a demanding criterion over a vocabulary whose size the paper describes as roughly 270K tokens.

The lower-layer result requires a different interpretation. Weak agreement under the final vocabulary projection does not establish that those values contain no useful predictive information. Their contributions may operate in a representation space that the projection does not read appropriately. The authors raise this possibility rather than resolving it.

Focused value distributions are easier to connect to triggers

The maximum probability of an isolated value distribution provides another diagnostic. Though the distributions are uncalibrated, higher maxima are associated with greater agreement between the value’s favorite token and its key’s strongest continuation.

The authors then select the 100 values with the highest maximum probabilities across the network. Of these, 97 occur in layers 11-16. This concentration is consistent with the broader observation that upper-layer values are more directly readable as vocabulary preferences.

For each selected value, they inspect the key’s top-50 triggers. In 46 out of 100 cases, at least one trigger has a continuation matching the value’s preferred token. This is a different criterion from the earlier exact agreement test: it permits a match anywhere in the retrieved set.

That distinction prevents an inflated reading of the result. The analysis identifies examples of strongly focused, predictively associated values. It does not establish that the selected values agree with most of their triggers, nor that every upper-layer cell has a straightforward next-token interpretation.

A prefix activates many cells

On the validation sample, a typical input activates hundreds of cells in each feed-forward layer. The reported active fraction spans 10%-50% of the 4096 dimensions. Most cells remain inactive, but the active set is still far larger than a single retrieved memory.

The number of active cells decreases toward layer 10. The paper notes that this is also where semantic patterns become more prominent in the annotation analysis. The coincidence is suggestive, but the experiments do not establish that the change in pattern type causes the change in sparsity.

The activation result places an important constraint on the memory metaphor. It describes a distributed combination of many stored contributions. It does not describe selecting one record and reading out its contents unchanged.

The distinction also explains why a list of interpretable cells cannot by itself account for the output. Even if several cells have clear descriptions, their coefficients and interactions determine how those descriptions affect the combined representation.

Layer outputs are usually compositional

The authors compare the preferred token of the complete feed-forward output with the preferred token of every individual value. At every depth, the whole layer favors a token absent from all individual first-place predictions in at least approximately 68% of the validation examples.

This is strong evidence against a simple winner-selection account. The aggregate often does something that cannot be summarized as adopting the favorite of a dominant cell. The mixture of contributions creates a different ordering of candidates.

The diagnostic is about first-place tokens, however. It does not imply that the chosen token lacks support from the individual values. Several values may give it useful but nonleading scores, allowing it to become the aggregate favorite.

The cases with an individual-cell match are also informative. Among those cases, 60% involve a common stop word as the predicted token. In 43%, the prefix contains fewer than 5 tokens. The authors suggest that frequent, simple patterns may sometimes be represented in a more directly reusable form within an individual cell.

Residuals preserve and refine predictions

The residual analysis finds that approximately a third of final predictions already match the token favored in the bottom part of the network. Agreement increases sharply from layer 10 onward. This suggests that many token choices are available before the final layer.

The probability assigned to the eventual output token also rises with depth. Token identity and confidence therefore provide related but distinct views of refinement. A representation can retain the same leading candidate while later computation changes how decisively it leads.

When examining individual residual additions, the authors find that preserving the residual’s preferred token is the most common behavior. Frequently, the feed-forward component considered by itself prefers something else. Its contribution can therefore matter without replacing the existing leader.

When the leader does change, the new token rarely equals the feed-forward component’s isolated favorite. More often, the result is a candidate preferred by neither component alone. This repeats the central compositional finding at a different scale.

A manual inspection considers 100 randomly selected final-layer composition cases. In 66 examples, the replacement is judged semantically distant from the earlier candidate. In 34 examples, it is related. The examples include a change between later and earlier, and another between gastric and stomach. Final-layer refinement therefore includes both shifts among related alternatives and broader changes in meaning.

What the ablations show

The paper does not present a conventional ablation program that removes components, retrains systems, and compares task performance. It offers controlled input modifications, comparisons across depth, and several diagnostic breakdowns. These analyses test parts of the proposed explanation, while leaving the full causal role of individual memories open.

Token deletion tests a specific prediction

The deletion comparison is the clearest intervention. It changes a prefix while keeping the examined key fixed. Comparing the consequences of deleting the first, final, or random token tests whether activation depends especially on the most recent wording.

The stronger effect of deleting the final token fits the observation that lower-layer triggers often share their final word. The smaller effect in upper layers fits the presence of more broadly contextual patterns. These are mutually supportive results obtained through different procedures.

The test remains local. It measures what happens to activation under a particular input alteration. It does not directly show which semantic feature the key represents, and it does not measure the effect on the network’s final answer. A reduction in a cell’s coefficient may be compensated for elsewhere.

Removing a token can also alter syntax, meaning, and positional structure at once. The comparison is therefore evidence about sensitivity to input location and content together. It is not a perfectly isolated test of semantics against surface form.

Depth comparisons reveal an interpretability boundary

The vocabulary projection behaves differently across the network. Lower-layer values show little exact correspondence with trigger continuations, whereas upper-layer values show stronger correspondence. This is an important qualification to the memory account.

The same algebraic structure exists at every depth, but its most direct linguistic reading is not equally supported everywhere. A key may have a recognizable input pattern even when its paired value cannot be usefully described as an immediate vocabulary preference under the final output projection.

The authors suggest that changing representation spaces could explain part of this discrepancy. That suggestion is not established by a controlled comparison of alternative projections. The analysis reveals the problem and motivates further investigation; it does not supply a verified account of how the spaces transform.

This is a useful example of an analysis exposing the limits of its own instrument. A weak readout could reflect the absence of the hypothesized information, an inappropriate readout, or some combination. The paper does not collapse those possibilities into a single conclusion.

Confidence selection identifies a narrower population

Selecting values with large maximum probabilities makes predictive associations easier to find. The concentration of selected values in upper layers supports the broader depth result. Inspecting several triggers also shows that a value’s preferred continuation can be associated with the key even when the strongest trigger alone is not sufficient.

This is a selection analysis instead of a representative survey of all cells. The chosen population is intentionally biased towards values that appear sharply focused under the vocabulary projection. Its results describe that selected group.

The analysis therefore answers a practical question: can a simple signal help locate cells with visible predictive associations? It does not answer how common such cells are under every possible definition, or whether their apparent confidence is calibrated in actual use.

Composition tests rule out a simple selection story

The intra-layer diagnostic provides a direct check on a tempting explanation. If the layer mainly chose one memory’s output, its preferred token should often match some individual memory’s favorite. The frequent absence of such a match shows that this account is inadequate for much of the observed behavior.

The residual breakdown asks the corresponding question across stages. Does the feed-forward contribution simply replace the residual with its own preferred token? The prevalence of a different combined choice argues for a more distributed interaction.

Neither analysis identifies a unique causal decomposition. Different combinations of vocabulary scores can produce the same winning token. The measurements establish that the first-place outcome is frequently emergent from addition; they do not reconstruct every contributing score or prove that all active cells are necessary.

Exceptions help locate simpler behavior

The stop-word and short-prefix breakdown examines cases where the combined layer does share a favorite with an individual value. Their concentration around common tokens and brief contexts suggests that some frequent patterns may admit simpler internal treatment.

The authors interpret this as possible caching in individual cells. The wording matters: it is an explanation suggested by the observed subset, rather than a separately verified storage mechanism.

Likewise, the final-layer manual analysis distinguishes related and distant substitutions without assigning a complete function to the responsible update. It shows that refinement has varying semantic granularity. It does not establish that every such substitution improves correctness.

Limitations

The paper supports a useful architectural interpretation, but several boundaries are essential to reading it accurately. Some are explicit unresolved questions raised by the authors. Others follow from the experimental design and limit how broadly the results can be applied.

Author-stated limits: representation spaces

The authors explicitly acknowledge that projecting values through the output embedding assumes compatibility between intermediate and final representation spaces. This assumption is especially consequential for lower layers, where direct next-token agreement is weak.

They propose that the space may change through depth. They also note that a sequence consisting only of memory lookups and additive value combinations would make a shared space seem natural. Any transformation may therefore involve interactions with attention, rather than being explained by feed-forward computation alone.

The paper leaves that interaction unresolved. Its account of keys, values, and composition does not provide a complete theory of how all transformer components coordinate their representation spaces.

The probability interpretation has a related limit. An isolated value distribution omits its actual context-dependent coefficient. Its peak probability is therefore an analytical signal, not a calibrated estimate of the contribution’s behavior inside the network.

Author-stated limits: generalization beyond the experiment

The authors argue that the architectural formulation extends to other transformers, including encoders and translation systems. They expect related qualitative behavior, but leave empirical verification to later work.

The distinction between mathematical applicability and demonstrated behavior is important. A similar matrix structure does not establish that every trained system develops the same kinds of patterns, the same depth transition, or the same degree of vocabulary alignment.

The actual experiments examine one checkpoint, one training corpus, and one language-modeling setting. The paper does not supply a comparison across architectures, training objectives, corpus types, or parameter scales.

These boundaries do not undermine the observed results. They determine the level of the conclusion: a detailed case study with a general architectural argument, instead of a universal empirical law.

Author-stated limits: applications remain prospective

Automatic pattern identification is presented as a possible future interpretability application. The study itself relies on expert annotation. It does not report an automated procedure that assigns reliable descriptions to every memory cell.

Training-data privacy is another proposed implication. The authors suggest that memory analysis could help white-box membership inference, where access to internal computation might provide evidence about whether an example was used during training. They do not demonstrate such an attack.

Architectural improvements are also prospective. The possibility that useful patterns are detected and subsequently suppressed motivates investigation, but the paper does not present a repair that measurably improves prediction.

These applications should therefore be read as research directions supported by an emerging mechanism, not as capabilities delivered by the experiments.

Design-based limits: what activation retrieval establishes

A careful reader should distinguish association from literal storage. A training prefix that strongly activates a key shows that the key responds to its representation. It does not establish that the cell stores that prefix as a recoverable record.

The same key can respond to several kinds of pattern. A semantic description shared by its strongest examples may characterize an important part of its behavior without defining a clean concept boundary.

The retrieval procedure also emphasizes the extreme end of activation. That is useful for discovering structure, but it does not reveal the entire distribution of everyday activations. A feature’s strongest examples can be more coherent than its behavior over arbitrary inputs.

Sentence segmentation adds another boundary. It makes annotation manageable, but the analyzed contexts are sentence prefixes. The procedure does not by itself characterize the full range of longer-context behavior.

Design-based limits: annotation uncertainty

Each sampled key is annotated by one expert. The paper does not report independent repeated judgments for the same key or an inter-annotator agreement measure. Consequently, the results establish that experts could construct grounded descriptions, while leaving the reproducibility of particular labels less clear.

The requirement that a pattern occur in at least 3 prefixes constrains unsupported interpretation. It does not eliminate subjectivity in deciding what counts as a shared topic, a shallow regularity, or an appropriate level of abstraction.

Coverage also remains incomplete. Some strong triggers receive no identified pattern. A readable account should preserve that remainder rather than assume that every activation has already been explained.

The annotated sample is small relative to the full collection of possible keys. Random sampling supports a broader inference, but it does not justify saying that every cell throughout the network has been individually inspected.

Design-based limits: diagnostic outcomes are not task success

The exact-match result compares a value with the continuation of a retrieved training prefix. It is not an evaluation of the isolated value on ordinary next-token prediction. The random-vocabulary baseline helps establish nontrivial association, but it is not a strong competing language-modeling system.

Similarly, agreement between an intermediate residual and the final prediction measures internal consistency, not correctness. The final token may itself be wrong. Early agreement does not establish that a correct decision has already been reached.

The manual categories for final-layer substitutions describe semantic relations between candidates. They do not determine whether the replacement is better, worse, or appropriate in context.

The study therefore explains aspects of prediction construction without demonstrating improvements in factuality, generalization, or downstream utility.

Design-based limits: composition is not a complete causal explanation

The mathematical feed-forward decomposition is exact under its stated form, but the empirical interpretation of each component remains partial. The first-place-token diagnostic shows that combining vectors frequently yields a new leader. It does not measure every cell’s causal importance.

A cell with a small coefficient could still matter in a close decision. Conversely, a highly active cell might have little effect on the final winner because other contributions dominate or offset it. Activation strength and causal necessity are different quantities.

The output bias also participates in the layer computation. The diagnostic compares the aggregate, which includes that term, with individual values. It should therefore be read as evidence about the complete additive result rather than as an exhaustive attribution solely among cells.

The proposed veto interpretation of feed-forward updates is similarly tentative. The authors suggest that an update may demote the residual’s leader and allow another candidate to emerge. The observed compromise choices are compatible with that account, but the paper does not establish it as the unique mechanism.

What came after

The citing literature spans direct feed-forward analysis, intermediate prediction readouts, knowledge storage, editing, and broader surveys. Citation alone does not reveal exactly how a later work used an earlier result. Where only a work’s title and its citation relationship identify the connection, the responsible conclusion concerns its research subject, instead of a specific experiment, result, or implementation.

This distinction matters because the paper offers several separable ideas. Later research might draw on the memory interpretation, the vocabulary projection, the distributed-composition finding, or simply the motivation to examine feed-forward computation. Those are related influences, but they are not interchangeable.

Feed-forward updates and intermediate predictions

Feed-Forward Layers Build Predictions is the most direct continuation in subject. Its title describes prediction construction through the promotion of vocabulary concepts. That takes up the central issue raised here: how value contributions become a distribution over possible continuations. The connection is stronger than a general interest in hidden representations because it concerns the same architectural component and its role in assembling predictions.

The Tuned Lens concerns eliciting intermediate predictions from transformers. It sits beside this paper’s effort to read residual and value vectors through a vocabulary projection. The earlier study makes the usefulness and the limitations of such a readout visible, especially its unresolved assumption about shared representation spaces. The title establishes the later work’s focus on latent predictions, but does not by itself specify which of those limitations it resolves.

Analyzing Transformers in Embedding Space addresses the representational setting in which the memory analysis operates. A Primer on Transformer Internals places internal computation within a broader explanatory treatment. Both are relevant to understanding how an architectural interpretation becomes part of a wider account, while their citation relationship alone does not identify a particular borrowed procedure.

Knowledge storage, retrieval, and editing

The Differentiable Search Index connects transformer memory with search indexing. This extends the surrounding research question from what parameters appear to contain towards how internal memory relates to information retrieval. It is a distinct subject from finding strongly activating training prefixes, and the citation relationship does not make the retrieval procedures equivalent.

Controllable Working Memory concerns memory that can be controlled. PMET concerns precise editing within a transformer. Transformer-Patcher frames correction around a connection between a mistake and a neuron. These titles identify intervention-oriented directions that are naturally adjacent to a memory interpretation. They do not establish that a readable key-value pair can always be edited independently or that this paper already supplied such an intervention.

Knowledge Storage and Extraction explicitly studies the relationship between stored information and its extraction. A Review of Language Models as Knowledge Bases places such questions within a wider review. Both relate to the distinction between information present in parameters and information expressed in an answer.

Calibrating Factual Knowledge concerns factual calibration. The Factuality Survey covers knowledge, retrieval, and domain specificity. Their subjects reinforce a boundary already visible here: a value’s preference for a continuation is not a guarantee that the continuation is factually correct.

Memorization Recall Through Idioms examines recall through idioms and multiword expressions. This connects naturally to the paper’s interest in recurring text patterns, while the later title points toward a more specific kind of expression than the broad trigger categories analyzed here.

Features, computations, and causal tests

Finding Skill Neurons and Finding Neurons in a Haystack concern the discovery of meaningful internal units or features. The latter identifies sparse probing as its approach. They belong to the broader problem of connecting internal components with interpretable behavior, a problem that this paper approaches through activation retrieval and paired values.

Function Vectors shifts attention toward vectors associated with functions. Emergent Linear Representations concerns linear structure in learned world representations. Their titles identify broader representational questions that should not be reduced to the claim that every useful feature is an individual feed-forward cell.

The Greater-Than Study examines a particular mathematical behavior. Linearity of Relation Decoding concerns how relations can be decoded. These are more targeted computational subjects than the architecture-wide mechanism examined here.

Activation Patching Practices explicitly addresses metrics and methods for interventions. It is relevant to the gap between observing an interpretable activation and establishing its causal effect. Retrieval Heads turns to attention heads and long-context factuality, keeping attention in view alongside parameter-based memory.

A Mechanistic Study of DPO and Toxicity brings internal analysis to alignment behavior. Its subject illustrates another setting in which understanding representations and updates matters, without establishing that the key-value account alone explains the behavior under study.

Broader surveys and neighboring problems

The Explainability Survey places the work within the broader study of explanations. The Large Language Model Survey and The Foundation Models Report have wider scopes. Their citation relationship indicates that feed-forward memory became relevant to broader discussions, while providing no basis for attributing a particular experimental extension to them.

The Hallucination Survey concerns unsupported or incorrect generation. The Alignment Survey addresses alignment more generally. These subjects are connected to the practical importance of understanding prediction mechanisms, but the original paper does not establish a hallucination remedy or an alignment method.

The Unified View of Parameter-Efficient Transfer concerns adaptation with limited parameter changes. Beyond the Imitation Game concerns capability measurement and extrapolation. The Multilingualism Study concerns multilingual behavior. Their subjects extend beyond the original empirical setting, making the paper’s untested generalization questions especially relevant.

Across these directions, the durable contribution is a set of precise questions about internal computation. Which inputs activate a learned component? What does its output contribution favor? How does that contribution behave when combined with others? And which aspects of the prediction are already present before the final stage? The paper gives those questions a concrete architectural basis, while its unresolved representation-space and generalization issues remain essential parts of the account.

Cite

Cite as Mor Geva, Roei Schuster, Jonathan Berant and Omer Levy. 2021. Transformer Feed-Forward Layers Are Key-Value Memories. Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2021.emnlp-main.446 · arXiv 2012.14913

@inproceedings{geva2021transformer,
  title = {{Transformer Feed-Forward Layers Are Key-Value Memories}},
  author = {Mor Geva, Roei Schuster, Jonathan Berant and Omer Levy},
  booktitle = {Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing},
  year = {2021},
  doi = {10.18653/v1/2021.emnlp-main.446},
  eprint = {2012.14913},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.18653/v1/2021.emnlp-main.446}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/geva-2021-transformer-feed-forward-layers-are/

References

27 references, from the paper's own bibliography.

  1. Alexei Baevski and Michael Auli. 2019. Adaptive input representations for neural language modeling (https://openreview.net/forum?id=ByxZX20qFQ). In International Conference on Learning Representations (ICLR). our card
  2. Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel M Ziegler, Jeffrey Wu, Clemens Winter, Christopher Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. 2020. Language models are few-shot learners. In Proceedings of Neural Information Processing Systems (NeurIPS). our card
  3. Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D. Manning. 2019. What does BERT look at? An analysis of BERT's attention. In BlackBoxNLP Workshop at ACL. OpenAlex ↗ · Scholar ↗
  4. Fahim Dalvi, Nadir Durrani, Hassan Sajjad, Yonatan Belinkov, Anthony Bau, and James Glass. 2019. What is one grain of sand in the desert? analyzing individual neurons in deep nlp models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pages 6309–6317. OpenAlex ↗ · Scholar ↗
  5. Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019. BERT: Pre-training of deep bidirectional transformers for language understanding (https://doi.org/10.18653/v1/N19-1423). In North American Association for Computational Linguistics (NAACL), pages 4171–4186, Minneapolis, Minnesota. our card
  6. Nadir Durrani, Hassan Sajjad, Fahim Dalvi, and Yonatan Belinkov. 2020. Analyzing individual neurons in pre-trained language models. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP). OpenAlex ↗ · Scholar ↗
  7. Dumitru Erhan, Yoshua Bengio, Aaron Courville, and Pascal Vincent. 2009. Visualizing higher-layer features of a deep network. University of Montreal, 1341(3):1. OpenAlex ↗ · Scholar ↗
  8. Xiaochuang Han, Byron C. Wallace, and Yulia Tsvetkov. 2020. Explaining black box predictions and unveiling data artifacts through influence functions (https://doi.org/10.18653/v1/2020.acl-main.492). In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 5553–5563, Online. Association for Computational Linguistics. our card
  9. Alon Jacovi, Oren Sar Shalom, and Yoav Goldberg. 2018. Understanding convolutional neural networks for text classification (https://doi.org/10.18653/v1/W18-5408). In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 56–65, Brussels, Belgium. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  10. Ganesh Jawahar, Benoît Sagot, and Djamé Seddah. 2019. What does BERT learn about the structure of language? (https://doi.org/10.18653/v1/P19-1356) In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 3651–3657, Florence, Italy. Association for Computational Linguistics. our card
  11. Nelson F. Liu, Matt Gardner, Yonatan Belinkov, Matthew E. Peters, and Noah A. Smith. 2019. Linguistic knowledge and transferability of contextual representations (https://doi.org/10.18653/v1/N19-1112). In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 1073–1094, Minneapolis, Minnesota. Association for Computational Linguistics. our card
  12. Stephen Merity, Caiming Xiong, James Bradbury, and Richard Socher. 2017. Pointer sentinel mixture models. International Conference on Learning Representations (ICLR). our card
  13. Jesse Mu and Jacob Andreas. 2020. Compositional explanations of neurons. In Proceedings of Neural Information Processing Systems (NeurIPS). OpenAlex ↗ · Scholar ↗
  14. Milad Nasr, Reza Shokri, and Amir Houmansadr. 2019. Comprehensive privacy analysis of deep learning: Passive and active white-box inference attacks against centralized and federated learning (https://doi.org/10.1109/SP.2019.00065). In 2019 IEEE Symposium on Security and Privacy (SP), pages 739–753. OpenAlex ↗ · Scholar ↗
  15. Matthew Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. 2018. Deep contextualized word representations (https://www.aclweb.org/anthology/N18-1202). In North American Chapter of the Association for Computational Linguistics (NAACL). our card
  16. Ofir Press, Noah A. Smith, and Omer Levy. 2020. Improving transformer models by reordering their sublayers (https://doi.org/10.18653/v1/2020.acl-main.270). In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 2996–3005, Online. Association for Computational Linguistics. OpenAlex ↗ · Scholar ↗
  17. Bhargav Pulugundla, Yang Gao, Brian King, Gokce Keskin, Harish Mallidi, Minhua Wu, Jasha Droppo, and Roland Maas. 2021. Attention-based neural beamforming layers for multi-channel speech recognition. arXiv preprint arXiv:2105.05920. OpenAlex ↗ · Scholar ↗
  18. Nils Rethmeier, Vageesh Kumar Saxena, and Isabelle Augenstein. 2020. Tx-ray: Quantifying and explaining model-knowledge transfer in (un-) supervised nlp. In Conference on Uncertainty in Artificial Intelligence, pages 440–449. PMLR. OpenAlex ↗ · Scholar ↗
  19. S. Sukhbaatar, J. Weston, and R. Fergus. 2015. End-to-end memory networks. In Advances in Neural Information Processing Systems (NIPS). OpenAlex ↗ · Scholar ↗
  20. Sainbayar Sukhbaatar, Edouard Grave, Guillaume Lample, Herve Jegou, and Armand Joulin. 2019. Augmenting self-attention with persistent memory. arXiv preprint arXiv:1907.01470. OpenAlex ↗ · Scholar ↗
  21. Ian Tenney, Dipanjan Das, and Ellie Pavlick. 2019. BERT rediscovers the classical NLP pipeline (https://doi.org/10.18653/v1/P19-1452). In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 4593–4601, Florence, Italy. Association for Computational Linguistics. our card
  22. Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. 2017. Attention is all you need. In Advances in Neural Information Processing Systems (NIPS), pages 5998–6008. our card
  23. Jesse Vig and Yonatan Belinkov. 2019. Analyzing the structure of attention in a transformer language model (https://doi.org/10.18653/v1/W19-4808). In Proceedings of the 2019 ACL Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 63–76, Florence, Italy. Association for Computational Linguistics. our card
  24. Jesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian, Daniel Nevo, Yaron Singer, and Stuart Shieber. 2020. Investigating gender bias in language models using causal mediation analysis. Advances in Neural Information Processing Systems, 33. OpenAlex ↗ · Scholar ↗
  25. Elena Voita, David Talbot, Fedor Moiseev, Rico Sennrich, and Ivan Titov. 2019. Analyzing multi-head self-attention: Specialized heads do the heavy lifting, the rest can be pruned (https://www.aclweb.org/anthology/P19-1580). In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics. our card
  26. Sarah Wiegreffe and Yuval Pinter. 2019. Attention is not not explanation (https://doi.org/10.18653/v1/D19-1002). In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 11–20, Hong Kong, China. Association for Computational Linguistics. our card
  27. Hongfei Xu, Qiuhui Liu, Deyi Xiong, and Josef van Genabith. 2020. Transformer with depth-wise lstm. arXiv preprint arXiv:2007.06257. OpenAlex ↗ · Scholar ↗