Work

12 pieces so far, all made in 2026. The first three are a trilogy: how AI learns, thinks, creates.

A small neural network in 3D: grey spheres joined by thin lines, a few lines glowing warm orange where the gradient is largest.
Step 98 on two moons. The warm lines carry the largest gradients.

Trilogy, part I: Learns

micrograd 3D

Watch a tiny neural network learn, one gradient at a time.

Year
2026
Form
Interactive, in the browser
Made with
TypeScript, React Three Fiber
Status
v1.1, live in the browser

built with Claude for Joe Gao

What

An interactive page that shows a neural network learning in real time. The engine is Andrej Karpathy’s micrograd, rewritten from scratch in TypeScript: a scalar Value that records every operation, and a backward() that walks the graph in reverse to hand each weight its gradient. It is made for CS students meeting backprop for the first time.

How

A 2 → 8 → 8 → 1 network learns the two-moons dataset with hinge loss and plain gradient descent. Every neuron is a sphere and every one of its 88 weights is a line. A line glows warmer the larger the gradient backprop just sent through it (the largest few light up most), so you see where learning flows rather than what the weights are.

Beside it, the decision boundary bends through the data and a loss curve falls on a log scale. Play, pause, step, or run it at up to 60 steps a second. Pause at any moment to step through one point’s backward pass, neuron by neuron, with the chain rule written out. Tests check the gradients against values worked out by hand and against finite differences.

Next

A toy problem on purpose: scalar autograd suits 88 weights and 100 points, not real datasets, and the accuracy shown is on the same 100 points it trains on, with no held-out set.

micrograd 3D in backprop mode: one neuron bright in the 3D network with its incoming weights glowing, and a panel on the right working through the chain rule for hidden layer 2, neuron 2, step 4 of 20, above the two-moons plot with the traced point circled.
v1.1, stepping through backprop: hidden layer 2, neuron 2, with the chain rule written out.
Letters of a line of text along the bottom and four layers above them; in layer 2 a bright golden fan of arcs sweeps from one letter back across the earlier ones.
Layer 2, head 3: every later letter looks back to the last line break.

Trilogy, part II: Thinks

Attention, in space

Watch a tiny GPT read, in 3D, while you type.

Year
2026
Form
Interactive, in the browser
Made with
NumPy, three.js, Web Workers
Status
Finished

built with Claude for Joe Gao

What

A tiny character-level GPT, trained from scratch on Shakespeare (tiny-shakespeare, from Andrej Karpathy’s char-rnn), running entirely in the browser. The letters you type sit along the bottom and four layers stack above them. Each glowing arc is a letter looking back at an earlier one, brighter the harder it looks, and the top row is the model’s guess at what comes next. It follows micrograd 3D: that piece shows a tiny network learning, this one shows a transformer reading.

How

Andrej Karpathy’s nanoGPT design, scaled down to 809,856 parameters: 4 layers, 4 heads, 64 characters of context. PyTorch could not be installed, so it is written in pure NumPy with a hand-written backward pass (no autograd), checked against finite differences, and trained in 32 minutes on 2 CPU cores to a validation loss of 1.53.

The weights ship as int8 in attention.js, loaded after the page paints. The forward pass runs in a Web Worker so the 3D view never waits, and every arc is one ribbon in a single mesh, its width set on the GPU.

Next

Its spelling is mostly right and it has the shape of a play, but the meaning is nonsense. 60 frames a second still needs checking on real hardware; so far it has only run under software WebGL.

All four layers at once: hundreds of thin golden arcs rising between the letters of “LEONTES: She is, let me, but”, with the model’s next-letter guesses along the top.
All layers, heads averaged, while the model writes.
Thousands of pale cyan points traced into a trefoil knot on black, each trailing faint lines from where it came.
t = 0: the knot. Each point trails its last few steps.

Trilogy, part III: Creates

Noise, undone

Watch 4,000 points of noise become a knot.

Year
2026
Form
Interactive, in the browser
Made with
NumPy, three.js, Web Workers
Status
Finished

built with Claude for Joe Gao

What

A tiny diffusion model, trained from scratch, running entirely in the browser. It starts with 4,000 points of pure Gaussian noise and moves them, step by step, into a trefoil knot, in 3D. Scrub from noise to knot, re-noise it and watch the model draw a new one, or turn on Guess to see, for every point, the network’s estimate of the clean point it came from. The network sees the knot long before the points do.

How

