Human–Machine Convergence

Feed-forward networks as conditional memory

Rajesh Ranjan Mahapatra

© 2026 Rajesh Ranjan Mahapatra. 27 min read

Feed-forward networks as conditional memoryAll Human–Machine Convergence
rajeshrmahapatra.com

Transformer anatomy

Feed-forward networks as conditional memory

Feed-forward sublayers deserve the name conditional memory only when a learned detector selectively fires, writes a feature into the residual stream and that write is causally used downstream.

TLDR

  1. An FFN is not a database; it computes an input-conditioned residual update.
  2. The key-value reading is useful because hidden units match directions and output vectors write consequences.
  3. Activation is not retrieval unless intervention shows that the write changes downstream computation.
  4. Gating, superposition, attention and later layers make factual use distributed and basis-dependent.
  5. Use the address-write-use assay before calling a neuron, layer or edit a memory.

The bell that remembers Lumen

Imagine a hall containing 4,096 tuned metal reeds. A chord enters the room. Most reeds remain still. A few resonate because the chord matches their shape. Each vibrating reed pulls a wire connected to a printing plate. The combined movement makes the word Lumen more likely to appear on the page.

Now disconnect the wires. The same reeds ring, perhaps even more clearly, but the page does not change. Reconnect the wires and move the printing plate with a hidden motor instead. The page again says Lumen, although the reeds did no causal work. Which version contains a memory?

The tempting answer is that any repeatable association between chord and word counts. The hidden assumption is that detection, storage and use are one event. They are not. A conditional memory requires an addressable condition, a content-bearing write and a downstream process that actually uses that write. Transformer feed-forward networks become intelligible once those three roles are separated.

A field of selective resonators
Selective resonator field An input wave crosses a field of differently tuned resonators. Three resonate strongly and pull output threads that combine into a residual write promoting the synthetic token Lumen. Context-rich residual state One vector arrives at one token position quiet addressed addressed quiet addressed Combined residual write raises the logit for “Lumen” Ringing alone is not retrieval The wire can be cut.
Illustrative. The memory claim becomes decision-useful only when selective response is connected to a content-bearing write and a downstream effect. Colour is reinforced by labels, shapes and line paths.

A memory that is also a computation

A transformer feed-forward network is easiest to misunderstand when it is imagined as a cupboard of sentences. It contains no row labelled “Aster’s archive city” and no stored string “Lumen”. It contains a learned function that changes a vector when the vector arrives in a suitable region of representation space.

The position-wise layer receives a contextual state

Self-attention mixes information across token positions. The feed-forward sublayer then acts independently at each position, but its input is no longer a bare token. It is a residual state carrying whatever the earlier computation has assembled there: token identity, grammatical role, entities, relations, prompt instructions and unresolved alternatives. The FFN therefore does not need to search the original sequence itself. It responds to a state already shaped by the sequence.

For a conventional two-matrix FFN, omit biases for one line and write:

a(x) = φ(Kx + bK) Δr = V a(x) + bV = Σi ai(x) vi r′ = r + Δr

Here x ∈ ℝd is the incoming state at one token position. The matrix K ∈ ℝm×d contains m detector directions. The non-linearity φ turns their matches into coefficients. The matrix V ∈ ℝd×m contains output directions vi. Their weighted sum becomes an additive write into the residual stream.

This algebra motivates the key-value interpretation developed by Geva and colleagues. A row of the first matrix behaves like an unnormalised key: it responds to a family of input patterns. A column of the second behaves like a value: when its coefficient is positive, that direction is added to the residual stream. Upper-layer values can often be read through the model’s output vocabulary as promoting interpretable concepts or tokens. The layer output is a composition of many such contributions, not one retrieved record.[2][3]

What training actually leaves behind

Imagine that two prompts reach the same token position. One asks for Aster’s archive city in a declarative sentence. The other asks for the city through a question, with different words and syntax. Their residual states will not be identical. Yet both may fall on the same side of a learned detector boundary and activate a similar write. What persists in the weights is therefore not a copy of either sentence. It is a shaped region of state space together with a disposition to transform states in that region.

Gradient-based training creates this disposition indirectly. The loss does not instruct a unit to become “the Lumen cell”. It changes many matrix entries because their combined activity would have raised the probability of the observed continuation. Across repeated examples, some directions become useful detectors, some output directions become useful updates, and many associations share parameters. The result can resemble content-addressable memory because partial or paraphrased cues converge on related activations. The resemblance is earned by generalisation across cues, not by the mere presence of weights.

This also explains why a stored association can be graded. A state near the centre of an addressed region may produce a strong write. A state near its boundary may produce a weak one. Two partially matching features may combine to cross a threshold. In a gated layer, one projection may say that the context is eligible while another supplies the content to express. The remembered object is not a sentence inside the matrix; it is a conditional transformation that training has made reproducible.

