Super Super

Neural Network Hallucination Lab

Decision surface

untrained
Ready. Train the network, then probe it with unfamiliar inputs.

Probe the network

0 probes
No probe yet
Enter an input and press Probe.

Why do neural networks hallucinate?

A neural network does not store facts. It stores a compressed map from inputs to outputs, learned from whatever examples it was trained on. When you ask it about something outside that map, it does the only thing it knows how to do: it interpolates. The result is fluent, confident, and often wrong. That is a hallucination.

This lab makes the mechanism visible. You train a small real network on a labeled pattern, then probe it with inputs it has never seen. The decision surface on the left shows what the network actually believes across the whole input space. The bars on the right show its softmax output — the confidence it attaches to each answer. Watch what happens when you probe far from the training data: the confidence stays high even as the answer drifts away from anything true.

Three mechanisms you can see here

How to use the lab

What this lab is not

This is a deliberately tiny network — a single hidden layer trained with plain gradient descent in your browser. It is not a language model and it does not reproduce the specific failure modes of any commercial system. What it does reproduce is the structural reason those failures happen: a network trained on a finite sample, asked to answer outside that sample, with no built-in signal for "I don't know."

Why does the confidence stay high on unfamiliar inputs?

Softmax normalizes the raw scores into a probability distribution. If the top score is even slightly ahead of the others, the top probability can be well above 50%. The network has no separate "unknown" output. Some systems add one — an abstain class, a distance threshold, or an ensemble disagreement check — but a plain classifier does not.

What does label noise change?

Label noise flips a fraction of the training labels before training. The network then has to fit contradictory examples, which distorts the decision surface and makes its confidence less meaningful. In real systems, noisy labels come from bad annotation, scraped data, or stale facts.

How is the decision surface drawn?

The canvas samples a grid of points across the input space, runs each through the trained network, and colors the cell by the network's top class. The brightness reflects confidence. You can see the boundaries the network has learned — and where those boundaries extend past the training data.

Does this run on my device?

Yes. Training and probing happen entirely in your browser. Nothing is uploaded. The export is a local JSON file.

Probe your own model's confident mistakes with Super Open in Super →