Transfer learning for chemically accurate interatomic neural network potentials

Viktor Zaverkin, David Holzmüller, Luca Bonfirraro, Johannes Kästner · DOI

Abstract

Developing machine learning-based interatomic potentials from ab-initio electronic structure methods remains a challenging task for computational chemistry and materials science. This work studies the capability of transfer learning, in particular discriminative fine-tuning, for efficiently generating chemically accurate interatomic neural network potentials on organic molecules from the MD17 and ANI data sets. We show that pre-training the network parameters on data obtained from density functional calculations considerably improves the sample efficiency of models trained on more accurate ab-initio data. Additionally, we show that fine-tuning with energy labels alone can suffice to obtain accurate atomic forces and run large-scale atomistic simulations, provided a well-designed fine-tuning data set. We also investigate possible limitations of transfer learning, especially regarding the design and size of the pre-training and fine-tuning data sets. Finally, we provide GM-NN potentials pre-trained and fine-tuned on the ANI-1x and ANI-1ccx data sets, which can easily be fine-tuned on and applied to organic molecules.

Introduction

In computational chemistry, a fundamental trade-off exists between computational speed and chemical accuracy. Simulating molecular dynamics requires interatomic potentials—mathematical models describing the forces between atoms. While traditional force fields are computationally efficient, they often lack the precision to capture complex quantum effects. Conversely, "gold standard" ab-initio methods like Coupled Cluster theory (CCSD(T)) provide exceptional accuracy but are computationally prohibitive for large systems or long timescales. Machine Learning (ML) potentials offer a promising middle ground, yet they typically require vast amounts of high-quality data. This research addresses the "data bottleneck" by leveraging transfer learning to achieve Coupled Cluster accuracy using significantly less expensive data.

Methodology: Gaussian Moment Neural Networks and Transfer Learning

The researchers utilize the Gaussian Moment Neural Network (GM-NN) architecture. GM-NN represents an atom's local environment in a way that is inherently invariant to rotation and translation, ensuring physical consistency.

The core of this approach is discriminative fine-tuning. Rather than training from scratch on scarce, expensive data, the process involves:

  1. Pre-training: The model is first trained on a large dataset of relatively inexpensive Density Functional Theory (DFT) calculations.
  2. Fine-tuning: The pre-trained parameters are then adjusted using a much smaller set of high-accuracy CCSD(T) data.
  3. Layer-wise Learning Rates: A key innovation is the use of differentiated learning rates ($\eta$). Earlier layers, which capture general structural features, are updated slowly, while final layers mapping these features to energies are updated more aggressively.
The transfer learning workflow: Pre-training on DFT data followed by fine-tuning on CCSD(T) data with layer-wise learning rates.

Datasets and Evaluation

The study benchmarks the approach using several standard molecular datasets:

  • MD17 (Revised): High-accuracy trajectories of small organic molecules like aspirin and ethanol.
  • ANI-1x and ANI-1ccx: A large DFT-labeled collection (~5M configurations) and a smaller CCSD(T)-labeled subset (~500k configurations), respectively.
  • COMP6: A diverse suite for evaluating generalization to unseen organic structures.
Example of a small organic molecule (ethanol) representative of the structures found in the MD17 and ANI datasets.

Key Insights

A significant finding is that fine-tuning on energy labels alone can yield accurate atomic forces. This is crucial because analytical forces are often unavailable or too costly to compute for high-level quantum methods. Furthermore, transfer learning significantly boosts sample efficiency; for instance, an aspirin model achieved target accuracy with nearly 7.5 times fewer high-quality samples compared to training from scratch.

However, the authors identify a "Pre-training Paradox": an excessively large pre-training set relative to the fine-tuning set can make the model "stiff," causing it to overfit to lower-accuracy physics and struggle to adapt to the precise Coupled Cluster surface.

Results and Discussion

The transfer learning approach yielded substantial accuracy gains. For aspirin, energy error was reduced from 4.3 kcal/mol (scratch) to 0.35 kcal/mol. The models also demonstrated high fidelity in reproducing vibrational power spectra and maintaining stability in long-term simulations. Notably, a transfer-learned model successfully simulated deca-alanine (104 atoms) for over 1 nanosecond, preserving its helical structure where models trained from scratch failed.

Conclusion

Transfer learning provides a robust path toward achieving chemical accuracy in interatomic potentials with manageable data requirements. By pre-training on broad, lower-accuracy data and fine-tuning on targeted high-accuracy samples, researchers can create potentials that are both precise and computationally efficient. The release of pre-trained GM-NN potentials offers a valuable resource for the broader computational chemistry community.

Summary updated

BibTeX
@inproceedings{zaverkin2023transfer,
  author = {Viktor Zaverkin and David Holzmüller and Luca Bonfirraro and Johannes Kästner},
  title = {{Transfer learning for chemically accurate interatomic neural network potentials}},
  booktitle = {Physical},
  year = {2023},
  doi = {10.1039/d2cp05793j},
}
Figure