The practical implication is a testable invariance claim. If the proposed memory concerns the relation “Aster’s archive city is Lumen”, then semantically matched paraphrases should preserve enough of the address and write to affect the same downstream feature. Surface-matched distractors should not. When that contrast fails, the analyst may have found a lexical trigger, a benchmark shortcut or a local coordinate, not the proposed relation.

Mechanism

The FFN’s memory-like property is dispositional. Training changes parameters so that a later input condition produces a particular residual update. Persistence lies in the weights; retrieval lies in the input-conditioned computation.

Address, write and use are separate causal links
Causal chain of conditional memory A vertical causal path moves from contextual state to detector match, activation, residual write, downstream readout and output. Four intervention scissors show where activation, value, residual use or final output can be changed independently. Contextual state subject + relation + current alternatives Address Kx + bias selects coefficients Write Σ aᵢvᵢ adds a direction Use later layers preserve, transform or suppress Observed output token probability, decision or action ablate activation replace value patch or block use force same output
Practitioner synthesis. Each intervention answers a different question. Ablation tests necessity of activation; value replacement tests the content of the write; patching tests downstream use; final-output forcing exposes behavioural mimicry.

A two-dimensional example you can calculate mentally

Let the incoming state be x = (1.0, 0.4). The first detector has direction k₁ = (1, 0) and bias −0.6. The second has k₂ = (0, 1) and bias −0.5. With ReLU, the activations are a₁ = 0.4 and a₂ = 0. Only the first detector is addressed.

Give it output direction v₁ = (0.2, 0.8). The layer writes Δr = 0.4v₁ = (0.08, 0.32). Suppose the final readout for Lumen is aligned mostly with the second coordinate. The write raises that logit by about 0.32. This is the smallest useful memory-like event: one region of input space activates a stored output disposition.

One detector fires, one value writes
Annotated numerical FFN example A coordinate plane shows the input vector, two detector directions and their thresholds. A side panel computes activations and the output write, showing that only detector one contributes. x₁ x₂ x = (1.0, 0.4) k₁ = (1, 0) k₂ = (0, 1) k₁ threshold k₂ threshold Address a₁ = ReLU(1.0 − 0.6) = 0.4 a₂ = ReLU(0.4 − 0.5) = 0 Write v₁ = (0.2, 0.8) Δr = 0.4v₁ = (0.08, 0.32) Use Lumen logit receives +0.32
Illustrative. The calculation depends on ReLU and on a readout aligned with the second coordinate. Change the activation, threshold or downstream readout and the same parameter vectors no longer have the same memory interpretation.
Thought experiment 1: replacement

Replace the FFN with a literal lookup table

Record the FFN’s output for one million observed residual states. Replace the layer with a table that returns the nearest recorded output. On the recorded distribution, behaviour may remain unchanged. Has the memory become more literal?

For exact repeats, both systems implement an input-to-output association. Yet the learned FFN can interpolate through geometry, compose several active directions and respond to a state never seen verbatim. The table relies on an external distance rule and stored exemplars. Functional equivalence on a finite test set does not establish the same memory mechanism. The difference becomes visible on counterfactual states between known points, under basis changes, or when several features must combine.

Boundary condition

The key-value description assumes that individual activation coefficients and output directions are meaningful units. That assumption is most defensible in simple ReLU or GELU layers. It weakens in gated architectures, under superposition and when later layers reverse the apparent write.

The argument in one pass
Chart · flow
flowchart TD
  A["The bell that remembers Lumen"] --> B["A memory that is also a<br/>computation"]
  B --> C["Retrieval is a three-step<br/>causal event"]
  C --> D["Editing the conditional store"]
  D -. "re-test" .-> A
  classDef first fill:#0a1424,stroke:#D95545,stroke-width:2px,color:#e6f3ff
  classDef step fill:#0a1424,stroke:#3f7da0,stroke-width:1px,color:#e6f3ff
  class A first
  class B,C,D step
A structural route through Feed-forward networks as conditional memory: from The bell that remembers Lumen to Require the causal chain before calling…. Reading use: follow the relation, then return to the surrounding argument for evidence and limits.

Retrieval is a three-step causal event

Top-activating examples can reveal what a unit correlates with. Vocabulary projections can reveal what its output direction could promote. Neither result shows that the unit retrieves a memory for the task at hand. The missing link is causal use.

The address-write-use assay

The paper’s practical contribution is a three-gate assay. It does not produce a universal memory score. It establishes the strongest claim permitted by a defined intervention family.

Address asks whether a parameterised condition responds selectively to the candidate context. Does the activation rise for paraphrases that preserve the relation? Does it remain low for matched distractors that share the subject, relation or surface form but not the full condition? Selectivity matters because a frequently active unit may be generic syntax, punctuation or scale control rather than a memory address.

Write asks what the activated component adds. Project its output into interpretable directions, but do not stop there. Replace, negate or remove the value contribution while preserving upstream activation. A content-bearing write should change a predicted feature in the expected direction. In a gated model, this unit may be a feature or a small circuit rather than one neuron.

