pruning
/ PROO-ning /
Pruning makes a trained model smaller by deleting the parts that barely contribute — the connections or neurons whose removal hardly changes the answers. The name comes from gardening: a tree often grows healthier and tidier once you cut away the dead and redundant branches. Neural networks are similarly overgrown; trained with far more connections than they end up needing, so a large fraction can be snipped away with little loss.
In practice, you score each weight or neuron by how much it matters — often just by how small it is, on the idea that near-zero weights barely affect anything — then set the least important ones to zero or remove them entirely. Usually you then fine-tune the trimmed model briefly to let it recover, much as a pruned plant regrows. The result is a model with fewer parameters that is cheaper to store and, ideally, faster to run.
Why it matters: pruning can shrink models substantially, and it pairs naturally with quantization for deployment on limited hardware. But there is an honest catch that newcomers miss: removing scattered individual weights (unstructured pruning) makes a model that is smaller on paper but often no faster in practice, because ordinary hardware can't skip the zeros efficiently — it still does the multiply-by-zero. Real speedups usually require structured pruning, which removes whole chunks the hardware can genuinely skip, and that tends to cost more accuracy. Pruning is useful but its benefits are easy to overstate.
A layer has 1,000 connections, but 600 of them carry weights so close to zero that zeroing them barely shifts the output. Prune those 600, fine-tune briefly to recover, and the layer keeps nearly the same accuracy with 40% of the connections.
Cut the near-dead connections, retrain briefly — smaller model, almost the same answers.
A model that is '90% pruned' is not automatically 90% faster, or even faster at all. Without hardware and software that can truly exploit the missing pieces, those zeros still get computed. Always check whether your runtime actually turns sparsity into speed.