Compare the Bayesian samplers in PyBNF: Adaptive MCMC (am), DREAM(ZS) (dream), and P-DREAM (p_dream).
- Add ESS (Effective Sample Size) computation to
BayesianAlgorithm- Compute from chain autocorrelation (bulk ESS and tail ESS per Vehtari et al. 2021)
- Report alongside rank-normalized split-R-hat every 10 iterations
- Write ESS to output files for post-hoc analysis
- Refactor rank-normalized split-R-hat out of
DreamAlgorithmintoBayesianAlgorithm- All samplers should use the same convergence diagnostic
- Add automatic convergence stop (
rhat_threshold) toBayesianAlgorithmbase class
- Add ESS/evaluation metric (ESS divided by total model evaluations)
Build lightweight test models that compute score directly from parameters (no BioNetGen needed).
- Multivariate Gaussian (d configurable): known mean, covariance, and marginals
- Simplest correctness check: compare sampled mean/variance to truth
- Scale d = 5, 10, 20, 50 for dimensionality study
- Banana (Rosenbrock): correlated curved posterior
- Tests sampling along non-linear ridges
- Multimodal mixture: 2-3 separated Gaussian modes with known weights
- Tests mode-jumping and snooker updates
- Each target needs: trivial
.bnglor direct-score model,.conffiles for all samplers, ground truth file with analytical moments
- Script that runs each sampler N times (N >= 5 for variance) on the same target with the same evaluation budget
- Collect per-run: ESS per parameter, ESS/evaluation, R-hat trajectory, acceptance rate, wall-clock time
- For analytical targets: distance metric D = normalized error in mean and std (Laloy & Vrugt 2012, Eq. 10)
- Output: comparison tables and convergence trajectory plots
All experiment configs and the master runner are ready in benchmarks/.
Samplers: am, dream (ZS), p_dream (preconditioned ZS).
Run: python benchmarks/run_all_experiments.py --replicates 5 --skip-egfr
Or specific experiments: python benchmarks/run_all_experiments.py -e 1 2
- Correctness: all samplers on multivariate Gaussian, verify sampled moments match truth
- Config:
benchmarks/gaussian_d5/, run withrun_benchmark.py gaussian_d5
- Config:
- Efficiency (low-d): Gaussian d=5, compare ESS/evaluation across samplers
- Same run as Correctness — both metrics extracted from
gaussian_d5
- Same run as Correctness — both metrics extracted from
- Efficiency (scaling): Gaussian at d=5, 10, 20, 50 — how does ESS/evaluation scale?
- Configs:
benchmarks/gaussian_d{5,10,20,50}/ - Scaling table printed by
run_all_experiments.py --summary-only
- Configs:
- Correlated target: Banana distribution, compare ESS and mixing
- Config:
benchmarks/banana/
- Config:
- Multimodal target: Mixture of Gaussians, compare mode coverage and ESS
- Config:
benchmarks/multimodal/
- Config:
- Real-world: EGFR benchmark (d=37), compare convergence speed and posterior agreement
- Config:
benchmarks/egfr/(requires BioNetGen; use--skip-egfrto exclude)
- Config:
- Summarize results: which sampler wins where, and why
- Identify failure modes by target geometry and dimensionality
- Update documentation with recommendations