Skip to content

Improved UODE inference of Lotka Volterra#155

Merged
DanWaxman merged 3 commits into
mh-uodefrom
ml-mh-uode
Mar 22, 2026
Merged

Improved UODE inference of Lotka Volterra#155
DanWaxman merged 3 commits into
mh-uodefrom
ml-mh-uode

Conversation

@mattlevine22
Copy link
Copy Markdown
Collaborator

@mattlevine22 mattlevine22 commented Mar 19, 2026

Improving #153 for UODE inference of Lotka-Volterra.

Made the following changes:

  • Use Ensemble Kalman Filter (ContinuousTimeEnKF) instead of Extended, as it is more numerically robust
  • Removed optimization scheduler---reverted to 4000 epochs of ADAM with Ir=1e-3.
  • Fixed the plotter for comparing filtered means vs data---when using AutoDelta guide, svi_result.params doesn't always do what you think it does.

Additional thoughts:

N.B. I took these settings (EnKF + AutoDelta with lr=1e-3) from the SINDY-notebook for Fitz-Hugh-Nagumo. It is reassuring that they generalized nicely to this case.

N.B.B. most of the 4000 epochs are to "hyper-refine" the inference; the data are explained quite well after 1000 epochs, and the final 3000 epochs mostly focus on full sparsification (to see this, rerun with 1000 epochs).

@mattlevine22 mattlevine22 changed the title Ml mh uode Improved UODE inference of Lotka Volterra Mar 19, 2026
@DanWaxman DanWaxman changed the base branch from main to mh-uode March 19, 2026 14:17
@DanWaxman
Copy link
Copy Markdown
Collaborator

I changed the base branch to #mh-uode and requested @markusheinonen to review -- that makes the most sense to me from a workflow perspective. Then afterwards we can work on merging mh-uode to main.

Copy link
Copy Markdown
Collaborator

@DanWaxman DanWaxman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These look good to me. In the spirit of faster workflow, I'll merge these into #153

@DanWaxman DanWaxman merged commit e3c5871 into mh-uode Mar 22, 2026
2 checks passed
DanWaxman added a commit that referenced this pull request Jun 3, 2026
* Add UODE Lotka-Volterra notebook: observe both species, tighter sparsity

- Observe both prey and predator (H=I_2) at dt=0.2 (150 points)
- Laplace(0, 0.005) prior for SINDy-like sparsity on Theta
- SVI config: lr=1e-3, cov_rescaling=2.0, lr_decay=0.5, 2000 steps
- Correctly recovers xy interaction coefficients (Frobenius err ~0.077)
- Includes debug CLI script for systematic experiments

* Improved UODE inference of Lotka Volterra (#155)

* add MLL-truth computation and more visualizations

* working lv UODE---use EnKF + 2000 adam epochs with lr=1e-3 + fixed posterior predictive filtering plots

* reverted to original timeseries length

* Upgrade to predict times API

* Remove debug script

* Fix some typos and formatting

* Link UODE notebook

* fix text to match code

---------

Co-authored-by: Matt Levine <mattlevine22@gmail.com>
Co-authored-by: Dan Waxman <dan.waxman1@gmail.com>
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.

2 participants