Structure-Preserving Neural ODEs via Nonstandard Finite Difference Discretization
Abstract
Although neural ordinary differential equations (NODEs) are a powerful framework for learning continuous-time dynamics, they generally do not preserve essential qualitative properties, such as positivity. We propose a structure-preserving Neural ODE framework based on nonstandard finite difference (NSFD) discretization. The learned dynamics are parameterized by nonnegative production and destruction rates, yielding an explicit, differentiable update that integrates seamlessly into standard automatic differentiation pipelines. We prove that the resulting scheme unconditionally preserves positivity for arbitrary time-step sizes while retaining first-order consistency. We outline an extension based on Patankar-type discretizations that preserves conservation laws exactly. Numerical experiments on an SIR epidemic model show that our approach generates physically meaningful trajectories, remains robust under coarse discretizations, and outperforms conventional NODEs in preserving the qualitative structure of the learned dynamics.
Turn this paper into a full lesson
ArcXiv compiles a staged curriculum from this paper: 8-12 lessons across beginner → advanced, synthesised section guides, visuals, flashcards, a quiz, exercises, and on-demand deep dives per section. Grounded in the abstract, never invented.