Apophenic Models

The last model wrote one word at a time. This one starts from pure noise and scrapes it away until a picture is left.

Two Ways to Make Something

Last module, the machine wrote by guessing the next word, then the next, laying a sentence down from the left edge like someone typing with no backspace. Most image models do not work that way at all.

Picture an old television tuned to a dead channel. Grey snow, no signal, every dot flickering at random. A diffusion model starts there, with a whole screen of noise, and cleans it up. Not corner to corner. All at once, a little per pass, over and over, until the snow settles into a photograph that was never transmitted.

A dead channel. Every dot random, no signal. This is where a diffusion model begins.

There is a word for seeing a picture in random noise. Apophenia. Your brain does it without asking, faces in clouds, a figure in the static, the man in the moon. A diffusion model does the same thing on purpose, and it does not stop until the picture is sharp.

The obvious question is how anyone trains a machine to do that. You cannot hand it noise and the matching picture, because there is no matching picture. So you build the training data backwards.


Learning to Undo a Mess

Take a real photograph. Add a small amount of noise. Add a little more. Keep going, step after step, until nothing is left but snow. This part is mechanical. Nothing is learned. You are degrading an image on a schedule, and at every step you know exactly how much noise you poured in.

Now you have a ladder. Clean photo at the bottom, pure noise at the top, and a known rung between every pair. You train the model on one thing only. Given an image at some rung, take a single small step back down, toward the slightly cleaner version below it. One rung of noise removed. That is the whole skill.

To make a new picture, start at the top with noise you invented, static that never came from any photo, and climb down. Apply the one-step denoiser, then again, then again. Each pass peels off a little noise and commits to a little more structure. The picture was not hiding in the static. The model paints it on the way down, guided by everything it learned about what real pictures look like.


Watch the Snow Settle

Here the picture is a small grid of pixels spelling four letters, coarse enough that you can watch every pixel. Drag the slider to eat the letters with static, pixel by pixel. Then start the descent and watch them climb back out of the snow. A real model runs this same loop on a far bigger grid, a million pixels, and it learned the way back from a million pictures rather than the one it has here.

0%

Same Job, Opposite Motion

Both models chase the one thing the last module ended on. Learn what real data looks like, then hand back a fresh sample of it. The text model learned the spread of sentences and drew from it one word at a time. The image model learns the spread of pictures and draws the whole frame at once, sharpening it across many passes.

The split is order and direction. A left-to-right writer commits to the start before it has seen the end, one word locked in behind the next, with no way back. Diffusion keeps the entire canvas in a blurry draft and refines it globally. Early passes rough in the big shapes, late passes fix the details. That is why an image model can correct a hand on pass forty that came out wrong on pass ten. The writer cannot unsay a word.

The method fits the shape of the data. Text is a line. One thing follows another, and the order carries the meaning. An image is a field. Everything sits at once and there is no first pixel to read. So text gets built in sequence, and a picture gets sharpened all together.

For the curious: the noise schedule and the denoiser

Adding noise has a closed form. Let \(x_0\) be the clean image and \(\bar\alpha_t\) a number that slides from near 1 down toward 0 as the step \(t\) climbs. The noised image at step \(t\) is:

$$ x_t = \sqrt{\bar\alpha_t}\; x_0 + \sqrt{1 - \bar\alpha_t}\;\varepsilon, \qquad \varepsilon \sim \mathcal{N}(0, I) $$

That runs on every pixel at once. At small \(t\) the image is almost clean, at large \(t\) it is almost pure static. The model's one job at each rung is to look at a noisy image and estimate the clean one behind it. In this demo there is exactly one clean image it could mean, the four letters, so its best estimate is always that image. It memorized the answer.

That is the cheap version. Real diffusion models cannot memorize a single picture, they are trained on billions, so they replace the exact answer with a neural network that predicts the clean image from the noisy one, for any image at all. It is the same move as the last module. A lookup over everything you have seen becomes a learned function that stores none of it. The counting model turned into a neural language model. The one memorized image here turns into a denoising network that can dream up pictures it never saw.


Before You Go

Drag the slider to the middle and stop. That half-ruined grid is what the model faces at one rung, and its only task is to guess the noise to peel off before it repeats. Run the descent a few times. The static churns differently every run, but the letters always land the same, because this model has seen exactly one picture in its life. A model that had seen millions would fill the uncertain spots with something new each time. That difference, memorizing against inventing, is the whole game.