A High School Guide to Neural Networks
Teaching computers to learn from examples, just like how you learned to recognize objects when you were young.
How do you teach a computer to recognize handwritten numbers?
Write millions of rules:
"If the pixels look like this... then it's a 7"
Nearly impossible!
Show it thousands of examples and let it figure out the rules.
Inspired by your brain!
Billions of neurons connected together, passing signals
Simulated neurons (math functions) connected, passing numbers
A special type of neural network designed for images
Image → CNN → Prediction
The image is converted to numbers (pixels)
Each pixel has a value from 0 (black) to 255 (white)
MNIST images are 28×28 pixels = 784 numbers
Problems that require colour information need even more data to represent all the RGB values
The network looks for patterns in the image
Shrinks the image to focus on important features
Reduces computation while keeping the most important information
Makes the final decision
Outputs 10 numbers (one for each digit 0-9)
The highest number is the prediction!
1. Show the network an image
2. Let it make a guess
3. Tell it if it's right or wrong
4. The network adjusts itself to do better next time
5. Repeat thousands of times!
In the app, you'll test three different trained models:
Training: 50,000 images for 10 epochs
What it teaches: This is a well-balanced model with proper training
Expected performance: Good generalization to new handwriting
Training: Same data + rotations, shifts, zoom variations
What it teaches: Data augmentation makes the model more robust
Expected performance: Better at handling different handwriting styles and angles
Training: Only 1,000 images for 50 epochs
What it teaches: Demonstrates overfitting—when a model memorizes instead of learns
Expected performance: Poor generalization, may struggle with your handwriting
Understanding the general pattern
Memorizing the specific examples without understanding
Good learning: Understanding the concepts so you can solve any problem
Overfitting: Memorizing only the practice problems, failing when test questions are different
Good learning: Reading 100 different books—learns diverse stories
Overfitting: Reading the same book 100 times—struggles with new stories
Creating variations of training data to make models more robust
This helps the model learn to recognize digits in many different styles!
Understanding why AI makes decisions
Neural networks are often called "black boxes"
We know what goes in and what comes out, but not always why
A technique that shows which parts of an image the CNN focused on when making its prediction
Think of it as highlighting what the AI is "looking at"
1. The CNN makes a prediction
2. We trace back through the network to see which pixels contributed most
3. Create a heatmap showing importance
4. Overlay the heatmap on the original image
Blue/Cyan = Low importance
Green/Yellow = Medium importance
Red = High importance
When you draw a digit, you'll see:
The digit you drew on the canvas
Heatmap showing where the model focused
Compare how different models "look at" the same digit!
CNNs are used everywhere:
Now you understand the basics of CNNs!
Created by Cole Corbett & Chance Page