Theory Demos
Five small experiments from machine-learning theory that you can play with. Move a slider or click a plot and watch the effect happen, live in your browser.
More parameters, less error
Fit 12 noisy points with p random wave-shaped features. Test error rises as p approaches 12, peaks exactly at p = 12, then falls again as p keeps growing. Add a little ridge penalty and the peak disappears.
Same setup as double_descent.py: the same 12 points, cosine features with frequency scale 15, 500 test points. Your browser draws its own random features, so the numbers wobble a little from run to run.
High dimensions are strange
Pick a dimension. In high dimensions two random directions are almost always nearly at right angles, almost all of a ball's volume sits just under its surface, and far more than d directions fit that are all nearly at right angles to each other.
A perfect diffusion model only copies
The red crosses are training points on a circle. Start 2,000 points from pure noise and run a diffusion model backwards. With the mathematically ideal model every sample lands on a training point. Blur the model or use a small trained network, and samples spread along the circle instead.
Trains a 64-unit, two-layer network for 4,000 steps first, as the script does. That takes 10–30 seconds.
Private polls
Each person flips a hidden, biased coin and answers either the real question or its opposite, so no single "yes" gives anyone away. The pollster can still estimate the true rate. Lower ε means more privacy, and wider error bars.
Analyse a real poll
A CSV with one yes/no answer per row (a header row is fine; the column named "answer" is used if there is one). Nothing leaves your browser.
The example poll has 800 answers, collected with p = 0.75.
A guarantee against small nudges
A small network separates two interleaved half-moons. Click anywhere: the circle is a proven safe zone, where no change to the input can flip the answer. Randomized smoothing gets that proof by asking the network about many noisy copies of the point.
Click the plot to certify a point.
Uses the exact networks trained by certified_robustness.py, and the same certificate: 100 noisy votes to pick the class, 10,000 to certify, 99.9% confidence. The shading for the smoothed network uses only 64 votes per cell, for display.
How it's built, results and limits: How it works →