Code for reproducing some key results of our NeurIPS 2019 submission.
A New Distribution on the Simplex with Auto-Encoding Applications
-
Python (version 3.6.7 or higher)
-
Python requirements are captured in
requirements.txt- For GPU accelerated TensorFlow:
- run
pip install -r requirements.txt
- run
- For CPU TensorFlow:
- Change
tensorflow-gputotensorflowinrequirements.txt - run
pip install -r requirements.txt
- Change
- For GPU accelerated TensorFlow:
We utilize the TensorFlow Datasets API. Running any of our code that requires data will automatically download the requisite data.
- Experiment Scripts
experiments_ss_run.pyruns ours semi-supervised learning experiments.experiments_ss_analyze.pyanalyzes the results generated byexperiments_ss_run.py.
- Multivariate Kumaraswamy Code
mv_kumaraswamy_sampler.pycontains a TensorFlow implementation of the Multivariate Kumaraswamy.mv_kumaraswamy_theory.pycontains a symbolic implementation of stick-breaking process that supports Beta and Kumaraswamy distributions.
- Model Files
models_vae.pycontains our VAE models:VariationalAutoEncoderbase class that contains common parameters and functionsAutoEncodingKumaraswamyour proposed model (MV-Kumaraswamy) that works for dim(z) >= 0AutoEncodingSoftmaxour softmax baseline model that works for dim(z) >= 0KingmaM2our implementation of Kingma's M2 model, which works for dim(z) > 0
model_lib.pycontains functions used to construct the inference and recognition network operations.model_utils.pycontains data loading/splitting, training routines, and other support functions.
- Miscellaneous
unit_test.py
python mv_kumaraswamy_sampler.pywill plot and show Figure 1 (among other non-utilized figures).python mv_kumaraswamy_theory.pywill plot and show Figures 2-4 (among other non-utilized figures).ars-reparameterization/dirichlet-multinomial.ipynb(modified from https://github.com/blei-lab/ars-reparameterization) was used to generate Figure 5.python model_utils.pywill plot and show something similar to Figure 6.
To fully rerun our experiments, we recommend defining a new and unused data directory prefix. For example, 'your_results_' suffices.
-
Table 1:
- First run and wait for completion:
python experiments_ss_run.py --dir_prefix your_results_ --num_runs 10 --data_set mnist --num_labelled 600 --dim_z 0python experiments_ss_run.py --dir_prefix your_results_ --num_runs 10 --data_set mnist --num_labelled 600 --dim_z 2python experiments_ss_run.py --dir_prefix your_results_ --num_runs 10 --data_set mnist --num_labelled 600 --dim_z 50
- Second run:
python experiments_ss_analyze.py --dir_prefix your_results_ --data_set mnist
- First run and wait for completion:
-
Table 2:
- First run and wait for completion:
python experiments_ss_run.py --dir_prefix your_results_ --num_runs 4 --data_set svhn_cropped --num_labelled 1000 --dim_z 50
- Second run:
python experiments_ss_analyze.py --dir_prefix your_results_ --data_set svhn_cropped
- First run and wait for completion:
results_ss_mnistandresults_ss_svhn_croppedcontain the results from our original submission. Per reviewer feedback, we augmented this data with some additional baselines. However, these new baselines were not guaranteed to experience the same data folds. To analyze this data call the following:python experiments_ss_analyze.py --dir_prefix results_ss_ --data_set mnistpython experiments_ss_analyze.py --dir_prefix results_ss_ --data_set svhn_cropped
- To prepare our camera-ready submission, we reran all experiments such that all baselines would experience the same data folds. This "new" data is contained in
new_results_ss_mnistandnew_results_ss_svhn_cropped. These new sets can be analyzed with:python experiments_ss_analyze.py --dir_prefix new_results_ss_ --data_set mnistpython experiments_ss_analyze.py --dir_prefix new_results_ss_ --data_set svhn_cropped