GithubHelp home page GithubHelp logo

hrayrhar / limit-label-memorization Goto Github PK

View Code? Open in Web Editor NEW
39.0 5.0 9.0 29.15 MB

Improving generalization by controlling label-noise information in neural network weights.

License: MIT License

Python 0.55% Jupyter Notebook 99.45%
information-theory neural-network generalization memorization

limit-label-memorization's Introduction

Improving generalization by controlling label-noise information in neural network weights

The author implementation of LIMIT method described in the paper "Improving generalization by controlling label-noise information in neural network weights" by Hrayr Harutyunyan, Kyle Reing, Greg Ver Steeg, and Aram Galstyan.

If you goal is to reproduce the results, please use the version of the code at time of ICML 2020 camera-ready submission. It can be found in the following release.

If your goal is to use LIMIT, you can use the this newer code. It is better commented and easier to use. The main method of the paper, LIMIT, is coded in the LIMIT class of the file methods/limit.py.

To cite the paper please use the following BibTeX:

@incollection{harutyunyan2020improving,
 author = {Harutyunyan, Hrayr and Reing, Kyle and Ver Steeg, Greg and Galstyan, Aram},
 booktitle = {Proceedings of Machine Learning and Systems 2020},
 pages = {5172--5182},
 title = {Improving generalization by controlling label-noise information in neural network weights},
 year = {2020}
}

Requirements:

  • Basic data science libraries: numpy, scipy, tqdm, matplotlib, seaborn, pandas, scikit-learn.
  • We use Pytorch 1.4.0, but higher versions should work too.
  • Additionally, only for extracting data from Tensorboard logs, tensorflow >= 2.0 is needed.

The exact versions of libraries we used are listed in the requirements.txt file.

Using the code

The whole code is writen as a package. All scripts should be initiated from the root directory. An example command would be:

python -um scripts.train_classifier -d cuda -c configs/4layer-cnn-mnist.json --log_dir logs/mnist

To monitor the training we run Tensorboard:

tensorboard --logdir=/path/to/the/log/directory

Structure of the repository

Directory Purpose
methods Contains implementations of classifiers used in the paper, including LIMIT.
modules Contains code that is modular and can be shared across different models and experiments.
notebooks Designed for Jupyter notebooks. Contains the notebooks used to generate the plots in the paper.
scripts Contains the scripts for training, testing, collecting results, and generating training commands.
configs Stores training/architecture configurations of our models.
logs Used to store tensorboard logs.
data Used to store data files.
plots Used to store the plots.
nnlib Points to a submodule which contains useful and generic code for training neural networks.

Reproducing the results

As mentioned above, we recommend using the code of the v0.1 release to reproduce the results of the paper. However, one should be able to reproduce the results with the current code too, although some unexpected errors might arise (they should be easy to fix). The commands we used to run the experiments were generated using the scripts/generate_commands.py script.

limit-label-memorization's People

Contributors

hrayrhar 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

Watchers

 avatar  avatar  avatar  avatar  avatar

limit-label-memorization's Issues

about cuda

Can I run the code without cuda. say, in CPU?

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!

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.