Wavelet Feature Maps Compression for Image-to-Image CNNs

Shahaf E. Finder, Yair Zohav, Maor Ashkenazi, Eran Treister

Introduction

Deep learning models are notoriously resource-hungry. To run them on edge devices like phones or drones, researchers usually turn to quantization—reducing the precision of weights and activations from 32-bit floats to 4-bit or even 2-bit integers.

While this works surprisingly well for simple image classification, it fails miserably for image-to-image tasks such as semantic segmentation, depth prediction, or super-resolution. In these tasks, every pixel matters. Aggressive uniform quantization introduces noise that blurs edges and loses fine details. The authors argue that natural images aren't best compressed by just throwing away numerical precision; they are better compressed by exploiting spatial redundancy—a problem the signal processing world solved long ago with wavelets.

This paper introduces Wavelet Compressed Convolution (WCC), a method that uses Haar-wavelet transforms to compress activation maps. This approach allows for massive computational savings (equivalent to 1–4 bit quantization) with significantly better accuracy and more graceful performance degradation.

Methods: Wavelet Compressed Convolution

Instead of simply quantizing the feature maps, the authors integrate a compression step directly into the convolutional layer.

Wavelet Compressed Convolution Pipeline

The WCC pipeline consists of several key steps:

  1. Haar-Wavelet Transform: A multi-level Haar transform is applied to the activation maps. The Haar transform is highly hardware-friendly, requiring only additions, subtractions, and bit-shifts.
  2. Joint Hard Shrinkage: The system keeps only the top k largest coefficients (the most important parts of the signal) and zeroes out the rest. Crucially, this is performed jointly across all channels in a layer using a single bit-map to track which spatial locations are kept. This exploits the fact that different feature channels usually share the same edges and patterns.
  3. Convolution in the Wavelet Domain: The authors mathematically prove that $1 \times 1$ convolutions—the point-wise convolutions that dominate modern architectures like MobileNet and EfficientNet—commute with the wavelet transform. This allows the actual math to be performed on the compressed data, drastically reducing the number of Bit-Operations (BOPs).
  4. Hybrid Quantization: WCC is combined with light 8-bit quantization to ensure the system remains efficient for hardware implementation while avoiding the pitfalls of ultra-low-bit (2-4 bit) schemes.

Key Insights and Ideas

  • Wavelets Over Uniform Quantization: For dense tasks, spatial sparsity is a more natural way to compress data than numerical precision reduction. A wavelet-compressed map at a 2-bit equivalent rate looks much closer to the original than a standard 2-bit quantized map.
  • The $1 \times 1$ Workhorse: Modern efficient CNNs spend the vast majority of their compute on $1 \times 1$ convolutions. By making WCC a drop-in replacement for these specific layers, the authors target the biggest bottleneck in mobile AI.
  • Joint Sparsity: By sharing the importance map across all channels, the overhead needed to track which coefficients were kept is minimized, making the compression scheme highly viable for real-world memory bandwidth.
  • Graceful Degradation: Unlike standard quantization, where performance often falls off a cliff below 4 bits, WCC shows a much smoother trade-off between compression and accuracy.
MSE vs. Effective Bit Rate showing graceful degradation

Experimental Results

The researchers evaluated WCC across a diverse set of high-resolution tasks, including object detection (MS COCO 2017), semantic segmentation (Cityscapes and Pascal VOC), monocular depth estimation (KITTI), and super-resolution (DIV2K).

  • Object Detection: On MS COCO, WCC with 25% shrinkage (equivalent to 2-bit activations) achieved a 27.49 mAP, significantly outperforming prior state-of-the-art quantization methods that hit only 24.70 mAP at similar bit-rates.
  • Segmentation: On Cityscapes, WCC maintained high mIoU even at extreme compression levels where standard quantization failed to produce usable masks.
  • Super-Resolution: WCC achieved better PSNR (image quality) than aggressive quantization while using fewer Bit-Operations (BOPs). For example, 8-bit/8-bit WCC at 50% compression yielded a PSNR of 34.53, while standard 8-bit/4-bit quantization yielded 34.49 with higher compute costs.

Limitations and Future Work

  • Resolution Dependency: WCC is most effective on high-resolution feature maps. In the very last layers of a classifier (where maps might be as small as $7 \times 7$), there isn't enough spatial redundancy for wavelets to provide a meaningful advantage over standard quantization.
  • Architecture Specificity: The current proof of commutativity focuses on $1 \times 1$ convolutions. Extending the math to efficiently handle $3 \times 3$ or $5 \times 5$ spatial convolutions in the wavelet domain remains a challenge for future research.
  • Hardware Implementation: While the operations are hardware-friendly, a custom accelerator or specialized kernel would be needed to fully realize the speedups promised by the reduction in BOPs.

Summary updated

BibTeX
@inproceedings{finder2022wavelet,
  author = {Shahaf E. Finder and Yair Zohav and Maor Ashkenazi and Eran Treister},
  title = {{Wavelet Feature Maps Compression for Image-to-Image CNNs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2022},
  url = {https://openreview.net/forum?id=lehwrIjWyt},
}
Figure