A DDPM (Ho, Jain & Abbeel 2020) with 100 steps and the cosine schedule of Nichol & Dhariwal (2021), sampled with DDIM (Song, Meng & Ermon 2020). The network, a 42,627-parameter MLP, learns one thing: look at a noisy point and predict the noise that was added. It is written in NumPy with a hand-written backward pass, checked against finite differences, and trained in 23 minutes on 2 CPU cores.

Under the cosine schedule the knot only becomes legible in the last 10–15 of the 100 steps. So the scrubber and playback move evenly in log noise level, not in t: t = 10 sits in the middle of the track, and the readout always shows the true step.

The weights ship as float16 inside a page of about 160 kB, and the reverse process runs in Web Workers. Measured on those shipped weights, the median sample lands 0.027 from the knot’s centre line, and no part of the knot is left uncovered.

Next

The data is one fixed shape with no conditioning: a small, faithful DDPM, not a demonstration of scale. The frame rate still needs measuring on real hardware.

Faint gray points scattered in a cloud, and bright cyan dots tracing a trefoil knot through it, with thin lines joining some points to their dots.
Guess at t = 20: the points are still a cloud (median 0.35 from the knot’s centre line), but the network’s guesses already trace the knot (0.083). Each line runs from a point to its guess, the denoising direction there.
An autumn maple leaf, orange with pale veins, alone on a black background.
Level 0: the whole leaf, a 24 cm field.

Research: How AI sees scale

All the way down

One maple leaf, from the whole leaf down to a single stoma.

Year
2026
Form
Interactive, in the browser
Made with
WebGL, three.js, Web Workers
Status
Finished

built with Claude for Joe Gao

What

A multi-scale 3D viewer that runs in the browser. One autumn maple leaf at five scales, each ten times finer than the last: the leaf, its veins, the areoles, the pavement cells and a single stoma, four orders of magnitude (10,000×) to scroll or pinch through. It implements the scale-aware opacity modulation of WonderZoom (Jin Cao, Hong-Xing Yu and Jiajun Wu, WonderZoom: Multi-Scale 3D World Generation, arXiv 2512.09164, 2025): every surfel remembers the scale it was made at and fades, in log scale, as you move away from it. A toggle turns modulation off, so you can see what the method prevents.

How

WonderZoom’s released scenes could not be downloaded where this was built, so the scene is a procedural test scene, not a WonderZoom output: 288,556 surfels over five levels, each deeper level a local patch, as a zoom-in would generate. The WebGL renderer is written from scratch. Each surfel is a flattened Gaussian projected in the vertex shader; on every camera move the CPU computes each surfel’s opacity, culls the ones that have faded out, sorts the rest by depth and uploads only what is drawn. The cross-fade checks out numerically, 0.50 and 0.50 at the midpoint between two levels, and a spatial feather, an extension of the paper’s equation, keeps the weights summing to 1 at the edge of each patch.

Measured

Timed with the piece’s own Measure routine in Chrome 157 on a Mac with an Apple M5 Pro GPU (WebGL through ANGLE on Metal), at an 1800 × 1226 drawing buffer, 120 frames per mode. With the whole leaf in view, modulation draws 50,363 of the 288,556 surfels and runs at about 500 fps; without it, about 54 fps, roughly 9× slower. At the areoles it is about 680 fps against 180. At the stoma, frustum culling already removes most coarse surfels and both run at about 610 fps; there the gain is visual, because without modulation the coarse surfels blur over the fine ones.

Next

A converter for WonderZoom’s released scenes, so a real one opens from a link. The memory figures the page shows are an estimate from a stated model; WebGL cannot report GPU memory.

Close up of a single stoma: a dark slit-shaped pore between two curved rows of pale guard cells on an orange surface.
Four decades in: one stoma, a 24 µm field, with its guard cells and pore.
A small grey stone with a pale quartz band in the middle of a ring of wireframe cameras, each holding the photograph it took.
Step 3,000: the fitted stone and the twelve training cameras, each holding its photograph.

Research: How AI sees shape

Seen from twelve sides

Twelve photographs of a stone become 4,000 Gaussians.

Year
2026
Form
Interactive, in the browser
Made with
NumPy, three.js
Status
Finished

built with Claude for Joe Gao

What

A 3D Gaussian Splatting fit written from scratch in plain NumPy, shown in the browser. Twelve rendered photographs of a procedural stone go in; a cloud of 4,000 Gaussians comes out. Scrub through training and watch the grey cloud become the stone, draw the training cameras with their photographs, and hold H to compare a camera that training never saw with the Gaussians rendered from the same pose.

How

