Vibe Engines
YouTube

Vibe Engines is free, interactive AI engineering & system design — runs in your browser. Pick a learning path

~11 min read2019

Winning
tickets.

You can throw away 90% of a trained network's weights and it still works — everyone knew that. The shock in this paper is subtler and stranger: that sparse survivor could have been trained on its own from the very beginning, if only you'd known which weights to keep and left them at their original random values. Hidden inside a big network, before a single gradient step, is a small subnetwork already holding a winning ticket. Reset it to a different random draw and it loses. The structure and the lucky initialization are one thing. Here's how iterative magnitude pruning finds the ticket, and why the reset is everything.

The delta

What changes against every rung below: the question, not the method

Rungs 1 through 6 are all answers to "how do we train this network successfully". This rung asks what the successful training actually needed, and it is the only one here that is a claim about networks rather than a technique for building them. Pruning a trained network down to a small fraction of its weights was already known to preserve accuracy. The open question was whether that small subnetwork could have been trained on its own, or whether the discarded weights were load-bearing during training.

The finding is that it could — with one condition that is the whole result. Take the pruned subnetwork's connections, and reset its surviving weights to the exact values they were initialised with, not to fresh random ones. Trained from that initialisation, in isolation, it matches the full network's accuracy in a comparable number of steps. Reinitialise the same structure randomly and it does not. So what the procedure finds is not a good architecture; it is a structure paired with a particular starting point — the winning ticket.

Stated in units: the surviving fraction is reported in the region of 10–20% of the original weights on the small image classifiers used, found by iterative magnitude pruning — train, remove the smallest-magnitude fraction, rewind the rest, repeat. Which also states the cost honestly: the method needs many full training runs to find a network you could have trained in one, so as stated it is an existence proof, not a saving.

01

A bag of tickets

Modern networks are wildly over-parameterized — millions or billions of weights for tasks that seemingly need far fewer. We've long known you can prune a trained network, deleting most of its weights, and keep almost all the accuracy. The puzzle was always: if the small network is enough, why couldn't we just train the small network directly? In practice, training a comparably small network from scratch gave worse results. Over-parameterization seemed necessary for training, even if not for the final function.

The Lottery Ticket Hypothesis (Frankle & Carbin, 2019) offered a startling answer. A dense, randomly-initialized network contains a sparse subnetwork — a winning ticket — that can be trained in isolation to full accuracy, provided you start it from the same initial weights it had inside the big network. The dense network is a bag of lottery tickets: many candidate subnetworks, each with its own random initialization, and training reveals which ones held winning numbers. Over-parameterization helps not (only) because big functions are better, but because more tickets means better odds that some subnetwork got a lucky initialization.

The one-sentence version

A randomly-initialized dense network contains a sparse subnetwork that, trained from the same initialization, matches the full network's accuracy — found by iteratively pruning the smallest-magnitude weights and resetting the survivors to their original init.

02

Finding the ticket

The recipe is iterative magnitude pruning, and it's remarkably simple:

One round of iterative magnitude pruning
1 · save initRecord the network's original random weights before training.
2 · trainTrain the dense network to completion as usual.
3 · pruneRemove the smallest-magnitude p% of weights — build a keep/drop mask.
4 · resetSet surviving weights back to their step-0 init values (not trained, not random).
5 · repeatTrain the masked subnet, prune again — sparsity compounds each round.

The pruning criterion is just magnitude: after training, weights that ended up near zero are judged least important and cut, leaving a binary mask of kept (1) and removed (0) connections. Doing it iteratively — prune a modest fraction, retrain, prune again — finds much sparser winning tickets than pruning all at once, because each round re-evaluates importance on the smaller network. After k rounds at pruning fraction p, only (1−p)^k of the weights remain; a few rounds at 20% gets you to a small fraction of the original. What survives is a sparse skeleton — but the skeleton alone isn't the ticket.

03

Why the reset matters

Here is the finding that made the paper famous. Take the winning ticket — the sparse mask you found — and consider three ways to initialize its surviving weights before training it in isolation:

Initialize survivors to…What happens
Their original init valuesWins. Trains to match (or beat) the full network — this is the winning ticket.
Fresh random valuesLoses. The same sparse structure trains noticeably worse and often fails to match.
Their trained (final) valuesThat's just ordinary post-training pruning — not the claim being tested.

