https://github.com/stat-ml/mcvae
https://github.com/stat-ml/mcvae
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/stat-ml/mcvae
- Owner: stat-ml
- Created: 2020-11-16T14:28:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T20:52:42.000Z (over 3 years ago)
- Last Synced: 2025-08-15T23:45:16.228Z (10 months ago)
- Language: Python
- Size: 2.4 MB
- Stars: 12
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Monte Carlo Variational Auto-Encoders
The repository complements the code of the 'Monte Carlo Variational Auto-Encoders' paper.
In this paper, we introduce new objectives for training a VAE. These objectives are inspired by the exactness of MCMC methods and their specific application in annealing importance sampling.
The posteriors we received using our approach are very flexible, allowing us to learn complicated shapes, not feasible to parametric approaches. The results of the toy example are presented below:
In image datasets, in particular, MNIST, our new objectives, and induced posterior approximations outperform other approaches by a large margin:
Results on other image datasets are presented below:
# How to run the code?
All the experiments which appear in the paper can be run via the `exps.sh` script. For example:
```bash
python main.py --model L-MCVAE --dataset mnist --act_func gelu --binarize True --hidden_dim 64 --batch_size 100 --net_type conv --num_samples 1 --max_epochs 50 --step_size 0.01 --K 1 --use_transforms True --learnable_transitions False --use_cloned_decoder True
```
For each experiment, we can set
- **model** -- which model we want to train: 'VAE', 'IWAE', 'L-MCVAE' or 'A-MCVAE'
- **dataset** -- which dataset to use (now available MNIST, CIFAR-10, OMNIGLOT, Fashion-MNIST, CelebA[should be downloaded separately])
- **act_func** -- activation function
More arguments with the description are available in `main.py`
# Citation
The original paper can be found [here](http://proceedings.mlr.press/v139/thin21a/thin21a.pdf). If you use **MCVAE**, we kindly ask you to cite:
```
@inproceedings{thin2021monte,
title={Monte Carlo variational auto-encoders},
author={Thin, Achille and Kotelevskii, Nikita and Doucet, Arnaud and Durmus, Alain and Moulines, Eric and Panov, Maxim},
booktitle={International Conference on Machine Learning},
pages={10247--10257},
year={2021},
organization={PMLR}
}
```