Use asks whether downstream computation depends on that write. Restore it into a corrupted run, block its path, or patch an alternative value and observe later states. The target effect should travel through a traceable route. If the final answer is unchanged because attention reconstructs the fact elsewhere, the FFN contribution may be redundant. If the answer changes only when the final logits are directly forced, the apparent memory lies outside the candidate mechanism.

Decision rule

Call an FFN component a task-relevant conditional memory only after address, write and use all pass for a declared candidate boundary, prompt family and intervention. A pass does not prove that the component is the unique storage site.

Four grades of the memory claim

The word memory becomes safer when it names a graded evidential claim rather than a binary property. At the first grade, an activation is correlated with a context. Top examples cluster around archive questions, country-capital relations or a grammatical construction. This is useful discovery evidence, but it permits only “pattern detector candidate”. A classifier trained on the same activations would not by itself strengthen the mechanism claim because decodability may reflect information that the model never uses.

At the second grade, the component has a content-bearing output. Its value direction promotes a stable feature across matched contexts, and replacing that direction changes an intermediate representation as predicted. This permits “memory-like parameterisation”. It still does not show that later computation reads the contribution. A write can be cancelled, normalised away or ignored.

At the third grade, intervention establishes causal retrieval. Ablating the address removes the write, patching the write restores a downstream state, and a matched alternative write changes the result through the same route. This supports a task-relative conditional-memory claim. The qualification matters. The evidence applies to the declared prompt family, layer range, model version and intervention, not to every use of the fact.

At the fourth grade, a parameter edit changes the scoped association while preserving unrelated behaviour, the route remains traceable, and the change survives paraphrase and compositional tests. This supports a scoped conditional-memory edit. Even here, uniqueness is not guaranteed. Redundant routes may still contain the old association, and a later intervention may recover it. Each failed gate narrows the permitted claim instead of turning the whole investigation into failure. A negative use test can reveal a dormant write; a negative locality test can reveal an over-broad feature; a negative recovery test can reveal irreversible representational damage.

Why a logit contribution is not a final decision

Residual computation is additive and revisable. An FFN can raise the Lumen logit at layer six. A later attention head can retrieve contradictory context. Another FFN can suppress the same direction. Layer normalisation can alter scale, and the final unembedding can favour a rival. A memory-like write is therefore a local causal contribution, not a promise about the output.

A retrieved feature can be promoted, contested and recovered
Illustrative residual trajectory across layers A line chart tracks the illustrative Lumen logit contribution across twelve layers. It rises after a feed-forward write, falls after contradictory attention and rises again after a later supporting write. −1 0 1 2 3 logit contribution 024681012 layer FFN write promotes Lumen attention imports conflict later circuit restores support
Illustrative trajectory. The curve is explanatory, not measured data. Its decision point is that a local FFN effect can be necessary, redundant or later cancelled. Read the whole causal route.

A configured-system protocol

Consider a synthetic twelve-layer decoder called Orison-12. It has a 768-dimensional residual stream and 3,072 FFN channels per layer. During training it encounters the fictional association “The archive city of Aster is Lumen.” The research question is not whether Orison-12 can complete that sentence. The question is whether a particular middle-layer FFN circuit constitutes conditional memory for the association.

Begin with a prompt family, not one sentence. Include “Aster’s archive city is”, “Records from Aster are held in”, and grammatical variants. Construct matched controls: another entity with the same relation, the same entity with another relation, a sentence containing Lumen in an irrelevant role, and an instruction that explicitly supplies a conflicting answer. This makes the address test relational rather than lexical.

Next corrupt the subject representation while keeping the rest of the prompt fixed. Restore candidate activations one layer and position at a time. A recovery around the final subject token in a middle FFN identifies a route worth testing, but not a storage site. Ablate the candidate’s activation and then its output write separately. If activation remains but the value contribution is removed, the target should fall only if the write carries relevant content. Patch the clean write into the corrupted run. If the target returns, downstream computation is using it.

Finally, change the write from a Lumen-aligned direction to a Nadir-aligned direction. Test paraphrases, unrelated associations and prompts where context explicitly overrides the parametric association. The complete unit of evidence is a family of counterfactual runs, not a colourful activation plot.

The candidate memory sits inside a larger system boundary
Nested boundary view of a configured transformer system Nested boundaries show external retrieval and prompt context outside model weights, the transformer stack inside the model, a candidate FFN circuit within layer six and the residual route to output. A competing attention path can reconstruct or override the same fact. Configured inference system Prompt and retrieved context runtime information can state “Aster → Nadir” not stored in FFN weights Orison-12 model boundary Layers 1–5 Layer 6 Candidate FFN circuit address + write Attention route competing context Layers 7–12 Output Lumen/Nadir Moving a fact into prompt context changes the memory locus without changing the visible answer.
System-boundary view. “The model knows” can refer to parametric disposition, supplied context or a joint inference system. The address-write-use assay must declare which boundary is under test.
Thought experiment 2: move the boundary

