Skip to content

Official Implementation of Towards Combating Frequency Simplicity-biased Learning for Domain Generalization [NeurIPS'24]

Notifications You must be signed in to change notification settings

C0notSilly/AdvFrequency

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

[NeurIPS'24] Towards Combating Frequency Simplicity-biased Learning for Domain Generalization

This repository gives the official implementation of Towards Combating Frequency Simplicity-biased Learning for Domain Generalization (NeurIPS 2024)

Introduction

Domain generalization methods aim to learn transferable knowledge from source domains that can generalize well to unseen target domains. Recent studies show that neural networks frequently suffer from a simplicity-biased learning behavior which leads to over-reliance on specific frequency sets, namely as frequency shortcuts, instead of semantic information, resulting in poor generalization performance. Despite previous data augmentation techniques successfully enhancing generalization performances, they intend to apply more frequency shortcuts, thereby causing hallucinations of generalization improvement. In this paper, we aim to prevent such learning behavior of applying frequency shortcuts from a data-driven perspective. Given the theoretical justification of models' biased learning behavior on different spatial frequency components, which is based on the dataset frequency properties, we argue that the learning behavior on various frequency components could be manipulated by changing the dataset statistical structure in the Fourier domain. Intuitively, as frequency shortcuts are hidden in the dominant and highly dependent frequencies of dataset structure, dynamically perturbating the over-reliance frequency components could prevent the application of frequency shortcuts. To this end, we propose two effective data augmentation modules designed to collaboratively and adaptively adjust the frequency characteristic of the dataset, aiming to dynamically influence the learning behavior of the model and ultimately serving as a strategy to mitigate shortcut learning.

Setup the environment

Install PyTorch:

pip3 install torch torchvision torchaudio

Other versions of PyTorch could be install here.

Train

After setting the training data and pretrained models accordingly, run the following line:

python train.py

Shortcut Evaluation

The code of frequency shortcut evaluation could be found here.

Citation

@article{he2024towards,
  title={Towards Combating Frequency Simplicity-biased Learning for Domain Generalization},
  author={He, Xilin and Hu, Jingyu and Lin, Qinliang and Luo, Cheng and Xie, Weicheng and Song, Siyang and Khan, Muhammad Haris and Shen, Linlin},
  journal={arXiv preprint arXiv:2410.16146},
  year={2024}
}

About

Official Implementation of Towards Combating Frequency Simplicity-biased Learning for Domain Generalization [NeurIPS'24]

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages