← ⚙️ Inside AI

Inside AI · Topic 4 of 10

Neural networks

A neural network is a machine learning model made of layers of simple connected units. Training adjusts the strength of the connections, called weights.

📌 Key points

  1. An artificial neural network is loosely inspired by brain cells (neurons), but it is a much simpler mathematical model, not a real brain.
  2. It is made of artificial neurons arranged in layers: an input layer, one or more hidden layers and an output layer.
  3. Each connection has a weight: a number that controls how strongly one neuron affects the next.
  4. A neuron multiplies each input by its weight, adds them up (plus a number called the bias), then uses an activation function to decide its output.
  5. Training: the network makes a prediction, compares it with the right answer, measures the error, then changes the weights a little to reduce the error. This repeats many times.
  6. The method that works out how much to change each weight is called backpropagation, because it works backwards from the output.
  7. A network with many hidden layers is a deep neural network. That is where "deep learning" gets its name.
  8. Big networks can have billions of weights, so it is hard to explain exactly why they give a particular answer.

📖 Key words

Neuron
A simple unit in a neural network that combines its inputs and passes on an output.
Layer
A group of neurons at the same stage of the network.
Hidden layer
A layer between the input layer and the output layer.
Weight
A number on a connection that sets how strongly one neuron affects another.
Bias
An extra number added inside a neuron that shifts its output up or down.
Activation function
A rule a neuron uses to turn its weighted sum into its output.
Backpropagation
The method used in training to work out how to change each weight to reduce the error.

✏️ Worked example

A simple neuron decides "go to the park?" Inputs: sunny = 1 (weight 2), homework done = 1 (weight 3), raining = 0 (weight −4). It says "yes" if the weighted sum is more than 4.

  1. Multiply each input by its weight: 1 × 2 = 2, 1 × 3 = 3, 0 × (−4) = 0.
  2. Add them up: 2 + 3 + 0 = 5. This is more than 4, so the output is "yes".
  3. If it starts raining, raining = 1: 2 + 3 − 4 = 1. This is not more than 4, so the output is "no".
  4. In training, if the output is wrong, the weights are changed a little so the answer is more likely to be right next time.
💡 Remember

Remember: a network "learns" only by changing its weights. Everything it knows is stored in those numbers.

Test yourself8 questions from a bank of 19. A new mix every time.
Start the quiz →

It’s bedtime! 😴

It’s late, and even Numo is getting sleepy. The best thing you can do for your learning now is… go to sleep!

✨ Sleep helps you

  • 🧠 remember what you learned today: your brain saves it while you sleep
  • 🌱 grow and stay healthy
  • ⚡ wake up with energy, ready to learn and play
  • 😊 feel happy and calm

🦉 Going to bed late can make you

  • 😩 tired and sleepy at school tomorrow
  • 🤯 find it harder to focus and to remember
  • 😠 grumpy and easily upset
  • 🤧 catch colds more easily

Children your age need 9 to 12 hours of sleep every night. Numo will be right here tomorrow!