MB · The Lab

EXP. 008 · The Boundary

epoch 0 · loss · acc
next point: bone · tap to contradict · shift flips

The Lab — EXP. 008 · watching a model learn

It starts with a guess shaped like a line.

A real network — 2→16→16→1, 337 parameters — really training, right now, in front of you. The heavy contour is everything it believes at p = 0.5; watch it wrap the spirals as the loss falls. Tap to plant a point it can't explain, and watch belief reorganize around you.

EXP. 008 — Notes

The Boundary

A real neural network — two inputs, two small hidden layers, 337 weights — trains in front of you by backpropagation, nothing pre-recorded. Its whole belief is one decision boundary, drawn per-pixel every frame. It starts as a useless straight line because that's all an untrained network can say; the two spirals force it to bend, fold, and finally wrap the truth. Tap to plant a contradicting point and the entire surface reorganizes — belief is global, correction is global.

Every model you now work with — ranking, targeting, LTV, the copilot in your product — is this: a boundary bending around examples. Two things follow. A contradiction doesn't cause a local patch; it reshapes belief everywhere, which is why one stream of bad labels quietly bends every prediction, and why data quality is strategy rather than hygiene.

And calibrate expectations for AI features: the day-one model is the straight line. The asset isn't the first answer — it's the training loop that turns contradictions into shape. Ship the loop.

Watch a mind be wrong in public. The line it draws first is confident and useless; every truth it meets bends it a little. What it ends with was not taught — it was surrendered to, point by planted point.

  1. Mechanism under test: a complete neural network in plain typed arrays — 2→16→16→1, tanh hidden layers, sigmoid out, 337 parameters — with the forward pass and backpropagation written by hand. Full-batch gradient descent with Nesterov momentum (lr 0.04, μ 0.95) on 190 seeded two-spiral points; the loss is cross-entropy. Every number in the readout — epoch, loss, accuracy — is computed, never scripted. The tempo is phased but every step is real: the useless-line plateau fast-forwards at 120 epochs/s, the wrap itself plays slow at 30, the end-game grind rushes at 300.
  2. The picture IS the model: each frame the same 337 weights are uploaded to a fragment shader (packed as vec4 rows, layers unrolled) and the network is evaluated once per pixel. The heavy index contour is p = 0.5 — the decision boundary itself; the minor contours are the confidence bands p = .1/.3/.7/.9; the wash is hypsometric, bone side against ember side. Misclassified points wear a ring until the model earns them.
  3. Convergence is honest: when the loss stops improving over a trailing 600-epoch window (patience is strict while the loss is still high — the two-spirals saddle plateau drifts before it escapes), training stops — and so does the frame loop, at zero frames. The exhibit does not idle; it finishes, and says so. Reinitialize deals fresh seeded weights and the lesson runs again from its line.
  4. The heart: a tap is a real datum entering the batch (classes alternate; shift flips). The loss jumps, training resumes, and the settled belief visibly renegotiates itself around your contradiction — understanding, reorganizing in real time.
  5. What might graduate: the boundary-wrap as a figure ground for AI-native essays — a model's belief forming on camera; live training readouts as honest instruments; per-pixel model evaluation in-shader as a plate mechanism.

PHYSICS — raw WebGL2, no libraries, single file · training in JS typed arrays, uniforms only (no float textures) · rAF runs ONLY while training — converged = zero frames, visibility + IntersectionObserver gated · reduced motion = the converged still, one frame · ?freeze = synchronous training to convergence, deterministic single render · no-GL = designed fallback · seeded mulberry32 (data + init) · zero console errors.

← The Lab  ·  ← morganbrown.co