betaFeedback

WorksComputer Science

TrimSO(2): Fast and Memory-Efficient Training of Equivariant Interatomic Potentials

Abstract

Equivariant interatomic potentials enable accurate and efficient simulations of molecules and materials. Among them, models based on SO(2) convolutions reduce the cost of tensor products and achieve state-of-the-art accuracy, but their training remains time-consuming and memory-intensive. Existing training implementations materialize large edge tensors for representation transformations surrounding dense matrix multiplications, increasing memory usage and data movement. We observe that these transformations can be integrated into the model's existing dataflow, avoiding separate intermediate materialization. We introduce TrimSO(2), a fast and memory-efficient algorithm for SO(2)-based equivariant models. It realizes this principle through rotation on gather, recombination with activation, and inverse rotation on reduction, with support for the higher-order differentiation required for training. By avoiding intermediate materialization, TrimSO(2) delivers 2.71-16.73×\times operator speedups across forward, backward, and double backward and reduces model-level high-bandwidth memory traffic by 3.81-9.88×\times. Finally, TrimSO(2) achieves 2.07-2.94×\times training speedups and 1.53-3.16×\times reductions in peak training memory over PyTorch implementations for official eSEN, UMA, and EquiformerV3 workloads on A100 and H100 GPUs.

Introduction

Machine learning interatomic potentials learn atomic interactions from quantum mechanical data, enabling accurate and efficient molecular and materials simulations (Unke et al., 2021). To improve accuracy, leading models exploit the rotational symmetry of atomic systems: energies are invariant to rotations, while forces transform equivariantly [3]. Equivariant neural networks extend this symmetry to their internal representations (Thomas et al., 2018). Their features include scalars, vectors, and higher-order geometric tensors that carry directional information between layers while obeying the corresponding rotation laws [12]. Models using these representations have demonstrated high data efficiency and state-of-the-art accuracy on molecular and materials benchmarks [3, 2, 18].

Mainstream equivariant architectures combine SO(3) representations through tensor products, whose computational cost can scale as O(L6)O(L^{6}) with the maximum representation degree LL [22]. This computational cost makes training expensive, motivating progress in algorithm design as well as systems optimization. On the algorithmic side, eSCN reduces this cost to O(L3)O(L^{3}) by reformulating SO(3) convolutions as SO(2) convolutions in local edge frames [22]. This formulation enables models to scale to higher-degree representations and further improve accuracy [18]. On the systems side, OpenEquivariance and FlashTP accelerate SO(3) tensor products through optimized GPU implementations, achieving model-level speedups [4, 14]. However, systems optimizations tailored to the training of SO(2)-based models remain limited, leaving the practical benefits of their lower algorithmic complexity only partially realized.

In SO(2)SO(2) models, tensor products are conducted in local edge frames, replacing sparse SO(3)SO(3) contractions with efficient dense matrix multiplications. This reformulation introduces three representation transformations around the dense matrix products: node features must be rotated into local edge frames, matrix-product outputs must be recombined through additions and subtractions, and edge messages must be rotated back to the global frame [22]. Existing training implementations materialize large intermediate edge tensors when performing these transformations, requiring repeated writes and reads that increase memory usage and data movement. The higher-order derivatives required for training machine learning interatomic potentials [11, 14, 4] further extend the lifetimes of intermediate values retained for differentiation, increasing storage demands.

We observe that these representation transformations can be performed as part of the model’s existing dataflow, avoiding separate writes and reads of their intermediate results. We introduce TrimSO(2), a fast and memory-efficient algorithm for SO(2)SO(2)-based equivariant models. This design extends across energy evaluation, force differentiation, and loss backpropagation, improving training efficiency while preserving the model’s original computational formulation. Across eSEN [11], UMA (Wood et al., 2026), and EquiformerV3 [19] on A100 and H100 GPUs, TrimSO(2) achieves 3.81–9.88× reductions in HBM traffic, 2.07–2.94× training speedups, and 1.53–3.16× reductions in peak training memory over official PyTorch implementations.

TrimSO(2) integrates these transformations into the model’s training dataflow through three corresponding strategies:

  1. Rotation on gather. For each edge-feature tile, we gather the required node features and rotate them directly into the matrix-product input layout, avoiding a separate tensor of gathered edge features.

  1. Recombination with activation. For each edge-feature tile, we load the matrix-product outputs, perform recombination, and immediately apply the activation, avoiding a separate recombined edge tensor.

  1. Inverse rotation on reduction. For each node-output tile, we inverse-rotate incoming edge messages and accumulate their contributions on chip before writing the result, avoiding a separate tensor of global-frame edge messages.

Background

Equivariant representations. Equivariant interatomic potentials encode directional information in atomic features that transform under three-dimensional rotations [3] (Thomas et al. 2018). Features are organized by degree ℓ\ell, with 2ℓ+12\ell+ 1 angular components m=−ℓ,…,ℓm = -\ell,\ldots,\ell per channel. A Wigner rotation matrix D(ℓ)D^{(\ell)} mixes these components within each degree and acts identically on all channels. With CC channels and maximum representation degree LL, a node feature is xi∈Rd×Cx_i \in\mathbb{R}^{d \times C}, where d=∑ℓ=0L(2ℓ+1)=(L+1)2d = \sum_{\ell=0}^{L}(2\ell+1) = (L+1)^2. These rotation rules allow features to be expressed in different coordinate frames while describing the same atomic environment.

SO(2)SO(2) convolutions. SO(2)SO(2) convolutions reduce the tensor-product computation by aligning a local coordinate frame with each edge [22]. Rotations about the aligned axis form SO(2)SO(2), under which components with matching angular orders can be mixed across degrees and channels. This permits dense matrix products for each order. In a real-valued basis, the positive and negative components of a nonzero order are paired. For each m>0m > 0, let T+T_{+} and T−T_{-} collect the components of orders +m+m and −m-m, with one edge per row and degree and channel indices in the columns. Applying the two learned weight maps Wm,0W_{m,0} and Wm,1W_{m,1} to both inputs produces four output blocks:

\begin{pmatrix} Q_{00} & Q_{01} \\ Q_{10} & Q_{11} \end{pmatrix} = \begin{pmatrix} T_{+}^{\top} \\ T_{-}^{\top} \end{pmatrix} \begin{bmatrix} W_{m,0} & W_{m,1} \end{bmatrix}, \qquad u_{+} = Q_{00} - Q_{11}, \qquad u_{-} = Q_{10} + Q_{01}. \tag*{(1)}\end{pmatrix}

We refer to the additions and subtractions that form the paired-order features u+u_{+} and u−u_{-} from these product blocks as recombination. These features feed the activation after the first SO(2)SO(2) linear layer and inverse rotation after the second.

To use these local computations in an atomic graph, the model gathers neighboring node features and rotates them into each edge frame. For an edge from atom jj to atom ii, let DijD_{ij} denote this rotation. Message generation and aggregation take the form

x~ij=Dijxj,mij=Dij−1Φθ(x~ij),xi′=∑j∈N(i)mij,(2)\widetilde{x}_{ij}=D_{ij}x_j,\qquad m_{ij}=D_{ij}^{-1}\Phi_{\theta}(\widetilde{x}_{ij}),\qquad x_i'=\sum_{j\in\mathcal{N}(i)}m_{ij}, \tag*{(2)}

where Φθ\Phi_{\theta} applies two SO(2) linear layers with an intervening activation and N(i)\mathcal{N}(i) contains the neighbors of atom ii. The inverse rotation Dij−1D_{ij}^{-1} transforms the messages back to a common global frame before they are summed at the receiving atom. Models may retain only orders ∣m∣≤M|m|\leq M locally, setting omitted components to zero before inverse rotation. As shown in Figure 1, SO(2)-based potentials adopt a Transformer-like architecture with stacked blocks, each combining an SO(2) convolution, an equivariant feed-forward network, and residual connections [11, 19] (Wood et al. 2026). See Appendix § 7 for a detailed description.

Figure 1. General architecture of an SO(2)-based interatomic potential. The model predicts energy and obtains forces by differentiating it with respect to atomic positions.

Training of interatomic potentials. The model predicts energy Eθ(r,Z)E_{\theta}(\mathbf{r}, Z) from atomic positions r\mathbf{r} and atom types ZZ. Forces follow from F=−∇rEθF=-\nabla_{\mathbf{r}}E_{\theta}, enforcing the conservative relation between energy and force required by the modeled atomic systems [11]. Training on force labels, however, requires differentiating through this energy gradient with respect to the model parameters. For an energy–force objective L=λELE+λFLF\mathcal{L}=\lambda_E L_E+\lambda_F L_F, the parameter gradient includes a mixed second-derivative term:

∇θL=λE∇θLE−λF[∂∂θ(∇rEθ)]T∇FLF.(3)\nabla_{\theta}\mathcal{L}=\lambda_E\nabla_{\theta}L_E-\lambda_F\left[\frac{\partial}{\partial\theta}\left(\nabla_{\mathbf{r}}E_{\theta}\right)\right]^{\mathsf{T}}\nabla_F L_F. \tag*{(3)}

Optimizing training therefore requires accounting for all three stages: energy evaluation, force differentiation, and loss backpropagation.

Method

TrimSO(2) reduces storage and data movement by integrating the representation transformations of SO(2) convolutions into the model’s existing dataflow. We preserve the dense matrix products and extend this principle through the backward and double-backward computations required for training. The full implementation also applies the same principle to node-side equivariant feed-forward networks.

Workload analysis

SO(2) convolutions expose dense matrix products that can use optimized GPU routines. For each positive order mm, Equation (1) multiplies a 2E×km2E\times k_m input by a km×2hmk_m\times2h_m weight matrix, where EE is the number of directed edges and km,hmk_m,h_m are the input and output widths across degrees and channels. Batching edges into rows enables reuse of weights across edges and input features across output channels.

However, the representation transformations introduced by SO(2) convolutions incur storage and data movement overhead. In the upper half of Figure 2, gathering, rotation, recombination, and inverse rotation are separate steps connected by writes to and reads from HBM. For NN atoms with

Figure 2. TrimSO(2) avoids intermediate HBM accesses by integrating representation transformations into existing dataflow. Top: separate operations materialize edge arrays. Bottom: rotation on gather, recombination with activation, and inverse rotation on reduction keep temporary values on chip. Blue and ochre transfer arrows indicate HBM reads and writes. The bottom arrows show the forward, backward, and double-backward feature dataflows.

CC-channel node features, gathering expands NdCNdC node values into EdCEdC edge values. The rotated and recombined arrays likewise scale with the number of edges. Efficient matrix products also require four layout conversions between grouping by degree and grouping by order around the two SO(2) linear layers. Each conversion reads and rewrites a complete feature array. Training can further extend the lifetimes of intermediate values retained for differentiation.

Gathering provides the node features needed for rotation, activation consumes recombined product outputs, and reduction sums inverse-rotated messages. These relationships allow each transformation to be combined with the operation that supplies or consumes its features, avoiding separate intermediate arrays while preserving the efficient dense matrix products.

TrimSO(2)

TrimSO(2) combines these pairs of operations into three strategies, shown in the lower half of Figure 2. They follow Node →\to Edge, Edge →\to Edge, and Edge →\to Node dataflows. Two GEMMs connect them through input and output matrices in HBM. Algorithm 1 gives the full forward computation.

Rotation on gather. The first GEMM requires node features in local edge frames. We combine gathering and rotation to construct this input directly, giving the Node →\to Edge dataflow in Figure 2 (lower left). Each edge-feature tile loads features from atoms jj and contracts them with the required rows of DijD_{ij} on chip, covering all angular components needed by the contraction. It writes the rotated coefficients directly into T(m)T^{(m)} in the GEMM input layout, eliminating the gathered edge array and absorbing the conversion from grouping by degree to grouping by order. Compact degree blocks hold only the rotation rows for retained orders ∣m∣≤M|m| \le M.

Recombination with activation. Activation consumes the paired-order features obtained by recombining the first GEMM’s outputs. We perform recombination as part of activation, so these features are consumed before they leave the chip. This gives the Edge →\to Edge dataflow in Figure 2 (lower center). Each tile loads matching entries from the four product blocks, forms Q00−Q11Q_{00} - Q_{11} and Q10+Q01Q_{10} + Q_{01}, and applies the activation A\mathcal{A} locally. The tile includes components needed by reductions in A\mathcal{A}. For example, a sigmoid gate scales the recombined features. Writing the activation output directly

