DPA-1: Pretraining of Attention-based Deep Potential Model for Molecular Simulation

Duo Zhang, Hangrui Bi, Fu‐Zhi Dai, Wanrun Jiang, Linfeng Zhang, Handong Wang · DOI

Abstract

Machine learning assisted modeling of the inter-atomic potential energy surface (PES) is revolutionizing the field of molecular simulation. With the accumulation of high-quality electronic structure data, a model that can be pretrained on all available data and finetuned on downstream tasks with a small additional effort would bring the field to a new stage. Here we propose DPA-1, a Deep Potential model with a novel attention mechanism, which is highly effective for representing the conformation and chemical spaces of atomic systems and learning the PES. We tested DPA-1 on a number of systems and observed superior performance compared with existing benchmarks. When pretrained on large-scale datasets containing 56 elements, DPA-1 can be successfully applied to various downstream tasks with a great improvement of sample efficiency. Surprisingly, for different elements, the learned type embedding parameters form a $spiral$ in the latent space and have a natural correspondence with their positions on the periodic table, showing interesting interpretability of the pretrained DPA-1 model.

Introduction

Machine learning force fields are increasingly replacing computationally expensive quantum mechanical calculations, such as Density Functional Theory (DFT), in molecular dynamics (MD) simulations. However, a significant challenge remains: most current ML potentials are highly specialized to narrow chemical spaces. Training a general-purpose model from scratch for every new material requires massive data generation; for example, mapping an AlMgCu alloy can consume upwards of 10 million CPU hours.

While "universal" Graph Neural Networks (GNNs) have been proposed, they often struggle with scalability on parallel supercomputers, may predict non-conservative forces, or produce non-smooth energy surfaces. DPA-1 aims to bridge this gap by providing a highly scalable, physics-respecting model that can be pretrained on massive, diverse datasets and efficiently finetuned for specific downstream materials.

Methods and Architecture

DPA-1 builds upon the established Deep Potential framework, ensuring physical fidelity by predicting conservative forces and preserving rotational and translational symmetries. The architecture introduces two primary innovations:

  1. Type Embedding: Instead of using separate neural network parameters for every element type—which scales quadratically—DPA-1 maps atomic types to fixed-length continuous vectors.
  2. Angular-Gated Self-Attention: This modified attention mechanism weighs interactions between a center atom and its neighbors based on both relative distance and angular information, allowing the model to dynamically focus on relevant local chemical environments.
DPA-1 Architecture: (a) Overall framework, (b) Embedding net, (c) Gated self-attention, (d) Fitting net.

The model was pretrained on the OC2M dataset (a subset of Open Catalyst 2020), covering 2 million configurations across 56 elements. For downstream tasks, such as AlMgCu alloys, Solid-State Electrolytes (SSE), and High Entropy Alloys (HEA), the learned type embeddings are frozen while the rest of the network is finetuned.

Key Insights and Results

DPA-1 demonstrates remarkable zero-shot compositional transfer. For instance, after training only on single and binary element examples, it can accurately infer complex ternary interactions in Al-Mg-Cu systems, achieving an energy error of 6.99 meV/atom—nearly ten times better than the DeepPot-SE baseline.

The Periodic Spiral

A standout discovery is the interpretability of the learned type embeddings. When visualized using PCA, the embeddings for 56 elements form a 3D spiral. Elements within the same period follow the spiral's path, while those in the same chemical family align orthogonally. This suggests the model independently "learned" the periodic table purely from spatial quantum mechanical data.

Interpretability and Efficiency: (a) The learned periodic spiral in latent space, (b) Interpolation of missing elements (Li), (c) Training efficiency across systems.

Furthermore, the meaningful nature of this latent space allows for embedding interpolation. The authors successfully created a highly accurate embedding for Lithium—which was missing from the pretraining data—by averaging the learned embeddings of Hydrogen and Sodium.

Performance and Efficiency

Pretrained DPA-1 requires approximately 90% less downstream training data to reach the same accuracy as models trained from scratch. In terms of computational cost, pretraining on the massive OC2M dataset converged in less than 200 GPU hours, significantly faster than many competing equivariant GNN models.

Conclusion and Future Work

DPA-1 represents a significant step toward a universal potential model for molecular simulation. While the current pretraining is somewhat biased by the catalyst-heavy nature of the OC2M dataset (leading to outliers like C, N, and O), the results are highly promising. Future work will focus on expanding the pretraining dataset to cover the entire periodic table and exploring local chemical environment embeddings to further enhance model performance across diverse molecular conformations.

Summary updated

Abstract

Machine learning assisted modeling of the inter-atomic potential energy surface (PES) is revolutionizing the field of molecular simulation. With the accumulation of high-quality electronic structure data, a model that can be pretrained on all available data and finetuned on downstream tasks with a small additional effort would bring the field to a new stage. Here we propose DPA-1, a Deep Potential model with a novel attention mechanism, which is highly effective for representing the conformation and chemical spaces of atomic systems and learning the PES. We tested DPA-1 on a number of systems and observed superior performance compared with existing benchmarks. When pretrained on large-scale datasets containing 56 elements, DPA-1 can be successfully applied to various downstream tasks with a great improvement of sample efficiency. Surprisingly, for different elements, the learned type embedding parameters form a $spiral$ in the latent space and have a natural correspondence with their positions on the periodic table, showing interesting interpretability of the pretrained DPA-1 model.
BibTeX
@inproceedings{zhang2024dpa,
  author = {Duo Zhang and Hangrui Bi and Fu‐Zhi Dai and Wanrun Jiang and Linfeng Zhang and Handong Wang},
  title = {{DPA-1: Pretraining of Attention-based Deep Potential Model for Molecular Simulation}},
  booktitle = {Npj},
  year = {2024},
  doi = {10.1038/s41524-024-01278-7},
}
Figure