aadi malaviya
~/work/ucla-nlp-lab02 / 05

UCLA NLP Lab

Located the components inside open-source language models responsible for hallucination, then intervened on them to prove the relationship was causal.

ROLE   Machine Learning ResearcherTYPE   LLM interpretabilityFROM   September 2025TO     May 2026
6 / 32layers carrying most reasoning-relevant signal
3attention heads necessary for hallucination behavior
16monosemantic features tied to hallucination-prone reasoning
−30%hallucination rate under steering intervention
  • PyTorch
  • TransformerLens
  • NNsight
  • SAELens
  • GPT-2
  • Llama
  • Pythia
  • Gemma
01
[01]

The question

Most work on hallucination treats the model as a black box and attacks the symptom — better prompts, retrieval, post-hoc filtering. I wanted the mechanism: which parts of the network are actually doing the reasoning, which parts produce ungrounded output, and can you tell those apart well enough to intervene.

02
[02]

Method

I started with probing classifiers and layer-ablation experiments across GPT-2, Llama, Pythia, and Gemma, looking for where reasoning-relevant signal concentrated. It was not evenly distributed: six of thirty-two layers accounted for most of it.

Localizing is not explaining, though. A layer can correlate with a behavior without causing it. So I used activation patching and causal tracing to isolate the specific attention heads involved in hallucinated versus grounded outputs, and narrowed it to three heads that were necessary for the behavior — patching them changed the output, which is the difference between a correlation and a claim.

To get below the level of whole heads, I trained sparse autoencoders on activations from the implicated layers and extracted sixteen monosemantic features tied to hallucination-prone reasoning patterns.

03
[03]

The part that made it real

Interpretability findings are easy to over-read. A feature that looks like "the model is guessing" might be a feature that looks that way to me.

So the last step was a control test. I built steering-vector interventions along the identified feature directions to suppress and induce hallucination at generation time, and measured on a held-out reasoning benchmark with a custom evaluation harness. Suppression cut the hallucination rate by 30%. Being able to move the behavior in both directions on demand is what turned a description into evidence.

04
[04]

What I would do differently

I evaluated on a single held-out reasoning benchmark. A 30% reduction on one benchmark is a real result and a narrow one — I do not know how much of the intervention generalizes across task types, and I should have designed for that from the start instead of treating it as future work.