In classical physics, the forces acting on a system are not arbitrary vectors; they are the "slopes" of an underlying potential energy landscape. When we use machine learning to simulate molecules or materials, we face a choice: do we train a model to predict these force vectors directly, or do we train it to predict a single scalar energy value and derive the forces from it?
While direct force prediction is often faster, it frequently violates the fundamental law of energy conservation. This leads to "energy drift," where a simulation might spontaneously heat up or explode because the predicted forces don't perfectly align with any possible energy surface. To solve this, researchers have converged on a design pattern: Energy-Conserving Potentials. By deriving forces as the negative gradient of a predicted scalar energy via automatic differentiation, these models ensure physical consistency by construction.
The Problem of Non-Conservative Forces
If you move an atom through a sequence of positions and return it to its starting point, the total work done by a conservative force field must be zero. However, as Filippo Bigi and Marcel F. Langer demonstrate in The dark side of the forces, models that predict force vectors directly often fail this "path independence" test. These non-conservative models can perform work in closed loops, leading to catastrophic instabilities in long-term simulations.
In a standard neural network, the output is just a set of numbers. If those numbers represent forces, there is no internal mechanism to ensure they are "curl-free"—meaning they might not be the gradient of any scalar function. This lack of physical rigor is why Alexandre Tkatchenko and Frank Noe argue in Machine learning for molecular simulation that "physics-informed" models must integrate energy conservation to move beyond simple curve-fitting.
Energy Conservation by Construction
The solution is to change the architecture of the model. Instead of mapping atomic coordinates ($R$) to forces ($F$), the model maps coordinates to a scalar potential energy ($E$). The forces are then calculated as:
$$F = -\frac{\partial E}{\partial R}$$
This calculation is performed using automatic differentiation (AD), the same technology used to train neural networks. As Samuel S. Schoenholz shows with the JAX MD framework, treating the entire simulation as a differentiable function allows for the seamless integration of complex neural network potentials into traditional physics workflows.
This approach ensures that the forces are always the negative gradient of the energy surface. Because the forces are derived from a single scalar, the system is guaranteed to be conservative. This architectural choice is central to state-of-the-art models like NequIP, developed by Simon Batzner and colleagues in E(3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials, and DPA-1, introduced by Duo Zhang in Pretraining of attention-based deep learning potential model for molecular simulation.
Stability and Thermodynamic Consistency
The primary benefit of this approach is simulation stability. In The Open Catalyst 2025 (OC25) Dataset and Models for Solid-Liquid Interfaces, Muhammed Shuaibi and Daniel S. Levine emphasize that energy-conserving graph neural networks are essential for modeling complex electrocatalytic environments. Without this constraint, the artificial energy drift would make it impossible to observe the long-term dynamics of ions and solvents.
This principle extends beyond simple forces to other physical properties:
- Material Mechanics: Maria Hammer and colleagues applied this to biomechanics in Designing energy-conserving surrogate models for the coupled, non-linear responses of intervertebral discs, showing that learning a scalar potential prevents non-physical energy creation in spinal simulations.
- Electric Response: Stefano Falletta demonstrates in Unified differentiable learning of electric response that properties like polarization and Born charges should be derived as derivatives of a single "generalized potential" to ensure they satisfy fundamental conservation laws like charge neutrality.
The Computational Trade-off
While energy-conserving models are more physically robust, they come with a cost. Deriving forces through automatic differentiation requires a second pass through the network's computational graph, which is more expensive than a single forward pass for direct prediction.
Max Eissler and Tim Korjakow note in How simple can you go? that this requirement can become a bottleneck, slowing down training and inference. However, the consensus across the field—from Vahe Gharakhanyan in the Open Molecular Crystals 2025 study to Xiang Fu in Learning Smooth and Expressive Interatomic Potentials—is that this "physics tax" is worth paying. The resulting models are not just more accurate; they are "useful physics" that can be trusted for the long-term simulations required to discover new drugs and materials.