Force-Field Optimization by End-to-End Differentiable Atomistic Simulation

Abhijeet S. Gangan, Ekin D. Cubuk, Samuel S. Schoenholz, Mathieu Bauchy, N. M. Anoop KrishnanJournal of Chemical Theory and Computation 2024

TL;DR

This paper introduces a novel framework for optimizing atomistic force fields by leveraging end-to-end automatic differentiation (AD). By analytically computing gradients of simulation properties with respect to force field parameters, they achieve faster and more accurate optimization of classical and machine-learned potentials for complex material properties like elastic constants and vibrational spectra.

What Problem Does This Paper Address?

Atomistic simulations are crucial for understanding materials, but their accuracy hinges on precise force fields. Traditionally, optimizing these force fields involves fitting parameters to experimental data or first-principles calculations of energies and forces. However, this approach struggles to capture more complex material responses like elastic properties or vibrational spectra. Existing methods for calculating the necessary derivatives (e.g., finite differences) are computationally expensive and prone to errors, especially in high-dimensional parameter spaces. This paper aims to overcome these limitations by using automatic differentiation to directly optimize force fields for a wider range of material properties.

Methods

The core innovation is a framework that combines an "inner loop" for atomistic simulations (energy minimization or molecular dynamics) and an "outer loop" for optimization. Crucially, this framework utilizes end-to-end automatic differentiation (AD), specifically through the JAX-MD library. This allows for the analytical computation of gradients of various material properties (e.g., elastic constants, force constants, radial distribution functions) with respect to the force field parameters. This analytical gradient calculation bypasses the need for expensive and potentially inaccurate numerical differentiation methods. The optimization itself is performed using standard gradient-based algorithms like BFGS and CG, as well as a gradient-free method (Nelder-Mead) for comparison.

Datasets

The paper primarily uses first-principles (DFT) calculations to generate "ground truth" data for silicon. This includes:

  • Elastic constants and phonon properties: Computed at 0 K using DFT.
  • Radial Distribution Functions (RDFs): Obtained from finite-temperature ab initio molecular dynamics (AIMD) simulations at various temperatures (1000K, 2000K, 3000K) and system sizes.
  • Pre-trained GNN dataset: An existing dataset of energies and forces for silicon from DFT is used for fine-tuning machine-learned potentials.

Key Insights and Ideas

  • AD enables direct optimization for complex properties: The framework successfully optimizes force fields not just for energies and forces, but also for derived properties like elastic constants and force constants, which are crucial for vibrational spectra.
  • Analytical gradients are superior: AD's ability to compute analytical gradients leads to faster convergence and more accurate optimization compared to traditional methods.
  • Generalizability beyond training data: Machine-learned potentials fine-tuned for structural properties (RDFs) show improved generalizability to unseen temperatures and system sizes compared to those trained solely on energies and forces.
  • Multi-objective optimization is powerful: The framework can be extended to optimize force fields for multiple properties simultaneously, addressing the challenge that parameters optimized for one property may not transfer well to others.

Key Results

  • Elastic Constants: Optimized SW and EDIP potentials show improved agreement with DFT values for elastic constants, with some parameters changing significantly from their original values.
  • Vibrational Properties: Force-field parameters optimized for force constants (Hessian) lead to significantly better agreement with DFT-calculated phonon dispersion and vibrational density of states (VDOS) for both SW and EDIP potentials.
  • Radial Distribution Functions (RDFs): Machine-learned potentials fine-tuned on RDFs demonstrate better performance at higher temperatures and larger system sizes compared to models trained only on energies and forces.
  • Optimization Speed: The optimization process, even for complex properties, converges rapidly, often within 4-6 iterations for classical potentials.
  • Multi-objective Optimization: Optimizing for both elastic constants and force constants simultaneously yields distinct parameter sets for SW and EDIP, highlighting the importance of considering multiple properties.

Limitations and Future Work

  • Convex Loss Landscape Assumption: The rapid convergence to global minima is observed on convex loss landscapes. The behavior on non-convex landscapes might differ.
  • Transferability of Parameters: While multi-objective optimization improves transferability, the paper notes that parameters optimized for one property may not be universally transferable.
  • MLFFs and Short-Distance Repulsions: Fine-tuned MLFFs still exhibit some limitations in capturing short-distance repulsions, particularly at higher temperatures.
  • Future Work: The authors suggest extending this framework to other materials, more complex properties, and for developing universal force fields. They also highlight the potential for AD in constructing coarse-grained models and exploring self-assembly and materials discovery.

Summary updated

BibTeX
@article{gangan2024force,
  author = {Abhijeet S. Gangan and Ekin D. Cubuk and Samuel S. Schoenholz and Mathieu Bauchy and N. M. Anoop Krishnan},
  title = {{Force-Field Optimization by End-to-End Differentiable Atomistic Simulation}},
  journal = {Journal of Chemical Theory and Computation},
  year = {2024},
}
Figure