A perfect score and one amber circle

The circle stays in exactly the same place. On blue, the classifier calls it a circle. Change the background to amber and it calls it a triangle. Across 64 unseen shapes, the same swap takes its score from 64 correct to zero.

I want students to have a good question to ask the next time they see a perfect score. What could the model have learned that would also explain this result? Backdrop Lab gives them a way to answer with a picture they can change themselves.

The repair worth pausing on

The starting tray contains 32 blue circles and 32 amber triangles. Both shape and color can predict the training label. A learner can break that pattern by adding amber circles and blue triangles, then training a fresh classifier on the expanded tray.

With 16 counterexamples, the model correctly identifies 36 of the 64 shapes on swapped backgrounds. The original amber circle is still one of its mistakes. This is where I’d pause the lesson. One student looking at the circle could say the repair failed. Another looking at the score could say it worked. What evidence would both accept?

In the filmed run with 64 counterexamples, the model gets 64/64 on each background condition and calls that amber circle a circle. The test pictures stay fixed throughout. Students can also try 32 counterexamples, which already gives 64/64 in both conditions on the lab’s default seed of 42.

Inside the experiment

The browser draws each picture and trains a logistic regression classifier. It measures the backdrop color at the four corners and how much of the shape’s bounding box the silhouette fills. Each of the 64 held-out shapes appears on both backgrounds with the same outline and position.

What the paired test reveals is easy to miss in a single score. Every model above gets all 64 familiar-color examples right. Only when the color pairing changes can a learner see which predictions depended on it and which survive retraining.

The next classroom challenge

I’d like to give classmates opposite roles. One would hide a shortcut in where a shape appears on the screen. The other would get to design a pair of pictures that exposes it. Then they would trade places.

Project origins

Backdrop Lab began during the STEM2Connect AI Hackathon as a new Education entry. The image generator, classifier, paired tests, browser lesson and demo were made for this event. The images and labels are generated locally.

Development credit

Developed with AI assistance from OpenAI Codex.

Built With

Share this project:

Updates

Submission history