Giter Club home page Giter Club logo

mlc's Introduction

Meta Label Correction for Noisy Label Learning

This repository contains the source code for the AAAI paper "Meta Label Correction for Noisy Label Learning".

mlc_model

Data

The code will download automatically the CIFAR data set; for Clothing1M, please contact the original creator for access. Put the obtained Clothing1M data set under directory data/clothing1M. Then execute cd CLOTHING1M; python3 load_cloth1m_data.py to generate necessary folders for training.

Example runs

On CIFAR-10 run MLC with UNIF noise and a noise level of 0.4 by executing

python3 main.py --dataset cifar10 --optimizer sgd --bs 100 --corruption_type unif --corruption_level 0.4 --gold_fraction 0.02 --epochs 120 --main_lr 0.1 --meta_lr 3e-4 --runid cifar10_run  --cls_dim 128

On CIFAR-100, run MLC with FLIP noise and a noise level of 0.6 by executing

python3 main.py --dataset cifar100 --optimizer sgd --bs 100 --corruption_type flip --corruption_level 0.6 --gold_fraction 0.02 --epochs 120 --main_lr 0.1 --meta_lr 3e-4 --runid cifar100_run  --cls_dim 128

On Clothing1M, run MLC as

python3 main.py --dataset clothing1m --optimizer sgd --bs 32 --corruption_type unif --corruption_level 0.1 --gold_fraction 0.1 --epochs 15 --main_lr 0.1 --meta_lr 0.003 --runid clothing1m_run --cls_dim 128 --skip --gradient_steps 5

(Note that for clothing1m, corruption_type, corruption_level, and gold_fraction have no effect as the original dataset comes with actual noisy labels and clean/noisy data splits.)

Refer to python3 main.py --help for a detailed explanations of all applicable arguments.

Citation

If you find MLC useful, please cite the following paper

@inproceedings{zheng2021mlc,
  title={Meta Label Correction for Noisy Label Learning},
  author={Zheng, Guoqing and Awadallah, Ahmed Hassan and Dumais, Susan},  
  journal={Proceedings of the AAAI Conference on Artificial Intelligence (AAAI)},
  volume={35},
  year={2021},
}

For any questions, please submit an issue or contact [email protected].

This repository is released under MIT License. (See LICENSE)

mlc's People

Contributors

apsyx avatar microsoft-github-operations[bot] avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mlc's Issues

The result of Clothing1M can't be reproduced

@apsyx
Dear author, we have tried to reproduce the result of your method on Clothing1M.
We use the file in #4 to generate the clean_train, clean_val, noisy_train, clean_test folders.
But the result we obtained is still lower than the result in the paper.

Approxiamation for K steps

This work propose to approximate the current meta-parameter gradient with information from the previous k step as follows:
image
I guess the second term is the gradient of alpha for just one step, but I haven't seen why the first term can approximate the previous K.
In the code, author seems to calculate the above equ 4 every iteration, and accumulate the gradients and update meta parameter every K step.

# accumulate discounted iterative gradient
for i, param in enumerate(meta_net.parameters()):
    if param.grad is not None:
        param.grad.add_(gamma * args.dw_prev[i])
        args.dw_prev[i] = param.grad.clone()
if (args.steps+1) % (args.gradient_steps)==0: # T steps proceeded by main_net
    meta_opt.step()
    args.dw_prev = [0 for param in meta_net.parameters()] # 0 to reset 

Could you please help further explain the gamma and how the equ 4 can approximate the K step gradients? Thanks @apsyx

No such file or directory: 'data/clothing1M/clean_train'

Hi, dear author.

Thank you for your excellent work!

But when I try to run your code in clothing1M dataset (I follow the instruction in readme), but directory "clean_train" does not exist. Could you provide the related code about this directory?

Thank you very much.

How to make MLC work on custom data

Hello,
Thanks for the amazing work!
I am planning to run MLC on my custom dataset. I have around 1000 samples in the gold dataset and 10 times more on the noise dataset. The gold dataset is highly imbalanced. I would like to know the how to set the learning rate hyper parameters inorder to save the time. Does the Meta Learning rate needs to be lower than the Main learning rate ? Any insights would be helpful

Problems about the code related to text classification

Hi,
Thanks for sharing your code!
When applied to text classification tasks, convergence is slow and it is difficult to achieve good results.
Can the code related to text classification in the experiment be open sourced?

Directory Creation Issue

If we run the code for the first time. It gives error while creating

  • Log file as 'log' directory is not present
  • Similarly 'model' directory error while saving the model

To resolve:

  1. Either check if exists and is directory dont present then create it.

Steps :

  1. Clone repo
  2. python3 main.py --dataset cifar10 --optimizer sgd --bs 100 --corruption_type unif --corruption_level 0.4 --gold_fraction 0.02 --epochs 120 --main_lr 0.1 --meta_lr 3e-4 --runid cifar10_run --cls_dim 128

Adam support

Have you ever implemented the update_params function for Adam optimizer?
If so, how is the performance compared to the SGD-based methods?

The default value of gradient_steps

The default value of gradient_steps is set to 1 (main.py), which seems that the first term of the eqn 6 in your paper is never used.

if (args.steps + 1) % (args.gradient_steps) == 0: # T steps proceeded by main_net
meta_opt.step()
args.dw_prev = [0 for param in meta_net.parameters()] # 0 to reset

The condition in the if expression is always True.

tabular data/ noisy instances

Hi,
thanks for sharing your implementation. I have two questions about it:

  1. Does it also work on tabular data?
  2. Is it possible to identify the noisy instances (return the noisy IDs or the clean set)?

Thanks!

missing wideresnet and utils file

Hi Guoqing,

Thanks for sharing the code! I am trying to run your code and find that in the cifar dataset file, the "utils" file is missed. And I found it in the clothing dataset file.

In addition, it seems like the "wideresnet" imported in "load_corrupted_data_mlg" is also missed, I didn't find it in other files.
Could you please tell me where to find it or did I miss anything?

Thx

No module named 'load_corrupted_data_mlg'

Hi,

Thanks for your great work! When I tried to run the code on CIFAR-10 with the command provided, I found the module 'load_corrupted_data_mlg' is missing. Did you miss this file or should I install other libraries?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.