MCP
arXivarXiv
Preprint
Published: August 4, 2026
cond-mat.mtrl-sci
v2

AccelNet: Exact backward-compatible acceleration of polynomial angular descriptors through Cartesian moment factorization

Abstract
We present AccelNet, an exact, backward-compatible method for accelerating existing trained aenet and n2p2 neural-network potentials without retraining. For angular terms with separable one-neighbor weights and a finite polynomial dependence on cos⁡θ\cos \theta, the method exploits their hidden finite-rank structure to replace explicit neighbor-pair loops by one-neighbor Cartesian moments. AccelNet reads models trained with either package and reproduces their descriptors, energies, and analytic forces to floating-point roundoff. We verified this equivalence for H2_2O and TiO2_2 models and tested the resulting potentials in LAMMPS molecular-dynamics simulations. The implementation, model-conversion tools, and LAMMPS interfaces are released as open-source software. AccelNet also enables GPU-accelerated molecular dynamics with existing aenet and n2p2 potentials. Moment evaluation achieves speedups of up to 10.9 on a CPU and 15.8 on a GPU relative to direct evaluation within AccelNet. The implementation, model-conversion tools, and LAMMPS interfaces are released as open-source software.
0
AI overview
Reviews
Citation graph
References · 24
Structured
This preview uses paper v1; the current paper is v2
Generated from v1 · the paper is now at v2

Overview

This paper proposes AccelNet, an exact, backward-compatible method for accelerating already-trained aenet and n2p2 neural network potentials without retraining. By replacing explicit neighbor-pair loops with a Cartesian-moment factorization, it reproduces the original model's descriptors, energies, and analytical forces to floating-point rounding precision.

Computational Background of Polynomial Angular Descriptors and Existing Evaluation Schemes

In the descriptor computation pipelines of mainstream neural network potentials, the radial accumulation cost grows linearly with the number of neighbors ziz_i of a central atom, while the direct angular accumulation scales quadratically with the number of neighbors and requires repeated neighbor-pair traversal loops for each required polynomial order and channel.

The existing public API for Chebyshev angular descriptors offers three evaluation modes: direct, moment, and automatic. The current automatic selection strategy uses the direct enumeration path when the number of angular neighbors is below 16, and switches to the moment evaluation path when the number of neighbors reaches 16 or above. For the supported n2p2 angular functions, moment evaluation is used by default when the positive integer order satisfies ζ≤10, while unsupported orders automatically fall back to direct enumeration mode; as a result, a single model may run both computation paths simultaneously during inference.

The core positioning of this work is not to design a new descriptor family, but to identify and exploit the hidden finite-rank structure in widely used polynomial angular descriptors, thereby constructing a fully exact, backward-compatible evaluation acceleration algorithm.

AccelNet's Core Design and Backward-Compatible Features

The method targets angular terms with separable per-neighbor weights and finite polynomial dependence on cosθ, mining their hidden finite-rank structure and replacing the explicit loop over all neighbor pairs in the original computation with accumulations of per-neighbor Cartesian moments. AccelNet directly reads the native model files trained by both frameworks; its output descriptors, system energies, and analytical forces differ from the original implementation only at the level of floating-point rounding error, fully preserving all precision characteristics of the original models.

Exactness and Order-Reduction Principle of the Cartesian Moment Factorization

In the Cartesian moment factorization, the neighbor-pair summands of the traditional implementation and the rewritten moment expressions contain exactly the same set of terms, with no additional approximations introduced.

For a fixed polynomial order, the transformed Cartesian moments need only be accumulated in a single loop over all neighbors of the target atom; the total number of moments is determined by the maximum polynomial order PmaxP_{max} and is independent of the total number of neighbors ziz_i of the target atom. This converts the original quadratic-complexity operation of enumerating all neighbor pairs into a moment accumulation whose cost grows only linearly with the number of neighbors, achieving a reduction in complexity order.

