Abstract
In this paper, we introduce a novel method of neural network weight compression. In our method, we store weight tensors as sparse, quantized matrix factors, whose product is computed on the fly during inference to generate the target model's weights. We use projected gradient descent methods to find quantized and sparse factorization of the weight tensors. We show that this approach can be seen as a unification of weight SVD, vector quantization, and sparse PCA. Combined with end-to-end fine-tuning our method exceeds or is on par with previous state-of-the-art methods in terms of the trade-off between accuracy and model size. Our method is applicable to both moderate compression regimes, unlike vector quantization, and extreme compression regimes.
Introduction
Deploying deep neural networks on edge devices, such as smartphones or IoT sensors, requires balancing high performance with limited memory and compute resources. Traditional compression techniques generally fall into three categories: quantization (reducing precision), pruning (removing weights), and tensor factorization (decomposing matrices). However, each has limitations: quantization often fails at extreme compression ratios, pruning can introduce significant indexing overhead, and factorization is frequently constrained by the need to implement factors as standard network layers.
Researchers at Qualcomm AI Research have addressed these gaps by introducing Quantized Sparse PCA, a unified framework that treats weight compression as a specialized matrix factorization problem. This method bridges the performance gap across both moderate and extreme compression regimes, achieving state-of-the-art accuracy-to-size trade-offs (5x to 40x).
Methodology
The core of this approach is factorizing a weight tensor $W$ into two low-rank, quantized, and sparse components.
- Factorization: A weight tensor $W$ is reshaped into a matrix and factorized into a codebook $C$ and a latent coefficient matrix $Z$, such that $W \approx CZ$.
- Constraints: To maximize compression, three constraints are applied simultaneously: quantization (low bit-widths for $C$ and $Z$), sparsity (pruning $Z$ via hard thresholding), and low rank (minimizing the inner dimension $k$).
- Optimization: The authors utilize Projected Gradient Descent (PGD). Initialized via Singular Value Decomposition (SVD), the matrices are iteratively updated using the Straight-Through Estimator (STE) to navigate the non-differentiable nature of quantization.
- Inference: During the forward pass, the product $CZ$ is computed on the fly to reconstruct weights just before they are utilized by a layer. This shift allows for more flexible factorization shapes than traditional methods.
Experimental Setup
The method was evaluated on the ImageNet classification benchmark using two distinct architectures:
- ResNet18: A standard benchmark for residual networks.
- MobileNetV2: A compact, mobile-optimized architecture that is notoriously difficult to compress further without substantial accuracy degradation.
Key Insights
- Unified Framework: The authors demonstrate that existing methods like Vector Quantization (VQ) and SVD-based compression are special cases of Quantized Sparse PCA.
- Priority of $Z$: Since the latent matrix $Z$ is significantly larger than the codebook $C$, applying aggressive compression (lower bits and higher sparsity) to $Z$ yields a superior accuracy-vs-size trade-off.
- Rank-Bitwidth Trade-off: At high compression ratios, it is more effective to maintain a higher rank ($k$) with lower bit-precision than a lower rank with higher precision. Essentially, having more "rough" components is better than having a few "perfect" ones.
- Impact of Fine-tuning: While initial "data-aware" optimization is beneficial, end-to-end fine-tuning effectively closes the performance gap between complex and simple pruning strategies.
Results
The proposed method consistently remains on the Pareto frontier across the entire compression spectrum.
- ResNet18: The method achieved state-of-the-art results, outperforming baselines such as BGD, TTQ, and ABC-Net. It maintained competitive accuracy even at extreme 40x compression.
- MobileNetV2: Even on this already-lean model, the method outperformed standard Vector Quantization implementations.
Conclusion and Future Work
While Quantized Sparse PCA offers significant compression gains, it introduces computational overhead by requiring weight reconstruction ($CZ$) during inference. This is generally negligible for large batches but may impact real-time, single-input scenarios. Furthermore, selecting optimal hyperparameters (rank, bit-width, and sparsity) currently requires manual tuning. Future research will focus on automated hyperparameter selection to make the compression process more accessible for developers.
Summary updated