Nudge the weights.

Six original Cambridge-style questions on neural networks, deep learning and back propagation, with worked solutions.

Original questions All questions on this page are original work, written in the Cambridge AS & A Level style. They are not from past papers. They test the same concepts and skills the syllabus rewards.
Keep these straight

Forward, then back.

01
Recall
[3 marks]

Describe the structure of an artificial neural network.

  • Nodes / artificial neurons arranged in layers: an input layer, one or more hidden layers and an output layer. ✓
  • Nodes in one layer are connected to nodes in the next layer, and each connection has a weight. ✓
  • Each node adds the weighted inputs and a bias and applies an activation function to produce its output. ✓
02
Calculate
[3 marks]

A network has inputs x1 = 2 and x2 = 1. Hidden node H1 has weights 0.5 (from x1) and −1.5 (from x2) and bias 0.2. Hidden node H2 has weights 0.25 and 0.5 and bias 0. Both hidden nodes use ReLU. The output node has weights 2 (from H1) and 0.6 (from H2), bias 0.1 and no activation function. Calculate the output.

  • H1: 0.5 × 2 − 1.5 × 1 + 0.2 = −0.3; ReLU gives 0. ✓
  • H2: 0.25 × 2 + 0.5 × 1 + 0 = 1.0; ReLU gives 1.0. ✓
  • Output: 2 × 0 + 0.6 × 1.0 + 0.1 = 0.7. ✓
03
Explain
[4 marks]

Explain how back propagation of errors is used to train an artificial neural network.

  • Training data is passed forward through the network to produce an output. ✓
  • The output is compared with the expected / target output to calculate the error. ✓
  • The error is propagated backwards from the output layer through the hidden layers, finding each weight's contribution to the error. ✓
  • Each weight is adjusted (by the learning rate times its gradient) to reduce the error; this is repeated over many examples / epochs until the error is acceptable. ✓
04
Calculate
[4 marks]

A neuron with no bias outputs y = w × x. The error is E = ½(y − target)2 and its gradient with respect to w is (y − target) × x. For x = 3 the target is 1.5. The weight is 0.2 and the learning rate is 0.05. Carry out one weight update and show that the error has decreased.

  • y = 0.2 × 3 = 0.6; y − target = −0.9; E = ½ × 0.81 = 0.405. ✓
  • Gradient = −0.9 × 3 = −2.7. ✓
  • New w = 0.2 − 0.05 × (−2.7) = 0.2 + 0.135 = 0.335. ✓
  • New y = 0.335 × 3 = 1.005; error −0.495; E = 0.1225 (to 4 d.p.), which is less than 0.405. ✓
05
Explain
[3 marks]

Explain why deep learning is used for tasks such as speech recognition and image classification.

  • The data (sound, pixels) is unstructured and its useful features are very hard to define by hand. ✓
  • The many hidden layers learn the features automatically, building from simple features to complex ones. ✓
  • Given large data sets and enough processing power, deep networks reach much higher accuracy than classical methods on these tasks. ✓
06
Analysis
[3 marks]

An estate agent has the sale prices and floor areas of 60 houses and wants to predict prices of new houses, and to explain each prediction to customers. A developer suggests a deep neural network. Evaluate this suggestion.

  • Deep learning needs very large data sets; with only 60 examples the network is likely to overfit and predict poorly on new houses. ✓
  • A deep network is a black box, so the agent could not easily explain why a price was predicted. ✓
  • Linear regression (price against floor area) needs little data and processing and is easy to explain, so it is more suitable here. ✓

Mark this once you have attempted all six and checked your working. It records a Practiced badge on the topic and adds a one-time bonus. Revealing the solutions alone does not count.