The representation and rendering follow 3D Gaussian Splatting (Kerbl, Kopanas, Leimkühler & Drettakis, SIGGRAPH 2023), with the EWA projection of Zwicker, Pfister, van Baar & Gross (2001). The rasterizer, its hand-written backward pass and the gradient check (worst relative error 1.9e-8) were written for this piece with Claude in NumPy, not copied from an implementation. Training runs 3,000 steps of Adam, one 96 px view per step, in about 26 minutes on two shared CPU cores; the page eases between 14 logged snapshots.

Measured

At the end, whole-image PSNR is 33.60 dB on the twelve training views and 28.45 dB on the four held-out ones. Counting only the pixels the stone covers: 31.91 and 27.21 dB.

Next

The gap between training and held-out views is overfitting to twelve photographs. These photographs are synthetic and perfectly posed; real captures need camera poses from structure-from-motion, view-dependent colour and far more Gaussians.

Three views of the stone side by side: a held-out photograph, the Gaussians rendered from the same pose, and a dark difference image where only the outline and the quartz band glow.
A camera training never saw: its photograph, the Gaussians from the same pose, and the difference (×4).
Three lines of text split into rounded coloured pills, one per token: whole words like “the”, “of” and “York”, and pieces like “disc” plus “ont” plus “ent”.
After all 2,000 merges: 125 characters in 44 tokens.

Research: How AI reads text

How a model reads

Watch text break into tokens, merge by merge.

Year
2026
Form
Interactive, in the browser
Made with
Python, JavaScript
Status
Finished

built with Claude for Joe Gao

What

A byte-pair encoding (BPE) tokenizer learned from scratch in plain Python on tiny-shakespeare, from Andrej Karpathy’s char-rnn. Type or paste text and it splits into coloured pills, one colour per token. A slider runs from 0 merges, single characters, to all 2,000; as you scrub, neighbouring pills slide together and take the new token’s colour.

How

The merge loop of Sennrich, Haddow & Birch (2016), on Philip Gage’s pair-replacement idea (1994), with a GPT-2-style pre-split that keeps a word’s leading space and never merges across words. It starts from the 65 characters in the text, not from bytes. 2,000 merges over 1,115,394 characters take a few seconds in plain Python. The page encodes with the same earliest-merge-first rule; a test runs 3,444 cases through the shipped page, and all 3,444 match the Python reference exactly.

Measured

On the training text, characters per token rise from 1.02 after one merge to 2.21 after 500 and 2.90 after 2,000. Merge 1 joins a space and t; merge 12 makes “ the”; the longest token is NORTHUMBERLAND.

Next

The vocabulary is shaped by the script format: speaker names in capitals take merges that modern text never uses, and modern words fall apart (smartphone becomes sm art p h one). Characters never seen in training stay single, where a byte-level tokenizer would merge their bytes.

The same three lines after only 12 merges: nearly every character is still its own pill, with a few pairs such as “the” joined.
The same text after 12 merges: 111 tokens, still mostly single characters.
A dark cloud of small points with the word king highlighted in violet, lines running to claim, lewis, dukedom, lawful, plantagenet, richard and harry, and the ten neighbours listed with their cosine values on the left.
king and its ten nearest neighbours, measured in all 48 dimensions: claim .76, lewis .75, dukedom .73.

Research: How AI relates words

Where words live

Three thousand Shakespeare words, placed by the company they keep.

Year
2026
Form
Interactive, in the browser
Made with
NumPy, three.js
Status
Finished

built with Claude for Joe Gao

What

Skip-gram word2vec with negative sampling, trained from scratch in NumPy on tiny-shakespeare. The 3,000 most common words are points in 3D. Pick a word, by clicking, searching or tapping a chip, to see its ten nearest neighbours with their cosine values, joined to it by lines.

How

Two 3,000 × 48 matrices trained on 193,931 words for 15 passes, with the original word2vec recipe: five negatives drawn from unigram^0.75, sub-sampling of frequent words, a dynamic window up to 5. The gradients are written by hand and checked against finite differences (largest relative error 1.2e-9). Neighbours are computed in the browser with cosine similarity in all 48 dimensions; the 3D view is a PCA projection that keeps only 26.2% of the variance, so it is a shadow.

Measured

The 20 probe words and 8 analogies were written down before the first training run and never changed. Some neighbour lists are good (romeo, thou, king), some mostly noise (man, woman). Analogies: 2 of 8 hit, both function words (his → her, thy → your); king − man + woman puts queen 28th. Four of the six PCA axis ends lean toward a single play, above the 99th percentile of random word groups.

