Home

Awesome

Neural-Relation-Graph

Official PyTorch implementation of "Neural Relation Graph: A Unified Framework for Identifying Label Noise and Outlier Data", published at NeurIPS'23

<p align="center"> <img src="https://github.com/snu-mllab/Neural-Relation-Graph/blob/main/figure/method.png" align="center" width=70%> </p>

Requirements

conda create --name relation python=3.8.8
conda activate relation

pip install -r requirements.txt
# [CUDA install example] pip install torch==1.11.0+cu113 torchvision==0.12.0+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
   pip uninstall --yes gdown
   pip install gdown -U --no-cache-dir

Notes

Label error detection

ImageNet with synthetic label error (8%)

python download.py -n mae_large_noise0.08_49
python detect.py -n mae_large_noise0.08_49 --pow 4

ImageNet validation set cleaning

python download.py -n mae_large_49
python detect_val.py -n mae_large_49 --pow 4

OOD detection

python download.py -n [mae_large_49/resnet50]
python detect_ood.py -n [mae_large_49/resnet50] --pow 1

Language and speech datasets

Applying our method to custom datasets

  1. Prepare data features and probability vectors.
  2. Update self._load_feat and self._load_noisy_label functions in detect.py for label error and detect_ood.py for OOD.
  3. Run the updated Python scripts.
    • Tune --pow, a temperature for the kernel function (suggestion: [1, 4, 6, 8]).

Citation

@article{kim2023neural,
  title={Neural Relation Graph: A Unified Framework for Identifying Label Noise and Outlier Data},
  author={Kim, Jang-Hyun and Yun, Sangdoo and Song, Hyun Oh},
  journal={Advances in Neural Information Processing Systems},
  year={2023}
}