Neural Hallucination Diagnostic Lab

Mechanistic exploration of manifold drift, attention distraction, and autoregressive snowballing

Step Mode
Prompt Divergence Scenario
Temperature (τ)
0.7
Attention Drift (α)
0.30
Grounding Clamp
0.2
Manifold Divergence 0.08 σ Within factual corridor
Cumulative Hallucination 0.0% 0 confabulated tokens
Softmax Entropy 1.12 nats Confidence distribution spread
Current State GROUNDED Step 0 of 12

Autoregressive Token Trajectory

Click any token to inspect logits
Token Sequence Buffer: Prompt (5 tokens) + Generated (0)
High-Dimensional Latent Manifold Projection (PCA / t-SNE): Distance from True Boundary: 0.12
Factual Manifold Hub
Hallucination Sink / Basin
Current Generation Path

Candidate Token Logits & Softmax

At Step: 0

Why does the model choose wrong tokens? High temperature flattens logits, letting low-probability confabulated tokens get sampled:

Attention Distribution Over Context: Focus: 92% Prompt
Autoregressive Snowballing Effect: Because transformers generate token $t_{n}$ conditioned on $[t_1 \dots t_{n-1}]$, emitting just one confabulated token changes the entire future conditional probability distribution $P(\cdot \mid t_{
The Three Core Root Causes of Neural Hallucination

1. Statistical Prior over Factual Truth

Language models optimize maximum likelihood $P(w_i \mid w_{

2. Sampling from Probability Tails

When temperature $\tau > 0$, the softmax distribution $e^{z_i/\tau} / \sum e^{z_j/\tau}$ softens. Non-zero probabilities are assigned to plausible-sounding wrong tokens. Once sampled, the model treats its own error as ground truth.

3. Self-Attention Distraction

Self-attention layers attend to superficial lexical triggers (e.g. associating "Apollo" with "Apollo Creed" or "Apollo Greek god") rather than maintaining the precise historical frame, pulling embeddings into an irrelevant manifold basin.

```