The mask alone — a good sparse architecture — is not enough. What makes a ticket win is the specific combination of which connections survive and the exact random values those connections started with. Randomly reinitializing the same structure throws away the winning numbers. That's why it's a lottery: the surviving weights happened, by chance, to be initialized in a configuration that gradient descent could ride to a good solution. The reset-to-init step preserves that lucky draw. It's a claim about the entanglement of structure and initialization — not just that small networks can work, but that they were secretly trainable all along, if you knew the ticket.

04

Pruning, precisely

A winning ticket is the original network f(x; θ₀) restricted by a binary mask m, trained from that same θ₀:

θ₀ are the original init weights; m is the keep/drop mask from magnitude pruning (⊙ is elementwise product). The ticket trains from m ⊙ θ₀ — masked structure, original initialization.

Two quantities describe the ticket. Sparsity is the fraction of weights removed (the zeros in m); remaining density is 1 − sparsity. Under iterative pruning, if you remove a fraction p each round, the fraction of weights still alive after k rounds is multiplicative:

Pruning compounds: each round cuts a fraction of what's left, so density decays geometrically. The runnable version below builds a magnitude mask, applies it, measures sparsity, resets survivors to init, and computes the compounding.

How it works

How Frankle and Carbin found and tested winning tickets

  1. Initialize and save. Draw θ₀ from the network's normal initialization (Gaussian Glorot in these experiments) and keep a copy.
  2. Train to completion. Train for j iterations on the usual schedule, giving θj.
  3. Prune by magnitude, layer by layer. The criterion is the one earlier pruning work, such as the 2015 method of Han and colleagues, used to compress trained networks: remove the lowest-magnitude fraction of each layer's weights, 20% per round for Lenet's fully connected layers, 10% for the convolutional layers of Conv-2 and Conv-4 and 15% for Conv-6, and half the usual rate for connections into the output layer.
  4. Rewind the survivors to θ₀. The candidate is f(x; m ⊙ θ₀): the mask comes from the trained weights, the values from initialization.
  5. Repeat. Retrain the masked network, prune again from its new trained weights, rewind again. After n rounds at rate r a layer keeps (1 − r)^n of its weights; Lenet's reported sizes of 51.3%, 21.1% and 3.6% correspond to about 3, 7 and 15 rounds at 20%.
  6. Run the controls. Train each mask again from a fresh random initialization, and compare one-shot pruning, a single cut to the target size, with the iterative schedule. Reported curves average five trials.
  7. Judge by two numbers. The iteration of minimum validation loss (the early-stopping point, used as the measure of learning speed) and the test accuracy at that iteration. A winning ticket must be no slower and no less accurate than the dense network.

The networks

Lenet-300-100 (266,000 weights) on MNIST, trained for 50,000 iterations at batch 60 with Adam at 1.2 × 10^−3. Conv-2, Conv-4 and Conv-6 on CIFAR-10: scaled-down VGG-style networks with two, four or six 3 × 3 convolutional layers, max pooling after every pair, and fully connected layers of 256, 256 and 10 units, trained with Adam at 2–3 × 10^−4 for 20,000 to 30,000 iterations. Then two deeper CIFAR-10 networks, VGG-19 (20 million weights) and a ResNet-18 of the small CIFAR design, three stages of 16, 32 and 64 filters with about 270,000 weights rather than the ImageNet model, trained with SGD and momentum 0.9 at a learning rate of 0.1 stepped down tenfold twice. For these two the authors switch to global pruning, a single magnitude threshold across all convolutional layers at 20% per round, because, the authors conjecture, pruning each layer at the same rate made small layers bottlenecks: VGG-19's first two layers have 1,728 and 36,864 weights, its last 2.35 million.

100% 51.3% 21.1% 3.6% weights remaining, log scale test accuracy dense network learns faster, scores higher winning ticket, reset to θ₀ same mask, random re-init
Schematic of the pattern reported for Lenet-300-100 on MNIST, with the paper's checkpoints marked: rewound tickets beat the dense network over a wide range of sizes, learn fastest near 21%, and return to its accuracy at 3.6%, while random re-initialization of the same masks loses accuracy almost at once.

The learning-rate condition

