TL;DR
LEAP (Learnable End-to-End Adaptive Pruning) is a new framework that enables end-to-end learning of unstructured sparsity masks for Large Language Models. By replacing intractable categorical distributions with a per-weight Bernoulli relaxation, LEAP achieves state-of-the-art accuracy at 50-60% sparsity, outperforming traditional layer-wise methods by an average of +2.59 zero-shot accuracy points.
What Problem Does This Paper Address?
To make Large Language Models (LLMs) faster and smaller, researchers use pruning—removing unnecessary weights. Pruning comes in two main flavors:
- Structured/Semi-structured: Removing weights in specific patterns (e.g., 2 out of every 4 weights). This is hardware-friendly but sacrifices accuracy.
- Unstructured: Removing any weight anywhere. This is much more accurate, and recent software kernels (like SpInfer and FlashLLM) finally allow this to run fast on standard GPUs.
The challenge is how to choose which weights to cut. Most current methods use "layer-wise surrogates" based on the Optimal Brain Surgeon (OBS) principle. These methods look at one layer at a time to minimize local error, but these local errors compound, leading to significant accuracy drops in deep networks.
Previous "end-to-end" methods like MaskLLM tried to solve this by learning masks across the whole model at once. However, they used a "categorical-over-patterns" approach. For a standard LLM row of 4,096 weights at 50% sparsity, there are roughly $10^{1229}$ possible patterns. You can't store or index that many options. This "combinatorial obstruction" effectively locked end-to-end learning out of the unstructured pruning regime.
Methods
LEAP bypasses the combinatorial explosion by changing the math of how masks are learned:
- Per-Weight Bernoulli Relaxation: Instead of picking from a list of patterns, LEAP assigns a learnable logit to every single weight. It uses a Gumbel-sigmoid relaxation to make the binary "keep or drop" decision differentiable. This allows the model to learn the mask using standard backpropagation.
- Wanda-based Initialization: Rather than starting from scratch, LEAP initializes its mask using Wanda (a fast, one-shot pruning method). This "warm start" significantly speeds up convergence.
- Global Sparsity Constraint: Unlike methods that force every layer to be exactly 50% sparse, LEAP enforces sparsity globally. This allows the optimization process to "spend" its weight budget on the most important layers while pruning less critical ones more aggressively.
- Magnitude-Aware Stabilization: The authors add a regularization term that biases the search toward keeping higher-magnitude weights, which helps stabilize training when the underlying model weights are frozen.
- Annealing Schedules: LEAP uses schedules for "scale" and "temperature" to gradually move the soft, differentiable masks toward hard binary (0 or 1) decisions by the end of training.
Datasets
- Calibration: The masks are trained for 2,000 steps using a small stream of general text from the SlimPajama dataset.
- Evaluation: The authors tested LEAP across five LLM families (Qwen-2.5, Gemma-3, LLaMA-3.1/3.2) ranging from 0.5B to 8B parameters.
- Benchmarks: Performance was measured using WikiText2 (for perplexity) and six zero-shot tasks: PIQA, ARC-Easy, ARC-Challenge, Winogrande, OpenBookQA, and MMLU.
Key Insights and Ideas
- Breaking the Combinatorial Wall: The most important insight is that unstructured mask learning is a "natural reformulation" of the problem. By moving from a per-group categorical distribution to a per-weight Bernoulli distribution, the parameter count scales linearly with the model size ($O(mn)$) rather than exponentially.
- End-to-End > Layer-Wise: The results confirm that optimizing for the actual language modeling loss is far superior to optimizing for local layer reconstruction. The "surrogate gap" is real and grows wider as sparsity becomes more aggressive.
- Near-Uniformity is Natural: Interestingly, even with a global budget, LEAP naturally converges to a near-uniform sparsity across most transformer blocks. This suggests that for 50-60% sparsity, complex per-layer "budgeting" might be less important than simply learning the right mask within those layers.
- Efficiency: LEAP is significantly cheaper to train than previous end-to-end methods. For an 8B model, it requires ~276 GPU-hours, whereas previous methods like MaskLLM reported over 1,200 GPU-hours for similar scales.
Key Results
- Accuracy Boost: Across ten different (model, sparsity) settings, LEAP improved average zero-shot accuracy by +2.59 points over ADMM (the best layer-wise baseline).
- Aggressive Sparsity: The gains are most dramatic at 60% sparsity. For LLaMA-3.2 1B, LEAP outperformed ADMM by +5.40 points.
- Perplexity: LEAP achieved much lower (better) perplexity scores. For example, on Qwen-2.5 0.5B at 60% sparsity, LEAP hit 13.16 PPL, while the next best baseline (ADMM) was at 50.55 PPL.
- Hardware Ready: Because LEAP produces unstructured masks, it is directly compatible with new sparsity-accelerated kernels, offering potential end-to-end inference speedups of 1.2x to 2.9x.
Limitations and Future Work
- Memory Overhead: During the training phase, LEAP effectively doubles the memory required for weights because it must store a logit matrix $P$ of the same shape as the weight matrix $W$. However, this logit matrix is discarded after the mask is learned.
- Frozen Weights: In this study, the authors kept the original model weights frozen to isolate the effect of mask learning. They note that joint weight-and-mask optimization (fine-tuning the surviving weights while learning the mask) is a promising next step that could push accuracy even higher.
- Sparsity Regime: The work focuses on the 50-60% range targeted by current hardware. Its effectiveness at "extreme" sparsity (e.g., 90%+) remains to be explored.
Summary updated