Beneath Generative AI: Dreaming in Pixels

A picture is a grid of numbers

The dreaming machine

Begin with a known image

Inside the denoiser

Zoom into the U-Net

Where the prompt enters

Training changes the weights

Now hold the weights fixed

The prompt is a request, not a guarantee

Try the dreaming machine

Explore the algorithms

Grokking AI Algorithms, Second Edition book cover

Grokking AI Algorithms

A visual guide to the ideas behind AI.

grokkingaialgorithms.com

Build with us

Viszen

Viszen

Turn ambitious ideas into working solutions.

viszen.tech

Keep exploring

Illustrated portrait of Rishal Hurbans

Rishal Hurbans

Ideas, writing, talks, and projects.

rhurbans.com

14 scenes. From noise to an image.

Inside the scene

S01 · What do you see?00:00–02:00

Audience takeaway

Prior experience helps us interpret an unclear image; a prompt guides which possibility we pursue.

Speaker beats

After the title, show the tree from figure 12.6 with heavy display blur, following the thought experiment in figures 12.3–12.6. Pause for the audience to guess; do not name the tree yet. Reduce the blur and invite possible interpretations: broccoli, an explosion, or something else. Keep that exact image in place for the next advance and ask what they are starting to recognise. Hold back the tree label until the final reveal. Reduce the blur further: which shapes suggest a trunk, branches, or leaves, and which details would they refine next? Finally remove the blur to reveal the clear tree together with the label “a tree”. Ask how they recognized it: patterns they have seen before helped them interpret the incomplete evidence. Connect this intuition to learned image regularities, conditioning, and repeated refinement. Advance to a blank slide for a pause, then advance again to show the original blindfolded sculptor from figure 12.1. The sculptor has spent years studying the postures, expressions, and details of people deep in thought. Give the sculptor a random block of marble and ask for a person thinking. They feel the edges and repeatedly chip away pieces that do not fit the request until a coherent form emerges. Map the experience to learned visual patterns, the request to conditioning, and the small refinements to iterative denoising. Then make the example small enough to inspect every number.

Keep the explanation precise

This thought experiment follows book figures 12.3–12.6, printed pages 470–472. The stage uses only the clear illustration from figure 12.6 and varies its CSS blur, keeping the source, scale, and position fixed; the four original illustrations remain in the notes. This blur reveal is not an executed diffusion process. Blur is not the Gaussian noise used later, and generation does not recover a predetermined tree hidden inside random pixels. The analogy illustrates ambiguity, prior experience, prompting, and refinement, not a claim that human vision and diffusion use the same algorithm. The sculptor analogy and original figure 12.1 come from printed pages 467–468 (PDF pages 499–500). It illustrates learned experience, a request, and gradual refinement. Diffusion updates numerical values throughout the image; it does not literally chip away pixels or uncover a predetermined statue hidden in the starting noise. The actual small-model demonstrations later use a separate 70→96→64 MLP trained on three 8×8 faces, not on these tree or sculptor illustrations.

Transition

What would the machine actually see? A grid of numbers.

From Grokking AI Algorithms, Second Edition

Ambiguous blurred image for the opening thought experiment
Figure 12.3 · printed page 470 · PDF page 502
A clearer silhouette during the tree thought experiment
Figure 12.4 · printed page 471 · PDF page 503
Tree structure becoming recognizable
Figure 12.5 · printed page 471 · PDF page 503
The final clear tree illustration
Figure 12.6 · printed page 472 · PDF page 504
Blindfolded sculptor analogy
Figure 12.1 · printed page 468 · PDF page 500

You control the show

Advance, including demos
→ Space Page Down
Previous step
← Page Up
Next / previous scene
Shift + → Shift + ←
Scene overview
O
Notes & book sources
N
Fullscreen
F
Replay this scene
R
Blank the screen
B
Offline copy ready

Advance to reveal ideas and run every demo. No mouse is needed: each press shows the next prepared step, and going back restores the previous state. Diagram controls are optional for exploring. The offline HTML opens directly in your browser without a server or internet connection.

28¼ minutes including the opening thought experiment and a two-minute live demo, with 11¾ minutes for discussion and pauses in a 40-minute slot. Sources and notes are visible on this screen when opened.