All Projects → SamsungLabs → deep-weight-prior

SamsungLabs / deep-weight-prior

Licence: MIT license
The Deep Weight Prior, ICLR 2019

Programming Languages

Jupyter Notebook
11667 projects
python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to deep-weight-prior

hierarchical-dnn-interpretations
Using / reproducing ACD from the paper "Hierarchical interpretations for neural network predictions" 🧠 (ICLR 2019)
Stars: ✭ 110 (+161.9%)
Mutual labels:  iclr
CGCF-ConfGen
🧪 Learning Neural Generative Dynamics for Molecular Conformation Generation (ICLR 2021)
Stars: ✭ 41 (-2.38%)
Mutual labels:  iclr
WhitenBlackBox
Towards Reverse-Engineering Black-Box Neural Networks, ICLR'18
Stars: ✭ 47 (+11.9%)
Mutual labels:  iclr
Dropout BBalpha
Implementations of the ICML 2017 paper (with Yarin Gal)
Stars: ✭ 40 (-4.76%)
Mutual labels:  bayesian-deep-learning
spatial-smoothing
(ICML 2022) Official PyTorch implementation of “Blurs Behave Like Ensembles: Spatial Smoothings to Improve Accuracy, Uncertainty, and Robustness”.
Stars: ✭ 68 (+61.9%)
Mutual labels:  bayesian-deep-learning
icml-nips-iclr-dataset
Papers, authors and author affiliations from ICML, NeurIPS and ICLR 2006-2021
Stars: ✭ 21 (-50%)
Mutual labels:  iclr
pytorch-convcnp
A PyTorch Implementation of Convolutional Conditional Neural Process.
Stars: ✭ 41 (-2.38%)
Mutual labels:  bayesian-deep-learning
Awesome-Computer-Vision-Paper-List
This repository contains all the papers accepted in top conference of computer vision, with convenience to search related papers.
Stars: ✭ 248 (+490.48%)
Mutual labels:  iclr
cool-papers-in-pytorch
Reimplementing cool papers in PyTorch...
Stars: ✭ 21 (-50%)
Mutual labels:  iclr
skip-connections-matter
Codes for ICLR 2020 paper "Skip Connections Matter: On the Transferability of Adversarial Examples Generated with ResNets"
Stars: ✭ 61 (+45.24%)
Mutual labels:  iclr
TailCalibX
Pytorch implementation of Feature Generation for Long-Tail Classification by Rahul Vigneswaran, Marc T Law, Vineeth N Balasubramaniam and Makarand Tapaswi
Stars: ✭ 32 (-23.81%)
Mutual labels:  iclr
SuperNNova
Open Source Photometric classification https://supernnova.readthedocs.io
Stars: ✭ 18 (-57.14%)
Mutual labels:  bayesian-deep-learning
ocbnn-public
General purpose library for BNNs, and implementation of OC-BNNs in our 2020 NeurIPS paper.
Stars: ✭ 31 (-26.19%)
Mutual labels:  bayesian-deep-learning
INFO320
Neural Networks and Bayesian Learning
Stars: ✭ 24 (-42.86%)
Mutual labels:  bayesian-deep-learning
CADA
Attending to Discriminative Certainty for Domain Adaptation
Stars: ✭ 17 (-59.52%)
Mutual labels:  bayesian-deep-learning
TransMorph Transformer for Medical Image Registration
TransMorph: Transformer for Unsupervised Medical Image Registration (PyTorch)
Stars: ✭ 130 (+209.52%)
Mutual labels:  bayesian-deep-learning
DUN
Code for "Depth Uncertainty in Neural Networks" (https://arxiv.org/abs/2006.08437)
Stars: ✭ 65 (+54.76%)
Mutual labels:  bayesian-deep-learning
Structured-Bayesian-Pruning-pytorch
pytorch implementation of Structured Bayesian Pruning
Stars: ✭ 18 (-57.14%)
Mutual labels:  bayesian-deep-learning

Deep Weight Prior

This repo contains code for our ICLR2019 paper The Deep Weight Prior.

The generative model for kernels of convolutional neural networks, that acts as a prior distribution while training on new datasets.

Abstract: Bayesian inference is known to provide a general framework for incorporating prior knowledge or specific properties into machine learning models via carefully choosing a prior distribution. In this work, we propose a new type of prior distributions for convolutional neural networks, deep weight prior (DWP), that exploit generative models to encourage a specific structure of trained convolutional filters e.g., spatial correlations of weights. We define DWP in the form of an implicit distribution and propose a method for variational inference with such type of implicit priors. In experiments, we show that DWP improves the performance of Bayesian neural networks when training data are limited, and initialization of weights with samples from DWP accelerates training of conventional convolutional neural networks.

Poster

Experiments

Classification

Convergence

Random Feature Extraction

Launch experiments

Bayesian NN with Deep Weight Prior

Setup environment:

export DATA_ROOT=<path to MNIST/notMNIST>
export DWP_PATH=<path to logs to save>

Train source models (100 times):

python train-net.py --data not-mnist --bs 256 --hid_dim 256 512 --l2 0.001 --model fconv --net_cfg vanilla --seed <unique per launch>

Then we need to prune kernels with norm almost equal to zero. Selected kenels used for training priors can be found in data/fconv/conv7x7/ and data/fconv/conv5x5/.

Examples of 7x7 kernels

Examples of 7x7 kernels

Train VAE priors:

python train-vae.py --hidden_dim 32 --kernel_dim 7 --z_dim 2 --num_epochs 300 --data_dir data/fconv/conv7x7

python train-vae.py --hidden_dim 64 --kernel_dim 5 --z_dim 4 --num_epochs 300 --data_dir data/fconv/conv5x5

VAE latent space

VAE latent space for 7x7 kernels

Trained VAEs can found at data/fconv/vae7x7/ and data/fconv/vae5x5/, and can be loaded by utils.load_vae.

Train BNN with VAE prior (we vary data_split_seed from 0 to 9):

python train-bnn.py --data mnist --data_split_seed <seed> --num_examples 50 --epochs 10000 --model fconv --vae_list data/fconv/vae7x7/ data/fconv/vae5x5/ --init_list vae vae --net_cfg bayes --hid_dim 32 128 --prior_list vae vae --eval_freq 100

Citation

If you found this code useful please cite our paper

@article{atanov2019dwp,
  title={The Deep Weight Prior},
  author={Atanov, Andrei and Ashukha, Arsenii and Struminsky, Kirill and Vetrov, Dmitry and Welling, Max},
  journal={arXiv preprint arXiv:1810.06943},
  year={2019}
}
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].