Put the fact in the prompt, then remove it from the weights

Orison-12 initially completes “Aster’s archive city is” with Lumen from its parameters. Now erase that disposition and add a retrieved document saying the same thing. The final completion remains Lumen. From the user’s viewpoint, the system still remembers. From the FFN viewpoint, no parametric retrieval occurred.

Change one variable again. Supply a document saying Nadir. If attention carries the document into the answer while the FFN still promotes Lumen, the configured system contains two competing sources of conditional information. Calling both “memory” without typing them hides authority, freshness and provenance. Parametric memory, permitted context and world state are different resources even when they converge on one token.

Evidence status

Published work supports pattern-correlated FFN activations, vocabulary-relevant output directions and causal roles for middle-layer FFNs in some factual prompts.[2][3][4][5] The address-write-use assay is practitioner synthesis. It is designed to prevent those findings from becoming the stronger claim that facts occupy unique, context-free memory cells.

Editing the conditional store

Editing is a powerful intervention because it changes parameters rather than merely observing them. It is also easy to over-interpret. A successful edit can create a new route, suppress an old route or exploit a downstream bottleneck without revealing where the original association was stored.

What a causal edit can establish

Rank-One Model Editing, or ROME, uses causal tracing to identify middle-layer feed-forward computations associated with factual recall and then applies a rank-one update to an FFN weight matrix. In its evaluated settings, the method changes selected factual associations while seeking generalisation to paraphrases and specificity on unrelated prompts.[5] MEMIT extends the strategy to many edits distributed over a range of layers.[6]

These results matter because a targeted weight change can alter a model’s factual completion. Yet three distinct claims are often compressed into one sentence: the old fact was localised there, the new fact was written there, and the new behaviour uses the same mechanism as natural recall. Each needs separate evidence.

Hase and colleagues found that causal-tracing localisation did not predict which MLP layer was best to edit for overriding a fact. The weights that are decisive in the current computation need not be the easiest place to install an alternative computation.[7] More recent work on ROME and MEMIT argues that many edits share a common functional subspace and may suppress rather than overwrite old knowledge, with later attention playing an important role in maintaining the edited behaviour.[12] This does not make editing useless. It changes what success means.

New causal distinction

Storage localisation and control leverage are not the same property. A component may be necessary for natural recall but hard to edit cleanly. Another component may be an effective control point even though it did not encode the original association.

The causal-edit contract

An edit deserves a memory interpretation only when its scope is tested across five obligations. Efficacy asks whether the target changes. Generality asks whether semantically equivalent prompts change. Locality asks whether unrelated behaviour remains stable. Mechanism persistence asks whether the edited route remains necessary across contexts rather than being bypassed. Recovery asks whether the edit can be reversed and whether the original association remains latent.

A single successful completion satisfies only efficacy. High efficacy with weak generality may be prompt-specific steering. High efficacy and generality with poor locality may be broad representational damage. Strong behavioural scores with a recoverable old fact may indicate suppression. The correct engineering response differs in each case.

Worked failure: the benchmark passes while the memory claim fails

Illustrative edge case

Suppose an editor changes Orison-12 so that twenty paraphrases of the Aster question now return Nadir. Nineteen hundred and ninety-nine of two thousand unrelated prompts remain unchanged. By behavioural measures, efficacy, generality and locality look excellent.

Now inspect the edited write. Its strongest effect is not a positive Nadir direction. It subtracts the old Lumen direction. Nadir was already the runner-up token, so suppressing Lumen lets Nadir win. Patch the original Lumen write back after the edited layer and the model again returns Lumen. Add a new downstream readout that ignores the Lumen axis and the edit loses its effect. The intervention found a clean control lever, but it did not install a positive representation of “Aster’s archive city is Nadir”.

Change one variable. Replace the anti-Lumen write with a positive Nadir write of equal effect on the original prompt. Both edits produce the same answer. Under a prompt where Lumen and Nadir are not direct competitors, however, only the positive write transfers. Under a prompt that asks whether Aster’s city is not Lumen, the suppressive edit may look disproportionately successful. Behavioural equivalence on one benchmark concealed two different mechanisms.

The correct report is therefore not “the fact was overwritten”. It is “a scoped parameter intervention suppressed the old completion and caused the selected alternative to win”. That statement is less dramatic and more useful. It predicts recovery conditions, adversarial prompts and interactions with later decoding. It also tells an engineer what to test before treating the edit as durable knowledge maintenance.

A value edit changes the write, not necessarily the whole memory
Before and after view of a synthetic FFN value edit Two panels show the same Aster archive detector activation. Before editing its output vector points towards Lumen. After editing it points towards Nadir. A dotted hidden path shows that an old association may remain recoverable elsewhere. Before edit After edit Aster + archive activation = 0.8 value → Lumen L P(Lumen) = 0.731 synthetic baseline Aster + archive activation = 0.8 value → Nadir N possible latent old route P(Nadir) = 0.731 same address, replaced write edit
Synthetic worked example. The included lab produces the probabilities shown. Preserving the address while replacing the write demonstrates controllability, but not unique storage or erasure of every alternative route.

