Skip to main content
QUICK REVIEW

[Paper Review] Simple and efficient algorithms for training machine learning potentials to force data

Justin S. Smith, Nicholas Lubbers|arXiv (Cornell University)|Jun 9, 2020
Machine Learning in Materials ScienceMaterials Science7 citations
TL;DR

This paper presents a simple, efficient algorithm for training machine learning potentials using both energy and force data from ab initio simulations, achieving near-linear computational cost scaling. By computing the loss gradient via directional derivatives instead of iterative backpropagation, the method reduces memory usage by 50% and enables force training at only 3× the cost of energy-only training, regardless of system size or model complexity.

ABSTRACT

Abstract Machine learning models, trained on data from ab initio quantum simulations, are yielding molecular dynamics potentials with unprecedented accuracy. One limiting factor is the quantity of available training data, which can be expensive to obtain. A quantum simulation often provides all atomic forces, in addition to the total energy of the system. These forces provide much more information than the energy alone. It may appear that training a model to this large quantity of force data would introduce significant computational costs. Actually, training to all available force data should only be a few times more expensive than training to energies alone. Here, we present a new algorithm for efficient force training, and benchmark its accuracy by training to forces from real-world datasets for organic chemistry and bulk aluminum.

Motivation & Objective

  • To address the high computational cost traditionally associated with training machine learning potentials on large force datasets from ab initio simulations.
  • To develop a method that enables efficient force training without relying on machine learning frameworks, preserving compatibility with existing neural network codes.
  • To reduce memory overhead during gradient computation by avoiding repeated backpropagation steps.
  • To demonstrate that force training can be performed at only a few times the cost of energy-only training, independent of system size or model parameters.
  • To provide a general-purpose algorithm applicable to any existing ML potential code designed for energy-only training.

Proposed method

  • The method computes the loss gradient using a directional derivative of the energy gradient, avoiding the need for a second backpropagation step.
  • It replaces iterated backpropagation with a single backpropagation followed by a finite-difference approximation of the directional derivative.
  • The algorithm uses a single dimensionless parameter ε for finite differencing, with proper scaling of force units via Eq. (10) to ensure consistency across trained and untrained models.
  • The approach is framework-agnostic and can be applied to any existing neural network code trained on energy data, such as AENet, N2P2, ANI, or PINN.
  • The method ensures numerical stability and low error in gradient approximation by using a central difference scheme with adaptive ε.
  • It supports full numerical precision if dual numbers are available in the underlying codebase, though finite differencing is sufficient in practice.

Experimental results

Research questions

  • RQ1Can force data be incorporated into machine learning potential training at a computational cost only a few times higher than energy-only training?
  • RQ2Is it possible to compute the full loss gradient efficiently without using a machine learning framework?
  • RQ3Can memory usage be reduced by avoiding a second backpropagation step during force training?
  • RQ4Does the finite-difference approximation of the directional derivative yield accurate gradients with minimal numerical error?
  • RQ5Can the same finite-difference parameter ε be used effectively across both trained and untrained models with proper unit scaling?

Key findings

  • The proposed algorithm computes the loss gradient for force training at approximately 3× the cost of predicting all forces, independent of system size or model complexity.
  • The method reduces memory usage by 50% compared to iterated backpropagation by eliminating the second backpropagation step.
  • Finite-difference approximations of the directional derivative yield negligible numerical errors in practice, especially when using proper unit scaling via Eq. (10).
  • The optimal finite-difference parameter ε remains consistent across both trained and untrained models when force units are scaled correctly, ensuring robustness during training.
  • The algorithm is compatible with any existing neural network code designed for energy-only training, enabling seamless integration without framework constraints.
  • The method enables high-accuracy machine learning potentials by fully utilizing force data, which contains significantly more information than energy alone.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.