TL;DR
UniPruning is a post-training pruning framework for Large Language Models (LLMs) that bridges the gap between fast layer-wise heuristics and globally coordinated optimization. By using mirror descent to learn a decoupled global saliency variable—anchored to local activation metrics—UniPruning allocates sparsity budgets across the entire network without updating the model’s original weights, delivering robust performance even at aggressive 60–70% sparsity and hardware-friendly 2:4 semi-structured patterns.
What Problem Does This Paper Address?
Pruning LLMs after pre-training typically forces practitioners to choose between two imperfect paradigms:
- Local metric pruning (e.g., Wanda, RIA): Highly efficient and simple. It computes weight importance layer by layer using activation statistics and prunes weights in a single pass without modifying pretrained parameters. However, because each layer is evaluated in total isolation, it ignores cross-layer dependencies and catastrophically collapses at high sparsity levels.
- Global feedback pruning (e.g., SparseLLM, ProxSparse): Coordinates a single budget across the whole network guided by global task loss. While it preserves reasoning better, it often demands expensive optimization, modifies model weights, is restricted to fixed patterns (like 2:4 semi-structured sparsity), and requires separate retraining runs for every targeted sparsity budget.
UniPruning asks: Can we achieve model-wide budget coordination with the speed, simplicity, and zero-weight-update guarantees of local methods?
Methods
UniPruning decouples the pruning decision from the underlying model parameters using an auxiliary optimization framework:
- Decoupled Saliency via Mirror Descent: Rather than updating the original weights $W_0$, the authors introduce an auxiliary saliency variable $\Gamma$ and a temporary surrogate weight copy $W$. An objective is formed balancing the task loss $\mathcal{L}_{\text{task}}(W)$, a local alignment loss $\frac{\rho}{2}\|\Gamma - S(W)\|_F^2$ (tying $\Gamma$ to activation-based scores $S(W)$), and a non-smooth sparsity penalty $\Omega(\Gamma)$ (e.g., $\ell_1$ or an $N{:}M$ pattern regularizer).
- Proximal Splitting: Using mirror descent, surrogate weights take smooth gradient steps, while $\Gamma$ updates via proximal operators ($\text{Prox}_\Omega$) driven by dual variables. This allows non-smooth sparsity regularization to guide parameter ranking smoothly.
- Zero Weight Modification & Arbitrary One-Shot Extraction: Once the saliency scores converge to $\Gamma^\star$, the temporary weights are discarded. The original pretrained weights $W_0$ remain completely unchanged. Crucially, a single sorting of $|\Gamma^\star|$ produces pruning masks for any unstructured sparsity level (or 2:4 block) in one shot without re-running optimization.
- Theoretical Grounding: The authors formally prove that the sequence of iterates converges to a critical stationary point under the Kurdyka-Łojasiewicz (KL) optimization framework.
Datasets
- Calibration: 128 sequences randomly sampled from the standard C4 dataset with a context length of 4096 tokens.
- Evaluation:
- Language Modeling: Perplexity on WikiText-2.
- Downstream Zero-Shot Reasoning: Six tasks from the EleutherAI LM-Eval-Harness: ARC-Easy (ARC-E), ARC-Challenge (ARC-C), HellaSwag, OpenBookQA (OBQA), PIQA, and SIQA.
- Evaluated Models: LLaMA2-13B, Llama-3.2 (1B, 3B), Qwen2.5 (7B, 14B), DeepSeek-R1-Distill-Llama8B, DeepSeek-R1-Distill-Qwen-7B, and openPangu-Embedded-7B-V1.1 on Ascend NPUs. No new benchmark datasets were introduced.
Key Insights and Ideas
- Decoupling Prevents Optimization Drift: Standard global pruning often destabilizes pretrained representations because weights are altered while trying to meet sparsity targets. Decoupling the saliency variable $\Gamma$ from $W_0$ preserves the base model while allowing global feedback to adjust the pruning budget across layers.
- Stochasticity Aides Exploration: In ablations, stochastic relative importance metrics (stochRIA) outperformed deterministic metrics at extreme compression, helping the algorithm escape greedy local minima.
- Mirror Descent Bridges the Local-Global Gap: Ablation experiments showed that optimizing a naive combined loss without the mirror descent formulation caused severe optimization instability and diverging perplexity.
Key Results
- 60% Unstructured Pruning: UniPruning achieved the best average downstream accuracy across all six tested LLMs compared to Magnitude, Wanda, and RIA baselines. For instance, on Llama-3.2-3B, UniPruning achieved an average accuracy of 40.53% (vs. Wanda's 34.28% and RIA's 39.01%) and a perplexity of 24.38 (vs. Wanda's 66.00).
- High-Sparsity Robustness (70%): Where baselines collapsed (e.g., Wanda reached a perplexity of 183.21 on Qwen2.5-7B, while magnitude pruning exploded to infinity), UniPruning maintained a stable perplexity of 52.34.
- 2:4 Semi-Structured Pruning: UniPruning outperformed prior zero-weight-update baselines and surpassed ProxSparse across every model evaluated (e.g., reaching 10.86 perplexity on Qwen2.5-7B vs. ProxSparse's 14.06). It even matched or beat SparseGPT, a method that updates model weights.
- Hardware Acceleration: Benchmarked on an NVIDIA H200 GPU, UniPruning's 2:4 sparse model delivered 1.30× speedup in attention projections, 1.34× in MLP projections, and an end-to-end inference speedup of 1.27×.
Limitations and Future Work
- Hyperparameter Sensitivity: The framework introduces extra hyperparameters, such as the regularization weight $\lambda$, the alignment coefficient $\rho$, and step size $\alpha$, which require calibration.
- Architectural Scope: Evaluations were conducted exclusively on dense transformer decoder families (LLaMA and Qwen derivatives); behavior on mixture-of-experts (MoE) or non-transformer architectures remains unexplored.
Summary updated