Aberdeen Researchers Map How AI Hallucinations Drift Layer by Layer
A new interpretability method builds layer-by-layer concept graphs inside transformers, revealing hallucinations as representational drift toward correlated but wrong meanings.
ProTakeaways
- DST builds layer-wise concept graphs from the residual stream, combining logit-lens readouts with lightweight causal tracing edges.
- Contextual Alignment Score (CAS) predicts hallucinations with Pearson r=-0.863 and R²=0.746 on final-layer states.
- Beats causal tracing (0.59), SAEs (0.54), and Logit Lens (0.49) with 0.71 average faithfulness on Racing Thoughts.
- Reaches 0.79 average faithfulness on the Halogen benchmark with Gemma2-9B across five task domains.
- Proposes correlation-driven representational drift as the mechanism: prompts pull residual toward high-frequency co-occurring concepts.
- No public code release mentioned in the paper; evaluation limited to compact models and minimal-pair benchmarks.
Hallucinations remain the most stubborn failure mode of language models, and most existing interpretability tools only give a partial picture of why they happen. A team from the University of Aberdeen has proposed Distributional Semantics Tracing (DST), a diagnostic framework that produces a layer-by-layer map of the concepts a model is actually considering at the answer position, and shows that hallucinations follow a predictable trajectory of semantic drift across depth.
The core claim is unusually specific: hallucinations arise from correlation-driven representational drift across depth, where the residual stream is pulled toward a locally coherent but context-inconsistent concept neighborhood reinforced by training co-occurrences. In other words, the model does not ignore your prompt so much as get gravitationally captured by a cluster of concepts that co-occur frequently in training data.
Why current interpretability tools fall short
Debugging a hallucination typically means answering three questions: when did the wrong answer become detectable, what concepts was the model considering, and which prompt evidence drove the choice. Existing tools each answer a piece of this. Methods like the Logit Lens show when a prediction drifts, Causal Path Tracing identifies which components are responsible, and Sparse Autoencoders (SAEs) reveal what concepts are active, each providing only a partial view.
Token attribution methods (LIME, Integrated Gradients, attention saliency) can highlight influential tokens but do not expose the semantic content stored in intermediate layers. Causal intervention approaches like activation patching localize influential components but require multiple carefully designed forward passes, making them awkward as lightweight diagnostics for a single generation. DST is designed to stitch these signals into one interpretable object per prompt.
How the tracing pipeline works

DST treats the residual stream at the answer position as a moving meaning vector and asks, at every layer, which concepts it is compatible with and how those concepts relate to each other. The procedure has four steps:
- Project the hidden state into concept space. The residual stream is decoded through the unembedding matrix to score every vocabulary item, a logit-lens style readout.
- Select the top-K concepts as nodes. Adjacent subword tokens are merged into whole-word concepts so nodes are human-readable rather than tokenizer fragments.
- Compute directed edges via causal tracing. For each concept
v, the pipeline finds the prompt token most responsible for it, replaces that token with an unrelated one, and measures how much the probability of conceptwdrops at the answer position. - Read the map alongside the next-token distribution. Strong causal paths ending at the context-consistent answer signal a healthy generation; paths terminating in a competing neighborhood signal a hallucination.
The edge definition is what makes this more than a prettier logit lens. Instead of measuring concept coherence geometrically, edges quantify whether the prompt evidence supporting one concept is also causally necessary for another, giving a lightweight causal chain over retrieved concepts.
A scalar that predicts hallucination
On top of the maps, the authors define a Contextual Alignment Score (CAS), the fraction of total alignment mass at a given layer that sits on context-consistent concepts versus competing ones. Tracking CAS across depth yields three operational markers: a prediction onset layer where CAS starts a sustained decline, a semantic inversion layer where the competing neighborhood takes over (CAS below 0.8), and a commitment layer where the model locks in the wrong interpretation.

The predictive power is striking. Higher CAS corresponds to lower hallucination rate (Pearson r=-0.863; linear fit R²=0.746). That means a simple scalar computed from internal states explains roughly three quarters of the variance in whether a given prompt will produce a hallucinated output.
Benchmarks and results
Evaluation runs on the Racing Thoughts dataset from Lepori, Mozer, and Ghandeharioun, which uses controlled minimal pairs where a small contextual cue determines the intended interpretation, such as the classic "bank" ambiguity where a model may incorrectly respond "Yes" to "John is going fishing, so he walks over to the bank. Can he make an ATM transaction?" if it has not properly contextualized "bank" as a geographical feature. Explanations from each method are scored for faithfulness by a panel of five LLM judges (Gemini 2.5 Pro/Flash, Qwen3-235B, GPT-4o, Claude 4 Sonnet), with a Fleiss' Kappa of 0.85 across judges.
Across four compact models (SmolLM2-135M, Qwen3-0.6B, OLMo2-1B, Llama3.2-1B), DST scores 0.71 on average against 0.59 for causal tracing, 0.56 for subsequence tracing, 0.54 for SAEs, and 0.49 for the Logit Lens. On the Halogen benchmark with Gemma2-9B, DST reaches 0.79 average faithfulness across five task domains including code imports, biographies, and false presuppositions, versus 0.59 for the next best baseline.
The Elon Ganor problem
The most vivid illustration is an entity-setting failure. When prompted about a low-frequency real person named Elon Ganor, described with generic attributes like technology entrepreneur, the final-layer semantic map is dominated by concepts clustered around Elon Musk. The generic descriptors activate an association pattern strongly reinforced by training co-occurrences, pulling the residual stream to the wrong neighborhood despite the prompt explicitly naming the correct entity. The next-token probability follows the drift, producing a fluent but wrong answer.
What it is good for, and what it isn't
DST is useful when you have a specific hallucinated generation and want to know which prompt cues, which layer range, and which competing concept neighborhood produced it. The CAS trajectory can flag failures before final commitment, which is potentially valuable for early-exit safety systems or targeted mitigation.
The limitations are honest and important:
- Additional forward passes. Step 3 requires one forward pass per retrieved concept, so DST is lighter than full circuit analysis but still scales poorly to very large models or long contexts without batching.
- K is a knob. Discrete top-K retrieval can miss relevant concepts, and edge magnitudes can shift with alternative corruption schemes or prompts where local token replacement is unnatural.
- Narrow evaluation regime. Results are strongest on controlled ambiguity minimal pairs; long-form factual hallucinations, tool use, and MoE or recurrent architectures remain open questions.
- Code release. The paper does not mention a public repository, and no official implementation was located.
The deeper contribution is conceptual. DST reframes hallucination away from being an opaque decoding accident and toward being a measurable, layer-indexed process of drift that can be watched happening. If the correlation-driven drift hypothesis holds up on larger models and messier tasks, it points toward mitigations that operate mid-forward-pass rather than post-hoc, intervening once CAS starts to decline but before the model commits.