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
- An artificial neural network is loosely inspired by brain cells (neurons), but it is a much simpler mathematical model, not a real brain.
- It is made of artificial neurons arranged in layers: an input layer, one or more hidden layers and an output layer.
- Each connection has a weight: a number that controls how strongly one neuron affects the next.
- 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.
- 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.
- The method that works out how much to change each weight is called backpropagation, because it works backwards from the output.
- A network with many hidden layers is a deep neural network. That is where "deep learning" gets its name.
- 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.
- Multiply each input by its weight: 1 × 2 = 2, 1 × 3 = 3, 0 × (−4) = 0.
- Add them up: 2 + 3 + 0 = 5. This is more than 4, so the output is "yes".
- If it starts raining, raining = 1: 2 + 3 − 4 = 1. This is not more than 4, so the output is "no".
- 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: 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 →