🟢 Applied AI — Beginner Level
Session 2: How does AI learn?
Program : Applied AI — Yann Isola
Audience : general public, accessible from 12 years old, no technical prerequisites
Recommended duration: 2 hours (adaptable 1h30 – 2h30)
Material : video projector, the interactive web page of the session (webpage/index.html , works offline), ideally 1 computer or tablet for 2 participants, a webcam if using Teachable Machine.
1. Educational objectives
At the end of the session, each participant should be able to:
- Explain in your words the 3 main ways in which an AI learns: supervised, unsupervised, by reinforcement — each with a real-life analogy.
- Understanding the role of data : the “fuel” of AI, and why quality matters as much as quantity.
- Distinguish training and use (inference): learning is long and expensive, using is quick.
- Describe an artificial neuron like a small calculator, and a neural network like layers of connected calculators.
- Recognize overfitting (overlearning): when the AI learns “by heart” instead of understanding.
- Train a mini-model yourself (Teachable Machine or simulator integrated into the web page).
🎯 The central message of the session: AI is not magically “intelligent” — it learns from examples, like us, but differently. And like a student, she can learn poorly!
2. Express reminder of Session 1 (5 min)
Ask the question: “Last time, we saw what AI was. Who can remind me of that in one sentence? »
Expected response (or to be given): a program that learns from examples instead of just following hand-written rules.
Today, we open the hood: HOW exactly does she learn?
3. Timed course
| Time | Sequence | Format |
|---|---|---|
| 0:00 – 0:05 | Home + reminder Session 1 | Discussion |
| 0:05 – 0:15 | Hook: the game of “teacher and student” | Collective game |
| 0:15 – 0:35 | The 3 ways of learning (supervised, unsupervised, reinforcement) | Presentation + analogies |
| 0:35 – 0:45 | Data: the fuel of AI | Presentation + discussion |
| 0:45 – 0:55 | Training vs. Use | Presentation + analogy |
| 0:55 – 1:10 | Artificial neurons + neural network (web page: visualizer) | Interactive demo |
| 1:10 – 1:20 | ☕ Break | — |
| 1:20 – 1:30 | Overfitting: the student who learns by heart (web page: demo) | Demo + discussion |
| 1:30 – 1:55 | 🖐️ Practical activity: training a mini-model | Pair workshop |
| 1:55 – 2:00 | Quiz + summary + teaser Session 3 | Quiz |
4. Detailed content, sequence by sequence
4.1 Hook: the game of “teacher and student” (10 min)
Aim : bring supervised learning to life BEFORE naming it.
Unfolded:
- Choose a volunteer: he becomes the “AI”. He leaves the room (or closes his eyes).
- The group chooses a simple secret rule, for example: “round objects are in category A, square objects in category B”.
- The animator shows objects (or drawings) one by one to the “AI” and announces the correct category: “Balloon → A. Book → B. Orange → A…”
- After 6-8 examples, we show a NEW object without giving the answer: “Plate →?” »
- If “the AI” answers A: it has generalized ! She learned the rule without being told.
Debriefing (essential):
- “Did I give him the rule?” » → No!
- “How did he/she find it?” » → By observing the examples + correct answers .
- “This is EXACTLY how an AI learns. »
💡 Facilitator tip: If the volunteer doesn’t find it, that’s even better! We can say: “It needs more examples — like an AI!” » and continue. Failure is part of the demonstration.
4.2 The 3 ways of learning (20 min)
This is the heart of the session. An analogy by fashion, to be hammered home.
A. Supervised learning 👩🏫 — “the teacher who corrects papers”
The idea: we give the AI examples with the correct answers (we say that the data is “labeled”). The AI makes a prediction, we compare it to the correct answer, and it corrects itself. Thousands, millions of times.
The analogy to develop: imagine a student doing math exercises. He suggests an answer, the teacher corrects: “Wrong, the correct answer was 12.” The student adjusts his method. Through corrections, he ends up knowing how to solve exercises that he has never seen .
The vocabulary to introduce (simply):
- Input : what we give to the AI (a photo, a text, etc.)
- Label : the correct associated response (“cat”, “dog”, “spam”…)
- Error : the gap between what the AI answered and the correct answer. Learn = reduce this error.
Concrete examples to cite:
- Recognize photos of cats/dogs (photos + “cat”/“dog” labels)
- Filter spam (emails + “spam”/“not spam” labels)
- Predict the price of an apartment (features + real price)
B. Unsupervised learning 🍬 — “sort candy without instructions”
The idea: this time, NO correct answers. We just give a bunch of data, and the AI has to find all alone groups, resemblances, structures.
The analogy to develop: they pour you a huge bag of sweets on the table and they just tell you: “Sort.” » Nobody tells you the categories. You will naturally group by color, or by shape, or by size. You have discovered categories that no one had given you.
🎲 Quick mini-activity (2 min): ask the group: “If I gave you 1000 songs with no information, how would you sort them? » (rhythm, atmosphere, voice/instrumental…). This is what a streaming platform does to create automatic playlists.
Concrete examples:
- Group a store’s customers by purchasing habits
- Detect “bizarre” behavior (bank fraud: an expense that does not resemble any usual group)
- Suggest “people who like X also like Y”
C. Reinforcement learning 🎮 — “learning a video game”
The idea: AI tries actions in an environment. Good deed → reward (points). Bad action → punishment (loss of points). She starts again millions of times and discovers the strategy that maximizes her points.
The analogy to develop: your first playthrough of a video game. Nobody gave you the manual. You press buttons: you fall into a hole → “punishment”, you start again. You grab a coin → “reward”, you do it again. After 50 games you are much better. Test → result → adjustment.
Concrete examples:
- AlphaGo (the AI that beat the world Go champion in 2016) has played millions of games against itself
- Robots that learn to walk (they fall thousands of times... in simulation!)
- Self-driving cars train first in simulators
Summary table to be constructed by the group:
| Fashion | We give him… | She learns... | Analogy |
|---|---|---|---|
| Supervised 👩🏫 | Examples + correct answers | To predict the correct answer | The teacher who corrects |
| Unsupervised 🍬 | Examples without answers | To find groups | Sorting candy |
| Reinforcement 🎮 | A playing field + points | The best strategy | Learn a video game |
⚠️ Frequently asked question: “And how does ChatGPT learn? » Honest and simple answer: a mix! First a form of learning on huge quantities of text (predicting the next word), then fine-tuning with humans noting the answers (which resembles reinforcement). ⚠ The exact methods are evolving quickly — it’s a dynamic field.
4.3 Data: the fuel of AI (10 min)
Message 1 — No data, no AI. An AI that has never seen cats will never recognize a cat. Data is its fuel: it is from them, and from them alone, that it learns.
Message 2 — More data = (often) better learning. A student who has done 1000 exercises is generally better than one who has done 10.
Message 3 — BUT not just any messages! This is the most important point. Three traps:
- False data → False AI. If the teacher corrects with a wrong answer key, the student learns wrong. (“Garbage in, garbage out” : waste in, waste out.)
- Unvaried data → AI with blinders. If the AI has only seen black cats, it risks missing white cats.
- Unbalanced or biased data → Unfair AI. Real example to cite: recruitment AI disadvantaged women because they had been trained on predominantly male hiring histories. AI reproduces flaws in its data.
💬 Discussion (3 min): “You want to create an AI that recognizes dogs. You only show him pictures of Labradors. What will happen with a chihuahua? » → She may not recognize him as a dog. Morality: diversity data matters.
4.4 Training vs use (10 min)
Two VERY different moments in the life of an AI:
| 🏋️ Workout | ⚡ Usage (inference) | |
|---|---|---|
| It's what ? | AI learns from data | AI answers a question |
| How long ? | Weeks, months | Less than a second |
| How much does it cost? | Very expensive (⚠ millions, or more, for the biggest AIs — the numbers change quickly) | Very few per request |
| How many times? | Once (then updates) | Billions of times a day |
| Analogy | The years of study of a doctor | A 20 minute consultation |
The doctor's analogy is the most effective: training a doctor takes 10 years and is very expensive. But once trained, each consultation is quick. We do not re-train the doctor for each patient!
The learned word to give: the use is called the inference . When you ask ChatGPT a question, it does not “relearn”: it used what he has already learned. This is why the response arrives within seconds.
💡 Trick question to ask the group: “When I chat with ChatGPT, does it learn from our conversation? » → No, not during the conversation: his “brain” is frozen after training. He remembers the current conversation (like notes on a draft), but he does not learn a permanent lesson from it. ⚠ Some services may use conversations for FUTURE training - hence the privacy issues (we'll talk about this again in a dedicated session).
4.5 Artificial neurons and the network (15 min)
⚠ Warn from the outset: the analogy with the brain is an inspiration, not a copy . An artificial neuron is infinitely simpler than a real neuron.
The artificial neuron = a small calculator
An artificial neuron is a tiny box that does 3 things:
- He receives signals (numbers) coming from other neurons.
- He weighs them : some signals count a lot (high weight), others little (low weight).
- He decides : if the total exceeds a threshold, it “lights up” and sends a signal in turn.
Nightclub bouncer analogy: the bouncer receives several pieces of information (age, outfit, attitude, etc.), he gives more or less importance to each (the weight ), and he makes a decision: enter/do not enter. A neuron, that’s it.
The key point: learn = adjust the weights. When the AI makes a mistake, it slightly modifies the importance given to each signal, in the right direction. Millions of small adjustments → AI gets better. This is the WHOLE secret of learning.
The network = layers of connected neurons
- Input layer : receives the raw data (e.g.: the pixels of an image).
- Hidden layers : each layer detects more and more complex things (features → shapes → ears/whiskers → “it’s a cat!”).
- Output layer : gives the final answer.
Impressive figure: our viewer shows around ten; ⚠ large conversation AIs have the equivalent of hundreds of billions of weight (parameters) — orders of magnitude change every year.
🖥️ Demo: the network viewer (web page, tab 1)
- Project the page. Show the signals flowing from left to right, layer by layer.
- Move them weight sliders : show that the output changes. “That’s what learning does: adjusts these sliders automatically. Except there are billions of them. »
- Use the “Auto Training” button to show self-adjusting weights.
- Allow 2-3 volunteers to handle.
4.6 Overfitting: the student who learns by heart (10 min)
The most subtle concept of the session — but the analogy makes it crystal clear.
The story to tell: two students prepare for a math test with the same book of 50 corrected exercises.
- Student A seeks to understand the method behind each exercise.
- Student B learn by heart the 50 answers: “exercise 12 → answer 42”.
On the day of the test, the teacher gives exercises new (but of the same type).
- Student A: succeeds. He has generalized .
- Student B: completely fails. He only knew how to recite.
Student B is overfitting (in French: overfitting ). The AI sticks to its training examples so much that it’s great at them… and terrible at anything new. But an AI is ONLY used for new things!
How is it detected? We keep secret exercises (the test data ) that the AI never sees during training. If she is brilliant at training but bad at the test → she has learned by heart.
🖥️ Demo: the overfitting curve (web page, tab 3)
- Start the animation: two curves rise together at the beginning (the AI progresses on everything).
- Then the “test” curve stagnates and comes back down while the “training” curve continues to rise → the curves diverge: this is the moment when the AI begins to learn by heart.
- Ask : “At what point should we have STOP training? » → at the top of the test curve. (The pros call it early termination.)
💡 Bonus discussion: the opposite also exists — the student who has not worked hard enough and who is bad everywhere (underfitting , underfitting). The goal: balance.
4.7 🖐️ Practical activity: training a mini-model (25 min)
Option A — Teachable Machine (recommended if Internet available) ⚠ Free tool from Google, the interface can evolve: teachablemachine.withgoogle.com
- In pairs: create an “Image Project”.
- Create 2 classes, e.g. : “open hand ✋” / “fist ✊” (or two objects: pen / eraser).
- Capture ~30 images per class with the webcam (vary the angles! remember the lesson on diversity of data).
- Click “Train” (≈ 30 seconds — note: “you experience a REAL workout, in miniature”).
- Test live: the model recognizes gestures!
- The educational twist: ask to test with the OTHER hand, or another person, or another light. Often, it works less well → " For what ? » → data not varied enough. The entire theory of the session has just been verified before their eyes.
Option B — Integrated simulator (without Internet) Use tab 2 of the web page (“Supervised learning simulator”): we train a classifier of labeled shapes, then we test it on shapes never seen before. Follow the instructions on the screen. The twist: the “little varied data” button shows the failure of generalization.
Joint debriefing (5 min): verbalize: “What made your model good?” Bad ? » → number of examples, diversity, quality. Full circle.
4.8 Summary + teaser (5 min)
The 6 ideas to remember (have the group recite):
- AI learns from examples , no magic rules.
- 3 modes : supervised (teacher), unsupervised (candy), reinforcement (video game).
- THE data are the fuel: quantity, quality, diversity.
- Train = long and expensive. To use = fast. (The doctor: 10 years of study, 20 minutes of consultation.)
- A neural network = layers of small computers; learn = adjust the weights .
- Overfitting = learn by heart instead of understanding. The test on something never seen before is the justice of the peace.
Teaser Session 3: “Now that we know how AI learns… we will meet the star: generative AI. How can a machine WRITE, DRAW, COMPOSE? Answer next time. »
5. Frequently asked questions from participants (and ready answers)
“Does AI have a real brain? » No. Artificial “neurons” are very simple calculations, just inspired of the brain. A real biological neuron is thousands of times more complex. It’s a useful metaphor, not a copy.
“If AI learns on its own, can it become uncontrollable? » It does not learn “alone” in the free sense: it learns what its data and its objective make it learn, within a framework defined by humans. The real current risks are more concrete: errors, data bias, misuse. (Session dedicated to ethics later.)
“Why does the AI still make mistakes even though it has seen millions of examples? » Because the real world always contains cases that she has never seen, and that she does not “understand” like us: she spots statistical regularities. Novelty + imperfect regularities = possible errors.
“What is the difference between AI, machine learning and deep learning? » Russian dolls 🪆: the AI is the big family; THE machine learning (machine learning) is the part that learns from data (the topic of the day!); THE deep learning (deep learning) is the part that uses BIG neural networks with many layers.
“Are my photos used to train AI? » Possibly, depending on the services you use and their terms of use. ⚠ Rules (and laws, like the European AI Act) are evolving — good question to explore in the ethics/privacy session.
6. Adaptations according to the audience
- Middle school students (12-15 years old): emphasize games (hook + video game + Teachable Machine). Reduce the “biased data” part to a simple example. Quiz in team mode.
- General adults: develop professional examples (spam, fraud, recruitment) and the discussion on personal data.
- Fast group: add the notion of underfitting and the IA/ML/DL Russian doll table.
- Without Internet / without webcam: everything is planned — the web page works 100% offline, option B replaces Teachable Machine.
7. Animation pitfalls to avoid
- ❌ Getting into math (activation functions, gradients, etc.): NO formulas in this session.
- ❌ Say “AI understands” without quotation marks: prefer “it identifies regularities”.
- ❌ Let us believe that brain = neural network.
- ❌ Moving on from the practical activity too quickly: it’s the most memorable moment, protecting your 25 minutes.
- ❌ Give precise figures on the costs/sizes of the models without the marker ⚠: these figures expire in a few months.
Applied AI — Yann Isola · Beginner Level 🟢 · Session 2/… ⚠ = volatile information, to be re-checked before each session.