Machine Learning
IB Syllabus: A4. Machine Learning (A4.1 what machine learning is and the hardware it runs on; A4.2 and A4.3 how models are trained and evaluated, HL).
Most software does exactly what a programmer told it to do, step by step. Machine learning is different: instead of writing the rules, you show a program many examples and let it work out the rules for itself. That one shift, from writing rules to learning rules from data, is behind spam filters, recommendation feeds, medical image screening, voice assistants, and the recent wave of generative AI.
These pages teach the ideas the current IB Computer Science course (first assessment 2027) expects you to understand, and they pair each idea with a hands-on simulator on the companion app so you can watch a real model learn. The concepts reach well beyond any one exam: knowing what a model can and cannot do, and how it can quietly go wrong, is now basic literacy for anyone who builds or uses software.
What This Topic Covers
| # | Topic | Syllabus | Key Concepts | Level |
|---|---|---|---|---|
| 1 | What Machine Learning Is | A4.1.1, A4.1.2 | Learning from data, the five types of machine learning and their applications, the hardware that runs it (GPUs, TPUs, ASICs, FPGAs, cloud, HPC) | SL + HL |
| 2 | Types of Learning | A4.1.1 · A4.3.2, A4.3.4, A4.3.5, A4.3.6, A4.3.7 | Supervised, unsupervised, and reinforcement learning in depth: k-nearest neighbours, decision trees, clustering, association rules, genetic algorithms | SL overview, HL depth |
| 3 | Training and Evaluating a Model | A4.2.1-A4.2.3 · A4.3.1, A4.3.3, A4.3.9, A4.3.10 | Preparing data, linear regression, overfitting and underfitting, accuracy, precision, recall and F1, neural networks and CNNs, choosing between models | HL |
The fourth part of the syllabus, the ethics of machine learning (A4.4.1) and of computing in daily life (A4.4.2), has its own topic. Once you understand how models work here, read Ethics of Machine Learning for the questions you should ask before trusting one.
Going Further: Three Stretch Pages
These three go behind the applications the syllabus names, and behind the tools you already use. Nothing on them is examined. They have no quizzes and they do not count towards your progress bar, which is deliberate: read them out of interest, not out of duty. Each section carries a label saying whether it is in the syllabus (with its code) or stretch, so you always know which is which.
| # | Page | What it explains | Best after |
|---|---|---|---|
| 4 | How Large Language Models Work | What a chatbot is actually doing: text becoming tokens, words becoming numbers that carry meaning, attention and the transformer, then the generation loop, human feedback and why it invents things | Page 1 (the three-minute video works on its own) |
| 5 | How AI Image Generation Works | Three genuinely different ways to make an image: two networks competing, compress-then-invent, and learning to undo noise; then how a sentence steers the result | Page 1; richer after CNNs on page 3 |
| 6 | AI Beyond Machine Learning | The half of AI that does no learning at all: logic and inference, game search, and getting a robot across a building. The sharpest way to see what machine learning is for | Page 1 |
A note on videos, since these pages lean on them. Some of the best sources are unedited live recordings that may not be embedded here, so where a section has no video you can watch, the page says so plainly and carries the explanation with original diagrams instead.
How the Levels Work
Machine learning splits cleanly by level in the current syllabus:
- Everyone (SL and HL) studies what machine learning is: the types of learning, where each is used, and the hardware it runs on. That is the first page.
- HL only goes on to study how models are built and judged: the specific algorithms behind each type of learning, how data is prepared, and how you measure whether a model is any good. That is most of the second page and all of the third.
Standard level students should read page 1 in full and can skim the HL sections on the later pages for interest. Higher level students need all three. Each HL section is labelled, and you can hide HL material with the level toggle at the top of each page.
The three stretch pages above sit outside this split entirely: they are not assessed at either level, so SL and HL students are equally welcome to read them.
How to Use These Pages
- Start with What Machine Learning Is even if you already know the buzzwords. The precise vocabulary (a label, a feature, a model) is what the later pages and the exam build on.
- Open the linked simulator for each concept. Machine learning is much easier to believe once you have watched a boundary line shift as a model trains, or seen accuracy stay high while fairness quietly fails.
- Keep the ethics page in mind throughout. Every technique here has a responsible-use question attached to it, and the strongest answers connect the two.