Presented at IJCAI 2022 by researchers from Alibaba Group.
Abstract
As large language models (LLMs) continue to grow in scale, deploying them on resource-constrained edge devices becomes increasingly challenging. While pruning is a common technique to introduce sparsity and reduce model size, traditional data-driven pruning methods—such as movement pruning—require maintaining a score matrix equal in size to the weight matrix, doubling the memory overhead during fine-tuning. This paper introduces Parameter-efficient Sparse Training (PST), a method that reduces the number of trainable parameters required for pruning by over 98%. By leveraging the low-rank and structured nature of weight importance, PST achieves state-of-the-art performance at high sparsity levels with significantly lower resource requirements.
Introduction
The prevailing "pre-train then fine-tune" paradigm has yielded powerful models like BERT, RoBERTa, and GPT-2. However, these models often contain millions or billions of parameters, making them difficult to deploy. Sparsity—the process of removing unimportant weights—is a primary solution for compression.
Existing pruning strategies generally fall into two categories:
- Data-free (Magnitude Pruning): This method removes weights based on their absolute values. While computationally efficient, it is static and fails to account for the specific requirements of downstream tasks.
- Data-driven (e.g., Movement Pruning): This approach learns which weights to prune by observing gradients during fine-tuning. While more accurate, it is extremely memory-intensive. For every weight matrix $W$, a corresponding score matrix $S$ must be stored and updated, effectively doubling the parameter count during the training phase.
The PST Framework
The authors propose Parameter-efficient Sparse Training (PST) to bridge the gap between efficiency and accuracy. The core hypothesis is that importance scores are not arbitrary; they exhibit "intrinsic redundancy" that can be captured using a fraction of the parameters.
Decomposing Importance Scores
PST calculates the importance score $S$ using a hybrid approach that combines static magnitude with learned task-specific components:
- Magnitude Component: PST utilizes the absolute value of the weights ($|W|$), which provides a baseline of importance without requiring additional parameters.
- Low-Rank Component: Following the logic of Low-Rank Adaptation (LoRA), PST approximates task-specific importance using the product of two small matrices ($A$ and $B$).
- Structured Component: To capture the reality that entire neurons or channels often share importance, PST uses row and column vectors ($R$ and $C$) to represent structured importance.
- Efficient Weight Updates: To maintain efficiency, weight updates during fine-tuning are also represented via low-rank decomposition ($U$ and $V$).
The final importance score is formulated as: $$S = |W_{initial} + \beta UV| + \alpha_1(AB) + \alpha_2(R + C)$$
This formulation allows the model to learn which weights are vital for a specific task while keeping the number of trainable parameters to a minimum.
Experimental Evaluation
The researchers evaluated PST across a variety of architectures and benchmarks to test its versatility in both Natural Language Understanding (NLU) and Natural Language Generation (NLG).
- Models: BERT-base, RoBERTa-base, RoBERTa-large, and GPT-2 medium.
- NLU Benchmarks: The GLUE benchmark (including tasks like MNLI, QQP, and SST-2).
- NLG Benchmarks: E2E, DART, and WebNLG datasets using GPT-2.
Key Findings
- Extreme Parameter Efficiency: Compared to Movement Pruning (MvP), PST requires only 1.5% to 2% of the trainable parameters to achieve comparable or superior results.
- Performance at High Sparsity: PST excels when aggressive compression is required. At 90% sparsity, PST outperformed standard magnitude pruning significantly. On RoBERTa-large, it achieved a 0.73 average score improvement over previous methods while saving 98.9% of trainable parameters.
- Generative Gains: On the WebNLG task, PST achieved a 6.25 BLEU score improvement over Movement Pruning, demonstrating that parameter-efficient pruning is highly effective for generative models.
- Redundancy in Importance: Visual analysis of the masks confirmed that importance scores are highly structured. Certain rows and columns are consistently pruned, validating the use of the $R$ and $C$ vectors in the PST formula.
Discussion and Limitations
While PST represents a significant step forward in making LLM pruning accessible, the authors note several considerations for future work:
- Hyperparameter Tuning: The method introduces several new hyperparameters (coefficients $\alpha_1, \alpha_2, \beta$ and ranks $r_1, r_2$) that must be optimized for different tasks.
- Sparsity Thresholds: At lower sparsity levels (e.g., 50%), the advantages of PST over simple magnitude pruning are less pronounced, suggesting its primary value is in high-compression scenarios.
- Inference Bottlenecks: Like most unstructured pruning methods, the resulting sparse models require specialized hardware or software kernels to translate theoretical sparsity into actual inference speedups.
Conclusion
Parameter-efficient Sparse Training (PST) demonstrates that we do not need to double a model's parameters to prune it effectively. By exploiting the low-rank and structured nature of weight importance, PST allows researchers to achieve high-performance sparse models with a fraction of the memory overhead, making the fine-tuning of large-scale models more sustainable and accessible.
Summary updated