Skip to content

Add Bayesian inference benchmark for stochastic Lotka-Volterra SDE - #1569

Open
ArpanC6 wants to merge 2 commits into
SciML:masterfrom
ArpanC6:bayesian-sde-benchmark-clean
Open

Add Bayesian inference benchmark for stochastic Lotka-Volterra SDE#1569
ArpanC6 wants to merge 2 commits into
SciML:masterfrom
ArpanC6:bayesian-sde-benchmark-clean

Conversation

@ArpanC6

@ArpanC6 ArpanC6 commented May 18, 2026

Copy link
Copy Markdown

This benchmark compares Bayesian MCMC (Turing + NUTS) with MLE (Nelder Mead) for estimating parameters of the stochastic Lotka Volterra system using the Euler Maruyama pseudo likelihood.

What’s changed from the previous version

Replaced @ode_def with a plain f(du, u, p, t) function so the parameters a, b, c, d, σ are clear.
Removed the fixed seed in the Turing model using a fixed seed made the SDE behave deterministically which breaks the pseudo likelihood.
Switched the MLE optimizer to Nelder Mead and removed AutoForwardDiff because the SDE solver doesn’t work well with automatic differentiation.
Removed unused imports StaticArrays and ParameterizedFunctions.
Fixed chain indexing using vec(Array(chain[param])).
Cleaned up empty code blocks.

Note: This PR only has the new benchmark commit. The previous PR (#1553) also had an unrelated commit from another branch.

@ArpanC6
ArpanC6 force-pushed the bayesian-sde-benchmark-clean branch from fe07707 to f13fea6 Compare July 25, 2026 16:41
@ArpanC6

ArpanC6 commented Jul 25, 2026

Copy link
Copy Markdown
Author

@ChrisRackauckas Following up on my earlier diagnosis I have gone ahead and pushed the fix

Switched to EM(dt=0.01) with isoutofdomain instead of SRIW1() which stops the dt <= dtmin aborts when MCMC explores unstable parameter regions (like negative populations).

Using MH() instead of NUTS() since NUTS was hitting the max tree depth at 10.0 on this multimodal posterior.

Using NelderMead() for MLE instead of LBFGS() gradient-free makes more sense here since the SDE solver isn't reliably differentiable through AD.

Everything is rebased on the latest master. CI should be clean now feel free to take a look whenever you get a chance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant