GITHUB | WEBSITE | PAPER
We began by asking what an idea is, and found no final answer, only a representation, a projection, an approximation. We then asked where an idea sits, and discovered that its meaning is inseparable from its position in a chain of custody, from context and contrast. Now we must confront the shadow twin of the idea: the assertion that arrives with every outward property of a true idea, confidently, coherently, fluently, and yet answers to nothing real. This is the hallucination. If an idea is a trajectory through a landscape of meaning, then a hallucination is a trajectory that has come loose from the ground beneath it..
The Philosophical Problem:
Plato's cave already anticipated the hallucination two and a half thousand years before the term existed. The prisoners do not mistake shadows for the fire because the shadows are poorly formed. They mistake them because nothing available to the prisoners distinguishes a well-formed shadow from a true form.
Descartes sharpened this into a formal problem with his evil demon and his dreaming argument. A perception, a memory, an entire chain of reasoning can be internally coherent, can obey every rule of logic and grammar, and still refer to nothing whatsoever outside itself. Coherence, Descartes showed us, is cheap.
This distinction, between coherence theories of truth and correspondence theories of truth, is precisely where the hallucination lives. An idea, however imperfectly it is expressed, still gestures toward something, an experience, an observation, an intention. A hallucination gestures with equal confidence toward nothing. It is not a bad idea. It is fluent reasoning that has been severed from its referent while retaining every syntactic and rhetorical marker of reasoning that has not.
The Psychological Perspective:
Cognitive psychology has long understood that the mind does not passively record the world. It constructs a most probable completion of it. Perception itself is inference: the brain fills gaps, resolves ambiguity, and completes patterns using prior expectation as much as incoming evidence. Under fatigue, sensory deprivation, or simple time pressure/stress, expectation begins to dominate evidence outright, and the result feels exactly like perception because, from the inside, it uses the identical machinery.
Split-brain research gave psychology one of its starkest illustrations of this. When one hemisphere acts on information the other hemisphere never received, the interpreting hemisphere does not report confusion. It confabulates a fluent, confident explanation for behaviour it did not actually cause, and believes its own explanation completely.
But this same construction is not always innocent, and it would be a mistake to treat hallucination as purely a story of information gaps. Hallucination can also be manufactured deliberately, and this is where it shades into deception. A narrative that is confident, coherent, and internally consistent, produced not because evidence ran out but because a corrupted internal state, a motive, an incentive, a concealed intention, required that narrative to be believed, is hallucination aimed with purpose. Deception, in this sense, is hallucination with intent behind it: the same fluency, the same absence of a true anchor, but now directed deliberately at a target rather than arising from an honest gap in evidence. Understanding hallucination psychologically therefore means holding two cases apart. One arises from an honest absence of grounding. The other arises from a corrupt state that manufactures the same absence on purpose, precisely because fluency alone is so easily mistaken for truth.
The Neurological Perspective:
A hallucination, neurologically, is not evidence of some separate, malfunctioning machinery. It is what happens when the same predictive architecture that produces every ordinary perception continues to run while the correcting signal weakens or disappears, through sensory deprivation, altered neurochemistry, extreme fatigue, or the hypnagogic drift at the edge of sleep. The trajectory through neural state space keeps moving with total confidence. Only its tether to a corrective signal is missing.
Mathematics, Computing, and the Geometry of Meaning:
Hilbert–Schmidt Dual-Operator Systems: A Model for Perceptual Dimensional Pooling, gives intuition an actual structure. The core idea is - a model's internal state, at any point in its reasoning, can be treated as an operator occupying a high-dimensional space. Only a portion of that space is genuinely anchored, meaning it is reachable, checkable, and accountable against something verifiable outside the model. The remainder of that space is what the paper calls a blind quotient manifold: directions the system is entirely free to move through, with full internal fluency and consistency, that carry no accountable connection back to any ground truth whatsoever.
A hallucination, in this geometric frame, is simply what happens when a generation trajectory drifts into that unanchored manifold while every surface property of the output, grammar, tone, apparent confidence, register, stays completely intact. Nothing about the output signals the drift. The drift is only visible once you look at the underlying geometry rather than the surface text.
This is exactly the instrument built as my Hugging-Face LLM-XRay. Rather than judging a model's output by its wording alone, it performs a spectral tomography of the model's own weight matrices, measuring how much effective, useable dimensionality the architecture actually carries versus how much collapses under scrutiny. It combines this structural measurement with a live behavioural benchmark: a corpus of verified factual probes, deliberately adversarial questions built on false premises no true answer could satisfy, and paraphrase-stability checks that ask whether the model's internal state stays consistent when the same question is asked a different way. A structural risk score and a behavioural risk score are then combined into a single diagnostic reading, not a verdict of falsehood, but a measured signal of how far, and how often, a model's trajectories are wandering into the unanchored part of its own geometry.
Try It Yourself:
The application is live and open to inspection. Run it against a small model, or point it at a benchmark corpus of your own, and watch the two risk composites move independently: a model can be structurally well-anchored yet behaviourally unreliable under adversarial pressure, or the reverse. Nothing here claims to detect a lie with certainty. It offers something more modest and more useful, a geometry of where confidence has stopped being backed by anchoring.
Hallucinations are a diversion from the norm, not a mystical failure unique to machines, not proof of malice, and not, on their own, evidence of deception, though deception is always a hallucination with intent layered on top of it. A hallucination is a mathematical occurrence: a trajectory that has left its anchored subspace while retaining every outward property of a well-formed idea. This is not speculation about the inner life of models. It is something that can be measured, probed, audited, and shown, directly and repeatably, as demonstrated in LLM-XRay - then finally eradicated at its core.