Neural network hallucinations are not mysterious glitches. They arise from mathematical properties of autoregressive generation: high entropy logit sampling, out-of-distribution manifold divergence, and cascading autoregressive error accumulation. Test the mechanics below.
Language models generate sequentially: $P(w_1, \dots, w_n) = \prod P(w_t \mid w_{<t})$. If the network samples even a single out-of-distribution token at step $t$, that hallucinated token becomes part of the permanent conditioning context for $t+1$. The model is forced to remain internally self-consistent with its own mistake, descending into an inescapable hallucination attractor.
Training datasets sample only a minuscule fraction of combinatorial possibility space. When a prompt forces the model to synthesize concepts lying in low-density manifold regions (out-of-distribution), gradient training provides no grounding constraints. The network interpolates linearly between memorized features, inventing plausible-sounding but false entities.
Pre-training optimizes cross-entropy loss over text statistics. Highly frequent co-occurrences (e.g. names of famous mathematicians paired with landmark proofs) dominate the unconditioned logit weights. When asked an impossible question, syntactic momentum overpowers negative factual constraints.