Learning in the Frequency Domain

Kai Xu, Minghai Qin, Fei Sun, Yuhao Wang, Yen-Kuang Chen, Fengbo Ren

Abstract

Modern convolutional neural networks (CNNs) are typically designed for fixed, low-resolution inputs in the spatial RGB domain. This design choice necessitates aggressive downsampling of high-resolution real-world images, leading to significant information loss and creating a communication bottleneck between CPU preprocessing and GPU inference. This paper introduces a novel framework that enables CNNs to learn directly in the frequency domain using Discrete Cosine Transform (DCT) coefficients. By implementing a learning-based frequency selection module, the proposed method achieves higher accuracy in classification and segmentation tasks while significantly reducing the required data transfer bandwidth.

The Bottleneck of Spatial Processing

Most state-of-the-art vision models are constrained to small input sizes, such as $224 \times 224$ pixels. When processing high-resolution images from modern sensors, the standard approach involves spatial interpolation to downsample the image. This "oblivious" downsampling is problematic for two primary reasons. First, it indiscriminately removes both redundant noise and salient features, degrading model accuracy. Second, as AI accelerators like GPUs continue to increase in compute power, the system bottleneck shifts toward the communication bandwidth (CB) required to move uncompressed RGB data from the CPU to the GPU.

Comparison of standard RGB processing vs. the proposed frequency domain approach, highlighting the reduction in communication bandwidth (CB).

Methodology: The DCT-Based Pipeline

To address these issues, the researchers propose a pipeline that operates in the frequency domain, specifically leveraging the Discrete Cosine Transform (DCT)—the same mathematical foundation used in JPEG compression.

The process begins by converting the image to the YCbCr color space and applying a DCT. Instead of maintaining a spatial grid, the coefficients are reshaped: coefficients of the same frequency from different $8 \times 8$ blocks are grouped into separate channels. For a standard image, this results in 192 channels (64 each for Y, Cb, and Cr).

The detailed preprocessing pipeline: from spatial resizing to DCT transformation, reshaping, and channel selection.

Dynamic Channel Selection

A key innovation is the "gate module," which utilizes the Gumbel-Softmax trick to perform differentiable channel selection during training. This allows the network to learn which frequency components are most critical for a specific task. The authors found that they could prune up to 87.5% of these frequency channels with negligible impact on accuracy, effectively allowing the model to focus on essential features while processing a fraction of the original data.

Key Insights and Results

The study reveals several critical insights into how CNNs process information:

  • Spectral Bias: Similar to the human visual system, CNNs exhibit a spectral bias, showing higher sensitivity to low-frequency information than high-frequency noise.
  • Luma vs. Chroma: Heat maps generated by the gate module indicate that the Luma (Y) component carries significantly more information for vision tasks than the Chroma (Cb, Cr) components.

Performance Benchmarks

The approach was validated on ImageNet for classification and COCO for instance segmentation:

  • ImageNet: Using a ResNet-50 backbone, the frequency-domain model achieved a 1.42% top-1 accuracy improvement over the RGB baseline, despite using only half the input data size. MobileNetV2 saw a 0.63% improvement.
  • COCO: In instance segmentation tasks using Mask R-CNN, the method yielded a 0.8% average precision (AP) improvement.

Conclusion

By rethinking the input representation for CNNs, this research demonstrates that learning in the frequency domain is not only more efficient but also more effective than traditional spatial processing. By bypassing the limitations of oblivious spatial downsampling and reducing the inter-chip communication bottleneck, this approach paves the way for more scalable and accurate deep learning systems.

Summary updated

BibTeX
@inproceedings{xu2020learning,
  author = {Kai Xu and Minghai Qin and Fei Sun and Yuhao Wang and Yen-Kuang Chen and Fengbo Ren},
  title = {{Learning in the Frequency Domain}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2020},
  doi = {10.1109/cvpr42600.2020.00181},
}
Figure