in

Recovering complex ecological dynamics from time series using state-space universal dynamic equations


Abstract

Ecological systems often exhibit complex nonlinear dynamics like oscillations, chaos, and regime shifts. Universal dynamic equations have shown promise in modeling complex dynamics by combining known functional forms with neural networks that represent unknown relationships. However, these methods do not yet accommodate the forms of uncertainty common to ecological datasets. To address this limitation, we developed state-space universal dynamic equations by combining universal difference and differential equations with a state-space modeling framework, accounting for uncertainty. We tested this framework on three simulated and two empirical case studies and found that this method can recover nonlinear biological interactions that produce complex behaviors including chaos and regime shifts. Their forecasting performance is context-dependent, with the best performance on chaotic and oscillating time series. This innovative approach leveraging both ecological theory and data-driven machine learning offers a promising new way to make accurate and useful predictions of ecosystem change.

Similar content being viewed by others

The impact of data resolution on dynamic causal inference in multiscale ecological networks

Chaos and bifurcations of a discretized Holling-II prey-predator model including prey refuge and Allee effect

Learning interpretable network dynamics via universal neural symbolic regression

Data availability

The data used in this paper were obtained from two publicly accessible data repositories: The Jornada Experimental Range LTER (https://doi.org/10.6073/pasta/63bfa45df4858db674bf37b52ee5ff44) and the RAM Legacy Stock Assessment Database https://doi.org/10.17616/R34D2X.

Code availability

Software to implement the State-space universal dynamic equation method presented in this papers has been published by the authors on the Julia programming language registry (https://github.com/JuliaRegistries/General) and on GitHub (https://github.com/Jack-H-Buckner/UniversalDiffEq.jl).

References

  1. Suding, K. N. & Hobbs, R. J. Threshold models in restoration and conservation: a developing framework. Trends Ecol. Evol. 24, 271–279 (2009).

    Google Scholar 

  2. Perretti, C. T., Sugihara, G. & Munch, S. B. Nonparametric forecasting outperforms parametric methods for a simulated multispecies system. Ecology 94, 794–800 (2013).

    Google Scholar 

  3. Arroyo-Esquivel, J., Klausmeier, C. A. & Litchman, E. Using neural ordinary differential equations to predict complex ecological dynamics from population density data. J. R. Soc. Interface 21, 20230604 (2024).

    Google Scholar 

  4. Bonnaffé, W., Sheldon, B. C. & Coulson, T. Neural ordinary differential equations for ecological and evolutionary time-series analysis. Methods Ecol. Evol. 12, 1301–1315 (2021).

    Google Scholar 

  5. Rackauckas, C. et al. Universal differential equations for scientific machine learning. Preprint at. http://arxiv.org/abs/2001.04385 (2021).

  6. Cheridito, P., Jentzen, A. & Rossmannek, F. Efficient approximation of high-dimensional functions with neural networks. IEEE Trans. Neural Netw. Learn. Syst. 33, 3079–3093 (2022).

    Google Scholar 

  7. Bonnaffé, W. & Coulson, T. Fast fitting of neural ordinary differential equations by Bayesian neural gradient matching to infer ecological interactions from time-series data. Methods Ecol. Evol. 14, 1543–1563 (2023).

    Google Scholar 

  8. Vaswani, A. et al. Attention is all you need. Preprint at. http://arxiv.org/abs/1706.03762 (2023).

  9. Hochreiter, S. & Schmidhuber, J. Long short-term memory. Neural Comput. 9, 1735–1780 (1997).

    Google Scholar 

  10. Turan, E. M. & Jäschke, J. Multiple shooting for training neural differential equations on time series. IEEE Control Syst. Lett. 6, 1897–1902 (2022).

    Google Scholar 

  11. Auger-Méthé, M. et al. A guide to state–space modeling of ecological time series. Ecol. Monogr. 91, e01470 (2021).

    Google Scholar 

  12. Hastings, A. & Powell, T. Chaos in a three-species food chain. Ecology 72, 896–903 (1991).

    Google Scholar 

  13. RAM Legacy Stock Assessment Database. RAM Legacy Stock Assessment Database v4 Zenodo https://doi.org/10.5281/ZENODO.2542919 (2018).

  14. Christensen, E. et al. Quadrat-based monitoring of desert grassland vegetation at the Jornada Experimental Range, New Mexico, 1915–2016. Ecology 102, e03530 (2021).

    Google Scholar 

  15. Medeiros, L. P., Sorenson, D. K., Johnson, B. J., Palkovacs, E. P. & Munch, S. B. Revealing unseen dynamical regimes of ecosystems from population time-series data. Proc. Natl. Acad. Sci. USA. 122, e2416637122 (2025).

  16. Munch, S. B., Rogers, T. L. & Sugihara, G. Recent developments in empirical dynamic modelling. Methods Ecol. Evol. 14, 732–745 (2023).

    Google Scholar 

  17. Munch, S. & Rogers, T. GPEDM: Gaussian process regression for empirical dynamic modeling. https://tanyalrogers.github.io/GPEDM/reference/GPEDM-package.html (2024).

  18. Holmes, E., E., Ward, E., J. & Wills, K. MARSS: multivariate autoregressive state-space models for analyzing time-series data. R J. 4, 11 (2012).

  19. Ellner, S. P., Seifu, Y. & Smith, R. H. Fitting population dynamics models to time-series data by gradient matching. Ecology 83, 2256–2270 (2002).

    Google Scholar 

  20. Rosenzweig, M. L. & MacArthur, R. H. Graphical representation and stability conditions of predator-prey interactions. Am. Nat. 97, 209–223 (1963).

    Google Scholar 

  21. Wan, E. A. & Van Der Merwe, R. The unscented Kalman filter for nonlinear estimation. in Proc. IEEE 2000 Adaptive Systems for Signal Processing, Communications, and Control Symposium (Cat. No.00EX373) 153–158. https://doi.org/10.1109/ASSPCC.2000.882463 (IEEE, 2000).

  22. Estes, J. A. & Duggins, D. O. Sea otters and kelp forests in Alaska: generality and variation in a community ecological paradigm. Ecol. Monogr. 65, 75–100 (1995).

    Google Scholar 

  23. Konar, B. & Estes, J. A. The stability of boundary regions between kelp beds and deforested areas. Ecology 84, 174–185 (2003).

    Google Scholar 

  24. Rogers-Bennett, L. & Catton, C. A. Marine heat wave and multiple stressors tip bull kelp forest to sea urchin barrens. Sci. Rep. 9, 15050 (2019).

    Google Scholar 

  25. Harrold, C. & Reed, D. C. Food availability, sea urchin grazing, and kelp forest community structure. Ecology 66, 1160–1169 (1985).

    Google Scholar 

  26. Wilen, J. E. Common property resources and the dynamics of overexploitation: the case of the North Pacific Fur Seal. Mar. Resour. Econ. 33, 217–243 (2018).

    Google Scholar 

  27. Smith, V. L. On models of commercial fishing. J. Polit. Econ. 77, 181–198 (1969).

    Google Scholar 

  28. Free, C. M. et al. Harvest control rules used in US federal fisheries management and implications for climate resilience. Fish Fish. https://doi.org/10.1111/faf.12724 (2022).

  29. Walters, C. J. & Hilborn, R. Adaptive control of fishing systems. J. Fish. Res. Board Can. 33, 145–159 (1976).

    Google Scholar 

  30. Pacific Fisheries Management Council. Pacific Coast Goundfish Fishery Management Plan, 159 (NOAA Fisheries, Pacific Fisheries Management Council, 2019).

  31. Dick, E. J. & He, X. Status of Cowcod (Sebastes Levis) in 2019 (NOAA Fisheries, 2019).

  32. Field, J. C., Beyer, S. G. & He, X. Status of the Chilipepper Rockfish, Sebastes Goodei, in the California Current for 2015 (NOAA Fisheries, 2015).

  33. Briske, D. D., Fuhlendorf, S. D. & Smeins, F. E. State-and-transition models, thresholds, and rangeland health: a synthesis of ecological concepts and perspectives. Rangel. Ecol. Manag. 58, 1–10 (2005).

  34. Briske, D. D., Fuhlendorf, S. D. & Smeins, F. E. Vegetation dynamics on rangelands: a critique of the current paradigms. J. Appl. Ecol. 40, 601–614 (2003).

    Google Scholar 

  35. Schlesinger, W. H. et al. Biological feedbacks in global desertification. Science 247, 1043–1048 (1990).

    Google Scholar 

  36. D’Odorico, P. et al. Vegetation–microclimate feedbacks in woodland–grassland ecotones. Glob. Ecol. Biogeogr. 22, 364–379 (2013).

    Google Scholar 

  37. Christensen, E. M., James, D. K., Randall, R. M. & Bestelmeyer, B. T. Abrupt transitions in a southwest USA desert grassland related to the Pacific Decadal Oscillation. Ecology 104, e4065 (2023).

    Google Scholar 

  38. Treven, L., Wenk, P., Dörfler, F. & Krause, A. Distributional gradient matching for learning uncertain neural dynamics models. Preprint at. https://doi.org/10.48550/arXiv.2106.11609 (2021).

  39. Boettiger, C., Ross, N. & Hastings, A. Early warning signals: the charted and uncharted territories. Theor. Ecol. 6, 255–264 (2013).

    Google Scholar 

  40. Scheffer, M. et al. Early-warning signals for critical transitions. Nature 461, 53–59 (2009).

    Google Scholar 

  41. Tilman, A. R., Krueger, E. H., McManus, L. C. & Watson, J. R. Maintaining human wellbeing as socio-environmental systems undergo regime shifts. Ecol. Econ. 221, 108194 (2024).

    Google Scholar 

  42. Dandekar, R. et al. Bayesian neural ordinary differential equations. Preprint at. http://arxiv.org/abs/2012.07244 (2022).

  43. Doucet, A., Godsill, S. & Andrieu, C. On sequential Monte Carlo sampling methods for Bayesian filtering. in Readings In Unobserved Components Models (eds Harvey, A. C. & Proietti, T.) 418–441.https://doi.org/10.1093/oso/9780199278657.003.0022 (Oxford University PressOxford, 2005).

  44. Langendorf, R. E. et al. Dynamic and context-dependent keystone species effects in kelp forests. Proc. Natl. Acad. Sci. USA. 122, e2413360122 (2025).

  45. Meunier, Z. D., Hacker, S. D. & Menge, B. A. Regime shifts in rocky intertidal communities associated with a marine heatwave and disease outbreak. Nat. Ecol. Evol. 8, 1285–1297 (2024).

    Google Scholar 

  46. Watson, J. R., Kendall, B. E., Siegel, D. A. & Mitarai, S. Changing seascapes, stochastic connectivity, and marine metapopulation dynamics. Am. Nat. 180, 99–112 (2012).

    Google Scholar 

  47. Kingma, D. P. & Ba, J. Adam: a method for stochastic optimization. Preprint at. http://arxiv.org/abs/1412.6980 (2014).

  48. Dixit, V. K. & Rackauckas, C. Optimization.jl: A Unified Optimization Package. https://doi.org/10.5281/ZENODO.7738525 (2023).

  49. Bezanson, J., Edelman, A., Karpinski, S. & Shah, V. B. Julia: a fresh approach to numerical computing. SIAM Rev. 59, 65–98 (2017).

    Google Scholar 

  50. Innes, M. Don’t unroll adjoint: differentiating SSA-form programs. Preprint at. http://arxiv.org/abs/1810.07951 (2019).

  51. Tsitouras, C. Runge–Kutta pairs of order 5(4) satisfying only the first column simplifying assumption. Comput. Math. Appl. 62, 770–775 (2011).

    Google Scholar 

  52. Rackauckas, C. & Nie, Q. DifferentialEquations.jl – a performant and feature-rich ecosystem for solving differential equations in Julia. JORS 5, 15 (2017).

    Google Scholar 

  53. Bhagavan, S., De Koning, B., Maddhashiya, S. & Rackauckas, C. DataInterpolations.jl: fast interpolations of 1Ddata. JOSS 9, 6917 (2024).

    Google Scholar 

  54. Stickel, J. J. Data smoothing and numerical differentiation by a regularization method. Comput. Chem. Eng. 34, 467–475 (2010).

    Google Scholar 

  55. Golub, G. H., Heath, M. & Wahba, G. Generalized cross-validation as a method for choosing a good ridge parameter. Technometrics 21, 215–223 (1979).

    Google Scholar 

  56. Harrell, F. E. Jr Hmisc. Harrell Misc. 5, 2–3 (2003).

    Google Scholar 

Download references

Acknowledgements

This research was supported by the National Science Foundation awards #2233982 and #2233983 to JRW and LCM on Model Enabled Machine Learning for Predicting Ecosystem Regime Shifts. This paper is a product of the model-enabled machine learning for ecology working group, which includes the authors of the paper as well as Cheyenne Jarman, Kunal Rathore, and Emerson Arehart, all of whom provided valuable contributions to the intellectual environment that led to this paper. We would also like to thank Chris Rackauckas for help working with Julia Scientific Machine learning tools and the Hawaiʻi Institute of Marine Biology for hosting a workshop where the ideas for this project were developed.

Author information

Authors and Affiliations

Authors

Contributions

J.H.B.: Conceptualization, formal analysis, methodology, software, writing-original draft. Z.D.M.: Conceptualization, methodology, software, writing-review and editing. J.A.E.: Conceptualization, funding acquisition, software, writing-review and editing. N.F.: methodology, software, writing-review and editing. A.G.: Conceptualization, writing-review and editing. L.C.M.: Funding acquisition, project administration, writing-review and editing. JRW: Conceptualization, funding acquisition, project administration, writing-review and editing.

Corresponding author

Correspondence to
Jack H. Buckner.

Ethics declarations

Competing interests

The authors declare no competing interests.

Peer review

Peer review information

Communications Earth and Environment thanks the anonymous reviewers for their contribution to the peer review of this work. Primary Handling Editors: Lifen Jiang and Mengjie Wang. [A peer review file is available].

Additional information

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Supplementary information

Transparent Peer Review file

Supplementary methods and figures

Rights and permissions

Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.

Reprints and permissions

About this article

Cite this article

Buckner, J.H., Meunier, Z.D., Arroyo-Esquivel, J. et al. Recovering complex ecological dynamics from time series using state-space universal dynamic equations.
Commun Earth Environ (2026). https://doi.org/10.1038/s43247-025-03130-2

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1038/s43247-025-03130-2


Source: Ecology - nature.com

The flounder effect: disparities in taxonomic and ecological study intensity across extant and fossil marine organisms hamper conservation

Rhizosphere microbial functions drive ecological stoichiometry in soils across an elevational gradient of a temperate mountain ecosystem

Back to Top