项目作者: mlech26l

项目描述 :
Code repository of the paper "Learning representations for binary-classification without backpropagation" published at ICLR 2020
高级语言: Python
项目地址: git://github.com/mlech26l/iclr_paper_mdfa.git
创建时间: 2020-01-21T08:28:22Z
项目社区:https://github.com/mlech26l/iclr_paper_mdfa

开源协议:MIT License

下载


Code repository of Learning representations for binary-classification without backpropagation

Overview

Title Learning representations for binary-classification without backpropagation
Conference ICLR 2020 (Poster)
PDF Link
openreview submission Link

alt text

Requirements

Requires python3 and TensorFlow 1.x (tested with 1.14.0)

To create a new virtual python3 environment run

  1. python3 -m venv mdfa_env
  2. source mdfa_env/bin/activate
  3. pip3 install tensorflow-gpu==1.14.0

Module descriptions:

  • fa_model.py: Implementation of BP, FA, DFA and mDFA for fully-conncted network architectures
  • fa_convnet.py: Implementation of BP, FA, DFA and mDFA for all-convolutional-network architectures
  • train_model.py: Main file for training a network on MNIST, CIFAR-10 or CIFAR-100
  • train_imagenet.py: Main file for training a network on ImageNet
  • init_parser.py: Parser for the weight initialization string given by the program arguments
  • imagenet_iterator.py: Utility for processing ImageNet data

Examples

Training a fully-connected network using mDFA on 5-class CIFAR-10:

  1. python3 train_model.py --dataset cifar10 --classes 5 --model mdfa

Training a convnet using backpropagation on 2-class CIFAR-100:

  1. python3 train_model.py --dataset cifar100 --classes 2 --model bp --convnet

Weight initialization

Weight intialization can be control by the following arguments:

  1. --forward_init 0
  2. # Initalizes forward weights by all zeros
  3. --backward_init U1
  4. # Initalizes backward weights using a symmetric uniform distrbution inversely scaled by the square-root of the number of incomming connections
  5. --forward_init N0.1
  6. --backward_init N0.1
  7. # Initalizes forward and backward weights using a normal distribution scaled by 0.1

Note that the --backward_init will be ignored if the network if trained by backpropagation

Weight initialization for mDFA will be automatically adapted to the weight constraints.
For instance, the --forward_init N0.1 argument for mDFA will be translated into the absolute normal distrubution as discussed in the paper. (Likewise, the lower bound for --forward_init U1 will be set to a small epsilon)

Weight constraints for mDFA

Weight constraints for mDFA are implemented through a set of clipping operations that are applied after each parameter update, i.e.,

  1. w = mDFA_update(w)
  2. w = maximum(w,0)

For more details see fa_model.py lines 265-271 and 409-417.

Bibtex

  1. @inproceedings{
  2. lechner2020learning,
  3. title={Learning representations for binary-classification without backpropagation},
  4. author={Mathias Lechner},
  5. booktitle={International Conference on Learning Representations},
  6. year={2020},
  7. url={https://openreview.net/forum?id=Bke61krFvS}
  8. }