Executable lab: a four-memory FFN

The lab below implements a tiny residual system with four semantic input coordinates and four token-logit coordinates. Three hidden units detect conjunctions such as Aster + archive. Their values promote Lumen, Nadir or Ember. A fourth unit adds a generic archive contribution. The data and names are synthetic.

Run the baseline, ablate the candidate unit, replace its value, then force the same output after the model. The first three operations intervene at different links in Figure 2. The fourth creates behavioural equivalence without changing the candidate memory. That contrast is the point of the artefact.

Conditional-memory causal lab

Select a prompt and intervention. The browser executes the same deterministic model as the Python listing.

Hidden activations
Output probabilities
The synthetic assay separates efficacy, generality and locality
Bar chart of synthetic causal edit results Four labelled bars show 73.1 percent target edit efficacy, 64.9 percent paraphrase generality, zero total variation change on unrelated prompts and a 49.2 percentage-point target drop under ablation. 0%20%40%60%80%100% 73.1%64.9%0.0%49.2 pp Edit efficacyP(Nadir), target GeneralityP(Nadir), paraphrase Locality costmean TV, unrelated Causal necessityP(Lumen) drop
Synthetic, generated by the included lab. The four quantities answer different questions. Zero locality cost here follows from deliberately orthogonal toy keys; real models should not be expected to achieve it.
Python · NumPy
import numpy as np

TOKENS = ["Lumen", "Nadir", "Ember", "Other"]

# Residual coordinates 0:4 carry semantic features.
# Coordinates 4:8 are read directly as four output logits.
K = np.zeros((4, 8))
K[0, :4] = [1, 0, 1, 0]  # Aster + archive
K[1, :4] = [0, 1, 1, 0]  # Boreal + archive
K[2, :4] = [1, 0, 0, 1]  # Aster + river
K[3, :4] = [0, 0, 1, 0]  # generic archive
BIAS = np.array([-1.2, -1.2, -1.2, -0.7])

V = np.zeros((8, 4))
V[4:, 0] = [2.7, 0.0, 0.0, 0.0]  # write Lumen
V[4:, 1] = [0.0, 2.7, 0.0, 0.0]  # write Nadir
V[4:, 2] = [0.0, 0.0, 2.7, 0.0]  # write Ember
V[4:, 3] = [0.0, 0.0, 0.0, 0.6]  # generic archive

PROMPTS = {
    "target":      np.array([1, 0, 1, 0, .05, .05, .05, .05]),
    "paraphrase":  np.array([.95, .05, .90, .10, .05, .05, .05, .05]),
    "unrelated_1": np.array([0, 1, 1, 0, .05, .05, .05, .05]),
    "unrelated_2": np.array([1, 0, 0, 1, .05, .05, .05, .05]),
}

def softmax(z):
    z = np.asarray(z, dtype=float)
    e = np.exp(z - z.max())
    return e / e.sum()

def forward(x, values=V, ablate=None, final_bias=None):
    activation = np.maximum(K @ x + BIAS, 0.0)
    if ablate is not None:
        activation[ablate] = 0.0
    residual = x + values @ activation
    logits = residual[4:].copy()
    if final_bias is not None:
        logits += np.asarray(final_bias)
    return activation, softmax(logits)

def show(label, result):
    activation, probability = result
    print(label)
    print("  activation:", np.round(activation, 3))
    print("  probability:", {token: round(float(prob), 3) for token, prob in zip(TOKENS, probability)})

# 1. Natural retrieval.
show("baseline", forward(PROMPTS["target"]))

# 2. Necessity of the candidate activation.
show("ablate candidate", forward(PROMPTS["target"], ablate=0))

# 3. Replace only the candidate value: same address, new write.
V_EDIT = V.copy()
V_EDIT[4:, 0] = [0.0, 2.7, 0.0, 0.0]
show("edited target", forward(PROMPTS["target"], values=V_EDIT))
show("edited paraphrase", forward(PROMPTS["paraphrase"], values=V_EDIT))

# 4. Same visible output through a different mechanism.
# The original value still writes Lumen. A post-model bias swaps final logits.
show("externally forced", forward(
    PROMPTS["target"], final_bias=[-2.16, 2.16, 0.0, 0.0]
))

# 5. Locality check for unrelated prompts.
def total_variation(p, q):
    return 0.5 * np.abs(p - q).sum()

for name in ["unrelated_1", "unrelated_2"]:
    _, before = forward(PROMPTS[name])
    _, after = forward(PROMPTS[name], values=V_EDIT)
    print(name, "TV distance:", round(total_variation(before, after), 4))

What a positive result permits: in this synthetic model, the first hidden unit is a task-relevant conditional memory for the target association within the declared prompt family. It is selectively addressed, its value write is necessary, replacing that write changes target and paraphrase outputs, and unrelated prompts remain invariant.

