Exploring Frequency Domain Interpretation of Convolutional Neural Networks

Kaisheng MaarXiv 2019

TL;DR

This paper introduces a novel approach to interpret Convolutional Neural Networks (CNNs) by analyzing the frequency properties of their filters, particularly in the first layer. They demonstrate that manipulating these frequency proportions significantly impacts model robustness to common corruptions, while having minimal effect on classification accuracy. Their proposed Attended Power Suppression (APS) and Noise in Frequency Domain (NFD) methods offer a way to control filter frequency responses and enhance robustness.

What Problem Does This Paper Address?

While CNNs have achieved remarkable accuracy in image classification, their robustness to real-world variations (like noise, blur, or changes in lighting) and their interpretability remain significant challenges. Existing interpretation methods primarily focus on the spatial domain, offering limited insight into how CNNs process information in the frequency domain. This paper addresses this gap by investigating the role of frequency components in CNN filters, specifically in the crucial first layer, and proposing methods to leverage this understanding for improved robustness.

Methods

The core of this work lies in two novel techniques:

  • Attended Power Suppression (APS): This method aims to control the frequency proportion of filters in the first layer. It involves:
  • Power Suppression: During training, certain frequency components of input images are randomly suppressed. This is guided by predefined "mask curves" (low-pass, band-pass, high-pass filters).
  • Channel-wise Attention: An attention module is introduced after the first convolution layer. This module learns to selectively open or close channels, effectively controlling which filters are activated.
  • Self-Supervision: An auxiliary loss term is used to guide the attention module, ensuring the actual channel open ratio aligns with the expected ratio derived from the power suppression. This makes the training process self-supervised.
  • Noise in Frequency Domain (NFD): This is a data augmentation technique that adds random noise directly to the power spectrum of input images. The phase spectrum is preserved to maintain semantic integrity. NFD is designed to perturb the frequency content without drastically altering the image's core meaning.

These methods are combined to explore and enhance frequency domain interpretability and robustness.

Datasets

  • CIFAR-10: Used for training and evaluating natural classification accuracy.
  • CIFAR-10-C: A corrupted version of CIFAR-10, used to evaluate model robustness to common corruptions.

No new benchmarks were introduced; the focus was on evaluating existing models on established datasets with novel augmentation and analysis techniques.

Key Insights and Ideas

  • Frequency Matters for Robustness, Not Just Accuracy: The most striking finding is that manipulating the frequency composition of the first layer filters has a substantial impact on robustness to common corruptions, while having a negligible effect on standard classification accuracy. This suggests that models can achieve high accuracy by focusing on specific frequency bands, but this specialization can make them brittle to real-world variations.
  • First Layer is Key: The paper focuses on the first convolution layer due to its role as the primary information gateway and its relative ease of analysis compared to deeper layers.
  • Frequency Domain as a New Frontier for Interpretation: The work highlights the under-explored potential of frequency domain analysis for understanding CNNs, moving beyond traditional spatial domain visualizations.
  • Orthogonal Augmentation Strategies: APS and NFD are shown to work in complementary ways. APS controls the proportion of frequencies, while NFD adds noise to specific frequencies. Their combination yields synergistic robustness gains.

Key Results

  • Robustness Gains with APS: Experiments on VGG-16 and VGG-16-BN showed that APS could achieve significant average robustness gains on CIFAR-10-C (e.g., +4.29% to +4.97% for VGG-16-BN) with minimal impact on natural accuracy.
  • Combined APS and NFD for ResNet-18: Combining APS with NFD on ResNet-18 resulted in an impressive average robustness gain of 10.97% on CIFAR-10-C, with only a 0.22% drop in natural accuracy.
  • Controllable Frequency Proportions: The frequency response histograms of the first layers clearly demonstrated that APS could effectively control the proportion of filters responding to different frequency bands, as intended by the "LMH" configurations.
  • Learnable Configuration: The "Learnable Configuration" within APS proved effective in balancing robustness gains and natural accuracy degradation, outperforming fixed configurations.

Limitations and Future Work

  • Focus on First Layer: While the first layer is crucial, the paper acknowledges that deeper layers also play a role in frequency processing. Future work could extend this analysis to deeper layers.
  • Computational Cost: The proposed methods, particularly APS with its attention module and auxiliary loss, likely increase training time.
  • Generalizability: While tested on CIFAR-10, further validation on larger and more diverse datasets would be beneficial.
  • Interpretability of Deeper Layers: The paper mentions that direct Fourier analysis becomes difficult for deeper layers due to complex feature representations. Developing methods to analyze frequency properties in deeper layers remains an open challenge.
  • Broader Applications: The authors suggest that their findings inspire more attention to frequency interpretability, hinting at potential applications beyond robustness, such as understanding model biases or developing more efficient architectures.

Summary updated

Abstract

Many existing interpretation methods of convolutional neural networks (CNNs) mainly analyze in spatial domain, yet model interpretability in frequency domain has been rarely studied. To the best of our knowledge, there is no study on the interpretation of modern CNNs from the perspective of the frequency proportion of filters. In this work, we analyze the frequency properties of filters in the first layer as it is the entrance of information and relatively more convenient for analysis. By controlling the proportion of different frequency filters in the training stage, the network classification accuracy and model robustness is evaluated and our results reveal that it has a great impact on the robustness to common corruptions. Moreover, a learnable modulation of frequency proportion with perturbation in power spectrum is proposed from the perspective of frequency domain. Experiments on CIFAR-10-C show 10.97% average robustness gains for ResNet-18 with negligible natural accuracy degradation.
BibTeX
@misc{ma2019exploring,
  author = {Kaisheng Ma},
  title = {{Exploring Frequency Domain Interpretation of Convolutional Neural Networks}},
  year = {2019},
  eprint = {1911.12044},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1911.12044},
}
Figure