Home

Awesome

AdaCorr

This is the code for the paper:

<a> Error-Bounded Correction of Noisy Labels </a> <br> Songzhu Zheng, Pengxiang Wu, Aman Goswami, Mayank Goswami, Dimitris Metaxas, Chao Chen </br> Paper Link Presented at ICML 2020

If you find this code useful in your research please cite:

@inproceedings{songzhu2020_LRT,
  title={Error-Bounded Correction of Noisy Labels},
  author={Songzhu Zheng, Pengxiang Wu, Aman Goswami, Mayank Goswami, Dimitris Metaxas, Chao Chen},
  booktitle={ICML},
  year={2020}
}

Introduction

AdaCorr is an algorithm that is designed to perform robustly when label noise is presented in your training data. This algorithm will try to correct mislabeled data points during training process relying on current network's confidence.

Specifically, for each input data point

Steps (1) and (2) are conducted iteratively until the learning procedure converges.

Environment Setting

The environment setup for AdaCorr is listed in environment.yml. To install, run:

conda env create -f environment.yml
source activate torch1.6

Running AdaCorr

There are several command-line flags that you can use to configure the input/output and hyperparameters to be applied by AdaCorr.

python LRTcorrect.py 
[--dataset] 
[--network]  
[--noise_type]
[--noise_level]
[--lr] 
[--n_epochs] 
[--epoch_start] 
[--epoch_update] 
[--epoch_interval] 
[--every_n_epoch] 
[--two_stage] 
[--gpu] 
[--n_gpus] 
[--seed]

For example, to run AdaCorr on CIFAR10 with 20% uniform noisy level with <img src="https://render.githubusercontent.com/render/math?math=L_{ce}"> introduced at epoch 25 and correction starting at 30, you could run:

python LRTcorrect.py --dataset cifar10 --network preact_resnet34 --noise_type uniform --noise_level 0.2 --n_epochs 180 --epoch_start 25 --epoch_update 30

Current version doesn't support user-customized dataset. If you wish to use AdaCorr on your own dataset, your need to write your own data loader and replace the one used in LRTcorrect.py. If you have any question, please contact imzszhahahaha@gmail.com for the issue of implementation.

Parameter Setting for Experiment Results

The hyper-parameter setting used to reproduce the result in the paper is presented in Experiment_Log folder. You can simply run these bash file to view the results. All commands is in following format:

python -W ignore LRTcorrect.py --dataset mnist --network preact_resnet34 --noise_type uniform --noise_level 0.2 --lr 1e-3 --epoch_start 10 --epoch_update 15 --n_epochs 180 --n_gpus 1 --gpu 0

MNIST - Uniform Noise

python -W ignore LRTcorrect.py --dataset mnist --network preact_resnet34 --noise_type uniform --noise_level 0.2 --lr 1e-3 --epoch_start 10 --epoch_update 15 --n_epochs 180 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset mnist --network preact_resnet34 --noise_type uniform --noise_level 0.4 --lr 1e-3 --epoch_start 10 --epoch_update 15 --n_epochs 180 --n_gpus 1 --gpu 0 
python -W ignore LRTcorrect.py --dataset mnist --network preact_resnet34 --noise_type uniform --noise_level 0.6 --lr 1e-3 --epoch_start 10 --epoch_update 15 --n_epochs 180 --n_gpus 1 --gpu 0 
python -W ignore LRTcorrect.py --dataset mnist --network preact_resnet34 --noise_type uniform --noise_level 0.8 --lr 1e-3  --epoch_start 5 --epoch_update 10 --n_epochs 180 --n_gpus 1 --gpu 0 

CIFAR10 - Uniform Noise

python -W ignore LRTcorrect.py --dataset cifar10 --network preact_resnet34 --noise_type uniform --noise_level 0.2 --lr 1e-3 --n_epochs 180 --epoch_start 25 --epoch_update 30 --gpu 0 --n_gpus 1
python -W ignore LRTcorrect.py --dataset cifar10 --network preact_resnet34 --noise_type uniform --noise_level 0.4 --lr 1e-3 --n_epochs 180 --epoch_start 25 --epoch_update 30 --gpu 0 --n_gpus 1
python -W ignore LRTcorrect.py --dataset cifar10 --network preact_resnet34 --noise_type uniform --noise_level 0.6 --lr 1e-3 --n_epochs 180 --epoch_start 25 --epoch_update 30 --gpu 0 --n_gpus 1
python -W ignore LRTcorrect.py --dataset cifar10 --network preact_resnet34 --noise_type uniform --noise_level 0.8 --lr 1e-3 --n_epochs 180 --epoch_start 20 --epoch_update 25 --gpu 0 --n_gpus 1