What a negative result means: failure at address suggests lexical or generic activation; failure at write suggests the unit does not carry the proposed content; failure at use suggests redundancy or a non-causal correlate; failure at locality suggests the edit touches shared features. None of those failures proves that the model lacks the association. They reject the proposed localisation or intervention.

What the lab cannot establish: it does not model superposition, layer normalisation, attention-mediated reconstruction, gated FFNs, multiple token positions or training dynamics. Its job is to make the logic of the causal claim inspectable.

Thought experiment 3: same output, different cause

Force Nadir after the model

Leave the original FFN untouched so that it still writes the Lumen direction. Add a final logit bias that subtracts exactly the same amount from Lumen and adds it to Nadir. The resulting probability vector can match the edited model exactly.

A behavioural test sees no difference. An internal trace sees opposite stories. One system retrieved a new conditional write; the other retrieved the old write and had its output overridden. Matching answers are evidence about function, not automatically about memory mechanism. This is why model editing must be evaluated with internal and behavioural counterfactuals together.

How the claim changes under pressure
Chart · state
stateDiagram-v2
  [*] --> Claim
  state "The position-wise layer<br/>receives a contextual state" as Claim
  state "What training actually leaves<br/>behind" as Test
  state "A two-dimensional example you<br/>can calculate mentally" as Revision
  Claim --> Test: expose mechanism
  Test --> Decision: evidence survives
  Test --> Revision: rival survives
  Revision --> Claim: narrow or rebuild
  Decision --> [*]
The revision loop begins with The position-wise layer receives a… and keeps counterexamples inside the reasoning path. Reading use: follow the relation, then return to the surrounding argument for evidence and limits.

Where the metaphor breaks

The key-value view is a productive coordinate system, not a discovery that transformers contain a literal database. It breaks in predictable places. Those breaks tell us how to improve the experiment.

Gated FFNs do not have one simple key per value

Many current decoder architectures use a gated variant such as SwiGLU. A simplified form is:

g(x) = SiLU(Wgatex) c(x) = Wupx Δr = Wdown[g(x) ⊙ c(x)]

The coefficient of an output column now depends on a multiplicative interaction between a gate projection and a content projection. Holding the gate fixed while changing the up projection changes the write. Holding the up projection fixed while changing the gate changes whether it is expressed. The useful unit of analysis may therefore be an input-output interaction, not a detector considered alone. Research on gated neurons has begun to classify components by whether their input and output directions enrich or deplete a representation, reinforcing the need to analyse both sides together.[8][11]

In a gated FFN, retrieval is an interaction
Gated FFN interaction diagram The input splits into a gate projection and content projection. Their element-wise product passes through a down projection to the residual stream. Three counterfactual columns show open gate with no content, content with closed gate and aligned gate-content producing a write. input x residual state gate projection SiLU(Wgate x) content projection Wup x ⊙ interaction down projection writes Δr into residual stream open gate, no content no useful write content, closed gate suppressed write gate + content align conditional write
Architecture view. A single “key fires” story is incomplete for gated FFNs. The assay must intervene on gate, content and output interaction, or use a feature basis that captures their product.

Neurons are coordinates, not guaranteed concepts

A model can represent more sparse features than it has dimensions by placing them in superposition. One neuron may respond to several unrelated features, while one feature may be distributed across many neurons. Rotate the hidden basis and the function can remain unchanged even though every individual neuron’s interpretation changes. Work on superposition and sparse dictionary learning makes this failure mode concrete.[9][10]

This creates a measurement trap. Suppose a feature is represented by one nearly monosemantic neuron in a small model, then distributed over sixteen directions in a larger model. A neuron-count metric reports that the memory disappeared with scale. A circuit-level intervention may show the same causal function, now represented more efficiently. An apparent discontinuity in “knowledge neurons” can belong to the basis or measurement, not to the model’s capability.

The same feature can survive while its neuron identity dissolves
Superposition constellation and basis rotation The left panel shows three named features aligned with three neuron axes. The right panel shows the same feature relations after rotation, spread across all axes. A lower causal probe recovers the Lumen feature in both representations. Neuron-aligned basis Rotated, superposed basis Lumen archive river causal probe recovers Lumen same feature-level effect basis rotation
Conceptual figure. The decision-relevant invariant is the causal feature or circuit, not the index of one hidden neuron. A feature-level method should recover comparable effects before and after harmless basis transformations.
Thought experiment 4: scale and rotate

Split one memory across twenty channels

Start with a small network in which one channel cleanly detects Aster + archive and writes Lumen. Expand the hidden layer and retrain under a regulariser that encourages distributed features. The same input-output function now requires coordinated activation across twenty channels. Then apply an invertible rotation inside an active linear region.

No observable capability need change. No single neuron retains the old meaning. If the memory claim depended on finding one privileged neuron, it fails under a function-preserving reparameterisation. If it depended on an addressable feature-level subspace whose intervention still changes the target, it survives. This is a direct test of whether the explanation tracks mechanism or merely a convenient coordinate.

