What do neural networks learn in image classification? A frequency shortcut perspective

Shunxin Wang, Raymond Veldhuis, Christoph Brune, Nicola Strisciuglio
7/19/2023
cs.LGcs.CV

Official code: nis-research/nn-frequency-shortcuts (21 stars, MIT, last commit 2024-11-01).

Abstract

Frequency analysis is useful for understanding the mechanisms of representation learning in neural networks (NNs). Most research in this area focuses on the learning dynamics of NNs for regression tasks, while little for classification. This study empirically investigates the latter and expands the understanding of frequency shortcuts. First, we perform experiments on synthetic datasets, designed to have a bias in different frequency bands. Our results demonstrate that NNs tend to find simple solutions for classification, and what they learn first during training depends on the most distinctive frequency characteristics, which can be either low- or high-frequencies. Second, we confirm this phenomenon on natural images. We propose a metric to measure class-wise frequency characteristics and a method to identify frequency shortcuts. The results show that frequency shortcuts can be texture-based or shape-based, depending on what best simplifies the objective. Third, we validate the transferability of frequency shortcuts on out-of-distribution (OOD) test sets. Our results suggest that frequency shortcuts can be transferred across datasets and cannot be fully avoided by larger model capacity and data augmentation. We recommend that future research should focus on effective training schemes mitigating frequency shortcut learning.

View on arXivView PDF

Code Implementations(1)

MIT

Frequency Shortcuts in Neural Networks

211PythonJul 17, 20231 years agoMIT
computer-visionfrequency-domaingeneralizationimage-classificationmachine-learning+1 more

Similar Papers

Cite this paper

@article{wang2023what,
  title  = {What do neural networks learn in image classification? A frequency shortcut perspective},
  author = {Shunxin Wang and Raymond Veldhuis and Christoph Brune and Nicola Strisciuglio},
  year   = {2023},
  eprint = {2307.09829},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2307.09829v2},
  journal = {ICCV 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2307.09829.svg)](https://codeofpaper.com/paper/2307.09829)

Discussion