At the learning rate that trains VGG-19 and ResNet-18 best, 0.1, iterative pruning found no winning tickets: rewound subnetworks did no better than random reinitialization. At 0.01 the usual pattern returned, but those subnetworks fell short of what the dense network reaches at 0.1; ResNet-18's best reached 89.5% against 90.5%. Linear learning-rate warmup restored the effect: 10,000 warmup iterations at a rate of 0.1 for VGG-19, and 20,000 at 0.03 for ResNet-18.

The math

The hypothesis, stated formally

dense: f(x; θ₀), θ₀ ~ Dθ → minimum validation loss at iteration j, test accuracy a
∃ m ∈ {0, 1}^|θ|: training f(x; m ⊙ θ₀) alone gives j′ ≤ j, a′ ≥ a, ‖m‖₀ ≪ |θ|
control: f(x; m ⊙ θ₀′), with θ₀′ ~ Dθ freshly drawn
  • Dθ — the initialization distribution the network normally uses.
  • m — the binary mask; ‖m‖₀ counts the weights kept.
  • j′ ≤ j — commensurate training time, measured at the minimum of validation loss.
  • a′ ≥ a — commensurate accuracy, on the test set at that point.
  • θ₀′ — the control: same mask, new values; the claim is that this one fails.

Extremes: m = all ones satisfies the statement trivially, since the dense network is its own ticket, so all of the content is in ‖m‖₀ ≪ |θ|. Push sparsity far enough and a′ ≥ a must fail; for Lenet it held down to about 3.6% of the weights, where tickets fell back to the dense network's accuracy. The statement is existential: it says such an m exists, and iterative magnitude pruning is only the paper's way of finding one, so a failure of that procedure on a larger network does not by itself refute it.

The evidence

What the pruning experiments showed

Network, dataLearning speedTest accuracy
Lenet-300-100, MNISTearly stopping 38% sooner at 21.1% of weightsabove the dense net at 51.3% and 21.1%; back to dense level at 3.6%
Conv-2, CIFAR-10up to 3.5× faster (at 8.8% of weights)up to +3.4 points (at 4.6%)
Conv-4, CIFAR-10up to 3.5× faster (9.2%)up to +3.5 points (11.1%)
Conv-6, CIFAR-10up to 2.5× faster (15.1%)up to +3.3 points (26.4%)
VGG-19, CIFAR-10, with warmup—tickets beat the dense net down to 1.5% of weights
ResNet-18, CIFAR-10, with warmup—90.5% at 27.1%; tickets down to 11.8%

The controls carry the argument. The same masks with fresh random initializations learned more slowly than the dense network and lost accuracy after little pruning, so structure alone was not enough. One-shot pruning also found tickets, reaching minimum validation loss sooner than the dense Lenet between 67.5% and 17.6% of weights, but iterative pruning found ones that learned faster and stayed accurate at smaller sizes. Tickets survived dropout (rate 0.5) and the gains stacked: on top of dropout's own improvement, pruning added up to 2.3, 4.6 and 4.7 points for Conv-2, Conv-4 and Conv-6. Tickets also generalized better: like the dense networks they reached 100% training accuracy, but with a smaller gap to test accuracy.

The negative result is the deeper networks' dependence on warmup: without it, at their standard learning rate, iterative pruning found nothing better than random reinitialization. That condition is where later work, which rewinds to weights from early in training instead of θ₀, picked up.

Since then

What the authors admit, and what happened next

The paper is explicit about its evidence base — small networks on small image datasets — and about the expense of iterative magnitude pruning. It frames the result as a hypothesis, which is the correct register for a claim of this shape, and does not assert that winning tickets exist in arbitrarily large models.

That caution was warranted. Scaling the procedure to large networks needed a modification that weakens the headline: rewinding to the original initialisation stops working, and you have to rewind to the weights from some early training step instead. Whether the specific initialisation matters, or whether what is really being found is a trainable sparse structure plus any sufficiently early state, is contested — work by Liu and colleagues and by Gale and colleagues found that under fair training budgets, randomly-initialised sparse networks and one-shot magnitude pruning are stronger baselines than the original comparison implied.

