Source-linked AI summary

py-ARGOS: A Python package for automatic, statistically principled discovery of ordinary differential equations from data

Yuzheng Zhang, Rui Carvalho

arXiv:2610.34458v1cs.MS

TL;DR

Recovering governing equations from data is a fundamental inverse problem, but existing discovery tools can rely on manual selection cutoffs and lack routine reliability diagnostics. py-ARGOS unifies bootstrap ARGOS and Bayesian-ARGOS in a Python package with interval-based term selection and diagnostics. The package is demonstrated on chaotic benchmark systems, and its diagnostics distinguish collinearity from influential observations or residual misspecification in a reported fit.

  • Problem

    Many discovery algorithms rely on user-specified selection cutoffs and do not routinely expose diagnostics for assessing fit reliability.

    Source: §1 · p. 3
  • Method

    py-ARGOS unifies bootstrap ARGOS and Bayesian-ARGOS, screening candidate libraries and retaining terms whose confidence or credible intervals exclude zero.

    Source: §1 · p. 4, §2.1.1 · pp. 5–6
  • Results

    The package is demonstrated on chaotic benchmark systems, and one Bayesian fit recovers the correct system despite collinearity, with no influential observations or systematic residual structure.

    Source: §3.1 · p. 11, §5 · p. 15
  • Takeaways & Limitations

    The Python package provides a uniform interface for automatic ODE discovery with interval-based selection and on-demand reliability diagnostics.

    Source: §1 · p. 4, §2 · p. 4

    py-ARGOS assumes the true terms are present in the candidate library; bootstrap ARGOS also becomes expensive at large n.

    Source: §2.3 · pp. 8–9

Abstract

from arXiv · show

Recovering the governing equations of a dynamical system from data is a central problem in data-driven science, yet the available Python tooling forces a compromise among automation, statistical rigor, and reliability. We present py-ARGOS, a Python package implementing two automatic algorithms, bootstrap ARGOS and Bayesian-ARGOS, behind a uniform interface. Both are statistically principled throughout: automated model selection reduces the candidate library, each coefficient is reported with a bootstrap confidence or Bayesian credible interval that quantifies its uncertainty, and a term is retained when this interval excludes zero. Built-in diagnostics additionally flag unreliable fits. On chaotic benchmark systems, the two algorithms improve on the SINDy family's identification performance.

1. Motivation and significance

Recovering governing equations from measured data is a fundamental inverse problem, but existing tools leave gaps in automation, statistical rigor, and reliability. py-ARGOS brings automated ARGOS methods into a Python package with interval-based selection and built-in diagnostics.

  • Governing-equation recovery from data is a fundamental inverse problem across physics, biology, engineering, and climate science.Source: §1 · p. 1
  • Many discovery methods rely on analyst-chosen selection cutoffs and lack routine diagnostics for unstable or misspecified fits.Multicollinearity, influential observations, or a misspecified library can yield plausible but incorrect equations without warning.Source: §1 · p. 3
  • ARGOS and Bayesian-ARGOS automate model screening and use bootstrap confidence or Bayesian credible intervals to select terms, but were not available together as an installable Python package.The cited methods also improve identification success over the SINDy family in several tested scenarios.Source: §1 · pp. 3–4
  • py-ARGOS unifies both algorithms and addresses manual selection and reliability concerns with interval-based term selection and on-demand diagnostics.The diagnostics target multicollinearity, influential observations, and model misspecification.Source: §1 · p. 4

2. Software description

py-ARGOS packages two ARGOS-family ODE discovery algorithms behind a shared estimator interface. Its software stack supports the workflow from candidate-library construction and frequentist screening to Bayesian inference and diagnostics.

  • The package unifies bootstrap ARGOS and Bayesian-ARGOS in a single estimator interface for ODE discovery.Source: §2 · p. 4
  • The distribution is MIT-licensed and supports Python 3.11–3.12.Source: §2 · p. 5
  • Its Python dependencies support numerical processing, library construction, frequentist screening, Bayesian modeling, and posterior diagnostics.These include NumPy and SciPy, scikit-learn, adelie, statsmodels, Bambi, PyMC/PyTensor, and ArviZ.Source: §2 · p. 5

2.1. Software architecture

py-ARGOS shares preprocessing and library construction across its algorithms, then uses distinct inference engines. The estimator classes expose bootstrap and Bayesian variants with different screening configurations and final inference steps.

2.1. Software architecture

  • Both algorithms share preprocessing and library construction before diverging into separate inference engines.Source: §2.1 · p. 5

2.1.1. Processing pipeline

  • An adaptive Savitzky–Golay filter smooths and differentiates trajectories, and three library builders create a normalized design matrix before two-pass adaptive-lasso screening.The screening uses cross-validated fits, OLS refits, and BIC selection; the final inference step uses bootstrap confidence intervals or Bayesian credible intervals to retain terms excluding zero.Source: §2.1.1 · pp. 5–6

2.1.2. Estimator classes

  • BootstrapArgos resamples screened fits, while BayesianArgos offers two screening modes before the same Bayesian inference and credible-interval selection.The comparison mode is retained because it outperformed straight screening on some tested systems, although straight was generally more accurate across the tested systems.Source: §2.1.2 · p. 6

2.2. Software functionalities

py-ARGOS exposes a compact interface for equation identification, inference, simulation, results extraction, and diagnostics. Interval-based selection avoids a manually chosen sparsity threshold, while diagnostics help assess model reliability after fitting.