Next

A 194,000-word corpus is tiny: the geometry reflects which play a word comes from about as much as what it means, and removing 81 header tokens between runs changed most mid-frequency lists. Seed-to-seed variation was not measured.

The same cloud with romeo selected: lines run to tybalt, juliet, banished, mercutio, conjure, arise and murderer, some of them long.
romeo: tybalt .79, juliet .74, banished .72. Long lines are words close in 48 dimensions but far apart in this 3D shadow.
White gravel raked in fine parallel lines that bend around three groups of dark stones on moss islands, with rings around each island and long shadows from a low sun.
Mid re-rake, stroke 18 of 21: the lines bend around each stone and close into rings near it.

Research: How a field rakes a garden

Karesansui 枯山水

A dry Zen garden whose rake lines are the level lines of a field.

Year
2026
Form
Interactive, in the browser
Made with
three.js, GLSL
Status
Finished

built with Claude for Joe Gao

What

A dry Zen garden in the browser: raked white gravel, a few dark stones on moss islands, low dawn light. Tap the gravel to set a stone, drag a stone to move it, double-tap to take it away. When something changes, an unseen monk re-rakes the garden one stroke at a time, about 20 to 25 strokes after one change.

How

The rake lines are not drawn. Near each island they are rings of its signed distance, blended with a smooth minimum so close stones share one peanut-shaped set of ripples; farther out they are a stream function, straight lines bent by flow round a cylinder at each stone. The gravel’s height lives in a texture that only a stroke can change, so a moved stone leaves a ghost until the monk reaches it. The stones are procedural too: spheres cut by 16 to 22 random planes, with rounded edges.

Measured

Nothing is drawn unless something changed; an idle garden draws one frame a second. On an Apple M5 Pro, a frame while the monk rakes took 2.27 ms at 1440 × 900 and 1.8 ms at phone size, timed pass by pass.

Next

The flow is a blend of single-stone flows, not an exact solution for several stones, so lines squeeze against the long walls when a stone sits close to one. Not yet measured as a live frame rate or on a phone GPU. The stones come from presets and seeds: they read as stones, but no one composed them.

The garden after a stone was removed: rings still circle an empty, flat oval of gravel where its moss island used to be.
The gravel remembers: a removed stone leaves rings around nothing until the monk rakes there.
A ring of pale brush strokes on black, one per letter, with the same passage printed small around the inside of the ring and as lines of Shakespeare-like text in the middle.
The diffusion model’s passage after 32 passes (seed 1): every letter written around the circle, some still misspelled.

Research: How AI writes

Heptapod

Can a language model write a whole passage at once?

Year
2026
Form
Interactive, in the browser
Made with
PyTorch, JavaScript
Status
Finished

built with Claude for Joe Gao

What

A tiny diffusion language model starts from 255 blanks and fills them in everywhere over a few passes, drawing each letter as a brush stroke around a circle and sometimes taking a letter back. Beside it, a GPT of exactly the same size, trained on the same text in the same way, writes the same length one letter at a time. Both were trained from scratch on tiny-shakespeare and run live in the browser in plain JavaScript.

How

Both networks are four transformer blocks, 128 wide, 829,952 parameters each. The diffusion model’s attention runs both ways and it is trained to fill in a random share of masked letters, as in MDLM and SEDD; the GPT’s attention is causal and it predicts the next letter. Each pass of the diffusion model keeps a random set of its proposed letters; an optional remasking step, after ReMDM, sends a few of the least confident ones back to blank. The browser’s forward pass matches PyTorch to within 1.9e-5 on 20 fixed inputs per model.

Measured

Real words, over 50 seeds: 65.1% for the diffusion model at 32 passes with remasking, 73.0% at 128 passes, against 97.2% for the GPT. Keeping the most confident letters first, LLaDA’s order, made it write “you you you” around the ring: 87% real words but only 29% distinct. On a CPU the GPT finishes first: in Node on an Apple M5 Pro, 154 ms for 255 letters against 3.39 s for 32 diffusion passes, because each diffusion pass reads all 256 positions.

Next

Both models are under a million parameters with 256 letters of context: they get Shakespeare’s shape, not its sense. The GPT had stopped improving by step 13,000 of 20,000 while the diffusion model was still creeping down, so equal steps are not each model at its best. Not yet checked in Safari or Firefox, or for speed on a real phone.

