Abstract
Large Language Models (LLMs) face significant deployment challenges due to their immense memory and computational requirements. We present CAP, a novel two-stage compression framework that optimizes global rank and sparsity. CAP decomposes weight matrices into low-rank and sparse components using Robust Principal Component Analysis (RPCA) and employs a learnable probabilistic pruning strategy via policy gradients. This approach allows for automatic redundancy detection across layers, outperforming existing state-of-the-art pruning and decomposition methods without the need for expensive full-model fine-tuning.
Introduction
The deployment of LLMs is often hindered by their "memory-hungry" nature. Traditional compression techniques like unstructured pruning and low-rank approximation frequently suffer from performance degradation at high compression ratios. Current methods often treat these two approaches as independent or apply uniform compression rates across all layers, failing to account for the varying information density within Transformer architectures. This "layer-wise rigidity" often leads to over-pruning critical layers while leaving redundant ones under-optimized.
Methodology: The CAP Framework
CAP (Global Rank and Sparsity Optimization) addresses these limitations through a two-stage process:
1. Principled Decomposition via RPCA
Instead of standard Singular Value Decomposition (SVD), CAP utilizes Robust Principal Component Analysis (RPCA) to factorize each weight matrix ($W$) into a low-rank component ($L$) and a sparse component ($S$). The low-rank component captures global structural correlations, while the sparse component preserves "salient outliers"—specific weights critical for performance that do not conform to low-rank patterns.
2. Learnable Probabilistic Pruning
To optimize the allocation of parameters, CAP assigns Bernoulli probabilities to every singular value in $L$ and every non-zero entry in $S$. Using a small calibration set (128 sequences) and policy gradients (REINFORCE), the framework learns to optimize these probabilities globally. This allows the model to identify the most impactful rank-1 components and sparse entries across all layers, ensuring an optimal utility-to-cost ratio within a fixed parameter budget.
Experimental Setup
The authors evaluated CAP across a diverse set of models, including LLaMA-1/2/3, Phi-3, Qwen2.5, OPT, and BERT. Performance was measured using:
- Zero-shot Benchmarks: Eight standard tasks (e.g., HellaSwag, PIQA, ARC).
- Language Modeling: Perplexity on WikiText-2.
- Reasoning & Long Context: GSM8K for math reasoning and LongBench-v2.
- Calibration Data: 128 sequences from the C4 dataset.
Key Results and Insights
CAP demonstrates significant improvements over baseline methods like SparseGPT and Wanda across various models and compression ratios.
Performance Gains
At 50% compression, CAP consistently outperforms competitors. For instance, on LLaMA-3 8B, CAP achieved a 66.85% average zero-shot accuracy, significantly higher than Wanda's 63.27%. In reasoning tasks like GSM8K, CAP recovered +11.2% accuracy for LLaMA-3.1-8B-Instruct compared to standard pruning, highlighting the importance of the low-rank backbone for maintaining reasoning capabilities.
Efficiency and Speed
Despite the dual-component architecture ($L + S$), CAP is highly efficient. The $S$ component is typically over 85% sparse, allowing for the use of optimized Sparse Matrix Multiplication (SpMM) kernels. On an A100 GPU, CAP achieved a throughput of 176.5 tokens/sec, surpassing Wanda’s 163.4 tokens/sec at the same parameter budget. Furthermore, CAP is training-free in the traditional sense; it only optimizes selection masks, avoiding the need for full weight backpropagation.
Conclusion
CAP introduces a robust synergy between low-rank decomposition and sparse pruning. By leveraging global resource allocation and policy gradients, it automatically detects and exploits redundancy variations across LLM layers. While its peak performance relies on hardware support for sparse kernels, CAP represents a significant step toward efficient, high-performance LLM compression that maintains critical reasoning and language capabilities. Future work may explore combining CAP with quantization to further reduce the hardware requirements for large-scale models.
Summary updated