Algorithm 1 Forward SO(2) convolution with TrimSO(2)

Notation: B\mathcal{B} indexes an output tile and its required inputs. Loads and stores access HBM. Rotations act per edge and degree.

  1. Rotation on gather: (x,D)↦T(x,D) \mapsto T

  2. for all edge–feature tiles B\mathcal{B} in parallel do

  3. X,R←load⁡(x[src⁡(B)]),load⁡(D[B])X,R \leftarrow\operatorname{load}(x[\operatorname{src}(\mathcal{B})]),\operatorname{load}(D[\mathcal{B}])

  4. U←RXU \leftarrow RX

  5. store⁡(T[B],U)\operatorname{store}(T[\mathcal{B}],U) ▶ GEMM input layout

  6. end for

  7. Q←GEMM⁡(T,W)Q \leftarrow\operatorname{GEMM}(T,W) ▶ first SO(2) linear layer

  8. Recombination with activation: (Q,A)↦z(Q,\mathcal{A}) \mapsto z

  9. for all edge–feature tiles B\mathcal{B} in parallel do

  10. q←load⁡(Q[B])q \leftarrow\operatorname{load}(Q[\mathcal{B}])

  11. Z←A(recombine⁡(q))Z \leftarrow\mathcal{A}(\operatorname{recombine}(q))

  12. store⁡(z[B],Z)\operatorname{store}(z[\mathcal{B}],Z) ▶ next GEMM input layout

  13. end for

  14. Q←GEMM⁡(z,V)Q \leftarrow\operatorname{GEMM}(z,V) ▶ second SO(2) linear layer

  15. Inverse rotation on reduction: (Q,D,N)↦x′(Q,D,\mathcal{N}) \mapsto x'

  16. for all node-output tiles (i,B)(i,\mathcal{B}) in parallel do

  17. a←0a \leftarrow0

  18. for j∈N(i)j \in\mathcal{N}(i) do

  19. q,R←load⁡(Qij[B]),load⁡(Dij[B])q,R \leftarrow\operatorname{load}(Q_{ij}[\mathcal{B}]),\operatorname{load}(D_{ij}[\mathcal{B}])

  20. a←a+RTrecombine⁡(q)a \leftarrow a+R^{T}\operatorname{recombine}(q)

  21. end for

  22. store⁡(x′[B],a)\operatorname{store}(x'[\mathcal{B}],a)

  23. end for

in the next GEMM’s input layout eliminates the recombined array and absorbs the surrounding layout conversions while preserving the order of recombination and activation.

Inverse rotation on reduction. Aggregation sums inverse-rotated messages at each receiving atom. We combine inverse rotation with this reduction, accumulating each message immediately after it is transformed back to the global frame. This gives the Edge →\to Node dataflow in Figure 2 (lower right). We group incoming edges by receiver ii and assign each node-output tile an on-chip accumulator. For each neighbor jj, the tile recombines the second GEMM’s product entries into a local message tijt_{ij} and accumulates DijTtijD_{ij}^{T}t_{ij} using the compact rotation blocks. After all incoming contributions have been accumulated, it writes the node output once. This removes separate local and global message arrays and absorbs the layout conversion before inverse rotation.

Differentiation for training

The feature gradients in backward and double backward follow the same three dataflow patterns. Backward reverses Node →\to Edge to Edge →\to Node and Edge →\to Node to Node →\to Edge, while Edge →\to Edge remains local to each edge, as shown by the arrows below HBM in Figure 2. Writing vˉ=∂Eθ/∂v\bar{v}=\partial E_{\theta}/\partial v for an energy derivative and treating omitted local components as zero, the feature gradients of rotation on gather and inverse rotation on reduction are

xˉj=∑i:j∈N(i)DijTx~ˉij,t~ˉij=Dijxˉi′(j∈N(i)).(4)\bar{x}_j=\sum_{i:j\in\mathcal{N}(i)}D_{ij}^{T}\bar{\tilde{x}}_{ij},\qquad\bar{\tilde{t}}_{ij}=D_{ij}\bar{x}'_i\quad(j\in\mathcal{N}(i)). \tag*{(4)}

The first expression accumulates rotated edge contributions into node gradients. The second gathers a node gradient and rotates it for each edge. They therefore follow the same patterns as inverse rotation on reduction and rotation on gather, respectively. Recombination differentiates locally, distributing (uˉ+,uˉ−)(\bar{u}_{+},\bar{u}_{-}) to the four product blocks with the required signs.

Double backward differentiates these backward computations. Let pjp_j and qijq_{ij} be the incoming loss gradients with respect to xˉj\bar{x}_j and t~ˉij\bar{\tilde{t}}_{ij}, respectively. Along these two feature paths, the loss gradients propagate as

∂L∂x~ij=Dijpj,∂L∂xi=∑j∈N(i)DijTqij.(5)\frac{\partial\mathcal{L}}{\partial\widetilde{x}_{ij}} = D_{ij}p_j,\qquad\frac{\partial\mathcal{L}}{\partial x_i} = \sum_{j\in N(i)} D_{ij}^{\mathsf{T}}q_{ij}. \tag*{(5)}

The first expression returns to Node →\to Edge by gathering and rotating node quantities. The second returns to Edge →\to Node by inverse-rotating and accumulating edge contributions. These directions match the double-backward arrows in Figure 2. Edge →\to Edge derivatives continue to act locally. Rotation and parameter derivatives are computed alongside these feature paths, with rotation derivatives propagated to atomic positions.

To evaluate these derivatives, we retain node features, compact rotation blocks, and the required layer inputs, outputs, and incoming gradients. Omitted values are reconstructed from this state within each tile when needed. For example, computing rotation derivatives gathers the saved node features again. This local reconstruction avoids retaining the intermediate edge arrays across training stages. Appendix § 8 gives detailed algorithms and derivative formulas for the three dataflows.

Memory and I/O analysis

For the forward schedule in Figure 2, assume all orders are retained (M=LM = L) and all feature widths equal CC. Table 1 counts the eliminated intermediate arrays, including the four layout conversions. Each array contains EdCEdC elements.

DataflowHBM intermediates (elements): Separate operationsHBM intermediates (elements): TrimSO(2)Avoided I/O (bytes)
Node →\to Edge2EdC2EdC04bEdC4bEdC
Edge →\to Edge3EdC3EdC06bEdC6bEdC
Edge →\to Node3EdC3EdC06bEdC6bEdC

Table 1. Eliminated intermediate storage and logical I/O. Each array incurs one write and one read at bb bytes per element. Shared GEMM inputs and outputs are excluded.

Removing one write and one read per array avoids

Beliminated=2b(2+3+3)EdC=16bEdC(6)B_{\mathrm{eliminated}} = 2b(2 + 3 + 3)EdC = 16bEdC \tag*{(6)}

of logical feature accesses per convolution. GEMM inputs and outputs remain in HBM, while temporary feature storage scales as O(BdC)O(BdC) for a tile of BB edges, independently of EE.

During differentiation, retained node features occupy NdCNdC elements and allow EdCEdC gathered values to be reconstructed locally, an E/NE/N-fold difference in representation size. Peak-memory savings depend on the lifetimes of all retained arrays, and physical HBM traffic also depends on cache reuse. Appendix § 8.§ 5 details the counts and extends them to unequal widths and retained-order layouts.

Experiments

We evaluate TrimSO(2) in terms of training efficiency and numerical accuracy. We first measure its benefits for training speed, peak memory, and HBM traffic at the model level (§ 4.2). To understand these gains, we examine the contributions of the dataflow optimizations through cumulative ablations (§ 4.3) and analyze operator performance across computation stages and configurations (§ 4.4). Finally, we assess numerical accuracy by comparing outputs, gradients, and training trajectories with the official PyTorch implementations (§ 4.5). Appendix § 9 provides detailed experimental settings and additional results.

Experimental setup

We compare TrimSO(2) with official PyTorch implementations of eSEN (Fu et al. [11]), UMA (Wood et al. (2026)), and EquiformerV3 (Liao et al. [19]) on OMat24 (Barros-Luque et al. [1]), following their official architectures and training settings. Each pair shares random initialization, fixed hyperparameters, and batch sequence. The loss includes energy, forces, and stresses, with forces and stresses obtained by differentiation. We use one A100 80GB or H100 80GB GPU in FP32. Three independent runs each measure 100 post-warmup steps, reporting mean step time and the largest peak allocated memory. Separate Nsight Compute runs measure HBM traffic over energy and force/stress evaluation and loss backpropagation on a fixed batch. Timing runs are uninstrumented. Speedup and reduction factors divide PyTorch measurements by optimized measurements.

End-to-end performance

To test whether avoiding intermediate arrays benefits complete model training, we measure HBM traffic, step time, and peak memory under matched training settings. Figure 3 compares TrimSO(2) with the official implementations, labeled PyTorch. TrimSO(2) achieves 3.81–9.88× reductions in HBM traffic across all three models on both GPUs. Complete training steps, including data processing and parameter updates, are 2.07–2.94× faster, with 1.53–3.16× reductions in peak allocated memory at unchanged batch sizes. Optimizing the dataflow around dense SO(2) products thus improves both training speed and memory efficiency without changing the model architectures.

Figure 3. TrimSO(2) reduces HBM traffic, accelerates training, and lowers peak memory across all three models on A100 and H100.

Ablation study

We examine how training speed and memory savings accumulate as the dataflow optimizations are enabled. Starting from PyTorch, we add Node → Edge, Edge → Edge, and Edge → Node in sequence (Figure 4). These stages correspond to the dataflows in § 3.2. We also extend the design to equivariant feed-forward networks to avoid intermediate materialization within each node. We denote these optimizations by Node → Node (Appendix § 8.§ 4) and add them last to obtain full TrimSO(2). Figure 4 shows that each successive optimization improves training speed and reduces peak memory across all three models.

Figure 4. Cumulative benefits of TrimSO(2) optimizations on A100. Optimizations are added sequentially, showing their contributions to training speedup and peak memory reduction.

Operator performance

We analyze the three dataflows in § 3.2 across forward, backward, and double backward. Inputs are captured from an EquiformerV3 training batch with L/M/C=4/2/128L/M/C = 4/2/128, 399 nodes, and 17,940 directed edges. The local PyTorch reference follows the official implementation’s operation order and layouts. Both paths share inputs and differentiation directions. We average 30 CUDA-event measurements per stage after warmup, excluding prerequisite computations. Figure 5(a) shows 2.71–16.73× forward speedups, 5.88–9.38× backward speedups, and 5.62–7.24× double-backward speedups. All three operators benefit across the three computation stages.

Figure 5. All three operators run faster than PyTorch across the evaluated stages and configurations. (a) Stage-wise speedups on A100 using captured training inputs. (b) Double-backward speedups on A100 and H100 with synthetic inputs, varying LL, MM, CC, NN, or KK.

To assess the effectiveness of our optimizations across a broader range of configurations, we then sweep configurations for double backward, the most time-consuming stage in the measured operator workloads. Using synthetic inputs with the same computation structure, we vary LL, MM, CC, node count NN, and outgoing edges per node KK individually. Figure 5(b) shows 2.34–11.06× speedups, demonstrating benefits across angular resolutions, channel widths, and graph workloads.

Numerical accuracy

We compare outputs and gradients with PyTorch to assess numerical accuracy. With shared inputs, relative L2L_2 errors in operator outputs and first and second derivatives are at most 2.77×10−72.77 \times10^{-7} against the PyTorch reference. We then compare the three models at a shared random initialization. Relative L2L_2 errors in energy, force, and stress predictions are at most 1.47×10−61.47 \times10^{-6}, and parameter-gradient errors are at most 8.36×10−78.36 \times10^{-7}.

We next examine how these differences affect training. Loss trajectories remain closely aligned on both GPUs over 100 steps for all three models and 40,000 steps for eSEN (Figure 6), with one long run per implementation on each GPU. Over 40,000 steps, TrimSO(2) retains 2.06× and 1.95× training speedups on A100 and H100, respectively, and a 1.97× reduction in peak memory on both GPUs.

Figure 6. TrimSO(2) and PyTorch follow closely aligned training loss trajectories on both GPUs. (a) Unsmoothed 100-step trajectories for all three models. (b) eSEN over 40,000 steps, shown as non-overlapping 200-step means, with the final 10,000 steps enlarged.

Related Work

Equivariant interatomic potentials. Equivariant interatomic potentials describe directional interactions through geometric message passing and many-body coupling [3, 2], as well as equivariant attention [9, 17] (Thölke & Fabritiis 2022). Local-frame representations (Zitnick et al., 2022) lead to efficient SO(2) convolutions [22] and higher-degree equivariant attention [18]. Recent SO(2)-based models develop this foundation for reliable physical-property prediction [11], broad chemical coverage (Wood et al., 2026), and expressive, efficient attention [19, 15]. TrimSO(2) targets efficient training of these SO(2)-based potentials by optimizing their shared local-frame computations.

Accelerating equivariant models. Accelerating equivariant models has motivated improvements in tensor-product algorithms and GPU implementations. Alternative tensor-product formulations [21, 20] (Xie et al. 2025) and model architectures [23, 16] reduce computational costs. Specialized GPU kernels deliver model-level speedups through sparsity-aware tensor-product computation and fusion [4, 14]. Streaming strategies further reduce intermediate materialization in equivariant attention [13] and SO(3) tensor-product convolutions (Chorąsiewicz & Bény, 2026). FAIRChem also provides Triton kernels for UMA inference.2 TrimSO(2) targets training of existing SO(2)-based models, optimizing forward, backward, and double backward while preserving model architectures and mathematical operations.

Memory-efficient training. Memory-efficient training can avoid storing large intermediate tensors by computing them in tiles and reconstructing values needed for backpropagation, as demonstrated by fused attention algorithms [8, 7, 24]. Related strategies reduce memory traffic in FFT convolutions [10] and avoid full intermediate arrays in pairwise reductions [5] and cross-entropy computation (Wigmans et al., 2025). For graph neural networks, dataflow optimization combines message generation and aggregation to reduce redundant computation and storage (Xie et al., 2022). TrimSO(2) applies this principle to SO(2)SO(2) representation transformations, reducing intermediate storage across energy evaluation, force differentiation, and loss backpropagation.

Conclusion

TrimSO(2) avoids intermediate materialization by integrating SO(2)SO(2) representation transformations into the model’s dataflow. Across eSEN, UMA, and EquiformerV3 on A100 and H100, it achieves 2.072.07–2.94×2.94\times end-to-end training speedups and 1.531.53–3.16×3.16\times reductions in peak training memory. Outputs, gradients, and training trajectories remain close to the official PyTorch implementations. These results demonstrate that TrimSO(2) improves training efficiency while preserving the mathematical operations of SO(2)SO(2)-based equivariant models.

AI Use Statement

We used generative AI tools to assist with drafting and revising the manuscript, including improving paragraph organization, clarity of presentation, and language. The authors take responsibility for the final manuscript and its scientific claims.

Reproducibility Statement

§ 3 describes the dataflow transformations and their differentiation. Appendix § 8 provides detailed algorithms, derivative identities, and memory and I/O calculations. Appendix § 9 documents the model configurations, training data and settings, software versions, hardware, and measurement protocols, together with detailed performance results and numerical comparisons. Our code will be released at https://github.com/HPC-AI-Team/TrimSO2.

SO(2)-based Equivariant Models

Equivariant representations

Equivariant interatomic potentials encode the directional structure of an atomic environment in features that transform with spatial rotations. Preserving this transformation rule through the network allows the model to process directional information while producing a rotation-invariant energy [3] (Thomas et al. 2018).

SO(3) representations organize these features by degree ℓ\ell. Degree zero describes scalars, degree one describes vectors, and higher degrees describe higher-order angular patterns. Each degree has 2ℓ+12\ell+1 angular components, indexed by m=−ℓ,…,ℓm=-\ell,\ldots,\ell. With CC channels carrying independent copies of this representation, atom ii has a feature block xi(ℓ)∈R(2ℓ+1)×Cx_i^{(\ell)} \in\mathbb{R}^{(2\ell+1)\times C}. A spatial rotation acts as

xi(ℓ)⟼D(ℓ)xi(ℓ),D(ℓ)∈R(2ℓ+1)×(2ℓ+1).(7)x_i^{(\ell)} \longmapsto D^{(\ell)}x_i^{(\ell)}, \qquad D^{(\ell)} \in\mathbb{R}^{(2\ell+1)\times(2\ell+1)}. \tag*{(7)}

The Wigner rotation matrix D(ℓ)D^{(\ell)} mixes angular components within the degree and acts identically on every channel. Collecting degrees 0,…,L0,\ldots,L gives the full node feature xi∈Rd×Cx_i \in\mathbb{R}^{d\times C} and its block-diagonal rotation matrix,

D=diag⁡(D(0),…,D(L))∈Rd×d,d=∑ℓ=0L(2ℓ+1)=(L+1)2.(8)D=\operatorname{diag}\left(D^{(0)},\ldots,D^{(L)}\right)\in\mathbb{R}^{d\times d}, \qquad d=\sum_{\ell=0}^{L}(2\ell+1)=(L+1)^2. \tag*{(8)}

Each node therefore carries dCdC feature values. In the real spherical harmonic basis, the rotation blocks are orthogonal, so D−1=DTD^{-1}=D^{\mathsf{T}} transforms the features back to their original frame.

The model updates these features by passing messages along an atomic graph. Let NN and EE denote the numbers of atoms and directed edges, and let N(i)\mathcal{N}(i) contain the neighbors that send messages to atom ii. For an edge from atom jj to atom ii, the relative geometry is

rij=rj−ri+Δij,ρij=∥rij∥,r^ij=rij/ρij,(9)r_{ij}=r_j-r_i+\Delta_{ij}, \qquad\rho_{ij}=\lVert r_{ij}\rVert, \qquad\hat{r}_{ij}=r_{ij}/\rho_{ij}, \tag*{(9)}

where Δij\Delta_{ij} selects a periodic image and is zero for a nonperiodic edge. The distance ρij\rho_{ij} is rotation-invariant and can determine scalar interaction weights. The direction r^ij\hat{r}_{ij} carries angular information. Real spherical harmonics Yℓm(r^ij)Y_{\ell m}(\hat{r}_{ij}) express this direction in components that transform under the same D(ℓ)D^{(\ell)} as the atomic features, allowing the two to be coupled equivariantly.

SO(2) convolutions

SO(2) convolutions perform this directional coupling in local edge frames. The reduction follows from the structure of an SO(3) tensor product, which combines a neighbor’s features with directional harmonics to produce a message. For one input and output channel,

mij,mo(ℓo)=∑ℓi,ℓf∑mi,mfC(ℓi,mi),(ℓf,mf)(ℓo,mo)wij(ℓi,ℓf,ℓo)xj,mi(ℓi)Yℓfmf(r^ij).(10)m_{ij,m_o}^{(\ell_o)}=\sum_{\ell_i,\ell_f}\sum_{m_i,m_f}\mathcal{C}_{(\ell_i,m_i),(\ell_f,m_f)}^{(\ell_o,m_o)}w_{ij}^{(\ell_i,\ell_f,\ell_o)}x_{j,m_i}^{(\ell_i)}Y_{\ell_fm_f}(\hat{r}_{ij}). \tag*{(10)}

The indices ℓi\ell_i, ℓf\ell_f, and ℓo\ell_o denote input, directional-filter, and output degrees. Clebsch–Gordan coefficients C\mathcal{C} determine how the angular components combine, while learned weights wijw_{ij} control each degree coupling and may depend on distance and atom types. The general tensor product can have an O(L6)O(L^6) computational cost as the maximum degree increases [22].

A local frame simplifies the directional harmonics without changing the interaction. Equivariance ensures that rotating both tensor-product inputs rotates the output by the same spatial rotation. The model can therefore compute the message in an aligned frame and transform it back afterward. Let Dij(ℓ)D_{ij}^{(\ell)} rotate features into a frame where the edge direction lies on the polar axis e^\hat{e}. In this frame,

x~ij(ℓ)=Dij(ℓ)xj(ℓ),Yℓfmf(e^)={αℓf,mf=0,0,mf≠0,(11)\widetilde{x}_{ij}^{(\ell)}=D_{ij}^{(\ell)}x_j^{(\ell)}, \qquad Y_{\ell_fm_f}(\hat{e})= \begin{cases} \alpha_{\ell_f}, & m_f=0,\\ 0, & m_f\ne0, \end{cases} \tag*{(11)}

where αℓf\alpha_{\ell_f} is the order-zero harmonic evaluated at the polar axis. Only the mf=0m_f=0 term remains in the directional filter, so the local message becomes

m~ij,mo(ℓo)=∑ℓi,ℓf∑miC(ℓi,mi),(ℓf,0)(ℓo,mo)wij(ℓi,ℓf,ℓo)αℓfx~ij,mi(ℓi).(12)\widetilde{m}_{ij,m_o}^{(\ell_o)}=\sum_{\ell_i,\ell_f}\sum_{m_i}\mathcal{C}_{(\ell_i,m_i),(\ell_f,0)}^{(\ell_o,m_o)}w_{ij}^{(\ell_i,\ell_f,\ell_o)}\alpha_{\ell_f}\widetilde{x}_{ij,m_i}^{(\ell_i)}. \tag*{(12)}

With mf=0m_f = 0, the real Clebsch–Gordan coefficients allow only mi=±mom_i = \pm m_o. Positive and negative orders therefore form pairs that do not mix with other orders. After combining the filter-degree contributions, each nonzero-order pair can be transformed using two real weight maps [22]. The paired transformation applies one map to both diagonal components and the other with opposite signs to the cross components. This is the SO(2) structure induced by the edge frame: rotations about its axis mix each order pair in the same way across degrees, permitting learned transformations across degrees and channels within that order.

To express these transformations as matrix products, the model groups features by order. Each matrix has one row per edge and columns indexed by degree and channel. For input and output channel widths CinC_{\mathrm{in}} and CoutC_{\mathrm{out}}, its widths are

km=(L−∣m∣+1)Cin,hm=(L−∣m∣+1)Cout,(13)k_m = (L - |m| + 1)C_{\mathrm{in}}, \qquad h_m = (L - |m| + 1)C_{\mathrm{out}}, \tag*{(13)}

because order mm occurs at degrees ∣m∣,…,L|m|,\ldots,L. Let T(m)∈RE×kmT^{(m)} \in\mathbb{R}^{E \times k_m} contain the inputs for order mm. For features from atom jj, the matrix entries are

Tij,(ℓ,c)(m)=∑m′=−ℓℓDij,mm′(ℓ)xj,m′,c(ℓ),∣m∣≤ℓ.(14)T^{(m)}_{ij,(\ell,c)} = \sum_{m'=-\ell}^{\ell} D^{(\ell)}_{ij,mm'}x^{(\ell)}_{j,m',c}, \qquad|m| \le\ell. \tag*{(14)}

Here ijij identifies the edge from jj to ii. A layer using both endpoints also constructs the corresponding features from xix_i and includes both atoms’ features in its input channels.

For a positive order, write T+=T(m)T_+ = T^{(m)} and T−=T(−m)T_- = T^{(-m)}. The first SO(2) linear layer packs its two weight maps into Wm=[Wm,0 Wm,1]∈Rkm×2hmW_m = [W_{m,0}\ W_{m,1}] \in\mathbb{R}^{k_m \times2h_m}. A matrix product produces four E×hmE \times h_m blocks, whose additions and subtractions form the output pair:

\begin{pmatrix} Q_{00} & Q_{01} \\ Q_{10} & Q_{11} \end{pmatrix} = \begin{pmatrix} T_+ \\ T_- \end{pmatrix} W_m, \qquad u_+ = Q_{00} - Q_{11}, \qquad u_- = Q_{10} + Q_{01}. \tag*{(15)}\end{pmatrix}

This recombination produces the features passed to the intervening activation. The second SO(2) linear layer uses weights Vm=[Vm,0 Vm,1]V_m = [V_{m,0}\ V_{m,1}] in the same form, with its own input and output widths. Its recombined outputs become the local messages for inverse rotation. For fixed channel widths, the degree-pair count across nonnegative orders is ∑m=0L(L−m+1)2=O(L3)\sum_{m=0}^{L}(L-m+1)^2 = O(L^3), giving the lower complexity of the SO(2) formulation.

The model may retain only local orders ∣m∣≤M|m| \le M, where 0≤M≤L0 \le M \le L. Keeping or omitting both signs together preserves the pair’s transformation under rotations about the edge axis. At channel width CC, the retained local feature has CqL,MCq_{L,M} values, with

qL,M=∑ℓ=0L(2min⁡(ℓ,M)+1)=(L+1)(2M+1)−M(M+1).(16)q_{L,M} = \sum_{\ell=0}^{L}\left(2\min(\ell,M)+1\right) = (L+1)(2M+1)-M(M+1). \tag*{(16)}

Let Φθ\Phi_\theta denote the two SO(2) linear layers and the intervening activation. Their output is expressed in an edge-specific frame. Before aggregation, the model inserts zeros in omitted orders and applies inverse rotation to return every message to a common global frame:

mij=Dij−1Φθ(x~ij),xi′=∑j∈N(i)mij.(17)m_{ij} = D_{ij}^{-1}\Phi_\theta(\tilde{x}_{ij}), \qquad x'_i = \sum_{j\in\mathcal{N}(i)}m_{ij}. \tag*{(17)}

Since Dij−1=DijTD_{ij}^{-1} = D_{ij}^{\mathsf{T}}, the inverse uses the transpose of the forward rotation matrix. The sum then updates atom ii with information from its neighbors.

SO(2)-based potentials stack these convolutions in a Transformer-like architecture (Figure 1) [11, 19] (Wood et al. 2026). Each block combines an SO(2) convolution with an equivariant feed-forward network and residual connections. The convolution exchanges information between atoms, while the feed-forward network transforms each atom’s features. Activations in both modules preserve the relevant rotation rules. Stacking blocks expands the atomic environment represented by the features, and an invariant readout maps the final features to the system energy.

Training of interatomic potentials

The resulting model predicts energy Eθ(r,Z)E_\theta(\mathbf{r}, Z) from atomic positions r\mathbf{r} and atom types ZZ. Predicting forces as F=−∇rEθF = -\nabla_{\mathbf{r}}E_\theta enforces their conservative relation to this energy, a physical property important for downstream applications [11]. An energy–force objective combines energy and force errors as L=λELE+λFLF\mathcal{L} = \lambda_E\mathcal{L}_E + \lambda_F\mathcal{L}_F.

Training on force labels requires differentiating through the energy gradient. As expressed in Equation (3), the force loss contributes a mixed second derivative with respect to model parameters and atomic positions. Energy evaluation first constructs the computation that predicts EθE_\theta. Force differentiation propagates derivatives to the positions while retaining their dependence on the model parameters. Loss backpropagation then differentiates the energy and force errors with respect to those parameters. These three stages determine the forward, backward, and double-backward computations required for training.

Method Details

Node to edge

Rotation on gather constructs the first SO(2) linear layer’s inputs from node features. For each edge from atom jj to atom ii, it rotates xjx_j into the local frame and writes the retained components into the order-grouped matrices T(m)T^{(m)}. This combines the gather, rotation, and layout conversion in the upper-left part of Figure 2. The rotation representation and the output layout determine which entries each tile reads and writes.

Compact rotation blocks. The full matrix DijD_{ij} acts independently within each degree, and the local convolution retains only orders ∣m∣≤M\lvert m\rvert\le M. For degree ℓ\ell, define the retained order set Mℓ={m:−ℓ≤m≤ℓ,∣m∣≤M}\mathcal{M}_\ell= \{m : -\ell\le m \le\ell, \lvert m\rvert\le M\}, with qℓ=2min⁡(ℓ,M)+1q_\ell= 2\min(\ell,M)+1 entries. Selecting these rows from the full nℓ×nℓn_\ell\times n_\ell block, where nℓ=2ℓ+1n_\ell= 2\ell+1, gives

Rij(ℓ)=JℓDij(ℓ)∈Rqℓ×nℓ.(18)R_{ij}^{(\ell)} = J_\ell D_{ij}^{(\ell)} \in\mathbb{R}^{q_\ell\times n_\ell}. \tag*{(18)}

Here JℓJ_\ell selects the rows indexed by Mℓ\mathcal{M}_\ell. Thus Rij(ℓ)R_{ij}^{(\ell)} contains original entries of Dij(ℓ)D_{ij}^{(\ell)}, with all global-frame columns but only the required local-frame rows. Figure 7 shows the omitted zeros between degrees and the unused rows within each block.

Figure 7. Compact rotation blocks omit structural zeros and unused angular orders. An enlarged diagonal block highlights the retained rows, which are stored separately for each degree.

The blocks are stored consecutively across degrees, using

KL,M=∑ℓ=0Lqℓnℓ=∑ℓ=0L(2min⁡(ℓ,M)+1)(2ℓ+1)(19)K_{L,M} = \sum_{\ell=0}^{L} q_\ell n_\ell= \sum_{\ell=0}^{L} \bigl(2\min(\ell,M)+1\bigr)(2\ell+1) \tag*{(19)}

entries per edge, instead of d2d^2 for a dense rotation matrix. At L=3L = 3 and M=1M = 1, the block shapes are 1×11 \times1, 3×33 \times3, 3×53 \times5, and 3×73 \times7, totaling 46 entries instead of 256. The same stored blocks serve rotation on gather, inverse rotation on reduction, and their derivatives.

Writing the GEMM input. The retained rows are labeled by their signed order mm, while columns retain the global order m′=−ℓ,…,ℓm' = -\ell,\ldots,\ell. At channel width CC, the first linear layer’s matrix entries are

Tij,(ℓ,c)(m)=x~ij,m,c(ℓ)=∑m′=−ℓℓRij,mm′(ℓ)xj,m′,c(ℓ),m∈Mℓ.(20)T_{ij,(\ell,c)}^{(m)} = \widetilde{x}_{ij,m,c}^{(\ell)} = \sum_{m'=-\ell}^{\ell} R_{ij,mm'}^{(\ell)}x_{j,m',c}^{(\ell)}, \qquad m \in\mathcal{M}_\ell. \tag*{(20)}

For each edge tile, the kernel loads node features by the source atom indices, contracts them with Rij(ℓ)R_{ij}^{(\ell)}, and writes the results directly to degree–channel columns of T(m)T^{(m)}. No gathered feature array or separate rotated layout is written to HBM. Algorithm 2 makes this indexing explicit.

Differentiation and retained state. Backward propagates energy derivatives to both the node features and the geometry-dependent rotation blocks. For one edge and degree, write the rotation as x~=Rx\widetilde{x} = Rx. Its backward computation gives

x‾=RTx‾~,R‾=x‾~xT,(21)\overline{x} = R^{\mathsf{T}}\widetilde{\overline{x}}, \qquad\overline{R} = \widetilde{\overline{x}}x^{\mathsf{T}}, \tag*{(21)}

where bars denote derivatives of EθE_\theta. The contributions to x‾j\overline{x}_j are summed over edges that use atom jj, giving the Edge →\to Node pattern. Computing R‾ij\overline{R}_{ij} gathers the saved xjx_j again, so the EdCEdC gathered Algorithm 2 Rotation on gather into order-grouped GEMM inputs

Input: Node features xx, compact rotation blocks RR, directed edges (i,j)(i,j) from jj to ii, LL, MM, CC.

Output: T(m)∈RE×(L−∣m∣+1)CT^{(m)} \in\mathbb{R}^{E \times(L-|m|+1)C} for −M≤m≤M-M \le m \le M.

  1. for all edge tiles B\mathcal{B}, degrees ℓ\ell, and channel tiles CC in parallel do

  2. X←load⁡((xj(ℓ)[:,C])(i,j)∈B)X \leftarrow\operatorname{load}((x_j^{(\ell)}[:,C])_{(i,j)\in\mathcal{B}})

  3. for m∈Mℓm \in\mathcal{M}_{\ell} do

  4. r←load⁡((Rij(ℓ)[m,:])(i,j)∈B)r \leftarrow\operatorname{load}((R_{ij}^{(\ell)}[m,:])_{(i,j)\in\mathcal{B}})

  5. Zij,c←∑m′=−ℓℓrij,m′′Xij,m′,cZ_{ij,c} \leftarrow\sum_{m'=-\ell}^{\ell} r_{ij,m'}'X_{ij,m',c}

  6. p←(ℓ−∣m∣)C+Cp \leftarrow(\ell-|m|)C+C ▸ degree–channel columns

  7. store⁡(T(m)[B,p],Z)\operatorname{store}(T^{(m)}[\mathcal{B},p],Z)

  8. end for

  9. end for

values need not be retained in addition to the NdCNdC node values. Double backward differentiates these same local products. Its feature path gathers node quantities and rotates them back to edges, as in Equation (5). Since row selection does not depend on atomic positions, derivatives of Rij(ℓ)R_{ij}^{(\ell)} select the same rows of the corresponding derivatives of Dij(ℓ)D_{ij}^{(\ell)}. Rotation-gradient contributions therefore use the compact block dimensions before differentiation continues to positions.

Edge to edge

Recombination with activation connects the two SO(2) linear layers. The first GEMM writes product blocks QQ to HBM. The activation requires the paired-order features formed from these blocks, while the second GEMM requires its inputs grouped by order. For an edge ijij, the combined computation is

zij=A(recombine⁡(Qij)),u+=Q00−Q11,u−=Q10+Q01.(22)z_{ij}=A(\operatorname{recombine}(Q_{ij})), \qquad u_{+}=Q_{00}-Q_{11}, \qquad u_{-}=Q_{10}+Q_{01}. \tag*{(22)}

Here AA is the model’s activation, as in Algorithm 1, and zz is the next GEMM’s input. Recombination remains before activation. A tile reads the matching entries of QQ, forms the required features on chip, applies AA, and writes zz directly in the next GEMM layout. This removes the recombined array and the activation input and output layouts identified in Figure 2.

An activation can depend on several angular components of the same edge. The tile must include those components or complete the required local reduction before applying the dependent operation. This determines the tile’s extent without introducing a dependency on another edge. Gating provides a concrete instance of this dataflow.

Recombination with a gate. For a nonzero degree, let γij,ℓ,c\gamma_{ij,\ell,c} be a gate preactivation shared by the angular components of channel cc, and let σ\sigma be the sigmoid function. At one positive order mm, suppressing the edge, degree, and channel indices gives

z+=σ(γ)⊙(Q00−Q11),z−=σ(γ)⊙(Q10+Q01).(23)z_{+}=\sigma(\gamma)\odot(Q_{00}-Q_{11}),\qquad z_{-}=\sigma(\gamma)\odot(Q_{10}+Q_{01}). \tag*{(23)}

Each product block has shape E×hmE\times h_m, where hm=(L−m+1)Ch_m=(L-m+1)C. Algorithm 3 loads its degree–channel columns together with the gate and writes only the activated pair. The gate inputs retain their dependence on the model parameters and features.

Algorithm 3 Recombination with gating for a positive order mm

Input: Q00,Q01,Q10,Q11∈RE×hmQ_{00}, Q_{01}, Q_{10}, Q_{11}\in\mathbb{R}^{E\times h_m}, gate preactivations γ\gamma, 1≤m≤M1\le m\le M, LL, CC.

Output: z+,z−∈RE×hmz_{+},z_{-}\in\mathbb{R}^{E\times h_m} in the next GEMM’s input layout.

  1. for all edge tiles B\mathcal{B}, degrees ℓ=m,…,L\ell=m,\ldots,L, and channel tiles CC in parallel do

  2. p←(ℓ−m)C+Cp\leftarrow(\ell-m)C+C

  3. qαβ←load⁡(Qαβ[B,p])q_{\alpha\beta}\leftarrow\operatorname{load}(Q_{\alpha\beta}[\mathcal{B},p]) for α,β∈{0,1}\alpha,\beta\in\{0,1\}

  4. s←σ(load⁡(γ[B,ℓ,C]))s\leftarrow\sigma(\operatorname{load}(\gamma[\mathcal{B},\ell,C]))

  5. u+←q00−q11,u−←q10+q01u_{+}\leftarrow q_{00}-q_{11},\quad u_{-}\leftarrow q_{10}+q_{01}

  6. store⁡(z+[B,p],s⊙u+)\operatorname{store}(z_{+}[\mathcal{B},p],s\odot u_{+})

  7. store⁡(z−[B,p],s⊙u−)\operatorname{store}(z_{-}[\mathcal{B},p],s\odot u_{-})

  8. end for

Differentiation and local reconstruction. Backward first differentiates the activation and then distributes the resulting derivatives to the product blocks. For one gate shared across the retained orders of a degree and channel,

uˉm=σ(γ)zˉm,γˉ=σ′(γ)∑m∈Mℓzˉmum.(24)\bar{u}_m=\sigma(\gamma)\bar{z}_m,\qquad\bar{\gamma}=\sigma'(\gamma)\sum_{m\in M_\ell}\bar{z}_m u_m. \tag*{(24)}

The angular sum produces one gate derivative for that degree and channel. For each positive-order pair, recombination then gives

(Qˉ00,Qˉ01,Qˉ10,Qˉ11)=(uˉ+,uˉ−,uˉ−,−uˉ+).(25)(\bar{Q}_{00},\bar{Q}_{01},\bar{Q}_{10},\bar{Q}_{11})=(\bar{u}_{+},\bar{u}_{-},\bar{u}_{-},-\bar{u}_{+}). \tag*{(25)}

The same local calculation regenerates uu from the saved product blocks when needed. Double backward differentiates the gate products and their angular sum, using σ′(γ)\sigma'(\gamma) and σ′′(γ)\sigma''(\gamma) together with the reconstructed features. Recombination only redistributes entries with the signs above. Both derivative stages therefore remain Edge →\to Edge, without retaining the full recombined feature array.

Edge to node

Inverse rotation on reduction completes the convolution by turning the second SO(2) linear layer’s outputs into node updates. Its local messages tijt_{ij} are formed by recombining that layer’s product blocks. Reusing the compact rotation blocks defined in Section B.1, the output for degree ℓ\ell is

xi′(ℓ)=∑j∈N(i)(Rij(ℓ))Ttij(ℓ),xi,m′,c′(ℓ)=∑j∈N(i)∑m∈MℓRij,mm′(ℓ)tij,m,c(ℓ).(26)x_i^{\prime(\ell)}=\sum_{j\in\mathcal{N}(i)}(R_{ij}^{(\ell)})^{\mathsf{T}}t_{ij}^{(\ell)},\qquad x_{i,m',c}^{\prime(\ell)}=\sum_{j\in\mathcal{N}(i)}\sum_{m\in M_\ell}R_{ij,mm'}^{(\ell)}t_{ij,m,c}^{(\ell)}. \tag*{(26)}

The transpose maps qℓq_\ell retained local components to all nℓn_\ell global components. It equals (Dij(ℓ))TJℓT(D_{ij}^{(\ell)})^{\mathsf{T}}J_\ell^{\mathsf{T}}, where JℓTJ_\ell^{\mathsf{T}} inserts zeros in unused orders. The compact contraction gives the same result without forming the zero-padded local message or a separate inverse rotation matrix.

Accumulating node outputs. A parallel task owns a node-output tile, keeps its accumulator on chip, and traverses the node’s incoming edges. For each neighbor, it loads the required second-layer product entries, recombines them, and accumulates their inverse-rotated contribution. Only the completed node tile is written to HBM. Thus neither the local messages nor the per-edge global messages are stored, and the layout conversion before inverse rotation is absorbed into the indexed reads of QQ.

Algorithm 4 uses QQ for the second GEMM’s outputs, following Algorithm 1. Its order-zero output is Q(0)Q^{(0)}, and positive orders have the four blocks Qαβ(m)Q_{\alpha\beta}^{(m)}. With output channel width CC, their widths are (L+1)C(L+1)C and (L−m+1)C(L-m+1)C, respectively. Iterating j∈N(i)j \in\mathcal{N}(i) reads an incoming-edge list grouped by receiver. All rotation-row indices below are signed local orders, while m′m' indexes a global output component.

Algorithm 4 Inverse rotation on reduction from product blocks

Input: Second-layer blocks Q(0)Q^{(0)} and {Qαβ(m)}m=1M\{Q_{\alpha\beta}^{(m)}\}_{m=1}^{M}, compact rotations RR, incoming neighbors N(i)\mathcal{N}(i), NN, LL, MM, CC.

Output: x′(ℓ)∈RN×(2ℓ+1)×Cx'^{(\ell)} \in\mathbb{R}^{N \times(2\ell+1) \times C} for ℓ=0,…,L\ell=0,\ldots,L.

  1. for all nodes ii, degrees ℓ\ell, global components m′m', and channel tiles CC in parallel do

  2. a←0∣C∣a \leftarrow0_{|C|}

  3. for j∈N(i)j \in\mathcal{N}(i) do

  4. t0←load⁡(Q(0)[ij,ℓC+C])t_0 \leftarrow\operatorname{load}(Q^{(0)}[ij,\ell C+C])

  5. r0←load⁡(Rij(ℓ)[0,m′])r_0 \leftarrow\operatorname{load}(R_{ij}^{(\ell)}[0,m']), a←a+r0t0a \leftarrow a+r_0t_0

  6. for m=1,…,min⁡(ℓ,M)m=1,\ldots,\min(\ell,M) do

  7. p←(ℓ−m)C+Cp \leftarrow(\ell-m)C+C

  8. qαβ←load⁡(Qαβ(m)[ij,p])q_{\alpha\beta} \leftarrow\operatorname{load}(Q_{\alpha\beta}^{(m)}[ij,p]) for α,β∈{0,1}\alpha,\beta\in\{0,1\}

  9. r±←load⁡(Rij(ℓ)[±m,m′])r_{\pm} \leftarrow\operatorname{load}(R_{ij}^{(\ell)}[\pm m,m'])

  10. a←a+r+(q00−q11)+r−(q10+q01)a \leftarrow a+r_{+}(q_{00}-q_{11})+r_{-}(q_{10}+q_{01})

  11. end for

  12. end for

  13. store⁡(x′(ℓ)[m′,C],a)\operatorname{store}(x'^{(\ell)}[m',C],a)

  14. end for

Differentiation and retained state. Backward gathers the receiving node’s energy derivative and rotates it to each local edge frame. For one edge and degree, the local derivatives are

tˉij=Rijxˉi′,Rˉij=tij(xˉi′)T.(27)\bar{t}_{ij}=R_{ij}\bar{x}'_{i}, \qquad\bar{R}_{ij}=t_{ij}(\bar{x}'_{i})^{\mathsf{T}}. \tag*{(27)}

The derivative tˉij\bar{t}_{ij} is distributed to QQ with the recombination signs in Equation (25). The rotation derivative uses a locally reconstructed tijt_{ij}, so the complete local-message array is unnecessary. Rotation-gradient contributions from the input and output of the convolution are accumulated in the same compact representation. The feature path in double backward reverses gathering back into a receiver reduction, while derivatives through RijR_{ij} continue to the edge geometry. Retaining the required product blocks, rotation blocks, and incoming gradients supports these computations without storing global edge messages.

Node to node

The same principle of avoiding intermediate materialization extends to Node →\to Node computations. Equivariant feed-forward networks combine channel transformations with nonlinear operations on each atom’s features. These computations can involve rearranging feature layouts, expanding scalar gates across angular components, or converting harmonic coefficients to and from spherical-grid values. Applying these transformations within the operations that use their results avoids separately materializing the corresponding intermediate arrays. Although node tensors are typically smaller than edge tensors, wide hidden representations can make these savings substantial.

Spherical activations. EquiformerV3’s equivariant feed-forward network provides one such example. Its spherical activations expand each atom’s harmonic coefficients onto a grid before applying nonlinear operations. This expansion can produce large intermediate tensors when the hidden channels are wide. We examine the linear transformations around this expansion to identify which grid intermediates can be avoided.

For this example, write the features of one atom as X(ℓ)=xi(ℓ)∈Rnℓ×CinX^{(\ell)}=x_i^{(\ell)}\in\mathbb{R}^{n_{\ell}\times C_{\mathrm{in}}}. Let Gℓ∈Rng×nℓG_{\ell}\in\mathbb{R}^{n_g\times n_{\ell}} evaluate the degree-ℓ\ell basis at ngn_g grid points, Wℓ∈RCin×ChW_{\ell}\in\mathbb{R}^{C_{\mathrm{in}}\times C_h} transform the coefficient channels, and A∈RCh×CoutA\in\mathbb{R}^{C_h\times C_{\mathrm{out}}} transform the grid channels before the nonlinearity.

Forward computation. In this computation, the grid transform acts on angular components and the channel maps act on channels. Associativity and distributivity therefore allow the channel maps to be composed before grid expansion:

U=[∑ℓ=0LGℓ(X(ℓ)Wℓ)]A=∑ℓ=0LGℓ(X(ℓ)Bℓ),Bℓ=WℓA.(28)U = \left[\sum_{\ell=0}^{L} G_{\ell}\left(X^{(\ell)}W_{\ell}\right)\right] A = \sum_{\ell=0}^{L} G_{\ell}\left(X^{(\ell)}B_{\ell}\right), \qquad B_{\ell} = W_{\ell}A. \tag*{(28)}

The original order first forms grid features with ChC_h channels and then projects them to CoutC_{\mathrm{out}}. The reordered computation applies BℓB_{\ell} to the coefficients and expands only the resulting CoutC_{\mathrm{out}} channels. It produces the same U∈Rng×CoutU \in\mathbb{R}^{n_g \times C_{\mathrm{out}}} without the ng×Chn_g \times C_h grid intermediate in Figure 8. The composed maps are shared across atoms and remain functions of the original trainable parameters.

Figure 8. Algebraic reordering avoids expanded grid intermediates in the spherical-activation example. The forward comparison is shown on the left, with reordered backward and double-backward computations on the right.

The output side permits the corresponding reordering. Let YY contain the nonlinear grid values and let Hℓ∈Rnℓ×ngH_{\ell} \in\mathbb{R}^{n_{\ell} \times n_g} project them back to coefficients, including quadrature weights. When a channel map AoutA_{\mathrm{out}} precedes this projection,

Hℓ(YAout)=(HℓY)Aout.(29)H_{\ell}\left(Y A_{\mathrm{out}}\right) = \left(H_{\ell}Y\right)A_{\mathrm{out}}. \tag*{(29)}

The channel map can then be composed with a subsequent coefficient-channel map. Both transformations keep the nonlinearity in its original position.

Backward. The energy derivative arriving at UU is Uˉ=∂Eθ/∂U\bar{U} = \partial E_{\theta}/\partial U. Propagating it to the coefficients gives

Xˉ(ℓ)=GℓT(UˉAT)WℓT=(GℓTUˉ)BℓT.(30)\bar{X}^{(\ell)} = G_{\ell}^{\mathsf{T}}\left(\bar{U}A^{\mathsf{T}}\right)W_{\ell}^{\mathsf{T}} = \left(G_{\ell}^{\mathsf{T}}\bar{U}\right)B_{\ell}^{\mathsf{T}}. \tag*{(30)}

The original order constructs UˉAT\bar{U}A^{\mathsf{T}} on the grid. The reordered path first returns Uˉ\bar{U} to coefficient space and then applies BℓTB_{\ell}^{\mathsf{T}}, avoiding the ng×Chn_g \times C_h derivative intermediate. The result continues to the preceding node features.

Double backward. Let Pℓ=∂L/∂Xˉ(ℓ)P_{\ell} = \partial\mathcal{L}/\partial\bar{X}^{(\ell)} be the incoming loss gradient along this feature path. Differentiating Equation (30) contributes

∂L∂Uˉ=∑ℓGℓ(PℓBℓ).(31)\frac{\partial\mathcal{L}}{\partial\bar{U}} = \sum_{\ell} G_{\ell}\left(P_{\ell}B_{\ell}\right). \tag*{(31)}

Each PℓP_{\ell} is transformed in coefficient space and then expanded to the grid, following the reordered forward sequence. This again avoids an ng×Chn_g \times C_h intermediate. The resulting gradient continues through the computation of Uˉ\bar{U}, including the derivative of the nonlinearity.

Gradients of the channel maps. Loss backpropagation also reaches BℓB_\ell through its uses in forward and backward. For the local computation above, the two contributions are

∂L∂Bℓ=(X(ℓ))⊤Gℓ∂L∂U+Pℓ⊤GℓUˉ.(32)\frac{\partial\mathcal{L}}{\partial B_\ell} = (X^{(\ell)})^\top G_\ell\frac{\partial\mathcal{L}}{\partial U} + P_\ell^\top G_\ell\bar{U}. \tag*{(32)}

The first term differentiates the forward map and the second differentiates the coefficient-gradient computation. Their contributions to the original parameters follow by the chain rule:

∂L∂Wℓ=∂L∂BℓA⊤,∂L∂A=∑ℓWℓ⊤∂L∂Bℓ.(33)\frac{\partial\mathcal{L}}{\partial W_\ell} = \frac{\partial\mathcal{L}}{\partial B_\ell} A^\top,\qquad\frac{\partial\mathcal{L}}{\partial A} = \sum_\ell W_\ell^\top\frac{\partial\mathcal{L}}{\partial B_\ell}. \tag*{(33)}

The node dimension remains independent in all these computations. Feature derivatives return to the same atom, while shared channel-map gradients are summed over atoms.

Storage and I/O counts

The separate-operation schedule stores the output of each transformation before the next operation reads it. We count these allocations individually, including the copies introduced by changes between degree and order layouts. The node input, node output, and the four GEMM input and output matrices are common to both schedules and are excluded from the eliminated intermediates. We count one logical write and one logical read for each eliminated array. Cache hits and repeated operand loads within a kernel are outside this count.

Full-order layouts. Let C0,C1,C2,C3C_0, C_1, C_2, C_3 denote the channel widths at the convolution input, activation input, activation output, and convolution output, respectively. For M=LM=L, the eliminated arrays have the following sizes:

Node→Edge:EdC0⏟gathered+EdC0⏟rotated before layout conversion,Edge→Edge:EdC1⏟recombined+EdC1⏟activation input layout+EdC2⏟activation output layout,Edge→Node:EdC3⏟recombined+EdC3⏟local message layout+EdC3⏟global messages.(34)\begin{aligned} \text{Node} \to\text{Edge}:&\quad\underbrace{EdC_0}_{\text{gathered}} + \underbrace{EdC_0}_{\text{rotated before layout conversion}},\\ \text{Edge} \to\text{Edge}:&\quad\underbrace{EdC_1}_{\text{recombined}} + \underbrace{EdC_1}_{\text{activation input layout}} + \underbrace{EdC_2}_{\text{activation output layout}},\\ \text{Edge} \to\text{Node}:&\quad\underbrace{EdC_3}_{\text{recombined}} + \underbrace{EdC_3}_{\text{local message layout}} + \underbrace{EdC_3}_{\text{global messages}}. \tag*{(34)} \end{aligned}

The first row contains the gathered node features and the rotated coefficients before they are written in the first GEMM’s input layout. In the second row, recombination writes one array, its conversion to the activation input layout writes another, and activation writes a third before conversion to the next GEMM layout. The final row contains the second layer’s recombination output, its conversion to the local message layout, and the global messages before aggregation. The four layout copies are thus accounted for once, rather than added again to the eight intermediate allocations.

Writing and reading these arrays gives

Beliminated=2bEd(2C0+2C1+C2+3C3).(35)B_{\mathrm{eliminated}} = 2bEd(2C_0 + 2C_1 + C_2 + 3C_3). \tag*{(35)}

At equal widths this becomes 16bEdC16bEdC. For E=32,768E = 32{,}768, L=M=4L = M = 4, C=128C = 128, and FP32, this equals 6.25 GiB of logical feature accesses per convolution. The sum of allocated intermediate elements is 8EdC8EdC.

Retained-order layouts. For M<LM < L, the number of retained angular components is qL,Mq_{L,M} in Equation (16). Gathered node features and global messages still have dd angular components. If all local-frame intermediate layouts store only the retained coefficients, the six local arrays use qL,Mq_{L,M} in place of dd, giving

Beliminated=2bE[d(C0+C3)+qL,M(C0+2C1+C2+2C3)].(36)B_{\mathrm{eliminated}} = 2bE\left[d(C_0 + C_3) + q_{L,M}(C_0 + 2C_1 + C_2 + 2C_3)\right]. \tag*{(36)}

This count assumes that the activation consumes and produces retained-order features. If an intermediate instead uses a full degree layout with zero entries for omitted orders, its term uses dd. This substitution accounts for the representation actually stored without changing the list of eliminated arrays.

Training state and reconstruction. For rotation on gather, node features occupy NdC0NdC_0 elements, whereas their gathered copies occupy EdC0EdC_0. Keeping the node features and edge indices suffices to regenerate the gathered values, removing the need to retain an additional EdC0EdC_0-element copy. Each reconstruction replaces a read of that copy with indexed node-feature reads and local computation. Rotations are retained in the compact blocks described in Section B.1, whose storage is EKL,MEK_{L,M} elements instead of Ed2Ed^2 for dense matrices.

The feature-gradient paths in Equations (4) and (5) admit the same local treatment. With all orders retained, separately gathering a node gradient before rotation or separately rotating edge contributions before reduction produces an EdCEdC-element array. Combining these operations avoids its allocation and one write–read pair, or 2bEdC2bEdC logical bytes for that intermediate.

Experimental Details and Additional Results

Experimental setup

Models and training data. We evaluate eSEN [11], UMA (Wood et al., 2026), and EquiformerV3 [19] on OMat24 [1], using their official OMat24 architectures and training settings. Table 2 and Table 3 list the hyperparameters used in our experiments, following the officially released configurations. We use eSEN-30M-OMat, UMA-S-1.2, and the L=4L = 4 EquiformerV3 configuration. Trainable parameters are randomly initialized according to each model’s initialization rules. Official checkpoints provide the fixed hyperparameters and non-trainable quantities, including reference energies, and are used to verify architecture consistency. The training objective includes energy, forces, and stresses, with forces and stresses obtained by differentiating the predicted energy.

HyperparametereSENUMAEquiformerV3
Number of layer blocks1047
Maximum degree LL324
Maximum order MM222
Number of channels CC128128128
FFN hidden channels128128512
Radial hidden channels128128128
Number of radial basis functions643264
Cutoff radius (Å)666
Maximum number of neighbors300300300
Number of linear experts—64—
Number of attention heads——8
Attention hidden channels——32
Attention weight channels——64
Value channels per head——16
ActivationGatedGatedSwiGLU-S2^{2}

Table 2. Architecture hyperparameters of the evaluated official models.

HyperparametereSENUMAEquiformerV3
Batch size per GPU8 structuresAt most 700 atoms16 structures
OptimizerAdamWAdamWAdamW
Maximum learning rate3×10−43 \times10^{-4}4×10−44 \times10^{-4}10−410^{-4}
Adam (β1,β2\beta_{1}, \beta_{2})(0.9, 0.999)(0.9, 0.999)(0.9, 0.98)
Adam ϵ\epsilon10−810^{-8}10−810^{-8}10−610^{-6}
Weight decay10−310^{-3}10−310^{-3}10−310^{-3}
Learning-rate schedulingCosineCosineCosine
Schedule horizon2 epochs10610^{6} steps2 epochs
Warmup steps12,62316,311
Warmup factor0.20.20
Minimum learning-rate factor0.050.010.01
Gradient clipping norm100100100
Model EMA decay0.9990.9990.999
Energy loss coefficient201520
Force loss coefficient20520
Stress loss coefficient515
PrecisionFP32FP32FP32

Table 3. Training hyperparameters shared by PyTorch and TrimSO(2).

Implementation. Our custom operators are implemented in Triton and exposed through PyTorch interfaces supporting backward and double backward. Dense matrix products use PyTorch’s GPU matrix-multiplication routines. For Node →\to Edge, all three models combine gathering, rotation, and radial scaling into the input layout of the first SO(2)SO(2) linear layer. For Edge →\to Edge, eSEN and UMA combine recombination with gated activation, while EquiformerV3 uses its spherical-grid activation. UMA additionally uses system-dependent mixtures of linear experts for its edge projections. For Edge →\to Node, eSEN and UMA sum messages with their cutoff envelopes, while EquiformerV3 applies attention weights before aggregation. Each path incorporates inverse rotation into the reduction. For Node →\to Node, eSEN and UMA fuse operations around their coefficient-space gated FFNs, including normalization and residual updates. EquiformerV3 uses spherical-grid FFNs, whose linear maps are reordered and composed to reduce intermediate expansion. These adaptations preserve each model’s activation and weighting rules.

Hardware and software. PyTorch denotes the official implementation in model experiments and local PyTorch operations following the official operation order and layouts in operator experiments. TrimSO(2) replaces the corresponding computations within the same training pipeline. Each pair shares its initialization, batch sequence, optimizer, exponential moving average (EMA), and learning-rate schedule. All comparisons use a single A100 80GB or H100 80GB GPU in FP32, with TF32 and mixed precision disabled. Table 4 gives the upstream revisions and software versions used for each model.

ModelOfficial revisionPyTorchTriton
eSENfairchem, 977a80322.11.0+cu1263.6.0
UMAfairchem, 802979b92.8.0+cu1283.4.0
EquiformerV3EquiformerV3, a7300c582.7.1+cu1183.3.1

Table 4. Software versions for the official implementations.

Baselines. Our model-level baselines follow the official configurations for training on energy-derived forces, which do not enable torch.compile. Such training requires differentiating through the force computation, but PyTorch’s AOTAutograd does not support double backward through the backward graph it generates (PyTorch issue #91469). NequIP and Allegro address this limitation by tracing the force computation into the forward graph before compilation (Tan et al., 2026). The official implementations used here do not take this route: EquiformerV3 enables compilation for direct-force training but disables it in its official gradient-force configuration on OMat24, UMA compiles only in its inference path, and eSEN trains without compilation. A limitation is the absence of a compiled baseline using NequIP-style tracing. Such a baseline would require model-specific reimplementations beyond the scope of this work, and could be combined with TrimSO(2).

End-to-end performance

Training time and peak memory. We measure the complete training loop, including data loading, device transfers, graph construction, energy and force/stress evaluation, loss backpropagation, gradient clipping, optimizer updates, EMA, and learning-rate updates. After warmup, each run measures 100 consecutive steps, with synchronization only at the beginning and end of the interval. Dividing the elapsed time by 100 gives the average step time for that run. Table 5 reports the mean of these averages, using three independent runs for both implementations.

GPUModelTime (ms/step) PyTorchTime (ms/step) TrimSO(2)Memory (GiB) PyTorchMemory (GiB) TrimSO(2)SpeedupMemory reduction
A100eSEN653.55315.0534.6217.662.07×1.96×
A100UMA1077.19366.4927.0417.672.94×1.53×
A100EquiformerV31249.30441.9070.9822.482.83×3.16×
H100eSEN370.71172.1734.6617.712.15×1.96×
H100UMA629.05244.8627.0917.712.57×1.53×
H100EquiformerV3606.86246.3871.0222.522.46×3.15×

Table 5. End-to-end training time and peak allocated memory. Time aggregates three independent runs. Memory is the largest peak across these runs. Speedup and memory reduction are relative to PyTorch.

Each implementation runs in a separate process. After warmup, we release temporary outputs and computation graphs, synchronize, and reset the peak-memory counter before the measured interval. Peak allocated memory includes model parameters, inputs, optimizer states, and live temporary tensors, but excludes unused allocator cache. We report the largest peak across the three runs. At the same batch sizes, TrimSO(2) lowers both step time and peak memory for all three models on both GPUs, yielding the 2.07–2.94× speedups and 1.53–3.16× memory reductions in Figure 3.

Table 5: End-to-end training time and peak allocated memory. Time aggregates three independent runs. Memory is the largest peak across these runs. Speedup and memory reduction are relative to PyTorch.

HBM traffic. For each model, we profile one fixed batch from the shared initial state with Nsight Compute. The capture covers energy evaluation, force/stress differentiation, and loss backpropagation. We sum the DRAM read and write counters over all kernels in this interval to obtain HBM traffic. Data preparation and optimizer updates are outside this capture. CUDA Graph is disabled, and segmented captures are combined only after matching their kernel sequence to an unsegmented trace. All timing results come from separate, uninstrumented runs.

Table 6 gives the absolute traffic underlying Figure 3. 3.81–9.88× reductions in HBM traffic accompany the training-time and memory benefits across the three models. Reduction factors in the figure and tables are the PyTorch measurement divided by the corresponding optimized measurement for the same model and GPU.

GPUModelPyTorchTrimSO(2)Reduction (×)
A100eSEN160.2937.844.24×
A100UMA1071.02108.379.88×
A100EquiformerV3913.75198.594.60×
H100eSEN153.2340.183.81×
H100UMA1066.33108.569.82×
H100EquiformerV31019.30237.194.30×

Table 6. Total HBM reads and writes during energy evaluation, force/stress differentiation, and loss backpropagation for one batch. Traffic is in GiB, and reductions are relative to PyTorch.

Table 6: Total HBM reads and writes during energy evaluation, force/stress differentiation, and loss backpropagation for one batch. Traffic is in GiB, and reductions are relative to PyTorch.

Ablation study

We start from PyTorch and successively enable Node →\to Edge, Edge →\to Edge, and Edge →\to Node optimizations. The final stage adds Node →\to Node optimizations to obtain full TrimSO(2). Each stage retains the preceding optimizations and uses the same initialization, batch sequence, and training settings. Timing and memory follow the protocol above. The PyTorch and full TrimSO(2) rows reuse Table 5, so the endpoints are identical to the end-to-end comparison.

Table 7 provides the absolute measurements behind the A100 results in Figure 4 and the corresponding H100 results. On A100, the three edge stages together give 1.82–2.80× training speedups and 1.52–2.24× reductions in peak memory before the final node optimizations are added. Peak memory decreases at every stage on both GPUs. These measurements show how the reductions accumulate within the same model and training workload.

ModelCumulative stageTimeMemorySpeedupMemory reduction
eSENPyTorch653.5534.62
eSEN+Node→Edge+\mathrm{Node} \to\mathrm{Edge}499.0827.101.31×1.28×
eSEN+Edge→Edge+\mathrm{Edge} \to\mathrm{Edge}406.1422.761.61×1.52×
eSEN+Edge→Node+\mathrm{Edge} \to\mathrm{Node}330.6717.921.98×1.93×
eSENTrimSO(2)315.0517.662.07×1.96×
UMAPyTorch1077.1927.04
UMA+Node→Edge+\mathrm{Node} \to\mathrm{Edge}1007.4622.551.07×1.20×
UMA+Edge→Edge+\mathrm{Edge} \to\mathrm{Edge}417.0418.842.58×1.44×
UMA+Edge→Node+\mathrm{Edge} \to\mathrm{Node}384.5517.822.80×1.52×
UMATrimSO(2)366.4917.672.94×1.53×
EquiformerV3PyTorch1249.3070.98
EquiformerV3+Node→Edge+\mathrm{Node} \to\mathrm{Edge}976.1649.701.28×1.43×
EquiformerV3+Edge→Edge+\mathrm{Edge} \to\mathrm{Edge}797.5037.721.57×1.88×
EquiformerV3+Edge→Node+\mathrm{Edge} \to\mathrm{Node}686.1631.631.82×2.24×
EquiformerV3TrimSO(2)441.9022.482.83×3.16×
eSENPyTorch370.7134.66
eSEN+Node→Edge+\mathrm{Node} \to\mathrm{Edge}289.9227.151.28×1.28×
eSEN+Edge→Edge+\mathrm{Edge} \to\mathrm{Edge}265.1722.801.40×1.52×
eSEN+Edge→Node+\mathrm{Edge} \to\mathrm{Node}196.7617.971.88×1.93×
eSENTrimSO(2)172.1717.712.15×1.96×
UMAPyTorch629.0527.09
UMA+Node→Edge+\mathrm{Node} \to\mathrm{Edge}600.9122.591.05×1.20×
UMA+Edge→Edge+\mathrm{Edge} \to\mathrm{Edge}326.1718.891.93×1.43×
UMA+Edge→Node+\mathrm{Edge} \to\mathrm{Node}238.3717.862.64×1.52×
UMATrimSO(2)244.8617.712.57×1.53×
EquiformerV3PyTorch606.8671.02
EquiformerV3+Node→Edge+\mathrm{Node} \to\mathrm{Edge}487.9649.741.24×1.43×
EquiformerV3+Edge→Edge+\mathrm{Edge} \to\mathrm{Edge}376.8837.771.61×1.88×
EquiformerV3+Edge→Node+\mathrm{Edge} \to\mathrm{Node}346.7931.671.75×2.24×
EquiformerV3TrimSO(2)246.3822.522.46×3.15×

Table 7. Training results as optimizations are added cumulatively. Time is in ms/step and memory is in GiB. Speedup and peak-memory reduction are relative to PyTorch for the same model and GPU.

Operator performance

Workloads and measurement

The three operator boundaries isolate the dataflows around the dense matrix products. Node →\to Edge includes indexed node reads, rotation, edge-coefficient application, and generation of the GEMM input layout. Edge →\to Edge begins at the first GEMM’s output and includes recombination, activation, and layout conversion. Edge →\to Node begins at the second GEMM’s output and includes recombination, inverse rotation, and aggregation at receiving nodes.

The stage-wise measurements use inputs captured from an EquiformerV3 training batch with L/M/C=4/2/128L/M/C = 4/2/128, N=399N = 399, and E=17,940E = 17{,}940. Both implementations receive the same captured inputs and differentiation directions. The PyTorch reference reproduces the official operation order and layouts at each boundary.

We measure forward, backward, and double backward separately. Forward computes the outputs and retains the state needed for differentiation. Backward computes derivatives with respect to differentiable boundary inputs, including captured parameter-dependent tensors, and retains the graph needed for double backward. Double backward differentiates these first derivatives with respect to the boundary inputs and incoming output gradients, using shared differentiation directions. Each timed stage starts with its prerequisite computations and graphs already prepared. After warmup, we take 30 CUDA-event measurements per stage and report their mean. Required layout generation and storage are included in the measured computation.

Table 8 supplements Figure 5(a) with absolute latencies and H100 measurements. All three operators are faster than PyTorch in forward, backward, and double backward on both GPUs. The gains therefore cover the computations needed for training, including its higher-order derivatives.

DataflowStageA100 PyTorchA100 TrimSO(2)A100 SpeedupH100 PyTorchH100 TrimSO(2)H100 Speedup
N→EN \to EForward6.4670.38616.73×2.8980.22612.83×
Backward17.6442.6206.73×5.3461.1354.71×
Double backward31.9084.4067.24×12.1181.7996.74×
E→EE \to EForward1.8510.6842.71×1.2660.4043.14×
Backward6.1841.0515.88×3.6380.6395.69×
Double backward11.7701.8036.53×7.0411.0156.94×
E→NE \to NForward2.5130.3766.69×1.1880.2414.93×
Backward9.0990.9709.38×2.7060.9172.95×
Double backward16.3682.9105.62×6.4541.8403.51×

Table 8. Operator latency (ms) and speedup. Each stage is measured separately. Speedups compare PyTorch and TrimSO(2) on the same GPU. Dataflow labels abbreviate nodes and edges as N and E.

Configuration and graph size

The synthetic sweep uses the same operator paths and PyTorch computation structure as the captured-input comparison. Its central configuration is L/M/C=4/2/128L/M/C = 4/2/128, N=512N = 512, and K=64K = 64 outgoing edges per node, giving E=NK=32,768E = NK = 32{,}768. Each node selects KK distinct targets uniformly from the other nodes. Both implementations share the generated graph, input tensors, and differentiation directions.

Table 9 varies LL, MM, and CC at fixed NN and KK. Table 10 varies NN and KK at fixed L/M/CL/M/C. Each configuration changes one factor, and the two tables reuse the same central measurements. These synthetic central measurements are distinct from the captured-input workload in Table 8. The reported double-backward speedups range from 2.34× to 11.06× across the two GPUs.

L/M/CL/M/CDataflowA100 PyTorchA100 TrimSO(2)A100 SpeedupH100 PyTorchH100 TrimSO(2)H100 Speedup
4/2/128N→EN \to E58.3868.4996.87×21.9943.2976.67×
4/2/128E→EE \to E31.4355.0066.28×18.5872.6297.07×
4/2/128E→NE \to N29.4155.0885.78×11.3003.0983.65×
2/2/128N→EN \to E17.0903.0175.67×8.6381.2846.72×
2/2/128E→EE \to E27.5492.49011.06×17.6161.62010.87×
2/2/128E→NE \to N10.7792.0695.21×5.8651.2714.61×
3/2/128N→EN \to E26.0775.3614.86×13.3212.1276.26×
3/2/128E→EE \to E29.3423.8677.59×18.0342.2528.01×
3/2/128E→NE \to N16.7713.4544.86×8.3282.0074.15×
5/2/128N→EN \to E75.66913.8515.46×32.7835.2506.24×
5/2/128E→EE \to E33.1196.3195.24×20.5094.3184.75×
5/2/128E→NE \to N34.7277.1174.88×15.1764.1443.66×
6/2/128N→EN \to E96.75219.5584.95×43.5197.3065.96×
6/2/128E→EE \to E35.55210.6733.33×21.7736.9683.12×
6/2/128E→NE \to N41.12910.0204.10×18.6265.4933.39×
4/1/128N→EN \to E52.8426.2338.48×21.3892.5338.44×
4/1/128E→EE \to E28.2353.3578.41×17.3722.1438.11×
L/M/CL/M/CDataflowA100 PyTorchA100 TrimSO(2)A100 SpeedupH100 PyTorchH100 TrimSO(2)H100 Speedup
4/1/128E → N16.5473.1005.34×7.6351.9163.98×
4/3/128N → E58.96510.3555.69×22.3513.7595.95×
4/3/128E → E34.0185.7795.89×20.9733.7605.58×
4/3/128E → N34.6776.1645.63×14.3993.6343.96×
4/4/128N → E59.91711.2515.33×22.6464.0455.60×
4/4/128E → E36.4307.3694.94×22.2934.7924.65×
4/4/128E → N39.3126.7525.82×16.7443.9364.25×
4/2/64N → E29.2334.7626.14×11.0641.9575.65×
4/2/64E → E16.3502.8935.65×10.1072.0085.03×
4/2/64E → N18.3732.7076.79×6.0181.6383.67×
4/2/256N → E117.14516.7806.98×43.6156.0357.23×
4/2/256E → E63.04410.0326.28×38.3826.1666.23×
4/2/256E → N57.6749.8395.86×21.6605.9473.64×

Table 9. Double-backward latency (ms) and speedup across model dimensions, with N=512N = 512 and K=64K = 64. N and E in dataflow labels denote nodes and edges.

N/KN/KDataflowA100 PyTorchA100 TrimSO(2)A100 SpeedupH100 PyTorchH100 TrimSO(2)H100 Speedup
512/64N → E58.3868.4996.87×21.9943.2976.67×
512/64E → E31.4355.0066.28×18.5872.6297.07×
512/64E → N29.4155.0885.78×11.3003.0983.65×
128/64N → E14.6122.0976.97×5.6250.8416.69×
128/64E → E8.1221.3416.06×5.1320.9075.66×
128/64E → N7.7471.4315.42×3.1611.3532.34×
256/64N → E29.1084.1916.94×11.0831.6706.64×
256/64E → E15.9602.5596.24×9.9561.6695.96×
256/64E → N14.9782.6855.58×5.9311.6083.69×
1,024/64N → E117.97217.4976.74×43.9746.5876.68×
1,024/64E → E62.80810.0656.24×38.4856.1696.24×
1,024/64E → N58.4529.9025.90×22.1666.0153.69×
2,048/64N → E238.39335.7666.67×88.24113.5416.52×
2,048/64E → E125.77020.1806.23×76.77912.1506.32×
2,048/64E → N116.59619.6305.94×43.85211.8303.71×
4,096/64E → E248.26640.4256.14×146.69919.8117.40×
4,096/64E → N234.98639.5705.94×87.40923.4303.73×
512/16N → E14.6602.1696.76×5.6360.8696.48×
512/16E → E8.1031.3346.07×4.8910.7706.35×
512/16E → N7.7541.3845.60×3.1781.2572.53×
512/32N → E29.1584.2846.81×11.0721.6726.62×
512/32E → E15.9332.5556.23×9.4821.3986.78×
512/32E → N14.9982.6165.73×5.9501.6473.61×
512/128N → E117.76817.5686.70×43.8846.5536.70×
512/128E → E62.7049.9796.28×36.7655.1247.18×
512/128E → N58.38310.1345.76×22.1666.0673.65×

Table 11.

Numerical accuracy

Operator outputs and derivatives

We compare the two implementations on the captured inputs used for stage-wise operator timing, with identical inputs and differentiation directions. Relative L2L_2 error is the norm of the difference divided by the norm of the PyTorch reference. For outputs or derivatives containing multiple tensors, squared differences and squared reference values are summed across the tensors before taking the ratio of their square roots. Table 11 gives the errors for forward, backward, and double backward. Relative L2L_{2} errors are at most 2.77×10−72.77 \times10^{-7}, showing close agreement throughout the three computation stages.

GPUDataflowForwardBackwardDouble backward
A100Edge →\to Edge4.33e-091.96e-081.09e-07
A100Edge →\to Node2.76e-071.60e-072.06e-07
A100Node →\to Edge4.57e-091.43e-071.98e-07
H100Edge →\to Edge4.33e-091.96e-081.09e-07
H100Edge →\to Node2.75e-071.59e-072.08e-07
H100Node →\to Edge4.57e-091.42e-071.98e-07

Table 11 (PDF p. 27). Relative L2L_{2} errors in operator outputs and derivatives on the captured training inputs.

Model outputs and parameter gradients

For each model and GPU, we compare one shared random initialization on a fixed batch of the size in Table 3. We hold the graph and weights fixed and compare energy, forces, stresses, and gradients of the energy–force–stress loss with respect to all trainable parameters. Parameter-gradient error is aggregated across parameters using the same relative L2L_{2} definition. This comparison includes differentiation through atomic positions and the mixed second derivatives needed to train on forces and stresses.

Table 12 shows that the local agreement carries through to complete models. Output errors are at most 1.47×10−61.47 \times10^{-6}, and parameter-gradient errors are at most 8.36×10−78.36 \times10^{-7} across all three models and both GPUs.

GPUModelEnergyForcesStressParameter gradients
A100eSEN1.95e-079.89e-079.92e-076.80e-07
A100UMA6.66e-086.09e-074.90e-074.12e-07
A100EquiformerV31.24e-077.14e-071.19e-063.98e-07
H100eSEN2.25e-079.54e-071.12e-068.36e-07
H100UMA1.05e-076.20e-074.46e-074.19e-07
H100EquiformerV31.68e-077.80e-071.46e-064.10e-07

Table 12. Relative L2L_{2} errors in model outputs and loss gradients at a shared random initialization.

Short training trajectories

We next compare 100 consecutive training steps for all three models on both GPUs, starting from shared initial parameters and following the same batch sequence, optimizer, EMA, and learning-rate schedule. Figure 6(a) plots the losses without smoothing. Table 13 complements those trajectories with the final parameters, optimizer state, and EMA, as well as the parameter updates relative to initialization.

GPUModelParametersUpdatesOptimizer stateEMA
A100eSEN3.13e-071.70e-051.51e-083.16e-08
A100UMA3.39e-062.50e-054.34e-091.49e-07
A100EquiformerV35.05e-091.16e-051.64e-088.77e-10
H100eSEN2.92e-071.59e-051.51e-082.98e-08
H100UMA4.53e-063.34e-056.28e-091.54e-07
GPUModelParametersUpdatesOptimizer stateEMA
H100EquiformerV35.15e-091.18e-051.57e-088.92e-10

Table 13. Relative L2L_{2} differences in training states after 100 steps.

For the update comparison, we subtract the initial parameters from each implementation’s final parameters and normalize their difference by the norm of the PyTorch updates. This measures agreement in the updates themselves without letting the scale of the initial parameters dominate the denominator. Relative update differences are at most 3.35×10−53.35 \times10^{-5}, and final parameter differences are at most 4.54×10−64.54 \times10^{-6}. The training-state comparisons thus support the closely aligned loss trajectories across the three models.

Long training trajectories

To examine agreement beyond the 100-step comparison, we train eSEN for 40,000 steps on each GPU, using one run per implementation, FP32, and eight structures per batch. Each pair shares its initial state and batch sequence. Figure 6(b) shows non-overlapping 200-step loss means and enlarges the final 10,000 steps. Table 14 reports the initial loss before the first parameter update and the final loss averaged over steps 35,001–40,000.

GPUImplementationInitial lossFinal lossTimeMemorySpeedupMemory reduction
A100PyTorch19.50211.55847.0858.21
A100TrimSO(2)19.50211.54193.4429.542.06×1.97×
H100PyTorch19.50211.52824.5658.25
H100TrimSO(2)19.50211.53872.3429.591.95×1.97×

Table 14. Loss, training time, and peak allocated memory for 40,000 eSEN steps. Final loss is the mean over the last 5,000 steps. Time is in hours and memory is in GiB.

Training time covers the full 40,000-step loop, including per-step trajectory recording, but excludes initialization and final result saving. Peak allocated memory is measured over all 40,000 steps. The longer run encounters larger samples, leading to higher peak memory than the short benchmark. Nevertheless, the approximately 1.97× memory reduction remains consistent with the short-run reduction of approximately 1.96×. The final losses remain close on both GPUs, consistent with the trajectories in Figure 6(b). The final-loss differences between TrimSO(2) and PyTorch are 1.06% on A100 and 0.69% on H100, both smaller than the approximately 2% difference between the PyTorch runs on the two GPUs (1.5584 versus 1.5282). Over these same long runs, TrimSO(2) achieves 2.06× and 1.95× training speedups on A100 and H100, with 1.97× and 1.97× reductions in peak memory, respectively. The long comparison therefore retains both numerical agreement and the training-efficiency benefits.

References

  1. [1]Luis Barros-Luque, Muhammed Shuaibi, Xiang Fu, Brandon M Wood, Misko Dzamba, Meng Gao, Ammar Rizvi, Matt Uyttendaele, C Lawrence Zintick, and Zachary W Ulissi. The Open Materials 2024 (OMat24) inorganic materials dataset and models. Nature Computational Science, pp. 1–11, 2026.
  2. [2]Ilyes Batatia, David P Kovacs, Gregor Simm, Christoph Ortner, and Gábor Csányi. MACE: Higher order equivariant message passing neural networks for fast and accurate force fields. Advances in neural information processing systems, 35:11423–11436, 2022.
  3. [3]Simon Batzner, Albert Musaelian, Lixin Sun, Mario Geiger, Jonathan P Mailoa, Mordechai Kornbluth, Nicola Molinari, Tess E Smidt, and Boris Kozinsky. E (3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials. Nature communications, 13(1):2453, 2022.DOI
  4. [4]Vivek Bharadwaj, Austin Glover, Aydin Buluç, and James Demmel. An efficient sparse kernel generator for O (3)-equivariant deep networks. In 2025 Proceedings of the Conference on Applied and Computational Discrete Algorithms (ACDA), pp. 32–46. SIAM, 2025.
  5. [5]Benjamin Charlier, Jean Fedy, Joan Alexis Glaunes, François-David Collin, and Ghislain Durif. Kernel operations on the GPU, with autodiff, without memory overflows. Journal of Machine Learning Research, 22(74):1–6, 2021.
  6. [7]Tri Dao. Flashattention-2: Faster attention with better parallelism and work partitioning. In International Conference on Learning Representations, volume 2024, pp. 35549–35562, 2024.arxiv.org/abs/2307.08691
  7. [8]Tri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. Flashattention: Fast and memory-efficient exact attention with io-awareness. Advances in neural information processing systems, 35:16344–16359, 2022.arxiv.org/abs/2205.14135
  8. [9]Thorben Frank, Oliver Unke, and Klaus-Robert Müller. So3krates: Equivariant attention for interactions on arbitrary length-scales in molecular systems. Advances in Neural Information Processing Systems, 35:29400–29413, 2022.arxiv.org/abs/2205.14276
  9. [10]Dan Fu, Hermann Kumbong, Eric Nguyen, and Christopher Ré. Flashfftconv: Efficient convolutions for long sequences with tensor cores. In International Conference on Learning Representations, volume 2024, pp. 9455–9483, 2024.arxiv.org/abs/2311.05908
  10. [11]Xiang Fu, Brandon M Wood, Luis Barroso-Luque, Daniel S. Levine, Meng Gao, Misko Dzamba, and C. Lawrence Zitnick. Learning Smooth and Expressive Interatomic Potentials for Molecular Property Prediction. In Forty-second International Conference on Machine Learning, 2025. URL https://openreview.net/forum?id=R0PBJxIbqm.arxiv.org/abs/2502.12147
  11. [12]Mario Geiger and Tess Smidt. e3nn: Euclidean neural networks. arXiv preprint arXiv:2207.09453, 2022.arxiv.org/abs/2207.09453
  12. [13]Lin Huang, Chengxiang Huang, Ziang Wang, Yiyue Du, Chu Wang, Haocheng Lu, Yunyang Li, Xiaoli Liu, Arthur Jiang, and Jia Zhang. E2Former-V2: On-the-Fly Equivariant Attention with Linear Activation Memory. In Forty-third International Conference on Machine Learning, 2026. URL https://openreview.net/forum?id=gIUVdEAa3l.arxiv.org/abs/2601.16622
  13. [14]Seung Yul Lee, Hojoon Kim, Yutack Park, Dawoon Jeong, Seungwu Han, Yeonhong Park, and Jae W Lee. FlashTP: Fused, Sparsity-Aware Tensor Product for Machine Learning Interatomic Potentials. In ICML, 2025.
  14. [15]Tiancheng Li, Wentao Li, Anyang Peng, Jianming Xue, Linfeng Zhang, Duo Zhang, and Han Wang. DPA4: Pushing the Accuracy-Cost Frontier of Interatomic Potentials with EMFA SO (2) Convolution. arXiv preprint arXiv:2606.02419, 2026a.arxiv.org/abs/2606.02419
  15. [16]Yunyang Li, Lin Huang, Zhihao Ding, Xinran Wei, Chu Wang, Han Yang, Zun Wang, Chang Liu, Yu Shi, Peiran Jin, et al. E2Former: An efficient and equivariant transformer with linear-scaling tensor products. Advances in Neural Information Processing Systems, 38:23593–23630, 2026b.arxiv.org/abs/2501.19216
  16. [17]Yi-Lun Liao and Tess Smidt. Equiformer: Equivariant Graph Attention Transformer for 3D Atomistic Graphs. In The Eleventh International Conference on Learning Representations, 2023. URL https://openreview.net/forum?id=KwmPfARgOTD.arxiv.org/abs/2206.11990
  17. [18]Yi-Lun Liao, Brandon Wood, Abhishek Das, and Tess Smidt. Equiformerv2: Improved equivariant transformer for scaling to higher-degree representations. In International Conference on Learning Representations, volume 2024, pp. 39282–39309, 2024.arxiv.org/abs/2306.12059
  18. [19]Yi-Lun Liao, Alexander J Hoffman, Sabrina C Shen, Alexandre Duval, Sam Walton Norwood, and Tess Smidt. EquiformerV3: Scaling efficient, expressive, and general SE (3)-equivariant graph attention transformers. arXiv preprint arXiv:2604.09130, 2026.arxiv.org/abs/2604.09130
  19. [20]Yuchao Lin, Cong Fu, Zachary Krueger, Haiyang Yu, Maho Nakata, Jianwen Xie, Emine Kucukbenli, Xiaofeng Qian, and Shuiwang Ji. Tensor Decomposition Networks for Fast Machine Learning Interatomic Potential Computations. Advances in Neural Information Processing Systems, 38:88471–88495, 2026.arxiv.org/abs/2507.01131
  20. [21]Shengjie Luo, Tianlang Chen, and Aditi Krishnapriyan. Enabling efficient equivariant operations in the fourier basis via gaunt tensor products. In International Conference on Learning Representations, volume 2024, pp. 24742–24777, 2024.arxiv.org/abs/2401.10216
  21. [22]Saro Passaro and C Lawrence Zitnick. Reducing SO (3) convolutions to SO (2) for efficient equivariant GNNs. In International conference on machine learning, pp. 27420–27438. PMLR, 2023.
  22. [23]Eric Qu and Aditi S Krishnapriyan. The importance of being scalable: Improving the speed and accuracy of neural network interatomic potentials across chemical domains. Advances in Neural Information Processing Systems, 37:139030–139053, 2024.arxiv.org/abs/2410.24169
  23. [24]Jay Shah, Ganesh Bikshandi, Ying Zhang, Vijay Thakkar, Pradeep Ramani, and Tri Dao. Flashattention-3: Fast and accurate attention with asynchrony and low-precision. Advances in Neural Information Processing Systems, 37:68658–68685, 2024.arxiv.org/abs/2407.08608

Paper details

vlnc:W_edywcmnt
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 0

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

generative AI tools

View statement
Looking for related papers…
Contents