TL;DR
To keep molecular simulations physically realistic, machine-learned interatomic potentials (MLIPs) compute forces by differentiating energy with respect to atomic positions—a process that normally relies on automatic differentiation (autograd) and its memory-heavy "tape." This paper introduces a tape-free pattern that computes exact conservative forces, energies, and stresses using a weight-tied readout and hand-written chain rules. The result is a model that trains $\approx 2.2\times$ faster at half the memory, and—with custom GPU kernels—scales to over one million atoms on a single workstation GPU.
What Problem Does This Paper Address?
MLIPs approximate quantum mechanical potential energy surfaces, letting researchers simulate materials at a fraction of the cost of density functional theory. To conserve energy during molecular dynamics, forces must be the exact negative gradient of the energy.
Conventionally, MLIPs get these forces via reverse-mode automatic differentiation: during the forward pass, the framework records every intermediate tensor on a "tape" and replays it backward. During training, you have to differentiate through that backward pass (double backpropagation), which is slow and devours GPU memory. Some models bypass this by predicting forces directly with a separate neural network head, but they sacrifice energy conservation. The authors ask: can we get exact conservative forces without autograd's tape, much like classical force fields do, but inside a deep neural network?
Methods
The authors embed their tape-free pattern into a proof-of-concept architecture called TFIP (Tape-Free Interatomic Potential).
The first half of TFIP looks like a standard, rotationally invariant message-passing MLIP: it uses invariant ACE-style descriptors, a residual SiLU backbone, and message-passing interaction blocks. What's new is how it gets the gradients:
- A Weight-Tied Energy Readout: Instead of a standard MLP head, TFIP's per-atom energy readout uses the same weight matrix $W_{s(i)}$ twice—once to read features in, and once transposed to write them out. This makes the local Jacobian symmetric ($J = J^\top$). By appending a single auxiliary energy coordinate $\tau$, a single forward-mode Jacobian–vector product (JVP) returns both the per-atom energy and its exact feature gradient $\lambda_i$ at the same time.
- Hand-Written Analytic Propagation: Rather than relying on PyTorch or JAX to record and replay a tape, the authors propagate $\lambda$ back through the message-passing, backbone, and descriptor layers using explicitly written transposes and chain rules. Edge gradients are scattered equally and oppositely onto endpoint atoms to guarantee zero net force, and summed to yield virial stress.
For inference, TFIP supports both a compiled PyTorch path (torch.compile(fullgraph=true)) and a fused path using hand-written Warp-lang kernels that avoid materializing intermediate tensors.
Datasets
- Training & Validation: MatPES-r2SCAN (using predefined splits), minimizing a weighted sum of per-atom energy, force, and stress mean-squared error.
- Molecular Dynamics Stability: 40 fixed-cell NVE (microcanonical) trajectories across bulk $\text{Al}$, $\text{Li}_3\text{PO}_4$, $\text{MgO}$, and $\text{Si}$ at $300\text{ K}$ (plus $\text{Si}$ at $1000\text{ K}$) over $50\text{ ps}$, as well as a $200\text{ ps}$ $\text{Si}$ run.
Key Insights and Ideas
- Symmetry turns forward into backward: Because a weight-tied readout has a symmetric Jacobian, a forward directional derivative computes the exact same gradient that backpropagation would have read.
- Train like a direct-force model, behave like a conservative one: Because forces are computed through explicit forward operations, training only requires one standard backward pass with respect to the model parameters—eliminating double backpropagation.
- Where the speedups actually come from: A same-model comparison isolates the benefit of the tape-free pattern itself ($\approx 2.2\times$ faster training at half the memory). Meanwhile, the massive inference and memory advantages over baselines like MACE and UMA-s come from TFIP's compact invariant architecture and hand-written Warp-lang kernels.
Key Results
- Accuracy: On MatPES-r2SCAN, the largest TFIP ($L=6, \text{MP}=4, H=512$, 13.0M parameters) achieves 45.5 meV/atom energy MAE and 152.8 meV/Å force MAE—outperforming CHGNet (156 meV/Å) on forces.
- Training Efficiency: On the same model, the tape-free path trains $\approx 2.2\times$ faster at roughly half the peak memory of autograd.
- Million-Atom Scaling: With Warp-lang kernels, TFIP uses roughly 20-fold less memory per atom than MACE-MP with cuEquivariance, enabling single-structure force evaluations up to 1,024,000 atoms on a single GB10 (DGX Spark) GPU using only $\sim 47\text{ GB}$ of peak memory.
- MD Stability: Long NVE simulations show minimal energy drift, with pair correlation functions and vibrational densities of states indistinguishable from conventional autograd forces.
Limitations and Future Work
The authors note that their MatPES-r2SCAN accuracy is modest because they did not tune hyperparameters or the training curriculum. Additionally, while the custom Warp-lang kernels slash memory usage by an order of magnitude, they introduce kernel launch latency that makes per-atom inference slightly slower at small atom counts compared to the compiled PyTorch path. Looking ahead, the authors position TFIP as a proof-of-concept: its pure-function, fusible force path could allow more expressive architectures to simulate millions of atoms without needing spatial or domain decomposition.
Summary updated