Splashery

Playground
Multilayer Net, a still.

AI and Computing · Built from a recipe

Multilayer Net

G4 on the minor comb. Its drum rings at 370.5 Hz.

Turn it in the PlaygroundTap the picture to strike it.

One perceptron can only split its inputs with a single straight line, so it cannot learn XOR, “exclusive or”, which is 1 when exactly one of two inputs is 1.

Shelf
AI and Computing
Kind
Built from a recipe
Sound
Yes
Hands-on
Yes
Licenses
Own work (made in the page)

Its note

Splashery stretches a drumhead over this Splash's outline, twelve inches across, and finds the ways it can ring. Its lowest is 370.5 Hz, 98 cents flat of G4, the nearest tine on the comb. The next fifteen are its overtones, and each one draws its own figure: sand gathers on the lines that stay still.

The sixteen ways Multilayer Net's drum can ring, lowest first.
  1. 1371 Hz
  2. 2480 Hz
  3. 3620 Hz
  4. 4673 Hz
  5. 5742 Hz
  6. 6775 Hz
  7. 7838 Hz
  8. 8937 Hz
  9. 9959 Hz
  10. 10985 Hz
  11. 111042 Hz
  12. 121090 Hz
  13. 131103 Hz
  14. 141113 Hz
  15. 151205 Hz
  16. 161236 Hz

How to play

Tap it to try all four inputs. Hands-on: tap each input to flip it; XOR answers.

Its controls

ControlKindRangeStart
Try all four inputsTap
RunButton
FlipButton
ViewList2 choicesPoster (2D)

About it

One perceptron can only split its inputs with a single straight line, so it cannot learn XOR, “exclusive or”, which is 1 when exactly one of two inputs is 1. Put neurons in layers and it can. Here an OR neuron and a NAND (“not both”) neuron feed an AND neuron, and together they give XOR. Blue wires add to a neuron's sum and red wires subtract.

Tap it and it tries the inputs 00, 01, 10 and 11 in turn, lighting each neuron that fires, and fills in the truth table: 0, 1, 1, 0. Pick the poster or a 3D model in the Splash tab. With ✋ Hands-on on, tap each input lamp to flip it: the OR and NAND neurons and the output show XOR's answer at once, and the truth table marks the row.

Details

Splats
Opens at 200,000 at Mid Detail, 120,001 at Low, and up to 630,000 at Max

Is it right?

The hidden units produce the XOR truth table correctly. The splash demonstrates a fixed nonlinear circuit; it does not learn XOR from examples.

  1. Correct

    A single linear decision boundary cannot represent XOR; hidden nonlinear units can.1

    The fixed hidden units compute OR and NAND; their final threshold computes XOR for all four input pairs.

  2. Correct

    The XOR output is one when exactly one input is one.2

    The actual XOR helper returns 0, 1, 1, 0 for 00, 01, 10, 11.

  3. Simplified

    The picture illustrates a multilayer network, not a trained model.1

    The weights and thresholds are stored constants; tapping cycles the four input cases.

  1. 1Multilayer perceptrons, Dive into Deep Learning authors
  2. 2Half adder, All About Circuits textbook
Simplified
The XOR network uses fixed threshold units. Its truth table is real, but there is no loss calculation or training step.

Sources and credits

Made in Splashery. Its code is MIT.

Share it

This link opens it in the Playground. To put it on your own page, add the element and one script tag. Every option.

https://splashery.app/play/?toy=multilayer-perceptron<script type="module" src="https://splashery.app/play/src/element.js"></script> <splashery-toy toy="multilayer-perceptron"></splashery-toy>

Nearby on the strip