The strongest alternative: FFNs are generic non-linear feature transforms

The memory metaphor has a serious rival. A sufficiently wide non-linear layer provides a learned basis for conditional computation. Calling its hidden directions “keys” and “values” may redescribe ordinary feature detection and transformation without adding explanatory content. Any input-dependent function can be made to look like association if the analyst chooses a favourable decomposition after training.

The rival explanation is strengthened when units activate broadly, output projections have no stable interpretation, causal effects shift under paraphrase, and later computation reconstructs the same answer after ablation. It is weakened when a condition generalises across surface forms, its write has stable feature content, targeted replacement changes downstream states through a reproducible path, and matched distractors remain unaffected. The address-write-use assay exists to force this comparison.

Open research hypothesis

A useful memory explanation should be stable at the level of a retrieval circuit equivalence class: different neuron bases may count as the same mechanism when they preserve the address condition, residual write and downstream causal effect. Evidence would strengthen this proposal if feature-level interventions transfer across harmless basis changes and independently trained models. It would weaken if equally predictive decompositions imply incompatible writes or if the recovered feature fails under counterfactual prompts. A rival explanation is generic local linearisation. The smallest useful implementation is the synthetic lab extended with a hidden-basis rotation and a sparse feature recovery step. Do not apply the idea to runtime episodes, external documents or authoritative world state, which require different persistence and provenance models.

Granularity: which object is doing the remembering?

The address-write-use assay is always relative to a candidate boundary. At the narrowest grain, one neuron may have a selective activation and an interpretable output vector. At a wider grain, a sparse feature may span several neurons. Wider still, an FFN and a later attention head may form the smallest circuit whose intervention reliably changes the answer. At the model boundary, the claim becomes easy to satisfy but weak: the whole model clearly contributes to its own output.

Choosing the smallest visible unit is not automatically more scientific. A neuron-level account can be unstable under a harmless change of basis. Choosing the whole model is not automatically safer. It can make the explanation vacuous because every internal route counts. The useful boundary is the smallest causally sufficient and intervention-stable mechanism: remove it and the target effect fails; restore it and the effect returns; re-express it under a function-preserving parameterisation and the same feature-level relation remains recoverable.

This rule changes experimental design. Begin with a candidate neuron if it offers a clear hypothesis, then widen the boundary when selectivity, write content or causal use disperses. Compare conclusions across grains rather than treating one level as privileged. Report which claim survives each widening step. A memory that exists only at one arbitrary coordinate should not be exported as a claim about the architecture. A circuit that remains identifiable through paraphrase, ablation, patching and basis change has a stronger right to the name.

What the FFN does not remember

A feed-forward sublayer has no runtime history of previous calls unless that history is encoded into its current input. It does not by itself maintain a conversation, a user preference, a transaction state or a fresh fact retrieved after training. Those may live in context, recurrent state, caches, external stores or an operational system. Calling all of them memory erases distinctions that matter for debugging and governance.

Nor does a parametric association carry its own timestamp, source, permission or confidence. A model may conditionally reproduce a fact without knowing whether it is current or authorised for the present purpose. Parametric memory is a learned disposition, not factual authority. Production systems must still bind claims to evidence, time and permitted context.

Consequence
The evidence conversation
Chart · sequence
sequenceDiagram
  participant Q as Question
  participant M as Mechanism
  participant E as Evidence
  participant D as Decision
  Q->>M: The bell that remembers Lumen
  M->>E: The position-wise layer receives a contextual state
  E-->>M: compare rival explanations
  E->>D: Require the causal chain before calling it memory
  D-->>Q: revise scope or act
Question, mechanism, evidence and decision exchange the burdens developed in Feed-forward networks as conditional memory. Reading use: follow the relation, then return to the surrounding argument for evidence and limits.

Require the causal chain before calling it memory

Stop asking only, “Where is the fact stored?” Ask, “Which parameterised condition writes what feature, through which path, for which prompts, and what breaks when it is changed?”

For interpretability, an activation atlas is a hypothesis generator. Promote it to a memory claim only after a write intervention and downstream-use test. For model editing, a changed answer is an efficacy result. Promote it to a controlled memory edit only after paraphrase generality, unrelated-prompt locality, mechanism persistence and recovery tests. For architecture, compare standard and gated FFNs at the level of interactions or features, not by assuming that every hidden channel is a key-value slot.

Memory-warrant matrix
Observation
Address
Write
Use
Permitted claim
Top-activating contexts look coherent
Supported
Unknown
Unknown
Pattern detector candidate
Output vector projects towards a concept
Possible
Potential content
Unknown
Memory-like parameterisation
Ablation or patch changes downstream state
Supported
Supported
Supported
Task-relevant conditional memory
One prompt changes after weight edit
Unclear
New control effect
Observed once
Successful intervention, not yet scoped memory edit
Paraphrases change, distractors remain stable, route persists
Supported
Supported
Supported
Scoped conditional-memory edit
Same answer produced by final logit bias
Not shown
Not shown
Bypassed
Behavioural mimic only
Decision instrument. The matrix is deliberately non-numeric. It prevents weak evidence in one column from being averaged into a confident memory verdict.

