Skip to main content
QUICK REVIEW

[论文解读] High-performance training and inference for deep equivariant interatomic potentials

Chuin Wei Tan, Marc Descoteaux|ArXiv.org|Apr 22, 2025
Topic ModelingComputer Science被引用 10
一句话总结

该论文通过 TorchInductor 对 NequIP 进行重构,以实现分布式训练,并引入 Ahead-of-Time Inductor (AOTI) 以及自定义 Triton 张量积内核,在分子动力学推理中实现最高 18x 的加速,并在 SPICE 2 数据集上实现大规模训练。

ABSTRACT

Machine learning interatomic potentials, particularly those based on deep equivariant neural networks, have demonstrated state-of-the-art accuracy and computational efficiency in atomistic modeling tasks like molecular dynamics and high-throughput screening. The size of datasets and demands of downstream workflows are growing rapidly, making robust and scalable software essential. This work presents a major overhaul of the NequIP framework focusing on multi-node parallelism, computational performance, and extensibility. The redesigned framework supports distributed training on large datasets and removes barriers preventing full utilization of the PyTorch 2.0 compiler at train time. We demonstrate this acceleration in a case study by training Allegro models on the SPICE 2 dataset of organic molecular systems. For inference, we introduce the first end-to-end infrastructure that uses the PyTorch Ahead-of-Time Inductor compiler for machine learning interatomic potentials. Additionally, we implement a custom kernel for the Allegro model's most expensive operation, the tensor product. Together, these advancements speed up molecular dynamics calculations on system sizes of practical relevance by up to a factor of 18.

研究动机与目标

  • 提高在大型数据集上训练 MLIP 的可扩展性和性能。
  • 实现端到端的高性能推理,与传统分子动力学代码集成。
  • 提供端到端基于编译器的深度等变性原子间势的加速。
  • 在大型且多样化的数据集(SPICE 2)上展示实际收益。
  • 增强框架的可扩展性,为未来的 MLIP 架构(如 Allegro)提供支持。

提出的方法

  • 将包含导数的完整模型跟踪到一个 PyTorch FX 图中,以便在训练时编译并实现推理兼容。
  • 应用 TorchInductor 通过 torch.compile 为前向和反向传播生成优化内核。
  • 实现分布式数据并行训练,采用自定义 DDP 方案以避免梯度分桶,从而最大化融合机会。
  • 引入 Ahead-of-Time Inductor (AOTI),将编译后的 PyTorch 模型导出为本地代码,以便在非 Python 环境(如 LAMMPS)中使用。
  • 为 Allegro 张量积开发自定义融合的 Triton 内核,以替代 PyTorch 实现中不可融合的部分。
  • 使用压缩稀疏格式表示 Wigner 3-j 收缩系数,避免中间量的生成以降低内存占用。

实验结果

研究问题

  • RQ1如何利用 TorchInductor 加速深度等变性原子间势的训练和推理?
  • RQ2将 AOTI 与高性能 MD 代码如 LAMMPS 集成进行推理时,性能提升有哪些?
  • RQ3自定义融合的张量积内核是否能够进一步降低 Allegro 的内存和计算瓶颈?
  • RQ4对于像 SPICE 2 这样的大型 MLIP 数据集,分布式多 GPU 训练的扩展性如何?
  • RQ5在 SPICE 2 上针对不同电荷态子集训练 Allegro 模型,其准确性和泛化性含义是什么?

主要发现

  • 使用 torch.compile 的训练在所测试的 GPU 上相对于 TorchScript 提供 2.4–5.0x 的加速。
  • 分布式训练在 128 个 rank 时扩展良好,在 256 rank 时效率合理(在给定基线下 AMD 为 40%、NVIDIA 为 24%)。
  • 使用 AOTI 和优化的张量积内核的推理在小分子和水盒上,相对于 TorchScript 实现最高达到 18x 的加速。
  • AOTI 实现对大系统的内存高效且可扩展的推理,按硬件不同,单 GPU 允许的系统规模扩大到 4320–5184 原子(视硬件而定)。
  • 生物分子系统(DHFR、纤维素)的强尺度并行在 Frontier 和 Perlmutter 上达到 256 节点时表现出色,AOTI+TP 显著提高吞吐量。
  • 与 SPICE 2 基准相比,三种 Allegro 模型(小/中/大)在扭转势垒预测方面表现有利, MAE/RMSE 随模型尺寸增大而下降。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。