Instructor and student guide
Suggested activity sequence for pairs or small groups.
Learning outcomes
- Represent an image as a numerical tensor.
- Explain convolution, filters and feature maps.
- Describe the stages of a CNN.
- Distinguish confidence from correctness.
Suggested format
- Pairs or groups of three.
- 45–60 minutes.
- One student operates the interface; another records observations.
- Switch roles halfway through.
Step 1 — Predict before interacting (5 min)
- Ask students to draw a digit (e.g., 3, 5 or 8) without using the output section.
- Write down the intended digit and predict which features might distinguish it.
- Discuss whether another person could interpret the same drawing differently.
Step 2 — Inspect the pixel representation (8 min)
- Draw a digit and select Prepare 28×28 input.
- Inspect the pixel grid and compare it with the original canvas.
- Change the size or position of the digit and prepare it again.
- Discuss information lost through resizing and normalisation.
Step 3 — Explore convolutional filters (10–12 min)
- Inspect vertical, horizontal and diagonal filters.
- Compare each kernel with its resulting feature map.
- Identify where the filter responds strongly.
- Change the drawing and observe how the feature map changes.
Step 4 — Explain the CNN pipeline (8 min)
- Trace input → convolution → activation → pooling → dense layer → output.
- Explain what each stage transforms.
- Use the max-pooling example to discuss reduced spatial resolution.
Step 5 — Discuss output and uncertainty (8–10 min)
- Generate the illustrative class scores.
- Compare the highest score with the digit students intended.
- Change the drawing and observe the score changes.
- Discuss what evidence would be needed to trust a real classifier.
Step 6 — Debrief: connect to trustworthy AI (5–10 min)
- Distinguish accuracy, confidence and calibration.
- Discuss how uncertainty and limitations should be communicated.
- Identify documentation needed: training data, intended use, evaluation, limitations and failure cases.
1 · Draw a digit
Use a mouse, trackpad, stylus or finger. Draw one large digit near the centre.
Drawing canvas
Use a continuous stroke where possible.
Ready for a drawing.
The classification task
The input is a grayscale image. Each pixel is represented by an intensity value. A digit recogniser aims to assign the image to one of ten classes: 0–9.
Before proceeding: write down the digit you intended to draw.
2 · From pixels to numbers
Inspect the 28×28 grayscale input.
Pixel grid
Brighter cells represent higher pixel intensity.What does a pixel value mean?
Each pixel can be represented by a scalar normalised to [0, 1]. Dark background values are close to 0; bright strokes are closer to 1.
Discuss: What happens if the digit is too small, off-centre, faint, or written in a style unlike the training examples?
3 · Inside a convolutional neural network
These fixed kernels illustrate local pattern detection. Select a filter to calculate its feature map from the prepared drawing.
Feature map · vertical edges
Interpret the map
This filter compares left and right neighbourhoods. Brighter cells indicate stronger positive responses to local intensity changes.
The feature map is calculated from the current 28×28 image using the selected fixed kernel. It is not an activation extracted from a trained network.A simplified CNN architecture
Real CNNs may use multiple convolutional blocks, channels, normalisation, dropout and other components.
4 · Prediction and interpretation
Use this stage to discuss classification outputs and the limits of confidence scores.
Illustrative class scores
A simple rule-based teaching heuristic produces these scores from coarse image regions and stroke density. They are not produced by a trained neural network and are not calibrated probabilities.
What would a real classifier do?
- Apply learned convolution kernels and biases.
- Pass feature maps through nonlinear transformations.
- Reduce or aggregate spatial information.
- Compute class logits in a final layer.
- Optionally apply softmax to obtain a distribution.
Reflection and group discussion
- Representation: What information is lost when a drawing is converted to a 28×28 grid?
- Convolution: Why are small filters useful for detecting local patterns?
- Learning: How do fixed filters differ from filters learned during CNN training?
- Generalisation: Would a model trained on neat handwritten digits necessarily work for every student's handwriting?
- Uncertainty: Why is a high class score not proof that the prediction is correct?
- Transparency: What should a developer disclose about training data, intended use, performance and limitations?
Exit ticket
In 3–5 sentences, explain the journey from a hand-drawn digit to a CNN classification. Include one limitation and one reason confidence should be interpreted carefully.