Band-limited Training and Inference for Convolutional Neural Networks

Adam Dziedzic, John Paparrizos, Sanjay Krishnan, Aaron Elmore, Michael Franklin

TL;DR

This paper introduces band-limited training, a method that artificially constrains the frequency spectra of CNN filters and input data during both training and inference. By exploiting the natural "spectral bias" of neural networks toward low-frequency components, the authors demonstrate that discarding high-frequency Fourier coefficients can significantly reduce memory and computation costs with minimal impact on accuracy.

What Problem Does This Paper Address?

Deep learning models are notoriously resource-hungry, leading to a surge in compression techniques like weight pruning, sparsification, and reduced-precision arithmetic (RPA). However, these methods often come with significant baggage: they can be hard to operationalize, require specialized libraries to avoid training instability, or only provide benefits during inference.

The authors ask a fundamental question: Does a CNN actually need to represent high-frequency components? Previous research suggests that both natural data (images, time-series) and the filters learned by neural networks are naturally biased toward lower frequencies. If high frequencies are largely redundant, we should be able to "band-limit" the network from the start, saving resources throughout the entire lifecycle of the model.

Methods

The core of the approach is a frequency-domain implementation of convolution. Instead of the standard spatial sliding window, the authors use the Fast Fourier Transform (FFT):

  1. Transform the input and filter into the frequency domain.
  2. Perform element-wise multiplication.
  3. Transform the result back to the spatial domain via Inverse FFT (IFFT).

The innovation lies in band-limiting: applying a mask to the frequency spectra after step 1 to discard a percentage of high-frequency coefficients. This reduces the number of multiplications in step 2 and the memory required to store intermediate tensors.

Figure 1. Transformations from input image to compressed FFT map. (1) Natural image in the spatial domain. (2) FFT transfor- mation to frequency domain and a) exact band-limiting to 50%, b) practical band-limiting to 50%, c) lowest frequencies shifted to corners. The heat maps of magnitudes of Fourier coefficients are plotted for a single channel (0-th) in a logarithmic scale (dB) with linear interpolation and the max value is colored with white while the min value is colored with black.

To make this efficient, the authors:

  • Exploit Conjugate Symmetry: Real-valued inputs have redundant frequency representations; the implementation discards nearly half the coefficients immediately to save space.
  • Map Reuse: They save the frequency representations from the forward pass to reuse in the backward pass, avoiding redundant FFT computations.
  • Layer-wise Tuning: They provide a "knob" to adjust the compression rate per layer.
Figure 2. An example of a square input map with marked conjugate symmetry (Gray cells). Almost half of the input cells marked with 0s (zeros) are discarded first due to the conjugate symmetry. The remaining map is compressed layer by layer (we present how the first two layers: 1 and 2 are selected). Blue and Orange cells represent a minimal number of coefficients that have to be preserved in the frequency domain to fully reconstruct the initial spatial input. Additionally, the Orange cells represent real-valued coefficients.

Datasets

The authors evaluated their method across diverse tasks:

  • Image Classification: CIFAR-10 and CIFAR-100 using ResNet-18 and DenseNet-121 architectures.
  • Time-Series Analysis: 25 datasets from the UCR Time Series Archive using a 3-layer Fully Convolutional Network (FCN).

Key Insights and Ideas

  • Resilience to Compression: CNNs are remarkably resilient to band-limiting. The authors found that models learn to leverage low-frequency components even more effectively when high frequencies are removed.
  • Training vs. Inference Consistency: A critical finding is that the compression rate used during training should match the rate used during inference. If they mismatch, accuracy drops significantly.
  • Adversarial Robustness: Because adversarial attacks often rely on high-frequency perturbations, band-limited models are naturally more robust to certain types of noise. By "blinding" the network to high frequencies, it becomes harder to fool with high-frequency jitter.
  • Graceful Degradation: Unlike quantization, which can lead to "performance cliffs," band-limiting results in a smooth trade-off between resource savings and accuracy.

Key Results

  • Accuracy Retention: On CIFAR-10, a ResNet-18 model achieved 92.32% accuracy with 50% compression, compared to 93.69% for the full-spectra model. Even at 85% compression, the model remained functional, though accuracy dropped further.
  • Resource Savings: For the FCN on time-series data, the authors achieved a 4x reduction in average GPU memory usage with less than a 1% loss in accuracy.
  • Noise Robustness: Band-limited models significantly outperformed full-spectra models when tested against images perturbed with Gaussian noise.
Test accuracy as a function of compression rate, showing that fixed compression outperforms energy-based adaptive schemes.

Limitations and Future Work

  • Filter Size Overhead: FFT-based convolution requires padding the input and filter to the same size. For very small filters (e.g., 3x3) in early layers, the overhead of FFT might outweigh the computational savings unless the compression rate is very high.
  • White-box Attacks: While robust to random noise and black-box attacks, the models are still vulnerable to gradient-based "white-box" attacks because the band-limited layers still provide valid gradients for an attacker to exploit.
  • Future Directions: The authors suggest exploring the Discrete Cosine Transform (DCT) as an alternative to FFT and applying these principles to reinforcement learning and control systems, where frequency response is a primary concern.

Summary updated

Abstract

The convolutional layers are core building blocks of neural network architectures. In general, a convolutional filter applies to the entire frequency spectrum of the input data. We explore artificially constraining the frequency spectra of these filters and data, called band-limiting, during training. The frequency domain constraints apply to both the feed-forward and back-propagation steps. Experimentally, we observe that Convolutional Neural Networks (CNNs) are resilient to this compression scheme and results suggest that CNNs learn to leverage lower-frequency components. In particular, we found: (1) band-limited training can effectively control the resource usage (GPU and memory); (2) models trained with band-limited layers retain high prediction accuracy; and (3) requires no modification to existing training algorithms or neural network architectures to use unlike other compression schemes.
BibTeX
@inproceedings{dziedzic2019band,
  author = {Adam Dziedzic and John Paparrizos and Sanjay Krishnan and Aaron Elmore and Michael Franklin},
  title = {{Band-limited Training and Inference for Convolutional Neural Networks}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
}
Figure