mb

neural net

a neural net with one hidden layer runs a few lines at once. each hidden unit squashes its own line through tanh, and the output weighs those into one probability. backpropagation passes the error back through the output to every unit, so all the lines move together until the boundary bends around the points.

12 points

inked: the boundary, p = 0.5. dashed: where each hidden unit flips sign

arrow keys move the crosshair, shift for finer steps. tap to place. keys: arrows, enter, backspace to erase

2
step
0
loss
0.666
correct
7/12
seed
1

not trained yet

loss by step0: 0.666

hidden units: tanh(bias + w1·x + w2·y), then × out

unitbiasw1w2out
10.25-1.990.110.23
20.961.87-0.880.44

output bias 0.00

try this

  1. set hidden units to 1 and train. one unit is one straight line again, so like logistic regression it cannot split xor: it settles with at most 9 of 12 right.
  2. at 2 units, press reseed until a run settles with only 7 right. seed 3 does. the loss sits at 0.35, a local minimum, and the next seed gets out.
  3. at 8 units, every seed gets all 12 right, and sooner than at 2. but where two straight lines would do, its boundary curves.