How it held up: as a research programme it has been enormously productive — it made "what does initialisation determine" a measurable question. As an engineering technique it mostly has not, and the reason is hardware rather than machine learning: unstructured sparsity scattered across a weight matrix gives little wall-clock speed-up on hardware built for dense matrix multiplication, so the compression that actually ships is structured — distillation to a smaller dense model, quantisation, or the sparsity-by-routing that skips whole subnetworks per token instead of individual weights.

SOLVE IT YOURSELF

Magnitude pruning, from scratch

Iterative magnitude pruning is the whole method. Here it is on a tiny weight vector: build a mask that keeps the largest-magnitude weights and drops the smallest, apply it, measure the sparsity, and — the crucial step — reset the survivors to their original initialization to form the winning ticket. The last function shows how density compounds: prune 20% per round for three rounds and 51.2% of the weights survive. Change the weights and the prune fraction and watch which connections win.

YOUR TASK

Write the body of magnitude_mask. Everything else in the file is already written; this is the function the paper is about. Press ▶ Run to check it against the 5 assertions below — they start red.

WHAT IT HAS TO SATISFY — 5 ASSERTIONS
  1. Magnitude pruning removes the SMALLEST-magnitude weights, keeps the largest
  2. Sparsity is the fraction of pruned (zero) weights
  3. Applying the mask zeros out exactly the pruned weights
  4. The winning ticket resets survivors to their ORIGINAL init (not trained, not random)
  5. Iterative pruning compounds -- 3 rounds at 20% leaves (0.8)^3 = 0.512
CPython · WebAssembly
06

Sparsity from the start

The Lottery Ticket Hypothesis launched a wave of work on sparse training: if trainable sparse subnetworks exist from the beginning, can we find them cheaply — or even at initialization, before training — and then train sparse from the start to save compute and memory? Methods like SNIP, GraSP, and the "Rigging the Lottery" (RigL) line chase exactly this, trying to skip the expensive prune-retrain loop. Others study whether tickets transfer across tasks and datasets, which would make a found ticket a reusable asset.

It also connects to the broader efficiency story. Where knowledge distillation compresses a model by retraining a small student, and low-rank adaptation makes fine-tuning cheap by constraining updates, the lottery ticket line attacks the same goal — capable models at a fraction of the cost — from the angle of sparse structure. And it deepened a genuine mystery about why deep, over-parameterized networks are so trainable in the first place. Even where the practical payoff is still being worked out, few papers reshaped how the field pictures the inside of a neural network as sharply as this one: not a monolith that needs all its weights, but a haystack full of winning tickets.

Worth knowing

A key follow-up (Frankle et al., "Linear Mode Connectivity and the Lottery Ticket Hypothesis") introduced rewinding: instead of resetting survivors all the way to step-0 init, reset them to their values after a small number of early training iterations. On larger networks like ResNet-50 this "late rewinding" is what actually finds stable winning tickets — the pristine-init recipe works cleanly on small nets but needs this fix to scale.

Questions

Questions people ask about The Lottery Ticket Hypothesis

What is lottery ticket rewinding, and why was it needed?

Rewinding resets a pruned network's surviving weights not to their values at initialization, as the original lottery ticket paper did, but to their values from a short way into training. The original procedure worked on small networks but, even in the 2019 paper, failed on VGG-19 and ResNet-18 at standard learning rates unless warmup was added. Follow-up work by Frankle, Dziugaite, Roy and Carbin, published as Linear Mode Connectivity and the Lottery Ticket Hypothesis at ICML 2020, found that rewinding to an early iteration recovers matching sparse subnetworks in much larger models, including ResNet-50 on ImageNet, and linked success to the network becoming stable to SGD noise early in training.

What is the strong lottery ticket hypothesis?

It is a stronger claim than the original: that a large enough randomly initialized network contains a subnetwork that already performs well with no training at all, found purely by choosing which weights to keep. Zhou and colleagues (2019) showed that masks applied to untrained weights, which they called supermasks, give accuracy far above chance. Ramanujan and colleagues (2020) found a subnetwork of a randomly weighted Wide ResNet-50 that matches a trained ResNet-34 on ImageNet. Malach and colleagues (2020) proved that a sufficiently overparameterized random network contains such a subnetwork for any target network. The original paper's tickets still need training; these need only a mask.

Is global pruning better than layer-wise pruning for finding lottery tickets?

