Machine learning methods are widely used in the natural sciences to model and predict physical systems from observation data. Yet, they are often used as poorly understood "black boxes," disregarding existing mathematical structure and invariants of the problem. Recently, the proposal of Hamiltonian Neural Networks (HNNs) took a first step towards a unified "gray box" approach, using physical insight to improve performance for Hamiltonian systems. In this paper, we explore a significantly improved training method for HNNs, exploiting the symplectic structure of Hamiltonian systems with a different loss function. This frees the loss from an artificial lower bound. We mathematically guarantee the existence of an exact Hamiltonian function which the HNN can learn. This allows us to prove and numerically analyze the errors made by HNNs which, in turn, renders them fully explainable. Finally, we present a novel post-training correction to obtain the true Hamiltonian only from discretized observation data, up to an arbitrary order.
翻译:机器学习方法被广泛应用于自然科学领域,用于从观测数据中建模和预测物理系统。然而,这些方法常被视为理解不足的"黑箱",忽视了问题中已有的数学结构和不变量。近期,哈密顿神经网络(HNNs)的提出迈出了向统一"灰箱"方法的第一步,利用物理洞察力提升哈密顿系统的性能。本文探索了一种显著改进的HNN训练方法,利用哈密顿系统的辛结构结合不同的损失函数。这使损失函数摆脱了人为下界的束缚。我们从数学上保证了HNN能够学习到的精确哈密顿函数的存在性。这使我们能够证明并数值分析HNN产生的误差,从而使其完全可解释。最后,我们提出了一种新颖的训练后校正方法,仅从离散化观测数据中即可获得真实的哈密顿函数,且精度可达任意阶。