Introduction
Deep Neural Networks (DNNs) have achieved remarkable success in various computer vision tasks but remain computationally expensive and memory-intensive. Deploying these models on resource-constrained edge devices necessitates aggressive compression techniques. One-bit binarization, which reduces weights and activations to binary values, offers significant speedups and memory savings. However, this often results in a substantial drop in accuracy. This paper introduces the Targeted Acceleration and Compression (TAC) framework, which addresses the "accuracy tax" of binarization by applying differentiated optimization strategies to convolutional and fully connected layers.
Motivation: The Asymmetry of Neural Layers
The core insight behind TAC is the structural asymmetry of standard DNN architectures. In models like AlexNet, convolutional (conv) layers are responsible for over 90% of the total floating-point operations (FLOPs) but contain a small fraction of the total parameters. In contrast, fully connected (FC) layers contain over 95% of the model's parameters while contributing minimally to the computational load.
Current binarization methods often treat these layers uniformly. Binarizing FC layers significantly degrades the model's representational capacity (its "memory") without providing a proportional benefit in execution speed. TAC exploits this observation by prioritizing acceleration for conv layers and high-fidelity compression for FC layers.
The TAC Framework
The TAC framework optimizes the network through a targeted, two-stage process tailored to the specific characteristics of each layer type.
1. Accelerating Convolutional Layers
To address the computational bottleneck, TAC applies full binarization to the convolutional layers. By constraining both weights and activations to 1-bit values, the framework enables the use of efficient XNOR and bit-counting operations. This replaces power-hungry floating-point multiplications, leading to significant hardware acceleration on specialized platforms.
2. Compressing Fully Connected Layers
Rather than binarizing FC layers and losing critical parameter information, TAC employs a combination of network pruning and low-bit quantization. This approach maintains a higher degree of precision where it is most needed for model accuracy.
- Pruning: The process begins by removing connections with weights below a predefined threshold. This reduces the total number of parameters without the drastic information loss associated with 1-bit binarization.
- Quantization: The remaining non-zero weights are then grouped using k-means clustering. These weights are represented using a small number of bits (e.g., 4-bit) and an index table, allowing for high compression rates while preserving the model's performance.
Experimental Results
The TAC framework was evaluated on CIFAR-10, CIFAR-100, and ImageNet benchmarks, consistently outperforming standard 1-bit networks like BNN and XNOR-Net.
On the ImageNet dataset using an AlexNet architecture, TAC-XNOR achieved a 50.51% Top-1 accuracy, representing a 6.31% improvement over the 44.20% achieved by standard XNOR-Net. Furthermore, TAC achieved a compression rate of 26.1x, significantly higher than the 10.3x offered by traditional binarization. While the inclusion of low-bit FC layers slightly increases FLOPs compared to a purely binarized model, TAC still delivers a 5.5x reduction in computation compared to full-precision models, making it highly efficient for deployment.
Conclusion
The Targeted Acceleration and Compression (TAC) framework demonstrates that a one-size-fits-all approach to model compression is suboptimal. By recognizing the distinct roles of convolutional and fully connected layers, TAC achieves state-of-the-art accuracy for low-bit networks while maintaining high efficiency. This targeted strategy provides a robust path for deploying high-performance DNNs on mobile and edge hardware.
Summary updated