For deep networks with very uneven layer sizes, the paper found that it is. On Lenet and the small Conv networks it prunes each layer separately at a fixed rate. For VGG-19 and ResNet-18 it switches to global pruning, ranking all convolutional weights together and removing the smallest 20% per round, because, in the authors' conjecture, uniform per-layer rates turn small layers into bottlenecks: VGG-19's first two layers have 1,728 and 36,864 weights while its last has 2.35 million. Global pruning found smaller winning tickets for these networks, down to 1.5% of weights for VGG-19 with warmup, by letting large, redundant layers lose more weights while small layers keep theirs.

Why does the lottery ticket procedure need learning-rate warmup on deeper networks?

In the paper's experiments, VGG-19 and ResNet-18 trained at their best learning rate of 0.1 gave rewound subnetworks that did no better than random reinitialization, so no winning tickets appeared. At a lower rate of 0.01 the pattern returned, but the networks fell short of the accuracy they reach at 0.1. A linear warmup, 10,000 iterations at 0.1 for VGG-19 and 20,000 at 0.03 for ResNet-18, recovered tickets at full accuracy. The authors did not settle the cause. Later work linked it to instability: near initialization, different SGD noise sends training to different solutions, and networks become stable only a little way into training, which is why rewinding to an early state works better.

Do lottery tickets make neural network training cheaper?

Not as the paper found them. Iterative magnitude pruning trains the full network to completion once per round, so reaching 3.6% of Lenet's weights took about fifteen full training runs to produce a network that one run could have trained. The authors call iterative pruning computationally intensive and present the result as an explanation of why large networks train well, not as a training method. The sparse networks are also unstructured, and the paper notes that current libraries and hardware are not built to run them faster. Cheaper routes such as SNIP and RigL try to find sparse trainable networks at or near initialization, without the prune-retrain loop.

Check yourself

4 questions to test what you just read

Work each one out before you open it — a number, a prediction or a reason, not a definition. Producing the answer is what makes it stick. Your progress is kept on this device.

Lenet's fully connected layers lose 20% of their weights per round. How many rounds does it take to get below 5% of the weights, and about how many full training runs does that cost?

Show answer

0.8^13 ≈ 5.5% and 0.8^14 ≈ 4.4%, so 14 rounds. Each round trains to completion, and the final ticket must be trained once more to be evaluated, so that is about 15 trainings for one ticket, the cost the authors call computationally intensive.

What happens if you keep a winning ticket's mask but draw new random initial weights for it, and why does that control matter?

Show answer

It learns more slowly and loses accuracy after little pruning, as the paper's reinitialization control showed. The control separates the two ingredients: if structure alone explained the result, the reinitialized mask would match the ticket. It does not, so the claim is about structure and initial values together.

Using the Conv-2 results, compare where the speed gain and the accuracy gain peak. What does that suggest about choosing a sparsity?

Show answer

Learning speed peaked at 8.8% of weights (3.5× faster), but test accuracy peaked at 4.6% (+3.4 points). The two optima differ, so there is no single best sparsity: a speed target and an accuracy target pick different tickets, both far below the dense network's 100%.

For VGG-19 under uniform layer-wise pruning at 20% per round, how many weights remain after 10 rounds in its first layer and in a 2.35-million-weight layer?

Show answer

0.8^10 ≈ 0.107, so the first layer keeps about 185 of its 1,728 weights while the big layer keeps about 252,000. The tiny layer is starved long before the large one runs short, which is why the authors pruned VGG-19 globally.

Where this sits

Making deep nets train

Seven papers that turned "deeper is better in theory" into a network that actually converges. Every later architecture paper assumes all of them.

  1. 1Dropout2014
  2. 2Batch Normalization2015
  3. 3Adam2015
  4. 4ResNet2016
  5. 5LayerNorm & RMSNorm2016
  6. 6mixup2018
  7. 7The Lottery Ticket Hypothesis2019

All 110 papers, in 19 ladders →

The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks · Jonathan Frankle, Michael Carbin · MIT CSAIL · 2019 · read the original paper on arXiv → · Vibe Engines · 2026
Finished this one? 0 / 110 Paper Breakdowns done
NextAttention Is All You Need Closest paper breakdown to this one

Explore the topic

See this alongside everything else on the same subject — handbooks, system designs, challenges and tools, in one place.

More Paper Breakdowns