Pruning
Pruning removes weights, neurons or larger parts from a trained neural network that contribute little to its output, making the model smaller and potentially faster with little loss of accuracy.
A trained neural network usually has far more parameters than it strictly needs. Pruning exploits that slack. The basic method is to rank the network's connections by how much they matter, often simply by the size of each weight, set the least important ones to zero, and then let the network retrain briefly so the remaining weights compensate. The result is a sparse model: the same architecture, with many of its numbers switched off.
The idea is old. In 1989 Yann LeCun, John Denker and Sara Solla published Optimal Brain Damage, which used second-derivative information to decide which weights could be deleted with the least harm. In 2015 Song Han and colleagues showed the train, prune and retrain recipe working on large image networks: AlexNet went from 61 million parameters to 6.7 million, and VGG-16 from 138 million to 10.3 million, with no reported loss of accuracy. In 2018 Jonathan Frankle and Michael Carbin's lottery ticket hypothesis offered one explanation, finding small subnetworks, under 10 to 20% of the original size in their experiments, that could be trained on their own to similar accuracy.
Large language models brought a new problem, because retraining a model with hundreds of billions of parameters is expensive. SparseGPT, published by Elias Frantar and Dan Alistarh in January 2023, pruned OPT-175B and BLOOM-176B to at least 50% sparsity in one shot, without retraining, in under 4.5 hours, and reached 60% sparsity with a negligible rise in perplexity. That meant more than 100 billion weights could be ignored at inference time.
There is a practical catch. Zeros scattered at random through a weight matrix save storage, but ordinary chips still do the same amount of arithmetic unless the software and hardware can skip them. That is why structured pruning, which removes whole neurons, attention heads or layers, or follows a fixed pattern, matters in practice. NVIDIA's A100 added hardware support for a 2:4 pattern, in which two of every four consecutive values are zero, letting its tensor cores do the same effective calculation in half the time.
Pruning sits alongside quantization and distillation as one of the main ways to make models cheaper to run. A claim that a model has been pruned by some percentage says little on its own: what matters is whether the pruning pattern is one the target hardware can exploit, and how much accuracy was lost on tasks that matter to the user.
Pruning is the removal of parts of a trained neural network, such as individual weights, neurons or attention heads, that contribute little to its output. The aim is a smaller, cheaper model that performs nearly as well as the original. It is usually followed by a short period of retraining to recover accuracy. Unstructured pruning zeroes individual weights wherever they fall, which can remove many parameters but leaves an irregular pattern that standard hardware cannot easily skip. Structured pruning removes whole units, such as neurons, heads or layers, or follows a fixed pattern like NVIDIA's 2:4 sparsity. Structured pruning usually gives more real speed-up per parameter removed. Some loss is common, but modest pruning often costs very little. Han and colleagues reported cutting AlexNet's parameters ninefold with no accuracy loss after retraining, and SparseGPT pruned 175-billion-parameter language models to 50% sparsity with minimal loss. Aggressive pruning, or pruning without retraining, degrades models faster. Pruning removes parameters. Quantization keeps all the parameters but stores each one with fewer bits. Distillation trains a new, smaller model to imitate a larger one. The three are often combined; SparseGPT's authors note their method is compatible with weight quantization.Common questions
What is pruning in machine learning?
What is the difference between structured and unstructured pruning?
Does pruning reduce accuracy?
How is pruning different from quantization and distillation?
Search for "neural network pruning", "structured sparsity" or "one-shot pruning LLM" to follow the research. The most reliable sources are the papers themselves on arXiv and in conference proceedings such as NeurIPS and ICML, and hardware vendors' technical documentation for what their chips can actually accelerate. Treat compression figures that do not state the accuracy measured, and on which tasks, with caution.Finding more
Working out what this means for your business?
Aileron Shift builds the systems behind this site: AI newsrooms that research, write and publish on their own, marketing automation and WordPress hosting for companies that need to move faster than their competitors.