Skip to main content

The Geometry of Neural Networks

Explore space folding, network training, and gradient propagation, starting with perceptrons and ReLU.

A single neuron draws one straight cut

w1x1+w2x2+b>0w_1x_1+w_2x_2+b>0 predicts circle and otherwise diamond, separated by a straight line. Each perceptron step picks one misclassified point and nudges ww toward it. Two separable clusters converge quickly; XOR or a center band never does. Adding a third coordinate (x1x2x_1x_2 or x12x_1^2) lets the exact same rule converge again.

Linear Cut controls
Extra coordinate
25 of 40 misclassified.
w

0.60x1−0.80x2+0.10=00.60x_1-0.80x_2+0.10=0

The arrow is w=(w1,w2)w=(w_1,w_2), perpendicular to the boundary and pointing toward the circle class.

Circle: class 1Diamond: class 0; ringed points are misclassified

ErrorsUpdates →
Reading notes & further questions

Companion interactive experiments for Why Neural Networks Need Depth:

  • Single-neuron linear boundary and feature lifting for XOR.
  • ReLU depth folding, two-spiral linear regions, √dₖ attention scaling, and residual gradient propagation.