New Tricks
Robo has already practised on thousands of drawn shapes. Now it must learn four new letters, T, L, X and V, from only a few examples. Does all that old practice help? Race three ways of learning and find out.
First, Robo goes to "shape school" right here in your browser. Watch the bar fill up!
Step 1: shape school starting…
Robo studies 4,000 random drawings of these 12 shapes. Its brain learns little "stroke spotters" along the way.
How to play: pick how many letter examples Robo gets, then press Race. All three learners see the same few examples and are tested on 400 new letters they have never seen.
Step 2: the race step 0
The examples every learner gets to study.
Score on 400 new letters while practising
Step 3: does it help more with few examples?
Robo races all three learners with 5, 10, 20, 30, 40 and 50 examples (two different example sets each) and plots the final scores.
Challenges
What just happened?
- Shape school taught Robo's brain to spot strokes: straight lines, slants, corners, curves. Nobody told it to; it just helped with the shapes.
- The new letters are made of the same kinds of strokes. So a brain that already spots strokes only has to learn "which strokes make a T".
- From scratch starts with a random brain. With a handful of examples it cannot work out what strokes even are, so it guesses badly on new letters.
- Frozen + new head locks the old brain and only trains a brand-new last layer. It is quick and safe with very few examples.
- Gentle fine-tune also lets the old brain move a little. With more examples it can tune the stroke spotters for letters and pull ahead.
- With lots of examples, the from-scratch brain catches up. Old practice matters most when new examples are scarce.
How it works
- A computer draws 4,000 wobbly 12 × 12 pictures of 12 shapes: different sizes, tilts, places and pen widths, plus speckles.
- Robo's brain (144 dots in → 48 cells → 24 cells → 12 answers) practises on them in small batches for 900 steps.
- For the new letters we throw away the last layer and add a fresh one with 4 answers: T, L, X, V.
- Three copies race on the same few examples: a random brain, the old brain with only the new layer learning, and the old brain with everything learning slowly (the old layers 10 times slower).
- Every few steps, all three take the same test of 400 new letters, and the chart shows their scores.
For grown-ups: what's really going on
This is transfer learning. The base model is an MLP 144 → 48 → 24 → 12 (tanh hidden units, softmax output) pretrained with Adam (lr 0.003, batch 32, 900 steps ≈ 7 epochs) on 4,000 procedurally rendered glyphs of 12 source classes (typically ~95% held-out accuracy). The target task has 4 disjoint classes (T, L, X, V) built from similar strokes, with N labelled examples (round-robin balanced) and a fixed 400-example test set.
- From scratch: same architecture, fresh random init, Adam lr 0.01, full batch.
- Linear probe: the 24-d penultimate features are frozen; only a new softmax head
Wh ∈ ℝ4×24is trained. Few parameters, so low variance: often best at the smallest N. - Full fine-tune: all weights train from the pretrained init with a new head; body layers use a 10× smaller learning rate (discriminative learning rates) so the useful features are adjusted, not destroyed. It usually overtakes the probe as N grows.
- The sweep shows sample efficiency: the pretrained init acts like a strong prior, and the advantage shrinks as N grows. Transfer only helps when source and target share structure; for unrelated targets, pretrained features can even hurt (negative transfer).
- Modern practice is the same recipe at scale: ImageNet- or CLIP-pretrained backbones, or language models, adapted with a probe or fine-tune on a small labelled set.
Everything is seeded (mulberry32), so a given N gives the same race. Your drawing is cropped to its bounding box, centred and averaged down to 12 × 12 before going in. No downloads: all training happens live in this tab.