Abstract
Convolutional neural networks (CNNs) achieve state-of-the-art accuracy in a variety of tasks in computer vision and beyond. One of the major obstacles hindering the ubiquitous use of CNNs for inference on low-power edge devices is their high computational complexity and memory bandwidth requirements. The latter often dominates the energy footprint on modern hardware. In this paper, we introduce a lossy transform coding approach, inspired by image and video compression, designed to reduce the memory bandwidth due to the storage of intermediate activation calculation results. Our method does not require fine-tuning the network weights and halves the data transfer volumes to the main memory by compressing feature maps, which are highly correlated, with variable length coding. Our method outperform previous approach in term of the number of bits per value with minor accuracy degradation on ResNet-34 and MobileNetV2. We analyze the performance of our approach on a variety of CNN architectures and demonstrate that FPGA implementation of ResNet-18 with our approach results in a reduction of around 40% in the memory energy footprint, compared to quantized network, with negligible impact on accuracy. When allowing accuracy degradation of up to 2%, the reduction of 60% is achieved.
Introduction
The deployment of state-of-the-art Convolutional Neural Networks (CNNs) on low-power edge devices, such as smartphones and IoT sensors, is primarily limited by high energy consumption. Research indicates that up to 70% of this energy is consumed not by computation, but by data movement—specifically the transfer of intermediate feature maps (activations) between the processor and external memory. While standard quantization techniques reduce the bit-width of individual values, they often fail to exploit the significant spatial and inter-channel correlations present in feature maps. This paper proposes a lossy transform coding approach to leverage these redundancies, significantly reducing memory bandwidth requirements without substantial loss in model accuracy.
Proposed Method: Feature Map Transform Coding
The proposed compression pipeline adapts principles from traditional image and video coding to the domain of CNN activations. The process involves three primary stages:
- Linear Transform (PCA): Principal Component Analysis (PCA) is employed to decorrelate feature maps. This transformation concentrates the signal energy into a subset of channels, leaving others with minimal variance.
- Uniform Quantization: The decorrelated values are then quantized. The concentration of information allows the quantizer to operate more efficiently on the high-variance components while heavily compressing the low-variance ones.
- Variable Length Coding (VLC): Finally, lossless Huffman coding is applied. By assigning shorter codes to more frequent values (such as the zeros prevalent in low-variance channels), the overall data volume is further minimized.
A critical implementation detail is the "folding" of the PCA transform into existing convolution weights, which minimizes additional computational overhead during inference.
Exploiting Redundancy
The core insight of this approach is that feature maps are highly redundant. By rotating the data distribution through PCA, the system can allocate bits more effectively. As illustrated in the figure above, decorrelation eliminates "empty" quantization bins, allowing for a more compact representation of the underlying information.
Experimental Results
The effectiveness of the transform coding approach was evaluated using the ImageNet benchmark across several architectures, including ResNet (18, 34, 50, 101), MobileNetV2, and InceptionV3.
Energy and Bandwidth Savings
On an FPGA-based implementation of ResNet-18, the method achieved a 40% reduction in memory energy footprint with negligible impact on accuracy. By allowing a modest 2% accuracy degradation, energy savings increased to 60%. Furthermore, the approach halved the total data transfer volume to main memory compared to standard 8-bit quantized baselines.
Performance Benchmarks
The proposed method consistently outperformed existing state-of-the-art techniques, such as EBPC, in terms of bits-per-value at equivalent accuracy levels. Real-time performance was also demonstrated, with the hardware implementation sustaining throughput exceeding 40 frames per second (fps).
Conclusion
Feature map transform coding offers a robust solution for reducing the energy footprint of CNN inference on edge hardware. By exploiting inherent correlations through PCA and variable-length coding, the method significantly reduces memory bandwidth requirements. Future research will focus on optimizing the approach for 1x1 and grouped convolutions, as well as exploring training-aware compression to further enhance the accuracy-compression trade-off.
Summary updated