The practical decision is simple. Do not release an interpretation or an edit because a neuron fires, a vector looks semantic or a benchmark answer changes. Require the complete causal chain within a declared boundary. When one gate fails, narrow the claim and redesign the intervention. The result may still be useful, but it is not yet evidence that the FFN stored and retrieved the proposed memory.

Feed-forward networks are memory-like because training leaves durable conditional dispositions in their parameters. They are not database-like because the address is geometric, the content is a residual direction, the representation may be superposed and the retrieved contribution remains open to revision. That disciplined middle position changes both the science and the engineering: treat “memory” as a causal hypothesis to test, not a label to inherit from the algebra.

Glossary

Address
The input condition that controls whether a candidate feature or circuit becomes active.
Conditional memory
A persistent parameterised disposition that produces a content-bearing write when an appropriate state is presented.
Residual stream
The evolving vector representation to which transformer sublayers add their outputs.
Value write
The output direction added by an activated FFN component or feature.
Causal patching
Replacing an activation in one run with an activation from another to test whether it restores or changes an effect.
Locality
The extent to which an edit leaves behaviour outside its intended scope unchanged.
Superposition
Representation of more sparse features than available dimensions by sharing and combining directions.
Control leverage
The ease with which changing a component alters behaviour, which need not identify the original storage location.

References

  1. Vaswani, A. et al. (2017). Attention Is All You Need. Advances in Neural Information Processing Systems 30.
  2. Geva, M., Schuster, R., Berant, J. and Levy, O. (2021). Transformer Feed-Forward Layers Are Key-Value Memories. EMNLP, 5484–5495.
  3. Geva, M., Caciularu, A., Wang, K. R. and Goldberg, Y. (2022). Transformer Feed-Forward Layers Build Predictions by Promoting Concepts in the Vocabulary Space. EMNLP, 30–45.
  4. Dai, D. et al. (2022). Knowledge Neurons in Pretrained Transformers. ACL, 8493–8502.
  5. Meng, K., Bau, D., Andonian, A. and Belinkov, Y. (2022). Locating and Editing Factual Associations in GPT. Advances in Neural Information Processing Systems 35.
  6. Meng, K., Sharma, A. S., Andonian, A., Belinkov, Y. and Bau, D. (2023). Mass-Editing Memory in a Transformer. International Conference on Learning Representations.
  7. Hase, P., Bansal, M., Kim, B. and Ghandeharioun, A. (2023). Does Localization Inform Editing? Surprising Differences in Causality-Based Localization vs. Knowledge Editing in Language Models. NeurIPS spotlight.
  8. Shazeer, N. (2020). GLU Variants Improve Transformer.
  9. Elhage, N. et al. (2022). Toy Models of Superposition. Transformer Circuits Thread.
  10. Bricken, T. et al. (2023). Towards Monosemanticity: Decomposing Language Models With Dictionary Learning.
  11. Gerstner, S. and Schütze, H. (2025). Understanding Gated Neurons in Transformers from Their Input-Output Functionality.
  12. Holmov, A., Youssef, P., Schoots, N. and Seifert, C. (2026). One Mask to Rule Them All: On Hidden Facts after Editing and How to Find Them. Findings of ACL, 11163–11181.
  13. Li, Z. et al. (2022). The Lazy Neuron Phenomenon: On Emergence of Activation Sparsity in Transformers.
Optional technical depth: why the vocabulary projection is only a lens

Let U be the unembedding matrix and u_t the row associated with token t. An FFN contribution changes its logit by Δℓ_t = u_tᵀΔr = Σ_i a_i(x)u_tᵀv_i. This is useful because it decomposes a local write into token-facing effects. It is not a complete semantics for the value vector. The residual direction can influence later attention queries, keys, values, gates and normalisation before the final unembedding. A direction that does not immediately promote a token may still causally prepare a later computation.

Optional technical depth: a minimum test manifest
FieldRequired recordFailure interpretation
Candidate boundaryModel, layer, token position, feature basis and downstream endpointThe word “memory” is underspecified.
Prompt familyParaphrases, subject controls, relation controls and conflicting contextSelectivity may be lexical or dataset-specific.
Address interventionAblation, clamping or counterfactual activationActivation correlation lacks causal support.
Write interventionNegate, replace or patch output contributionContent attribution is unsupported.
Use traceDownstream state and output changes across layersThe component may be redundant or bypassed.
Edit scopeEfficacy, generality, locality, persistence and recoveryA changed answer may be superficial control.
Rival generatorAttention retrieval, prompt copying, logit bias or alternative feature routeThe observation does not discriminate mechanisms.