How does a neural network learn, and what makes deep learning powerful for tasks like image recognition?
Describe an artificial neural network in terms of neurons, weights and layers, and explain how training adjusts weights
A focused answer to the H2 Computing outcome on neural networks. Artificial neurons with weighted inputs and an activation function, input, hidden and output layers, how training adjusts weights to reduce error, and what deep learning adds.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
Jump to a section
What this dot point is asking
SEAB wants you to describe an artificial neural network in terms of neurons, weights and layers, and explain how training adjusts the weights to improve predictions. The central idea is that a neural network is built from simple units that each compute a weighted sum and apply an activation function, and that learning is nothing more than gradually adjusting the weights to reduce the network's error.
The answer
The artificial neuron
The building block is an artificial neuron. It takes several inputs , each with a weight , computes a weighted sum, adds a bias , and applies an activation function :
The activation function (a step, sigmoid or similar) introduces non-linearity, which lets a network of neurons model complex, non-linear relationships rather than just straight-line ones.
Layers
Neurons are organised into layers:
- Input layer - one neuron per input feature; it receives the raw data.
- Hidden layer(s) - between input and output; they transform the data, each neuron combining the previous layer's outputs.
- Output layer - produces the final prediction (a class or a value).
In a feedforward network, data flows from input through hidden layers to output, with each layer's outputs feeding the next.
The role of the weights
The weights are the network's adjustable parameters. Each weight sets the strength and importance of one connection - how much an input influences a neuron. The pattern of weights is what the network "knows"; finding good weights is the whole goal of learning.
How training adjusts the weights
Training is an iterative loop over the training data:
- The network makes a prediction for a training example.
- The prediction is compared with the known correct answer to compute an error (loss).
- The weights are adjusted to reduce that error - nudged in the direction that makes the next prediction closer to correct, with the adjustment propagated back through the layers.
- Repeat over many examples and passes; the error gradually falls as the weights improve.
Over time the network learns the patterns in the data, encoded entirely in its weights.
Deep learning
Deep learning uses neural networks with many hidden layers (deep networks). Each layer can learn increasingly abstract features automatically from raw data - early layers detect edges, later layers detect shapes, then objects. This makes deep learning excel at perception tasks such as image recognition, speech recognition and natural language processing, given large datasets and computing power.
Examples in context
Example 1. Face recognition on a phone. A deep network unlocking a phone learns, layer by layer, from edges to facial features to a whole-face representation, all from labelled face images. No engineer hand-codes "what a nose looks like" - the weights capture it through training, which is why deep learning replaced older hand-engineered approaches.
Example 2. Why deep learning needs lots of data and compute. Each weight is tuned from data, and deep networks have millions of weights, so they need large labelled datasets and significant computing power to train. This explains why deep learning surged alongside big datasets and powerful hardware, rather than decades earlier when the core ideas already existed.
Try this
Q1. Name the three kinds of layer in a feedforward neural network. [1 mark]
- Cue. Input layer, hidden layer(s), output layer.
Q2. How does a single neuron compute its output? [2 marks]
- Cue. It computes a weighted sum of its inputs plus a bias, then applies an activation function: .
Q3. In one sentence, how is a neural network trained? [2 marks]
- Cue. It repeatedly predicts, measures the error against the known answer, and adjusts the weights to reduce that error over many examples.
Exam-style practice questions
Practice questions written in the style of SEAB exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
Original6 marks(a) Describe the structure of a simple feedforward artificial neural network, naming the three kinds of layer. (b) Explain how a single artificial neuron computes its output from its inputs. (c) What is the role of the weights?Show worked answer →
(a) A feedforward neural network has an input layer (one neuron per input feature), one or more hidden layers (which transform the data), and an output layer (giving the prediction). Neurons in one layer connect to neurons in the next.
(b) A neuron computes a weighted sum of its inputs (each input multiplied by its connection weight), adds a bias, then applies an activation function to produce its output:
The activation function (such as a step or sigmoid) introduces non-linearity, letting the network model complex relationships.
(c) The weights determine the strength and importance of each connection - how much each input influences a neuron's output. Learning the right weights is how the network captures patterns; training adjusts them to improve predictions.
Markers reward the input/hidden/output layers, the neuron's weighted sum plus bias through an activation function, and weights as the learnable strengths of connections.
Original5 marks(a) Explain, in outline, how a neural network is trained to make better predictions. (b) State what is meant by deep learning and give one type of task at which it excels.Show worked answer →
(a) Training is iterative. The network makes a prediction on training data; the prediction is compared with the known correct answer to compute an error (loss). The error is used to adjust the weights so the next prediction is closer to correct (the weights are nudged in the direction that reduces the error, propagating the adjustment back through the layers). Repeating this over many examples and passes gradually reduces the error, so the network learns the patterns in the data.
(b) Deep learning uses neural networks with many hidden layers (deep networks), which can learn increasingly abstract features at each layer automatically from raw data. It excels at tasks such as image recognition, speech recognition and natural language processing, where hand-engineering features is impractical and large datasets are available.
Markers reward the predict-measure-error-adjust-weights iterative loop reducing error, and deep learning as many-layered networks excelling at perception tasks like image or speech recognition.
Related dot points
- Explain what machine learning is, how a model learns from training data, and how it differs from rule-based programming
A focused answer to the H2 Computing outcome on machine learning fundamentals. Learning a model from data rather than coding explicit rules, training and inference, features and labels, and the role of data quality.
- Distinguish supervised, unsupervised and reinforcement learning, and identify classification, regression and clustering tasks
A focused answer to the H2 Computing outcome on types of machine learning. Supervised learning with labelled data (classification and regression), unsupervised learning with unlabelled data (clustering), reinforcement learning, and matching a task to a type.
- Discuss the ethical and societal impacts of AI and automation, including bias, accountability, privacy and the effect on work
A focused answer to the H2 Computing outcome on AI ethics. Algorithmic bias, accountability and transparency, privacy and data use, the effect of automation on employment, and responsible approaches.
- Construct and interpret logic gates and truth tables, write Boolean expressions, and simplify them using Boolean algebra laws
A focused answer to the H2 Computing outcome on digital logic. The AND, OR, NOT, NAND, NOR and XOR gates, building and reading truth tables, writing Boolean expressions, and simplifying them with Boolean algebra laws and De Morgan.
- Analyse the time and space complexity of an algorithm using Big-O notation, and compare common growth rates
A focused answer to the H2 Computing outcome on algorithmic complexity. Big-O notation, deriving the order of growth from loops and recursion, the common complexity classes, and the trade-off between time and space.