[Paper Review] SQuantizer: Simultaneous Learning for Both Sparse and Low-precision Neural Networks
SQuantizer proposes a joint training method that simultaneously optimizes for weight and activation sparsity and low-precision quantization (4-bit and 2-bit) in deep neural networks, achieving state-of-the-art accuracy with high compression rates—18× for ResNet18 and 17× for ResNet50—while maintaining less than 1% accuracy drop. The method enables single-pass training, accelerates inference on sparse-aware hardware, and generalizes to object detection via YOLO-v3 with 29× compression and 50.3 mAP.
Deep neural networks have achieved state-of-the-art accuracies in a wide range of computer vision, speech recognition, and machine translation tasks. However the limits of memory bandwidth and computational power constrain the range of devices capable of deploying these modern networks. To address this problem, we propose SQuantizer, a new training method that jointly optimizes for both sparse and low-precision neural networks while maintaining high accuracy and providing a high compression rate. This approach brings sparsification and low-bit quantization into a single training pass, employing these techniques in an order demonstrated to be optimal. Our method achieves state-of-the-art accuracies using 4-bit and 2-bit precision for ResNet18, MobileNet-v2 and ResNet50, even with high degree of sparsity. The compression rates of 18x for ResNet18 and 17x for ResNet50, and 9x for MobileNet-v2 are obtained when SQuantizing both weights and activations within 1% and 2% loss in accuracy for ResNets and MobileNet-v2 respectively. An extension of these techniques to object detection also demonstrates high accuracy on YOLO-v3. Additionally, our method allows for fast single pass training, which is important for rapid prototyping and neural architecture search techniques. Finally extensive results from this simultaneous training approach allows us to draw some useful insights into the relative merits of sparsity and quantization.
Motivation & Objective
- To address the challenge of deploying high-accuracy deep neural networks on resource-constrained edge devices with limited memory and computational power.
- To overcome the limitations of sequential pruning and quantization, which require two-stage training and often degrade accuracy when combining low-precision quantization with sparsity.
- To develop a single, efficient training procedure that jointly optimizes for both weight and activation sparsity and low-precision quantization.
- To maximize model compression and inference efficiency while preserving state-of-the-art accuracy across diverse architectures like ResNet18, ResNet50, MobileNet-v2, and YOLO-v3.
- To provide insights into the relative effectiveness and optimal ordering of sparsity and quantization in joint optimization.
Proposed method
- SQuantizer applies weight and activation sparsification and low-precision quantization (4-bit and 2-bit) in a single training pass, using a differentiable SQuantization operation that enables gradient backpropagation through sparse and quantized tensors.
- The method employs a differentiable sparsification mechanism with a learnable threshold and a straight-through estimator to allow gradient flow during backpropagation.
- It uses a delayed training schedule (Delay = 20 epochs) to stabilize the training process during the initial convergence phase before applying sparsity and quantization.
- The framework jointly optimizes for both sparsity and low-precision quantization, with the order of operations (sparsification before quantization) shown to be optimal for performance.
- SQuantization is applied to both weights and activations in each layer during the forward pass, while full-precision weights are updated via backpropagation.
- The approach is extended to object detection by applying SQuantizer to YOLO-v3 with Darknet-53, maintaining high mAP while achieving high compression.
Experimental results
Research questions
- RQ1What is the optimal order of applying sparsification and quantization in joint training for maximum compression and accuracy?
- RQ2Can simultaneous training for sparsity and low-precision quantization outperform sequential two-stage training in terms of model compression and accuracy?
- RQ3How does joint optimization of both weights and activations affect the final model size, inference speed, and energy efficiency on edge hardware?
- RQ4To what extent can SQuantizer maintain state-of-the-art accuracy when applying 4-bit and 2-bit quantization with high sparsity levels across diverse architectures?
- RQ5Can the joint SQuantization approach be effectively generalized to object detection tasks beyond image classification?
Key findings
- SQuantizer achieves 18× compression for ResNet18 and 17× for ResNet50 with less than 1% accuracy drop when using 4-bit weights and 41% sparsity.
- For MobileNet-v2, the method achieves 9× compression with only 2% accuracy drop using 4-bit weights and 32-bit activations.
- With 2-bit weights and 55% sparsity, SQuantizer achieves 29× compression on YOLO-v3 while maintaining 50.3 mAP on COCO, a 2.5% drop from the baseline.
- The method reduces FLOPs by 75% (to 17.6% of baseline) when using 55% sparse 4-bit ResNet50, demonstrating significant compute savings on sparse hardware.
- Hardware prototyping shows approximately 2× speedup per layer for ResNet50 with 50% sparsity, highlighting improved inference efficiency.
- The joint optimization enables models to fit in on-chip memory, reducing energy consumption by minimizing off-chip DRAM access.
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.