Hamiltonian Neural Networks
Hamiltonian Neural Networks
Abstract
摘要
Even though neural networks enjoy widespread use, they still struggle to learn the basic laws of physics. How might we endow them with better inductive biases? In this paper, we draw inspiration from Hamiltonian mechanics to train models that learn and respect exact conservation laws in an unsupervised manner. We evaluate our models on problems where conservation of energy is important, including the two-body problem and pixel observations of a pendulum. Our model trains faster and generalizes better than a regular neural network. An interesting side effect is that our model is perfectly reversible in time.
尽管神经网络已被广泛使用,它们仍然难以学会物理学的基本定律。怎样才能给它们更好的归纳偏置?本文从哈密顿力学获得启发,训练能够以无监督方式学习并遵守精确守恒律的模型。我们在能量守恒很重要的问题上评估这些模型,包括二体问题和摆的像素观测。与普通神经网络相比,该模型训练更快,泛化也更好。一个有意思的附带结果是,模型在时间上是完全可逆的。
Figure 1: Learning the Hamiltonian of a mass-spring system. The variables (q) and (p) correspond to position and momentum coordinates. As there is no friction, the baseline’s inner spiral is due to model errors. By comparison, the Hamiltonian Neural Network learns to exactly conserve a quantity that is analogous to total energy.
图 1:学习弹簧-质量系统的哈密顿量。变量 (q) 和 (p) 分别对应位置和动量坐标。系统没有摩擦,基线预测里向内的螺旋来自模型误差。相比之下,哈密顿神经网络学会精确守恒一个与总能量类似的量。
1 Introduction
1 引言
Neural networks have a remarkable ability to learn and generalize from data. This lets them excel at tasks such as image classification [21], reinforcement learning [45, 26, 37], and robotic dexterity [1, 22]. Even though these tasks are diverse, they all share the same underlying physical laws. For example, a notion of gravity is important for reasoning about objects in an image, training an RL agent to walk, or directing a robot to manipulate objects. Based on this observation, researchers have become increasingly interested in finding physics priors that transfer across tasks [43, 34, 17, 10, 6, 40].
神经网络具有出色的从数据中学习和泛化的能力,因此能在图像分类 [21]、强化学习 [45, 26, 37] 和机器人灵巧操作 [1, 22] 等任务上表现很好。这些任务虽然各不相同,却共享同一套底层物理定律。例如,无论是理解图像中的物体、训练强化学习智能体走路,还是指挥机器人操作物体,重力的概念都很重要。基于这一观察,研究者越来越关注能够在任务之间迁移的物理先验 [43, 34, 17, 10, 6, 40]。
33rd Conference on Neural Information Processing Systems (NeurIPS 2019), Vancouver, Canada.
Untrained neural networks do not have physics priors; they learn approximate physics knowledge directly from data. This generally prevents them from learning exact physical laws. Consider the frictionless mass-spring system shown in Figure 1. Here the total energy of the system is being conserved. More specifically, this particular system conserves a quantity proportional to (q^2 + p^2), where (q) is the position and (p) is the momentum of the mass. The baseline neural network in Figure 1 learns an approximation of this conservation law, and yet the approximation is imperfect enough that a forward simulation of the system drifts over time to higher or lower energy states. Can we define a class of neural networks that will precisely conserve energy-like quantities over time?
未经训练的神经网络并不带有物理先验,它们只是直接从数据中学习近似的物理知识。这通常使它们无法学到精确的物理定律。考虑图 1 中的无摩擦弹簧-质量系统。这里系统的总能量是守恒的。更具体地说,该系统守恒一个与 (q^2 + p^2) 成正比的量,其中 (q) 是质量块的位置,(p) 是动量。图 1 中的基线神经网络学到了对这条守恒律的近似,但近似不够精确,以至于对系统做前向模拟时,能量会随时间漂移到更高或更低的状态。能否定义一类神经网络,使其能在时间演化中精确守恒类能量的量?
In this paper, we draw inspiration from Hamiltonian mechanics, a branch of physics concerned with conservation laws and invariances, to define Hamiltonian Neural Networks, or HNNs. We begin with an equation called the Hamiltonian, which relates the state of a system to some conserved quantity (usually energy) and lets us simulate how the system changes with time. Physicists generally use domain-specific knowledge to find this equation, but here we try a different approach:
本文从哈密顿力学获得启发。哈密顿力学是物理学中研究守恒律和不变性的一个分支。我们据此定义哈密顿神经网络(HNN,Hamiltonian Neural Networks)。我们从称为哈密顿量的方程出发,它把系统状态与某个守恒量(通常是能量)联系起来,并让我们能够模拟系统随时间的变化。物理学家通常依靠领域知识来写出这个方程,这里我们尝试另一种做法:
Instead of crafting the Hamiltonian by hand, we propose parameterizing it with a neural network and then learning it directly from data.
我们不再手工构造哈密顿量,而是提议用神经网络来参数化它,并直接从数据中学习。
Since almost all physical laws can be expressed as conservation laws, our approach is quite general [27]. In practice, our model trains quickly and generalizes well(^1). Figure 1, for example, shows the outcome of training an HNN on the same mass-spring system. Unlike the baseline model, it learns to conserve an energy-like quantity.
由于几乎所有物理定律都可以写成守恒律,这一做法相当一般 [27]。实践中,该模型训练很快,泛化也好(^1)。例如,图 1 展示了在同一弹簧-质量系统上训练 HNN 的结果。与基线模型不同,它学会了守恒一个类能量的量。
2 Theory
2 理论
Predicting dynamics. The hallmark of a good physics model is its ability to predict changes in a system over time. This is the challenge we now turn to. In particular, our goal is to learn the dynamics of a system using a neural network. The simplest way of doing this is by predicting the next state of a system given the current one. A variety of previous works have taken this path and produced excellent results [41, 14, 43, 34, 17, 6]. There are, however, a few problems with this approach.
预测动力学。 好的物理模型的标志,是能够预测系统随时间的变化。我们现在要处理的就是这个挑战。具体而言,目标是用神经网络学习系统的动力学。最简单的做法,是在给定当前状态时预测下一状态。已有不少工作沿这条路取得了很好的结果 [41, 14, 43, 34, 17, 6]。不过,这种做法有几个问题。
The first problem is its notion of discrete “time steps” that connect neighboring states. Since time is actually continuous, a better approach would be to express dynamics as a set of differential equations and then integrate them from an initial state at (t_0) to a final state at (t_1). Equation 1 shows how this might be done, letting (S) denote the time derivatives of the coordinates of the system(^2). This approach has been under-explored so far, but techniques like Neural ODEs take a step in the right direction [7].
第一个问题是它用离散的“时间步”把相邻状态连起来。时间实际上是连续的,更好的做法是把动力学写成一组微分方程,再从 (t_0) 的初始状态积分到 (t_1) 的终态。方程 1 给出了一种写法,其中 (S) 表示系统坐标的时间导数(^2)。这条路径迄今探索得还不多,但 Neural ODE 这类方法已经朝这个方向迈进了一步 [7]。
[(q_1, p_1) = (q_0, p_0) + \int_{t_0}^{t_1} S(q, p), dt \tag{1}]
The second problem with existing methods is that they tend not to learn exact conservation laws or invariant quantities. This often causes them to drift away from the true dynamics of the system as small errors accumulate. The HNN model that we propose ameliorates both of these problems. To see how it does this — and to situate our work in the proper context — we first briefly review Hamiltonian mechanics.
现有方法的第二个问题是,它们往往学不到精确的守恒律或不变量。小误差积累之后,模型常常会逐渐偏离系统的真实动力学。我们提出的 HNN 模型对这两个问题都有所改善。为了说明它如何做到这一点,并把这项工作放在合适的背景里,我们先简要回顾哈密顿力学。
Hamiltonian Mechanics. William Hamilton introduced Hamiltonian mechanics in the 19th century as a mathematical reformulation of classical mechanics. Its original purpose was to express classical mechanics in a more unified and general manner. Over time, though, scientists have applied it to nearly every area of physics from thermodynamics to quantum field theory [29, 32, 39].
哈密顿力学。 威廉·哈密顿在 19 世纪提出哈密顿力学,作为经典力学的一种数学改写。它最初的目的,是把经典力学表达得更统一、更一般。后来,科学家几乎把它用到了物理学的每个领域,从热力学到量子场论 [29, 32, 39]。
In Hamiltonian mechanics, we begin with a set of coordinates ((q, p)). Usually, (q = (q_1, \ldots, q_N)) represents the positions of a set of objects whereas (p = (p_1, \ldots, p_N)) denotes their momentum. Note how this gives us (N) coordinate pairs ((q_1, p_1)\ldots(q_N, p_N)). Taken together, they offer a complete description of the system. Next, we define a scalar function, (\mathcal{H}(q, p)) called the Hamiltonian so that
在哈密顿力学中,我们从一组坐标 ((q, p)) 出发。通常,(q = (q_1, \ldots, q_N)) 表示一组物体的位置,(p = (p_1, \ldots, p_N)) 表示它们的动量。这样就得到了 (N) 对坐标 ((q_1, p_1)\ldots(q_N, p_N))。合在一起,它们给出系统的完整描述。接下来,我们定义一个称为哈密顿量的标量函数 (\mathcal{H}(q, p)),使得
[\frac{dq}{dt} = \frac{\partial \mathcal{H}}{\partial p},\qquad \frac{dp}{dt} = -\frac{\partial \mathcal{H}}{\partial q}. \tag{2}]
(^1)We make our code available at github.com/greydanus/hamiltonian-nn.
(^1)代码发布于 github.com/greydanus/hamiltonian-nn。
(^2)Any coordinates that describe the state of the system. Later we will use position and momentum ((p, q)).
(^2)任何能够描述系统状态的坐标。后文将使用位置和动量 ((p, q))。
Equation 2 tells us that moving coordinates in the direction (\mathbf{S}\mathcal{H} = \left(\frac{\partial \mathcal{H}}{\partial \mathbf{p}}, -\frac{\partial \mathcal{H}}{\partial \mathbf{q}}\right)) gives us the time evolution of the system. We can think of (\mathbf{S}) as a vector field over the inputs of (\mathcal{H}). In fact, it is a special kind of vector field called a “symplectic gradient”. Whereas moving in the direction of the gradient of (\mathcal{H}) changes the output as quickly as possible, moving in the direction of the symplectic gradient keeps the output exactly constant. Hamilton used this mathematical framework to relate the position and momentum vectors ((\mathbf{q}, \mathbf{p})) of a system to its total energy (E{tot} = \mathcal{H}(\mathbf{q}, \mathbf{p})). Then, he found (\mathbf{S}_\mathcal{H}) using Equation 2 and obtained the dynamics of the system by integrating this field according to Equation 1. This is a powerful approach because it works for almost any system where the total energy is conserved.
方程 2 告诉我们,沿方向 (\mathbf{S}\mathcal{H} = \left(\frac{\partial \mathcal{H}}{\partial \mathbf{p}}, -\frac{\partial \mathcal{H}}{\partial \mathbf{q}}\right)) 移动坐标,就得到系统的时间演化。可以把 (\mathbf{S}) 看成定义在 (\mathcal{H}) 的输入上的向量场。它其实是一种特殊的向量场,称为“辛梯度”。沿着 (\mathcal{H}) 的梯度方向移动会让输出变化得尽可能快,而沿着辛梯度方向移动则使输出保持恰好不变。哈密顿用这套数学框架,把系统的位置和动量向量 ((\mathbf{q}, \mathbf{p})) 与总能量 (E{tot} = \mathcal{H}(\mathbf{q}, \mathbf{p})) 联系起来。然后他用方程 2 求出 (\mathbf{S}_\mathcal{H}),再按方程 1 积分这个场,就得到了系统的动力学。这是一种有力的方法,因为它几乎适用于任何总能量守恒的系统。
Hamiltonian mechanics, like Newtonian mechanics, can predict the motion of a mass-spring system or a single pendulum. But its true strengths only become apparent when we tackle systems with many degrees of freedom. Celestial mechanics, which are chaotic for more than two bodies, are a good example. A few other examples include many-body quantum systems, fluid simulations, and condensed matter physics [29, 32, 39, 33, 9, 12].
和牛顿力学一样,哈密顿力学可以预测弹簧-质量系统或单摆的运动。但它真正的长处,要在处理具有许多自由度的系统时才显现出来。天体力学就是一个好例子,两体以上就会出现混沌。其他例子还包括多体量子系统、流体模拟和凝聚态物理 [29, 32, 39, 33, 9, 12]。
Hamiltonian Neural Networks. In this paper, we propose learning a parametric function for (\mathcal{H}) instead of (\mathbf{S}_\mathcal{H}). In doing so, we endow our model with the ability to learn exactly conserved quantities from data in an unsupervised manner. During the forward pass, it consumes a set of coordinates and outputs a single scalar “energy-like” value. Then, before computing the loss, we take an in-graph gradient of the output with respect to the input coordinates (Figure A.1). It is with respect to this gradient that we compute and optimize an (L_2) loss (Equation 3).
哈密顿神经网络。 本文提议学习 (\mathcal{H}) 的参数化函数,而不是直接学习 (\mathbf{S}_\mathcal{H})。这样,模型就获得了以无监督方式从数据中学习精确守恒量的能力。在前向计算中,它接收一组坐标,输出一个标量的“类能量”值。然后在计算损失之前,我们在计算图内对输出关于输入坐标求梯度(Figure A.1)。(L_2) 损失正是针对这个梯度来计算和优化的(方程 3)。
[\mathcal{L}{HNN} = \left| \frac{\partial \mathcal{H}\theta}{\partial \mathbf{p}} - \frac{\partial \mathbf{q}}{\partial t} \right|2 + \left| \frac{\partial \mathcal{H}\theta}{\partial \mathbf{q}} + \frac{\partial \mathbf{p}}{\partial t} \right|_2 \tag{3}]
For a visual comparison between this approach and the baseline, refer to Figure 1 or Figure 1(b). This training procedure allows HNNs to learn conserved quantities analogous to total energy straight from data. Apart from conservation laws, HNNs have several other interesting and potentially useful properties. First, they are perfectly reversible in that the mapping from ((\mathbf{q}, \mathbf{p})) at one time to ((\mathbf{q}, \mathbf{p})) at another time is bijective. Second, we can manipulate the HNN-conserved quantity (analogous to total energy) by integrating along the gradient of (\mathcal{H}), giving us an interesting counterfactual tool (e.g. “What would happen if we added 1 Joule of energy?”). We’ll discuss these properties later in Section 6.
若要直观比较这种方法与基线,可参见图 1 或图 1(b)。这一训练过程使 HNN 能够直接从数据中学习与总能量类似的守恒量。除了守恒律,HNN 还有若干其他有意思、也可能有用的性质。第一,它们是完全可逆的:从一个时刻的 ((\mathbf{q}, \mathbf{p})) 到另一时刻的 ((\mathbf{q}, \mathbf{p})) 的映射是双射。第二,我们可以沿 (\mathcal{H}) 的梯度积分,从而调控 HNN 所守恒的量(类似于总能量),这提供了一种有意思的反事实工具(例如:“如果再加入 1 焦耳能量会怎样?”)。这些性质将在第 6 节讨论。
3 Learning a Hamiltonian from Data
3 从数据中学习哈密顿量
Optimizing the gradients of a neural network is a rare approach. There are a few previous works which do this [42, 35, 28], but their scope and implementation details diverge from this work and from one another. With this in mind, our first step was to investigate the empirical properties of HNNs on three simple physics tasks.
优化神经网络的梯度本身,是一种少见的做法。已有少量工作这样做 [42, 35, 28],但它们的范围和实现细节既不同于本文,彼此之间也不相同。有鉴于此,我们的第一步是在三个简单的物理任务上考察 HNN 的经验性质。
Task 1: Ideal Mass-Spring. Our first task was to model the dynamics of the frictionless mass-spring system shown in Figure 1. The system’s Hamiltonian is given in Equation 4 where (k) is the spring constant and (m) is the mass constant. For simplicity, we set (k = m = 1). Then we sampled initial coordinates with total energies uniformly distributed between [0.2, 1]. We constructed training and test sets of 25 trajectories each and added Gaussian noise with standard deviation (\sigma^2 = 0.1) to every data point. Each trajectory had 30 observations; each observation was a concatenation of ((q, p)).
任务 1:理想弹簧-质量系统。 第一个任务是对图 1 中无摩擦弹簧-质量系统的动力学建模。系统的哈密顿量由方程 4 给出,其中 (k) 是弹簧常数,(m) 是质量常数。为简单起见,我们取 (k = m = 1)。随后采样初始坐标,使其总能量在 [0.2, 1] 上均匀分布。我们构造了各含 25 条轨迹的训练集和测试集,并在每个数据点上加入标准差 (\sigma^2 = 0.1) 的高斯噪声。每条轨迹有 30 次观测,每次观测是 ((q, p)) 的拼接。
[\mathcal{H} = \frac{1}{2} k q^2 + \frac{p^2}{2m} \tag{4}]
Task 2: Ideal Pendulum. Our second task was to model a frictionless pendulum. Pendulums are nonlinear oscillators so they present a slightly more difficult problem. Writing the gravitational constant as (g) and the length of the pendulum as (l), the general Hamiltonian is
任务 2:理想摆。 第二个任务是对无摩擦摆建模。摆是非线性振子,因此稍难一些。把重力常数记为 (g),摆长记为 (l),一般的哈密顿量为
[\mathcal{H} = 2mgl(1 - \cos q) + \frac{l^2 p^2}{2m} \tag{5}]
Once again we set (m = l = 1) for simplicity. This time, we set (g = 3) and sampled initial coordinates with total energies in the range [1.3, 2.3]. We chose these numbers in order to situate the dataset along the system’s transition from linear to nonlinear dynamics. As with Task 1, we constructed training and test sets of 25 trajectories each and added the same amount of noise.
为简单起见,我们再次取 (m = l = 1)。这一次取 (g = 3),并采样总能量位于 [1.3, 2.3] 的初始坐标。选择这些数值,是为了让数据集落在系统从线性动力学过渡到非线性动力学的区间上。与任务 1 一样,我们构造了各含 25 条轨迹的训练集和测试集,并加入同样大小的噪声。
Task 3: Real Pendulum. Our third task featured the position and momentum readings from a real pendulum. We used data from a Science paper by Schmidt & Lipson [35] which also tackled the problem of learning conservation laws from data. This dataset was noisier than the synthetic ones and it did not strictly obey any conservation laws since the real pendulum had a small amount of friction. Our goal here was to examine how HNNs fared on noisy and biased real-world data.
任务 3:真实摆。 第三个任务使用真实摆的位置和动量读数。数据来自 Schmidt 与 Lipson 发表在 Science 上的论文 [35],那项工作同样处理从数据中学习守恒律的问题。这份数据比合成数据更噪,而且由于真实摆带有少量摩擦,并不严格服从任何守恒律。我们在这里的目标,是考察 HNN 在有噪声、有偏差的真实数据上表现如何。
3.1 Methods
3.1 方法
In all three tasks, we trained our models with a learning rate of (10^{-3}) and used the Adam optimizer [20]. Since the training sets were small, we set the batch size to be the total number of examples. On each dataset we trained two fully-connected neural networks: the first was a baseline model that, given a vector input ((\mathbf{q}, \mathbf{p})) output the vector ((\partial \mathbf{q}/\partial t, \partial \mathbf{p}/\partial t)) directly. The second was an HNN that estimated the same vector using the derivative of a scalar quantity as shown in Equation 2 (also see Figure A.1). Where possible, we used analytic time derivatives as the targets. Otherwise, we calculated finite difference approximations. All of our models had three layers, 200 hidden units, and tanh activations. We trained them for 2000 gradient steps and evaluated them on the test set.
在全部三个任务中,我们用 (10^{-3}) 的学习率和 Adam 优化器 [20] 训练模型。由于训练集较小,批大小设为全部样本数。在每个数据集上,我们训练两个全连接神经网络:第一个是基线模型,在给定向量输入 ((\mathbf{q}, \mathbf{p})) 时直接输出向量 ((\partial \mathbf{q}/\partial t, \partial \mathbf{p}/\partial t));第二个是 HNN,按方程 2 所示,用一个标量的导数来估计同一个向量(亦可参见 Figure A.1)。在可能的情况下,我们用解析时间导数作为目标,否则计算有限差分近似。所有模型都是三层、200 个隐单元,激活函数为 tanh。我们训练 2000 个梯度步,并在测试集上评估。
We logged three metrics: (L_2) train loss, (L_2) test loss, and mean squared error (MSE) between the true and predicted total energies. To determine the energy metric, we integrated our models according to Equation 1 starting from a random test point. Then we used MSE to measure how much a given model’s dynamics diverged from the ground truth. Intuitively, the loss metrics measure our model’s ability to fit individual data points while the energy metric measures its stability and conservation of energy over long timespans. To obtain dynamics, we integrated our models with the fourth-order Runge-Kutta integrator in scipy.integrate.solve_ivp and set the error tolerance to (10^{-9}) [30].
我们记录三项指标:(L_2) 训练损失、(L_2) 测试损失,以及真实总能量与预测总能量之间的均方误差(MSE)。为了得到能量指标,我们从随机测试点出发,按方程 1 对模型积分,再用 MSE 衡量该模型的动力学偏离真值的程度。直观上,损失指标衡量模型拟合单个数据点的能力,能量指标则衡量它在长时间尺度上的稳定性和能量守恒。为了得到动力学,我们用 scipy.integrate.solve_ivp 中的四阶 Runge-Kutta 积分器对模型积分,误差容限设为 (10^{-9}) [30]。
3.2 Results
3.2 结果
Figure 2: Analysis of models trained on three simple physics tasks. In the first column, we observe that the baseline model’s dynamics gradually drift away from the ground truth. The HNN retains a high degree of accuracy, even obscuring the black baseline in the first two plots. In the second column, the baseline’s coordinate MSE error rapidly diverges whereas the HNN’s does not. In the third column, we plot the quantity conserved by the HNN. Notice that it closely resembles the total energy of the system, which we plot in the fourth column. In consequence, the HNN roughly conserves total energy whereas the baseline does not.
图 2:在三个简单物理任务上训练的模型分析。第一列中可以看到,基线模型的动力学逐渐偏离真值。HNN 保持了很高的精度,在前两幅图里甚至把黑色的真值线完全盖住。第二列中,基线的坐标均方误差迅速发散,HNN 则不会。第三列画出 HNN 所守恒的量。可以看出,它与第四列中画出的系统总能量非常接近。因此,HNN 大致守恒总能量,而基线并不守恒。
We found that HNNs train as quickly as baseline models and converge to similar final losses. Table 1 shows their relative performance over the three tasks. But even as HNNs tied with the baseline on on loss, they dramatically outperformed it on the MSE energy metric. Figure 2 shows why this is the case: as we integrate the two models over time, various errors accumulate in the baseline and it eventually diverges. Meanwhile, the HNN conserves a quantity that closely resembles total energy and diverges more slowly or not at all.
我们发现,HNN 的训练速度与基线模型相当,并收敛到相近的最终损失。Table 1 给出了它们在这三个任务上的相对表现。尽管 HNN 在损失上与基线打平,它们在能量均方误差指标上却明显更好。图 2 说明了原因:随着对两个模型做时间积分,基线中的各种误差会积累,最终发散。与此同时,HNN 守恒一个与总能量非常接近的量,发散得更慢,或者完全不发散。
It’s worth noting that the quantity conserved by the HNN is not equivalent to the total energy; rather, it’s something very close to the total energy. The third and fourth columns of Figure 2 provide a useful comparison between the HNN-conserved quantity and the total energy. Looking closely at the spacing of the y axes, one can see that the HNN-conserved quantity has the same scale as total energy, but differs by a constant factor. Since energy is a relative quantity, this is perfectly acceptable(^3).
需要说明的是,HNN 所守恒的量并不等同于总能量,而是与总能量非常接近的某个量。图 2 的第三列和第四列对 HNN 守恒量与总能量做了有用的比较。仔细看纵轴的刻度间距可以看到,HNN 守恒量与总能量尺度相同,只相差一个常数因子。由于能量是相对量,这完全可以接受(^3)。
The total energy plot for the real pendulum shows another interesting pattern. Whereas the ground truth data does not quite conserve total energy, the HNN roughly conserves this quantity. This, in fact, is a fundamental limitation of HNNs: they assume a conserved quantity exists and thus are unable to account for things that violate this assumpation, such as friction. In order to account for friction, we would need to model it separately from the HNN.
真实摆的总能量图还显示出另一种有意思的模式。真值数据并不怎么守恒总能量,HNN 却大致守恒这个量。这其实是 HNN 的一个根本局限:它们假定存在一个守恒量,因而无法解释违反这一假定的因素,例如摩擦。若要计入摩擦,需要在 HNN 之外单独对它建模。
4 Modeling Larger Systems
4 对更大规模系统建模
Having established baselines on a few simple tasks, our next step was to tackle a larger system involving more than one pair of ((p, q)) coordinates. One well-studied problem that fits this description is the two-body problem, which requires four ((p, q)) pairs.
在几个简单任务上建立基线之后,下一步是处理包含不止一对 ((p, q)) 坐标的更大规模系统。符合这一描述、且已被充分研究的一个问题是二体问题,它需要四对 ((p, q))。
[\mathcal{H} = \frac{|\mathbf{p}_{\mathrm{CM}}|^2}{m_1 + m_2} + \frac{|\mathbf{p}_1|^2 + |\mathbf{p}_2|^2}{2\mu} + g\frac{m_1 m_2}{|\mathbf{q}_1 - \mathbf{q}_2|^2} \tag{6}]
Task 4: Two-body problem. In the two-body problem, point particles interact with one another via an attractive force such as gravity. Once again, we let (g) be the gravitational constant and (m) represent mass. Equation 6 gives the Hamiltonian of the system where (\mu) is the reduced mass and (\mathbf{p}_{\mathrm{CM}}) is the momentum of the center of mass. As in previous tasks, we set (m_1 = m_2 = g = 1) for simplicity. Furthermore, we restricted our experiments to systems where the momentum of the center of mass was zero. Even so, with eight degrees of freedom (given by the (x) and (y) position and momentum coordinates of the two bodies) this system represented an interesting challenge.
任务 4:二体问题。 在二体问题中,质点通过引力这类吸引力相互作用。我们再次用 (g) 表示引力常数,用 (m) 表示质量。方程 6 给出系统的哈密顿量,其中 (\mu) 是约化质量,(\mathbf{p}_{\mathrm{CM}}) 是质心动量。与前面的任务一样,为简单起见取 (m_1 = m_2 = g = 1)。此外,实验只考虑质心动量为零的系统。即便如此,该系统仍有八个自由度(由两个物体的 (x)、(y) 位置和动量坐标给出),因而是一个有意思的挑战。
4.1 Methods
4.1 方法
Our first step was to generate a dataset of 1000 near-circular, two-body trajectories. We initialized every trajectory with center of mass zero, total momentum zero, and radius (r = |\mathbf{q}_2 - \mathbf{q}_1|) in the range [0.5, 1.5]. In order to control the level of numerical stability, we chose initial velocities that gave perfectly circular orbits and then added Gaussian noise to them. We found that scaling this noise by a factor of (\sigma^2 = 0.05) produced trajectories with a good balance between stability and diversity. We used fourth-order Runge-Kutta integration to find 200 trajectories of 50 observations each and then performed an 80/20% train/test set split over trajectories. Our models and training procedure were identical to those described in Section 3 except this time we trained for 10,000 gradient steps and used a batch size of 200.
第一步是生成 1000 条近圆的二体轨迹。每条轨迹初始化为质心为零、总动量为零,半径 (r = |\mathbf{q}_2 - \mathbf{q}_1|) 位于 [0.5, 1.5]。为了控制数值稳定性,我们先选取能给出完美圆轨道的初速度,再向其加入高斯噪声。我们发现,把噪声按 (\sigma^2 = 0.05) 缩放,可以得到稳定性和多样性较为平衡的轨迹。我们用四阶 Runge-Kutta 积分得到 200 条各含 50 次观测的轨迹,再按轨迹做 80/20% 的训练/测试划分。模型和训练过程与第 3 节相同,只是这次训练 10,000 个梯度步,批大小为 200。
4.2 Results
4.2 结果
The HNN model scaled well to this system. The first row of Figure 3 suggests that it learned to conserve a quantity nearly equal to the total energy of the system whereas the baseline model did not. The second row of Figure 3 gives a qualitative comparison of trajectories. After one orbit, the baseline dynamics have completely diverged from the ground truth whereas the HNN dynamics have only accumulated a small amount of error. As we continue to integrate up to (t = 50) and beyond (Figure B.1), both models diverge but the HNN does so at a much slower rate. Even as the HNN
HNN 模型在这个系统上的扩展性很好。图 3 的第一行表明,它学会了守恒一个几乎等于系统总能量的量,而基线模型没有。图 3 的第二行给出了轨迹的定性比较。绕行一周之后,基线动力学已经完全偏离真值,HNN 动力学只积累了少量误差。如果继续积分到 (t = 50) 及更远(Figure B.1),两个模型都会发散,但 HNN 的发散慢得多。即便当 HNN
(^3)To see why energy is relative, imagine a cat that is at an elevation of 0 m in one reference frame and 1 m in another. Its potential energy (and total energy) will differ by a constant factor depending on frame of reference.
(^3)要理解能量为什么是相对的,可以想象一只猫在某个参考系里高度为 0 米,在另一个参考系里高度为 1 米。它的势能(以及总能量)会因参考系不同而相差一个常数因子。
diverges from the ground truth orbit, its total energy remains stable rather than decaying to zero or spiraling to infinity. We report quantitative results for this task in Table 1. Both train and test losses of the HNN model were about an order of magnitude lower than those of the baseline. The HNN did a better job of conserving total energy, with an energy MSE that was several orders of magnitude below the baseline.
偏离真值轨道时,它的总能量仍然保持稳定,而不会衰减到零或螺旋发散到无穷。我们在 Table 1 中报告该任务的定量结果。HNN 模型的训练损失和测试损失都比基线大约低一个数量级。HNN 在守恒总能量方面也更好,能量均方误差比基线低几个数量级。
图 3:一条示例二体轨迹的分析。基线模型的动力学不守恒总能量,并迅速偏离真值。与此同时,HNN 近似守恒总能量,在完整绕行一周后只积累了少量误差。
Having achieved success on the two-body problem, we ran the same set of experiments on the chaotic three-body problem. We show preliminary results in Appendix B where once again the HNN outperforms its baseline by a considerable margin. We opted to focus on the two-body results here because the three-body results still need improvement.
在二体问题上取得成功之后,我们在混沌的三体问题上做了同一组实验。初步结果见 Appendix B,其中 HNN 再次明显优于基线。我们选择在正文中聚焦二体结果,是因为三体结果仍有待改进。
5 Learning a Hamiltonian from Pixels
5 从像素中学习哈密顿量
One of the key strengths of neural networks is that they can learn abstract representations directly from high-dimensional data such as pixels or words. Having trained HNN models on position and momentum coordinates, we were eager to see whether we could train them on arbitrary coordinates like the latent vectors of an autoencoder.
神经网络的一个关键长处,是能够直接从像素或词语这类高维数据中学习抽象表示。既然已经在位置和动量坐标上训练过 HNN,我们很想知道能否在任意坐标上训练它们,例如自编码器的潜向量。
Task 5: Pixel Pendulum. With this in mind, we constructed a dataset of pixel observations of a pendulum and then combined an autoencoder with an HNN to model its dynamics. To our knowledge this is the first instance of a Hamiltonian learned directly from pixel data.
任务 5:像素摆。 基于这一想法,我们构造了一份摆的像素观测数据集,再把自编码器与 HNN 结合起来对其动力学建模。就我们所知,这是第一次直接从像素数据中学习哈密顿量。
5.1 Methods
5.1 方法
In recent years, OpenAI Gym has been widely adopted by the machine learning community as a means for training and evaluating reinforcement learning agents [5]. Some works have even trained world models on these environments [15, 16]. Seeing these efforts as related and complimentary to our work, we used OpenAI Gym’s Pendulum-v0 environment in this experiment.
近年来,OpenAI Gym 已被机器学习社区广泛用作训练和评估强化学习智能体的工具 [5]。已有工作甚至在这些环境上训练世界模型 [15, 16]。我们认为这些努力与本文相关且互为补充,因此本实验使用了 OpenAI Gym 的 Pendulum-v0 环境。
First, we generated 200 trajectories of 100 frames each(^4). We required that the maximum absolute displacement of the pendulum arm be (\pi/6) radians. Starting from 400 x 400 x 3 RGB pixel observations, we cropped, desaturated, and downsampled them to 28 x 28 x 1 frames and concatenated each frame with its successor so that the input to our model was a tensor of shape batch x 28 x 28 x 2. We used two frames so that velocity would be observable from the input. Without the ability to observe velocity, an autoencoder without recurrence would be unable to ascertain the system’s full state space.
首先,我们生成了 200 条各含 100 帧的轨迹(^4)。我们要求摆臂的最大绝对位移为 (\pi/6) 弧度。从 400×400×3 的 RGB 像素观测出发,我们对其进行裁剪、去饱和并下采样为 28×28×1 的帧,再把每一帧与后继帧拼接,使模型输入的张量形状为 batch×28×28×2。使用两帧是为了让速度可以从输入中被观测到。如果无法观测速度,一个没有复发结构的自编码器就无法确定系统的完整状态空间。
In designing the autoencoder portion of the model, our main objective was simplicity and trainability. We chose to use fully-connected layers in lieu of convolutional layers because they are simpler. Furthermore, convolutional layers sometimes struggle to extract even simple position information [23]. Both the encoder and decoder were composed of four fully-connected layers with relu activations and residual connections. We used 200 hidden units on all layers except the latent vector (\mathbf{z}), where we used two units. As for the HNN component of this model, we used the same architecture and parameters as described in Section 3. Unless otherwise specified, we used the same training procedure as described in Section 4.1. We found that using a small amount of weight decay, (10^{-5}) in this case, was beneficial.
在设计模型的自编码器部分时,主要目标是简单和易于训练。我们选择用全连接层代替卷积层,因为前者更简单。此外,卷积层有时连简单的位置信息也提取不好 [23]。编码器和解码器都由四层全连接层组成,使用 relu 激活和残差连接。除潜向量 (\mathbf{z}) 使用两个单元外,其余各层均为 200 个隐单元。该模型中的 HNN 部分采用第 3 节所述的同样结构和参数。除非另有说明,训练过程与第 4.1 节相同。我们发现使用少量权重衰减是有益的,这里取 (10^{-5})。
Losses. The most notable difference between this experiment and the others was the loss function. This loss function was composed of three terms: the first being the HNN loss, the second being a classic autoencoder loss ((L_2) loss over pixels), and the third being an auxiliary loss on the autoencoder’s latent space:
损失函数。 这个实验与其他实验最明显的不同是损失函数。该损失函数由三项组成:第一项是 HNN 损失,第二项是经典的自编码器损失(像素上的 (L_2) 损失),第三项是作用在自编码器潜空间上的辅助损失:
(^4)Choosing the “no torque” action at every timestep.
(^4)在每个时间步选择“无力矩”动作。
[\mathcal{L}{CC} = \left| \mathbf{z}{\mathbf{p}}^t - (\mathbf{z}{\mathbf{q}}^t - \mathbf{z}{\mathbf{q}}^{t+1}) \right|_2 \tag{7}]
The purpose of the auxiliary loss term, given in Equation 7, was to make the second half of (\mathbf{z}), which we’ll label (\mathbf{z}_p), resemble the derivatives of the first half of (\mathbf{z}), which we’ll label (\mathbf{z}_q). This loss encouraged the latent vector ((\mathbf{z}_q, \mathbf{z}_p)) to have roughly same properties as canonical coordinates ((q, p)). These properties, measured by the Poisson bracket relations, are necessary for writing a Hamiltonian. We found that the auxiliary loss did not degrade the autoencoder’s performance. Furthermore, it is not domain-specific and can be used with any autoencoder with an even-sized latent space.
方程 7 给出的辅助损失,目的是让 (\mathbf{z}) 的后一半(记为 (\mathbf{z}_p))接近 (\mathbf{z}) 前一半(记为 (\mathbf{z}_q))的导数。这一损失促使潜向量 ((\mathbf{z}_q, \mathbf{z}_p)) 具有与正则坐标 ((q, p)) 大致相同的性质。这些由泊松括号关系度量的性质,是写出哈密顿量所必需的。我们发现辅助损失并没有损害自编码器的表现。而且它并不依赖于特定领域,可以用于任何潜空间维数为偶数的自编码器。
Figure 4: Predicting the dynamics of the pixel pendulum. We train an HNN and its baseline to predict dynamics in the latent space of an autoencoder. Then we project to pixel space for visualization. The baseline model rapidly decays to lower energy states whereas the HNN remains close to ground truth even after hundreds of frames. It mostly obscures the ground truth line in the bottom plot.
图 4:预测像素摆的动力学。我们训练 HNN 及其基线,在自编码器的潜空间中预测动力学,再投影回像素空间以便可视化。基线模型迅速衰减到较低的能量状态,而 HNN 在数百帧之后仍接近真值。在底部的图中,它几乎把真值线完全盖住。
5.2 Results
5.2 结果
Unlike the baseline model, the HNN learned to conserve a scalar quantity analogous to the total energy of the system. This enabled it to predict accurate dynamics for the system over much longer timespans. Figure 4 shows a qualitative comparison of trajectories predicted by the two models. As in previous experiments, we computed these dynamics using Equation 2 and a fourth-order Runge-Kutta integrator. Unlike previous experiments, we performed this integration in the latent space of the autoencoder. Then, after integration, we projected to pixel space using the decoder network. The HNN and its baseline reached comparable train and test losses, but once again, the HNN dramatically outperformed the baseline on the energy metric (Table 1).
与基线模型不同,HNN 学会了守恒一个类似于系统总能量的标量。这使它能够在长得多的时间跨度上预测出准确的动力学。图 4 对两个模型预测的轨迹做了定性比较。与前面的实验一样,我们用方程 2 和四阶 Runge-Kutta 积分器计算这些动力学。与前面不同的是,积分是在自编码器的潜空间中进行的。积分之后,再用解码网络投影回像素空间。HNN 与基线达到了相近的训练损失和测试损失,但在能量指标上,HNN 再次明显优于基线(Table 1)。
Table 1: Quantitative results across all five tasks. Whereas the HNN is competitive with the baseline on train/test loss, it dramatically outperforms the baseline on the energy metric. All values are multiplied by (10^3) unless noted otherwise. See Appendix A for a note on train/test split for Task 3.
| Task | Train loss Baseline | Train loss HNN | Test loss Baseline | Test loss HNN | Energy Baseline | Energy HNN |
|---|---|---|---|---|---|---|
| 1: Ideal mass-spring | 37 ± 2 | 37 ± 2 | 37 ± 2 | 36 ± 2 | 170 ± 20 | .38 ± .1 |
| 2: Ideal pendulum | 33 ± 2 | 33 ± 2 | 35 ± 2 | 36 ± 2 | 42 ± 10 | 25 ± 5 |
| 3: Real pendulum | 2.7 ± .2 | 9.2 ± .5 | 2.2 ± .3 | 6.0 ± .6 | 390 ± 7 | 14 ± 5 |
| 4: Two body (×10(^6)) | 33 ± 1 | 3.0 ± .1 | 30 ± .1 | 2.8 ± .1 | 6.3e4 ± 3e4 | 39 ± 5 |
| 5: Pixel pendulum | 18 ± .2 | 19 ± .2 | 17 ± .3 | 18 ± .3 | 9.3 ± 1 | .15 ± .01 |
表 1:全部五个任务的定量结果。HNN 在训练/测试损失上与基线相当,但在能量指标上明显优于基线。除非另有说明,所有数值均乘以 (10^3)。关于任务 3 的训练/测试划分,见 Appendix A。
| 任务 | 训练损失 基线 | 训练损失 HNN | 测试损失 基线 | 测试损失 HNN | 能量 基线 | 能量 HNN |
|---|---|---|---|---|---|---|
| 1: 理想弹簧-质量 | 37 ± 2 | 37 ± 2 | 37 ± 2 | 36 ± 2 | 170 ± 20 | .38 ± .1 |
| 2: 理想摆 | 33 ± 2 | 33 ± 2 | 35 ± 2 | 36 ± 2 | 42 ± 10 | 25 ± 5 |
| 3: 真实摆 | 2.7 ± .2 | 9.2 ± .5 | 2.2 ± .3 | 6.0 ± .6 | 390 ± 7 | 14 ± 5 |
| 4: 二体(×10(^6)) | 33 ± 1 | 3.0 ± .1 | 30 ± .1 | 2.8 ± .1 | 6.3e4 ± 3e4 | 39 ± 5 |
| 5: 像素摆 | 18 ± .2 | 19 ± .2 | 17 ± .3 | 18 ± .3 | 9.3 ± 1 | .15 ± .01 |
6 Useful properties of HNNs
6 HNN 的有用性质
While the main purpose of HNNs is to endow neural networks with better physics priors, in this section we ask what other useful properties these models might have.
HNN 的主要目的是给神经网络更好的物理先验,这一节我们再问:这些模型还可能有哪些有用的性质。
图 5:在像素摆模型的潜空间中可视化积分。我们交替地在低能量处沿 (\mathbf{S}\mathcal{H}) 积分(蓝色圆),沿 (\mathbf{R}\mathcal{H}) 积分(紫色线),再在更高能量处沿 (\mathbf{S}_\mathcal{H}) 积分(红色圆)。
Adding and removing energy. So far, we have seen that integrating the symplectic gradient of the Hamiltonian can give us the time evolution of a system but we have not tried following the Riemann gradient (\mathbf{R}\mathcal{H} = \left(\frac{\partial \mathcal{H}}{\partial \mathbf{q}}, \frac{\partial \mathcal{H}}{\partial \mathbf{p}}\right)). Intuitively, this corresponds to adding or removing some of the HNN-conserved quantity from the system. It’s especially interesting to alternate between integrating (\mathbf{R}\mathcal{H}) and (\mathbf{S}_\mathcal{H}). Figure 5 shows how we can take advantage of this effect to “bump” the pendulum to a higher energy level. We could imagine using this technique to answer counterfactual questions e.g. “What would have happened if we applied a torque?”
增加和减少能量。 到目前为止,我们已经看到,沿哈密顿量的辛梯度积分可以得到系统的时间演化,但还没有尝试沿黎曼梯度 (\mathbf{R}\mathcal{H} = \left(\frac{\partial \mathcal{H}}{\partial \mathbf{q}}, \frac{\partial \mathcal{H}}{\partial \mathbf{p}}\right)) 走。直观上,这相当于向系统加入或抽走一部分 HNN 所守恒的量。在 (\mathbf{R}\mathcal{H}) 与 (\mathbf{S}_\mathcal{H}) 之间交替积分尤其有意思。图 5 展示了如何利用这一效果,把摆“推”到更高的能量水平。可以设想用这种技术来回答反事实问题,例如:“如果我们施加一个力矩,会发生什么?”
Perfect reversibility. As neural networks have grown in size, the memory consumption of transient activations, the intermediate activations saved for backpropagation, has become a notable bottleneck. Several works propose semi-reversible models that construct one layer’s activations from the activations of the next [13, 25, 19]. Neural ODEs also have this property [7]. Many of these models are only approximately reversible: their mappings are not quite bijective. Unlike those methods, our approach is guaranteed to produce trajectories that are perfectly reversible through time. We can simply refer to a result from Hamiltonian mechanics called Liouville’s Theorem: the density of particles in phase space is constant. What this implies is that any mapping ((\mathbf{q}_0, \mathbf{p}_0) \to (\mathbf{q}_1, \mathbf{p}_1)) is bijective/invertible.
完全可逆。 随着神经网络规模增大,瞬时激活值(为反向传播而保存的中间激活)所占用的内存已成为一个明显瓶颈。已有若干工作提出半可逆模型,用下一层的激活构造上一层的激活 [13, 25, 19]。Neural ODE 也具有这一性质 [7]。这些模型里有许多只是近似可逆的:它们的映射并不完全是双射。与那些方法不同,我们的做法可以保证生成在时间上完全可逆的轨迹。只需引用哈密顿力学中的刘维尔定理:相空间中的粒子密度保持不变。这意味着任何映射 ((\mathbf{q}_0, \mathbf{p}_0) \to (\mathbf{q}_1, \mathbf{p}_1)) 都是双射/可逆的。
7 Related work
7 相关工作
Learning physical laws from data. Schmidt & Lipson [35] used a genetic algorithm to search a space of mathematical functions for conservation laws and recovered the Lagrangians and Hamiltonians of several real systems. We were inspired by their approach, but used a neural neural network to avoid constraining our search to a set of hand-picked functions. Two recent works are similar to this paper in that the authors sought to uncover physical laws from data using neural networks [18, 4]. Unlike our work, they did not explicitly parameterize Hamiltonians.
从数据中学习物理定律。 Schmidt 与 Lipson [35] 用遗传算法在数学函数空间中搜索守恒律,并恢复了若干真实系统的拉格朗日量和哈密顿量。我们受到他们方法的启发,但改用神经网络,以避免把搜索限制在一组手工选定的函数上。另有两篇近期工作与本文相近,作者同样试图用神经网络从数据中发现物理定律 [18, 4]。与本文不同,他们没有显式参数化哈密顿量。
Physics priors for neural networks. A wealth of previous works have sought to furnish neural networks with better physics priors. Many of these works are domain-specific: the authors used domain knowledge about molecular dynamics [31, 38, 8, 28], quantum mechanics [36], or robotics [24] to help their models train faster or generalize. Others, such as Interaction Networks or Relational Networks were meant to be fully general [43, 34, 2]. Here, we also aimed to keep our approach fully general while introducing a strong and theoretically-motivated prior.
神经网络的物理先验。 已有大量工作试图给神经网络配备更好的物理先验。其中许多是领域特定的:作者利用分子动力学 [31, 38, 8, 28]、量子力学 [36] 或机器人 [24] 方面的领域知识,帮助模型训练得更快或更好地泛化。另一些工作,如 Interaction Networks 或 Relational Networks,则希望做到完全一般 [43, 34, 2]。这里,我们也希望在引入一个强的、有理论依据的先验的同时,保持方法的完全一般性。
Modeling energy surfaces. Physicists, particularly those studying molecular dynamics, have seen success using neural networks to model energy surfaces [3, 11, 36, 44]. In particular, several works have shown dramatic computation speedups compared to density functional theory [31, 38, 8]. Molecular dynamics researchers integrate the derivatives of energy in order to obtain dynamics, just as we did in this work. A key difference between these approaches and our own is that 1) we emphasize the Hamiltonian formalism 2) we optimize the gradients of our model (though some works do optimize the gradients of a molecular dynamics model [42, 28]).
对能量面建模。 物理学家,尤其是研究分子动力学的人,已经成功地用神经网络对能量面建模 [3, 11, 36, 44]。其中若干工作表明,与密度泛函理论相比,计算速度有显著提升 [31, 38, 8]。分子动力学研究者通过对能量的导数积分来得到动力学,这与本文的做法一样。这些方法与我们的一个关键差别在于:1)我们强调哈密顿形式体系;2)我们优化的是模型的梯度(不过也有一些工作会优化分子动力学模型的梯度 [42, 28])。
8 Discussion
8 讨论
Whereas Hamiltonian mechanics is an old and well-established theory, the science of deep learning is still in its infancy. Whereas Hamiltonian mechanics describes the real world from first principles, deep learning does so starting from data. We believe that Hamiltonian Neural Networks, and models like them, represent a promising way of bringing together the strengths of both approaches.
哈密顿力学是一套古老且成熟的理论,深度学习这门科学则仍处于早期。哈密顿力学从第一性原理描述真实世界,深度学习则从数据出发。我们相信,哈密顿神经网络以及类似的模型,代表了一种把两种路径的长处结合起来的有希望的方式。
Acknowledgements
致谢
Sam Greydanus would like to thank the Google AI Residency Program for providing extraordinary mentorship and resources. The authors would like to thank Nic Ford, Trevor Gale, Rapha Gontijo Lopes, Keren Gu, Ben Caine, Mark Woodward, Stephan Hoyer, Jascha Sohl-Dickstein, and many others for insightful conversations and support.
Sam Greydanus 感谢 Google AI Residency Program 提供了出色的指导和资源。作者感谢 Nic Ford、Trevor Gale、Rapha Gontijo Lopes、Keren Gu、Ben Caine、Mark Woodward、Stephan Hoyer、Jascha Sohl-Dickstein 以及许多其他人为深入讨论和提供支持。
Special thanks to James and Judy Greydanus for their feedback and support from beginning to end.
特别感谢 James 和 Judy Greydanus 自始至终的反馈与支持。
References
参考文献
[1] Andrychowicz, M., Baker, B., Chociej, M., Jozefowicz, R., McGrew, B., Pachocki, J., Petron, A., Plappert, M., Powell, G., Ray, A., et al. Learning dexterous in-hand manipulation. arXiv preprint arXiv:1808.00177, 2018.
[2] Battaglia, P., Pascanu, R., Lai, M., Rezende, D. J., et al. Interaction networks for learning about objects, relations and physics. In Advances in neural information processing systems, pp. 4502–4510, 2016.
[3] Behler, J. Neural network potential-energy surfaces in chemistry: a tool for large-scale simulations. Physical Chemistry Chemical Physics, 13(40):17930–17955, 2011.
[4] Bondesan, R. and Lamacraft, A. Learning symmetries of classical integrable systems. arXiv preprint arXiv:1906.04645, 2019.
[5] Brockman, G., Cheung, V., Pettersson, L., Schneider, J., Schulman, J., Tang, J., and Zaremba, W. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
[6] Chang, M. B., Ullman, T., Torralba, A., and Tenenbaum, J. B. A compositional object-based approach to learning physical dynamics. arXiv preprint arXiv:1612.00341, 2016.
[7] Chen, T. Q., Rubanova, Y., Bettencourt, J., and Duvenaud, D. K. Neural ordinary differential equations. pp. 6571–6583, 2018. URL http://papers.nips.cc/paper/ 7892-neural-ordinary-differential-equations.pdf.
[8] Chmiela, S., Tkatchenko, A., Sauceda, H. E., Poltavsky, I., Schütt, K. T., and Müller, K.-R. Machine learning of accurate energy-conserving molecular force fields. Science advances, 3(5): e1603015, 2017.
[9] Cohen-Tannoudji, C., Dupont-Roc, J., and Grynberg, G. Photons and atoms-introduction to quantum electrodynamics. Photons and Atoms-Introduction to Quantum Electrodynamics, by Claude Cohen-Tannoudji, Jacques Dupont-Roc, Gilbert Grynberg, pp. 486. ISBN 0-471-184330. Wiley-VCH, February 1997., pp. 486, 1997.
[10] de Avila Belbute-Peres, F., Smith, K., Allen, K., Tenenbaum, J., and Kolter, J. Z. End-to-end differentiable physics for learning and control. In Advances in Neural Information Processing Systems, pp. 7178–7189, 2018.
[11] Gastegger, M. and Marquetand, P. High-dimensional neural network potentials for organic reactions and an improved training algorithm. Journal of chemical theory and computation, 11 (5):2187–2198, 2015.
[12] Girvin, S. M. and Yang, K. Modern condensed matter physics. Cambridge University Press, 2019.
[13] Gomez, A. N., Ren, M., Urtasun, R., and Grosse, R. B. The reversible residual network: Backpropagation without storing activations. In Advances in neural information processing systems, pp. 2214–2224, 2017.
[14] Grzeszczuk, R. NeuroAnimator: fast neural network emulation and control of physics-based models. University of Toronto.
[15] Ha, D. and Schmidhuber, J. Recurrent world models facilitate policy evolution. In Advances in Neural Information Processing Systems, pp. 2450–2462, 2018. 9 ===== PAGE 10 =====
[16] Hafner, D., Lillicrap, T., Fischer, I., Villegas, R., Ha, D., Lee, H., and Davidson, J. Learning latent dynamics for planning from pixels. arXiv preprint arXiv:1811.04551, 2018.
[17] Hamrick, J. B., Allen, K. R., Bapst, V., Zhu, T., McKee, K. R., Tenenbaum, J. B., and Battaglia, P. W. Relational inductive bias for physical construction in humans and machines. arXiv preprint arXiv:1806.01203, 2018.
[18] Iten, R., Metger, T., Wilming, H., Del Rio, L., and Renner, R. Discovering physical concepts with neural networks. arXiv preprint arXiv:1807.10300, 2018.
[19] Jacobsen, J.-H., Smeulders, A., and Oyallon, E. i-revnet: Deep invertible networks. arXiv preprint arXiv:1802.07088, 2018.
[20] Kingma, D. P. and Ba, J. Adam: A method for stochastic optimization. International Conference on Learning Representations, 2014.
[21] Krizhevsky, A., Sutskever, I., and Hinton, G. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems 25, pp. 1106–1114, 2012.
[22] Levine, S., Pastor, P., Krizhevsky, A., Ibarz, J., and Quillen, D. Learning hand-eye coordination for robotic grasping with deep learning and large-scale data collection. The International Journal of Robotics Research, 37(4-5):421–436, 2018.
[23] Liu, R., Lehman, J., Molino, P., Such, F. P., Frank, E., Sergeev, A., and Yosinski, J. An intriguing failing of convolutional neural networks and the coordconv solution. In Advances in Neural Information Processing Systems, pp. 9605–9616, 2018.
[24] Lutter, M., Ritter, C., and Peters, J. Deep lagrangian networks: Using physics as model prior for deep learning. International Conference on Learning Representations, 2019.
[25] MacKay, M., Vicol, P., Ba, J., and Grosse, R. B. Reversible recurrent neural networks. In Advances in Neural Information Processing Systems, pp. 9029–9040, 2018.
[26] Mnih, V., Kavukcuoglu, K., Silver, D., Graves, A., Antonoglou, I., Wierstra, D., and Riedmiller, M. Playing Atari with Deep Reinforcement Learning. ArXiv e-prints, December 2013.
[27] Noether, E. Invariant variation problems. Transport Theory and Statistical Physics, 1(3): 186–207, 1971.
[28] Pukrittayakamee, A., Malshe, M., Hagan, M., Raff, L., Narulkar, R., Bukkapatnum, S., and Komanduri, R. Simultaneous fitting of a potential-energy surface and its corresponding force fields using feedforward neural networks. The Journal of chemical physics, 130(13):134101, 2009.
[29] Reichl, L. E. A modern course in statistical physics. AAPT, 1999.
[30] Runge, C. Über die numerische auflösung von differentialgleichungen. Mathematische Annalen, 46(2):167–178, 1895.
[31] Rupp, M., Tkatchenko, A., Müller, K.-R., and Von Lilienfeld, O. A. Fast and accurate modeling of molecular atomization energies with machine learning. Physical review letters, 108(5): 058301, 2012.
[32] Sakurai, J. J. and Commins, E. D. Modern quantum mechanics, revised edition. AAPT, 1995.
[33] Salmon, R. Hamiltonian fluid mechanics. Annual review of fluid mechanics, 20(1):225–256, 1988.
[34] Santoro, A., Raposo, D., Barrett, D. G., Malinowski, M., Pascanu, R., Battaglia, P., and Lillicrap, T. A simple neural network module for relational reasoning. In Advances in neural information processing systems, pp. 4967–4976, 2017.
[35] Schmidt, M. and Lipson, H. Distilling free-form natural laws from experimental data. Science, 324(5923):81–85, 2009. 10 ===== PAGE 11 =====
[36] Schütt, K. T., Arbabzadah, F., Chmiela, S., Müller, K. R., and Tkatchenko, A. Quantumchemical insights from deep tensor neural networks. Nature communications, 8:13890, 2017.
[37] Silver, D., Schrittwieser, J., Simonyan, K., Antonoglou, I., Huang, A., Guez, A., Hubert, T., Baker, L., Lai, M., Bolton, A., et al. Mastering the game of go without human knowledge. Nature, 550(7676):354, 2017.
[38] Smith, J. S., Isayev, O., and Roitberg, A. E. Ani-1: an extensible neural network potential with dft accuracy at force field computational cost. Chemical science, 8(4):3192–3203, 2017.
[39] Taylor, J. R. Classical mechanics. University Science Books, 2005.
[40] Tenenbaum, J. B., De Silva, V., and Langford, J. C. A global geometric framework for nonlinear dimensionality reduction. science, 290(5500):2319–2323, 2000.
[41] Tompson, J., Schlachter, K., Sprechmann, P., and Perlin, K. Accelerating eulerian fluid simulation with convolutional networks. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pp. 3424–3433. JMLR. org, 2017.
[42] Wang, J., Olsson, S., Wehmeyer, C., Perez, A., Charron, N. E., de Fabritiis, G., Noe, F., and Clementi, C. Machine learning of coarse-grained molecular dynamics force fields. ACS Central Science, 2018.
[43] Watters, N., Zoran, D., Weber, T., Battaglia, P., Pascanu, R., and Tacchetti, A. Visual interaction networks: Learning a physics simulator from video. In Advances in neural information processing systems, pp. 4539–4547, 2017.
[44] Yao, K., Herr, J. E., Toth, D. W., Mckintyre, R., and Parkhill, J. The tensormol-0.1 model chemistry: A neural network augmented with long-range physics. Chemical science, 9(8): 2261–2269, 2018.
[45] Yosinski, J., Clune, J., Hidalgo, D., Nguyen, S., Zagal, J. C., and Lipson, H. Evolving robot gaits in hardware: the hyperneat generative encoding vs. parameter optimization. In Proceedings of the 20th European Conference on Artificial Life, pp. 890–897, August 2011.




