AIQ AIQ
Finding Patterns · Lesson 3.1.2

Teaching "Finding Patterns" to Architect mode (ages 15–18)

Part of the Finding Patterns lesson guide. Teaching a different grade? 🌈 Explorer (5–7) · 🔧 Builder (8–10) · 💻 Hacker (11–14)

Hook & Warm-Up

Open by asking: "Every AI example you've seen in this app so far was trained on labeled data — something told it the right answer. What fraction of the world's actual data do you think comes with a label attached?" Let a few guesses land, then note that the honest answer is a small fraction — most data generated by the internet, sensors, transactions, and images has no human-assigned label at all, which is exactly why unsupervised and self-supervised methods matter so much in practice.

"Unsupervised learning encompasses manifold learning, generative modeling, and self-supervised representation learning. Let's examine methods from classical clustering to modern contrastive learning."

Frame the lesson's arc explicitly: it moves from classical clustering (K-means) they may recall from the Hacker-mode version of this lesson, through dimensionality reduction (PCA, t-SNE, UMAP) used to compress or visualize data, to modern generative and self-supervised methods (VAEs, SimCLR) that current AI research and industry systems actually depend on for pretraining. Open the app and move through the hook screen's icons before starting the scenes.

If any students are considering a computer science, data science, or AI-adjacent path after graduation, mention explicitly why this branch matters practically: most large-scale AI systems today are pretrained on huge amounts of unlabeled data using self-supervised objectives, then fine-tuned on a much smaller labeled dataset for a specific task. Labeling data is slow and expensive; unsupervised and self-supervised methods are largely how the field has scaled past that bottleneck over the past decade.

Main Activity

The app's three learn scenes cover clustering and its applications; treat the summary's PCA, autoencoder, t-SNE/UMAP, VAE, and SimCLR content — reflected in this age band's quiz — as the material to build out explicitly in your own delivery, since it isn't in the scene text itself.

Scene recap: Clustering and its uses

Move quickly through the scenes as a recap rather than new material for this age group: K-means clustering groups unlabeled data by iteratively assigning points to the nearest of K centroids and recomputing those centroids as the mean of their assigned points, until convergence — used for customer segmentation, pixel/color grouping, and anomaly-style fraud detection (flagging transactions that are statistical outliers relative to a learned "normal" pattern). Note the real limitation directly: K must be chosen in advance, results depend on centroid initialization, and there is no ground truth to validate against — only heuristics like the elbow method.

Worth a brief aside for this age group: K-means also assumes clusters are roughly round and similarly sized, because it's built entirely around distance to a single center point. Real data often violates that assumption — elongated, irregularly shaped, or very unevenly sized groups can confuse it — which is one reason the field developed other clustering approaches (density-based methods like DBSCAN, hierarchical clustering) that this lesson doesn't cover but that exist for exactly this reason.

Dimensionality reduction: PCA, t-SNE, and UMAP

PCA finds the orthogonal directions (principal components) along which the data varies most, and re-projects the data onto the top few of those directions — a linear technique that preserves global variance but not necessarily any particular local relationship between points. t-SNE takes a different approach aimed specifically at visualization: it tries to preserve local neighborhood structure — points that were close in the original high-dimensional space stay close in the 2D/3D plot — often at the cost of distorting distances between distant clusters, which is why axis values on a t-SNE plot aren't meaningfully comparable across clusters. UMAP serves a similar visualization purpose and is commonly used as a faster alternative to t-SNE that also tends to preserve more of the data's overall (global) shape, not just local neighborhoods — useful context if students later encounter both in a data science context.

A genuinely important caveat for this age band: a t-SNE or UMAP plot is a distortion by design, optimized to make local structure visible to a human eye — treat it as a diagnostic visualization, not as ground truth about the actual geometry or distances in the original data.

Generative unsupervised learning: autoencoders and VAEs

A standard autoencoder learns to compress input through a narrow bottleneck layer and reconstruct it, trained only against its own input (no labels) — useful for compression and denoising, but the bottleneck it learns is a single fixed point per input, which doesn't support generating genuinely new data. A Variational Autoencoder (VAE) changes this: instead of encoding an input to one fixed point, it encodes it to a probability distribution (a mean and a variance) over the latent space. Because that latent space is now continuous and probabilistic, you can sample a random point from it and decode that sample into a brand-new, plausible output the network never saw during training — the mechanism the quiz is testing. This is the conceptual ancestor of much of today's generative AI, though modern image and text generators mostly use different, more advanced architectures.

