The perceptron: the artificial neuron
It all starts here. A perceptron learns a 'template' of what it's looking for and, when something arrives, measures how well it fits. Let's see it with examples.
Example 1 · Recognizing a handwritten digit
The drawing
Fits the template: high match.
The 7 template (learned)
azul suma · rojo resta
Is it a 7?
How it groups what it learns
Each drawing is a point. Similar ones land close and form groups; a new one is recognized by the group it lands near.
Example 2 · Cat or dog? (more pixels)
With a higher-pixel 'photo' it works the same: the template learns that a cat has pointy ears on top (blue) and a dog has floppy ears on the sides (red).
The photo
Pointy ears: fits the template.
The cat template (learned)
azul suma · rojo resta
Is it a cat?
And it groups them too
Each photo is a point: cats land on one side, dogs on the other.
Under the hood · Add, subtract and a number
How does it measure the match? It multiplies each pixel by its weight: some add (blue), some subtract (red). All of it collapses into a single number.
activation
0.80
…and with many, a vector
That number (and the vector it forms with others) is the coordinate that places the point on the map of groups.
It works for anything · Audio, video, documents
To the machine there's no difference between a photo, a song or a text: everything becomes a list of numbers. That's why the same mechanism reads any digital medium.
Audio
wave → numbers
Image
pixels → numbers
Video
frames → numbers
Document
letters → numbers
All: one list of numbers
[ 0.2 0.8 … ]
Change the template (the weights) and the same mechanism recognizes a 7, a cat or anything else. Adjusting that template on its own, from mistakes, is what diagram 2 shows.