Part 3 of Pruning and the Lottery Ticket
The Lottery Ticket Hypothesis
Module 3 · 6 min read
The Lottery Ticket Hypothesis
TL;DR
- A random network hides small “winning tickets” (under 10–20% of the weights, on small networks) that train to full accuracy from their original starting values.
- Find one by training, pruning 20%, rewinding the survivors and repeating. Big networks need rewinding to a point early in training.
- But structured shapes often train fine from scratch, and prune-at-init methods mostly learn per-layer ratios.
The puzzle
If 90% of a trained network can go, why not train that small network from the start? People tried, and with fresh random weights the pruned architecture usually trained to worse accuracy than the pruned network. In 2018 Jonathan Frankle and Michael Carbin proposed an explanation, which won the ICLR 2019 best paper award.
The hypothesis in plain words
The Lottery Ticket Hypothesis, roughly:
A big, randomly initialised network contains a small subnetwork that, trained on its own from the same starting weights, can match the accuracy of the whole network.
A huge network is like millions of lottery tickets. Most lose, but you almost surely hold a winner, a subnetwork whose random starting values happen to suit learning, and pruning finds it. The ticket is the shape (which connections exist) plus those original values. With new random values the effect mostly disappears.
In the demo below, each round trains, prunes the smallest 20% and rewinds the survivors. What’s left is the ticket.
How to find a winning ticket
Iterative magnitude pruning with rewinding goes like this:
- Randomly initialise and save the starting weights.
- Train.
- Prune the smallest 20% of the remaining weights.
- Rewind the survivors to their saved starting values.
- Repeat from step 2 for many rounds.
Step 4 throws away everything training learned except the mask. The small steps matter, since a big cut removes weights before the network can adapt, and in the paper iterative pruning found smaller tickets than one-shot pruning.
On small networks for MNIST and CIFAR-10, tickets under 10–20% of the original size matched its accuracy, and often learned faster and reached higher test accuracy. Randomly re-initialised, the same shapes did clearly worse.
It didn’t scale, at first
On bigger networks like ResNet-50 on ImageNet, rewinding to the start found no tickets. Stabilizing the Lottery Ticket Hypothesis and Linear Mode Connectivity and the Lottery Ticket Hypothesis (Frankle et al., 2019 and 2020) fixed this by rewinding to a point a small fraction of the way into training. It’s about stability. Very early, two copies of a big network trained with different batch orders end up in different places, but a bit later they land in the same “valley” of the loss, and that’s when tickets appear. Small networks stabilise almost immediately, so rewinding to the start worked there.
The critics
- “Just train the small shape.” Rethinking the Value of Network Pruning (Liu et al., 2019) found that for structured pruning, training the pruned architecture from scratch, given enough time, often matches pruning plus fine-tuning. There, pruning mostly finds a good shape and the weights add little.
- Pruning before training. SNIP (2019), GraSP (2020) and SynFlow (2020) score weights at initialisation, and SynFlow doesn’t even need data.
- The sanity check. Pruning Neural Networks at Initialization: Why are We Missing the Mark? (Frankle et al., 2021) shuffled each method’s kept weights within each layer, and accuracy barely changed. So what the methods really learned was how much to prune per layer. Which weights they kept barely mattered. They also stayed below pruning after training.
The strangest part: tickets that need no training
Deconstructing Lottery Tickets (Zhou et al., 2019) found “supermasks” that give an untrained random network accuracy far above chance. What’s Hidden in a Randomly Weighted Neural Network? (Ramanujan et al., 2020) went further, finding a subnetwork in a randomly weighted Wide ResNet-50 that matches a trained ResNet-34 on ImageNet without changing any weight. Choosing connections replaced training. This “strong” version is proven mathematically for some settings, starting with Malach et al. (2020). The original, practical version is an empirical finding with known limits, and it’s not a theorem.
What I take from all this. Big networks seem to train more easily partly because they hold many good small networks to choose from. How much the starting weights matter is still argued about, and depends on scale and on structured vs unstructured pruning. The idea changed how people think about why overparameterised networks work, but it hasn’t (yet) given us a cheap way to train small networks directly.
Quick check
In the original experiments, what happens if you keep a winning ticket’s shape but give it new random weights?
A ticket is the shape plus its original starting values. With new values it still trains, just worse, and that’s the key evidence for the hypothesis.
Q&A
Is finding a ticket cheaper than training the big network?
No, the opposite. Iterative pruning trains the network once per round. The paper explains why big networks work, it isn’t a faster way to train.
Do lottery tickets exist in Transformers and language models?
Ticket-like subnetworks have been found in BERT and other Transformers, usually with late rewinding. But retraining billion-parameter models many times is far too expensive, so practical LLM pruning is one-shot (part 4).
Papers
- Frankle, Carbin (2019). The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks.
- Frankle et al. (2019). Stabilizing the Lottery Ticket Hypothesis.
- Frankle et al. (2020). Linear Mode Connectivity and the Lottery Ticket Hypothesis.
- Liu et al. (2019). Rethinking the Value of Network Pruning.
- Lee et al. (2019). SNIP; Wang et al. (2020). GraSP; Tanaka et al. (2020). SynFlow.
- Frankle et al. (2021). Pruning Neural Networks at Initialization: Why are We Missing the Mark?
- Zhou et al. (2019). Deconstructing Lottery Tickets: Zeros, Signs, and the Supermask.
- Ramanujan et al. (2020). What’s Hidden in a Randomly Weighted Neural Network?
- Malach et al. (2020). Proving the Lottery Ticket Hypothesis: Pruning is All You Need.