Skip to content

Artificial neuron in 3D

Move the weights of one neuron and watch the chance that the next letter is a vowel.

What this lab shows

An artificial neuron adds up its inputs, each multiplied by a weight, and passes the total through a curve that returns a number between 0 and 1. Here the inputs are two questions about the previous letters, and the output is the chance that the next letter is a vowel. The 3D surface shows the answer for any combination.

A tiny neuron, really trained with numpy on simple sentences in Portuguese. The numbers are its own, not those of a large language model.

How to use it

  1. Type a text and watch the neuron make its guess letter by letter.
  2. Change the weights and the bias and watch the surface tilt.
  3. Press Train and follow the error going down until the neuron stops improving.
LabArtificial neuron in 3DTry it
Last letterSecond-to-last letterChance of a vowel (neuron)Times a vowel came up in training
vowelvowel3.8%8.8%
vowelconsonant or space20%20%
consonant or spacevowel46%46%
consonant or spaceconsonant or space85%85%

Example calculated with the trained network (the interactive version needs JavaScript).

What to notice: A single neuron splits the world with a smooth curve: it does better than chance, but it cannot tell which vowel or consonant comes next. That is its limit, and that is why networks use many of them.

Books that use this lab

No published book uses this lab yet.