Fast fitting of neural ordinary differential equations by Bayesian neural gradient matching to infer ecological interactions from time‐series data

Abstract Inferring ecological interactions is hard because we often lack suitable parametric representations to portray them. Neural ordinary differential equations (NODEs) provide a way of estimating interactions non‐parametrically from time‐series data. NODEs, however, are slow to fit, and inferre...

Full description

Bibliographic Details
Main Authors: Willem Bonnaffé, Tim Coulson
Format: Article
Language:English
Published: Wiley 2023-06-01
Series:Methods in Ecology and Evolution
Subjects:
Online Access:https://doi.org/10.1111/2041-210X.14121
_version_ 1797766974647828480
author Willem Bonnaffé
Tim Coulson
author_facet Willem Bonnaffé
Tim Coulson
author_sort Willem Bonnaffé
collection DOAJ
description Abstract Inferring ecological interactions is hard because we often lack suitable parametric representations to portray them. Neural ordinary differential equations (NODEs) provide a way of estimating interactions non‐parametrically from time‐series data. NODEs, however, are slow to fit, and inferred interactions usually are not compared with the ground truth. We provide a fast NODE fitting method, Bayesian neural gradient matching (BNGM), which relies on interpolating time series with neural networks and fitting NODEs to the interpolated dynamics with Bayesian regularisation. We test the accuracy of the approach by inferring ecological interactions in time series generated by an ODE model with known interactions. We compare these results against three existing approaches for estimating ecological interactions, standard NODEs, ODE models and convergent cross‐mapping (CCM). We also infer interactions in experimentally replicated time series of a microcosm featuring an algae, flagellate and rotifer population, in the hare and lynx system, and the Maizuru Bay community featuring 11 species. Our BNGM approach allows us to reduce the fitting time of NODE systems to only a few seconds and provides accurate estimates of ecological interactions in the artificial system, as true ecological interactions are recovered with minimal error. Our benchmark analysis reveals that our approach is both faster and more accurate than standard NODEs and parametric ODEs, while CCM was found to be faster but less accurate. The analysis of the replicated time series reveals that only the strongest interactions are consistent across replicates, while the analysis of the Maizuru community shows the strong negative impact of the chameleon goby on most species of the community, and a potential indirect negative effect of temperature by favouring goby population growth. Overall, NODEs alleviate the need for a mechanistic understanding of interactions, and BNGM alleviates the heavy computational cost. This is a crucial step availing quick NODE fitting to larger systems, cross‐validation and uncertainty quantification, as well as more objective estimation of interactions, and complex context dependence, than parametric models.
first_indexed 2024-03-12T20:33:01Z
format Article
id doaj.art-3279e3b73e7f4fab874959a43966a6a2
institution Directory Open Access Journal
issn 2041-210X
language English
last_indexed 2024-03-12T20:33:01Z
publishDate 2023-06-01
publisher Wiley
record_format Article
series Methods in Ecology and Evolution
spelling doaj.art-3279e3b73e7f4fab874959a43966a6a22023-08-01T18:55:44ZengWileyMethods in Ecology and Evolution2041-210X2023-06-011461543156310.1111/2041-210X.14121Fast fitting of neural ordinary differential equations by Bayesian neural gradient matching to infer ecological interactions from time‐series dataWillem Bonnaffé0Tim Coulson1Big Data Institute University of Oxford Oxford UKDepartment of Biology University of Oxford, Zoology Research and Administration Building Oxford UKAbstract Inferring ecological interactions is hard because we often lack suitable parametric representations to portray them. Neural ordinary differential equations (NODEs) provide a way of estimating interactions non‐parametrically from time‐series data. NODEs, however, are slow to fit, and inferred interactions usually are not compared with the ground truth. We provide a fast NODE fitting method, Bayesian neural gradient matching (BNGM), which relies on interpolating time series with neural networks and fitting NODEs to the interpolated dynamics with Bayesian regularisation. We test the accuracy of the approach by inferring ecological interactions in time series generated by an ODE model with known interactions. We compare these results against three existing approaches for estimating ecological interactions, standard NODEs, ODE models and convergent cross‐mapping (CCM). We also infer interactions in experimentally replicated time series of a microcosm featuring an algae, flagellate and rotifer population, in the hare and lynx system, and the Maizuru Bay community featuring 11 species. Our BNGM approach allows us to reduce the fitting time of NODE systems to only a few seconds and provides accurate estimates of ecological interactions in the artificial system, as true ecological interactions are recovered with minimal error. Our benchmark analysis reveals that our approach is both faster and more accurate than standard NODEs and parametric ODEs, while CCM was found to be faster but less accurate. The analysis of the replicated time series reveals that only the strongest interactions are consistent across replicates, while the analysis of the Maizuru community shows the strong negative impact of the chameleon goby on most species of the community, and a potential indirect negative effect of temperature by favouring goby population growth. Overall, NODEs alleviate the need for a mechanistic understanding of interactions, and BNGM alleviates the heavy computational cost. This is a crucial step availing quick NODE fitting to larger systems, cross‐validation and uncertainty quantification, as well as more objective estimation of interactions, and complex context dependence, than parametric models.https://doi.org/10.1111/2041-210X.14121artificial neural networksecological dynamicsecological interactionsGeber methodgradient matchingmicrocosm
spellingShingle Willem Bonnaffé
Tim Coulson
Fast fitting of neural ordinary differential equations by Bayesian neural gradient matching to infer ecological interactions from time‐series data
Methods in Ecology and Evolution
artificial neural networks
ecological dynamics
ecological interactions
Geber method
gradient matching
microcosm
title Fast fitting of neural ordinary differential equations by Bayesian neural gradient matching to infer ecological interactions from time‐series data
title_full Fast fitting of neural ordinary differential equations by Bayesian neural gradient matching to infer ecological interactions from time‐series data
title_fullStr Fast fitting of neural ordinary differential equations by Bayesian neural gradient matching to infer ecological interactions from time‐series data
title_full_unstemmed Fast fitting of neural ordinary differential equations by Bayesian neural gradient matching to infer ecological interactions from time‐series data
title_short Fast fitting of neural ordinary differential equations by Bayesian neural gradient matching to infer ecological interactions from time‐series data
title_sort fast fitting of neural ordinary differential equations by bayesian neural gradient matching to infer ecological interactions from time series data
topic artificial neural networks
ecological dynamics
ecological interactions
Geber method
gradient matching
microcosm
url https://doi.org/10.1111/2041-210X.14121
work_keys_str_mv AT willembonnaffe fastfittingofneuralordinarydifferentialequationsbybayesianneuralgradientmatchingtoinferecologicalinteractionsfromtimeseriesdata
AT timcoulson fastfittingofneuralordinarydifferentialequationsbybayesianneuralgradientmatchingtoinferecologicalinteractionsfromtimeseriesdata