Frank Steven A
Department of Ecology and Evolutionary Biology University of California Irvine California USA.
Ecol Evol. 2023 Mar 19;13(3):e9895. doi: 10.1002/ece3.9895. eCollection 2023 Mar.
Many scientific problems focus on observed patterns of change or on how to design a system to achieve particular dynamics. Those problems often require fitting differential equation models to target trajectories. Fitting such models can be difficult because each evaluation of the fit must calculate the distance between the model and target patterns at numerous points along a trajectory. The gradient of the fit with respect to the model parameters can be challenging to compute. Recent technical advances in automatic differentiation through numerical differential equation solvers potentially change the fitting process into a relatively easy problem, opening up new possibilities to study dynamics. However, application of the new tools to real data may fail to achieve a good fit. This article illustrates how to overcome a variety of common challenges, using the classic ecological data for oscillations in hare and lynx populations. Models include simple ordinary differential equations (ODEs) and neural ordinary differential equations (NODEs), which use artificial neural networks to estimate the derivatives of differential equation systems. Comparing the fits obtained with ODEs versus NODEs, representing small and large parameter spaces, and changing the number of variable dimensions provide insight into the geometry of the observed and model trajectories. To analyze the quality of the models for predicting future observations, a Bayesian-inspired preconditioned stochastic gradient Langevin dynamics (pSGLD) calculation of the posterior distribution of predicted model trajectories clarifies the tendency for various models to underfit or overfit the data. Coupling fitted differential equation systems with pSGLD sampling provides a powerful way to study the properties of optimization surfaces, raising an analogy with mutation-selection dynamics on fitness landscapes.
许多科学问题聚焦于观察到的变化模式,或者如何设计一个系统以实现特定的动态变化。这些问题通常需要将微分方程模型拟合到目标轨迹上。拟合此类模型可能会很困难,因为每次拟合评估都必须在轨迹上的众多点计算模型与目标模式之间的距离。计算拟合相对于模型参数的梯度可能具有挑战性。通过数值微分方程求解器进行自动微分的最新技术进展有可能将拟合过程转变为一个相对容易的问题,为研究动态变化开辟了新的可能性。然而,将这些新工具应用于实际数据可能无法实现良好的拟合。本文以野兔和猞猁种群数量波动的经典生态数据为例,说明如何克服各种常见挑战。模型包括简单的常微分方程(ODEs)和神经常微分方程(NODEs),后者使用人工神经网络来估计微分方程系统的导数。比较用ODEs和NODEs获得的拟合结果,分别代表小参数空间和大参数空间,并改变变量维度的数量,有助于深入了解观察到的轨迹和模型轨迹的几何形状。为了分析模型预测未来观测值的质量,对预测模型轨迹的后验分布进行贝叶斯启发的预处理随机梯度朗之万动力学(pSGLD)计算,明确了各种模型对数据拟合不足或过度拟合的趋势。将拟合的微分方程系统与pSGLD采样相结合,提供了一种研究优化曲面性质的强大方法,这与适应度景观上的突变选择动态形成类比。