All Projects → ryanchankh → redunet_paper

ryanchankh / redunet_paper

Licence: other
Official NumPy Implementation of Deep Networks from the Principle of Rate Reduction (2021)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to redunet paper

self critical vqa
Code for NeurIPS 2019 paper ``Self-Critical Reasoning for Robust Visual Question Answering''
Stars: ✭ 39 (-20.41%)
Mutual labels:  interpretable-deep-learning
Awesome Machine Learning Interpretability
A curated list of awesome machine learning interpretability resources.
Stars: ✭ 2,404 (+4806.12%)
Mutual labels:  interpretable-deep-learning
Pytorch Grad Cam
Many Class Activation Map methods implemented in Pytorch for CNNs and Vision Transformers. Including Grad-CAM, Grad-CAM++, Score-CAM, Ablation-CAM and XGrad-CAM
Stars: ✭ 3,814 (+7683.67%)
Mutual labels:  interpretable-deep-learning
Layerwise-Relevance-Propagation
Implementation of Layerwise Relevance Propagation for heatmapping "deep" layers
Stars: ✭ 78 (+59.18%)
Mutual labels:  interpretable-deep-learning
CNN-Units-in-NLP
✂️ Repository for our ICLR 2019 paper: Discovery of Natural Language Concepts in Individual Units of CNNs
Stars: ✭ 26 (-46.94%)
Mutual labels:  interpretable-deep-learning
InterpretableCNN
No description or website provided.
Stars: ✭ 36 (-26.53%)
Mutual labels:  interpretable-deep-learning
path explain
A repository for explaining feature attributions and feature interactions in deep neural networks.
Stars: ✭ 151 (+208.16%)
Mutual labels:  interpretable-deep-learning
ProtoTree
ProtoTrees: Neural Prototype Trees for Interpretable Fine-grained Image Recognition, published at CVPR2021
Stars: ✭ 47 (-4.08%)
Mutual labels:  interpretable-deep-learning
ShapleyExplanationNetworks
Implementation of the paper "Shapley Explanation Networks"
Stars: ✭ 62 (+26.53%)
Mutual labels:  interpretable-deep-learning
rl singing voice
Unsupervised Representation Learning for Singing Voice Separation
Stars: ✭ 18 (-63.27%)
Mutual labels:  interpretable-deep-learning
ISeeU
ISeeU: Visually interpretable deep learning for mortality prediction inside the ICU
Stars: ✭ 20 (-59.18%)
Mutual labels:  interpretable-deep-learning
deep-explanation-penalization
Code for using CDEP from the paper "Interpretations are useful: penalizing explanations to align neural networks with prior knowledge" https://arxiv.org/abs/1909.13584
Stars: ✭ 110 (+124.49%)
Mutual labels:  interpretable-deep-learning
m-phate
Multislice PHATE for tensor embeddings
Stars: ✭ 54 (+10.2%)
Mutual labels:  interpretable-deep-learning

Deep Networks from the Principle of Rate Reduction

This repository is the official NumPy implementation of the paper Deep Networks from the Principle of Rate Reduction (2021) by Kwan Ho Ryan Chan* (UC Berkeley), Yaodong Yu* (UC Berkeley), Chong You* (UC Berkeley), Haozhi Qi (UC Berkeley), John Wright (Columbia), and Yi Ma (UC Berkeley). For PyTorch version of ReduNet, please visit https://github.com/ryanchankh/redunet.

What is ReduNet?

ReduNet is a deep neural network construcuted naturally by deriving the gradients of the Maximal Coding Rate Reduction (MCR2) [1] objective. Every layer of this network can be interpreted based on its mathematical operations and the network collectively is trained in a feed-forward manner only. In addition, by imposing shift invariant properties to our network, the convolutional operator can be derived using only the data and MCR2 objective function, hence making our network design principled and interpretable.


Figure: Weights and operations for one layer of ReduNet

[1] Yu, Yaodong, Kwan Ho Ryan Chan, Chong You, Chaobing Song, and Yi Ma. "Learning diverse and discriminative representations via the principle of maximal coding rate reduction" Advances in Neural Information Processing Systems 33 (2020).

Requirements

This codebase is written for python3. To install necessary python packages, run conda create --name redunet_official --file requirements.txt.

File Structure

Training

To train a model, one can run the training files, which has the dataset as thier names. For the appropriate commands to reproduce our experimental results, check out the experiment section below. All the files for training is listed below:

  • gaussian2d.py: mixture of Guassians in 2-dimensional Reals
  • gaussian3d.py: mixture of Guassians in 3-dimensional Reals
  • iris.py: Iris dataset from UCI Machine Learning Repository (link)
  • mice.py: Mice Protein Expression Data Set (link)
  • mnist1d.py: MNIST dataset, each image is multi-channel polar form and model is trained to have rotational invariance
  • mnist2d.py: MNIST dataset, each image is single-channel and model is trained to have translational invariance
  • sinusoid.py: mixture of sinusoidal waves, single and multichannel data

Evaluation and Ploting

Evaluation and plots are performed within each file. Functions are located in evaluate.py and plot.py.

Experiments

Run the following commands to train, test, evaluate and plot figures for different settings:

Main Paper

Gaussian 2D: Figure 2(a) - (c)

$ python3 gaussian2d.py --data 1 --noise 0.1 --samples 500 --layers 2000 --eta 0.5 --eps 0.1

Gaussian 3D: Figure 2(d) - (f)

$ python3 gaussian3d.py --data 1 --noise 0.1 --samples 500 --layers 2000 --eta 0.5 --eps 0.1

Rotational-Invariant MNIST: 3(a) - (d)

$ python3 mnist1d.py --samples 10 --channels 15 --outchannels 20 --time 200 --classes 0 1 2 3 4 5 6 7 8 9 --layers 40 --eta 0.5 --eps 0.1  --ksize 5

Translational-Invariant MNIST: 3(e) - (h)

$ python3 mnist2d.py --classes 0 1 2 3 4 5 6 7 8 9 --samples 10 --layers 25 --outchannels 75 --ksize 9 --eps 0.1 --eta 0.5

Appendix

For Iris and Mice Protein:

$ python3 iris.py --layers 4000 --eta 0.1 --eps 0.1
$ python3 mice.py --layers 4000 --eta 0.1 --eps 0.1

For 1D signals (Sinusoids):

$ python3 sinusoid.py --time 150 --samples 400 --channels 7 --layers 2000 --eps 0.1 --eta 0.1 --data 7 --kernel 3

For 1D signals (Rotational Invariant MNIST):

$ python3 mnist1d.py --classes 0 1 --samples 2000 --time 200 --channels 5 --layers 3500 --eta 0.5 --eps 0.1

For 2D translational invariant MNIST data:

$ python3 mnist2d.py --classes 0 1 --samples 500 --layers 2000 --eta 0.5 --eps 0.1

Reference

For technical details and full experimental results, please check the paper. Please consider citing our work if you find it helpful to yours:

@article{chan2020deep,
  title={Deep networks from the principle of rate reduction},
  author={Chan, Kwan Ho Ryan and Yu, Yaodong and You, Chong and Qi, Haozhi and Wright, John and Ma, Yi},
  journal={arXiv preprint arXiv:2010.14765},
  year={2020}
}

License and Contributing

  • This README is formatted based on paperswithcode.
  • Feel free to post issues via Github.

Contact

Please contact [email protected] and [email protected] if you have any question on the codes.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].