AIQ AIQ
World 3: How AI Learns · Lesson 3.1.2

Finding Patterns

Everything a teacher needs to deliver this lesson — pick your grade's script below once you've read the background.

Learning Objectives

This lesson runs 5–15 minutes inside the app and sits right after "Learning from Examples" (3.1.1) in World 3. That earlier lesson taught supervised learning — AI learning from data that already has the right answers attached. This lesson flips that: what happens when nobody hands AI any answers at all, and it has to find structure in a pile of data on its own? That is unsupervised learning, and clustering is its most common form.

By the end of the lesson, a student should be able to:

Teacher Background

Every AI lesson before this one in the app has relied on labeled data — data that already comes with the right answer attached, like a photo tagged "cat" or an email marked "spam." That's supervised learning: the AI is shown thousands of labeled examples and learns to predict the label for new, unseen examples. This lesson introduces the other major branch of machine learning: what happens when there are no labels at all, just a pile of raw data and the instruction "find something interesting in here."

That is unsupervised learning, and the most common technique inside it is clustering — grouping data points together based on how similar they are to each other, with no predefined categories. Imagine handing an AI system a spreadsheet of a thousand customers' purchase histories, with no labels of any kind — no "type A" or "type B" column. A clustering algorithm will still find that, say, 200 of those customers buy similarly (mostly discount items, price-sensitive), 150 buy similarly in a different way (new gadgets, willing to pay a premium), and so on. Nobody told the AI those groups exist or what to call them; it discovered the groupings purely from patterns in the numbers.

The one-sentence version students should walk away with: unsupervised learning is AI finding its own groups and patterns in data, without anyone telling it the right answer in advance. Clustering is the main way it does that — grouping things by how alike they are.

How does "how alike they are" actually get measured? The app's own explanation is the honest, simple one: the AI treats each thing as a point that can be plotted, and measures the distance between points — points that are close together are treated as similar, points that are far apart are treated as different. A common clustering method, K-means, then works in repeated rounds: it starts by guessing a few "center" points (the "means"), assigns every data point to whichever center is nearest, recalculates each center as the average position of the points now assigned to it, and repeats — assign, recompute, assign, recompute — until the groups stop changing. The "K" in K-means is simply how many groups to look for, and a human has to choose that number ahead of time; the app is careful to flag this as one of unsupervised learning's real limits — there is no single "correct" grouping the way there's a correct label in supervised learning, and choosing K badly (too few groups lumps very different things together; too many splits one real group into several fake ones) can produce misleading results. One common way analysts pick a reasonable K, the "elbow method," plots how well the clusters fit for each candidate K and looks for the point where adding more groups stops helping much — the lesson's 11–14 quiz asks about exactly this.

For older students, the lesson introduces two more ideas that live under the same "no labels" umbrella but do a different job than clustering. PCA (Principal Component Analysis) and autoencoders are both about dimensionality reduction — simplifying data that has many measurements per item down to a few that still capture most of what matters. PCA finds the handful of directions in the data along which it varies the most and re-describes every data point using just those, discarding directions that carry little information. An autoencoder is a neural network trained to squeeze its input through a narrow "bottleneck" layer and then rebuild the original from that bottleneck — the network only gets good at this if the bottleneck has learned to hold a compressed, information-dense summary of the input. Neither needs a single label to train on; both learn purely from the structure of the data itself.

The oldest band also meets three more advanced ideas, presented as extensions of the same theme rather than a full new topic: t-SNE and UMAP, two techniques for squashing high-dimensional data down to a 2D or 3D picture a human can actually look at, while trying to keep points that were close together in the original data close together in the picture; VAEs (Variational Autoencoders), a variant of the autoencoder idea above that learns a probability distribution rather than one fixed compressed value, which lets you sample new points from that distribution and generate brand-new, plausible data rather than only reconstructing what went in; and SimCLR, a self-supervised method that manufactures its own training signal by taking two randomly altered versions of the same image (a crop, a color shift) and training the network to recognize that they came from the same source — again, no human-provided label required anywhere.

If a student asks "so does the AI know what the groups mean?" the honest answer is no. The AI finds that a set of points cluster together statistically; it has no idea that those points represent, say, "bargain shoppers." A person still has to look at what's in each cluster and assign it a meaningful name. That interpretation step is human work, at every age band.

Materials & Prep

No prep and nothing to print. Each student (or pair, if devices are shared) needs a phone, tablet, or computer with a browser and the AIQ app loaded — the lesson's hook, learn scenes, and quiz all run on-device with no login required. Read the Teacher Background above once before class. For the extension activities below, a handful of small everyday objects that can be sorted several different ways — buttons, coins, mixed candy, or a pile of school supplies — are useful but not required; index cards and a marker cover the same ground if objects aren't handy.

Common Misconceptions

"Unsupervised learning means no humans are involved at all."
A person still chooses how many groups to look for (K in K-means), still decides which data to feed in, and still has to look at the resulting clusters and figure out what they mean. "Unsupervised" only means the training data itself has no labels — it doesn't mean the process runs with zero human decisions.
"If AI can sort things into groups, it must understand what those groups are."
Clustering finds statistical similarity, not meaning. An AI grouping shoppers into "budget buyers" and "tech enthusiasts" has not the faintest idea what a budget is — it found that certain purchase patterns tend to occur together and separated them from other patterns. A human names the cluster afterward based on what's actually inside it.
"Clustering and classification (from the last lesson) are basically the same thing."
Classification, from "Learning from Examples," predicts a label that already exists — the AI was shown labeled cats and dogs and learns to sort new photos into those two known categories. Clustering has no predefined categories at all; it discovers however many groups the data itself seems to fall into, and those groups may not match any category a human had in mind.
"More clusters is always better — why not just set K really high?"
A very high K can split one real, meaningful group into several arbitrary slivers, which defeats the point of clustering in the first place. There's no single "correct" K; analysts commonly use approaches like the elbow method (11–14 quiz) to pick a K that's large enough to separate genuinely different groups but not so large that it's just chopping up noise.

Pick your grade's script

← All lesson plans ← Learning from Examples Learning from Mistakes →