Neural Ordinary Differential Equations typically struggle to generalize to new dynamical behaviors created by parameter changes in the underlying system, even when the dynamics are close to previously seen behaviors. The issue gets worse when the changing parameters are unobserved, i.e., their value or influence is not directly measurable when collecting data. We introduce Neural Context Flow (NCF), a framework that encodes said unobserved parameters in a latent context vector as input to a vector field. NCFs leverage differentiability of the vector field with respect to the parameters, along with first-order Taylor expansion to allow any context vector to influence trajectories from other parameters. We validate our method and compare it to established Multi-Task and Meta-Learning alternatives, showing competitive performance in mean squared error for in-domain and out-of-distribution evaluation on the Lotka-Volterra, Glycolytic Oscillator, and Gray-Scott problems. This study holds practical implications for foundational models in science and related areas that benefit from conditional neural ODEs. Our code is openly available at https://github.com/ddrous/ncflow.
翻译:神经常微分方程通常难以泛化到由底层系统参数变化产生的新动态行为,即使这些动态与先前观察到的行为相近。当变化的参数不可观测(即在数据收集过程中无法直接测量其数值或影响)时,问题会进一步恶化。我们提出神经上下文流(Neural Context Flow, NCF)框架,该框架将所述不可观测参数编码为潜在上下文向量,并将其作为向量场的输入。NCF利用向量场对参数的可微性,结合一阶泰勒展开,使任意上下文向量能够影响来自其他参数的轨迹。我们验证了该方法,并与已建立的元学习和多任务学习替代方案进行比较,在Lotka-Volterra、糖酵解振荡器和Gray-Scott问题的域内和域外评估中,均表现出具有竞争力的均方误差性能。本研究对受益于条件神经ODE的基础科学模型及相关领域具有实际意义。我们的代码已开源,见https://github.com/ddrous/ncflow。