[Paper Review] Learning Sparsity and Quantization Jointly and Automatically for Neural Network Compression via Constrained Optimization.
This paper proposes a constrained optimization framework that jointly and automatically prunes and quantizes deep neural networks to meet a target model size, eliminating the need for manual hyper-parameter tuning of compression ratios. It achieves 836× and 205× weight compression for ResNet-50 and AlexNet respectively, with no accuracy loss on CIFAR-10 and ImageNet.
Deep Neural Networks (DNNs) are applied in a wide range of usecases. There is an increased demand for deploying DNNs on devices that do not have abundant resources such as memory and computation units. Recently, network compression through a variety of techniques such as pruning and quantization have been proposed to reduce the resource requirement. A key parameter that all existing compression techniques are sensitive to is the compression ratio (e.g., pruning sparsity, quantization bitwidth) of each layer. Traditional solutions treat the compression ratios of each layer as hyper-parameters, and tune them using human heuristic. Recent researchers start using black-box hyper-parameter optimizations, but they will introduce new hyper-parameters and have efficiency issue. In this paper, we propose a framework to jointly prune and quantize the DNNs automatically according to a target model size without using any hyper-parameters to manually set the compression ratio for each layer. In the experiments, we show that our framework can compress the weights data of ResNet-50 to be 836$ imes$ smaller without accuracy loss on CIFAR-10, and compress AlexNet to be 205$ imes$ smaller without accuracy loss on ImageNet classification.
Motivation & Objective
- Address the challenge of manually tuning compression ratios (sparsity and bitwidth) for each layer in neural network compression.
- Eliminate reliance on heuristic or black-box hyper-parameter optimization methods that introduce new tuning overhead.
- Enable automatic, end-to-end compression of DNNs to a target model size without accuracy degradation.
- Achieve high compression ratios for both pruning and quantization simultaneously through a unified optimization framework.
Proposed method
- Formulate a constrained optimization problem that jointly optimizes magnitude-based pruning and post-training quantization.
- Introduce a differentiable relaxation of sparsity and quantization constraints to enable gradient-based optimization.
- Use Lagrangian relaxation to balance the trade-off between model accuracy and compression ratio.
- Automatically adjust pruning and quantization levels per layer based on the target model size constraint.
- Apply the optimization framework in a single end-to-end training loop without requiring iterative hyper-parameter search.
- Leverage gradient updates to jointly learn optimal sparsity patterns and quantization bitwidths per layer.
Experimental results
Research questions
- RQ1Can joint pruning and quantization be automated without manual tuning of compression ratios?
- RQ2Can a constrained optimization framework achieve high compression ratios while preserving model accuracy?
- RQ3How does the proposed method compare to existing heuristic or black-box hyper-parameter tuning approaches in terms of efficiency and accuracy?
- RQ4To what extent can the framework compress ResNet-50 and AlexNet without accuracy loss on standard benchmarks?
Key findings
- The proposed framework compresses ResNet-50 weights to 836× smaller size on CIFAR-10 with no accuracy loss.
- AlexNet is compressed to 205× smaller size on ImageNet without any accuracy degradation.
- The method achieves high compression without requiring manual setting of sparsity or bitwidth per layer.
- The framework eliminates the need for hyper-parameter tuning or black-box optimization, improving efficiency.
- The joint optimization of sparsity and quantization leads to superior compression efficiency compared to sequential or heuristic methods.
- The constrained optimization approach enables automatic layer-wise compression ratio allocation based on the target model size.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.