[WIP] Add numpyro.ops.gaussian and GaussianHMM with parallel Kalman marginalization - #2273
juanitorduz wants to merge 26 commits into
Conversation
Benchmark reportthis PR + run time: 2 faster
compile time: unchanged across 32 benchmarksSignificant changes (2) ─────── run time ─────── ───── compile time ─────
benchmark baseline this PR Δ baseline this PR Δ
───────────────────────────────────────────────────────────────────────────────────────
+ gamma_log_prob 1.4 ms 1.3 ms -5.2% 1.99 s 1.93 s -3.3%
+ initialize_model_hierarchical 31.4 ms 29.6 ms -5.6% 3.23 s 3.17 s -2.0%Red is slower, green is faster; a row is coloured by the worse of its two columns. A delta in parentheses cleared the threshold on a measurement below the resolution floor, so it is shown without being called a change. † marks a benchmark that could not be compared — see below. Full results
|
| baseline | this PR | |
|---|---|---|
| ref | master |
feat/gaussian-hmm-ops |
| commit | 07501df3 |
439de1d0 |
| numpyro | 0.21.0 | 0.21.0 |
| jax | 0.11.1 | 0.11.1 |
| backend | cpu | cpu |
| python | 3.14.7 | 3.14.7 |
Runner: Linux-6.17.0-1022-azure-x86_64-with-glibc2.39, 4 CPUs.
Produced by this benchmark run.
a2d51a2 to
09aacdf
Compare
…er diagonal factors
…ixed layouts, x64)
Ports Pyro's information-form Gaussian factor algebra (
numpyro.ops.gaussian) and addsGaussianHMM/IndependentHMMwith O(log T) parallel marginalization,filter,sample,sample_posterior,conjugate_update,prefix_condition,reshape_batch.Left-acting matrices as in
GaussianStateSpace; shapes are leaf-derived and rank-aligned (compatible with #2271).Verified against dense joint oracles, Pyro's factor identities, sampler moments,
GaussianStateSpacemoment identities, and a NUTS local-level smoke test; float32 by default with an x64 CI case.Stacked: a follow-up PR adds
GammaGaussianHMM,LinearHMM,GaussianMRF,StudentTReparamandLinearHMMReparam.