Reproduction code for the experiments from our study of Dingo-IS (Dax et al. 2023).
Compares forward KL, reverse KL, alpha-divergence, annealed training, and synthetic marginalization on 2D and 3D toy posteriors.
git clone <repo>
cd narrow_posterior_IS
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txtThe code automatically uses CUDA if available.
# 2D experiments (less than 10min on T4 GPU)
python run_experiments.py 2d
# 3D experiments (slightly more)
python run_experiments.py 3d
# Options
python run_experiments.py 2d --out_dir figures --n_epochs 400 --n_is 20000 --seed 42Figures are saved as PDF/PNG to figures/ (or --out_dir).
├── models/ # Real-NVP normalizing flow
├── posteriors/ # 2D and 3D toy posteriors
├── training/ # fKL, rKL, alpha-div, annealed objectives
├── inference/ # IS utilities + synthetic marginalization
├── plotting/ # all figure generation
├── report/ # The 5-page PDF report
├── run_experiments.py # main script
└── everything.ipynb # detailed and commented notebook