This repository is the implementation of Noise Attention Learning: Enhancing Noise Robustness by Gradient Scaling (NeurIPS 2022).
This codebase is written for python3, other necessary python packages are including
- numpy=1.20.1
- torch=1.8.1
- torchvision=0.2.2
- Pillow=8.2.0
To train the model in the paper, run the following commands:
Train the network on the CIFAR-10 dataset with 60% symmmetric label noise:
python train_cifar.py --root_dir <path_to_save_data> --noise_mode 'sym' --r 0.6
Train the network on the CIFAR-10 dataset with 40% asymmmetric label noise :
python train_cifar.py --root_dir <path_to_save_data> --noise_mode 'asym' --r 0.4 --num_epochs 300
Please refer to the Appendix for more information of hyperparameters.
hyperparameter options:
--batch_size batch size
--lr learning rate
--num_epochs number of epochs
--noise_mode label noise model(e.g. sym, asym)
--r noise level (e.g. 0.4)
--lam penalty loss coefficient
--delta confidence threshold (optional)
--beta auxiliary regularization coefficient (optional for RNAL)
--m momentum for target estimation
--es epoch that starts to perform target estimation
Before running the code, please download the datasets ANIMAL-10N, Clothing1M and Webvision.
If you use this code in your work, please cite our paper.