The Cartesian separation operation used by Chebyshev angular descriptors can be applied term by term to each term of the expansion, constructing the corresponding per-species Cartesian moments.

There is no absolute, universal superiority between the two computation schemes. When the cutoff radius is enlarged or the local atomic density increases, the number of neighbors ziz_i of a target atom rises accordingly: the cost of direct neighbor-pair enumeration grows quadratically with ziz_i, while the cost of moment accumulation grows only linearly with ziz_i. Conversely, when the maximum polynomial order PmaxP_{max} is increased, the cost of direct enumeration rises approximately linearly, while the number of three-dimensional Cartesian moments grows with PmaxP_{max} on the order of Pmax3/6P^3_{max}/6. Ignoring implementation-dependent constant factors, the ratio of the dominant costs of the two schemes is approximately proportional to ziz_i.

Equivalence Verification and Measured Acceleration Results

For the tested Chebyshev models, after replacing the explicit pair summation with moment contraction, the energy results differ from the original implementation only within the precision of the comparison output, with a maximum force difference of about 10−1410^{-14} eV/Å; the n2p2 model comparison results also fully match the precision of the LAMMPS log and dump files. These differences arise entirely from changes in floating-point reduction order and cause no detectable alteration to the learned potential energy surface. You can use the figure immediately following to visually compare the wall-time differences of 500-step molecular dynamics simulations across the three test systems under different implementation schemes.

Fig. 1: Wall-time comparison over the 500-step measurement window of dynamic LAMMPS molecular dynamics; bars show the median of five trials, and open circles show single-process run results.

Backward compatibility requires far more than numerical equality of the angular kernel itself: the replacement evaluator must fully preserve the entire mapping from atomic configurations to model energies and forces, covering all computational conventions surrounding the angular expressions. This equivalence verification compared the loaded models at four levels: descriptors, derivatives, energies, and forces. Results differing only at rounding level demonstrate that the rewritten implementation can serve directly as a plug-and-play evaluator for trained aenet and n2p2 models, rather than merely reproducing isolated angular summation results.

The study decomposes the total speedup ratio into an engine-optimization gain and the moment-contraction gain of the algorithm itself. For the TiO2 Chebyshev test system, the moment-contraction path is 3.629x faster than the optimized direct evaluation scheme; the initial configuration of this system has on average 92 angular neighbors and 4187 angular pairs per atom, and the end-to-end speedup relative to the native aenet implementation is 11.618x, decomposable into the product of a 3.201x gain from engine optimization and a 3.629x gain from the moment-contraction algorithm. You can use the figure immediately following to view the log-scale wall-time speedup distributions corresponding to different optimization combinations across the three test systems.

Fig. 2: End-to-end speedup ratios decomposed according to the formula; the logarithmic vertical axis accommodates both the low-load H2O scenario and the high-load TiO2 scenario.

Applicability Boundaries of the Method and Notes on the Open-Source Toolchain

AccelNet's exact factorization has clear applicability prerequisites: the two-neighbor dependence must be introduced through a finite polynomial in cos θijkθ_{ijk}, and the remaining neighbor weights must be separable between j and k. Chebyshev angular descriptors and the supported n2p2 functions with positive integer powers satisfy this condition, whereas angular functions with non-separable dependence on rjkr_{jk}, non-integer angular power functions, and general non-polynomial kernel functions do not. For such unsupported terms, AccelNet does not replace the original function with an approximation; instead, it retains the direct computation logic, fully preserving all behavior of the original model.

AccelNet's source code, model conversion tools, and LAMMPS interface have been publicly released. The main code is distributed under the MIT license, while the retained cell-list source code derived from aenet and the LAMMPS pair-potential source code retain their respective MPL-2.0 and GPL-2.0 licenses, with complete license statements included in the repository.

Rating
No ratings yet
Rate
Community rating
—
/ 5
No ratings yet
Rating
—
Soundness
—
Presentation
—
Contribution
—
Confidence
—
Discussion
Top
Newest
Questions
Replication
Author
No comments yet — be the first