HomeAI & Machine LearningUniversal Approximation Theorem: Neurons Fitting a Curve

Universal Approximation Theorem: Neurons Fitting a Curve

Watch a single hidden layer of sigmoid neurons learn, live, to approximate a target curve — each neuron's own S-shaped output plotted in 3D and summed in real time, with gradient descent visibly shrinking the error.

AI & Machine Learning3DModerate60 FPS📱 Mobile-adapted⇄ 2D version
deep-learning-data-science ↗ Open standalone

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.

⚙ Under the hood

Watch a single hidden layer of sigmoid neurons learn, live, to approximate a target curve via real gradient descent — each neuron's own S-shaped output plotted in 3D and summed into the network's fit.

deep learningneural networkgradient descentbackpropagationsigmoiduniversal approximation

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)