Interactive Lab · Neural Networks
A classifier's whole job is to find a boundary that separates the classes. A straight line handles easy cases, but the spiral below is hopeless for any line. Give the network hidden neurons and it bends the boundary into whatever shape the data needs. Press Train and watch the colored regions warp to fit the dots, then shrink the network and watch it fail.
▶ The playground, pick a shape, build a net, press Train
This is the “hello world” of deep learning: a small network bending a decision boundary to separate data. Every classifier, vision model, and LLM is this same idea scaled up, layers of weighted sums and nonlinearities, trained by gradient descent. When your data isn't linearly separable, you add width and depth; watch that trade-off live here.
The code that's actually running
Switch to xor and set Hidden layers = 0 (just a line). Train, it stalls near 60%, because no single straight line can split XOR. Now, still at 0 layers, turn on the x·y feature. Before you press Train: predict what happens. Why does multiplying two inputs let a linear model suddenly solve a problem that was impossible a moment ago? (This is the whole idea of feature engineering, and why hidden layers, which invent their own features, are so powerful.)
The takeaway
x·y. Hidden layers are powerful because they learn features like that automatically.