Self-supervised representation learning: SimCLR

SimCLR solves a different problem: learning useful representations from unlabeled images without reconstructing anything at all. It takes one image, produces two independently augmented versions of it (random crop, color distortion, blur), and trains a network so that the two augmented views of the same source image end up with similar representations ("positive pairs"), while views from different source images end up dissimilar ("negative pairs") — a contrastive loss. Critically, no human ever labeled anything; the "label" (same image or not) is manufactured automatically from the data augmentation process itself. This is what makes it self-supervised rather than purely unsupervised: it invents its own supervisory signal.

Tie it together with the "representation learning hypothesis" from the quiz — one influential idea in the field (associated with researchers like Yoshua Bengio) is that a genuinely good learned representation should disentangle the underlying factors of variation in the data — for a face dataset, ideally separate directions for pose, lighting, and identity, say, rather than tangling them together. Present it as a guiding hypothesis that shapes how researchers evaluate representations, not as a proven, settled law.

A useful way to make "disentangled" concrete for this age band: imagine a learned representation of a face where one dimension smoothly controls how much the person is smiling and nothing else changes, another controls head rotation and nothing else changes, and so on — versus a tangled representation where changing one number shifts smiling, lighting, and pose all at once, unpredictably. The first is what "good," disentangled representations are hypothesized to look like; the second is what an unstructured or poorly trained representation tends to produce.

Close by reading the app's own summary together: "Advanced unsupervised methods include t-SNE and UMAP for visualizing high-dimensional data. VAEs learn to generate new data. Self-supervised methods like SimCLR create training signals from data augmentation. These learn rich representations without labels."

Discussion

Quiz Walkthrough

t-SNE is primarily used for...
Visualizing high-dimensional data in 2D/3D while preserving local structure. It's a visualization tool, not a training method or classifier — it's optimized to keep points that were near each other in the original data near each other in the plot, at the cost of not preserving global distances reliably. It's easy to over-read a t-SNE plot as ground truth about a dataset's real geometry; flag that risk explicitly when discussing this answer.
VAEs differ from standard autoencoders by...
Learning a probabilistic latent space enabling generation. A standard autoencoder maps input to one fixed compressed point; a VAE maps it to a distribution, which you can sample from to generate new data — this is about the nature of the latent space, not just more layers or a bigger model.
Self-supervised contrastive learning (SimCLR) creates training signal by...
Treating augmented views of the same image as positive pairs. Two randomly altered versions of one image are pulled together in representation space, while views from different images are pushed apart — no human annotation or labels are used anywhere in this process.
The representation learning hypothesis states that...
Good representations disentangle underlying factors of variation. It's a guiding idea about what makes a learned representation useful — separating out the true independent causes behind the data — rather than a claim about data size or model size.

Wrap-Up & Extension

Close with: "Almost every large AI system you interact with today — image search, language models, recommendation engines — relies on some form of unsupervised or self-supervised pretraining on unlabeled data before any labeled fine-tuning happens, precisely because labeled data is scarce and unlabeled data is nearly infinite. The techniques in this lesson aren't a historical footnote — they're closer to the foundation." Connect it back to the earned "Pattern Finder" badge: every method covered today, from a simple K-means loop to a SimCLR contrastive objective, is a different engineering answer to the same underlying question — how do you extract genuinely useful structure from data when nobody hands you the answer key.

Extension activity (25–30 minutes, or take-home): Have students find (or you provide) an interactive t-SNE or UMAP visualization tool online showing a well-known dataset (a common one is a t-SNE projection of handwritten digit images). Ask them to identify: (1) which clusters are visually well-separated and which overlap, (2) one thing the 2D plot might be hiding or distorting about the true structure of the data, and (3) whether the visible clusters correspond to the dataset's real labels (in cases where labels exist to check against, like digit datasets, this is a good way to sanity-check that unsupervised structure and human-meaningful categories can align, even though nothing forces them to). Have students write two or three sentences connecting what they observed back to the local-structure-preservation property discussed in class.

For a group interested in going further, pose an optional research question as homework: "Find one real product or research system that uses a VAE, or one that uses a self-supervised pretraining method like SimCLR or a related contrastive approach. What was it trained on, and what task did the pretraining make easier?" This pushes past the classroom examples toward the current, active state of the field, and it's normal for students to come back with systems well beyond what this lesson covers — that's a sign the extension worked, not a sign the lesson under-prepared them.

← Lesson overview ← Learning from Examples (Architect) Learning from Mistakes (Architect) →