Git Product home page Git Product logo

principled-dfa-training's Introduction

Principled Training of Neural Networks with Direct Feedback Alignment

This is the code for reproducing the results of our paper (preprint):

Principled Training of Neural Networks with Direct Feedback Alignment

Julien Launay, Iacopo Poli, Florent Krzakala

Abstract

The backpropagation algorithm has long been the canonical training method for neural networks. Modern paradigms are implicitly optimized for it, and numerous guidelines exist to ensure its proper use. Recently, synthetic gradients methods -- where the error gradient is only roughly approximated -- have garnered interest. These methods not only better portray how biological brains are learning, but also open new computational possibilities, such as updating layers asynchronously. Even so, they have failed to scale past simple tasks like MNIST or CIFAR-10. This is in part due to a lack of standards, leading to ill-suited models and practices forbidding such methods from performing to the best of their abilities. In this work, we focus on direct feedback alignment and present a set of best practices justified by observations of the alignment angles. We characterize a bottleneck effect that prevents alignment in narrow layers, and hypothesize it may explain why feedback alignment methods have yet to scale to large convolutional networks.

Reproducing the results

Running the provided code requires a CUDA-enabled GPU with around 1GB of memory.

When actions are required to make the code work (such as adding paths to datasets), they are marked with a comment starting with # TODO:.

To reproduce,

  • best_practices.py contains code related to the tables for FC networks in section 3 and for CNNs in section 4;
  • bottleneck.py contains the code for the bottlenecking experiments of section 4, and log_retrieval.py and bottleneck_from_log.py are contingency codes that were used as a file containing angle measurements value was corrupted.

Furthermore, the mltools folder is a custom-made library to simplify classic ML tasks with or without DFA. dfatools contains our implementation of DFA. A more streamlined and complete version of it will be released eventually.

Citation

If you found this implementation useful in your research, please consider citing:

@inproceedings{launay2019principled,
    title={Principled Training of Neural Networks with Direct Feedback Alignment},
    author={Launay, Julien and Poli, Iacopo and Krzakala, Florent},
    booktitle={Preprint},
    year={2019}
}

Code author: @slippylolo (Julien Launay - julien[at]lighton.ai)

principled-dfa-training's People

Contributors

iacolippo avatar

Watchers

James Cloos avatar  avatar

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.