When you ask a large language model "Which continent is Kenya located in?", it produces "Africa" almost instantly. But what happens inside the model between the moment it reads "Kenya" and the moment it writes "Africa"? The forward pass runs through dozens of layers, each a full transformer decoder block. Does the model decide early on which fact to look up, or does that decision form late? Does the answer depend on a "routing" signal that points the right layers at the right stored knowledge, or on the knowledge content itself once it has been retrieved? These questions are fundamental to understanding how LLMs actually work internally, and this paper tackles them with controlled layerwise interventions across three open-weight models.
The Problem: Separating What From Where
Prior work has established two important things about knowledge in language models. First, factual knowledge appears to be stored in feed-forward layers, which can be treated as associative memories (Geva et al., 2021; Meng et al., 2022). Second, the retrieval process involves identifiable internal computation that connects a query to the knowledge ultimately used for an answer (Geva et al., 2023). But these two lines of research provide separate views. Knowing where knowledge lives and knowing how it is accessed are not the same as explaining how stored knowledge becomes an answer across a stack of transformer layers.
The core difficulty is that a hidden state at any given layer can contribute to the final answer in two different ways. It might carry the actual knowledge that will be used to produce the answer (the model has already retrieved the fact and is processing it). Or it might contain a signal that tells subsequent layers where to look for that knowledge (the model is still routing toward the fact). The distinction matters: if the answer depends on routing early on and on content later, the model's computational story changes qualitatively across depth. Prior causal analyses of internal knowledge use have not cleanly separated these two roles.
How the Routing-Content Decomposition Works
The authors begin with a simple task: ask a model which continent a country belongs to. Change the country, and the required fact changes (Kenya needs Africa, China needs Asia). By comparing the hidden states produced by two different country queries, they can identify the direction in hidden space that corresponds to the request difference. But that raw difference conflates the "which country" signal (routing) with the "which continent" knowledge (content). Separating them requires two steps.
First, the authors fit a two-dimensional content space at each layer using a small set of countries with known continents. This space captures how much the hidden state already represents the actual continent answer. The continent-projected component is the content. Removing it from the raw country-pair difference leaves a residual that no longer carries the fitted knowledge signal.
Second, they calibrate a separate "object selection" direction from a task where both answers are explicitly supplied in the prompt (e.g., "Kenya has marker dax, China has marker fep"). This direction captures what it means to choose between two given records, as opposed to retrieving a stored fact. Removing this direction from the residual further isolates the parameter-retrieval routing candidate: the part of the hidden state difference that tells the model which stored fact to access, without itself being the fact.
What remains is a unit vector at each layer that can be tested by intervention. The authors use two operations. Deletion moves the hidden state's coordinate along this direction to the midpoint between the two paired countries, effectively erasing the request signal. Reversal flips the coordinate to the opposite side, making the model think it was asked about the other country. Both operations are compared against matched random changes of the same length, so any effect above the random baseline is attributable to the specific direction rather than to generic disruption of the hidden state.
Early Readability, Late Dependence
The first major finding is that readability and causal effect have different depth profiles. Using Qwen-2.5-3B-Instruct (36 decoder blocks), the authors test 24 held-out country pairs across two question wordings not used during fitting. The pair-conditioned routing direction correctly identifies which country is being queried on every single question, at every single layer. This is true from layer 1 onward. The direction is perfectly readable across wordings throughout the entire network.
But deleting or reversing this direction does not affect the answer until much later. The answer effect, defined as the correct-vs-paired margin loss minus the largest loss among eight length-matched random controls, rises above zero only in layers 28 through 36, peaking at layer 32. At that layer, deletion reduces the answer margin by 2.418 units (95% bootstrap CI: 1.721 to 2.976), while reversal reduces it by 7.200 units (CI: 5.422 to 8.634). Reversal also changes the fitted continent knowledge score at the final layer (effect 6270.843, CI: 3408.236 to 8771.132), while deletion does not (effect 1102.517, CI: -62.431 to 2133.854, crossing zero).
This means the model knows which country is being asked about from the very first layer, but that information does not causally influence the answer until near the end of the network. The routing signal is present early and readable early, but its causal steering window is narrow and concentrated late.
The Timing Window: Route Strength Precedes Its Effect on Knowledge
A deeper question is whether the routing signal strengthens before it starts affecting later knowledge, or only after the fact has already been formed. The authors measure the state-relative natural route strength, which normalizes the routing coefficient by the root-mean-square length of the full hidden state. This removes the trivial explanation that the coefficient grows simply because the whole state grows.
In the frozen Qwen validation states, the state-relative route strength has an early reference mean of 0.009 across layers 1-12. It begins a sustained increase at layer 21 (mean 0.01412), climbs to 0.04963 at layer 27, and reaches 0.10128 at layer 28. Meanwhile, the fraction of questions whose unmodified hidden state favors the correct continent rises from 69.8% at layer 21, to 75.0% at layer 24, to 82.3% at layer 26, to 96.9% at layer 28, reaching 100% only at layer 33.
The causal window for route deletion and reversal affecting the final-layer knowledge score opens at layers 28-31. This means route strength increases while answer-supporting content is still forming. The routing signal is building up, and the fact it is routing toward is not yet fully represented. The mechanism is overlapping rather than sequential: routing and content formation happen in the same window, not one after the other.
How Gemma and Llama Differ from Qwen
The three-model paired-country experiments reveal substantial architectural differences. All three models (Qwen-2.5-3B-Instruct with 36 layers, Llama-3.2-3B-Instruct with 28 layers, Gemma-3-4B-Instruct with 34 layers) show the routing-content handoff: dependence on the global request direction decreases from earlier to later layer sets, while dependence on fitted content persists. But the route-first schedule is not uniform across models.
Gemma shows a partially overlapping mid-layer routing-content profile. Its content deletion effects begin around layer 18, and global-route deletion passes the answer gate only at layer 24. There is a mid-layer region where routing effects overlap with content effects, similar to Qwen but shifted and compressed. Llama has no sustained routing-effect window under the same experimental gates. Its normalized global-request coordinate is already high in early layers and remains elevated through roughly layer 15 before declining. Content becomes stably consequential from layer 16 onward. Llama essentially skips the clean routing-first phase that Qwen exhibits.
The cross-model answer-margin effects tell a consistent story at the quantitative level. In the paired protocol, earlier routing effects are 0.515 for Qwen, 3.280 for Gemma, and 0.102 for Llama. Later routing effects are negative in all three models (-0.155, -0.148, -0.010), confirming the routing decline. Content effects are large and positive in all three (6.035, 13.270, 8.281). The routing decline and knowledge advantage contrasts are not ranked across models because the fitted directions and content spaces are model-specific.
The Routing-Content Handoff Is Representation-Specific
A critical detail distinguishes the handoff finding from a generic "routing stops mattering" conclusion. The authors run a matched Qwen comparison that contrasts two different ways of defining the request direction. The "global" direction is fitted across all country pairs simultaneously, capturing a general first-vs-second-country signal. The "pair-conditioned" direction is fitted separately for each country pair, capturing the specific request for that pair.
In the paired protocol, the global request direction's effect decreases from earlier to later layer sets, passing through zero. But the pair-conditioned direction retains a significant late effect (3.092, CI: 2.464 to 3.624). This means the operational handoff concerns a particular fitted direction, not all request information. The model still has request-related information in its late hidden states; it is the specific global fitted component that stops being causally important.
This distinction matters because late states remain separable along the global direction. The lower deletion effect does not mean request information has vanished from the hidden state. It means the answer is less sensitive to that particular fitted component at that point. The content, once formed, has taken over causal control.
Answer Formats: Nouns, Adjectives, and Codes
The paper tests whether the content formed during noun-format questions (continent names like "Africa") transfers to adjective-format questions ("African") and code-format questions (arbitrary mappings like "Africa = dax"). Each format uses its own fitted content space, so the comparison tests whether the knowledge itself is format-invariant even when its expression changes.
Transfer from noun to adjective passes in all three models, with answer-margin shifts of 15.72 (Qwen), 19.78 (Llama), and 46.09 (Gemma). The content formed while processing a noun question is sufficiently format-agnostic that intervening on it changes the answer to an adjective question. Transfer to code format mostly fails: only 1 out of 5 qualified Qwen maps passes, while Llama (0/4) and Gemma (0/2) fail entirely. The code format requires an arbitrary mapping that the model must construct during processing, and the noun-derived content does not carry enough information to influence it. The content is not fully abstract; it retains some format specificity.
Object Selection: A Harder Problem
The paper also investigates object selection, which is the function of choosing between two internally available candidate contents. This is different from routing toward stored knowledge. When a prompt names two countries and asks for the first country's continent, the model does not need to retrieve the association from parameters; both facts are in the input. The question is whether the model forms both facts and selects between them, or retrieves only the requested fact.
The strict two-continuation test asks: after changing which object is selected, can two different continuations from the same modified state still produce the two candidate answers? This test passes in a separate Qwen base-model capital task (source layer 26, receiving layers 27-29), where joint pass counts reach 25/40 and 34/44 in validation. But it fails in all instruction-tuned models. The instruction model checkpoints combine pretraining with later training, and the two-candidate restoration criterion does not hold for them. Object selection appears to be checkpoint-dependent and task-dependent in ways that the routing-content decomposition is not.
Limitations and What Remains Open
The evidence is strongest for country-continent associations, a narrow knowledge domain. While 24 held-out country pairs provide validation, the fitted directions and content spaces are estimated from small country sets. The experiments cover three instruction-tuned models, but the natural single-country intervention protocol is complete only for Qwen. Cross-model comparisons use the paired protocol, which cannot directly replicate the Qwen timing result for Llama and Gemma.
Every named route and content component is a fitted linear measurement at the final input position. The two-dimensional continent space is not exhaustive. The intervention changes direction and length together, so the common-protocol comparison cannot separate orientation from magnitude effects. The deletion-based later-knowledge effect remains inconclusive even with pooled 16 random controls. And the cross-language extension (English, Tamil, French) stopped before fitting because the candidate pool did not yield disjoint pairs with correct answers at the 52.3% accuracy level.
What This Means for Working with LLMs
The practical implications are concrete. If you are building interpretability tools or knowledge-editing methods, the paper tells you that the causal structure of knowledge retrieval changes across layers. Editing a routing direction in early layers will not have the same effect as editing it in late layers. Content that has already been formed is robust to routing disruption but sensitive to direct content intervention. The model transitions from being steerable by request signals to being steerable by the knowledge content itself, and this transition is layer-specific and model-specific.
For prompt engineering, the finding that readability precedes dependence suggests that the model "knows" what you are asking about almost immediately, but it takes many layers to actually use that knowledge. The routing signal is stable across wordings from the start, which explains why paraphrasing a question rarely changes the answer. For mechanistic interpretability, the separation of routing from content provides a cleaner vocabulary for describing what is happening inside the model at each layer. Not every direction in hidden space is doing the same job, and conflating routing with content leads to incorrect causal conclusions.
The cross-model differences also warn against overgeneralizing from a single architecture. Qwen has a clean route-first trajectory. Llama does not. Gemma is somewhere in between. Any claims about "how LLMs retrieve knowledge" that do not account for this variation are describing one model's behavior, not a universal mechanism.