Network output f(x) Target function Individual neurons
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Universal Approximation Theorem: Neurons Fitting a Curve

This simulator makes the core promise of deep learning visible: a single hidden layer of sigmoid neurons, trained live by gradient descent, learning to reconstruct an arbitrary target curve one small weight update at a time. Every neuron's own S-shaped contribution is drawn as its own faint curve stacked in 3D, so you can watch simple building blocks combine into a network output that tracks a sine wave, a bump, a step or a sawtooth. Drag the neuron-count slider down and the network visibly loses the ability to represent sharp features — drag it up and the fit sharpens, exactly as the Universal Approximation Theorem predicts.