AI Hints
Home›Generative AI Tutorial›How Machines Learn
Generative AI · Lesson 5 of 77

Artificial Neurons

The tiny building block of every neural network.

⏱ 2 min read▶ Video at 13:42🎓 Free
Watch this lesson in the Generative AI courseWatch on YouTube ↗Full Generative AI course

Every neural network, even the giants behind today's chat tools, is built from one simple part, repeated billions of times. In this lesson, you will meet that part, the artificial neuron, and you will see that it is just a little bit of arithmetic.

Artificial Neurons
From the video: Artificial Neurons
  • One simple part, repeated billions of times
  • A little bit of arithmetic
  • You will see exactly how it works

Inside one neuron

A neuron takes several numbers as input. Each input has a weight, which says how important it is. The neuron multiplies every input by its weight, and adds everything up. Then it adds a small extra number, called the bias. Finally, the result goes through an activation function, which decides how strongly the neuron fires. The output goes to the next neurons.

  1. Inputsnumbers coming in
  2. Weightshow important each is
  3. Add upsum, plus the bias
  4. Activatedecide how strongly to fire
Multiply, add, then activate
Inside one neuron
From the video: Inside one neuron

A neuron makes a decision

Let's use a very human example. Should you go for a picnic today? Three inputs matter. Is the weather sunny? Do you have free time? Are your friends coming? Weather matters most, so it has a big weight. Friends matter a little, so a small weight. The neuron adds it all up, and if the total is high enough, it says yes, let's go. Change the weights, and you change the decision. Learning means finding good weights.

Weather is sunnybig weight: matters most
Free timemedium weight
Friends are comingsmall weight
Total high enough?then the answer is yes
Learning = finding good weightsadjust until decisions are right

From one neuron to a network

One neuron is very simple. But connect many of them in layers, and something remarkable happens. The first layer receives the raw input, like the pixels of a picture. Each hidden layer finds patterns in the layer before. Early layers find simple things, like edges. Later layers combine them into shapes, and then into whole objects. The last layer gives the answer. More layers means deeper patterns, which is why we call it deep learning.

From one neuron to a network
From the video: From one neuron to a network

What each layer learns

Let's follow a picture of a face through the network. The first layer sees only tiny dots of light, and dark. The next layer combines them into edges, and lines. The next finds shapes, like eyes, and noses. And the last layers recognise a whole face. Nobody designed these steps. The network discovered this ladder of patterns on its own, while learning.

  1. Pixelstiny dots of light and dark
  2. Edges and linessimple local patterns
  3. Shapeseyes, noses, wheels, ears
  4. Whole objectsfaces, cats, cars

Summary

Well done. A neuron multiplies inputs by weights, adds a bias, and applies an activation. Connect many neurons in layers, and each layer finds richer patterns. And learning simply means finding good weights. But how does the network find them? That is the next lesson, and it is beautiful.

Key takeaways
  • Neuron: inputs x weights, plus bias
  • Layers build simple patterns into complex ones
  • Learning = finding good weights
Next up: Training and Gradient Descent — how a network finds its weights