DigiSim

The White-Box — A Neural Net With Nothing to Hide

Machine learning · c. 1986

The White-Box — A Neural Net With Nothing to Hide

Preparing exhibit…

Operate

TRAINING SET

1 = has a vertical stroke · 0 = does not

How it works
  1. The training set contains synthetic 4×4 images. Class 1 has a vertical stroke; class 0 does not. The network is trained to distinguish these two classes.
  2. Each image supplies 16 pixel-intensity values to the input layer. Sphere brightness represents the corresponding numerical value.
  3. Each line represents a learned weight: blue is positive, orange is negative, and thickness represents magnitude. The weights begin from a deterministic random initialization.
  4. During the forward pass, each hidden unit forms a weighted sum of all 16 inputs and a bias. ReLU then computes max(0, z). The inspector lists every term in these two hidden-unit sums.
  5. The two output logits pass through softmax to produce class probabilities. Cross-entropy loss is −log p(y), where y is the labeled class.
  6. Backpropagation applies the chain rule to calculate the derivative of the loss with respect to each weight and bias. A gradient is a local sensitivity, not a causal share of the error.
  7. Gradient descent updates each parameter in the direction that reduces the current example's loss: θ ← θ − η∇θ. Line thickness changes as the weights are updated.
  8. Run Training repeats this loop over the full data set. Watch the loss curve fall and the weight heat maps organize as a vertical-stroke detector emerges from the arithmetic.
Inspector
Run state
mode—card—class—calculation step—weight updates—epochs—last epoch loss—
  • positive weight
  • negative weight
thickness = strength