CIFAR100 - Uniform Noise

python -W ignore LRTcorrect.py --dataset cifar100 --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type uniform --noise_level 0.2 --epoch_start 25 --epoch_update 30 --gpu 0 --n_gpus 1
python -W ignore LRTcorrect.py --dataset cifar100 --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type uniform --noise_level 0.4 --epoch_start 25 --epoch_update 30 --gpu 0 --n_gpus 1
python -W ignore LRTcorrect.py --dataset cifar100 --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type uniform --noise_level 0.6 --epoch_start 25 --epoch_update 30 --gpu 0 --n_gpus 1
python -W ignore LRTcorrect.py --dataset cifar100 --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type uniform --noise_level 0.8 --epoch_start 30 --epoch_update 35 --gpu 0 --n_gpus 1

Point Cloud - Uniform Noise

python -W ignore LRTcorrect.py --dataset pc --network pc --n_epochs 180 --lr 2e-3 --noise_type uniform --noise_level 0.2 --epoch_start 10 --epoch_update 15 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset pc --network pc --n_epochs 180 --lr 2e-3 --noise_type uniform --noise_level 0.4 --epoch_start 10 --epoch_update 15 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset pc --network pc --n_epochs 180 --lr 2e-3 --noise_type uniform --noise_level 0.6 --epoch_start 10 --epoch_update 15 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset pc --network pc --n_epochs 180 --lr 2e-3 --noise_type uniform --noise_level 0.8 --epoch_start 10 --epoch_update 15 --n_gpus 1 --gpu 0

MNIST - Asymmetric Noise

python -W ignore LRTcorrect.py --dataset mnist --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type asymmetric --noise_level 0.2 --epoch_start 5 --epoch_update 10 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset mnist --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type asymmetric --noise_level 0.3 --epoch_start 5 --epoch_update 10 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset mnist --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type asymmetric --noise_level 0.4 --epoch_start 5 --epoch_update 10 --n_gpus 1 --gpu 0

CIFAR10 - Asymmetric Noise

python -W ignore LRTcorrect.py --dataset cifar10 --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type asymmetric --noise_level 0.2 --epoch_start 20 --epoch_update 25 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset cifar10 --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type asymmetric --noise_level 0.3 --epoch_start 20 --epoch_update 25 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset cifar10 --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type asymmetric --noise_level 0.4 --epoch_start 20 --epoch_update 25 --n_gpus 1 --gpu 0

CIFAR100 - Asymmetric Noise

python -W ignore LRTcorrect.py --dataset cifar100 --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type asymmetric --noise_level 0.2 --epoch_start 25 --epoch_update 30 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset cifar100 --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type asymmetric --noise_level 0.3 --epoch_start 25 --epoch_update 30 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset cifar100 --network preact_resnet34 --n_epochs 180 --lr 1e-3 --noise_type asymmetric --noise_level 0.4 --epoch_start 25 --epoch_update 30 --n_gpus 1 --gpu 0

Point Cloud - Asymmetric Noise

python -W ignore LRTcorrect.py --dataset pc --network pc --noise_type asymmetric --lr 2e-3 --noise_level 0.2 --n_epochs 180 --epoch_start 10 --epoch_update 15 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset pc --network pc --noise_type asymmetric --lr 2.5e-3 --noise_level 0.3 --n_epochs 180 --epoch_start 10 --epoch_update 15 --n_gpus 1 --gpu 0
python -W ignore LRTcorrect.py --dataset pc --network pc --noise_type asymmetric --lr 2.5e-3 --noise_level 0.4 --n_epochs 180 --epoch_start 10 --epoch_update 15 --n_gpus 1 --gpu 0

Performance

Experiment_Table_1 Experiment_Table_2

Algorithm

LRT Algorithm Training Algorithm

Reference