The finished ring on the left; on the right, the GPT twin halfway through the same length, its strokes filling rows from the top while the rest are still dots.
Compare: the GPT twin at pass 121 of 255. The diffusion model finished at pass 32.
A line-drawn square world with an oval pit in the middle and a glowing light at the far end; several trails start near the front and curve round the right-hand side of the pit to the light. Below, a learning curve rises to 98.4%.
After 10,240 episodes: 98.4% of 1,000 test runs reach the light, in 33 steps on average.

Research: How AI acts

First steps

A small agent learns to go round a pit and reach a light.

Year
2026
Form
Interactive, in the browser
Made with
Python (NumPy) · JavaScript
Status
Finished

built with Claude for Joe Gao

What

A small agent on a square world must reach a light, and a pit lies between where it starts and the light: every straight line from the start to the light crosses it. It is trained from scratch with REINFORCE in NumPy, and the page runs the saved policy live in JavaScript at 20 points in training. A slider swaps checkpoints, so you can watch random stumbling turn into a short route around the pit.

How

REINFORCE (Williams, 1992) with a learned baseline. The policy is a 2 → 48 → 48 → 2 network with a learned Gaussian noise per axis (2,596 parameters); the critic is 2 → 48 → 48 → 1 (2,545 parameters). After every 32 tries, moves with a better-than-expected return become more likely. The backward pass, the Gaussian log-likelihood gradients and Adam are written by hand and checked against finite differences before every run (worst relative error 2.4e-7). Training runs 10,240 episodes, seed 7.

Measured

Each checkpoint is evaluated on 1,000 test runs. Untrained, none reach the light and 28.9% fall in; at episode 64, 73.8% fall in; by episode 6,144, 99.6% reach the light; at the end, 98.4% reach it in 33 steps on average, and every successful run goes round the right-hand side of the pit.

Next

One fixed map: the policy sees only its position, so it has memorised a route for this map, not what a pit is; move the light and it would fail. It never learned to pass on the left, a local optimum REINFORCE settled into rather than a property of the task. The constants were tuned on seed 7, with a quick check of seeds 1 to 3.

The same world early in training: tangled trails wander up from the start area and several end with a cross inside the pit, short of the light.
Episode 64: it has learned that closer is better, so 73.8% of test runs head straight into the pit.
A dark monolithic tower under a moonlit, cloudy sky, a thin beam of light sweeping from its top. Two choices float above a small figure: “look away” and “keep walking”.
The tower, and the choice: look away, or keep walking.

Almost Ripe

A night inside the Caretaker.

Year
2026
Form
Interactive story, about three minutes
Made with
three.js, Web Audio API, Claude
Status
Finished

built with Claude for Joe Gao

What

A story you walk through in the browser, with headphones, in about three minutes, inspired by Harlan Ellison’s short story I Have No Mouth, and I Must Scream (1967). Five people are left. Something keeps them: every night it rebuilds the world from what they remember, almost perfectly.

How

Built with Claude, three.js and the Web Audio API. Every surface, light and sound in the piece is generated in code. You walk with the keyboard or by holding a finger down, and look by dragging. At one point the piece asks you to choose: look away, or keep walking.

Next

Finished after two polish rounds on the tree, the grass and the shatter.

A long dark corridor between walls of tiny blinking blue and amber lights, the tower glowing at its far end.
The corridor.
A black tower in stippled fog under a white moon, a wide ring of gears above it and one red eye open on its face.
Typing: every key turns each ring of gears by one tooth.

Machina

A tower in the fog with one red eye that notices you.

Year
2026
Form
Interactive, in the browser
Made with
three.js, GLSL
Status
v1

built with Claude for Joe Gao

What

A dark tower stands in fog under the moon, with a cloud of gears turning above it and one closed eye. Move and the eye opens and follows you. Hold still after it has seen you and the gear cloud comes down and closes around the tower. Type and every ring turns by exactly one tooth while a circuit trace lights from the tower outward. Keep watching and the tower grows, one segment every forty seconds. Leave the tab and it closes its eye.

How

One HTML file with three.js. The scene renders offscreen, then a shader turns it into 1-bit art: brightness against a 4 by 4 ordered dither, in cells of two pixels. The eye is drawn pure red, and the shader keeps red pixels as the one colour on the page, dithered the same way. What the machine does is driven by three numbers: attention (built by movement and keys, fading slowly), stillness, and how long its eye has been open.

Next

This is the first version. The gears read best on a large screen; on a phone the cloud is a little busy. Next: a slower, heavier feel to the reach, and a reason to come back to a taller tower.

The same tower after the visitor went still: the gear cloud has come down and closed around the top of the tower.
Hold still and it reaches: the cloud comes down around the tower.