GithubHelp home page GithubHelp logo

rodeo's Introduction

Gradient Estimation with Discrete Stein Operators

Code for reproducing the results in "Gradient Estimation with Discrete Stein Operators"
https://arxiv.org/abs/2202.09497
NeurIPS 2022 Outstanding Paper Award

Variance of Gradient Estimates for Training VAEs

Bernoulli likelihoods

Gaussian likelihoods

Dependencies

tensorflow >= 2.5.0
tensorflow-datasets >= 4.2.0
tensorflow-probability >= 0.12.2
scipy >= 1.6.3
absl >= 0.12.0
pandas >= 1.2.4
numpy >= 1.19.5
tqdm >= 4.60.0

Usage

Running VAE experiments:

python experiment_launcher_singlelayer.py --dataset={dataset} --genmo_lr={lr} --infnet_lr={lr} --encoder_type=nonlinear --grad_type={grad_type} --K={K} --D=200 --seed={seed}
  • dataset:
    • dynamically binarized: mnist, fashion_mnist, omniglot.
    • non-binarized: continuous_mnist, continuous_fashion, continuous_omniglot.
  • lr:
    • dynamically binarized: 1e-3 for mnist and omniglot, 3e-4 for fashion_mnist.
    • non-binarized: 1e-4.
  • grad_type:
    • REINFORCE leave-one-out: reinforce_loo
    • DisARM (Dong et al., 2020): disarm
    • Double CV (Titsias & Shi, 2021): double_cv
    • RELAX (Grathwohl et al., 2017): relax (not affected by K, always using 3 evaluations of f)
    • ARMS (Dimitriev & Zhou, 2020): arms
    • RODEO (ours):
      • K=2: discrete_stein_avg
      • K>2: discrete_stein_output_avg
  • K: number of samples used, equivalent to number of evaluations of f in gradient estimators except RELAX.
  • seed: 1-5.

Running hierarchical VAE experiments:

python experiment_launcher_multilayer.py --dataset={dataset} --genmo_lr={lr} --infnet_lr={lr} --grad_type={grad_type} --K=2 --seed={seed}

Citation

To cite this work, please use

@inproceedings{NEURIPS2022_a5a5b0ff,
 author = {Shi, Jiaxin and Zhou, Yuhao and Hwang, Jessica and Titsias, Michalis and Mackey, Lester},
 booktitle = {Advances in Neural Information Processing Systems},
 editor = {S. Koyejo and S. Mohamed and A. Agarwal and D. Belgrave and K. Cho and A. Oh},
 pages = {25829--25841},
 publisher = {Curran Associates, Inc.},
 title = {Gradient Estimation with Discrete Stein Operators},
 url = {https://proceedings.neurips.cc/paper_files/paper/2022/file/a5a5b0ff87c59172a13342d428b1e033-Paper-Conference.pdf},
 volume = {35},
 year = {2022}
}

Acknowledgement

The code is modified from Double CV (https://github.com/thjashin/double-cv), originally based on DisARM (https://github.com/google-research/google-research/tree/master/disarm/binary) and ARMS (https://github.com/alekdimi/arms)

rodeo's People

Contributors

thjashin avatar lmackey avatar

Stargazers

Jeff Carpenter avatar BlueMatrix avatar  avatar Daehoon Gwak avatar lalala avatar You Jiacheng avatar  avatar 爱可可-爱生活 avatar Yu Zhang avatar Songlin Yang avatar zeeeyang avatar Noveen Sachdeva avatar Eddie Zhang avatar Shanchao Yang avatar Zijing Ou avatar Yuhao Zhou avatar  avatar

Watchers

 avatar Yuhao Zhou avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.