When ForwardDiff-ing through an ODE is unstable

Hi, useful to know that about chaotic systems, thanks. This is due to diverging trajectories for infinitesimally perturbed initial conditions. I can see how that disrupts gradients wrt initial conditions. Is the same true for gradients wrt parameters of the vector field?

This isn’t a chaotic system however. It’s part of a central pattern generator that co-ordinates rhythmic contractions in the stomach of a lobster. As such, it settles to extremely regular firing over a wide basin of initial conditions. Let me zoom out a little to show the rhythmic dynamics:

calc

(Background info, my understanding and i’m not an expert) :
In general, bursting models that have an extra, slow-timescale, positive feedback current (https://journals.physiology.org/doi/full/10.1152/jn.00804.2017; Cellular switches orchestrate rhythmic circuits | SpringerLink) are robust to parametric variation and initial conditions, and can modulate to tonic spiking. Lots of bursting models in the literature don’t have this extra current. You still get rhythmic bursting, but it relies on exact co-ordination of parameters, and funky things like chaos happen when you slightly perturb them.