What Is Machine Learning? KS3 Computing Explained

Machine learning is a branch of artificial intelligence in which a computer system improves its performance on a task by learning from data, rather than following explicit hand-coded rules. Spam filters, image recognition, and recommendation systems all use machine learning. At KS3 it represents the cutting edge of computing, and exam questions on it are becoming increasingly common.

What is machine learning and how is it different from traditional programming?

In traditional programming, a human writes explicit rules: "if the email contains the phrase 'click here to claim your prize', move it to spam". The programmer must anticipate every case and code a response.

In machine learning, no one writes explicit rules. Instead, the computer is given many examples — thousands or millions of emails labelled "spam" or "not spam" — and learns, automatically, which patterns predict spam. The rules emerge from the data.

Traditional programming:
Rules + Data → Computer → Output

Machine learning:
Data + Output (labels) → Machine learning algorithm → Rules (the model)

This distinction is important. Machine learning does not mean the computer is thinking or understanding. It means it has found statistical patterns in data that allow it to make predictions on new, unseen examples.

What is supervised learning?

Supervised learning is the most common type of machine learning at KS3 level. The system is trained on a labelled dataset — data where the correct answer (the label) is already known.

Consider training a spam filter:

Email content (input) | Label (correct answer)
"You have won £1 million! Click here..." | Spam
"Hi Aisha, see you at football practice on Thursday" | Not spam
"Claim your free gift now — limited time offer" | Spam
"Your council tax statement is attached" | Not spam

The algorithm analyses thousands of such examples, identifies which features (words, phrases, sender addresses, formatting patterns) predict each label, and builds a model — a mathematical representation of those patterns.

Once trained, the model can classify new emails it has never seen before, using the patterns it learnt.

What is unsupervised learning?

In unsupervised learning, the data has no labels. The algorithm must find structure in the data on its own, without being told what to look for.

The most common unsupervised technique at KS3 is clustering — grouping similar data points together. For example:

A music streaming service groups listeners with similar listening habits into clusters, then recommends what one cluster member listens to to others in the same cluster.

A supermarket groups customers by purchasing patterns to target promotions.

A medical researcher groups patients by symptoms to identify previously unrecognised disease subtypes.

Unsupervised learning is harder to evaluate than supervised learning, because there is no correct answer to check against.

Feature | Supervised learning | Unsupervised learning
Training data | Labelled (correct answers provided) | Unlabelled
Goal | Predict a label for new data | Discover hidden patterns or groups
Evaluation | Compare predictions to known answers | Harder — no ground truth
Examples | Spam filter, image classifier, fraud detection | Customer segmentation, topic modelling

What is training data and why does it matter?

Training data is the dataset used to teach a machine learning model. The quality and quantity of training data directly determines the quality of the resulting model. Two key risks:

Insufficient data — a model trained on only a handful of examples will fail to generalise. A spam filter trained on 50 emails will not perform well on the vast diversity of real-world email.

Biased data — if the training data over-represents certain patterns and under-represents others, the model will reflect those biases. A face-recognition model trained predominantly on light-skinned faces will perform poorly on darker-skinned faces. This is not a flaw in the algorithm itself; it is a flaw in the data used to train it.

Choosing, cleaning, and curating training data is one of the most important (and often most time-consuming) parts of building a machine learning system.

What are real-world examples of machine learning?

Machine learning is woven into your daily life whether or not you notice it:

Application | What it does | Type of learning
Spam filter | Classifies emails as spam or legitimate | Supervised
Face recognition | Identifies a person from a photograph | Supervised
Product recommendations | Suggests items you might want to buy | Both
Voice recognition | Converts speech to text | Supervised
Fraud detection | Flags unusual bank transactions | Supervised
Self-driving cars | Identifies pedestrians, signs, other vehicles | Supervised
Medical diagnosis | Detects tumours in X-ray or MRI scans | Supervised
Translation | Converts text from one language to another | Supervised

What are the ethical issues with machine learning?

Because machine learning models learn from human-generated data, they can reproduce human biases at scale. Key concerns:

Algorithmic bias — if historical hiring data shows that a company predominantly hired men for technical roles, an ML model trained on that data may prefer male applicants. The model learns the pattern without understanding that the pattern reflects bias, not merit.

Transparency — complex ML models (especially deep neural networks) are "black boxes": even their designers may not be able to explain why they reached a particular decision. This is a serious problem when the decision affects someone's job application, loan, or medical treatment.

Privacy — training data often contains personal information. Who owns that data? Who has the right to use it? GDPR places obligations on organisations that use personal data for automated decision-making.

Accountability — if an ML model makes a harmful decision, who is responsible: the programmer, the organisation that deployed it, or the company that provided the training data?

The DfE curriculum requires students to appreciate the wider implications of digital technology (gov.uk/government/publications/national-curriculum-in-england-computing-programmes-of-study). Understanding machine learning — both technically and ethically — is increasingly central to being a digitally literate citizen.

Frequently asked questions

What is machine learning in simple terms for KS3?

Machine learning is a way of teaching a computer to perform a task by showing it many examples, rather than by writing explicit rules. The computer analyses the examples, finds patterns, and builds a model it can use to make predictions on new data it has never seen before. Spam filters, recommendation algorithms, and voice assistants all use machine learning.

What is the difference between machine learning and traditional programming?

In traditional programming, a human writes explicit rules and the computer follows them. In machine learning, the computer is given labelled examples and discovers the rules itself. Traditional programming is transparent and predictable; machine learning can handle complex tasks where writing explicit rules would be impossible, but the resulting model may be difficult to interpret.

What is training data in machine learning?

Training data is the labelled dataset used to teach a machine learning model. In supervised learning, each example in the training data has an input (e.g. an email) and a correct label (e.g. "spam" or "not spam"). The model learns to map inputs to labels by finding patterns across many examples. The quality, quantity, and representativeness of training data are the most important factors in producing a reliable model.

What is algorithmic bias in machine learning?

Algorithmic bias occurs when a machine learning model produces systematically unfair results for certain groups of people. It typically arises because the training data reflects existing societal biases — for example, historical data in which certain groups were underrepresented or treated unfairly. The algorithm learns these patterns faithfully, reproducing the bias in its predictions. Addressing algorithmic bias requires careful curation of training data, diverse development teams, and ongoing evaluation of model outputs for fairness.

For Socratic computing tutoring at KS3 and GCSE — see aitutors.me.