2.2.1. Equation identification

  • The shared constructor-plus-run() interface identifies whole systems or individual equations, retaining terms when bootstrap or posterior intervals exclude zero.Users ordinarily set the interval level, bootstrap sample count, and MCMC settings; libraries can be polynomial, trigonometric, mixed, explicit, or user-defined.Source: §2.2.1 · pp. 6–7

2.2.2. Inference and parallel computation

  • Bootstrap replicates and Bayesian MCMC chains can run across cores; Bayesian inference also supports optional nutpie CPU or GPU backends.The GPU backend helps when per-step gradient evaluations are compute-bound, such as for large datasets or libraries.Source: §2.2.2 · pp. 7–8

2.2.3. Simulation and results extraction

  • simulate() integrates identified systems with SciPy, while result-extraction methods return coefficient tables, symbolic expressions, and interval summaries.Three-dimensional trajectory plotting is also provided.Source: §2.2.3 · p. 8

2.2.4. Failure diagnostics

  • On-demand diagnostics flag multicollinearity, influential observations, and model misspecification, with Bayesian-only posterior checks and a design-matrix check available for any library.VIF values above ten and Pareto-k values above 0.7 are flagged; compute and plotting steps are separate.Source: §2.2.4 · p. 8

2.3. Limitations

py-ARGOS remains bounded by library coverage and data conditions, while bootstrap computation and some software dependencies impose practical constraints.

2.3. Limitations

  • The true governing terms must be present in the candidate library, reflecting a core assumption of regression-based identification.Source: §2.3 · p. 8
  • Near-zero noise can violate homoscedasticity, while dense sampling on a chaotic attractor can inflate multicollinearity; both issues are diagnosable with built-in tools.Source: §2.3 · pp. 8–9
  • Bootstrap ARGOS becomes expensive at large n, motivating the cheaper Bayesian-ARGOS alternative.Source: §2.3 · p. 9
  • The adelie dependency currently requires numpy<2 and must be built from source on ARM64 Linux.Source: §2.3 · p. 9

3. Illustrative examples

The examples apply Bayesian-ARGOS to the Rössler system and bootstrap ARGOS to the Thomas system, illustrating trajectory recovery, fit diagnostics, and interval-based term selection.

3. Illustrative examples

  • The examples demonstrate both estimator classes on chaotic systems with known equations, using an automatically generated polynomial library for Rössler and an explicit user-specified library for Thomas.The Rössler example uses a degree-five polynomial library and 90% highest-density intervals; the Thomas example uses the state variables and their sines with 2000 bootstrap resamples.Source: §3 · p. 9, §3.1 · p. 9, §3.2 · pp. 11–12

3.1. Bayesian identification and diagnostics

  • At SNR ≈49 dB, Bayesian-ARGOS recovered the Rössler equations with every nonzero coefficient within 0.2% of truth and no spurious terms.The simulated identified attractor closely matches the true attractor.Source: §3.1 · p. 9, Figure 2 · p. 10
  • The Rössler fit’s only identified weakness was polynomial-library collinearity; Pareto-k values and posterior-predictive residuals showed no influential observations or systematic structure.The x3 variance inflation factor was approximately 43; the passage describes the collinearity as benign for this relatively large, low-noise sample.Source: §3.1 · p. 11

3.2. Bootstrap confidence interval selection

  • At SNR ≈35 dB, bootstrap ARGOS recovered both true nonconstant terms in each Thomas equation within 0.5% of their true values and excluded the intercept.Figure 4 shows the coefficient estimates and 90% confidence intervals; terms are retained when their intervals exclude zero.Source: §3.2 · pp. 11–12, Figure 4 · p. 13

4. Impact

py-ARGOS pairs uncertainty-based term selection with reliability diagnostics, while its underlying algorithms show benchmark advantages and Bayesian-ARGOS extends to climate modeling.

  • Intervals excluding zero govern term retention, and diagnostics flag influential observations, collinearity, and candidate-library misspecification.The diagnostics use Pareto-ˆk, variance inflation factors, and posterior-predictive residual checks, respectively.Source: §4 · pp. 13–14
  • py-ARGOS returns ArviZ InferenceData for downstream uncertainty propagation, model comparison, and visualization; Bayesian-ARGOS keeps uncertainty-quantified discovery tractable at large sample sizes.Source: §4 · p. 14
  • Across chaotic benchmarks, ARGOS outperformed SINDy-with-AIC on three-dimensional systems, while Bayesian-ARGOS was more data-efficient and noise-robust than SINDy across most of seven systems, with comparable identification performance to ARGOS at roughly hundredfold lower runtime.Source: §4 · p. 14
  • In SINDy-SHRED sea-surface-temperature modeling, Bayesian-ARGOS raised valid-identification rate from 60% to 77% and reduced reconstruction error versus SINDy.Source: §4 · pp. 14–15

5. Conclusions

py-ARGOS brings bootstrap ARGOS and Bayesian-ARGOS to Python through a uniform interface for automatic, statistically principled ODE discovery. The package is demonstrated on chaotic benchmarks, while its methods also extend to climate-data applications.

  • py-ARGOS is the first Python package to provide bootstrap ARGOS and Bayesian-ARGOS through a uniform interface for automatic, statistically principled ODE discovery.Source: §5 · p. 15
  • The package is demonstrated on chaotic benchmarks, and its methods extend to real-world applications such as reduced-order modeling of climate data.Source: §5 · p. 15
  • Planned extensions include ARGOS-RAL for PDE discovery, control inputs, and additional libraries and priors.Source: §5 · p. 15
Loading 2610.34458v1…