betaFeedback

WorksPhysics and Astronomy

U-HamGNN: a universal model for magnetic Hamiltonians conditioned on spin and Hubbard U

Abstract

The electronic structure of a magnetic crystal depends jointly on its spin configuration and the on-site Hubbard correction U, requiring a separate DFT+U calculation for each combination. We introduce U-HamGNN, an equivariant network that takes these two inputs directly and predicts spin-resolved Hamiltonians across diverse crystal chemistries. A spectral-hybrid optimizer that weights each update direction by how consistently the gradient points along it reaches 8% lower Hamiltonian error than Muon and 26% lower than AdamW in a ten-epoch benchmark. The predicted bands reproduce U-dependent gap opening and altermagnetic spin splitting within the trained window and beyond it; exchange couplings and magnetic-order calls derived from the Hamiltonian agree with DFT+U on a calibration set. This universal model provides a new tool for magnetic research.

Introduction

Magnetic materials carry the spin degrees of freedom behind permanent magnets, magnetic memory and spintronic devices. Altermagnets and magnetic semiconductors, recognized more recently, add spin-resolved electronic structures that these devices can use[1, 2, 3]. Whether a compound is an altermagnet, a half-metal or a magnetic semiconductor, and how strongly its moments couple, is decided by comparing several collinear magnetic configurations of the same crystal. The calculation of each configuration also depends on the on-site Hubbard correction UU that density functional theory plus UU (DFT+UU) applies to partially filled dd and ff shells. Its value shifts gaps and moments and can reorder the magnetic states[4, 5, 6, 7], and since experiment does not fix it, UU has to be scanned. The electronic structure of one magnetic material is therefore a function of its magnetic state and of UU. A high-throughput survey needs one self-consistent calculation per structure, configuration and UU value, and magnetic calculations are harder to converge than non-magnetic ones[8].

Machine learning has lowered the cost of first-principles calculations by learning their outputs directly[9]. Predicting the electronic Hamiltonian in an atomic-orbital basis is the most reusable choice: bands, spin splittings and exchange couplings then follow from it without a self-consistent cycle. Neural networks that respect the rotational symmetry of the orbitals predict such Hamiltonians within one material family with errors of a few meV[10, 11, 12, 13, 14, 15]. Universal models trained on tens of thousands of crystals now cover most of the periodic table and run without retraining on databases of predicted crystals such as GNoME[16, 17, 18].

Magnetism has entered these models only in part. xDeepH[19] and HamGNN++[20] learn how the Hamiltonian of one magnetic system depends on its spin configuration, and magnetic neural network potentials learn energies as functions of the moments[21, 22, 23, 24, 25, 26, 27]. Each is trained on one material family with a single exchange-correlation setting, in which UU is fixed. The universal Hamiltonian models are non-magnetic; our spin-orbit-coupled Uni-HamGNN extended universality to relativistic Hamiltonians and named magnetism as its next step[28]. Universal interatomic potentials carry magnetic moments only as auxiliary labels[29]. The dependence of the Hamiltonian on the magnetic configuration and its dependence on UU have each been learned for single systems, but no transferable model has learned both.

Whether one network trained across the periodic table can learn how the Hamiltonian of a magnetic crystal depends jointly on its collinear configuration and on UU has not been tested. The test is whether the band gaps, spin splittings, exchange couplings and magnetic order derived from its predicted Hamiltonian agree with self-consistent DFT+UU for the same structure, magnetic configuration and UU. Agreement on these quantities would let a magnetic search screen with the network first and run DFT+UU only on the candidates it ranks highest, instead of computing every combination.

U-HamGNN uses the equivariant architecture of Uni-HamGNN and is trained on magnetic DFT+UU data in which most structures appear at several UU values and in several magnetic states. The network therefore takes the magnetic state and UU as inputs, whereas earlier models fixed at least one of them in the training data. Each atom’s UU enters through a Gaussian embedding that vanishes at U=0U = 0, and the two spin channels are built by adding learned exchange-like couplings, weighted by the input spins, to a non-self-consistent reference Hamiltonian. At batch size one and more than a hundred thousand magnetic training examples, training is limited by the dense matrices that generate the radial weights: they hold most of the parameters, and their gradient directions drift from step to step. We therefore developed a spectral-hybrid optimizer that weights each singular direction of the update by how consistently the gradient points along it, so that persistent directions grow and noisy ones are damped. We present the architecture and training first, then test the network in four steps of increasing scope: accuracy across the periodic table on test graphs; its response to UU, by following one crystal across UU against DFT+UU; the exchange couplings and magnetic order derived from the predicted Hamiltonian, against DFT+UU on a calibration set; and DFT+UU adjudication of the GNoME antiferromagnet candidates that the model ranks highest. The model is collinear, has no spin-orbit term and is trained for UU up to 8 eV.

Results

Model architecture and training data

U-HamGNN predicts the spin-resolved DFT+U Hamiltonian of a crystal in the OpenMX atomic-orbital basis[30, 31, 32] from three inputs: the crystal graph (atoms as nodes, neighbour pairs within a cutoff as edges), a collinear spin direction si∈{+1,−1,0}s_i \in\{+1,-1,0\} on each site and the effective Hubbard interaction UiU_i on each site (Figure 1a). It uses the equivariant construction of HamGNN and Uni-HamGNN[14, 28] on e3nn irreducible representations[33, 34, 35] with OpenEquivariance kernels[36]. U enters at the input layer: each atom carries a scalar attribute that joins its element embedding to a Gaussian expansion of its own U,

Figure 1. U-HamGNN: spin and Hubbard U as model inputs. a, One crystal (MnTe) queried with our model in two collinear magnetic configurations (FM and AFM1) at three values of U; each query returns the two spin channels of the Hamiltonian, from which the bands follow by diagonalization. b, Architecture. Each atom carries a scalar attribute aia_i that joins its element embedding to a zero-centred Gaussian expansion of its U; edges carry spherical harmonics up to l=6l = 6 and a Bessel radial basis. Three equivariant convolution layers with edge updates feed two heads: a spin-independent block HnmH^{\mathrm{nm}} assembled through Clebsch–Gordan coupling and made Hermitian, and a spin head that returns a coupling JJ per pair of orbital shells and a weight matrix WW. The input spins sis_i and the non-self-consistent OpenMX reference H0H^0 enter only at the assembly step, Hσ=H0+Hnm+σΔH^\sigma= H^0 + H^{\mathrm{nm}} + \sigma\Delta with Δ=W∘∑aJasa\Delta= W \circ\sum_a J_a s_a, and band energies enter the training loss. The model is collinear and has no spin–orbit term. The elements of the training set are shown in Supplementary Fig. S6.

ai=[e(Zi); g(Ui)−g(0)],gk(U)=exp⁡[−(U−μk)2/2σU2],μk∈[0,8] eV,(1)a_i = \left[e(Z_i);\,g(U_i)-g(0)\right], \qquad g_k(U)=\exp\left[-(U-\mu_k)^2/2\sigma_U^2\right], \qquad\mu_k\in[0,8]\ \mathrm{eV}, \tag*{(1)}

with 32 evenly spaced centres μk\mu_k and a width σU=8/31≈0.26\sigma_U=8/31\approx0.26 eV equal to their spacing, so an atom without a Hubbard correction keeps the plain element embedding. Three equivariant convolution layers with edge updates produce node and edge features, and two heads read orbital blocks from them through Clebsch–Gordan coupling (Figure 1b). One head returns a spin-independent block HnmH^{\mathrm{nm}} for every site and bond. The other returns a coupling JJ per pair of orbital shells and a learned weight matrix WW; combined with the spins of the magnetic atoms M\mathcal{M}, they give a collinear term that splits the two channels, the collinear form of the magnetic parameterization of our earlier model[20] (Methods),

HXσ=HX0+HXnm+σΔX,ΔX=WX∘∑a∈M(X)JX,asa,σ=±1,(2)H^\sigma_X=H^0_X+H^{\mathrm{nm}}_X+\sigma\Delta_X,\qquad\Delta_X=W_X\circ\sum_{a\in\mathcal{M}(X)}J_{X,a}s_a,\qquad\sigma=\pm1, \tag*{(2)}

where XX is a site or a bond and H0H^0 is the non-self-consistent reference Hamiltonian that OpenMX builds from atomic densities. The network therefore learns the self-consistent DFT+U correction to a reference it is given. Because the spins and U are inputs, our model, with 23.65 million trainable parameters, can be queried for any collinear configuration and any U between 0 and 8 eV.

The training set holds 35,632 magnetic crystal structures, Materials Project and MAGNDATA-derived cells[37, 38] covering 71 elements, computed with OpenMX DFT+U (Supplementary Fig. S6). Each structure at one U setting and in one magnetic state is one training graph, 154,546 in all. Most structures appear at two or three U settings (9,833 and 20,017 of the 35,632, against 5,782 at a single setting) and in several collinear magnetic states. The network thus sees the same geometry with different moments and U, and has to attribute the change in the Hamiltonian to those inputs. The model was trained on 128 NVIDIA H100 GPUs, and every result below uses one frozen checkpoint, Stage-2 epoch 78.

Training with the spectral-hybrid optimizer and test accuracy

About 60% of the parameters sit in the dense matrices that generate the radial weights, and at batch size one their gradients change direction from step to step. A coordinate-wise optimizer such as AdamW[39, 40] scales each parameter separately and ignores the matrix structure of the update. Orthogonalized-momentum methods such as Muon[41, 42] equalize the singular values of the update but cannot tell a persistent direction from a noisy one. Our spectral-hybrid optimizer keeps a streaming rank-rr basis of the momentum, compares the gradient with a lagged estimate along each basis direction and reweights the update accordingly,

Wt+1=Wt−ηcUtdiag⁡(w)VtT,(3)W_{t+1}=W_t-\eta cU_t\operatorname{diag}(w)V_t^{\mathsf{T}}, \tag*{(3)}

where UtU_t and VtV_t come from one power iteration on the momentum, the weights ww grow where the two estimates agree, shrink where they disagree and equal one when reweighting gains nothing, and cc applies the root-mean-square scaling of Muon (Methods, Supplementary Fig. S3). The 48 radial-weight matrices take this update and the other 80 tensors take AdamW. We compared it with Muon and AdamW on 500 iron-containing graphs (Fe-500) with a 33.2-million-parameter configuration trained for ten epochs. It reached a validation Hamiltonian error of 23.5 meV, 8.4% below Muon (25.7 meV) and 26% below AdamW (31.7 meV) (Figure 2a). In a smaller 14.2-million-parameter configuration with identical settings for every optimizer and three seeds, its full-rank variant also had the lowest error in every seed, with means of 27.3 meV against 27.7 meV for Muon and 31.0 meV for AdamW (Supplementary Fig. S3b). The production run used it in both training stages. The validation error fell from 2.78 to 2.18 meV in the Hamiltonian-only stage, and in the band-energy stage the band error fell from 348 to 96 meV, reaching its minimum at Stage-2 epoch 78 (Figure 2b).

Figure 2. Spectral-hybrid training and test accuracy. a, Validation Hamiltonian mean absolute error (MAE) of AdamW, Muon and the spectral-hybrid optimizer over ten epochs on 500 iron-containing graphs (33.2-million-parameter configuration, seed 666); final values at the line ends. Supplementary Fig. S3b gives a matched three-seed comparison. b, Validation Hamiltonian MAE (upper) and validation band MAE (lower) of the production run on one epoch axis, through the Hamiltonian-only stage 1 and the band-energy stage 2 (stage 2 epochs offset to continue the axis; the band loss and its validation error exist only in stage 2); open circles, the selected checkpoint (stage 2 epoch 78), 2.0926 meV and 96.48 meV. c, Predicted against reference DFT+U Hamiltonian elements as a log-scaled two-dimensional count over all 1,482,157,610 nonzero elements of the 1,577 test graphs; dashed line, identity; inset, elements within 0.5 eV of zero. MAE 1.802 meV, R2R^2 0.99984. d, Fraction of test graphs whose per-graph MAE exceeds a given value; median 1.667 meV, 95th percentile 4.302 meV, mean 2.047 meV. e, Per-element test MAE for the 70 elements with test coverage, attributing each graph’s error to every element in its formula (graph-attributed, not orbital-resolved). Errors in c–e are taken over the matrix elements whose DFT+U reference is nonzero, without the zero padding of the orbital blocks (Methods). All values are for the frozen checkpoint.

On the 1,577 test graphs our model reaches a mean absolute error of 1.80 meV over all 1.48 billion nonzero Hamiltonian matrix elements of their 4,073,125 orbital blocks (the Hamiltonian matrix of one atom or atom pair). Predicted and reference elements lie on the identity across 24 eV with a coefficient of determination of 0.99984, and this includes the small elements within 0.5 eV of zero that carry the hopping (Figure 2c). Per graph, the error has a median of 1.67 meV, a mean of 2.05 meV and a 95th percentile of 4.30 meV (Figure 2d). By element, it is 1.65 to 2.35 meV for nickel, manganese, iron and cobalt and between 1.45 and 6.35 meV for every element, highest for technetium and rhenium (Figure 2e). On test graphs, eigenvalues at off-axis k points have a median error of 55 meV (Supplementary Fig. S5). The error changes little across the trained U window and between antiferromagnetic-like and ferromagnetic-like inputs, and it is highest at the 8 eV ceiling (Supplementary Fig. S4).

Band gaps and spin splitting across Hubbard U

To test whether the network has learned how the Hamiltonian responds to U and to the magnetic state, we followed one crystal across U and compared its predicted bands with converged DFT+U at the same structure, magnetic state and U, on the same k path (Figure 3). MnTe is an altermagnet whose spin-split bands have been measured[43]. At U=0U = 0 the model and DFT+U both give a metal, with a band crossing the chemical potential. By U=2U = 2 eV a gap has opened in both, and it widens with UU, from 0.73 to 1.02 eV in the model against 0.72 to 1.10 eV in DFT+U between 2 and 8 eV. Bands within 1 eV of the chemical potential differ from DFT+U by 21 to 59 meV on average across the five UU values (Figure 3b; Supplementary Table S8). The model also reproduces the altermagnetic splitting. Along Γ\Gamma–M–M′–Γ\Gamma–A the two DFT+U spin channels are degenerate to 0.01 meV, and away from these lines they split. The largest same-band splitting within 2 eV of the chemical potential stays within 66 meV of DFT+U at every UU, and both show a dip at 6 eV (830, 764, 725, 468 and 624 meV in the model against 864, 781, 711, 453 and 690 meV in DFT+U from U=0U = 0 to 8 eV). The k-resolved splitting follows the DFT+U curve point by point (Figure 3b, lower strips).

Figure 3. Band gaps and spin splitting across Hubbard UU. a, MnTe in the AFM1 configuration (two repeats of the four-atom cell; arrows, Mn spins). b, Spin-resolved bands at U=0U = 0, 4 and 8 eV at a fixed structure, for the magnetic state of the converged DFT+UU calculation, on the same 141-point kk path (dashed black, DFT+UU; blue and red, model spin up and down), relative to the OpenMX chemical potential of the converged calculation; headers give the band MAE within 1 eV of it (58.7, 33.8 and 20.9 meV). The path runs through the fractional points Γ\Gamma (0, 0, 0), M (12\frac{1}{2}, 0, 0), M′(12\frac{1}{2}, 12\frac{1}{2}, 0, equivalent to M), Γ\Gamma and A (0, 0, 12\frac{1}{2}) of the hexagonal cell; shading marks the scan through k∗=(0.158,0,0.25)k^* = (0.158, 0, 0.25), the point of largest predicted splitting. Lower strips, largest same-band spin splitting at each kk over bands within 2 eV of the chemical potential (fill, DFT+UU; line, model). c, Path gap and largest same-band splitting within 2 eV against UU for MnTe (U=0U = 0 to 8 eV in steps of 2 eV) and Ag3_3RuO4_4 (U=0U = 0 to 10 eV), model (blue, filled) and DFT+UU (black, open; circles, MnTe; squares, Ag3_3RuO4_4); each point is one calculation without replicate spread, and the two systems share one y scale per row and one UU axis, so model–DFT+UU differences can be compared directly. The gap is zero when a band crosses the chemical potential; bands are paired by index within each spin channel. Shading marks UU above the trained window of 8 eV.

We followed a larger altermagnet candidate, the 32-atom cell of Ag3RuO4\mathrm{Ag}_3\mathrm{RuO}_4, across six UU values from 0 to 10 eV, beyond the 8 eV limit of the training data: its same-band splitting is 64 to 102 meV in the model against 66 to 124 meV in DFT+U, with mean band errors of 22 to 82 meV (Supplementary Fig. S1f). The model reproduces its gap of about 0.1 eV at U=0U = 0, 2 and 8 eV, underestimates it at 4 eV (0.06 against 0.09 eV) and closes it at 6 eV, where DFT+U gives 0.12 eV (Figure 3c). At 10 eV, outside the trained window, it still gives a gap of 0.08 eV and a splitting of 102 meV, against 0.11 eV and 124 meV in DFT+U. Beyond the trained window the model thus still predicts a gapped, spin-split state for this crystal, with a splitting 18% below DFT+U. Band comparisons for further compounds are given in Supplementary Fig. S1.

Exchange couplings and magnetic-order calibration

Exchange couplings extracted from the predicted Hamiltonian with TB2J[44, 45] agree with couplings extracted in the same way from converged DFT+U Hamiltonians. Over 76 bonds in five calibration materials the correlation is 0.92, the mean absolute difference 1.38 meV and the sign agreement 89.5% (Figure 4a). Both sets of couplings are extracted from the same ferromagnetic reference configuration; Supplementary Fig. S8 gives the comparison per material and for other references. For LaMnO3\mathrm{LaMnO}_3 the 24 nearest-neighbour couplings agree with a correlation of 0.9997, with every sign correct.

Figure 4. Exchange couplings, model against DFT+U. Isotropic exchange couplings extracted with TB2J from the model and from the converged DFT+U Hamiltonian on the same ferromagnetic reference configuration, for 76 bonds in five calibration materials (colour and marker shape identify the material, legend with bond counts; dashed line, identity): Pearson rr 0.92, MAE 1.38 meV, sign agreement 89.5%; the isolated point at the top is four overlapping, symmetry-equivalent shortest bonds of Mg2SiNi2Ir\mathrm{Mg_2SiNi_2Ir} (2.49 Å; DFT+U 4.9 meV, model 18.0 meV), which carry about half of the total absolute deviation.

To test the magnetic order that follows from these couplings, we calibrated it against self-consistent DFT+U on 43 GNoME candidates taken from the top of the model’s rankings (Supplementary Table S3). Comparing the DFT+U energies of the ferromagnetic state and several antiferromagnetic configurations identifies the lowest of these configurations for 40 of them. The couplings give a binary ferromagnetic-versus-antiferromagnetic call for twenty of the forty, and 17 of these calls are correct: 85.0% (Wilson[46] 95% interval 64.0 to 94.8%) at an assertion coverage of 50.0%. The other twenty comprise nineteen abstentions by design and one non-magnetic candidate called ferromagnetic (Supplementary Note 7).

DFT+U validation of altermagnet candidates

We ran the model on GNoME structures[18] in their predicted magnetic configurations and adjudicated with DFT+U the 24 altermagnet candidates with the largest predicted splitting, under rules fixed before any DFT+U result was seen (Figure 5). A candidate is validated when its ferromagnetic state and AFM1, the first antiferromagnetic configuration generated deterministically from its structure, both converge, AFM1 lies below the ferromagnetic state, the spin group of the transition-metal sublattice is d-wave altermagnetic and DFT+U confirms the splitting. This primitive-cell test compares AFM1 only with the ferromagnetic state, so for every candidate that passed it we also converged two antiferromagnetic configurations of a doubled supercell, each against AFM1 in the same supercell (Methods). Five candidates pass every test: LuCo2_2B2_2Ir, SrTi2_2Sb2_2O, Hf3_3Cr2_2TcP3_3, HfZr(VRe)2_2 and Zr4_4Mn6_6AlOs. In these five, AFM1 lies 77 to 1,116 meV per cell below the ferromagnetic state, stays lowest in the supercell by 83 to 1,169 meV per cell and splits by 393 to 972 meV over the Brillouin zone (469.2 meV for Hf3_3Cr2_2TcP3_3, Figure 5a; Supplementary Table S4). The ground state of these five is thus assigned among the configurations compared: the ferromagnetic state, AFM1 and the two antiferromagnetic configurations of the doubled supercell. In four more candidates DFT+U confirms the predicted splitting, 607 to 1,228 meV, in the antiferromagnetic state. In three of them, NdLuAl2_2(Co3_3B)2_2, NdCd(NiPt)2_2 and NdIn(NiPt)2_2, the Nd 4f moment is uncompensated, so the full state is ferrimagnetic and the splitting is altermagnetic only on the transition-metal sublattice; the ferromagnetic and supercell references of all four are given in Supplementary Note 7. The outcomes of the other 15 candidates are listed in Supplementary Table S4 and discussed in Supplementary Note 7.

Figure 5. DFT+U validation of altermagnet candidates. a, Hf3Cr2TcP3\mathrm{Hf}_3\mathrm{Cr}_2\mathrm{TcP}_3 (AFM1 spins on Cr), one of five validated altermagnets among the 24 GNoME altermagnet candidates with the highest predicted splitting, which were adjudicated by DFT+U under rules fixed before any result was seen (Supplementary Table S4); its DFT+U bands (dashed, as in b) with the tabulated U of each element (Methods), spin up (blue) and down (red), along Γ\Gamma–M–M′–Γ\Gamma–A of the hexagonal cell (labels as in Figure 3b) and through k∗k^*. The DFT+U spin splitting over a 9×9×99 \times9 \times9 Brillouin-zone mesh (Methods) is 469.2 meV; the spin-group class is read on the transition-metal sublattice that carries the splitting. b, Ag3RuO4\mathrm{Ag}_3\mathrm{RuO}_4 at U = 4 eV around k∗k^*: DFT+U (dashed) and model bands, and the same-band splitting at each k (fill, DFT+U; line, model). Within 1 eV of the chemical potential the largest splitting is 68.9 meV in DFT+U and 67.3 meV in the model; spin group P4122P4_122 (amcheck). c, Model against DFT+U spin splitting for the nine of the 24 candidates whose altermagnetic splitting DFT+U confirms, both measured on the same 9×9×99 \times9 \times9 mesh with the same rule (Methods): blue diamonds, the five validated altermagnets; green, the four candidates whose splitting is confirmed in the antiferromagnetic state, three of them ferrimagnetic with an uncompensated Nd 4f moment (ferromagnetic and supercell references in Supplementary Note 7). The other 15 candidates are listed in Supplementary Table S4.

For Ag3_3RuO4_4 we repeated the check at every U. Its DFT+U antiferromagnetic state lies 716 to 793 meV per cell below the ferromagnetically seeded state from U = 0 to 10 eV, with a ruthenium moment of 1.41 to 1.48 μB\mu_{\mathrm{B}}. Spin-group analysis[47] permits altermagnetism in space group P41_122, and at U = 4 eV the DFT+U bands split by 69 meV within 1 eV of the chemical potential, against 67 meV in the model (Figure 5b). In DFT+U, Ag3_3RuO4_4 is therefore altermagnetic in this antiferromagnetic state, which stays below the ferromagnetically seeded state from U = 0 to 10 eV. The conventional antiferromagnets NiO and MnO keep their ground states in DFT+U, and their model splittings of 8 and 30 meV lie below the band errors of 139 and 70 meV, so the screening gate, which accepts a predicted splitting only above three times the band error, rejects both (Supplementary Fig. S2a).

Discussion

U-HamGNN learns how the Hamiltonian of a magnetic crystal depends jointly on its collinear configuration and on U, for crystals across the periodic table. The spins do not enter the equivariant representation network directly: it predicts the magnetic interaction parameters, couplings J and weights W, and a physics-based assembly builds the two spin channels from them and the input spins (Figure 1b). Across 71 elements our model reaches a mean absolute error of 1.8 meV on the nonzero matrix elements of the test graphs. Followed across U, it reproduces DFT+U: the gap of MnTe opens with U, its spin channels split away from the high-symmetry lines by the amounts DFT+U gives, and the splitting of Ag3_3RuO4_4 follows DFT+U across six U values, including one beyond the trained window. Couplings read from the predicted Hamiltonian agree bond by bond with couplings from converged DFT+U, and the magnetic order they imply is right in 17 of 20 binary calls on a calibration set of GNoME candidates.

A DFT+U survey repeats a self-consistent calculation for every configuration and every U. With a loaded model the same grid costs one query per point: for the 32-atom Ag3_3RuO4_4 cell, 30.4 s on one H100 GPU, 2.5 s of it in the forward pass, against 316 s for one self-consistent DFT+U calculation on 55 CPU cores. The saving comes from reusing one loaded model across many queries (Supplementary Fig. S9), and DFT+U can be spent where it decides the outcome.

Among the 24 GNoME altermagnet candidates the model ranked highest, DFT+U confirmed five altermagnets with splittings of 393 to 972 meV, each lowest in both the primitive cell and a doubled supercell, and the predicted splitting of four more. The model can therefore prioritize altermagnet candidates for self-consistent DFT+U adjudication.

Our model extends the universal Hamiltonian models[16, 17, 28], which established training across the periodic table and deployment on databases, to the magnetic state and U. Single-family magnetic models[19, 20, 22, 48] learn the dependence on the spin configuration but keep U fixed (Supplementary Note 5).

Our model returns the Hamiltonian of any collinear configuration it is given; whether that configuration survives self-consistency, and which one is the ground state, is settled by DFT+U or an energy comparison, which is why every candidate goes through a DFT+U check. Supplementary Note 7 gives the full account of the remaining candidates and the boundaries of the comparison.

Combining the magnetic term with the spin-orbit coupling of Uni-HamGNN would bring relativistic splitting and magnetic anisotropy into the same framework.

Methods

Model architecture

U-HamGNN predicts the collinear, spin-polarized DFT+U Hamiltonian in the OpenMX basis of numerical atomic orbitals. For each spin channel σ\sigma the Hamiltonian consists of blocks Hijσ(R)H_{ij}^{\sigma}(\mathbf{R}) between the orbitals of atom ii in the home cell and of atom jj in the cell at lattice vector R\mathbf{R}. The bands follow from the generalized eigenproblem Hσ(k)c=εS(k)cH^{\sigma}(\mathbf{k})\mathbf{c}=\varepsilon S(\mathbf{k})\mathbf{c}, where Hσ(k)=∑Reik⋅RHσ(R)H^{\sigma}(\mathbf{k})=\sum_{\mathbf{R}}e^{i\mathbf{k}\cdot\mathbf{R}}H^{\sigma}(\mathbf{R}) and the overlap S(k)S(\mathbf{k}) is formed in the same way. A rotation QQ of the crystal transforms a block as Dli(Q)HijDlj(Q)†D^{l_i}(Q)H_{ij}D^{l_j}(Q)^\dagger and inversion multiplies it by (−1)li+lj(-1)^{l_i+l_j}; the HamGNN construction[14] satisfies both by assembling every block from irreducible representations (below).

The Hamiltonian of a magnetic crystal also depends on the local moments, and for noncollinear moments it must in addition be equivariant under spin rotation and time reversal. Fitting all spin blocks directly would take eight sub-blocks with different time-reversal parity. HamGNN++[20] instead derives the spin-dependent part from a generalized Heisenberg model. The moment of atom ii is defined through a weight operator W^i\hat{W}_i, Miα=Tr⁡(W^iσ^αρ^)M_i^\alpha= \operatorname{Tr}(\hat{W}_i\hat{\sigma}^\alpha\hat{\rho}), with ρ^\hat{\rho} the density matrix and σ^α\hat{\sigma}^\alpha the Pauli matrices, and the spin energy is

Espin=∑i<j∑αβMijαJijαβMjβ+∑k∑αβMkαAkαβMkβ(4)E_{\mathrm{spin}} = \sum_{i<j}\sum_{\alpha\beta} M_{ij}^{\alpha}J_{ij}^{\alpha\beta}M_{j}^{\beta} + \sum_k\sum_{\alpha\beta}M_k^\alpha A_k^{\alpha\beta}M_k^\beta \tag*{(4)}

where JijαβJ_{ij}^{\alpha\beta} and AkαβA_k^{\alpha\beta} are the exchange and single-ion tensors. The magnetic part of the Hamiltonian is the variational derivative of EspinE_{\mathrm{spin}} with respect to ρ^\hat{\rho}. Each of its terms is linear in one moment and proportional to a matrix element of W^\hat{W} and a Pauli matrix. The tensors JJ and AA are even under time reversal and inversion, so the magnetic part changes sign with the moments. The construction is therefore equivariant by design and needs about an eighth of the parameters of a direct fit of all spin blocks.

For collinear moments along zz only σ^z\hat{\sigma}^{z} survives, and it is diagonal in spin. The derivative then adds a term +Δ+\Delta to the spin-up channel and −Δ-\Delta to the spin-down channel, ΔX=WX∘∑aJX,asa\Delta_X = W_X \circ\sum_a J_{X,a}s_a as in the Results. Here sa∈{+1,−1,0}s_a \in\{+1,-1,0\} is the sign of the moment of magnetic atom aa (zero for atoms outside the 22-element magnetic allowlist), JX,aJ_{X,a} are the on-site and pair couplings that reach block XX (the zzzz components of JJ and AA, one scalar per pair of orbital shells) and WXW_X holds the learned elements of the weight operator. Because Δ\Delta is linear in ss, and H0H^0 and HnmH^{\mathrm{nm}} do not depend on the spins, reversing every spin exchanges the two channels exactly, H↑[−s]=H↓[s]H^{\uparrow}[-s] = H^{\downarrow}[s], which is the collinear form of time-reversal equivariance. HamGNN++ also gives the magnitudes of the moments to the network. U-HamGNN gives it only their signs, because the magnitudes are an outcome of the self-consistent calculation rather than a setting of the query, so their effect is left to the learned couplings.

DFT+U adds to the Kohn–Sham potential of the correlated shell of each atom the Dudarev term

Vmm′σ=Ueff(12δmm′−nmm′σ)(5)V_{mm'}^\sigma= U_{\mathrm{eff}}\left(\frac{1}{2}\delta_{mm'}-n_{mm'}^\sigma\right) \tag*{(5)}

where nσn^\sigma is the occupation matrix of that shell. It pushes occupied and empty orbitals apart by about UeffU_{\mathrm{eff}}, and through the self-consistent occupations it changes both the spin-independent part of the Hamiltonian and the exchange splitting. The reference H0H^0 contains no Hubbard term, because OpenMX adds it only from the second self-consistent step, and its two spin channels are identical, so the whole dependence on U and on the spins has to be learned. The U of each atom therefore enters its node attribute (Results), from where it reaches HnmH^{\mathrm{nm}}, JJ and WW through every layer. HamGNN++ was trained on individual magnetic systems (Fe/Ir(111), NiBr2_2 and NiBrI) with noncollinear moments and spin-orbit coupling. U-HamGNN keeps its parameterization in the collinear form, has no spin-orbit term, is trained across the periodic table and takes U as an input.

U-HamGNN uses the Uni-HamGNN equivariant architecture[28] and is trained on the magnetic DFT+U data described below. The model learns the self-consistent correction to a reference Hamiltonian (delta learning). It keeps the HamGNN construction[14] on the irreducible representations (irreps) of the e3nn framework[33, 34, 35], with the OpenEquivariance strict-mode kernel backend[36]. The representation network takes a crystal graph with a 26.0 Bohr (13.76 Å) cutoff and a cosine cutoff function. Every atom carries a 116-dimensional scalar attribute. It concatenates a one-hot encoding over 84 atomic types (H to Po, more than the 71 elements present in the training data) with a 32-function Gaussian expansion of the effective on-site interaction UiU_i on [0,8][0, 8] eV (width σU=0.26\sigma_U = 0.26 eV), from which the expansion of U=0U = 0 is subtracted; an atom without a Hubbard correction therefore reduces to the plain element embedding (zero-centred U embedding). Edges carry spherical harmonics up to l=6l = 6 (component normalization) and 128 Bessel radial functions. A pair-interaction embedding builds the initial edge features from the two atom attributes, the spherical harmonics and a radial multilayer perceptron with layers [256, 256, 128]. An atom-wise linear layer lifts the attributes to equivariant node features with irreps 64×0e+64×0o+48×1o+48×1e+48×2o+48×2e+32×3o+32×3e+16×4o+16×4e+8×5o+8×5e+4×6e64 \times0e + 64 \times0o + 48 \times1o + 48 \times1e + 48 \times2o + 48 \times2e + 32 \times3o + 32 \times3e + 16 \times4o + 16 \times4e + 8 \times5o + 8 \times5e + 4 \times6e (1,860 components). Three interaction layers follow, each made of an equivariant convolution and a pair-interaction block. The convolution forms a fully connected tensor product of the sender features with the edge spherical harmonics, scales it by radial weights from the radial network, sums over neighbours and passes the result through a gated nonlinearity with a residual connection and a linear skip path. The pair-interaction block then updates the edge features from the two updated node features. The magnetic state enters only in the output network.

The output network (OpenMX basis, at most 26 orbitals per atom, s3p2d2f1) reads orbital blocks from the node and edge features. Each lalbl_a l_b shell pair is decomposed into irreps L=∣la−lb∣,…,la+lbL = \lvert l_a-l_b\rvert, \ldots, l_a+l_b (134 irreps, 676 components) and reassembled with Clebsch–Gordan coefficients,

Hmamb(lalb)=∑L2L+1∑M⟨lamalbmb∣LM⟩cM(lalbL)H^{(l_a l_b)}_{m_a m_b} = \sum_L \sqrt{2L+1}\sum_M \langle l_a m_a l_b m_b \mid LM\rangle c^{(l_a l_b L)}_M

then reordered to the OpenMX orbital order and masked to the orbitals present on each element. On-site blocks are projected onto the Hermitian subspace, and off-site blocks are made Hermitian against the reverse edge, Hij(R)=Hji(−R)†H_{ij}(\mathbf{R}) = H_{ji}(-\mathbf{R})^\dagger. Six heads share this decoder: on-site and off-site heads for the spin-independent Hamiltonian (HnmH^{\mathrm{nm}}), for the exchange (one scalar coupling JJ per shell pair) and for the weights (a full 26×2626 \times26 matrix WW). The collinear magnetic term uses the input spin directions si∈{+1,−1,0}s_i \in\{+1,-1,0\} of the atoms in the 22-element magnetic allowlist (Ti, V, Cr, Mn, Fe, Co, Ni, Cu, Mo, Tc, Ru, Rh, Pd, Ce, Nd, Sm, Dy, Ho, Re, Os, Ir, Pt). The on-site term of magnetic atom ii is Wi∘(Jisi+∑j→iJijsj)W_{i\circ}(J_i s_i+\sum_{j\to i}J_{ij}s_j), where the sum runs over the neighbouring magnetic atoms through the off-site couplings; the off-site term of bond ijij at lattice vector R\mathbf{R} is Wij∘(Jisi+δR,0Jjsj+∑kJiksk)W_{ij\circ}(J_i s_i+\delta_{\mathbf{R},0}J_j s_j+\sum_k J_{ik}s_k) with the same neighbour sums. The two spin channels are H↑=H0+Hnm+ΔH^\uparrow= H^0 + H^{\mathrm{nm}} + \Delta and H↓=H0+Hnm−ΔH^\downarrow= H^0 + H^{\mathrm{nm}} - \Delta. H0H^0 is the non-self-consistent reference Hamiltonian that the OpenMX post-processing tool writes from the superposition of atomic densities. It does not depend on spin or UU, comes with every graph and lets the network learn the self-consistent correction. During training, band energies are computed by generalized diagonalization L−1H(k)L−†L^{-1}H(\mathbf{k})L^{-\dagger}, with LL the Cholesky factor of the overlap S(k)S(\mathbf{k}), at four automatically chosen k points for the 8 bands above and below the valence-band maximum in each spin channel, after an overlap-weighted alignment of the energy zero between prediction and reference. The gradients of the exchange and weight heads are scaled by 15 relative to the Hamiltonian head. The model has 23,650,400 trainable parameters (23.26 million in the representation network, 0.39 million in the output heads). It is collinear and has no spin-orbit term.

Training data and split

The Hamiltonians were computed with OpenMX[30, 31] DFT+U (Dudarev form, Ueff=U−JU_{\mathrm{eff}} = U - J, written to the OpenMX Hubbard block[5, 32]) for magnetic crystal structures from the Materials Project[37] and MAGNDATA-derived magnetic cells[38]. The full LMDB holds 205,251 graphs over 42,744 distinct structures. A structure is stored at up to three U settings (0 eV, the tabulated value and an 8 eV ceiling) and in two to six collinear magnetic states; 90.8% of the structures appear at more than one U and 91.9% in more than one magnetic state. Every graph carries three per-atom fields: spin_length (magnitude of the Mulliken moment, μB\mu_{\mathrm{B}}), spin_vec (its unit direction, of which the collinear model uses the sign of the z component) and u_atoms (UeffU_{\mathrm{eff}} in eV, zero where no correction is applied). We removed the 47,551 graphs in which any allowlisted magnetic atom has a moment below 0.5 μB\mu_{\mathrm{B}}. The remaining 157,700 graphs were shuffled with a fixed seed and split 98/1/1 into 154,546 training, 1,577 validation and 1,577 test graphs. The training subset covers 35,632 structures and 71 elements; Supplementary Table S2 gives per-element structure and graph counts and Supplementary Table S6 the full configuration. The test split was drawn at the graph level, so it contains configurations of structures whose other U or spin configurations appear in training. This is the relevant test for an operator conditioned on U and spin, which has to predict the Hamiltonian at a given U and magnetic state.

Training protocol

Training ran on 128 NVIDIA H100 GPUs (16 nodes ×\times 8) with one graph per GPU. Stage 1 fitted the Hamiltonian only, with a Huber loss (δ=5×10−4\delta= 5 \times10^{-4} Ha) on the Hamiltonian blocks and a spin-splitting auxiliary loss on H↑−H↓H^{\uparrow} - H^{\downarrow} (weights 10,000 and 150; the auxiliary loss is restricted to blocks with a nonzero reference splitting). It used the spectral-hybrid optimizer at a learning rate of 0.02, reduced to 0.005 on resumption from epoch 26, and ran to epoch 138 with a plateau scheduler (factor 0.5). Stage 2 continued from the last Stage 1 checkpoint with an L1 Hamiltonian loss (weight 27,000.211) and an L1 band-energy loss (weight 272.11, ramped linearly from zero over 20 epochs). It used a learning rate of 0.001 for both optimizer groups and gradient clipping at 100, and the validation band-energy error drove the scheduler, early stopping and checkpoint selection. The best checkpoint is Stage-2 epoch 78 (global step 95,432, counted from the start of Stage 2; validation Hamiltonian MAE 2.092 meV, validation band MAE 96.5 meV). It is used for every result in this paper. Figure 2b shows the per-epoch validation curves of both stages.

Spectral-hybrid optimizer

For a matrix parameter W∈Rn×mW \in\mathbb{R}^{n \times m} with gradient GtG_t the optimizer keeps a momentum, an exponential average of past gradients and their difference, a temporal innovation that gives a cheap replica of the gradient noise[49],

Mt=βMt−1+(1−β)Gt,Gˉt=βmGˉt−1+(1−βm)Gt,ξt=Gt−Gˉt−1.(6)M_t = \beta M_{t-1} + (1-\beta)G_t,\qquad\bar{G}_t = \beta_m \bar{G}_{t-1} + (1-\beta_m)G_t,\qquad\xi_t = G_t - \bar{G}_{t-1}. \tag*{(6)}

The momentum starts from M0=0M_0 = 0 and the average from Gˉ0=G1\bar{G}_0 = G_1, so the two differ although β=βm\beta= \beta_m; the innovation ξt\xi_t is used only by the metric variant described below. The optimizer refreshes a rank-rr basis by one power iteration on the momentum, a persistent basis that replaces the Newton–Schulz orthogonalization of Muon [41, 42],

Vt=qf⁡(MtTMtVt−1),Yt=MtVt=Utdiag⁡(σt),(7)V_t = \operatorname{qf}(M_t^{\mathsf T}M_tV_{t-1}),\qquad Y_t = M_tV_t = U_t\operatorname{diag}(\sigma_t), \tag*{(7)}

where qf is the Q factor of a reduced QR decomposition, σt\sigma_t holds the column norms of YtY_t and UtU_t is YtY_t with its columns scaled to unit norm (it is not orthogonalized again), and, every pp steps (the spectral period), projects the gradient and its replica onto the basis and compares them direction by direction,

g(1)=diag⁡(UtTGtVt),g(2)=diag⁡(UtTGˉt−1Vt),g^{(1)} = \operatorname{diag}(U_t^{\mathsf T}G_tV_t),\qquad g^{(2)} = \operatorname{diag}(U_t^{\mathsf T}\bar{G}_{t-1}V_t),
B=1+λνν+λc(1−2g(1)g(2)(g(1))2+(g(2))2+ϵ),ν=14(g(1)−g(2))2,(8)B = 1 + \lambda_\nu\nu+ \lambda_c\left(1-\frac{2g^{(1)}g^{(2)}}{(g^{(1)})^2+(g^{(2)})^2+\epsilon}\right),\qquad\nu= \frac{1}{4}(g^{(1)}-g^{(2)})^2, \tag*{(8)}

so that BB grows where the two estimates disagree. The spectral weights are a softmax over the per-direction advantage a=η12(g(1)+g(2))−η2Ba = \eta\frac{1}{2}(g^{(1)}+g^{(2)})-\eta^2B, projected onto a tube around unit weight,

w=Πδ[rsoftmax⁡(βwz(a))],∥w∥2=r,(9)w = \Pi_\delta\left[\sqrt{r}\operatorname{softmax}(\beta_w z(a))\right],\qquad\lVert w\rVert_2 = \sqrt{r}, \tag*{(9)}

where βw\beta_w is chosen on a grid by maximizing the cross-fitted surrogate gain defined below. If no temperature gives a positive gain, w=1w = 1 and the step reduces to streaming Muon. The update is

Wt+1=Wt−ηcUtdiag⁡(w)VtT,c=min⁡(n,m)nm/rms⁡(Utdiag⁡(w)VtT),(10)W_{t+1} = W_t - \eta cU_t\operatorname{diag}(w)V_t^{\mathsf T},\qquad c = \sqrt{\frac{\min(n,m)}{nm}}/\operatorname{rms}(U_t\operatorname{diag}(w)V_t^{\mathsf T}), \tag*{(10)}

with the root-mean-square normalization of Muon. These equations apply to every parameter on the spectral route, and the rest take an AdamW step [39, 40]. Parameters are routed by role and shape. A tensor goes to the spectral route if it has at least two dimensions and its parameter name contains none of the strings embedding, radial, basis, output_module, norm or bias. The production model stores the e3nn tensor-product and linear weights as flattened one-dimensional tensors, and the parameter names of the multilayer perceptrons that map the radial basis to the tensor-product weights contain none of these strings, so the spectral route holds the 48 dense matrices of these perceptrons (14,186,496 parameters, 60%) and the AdamW group holds the remaining 80 tensors (9,463,904 parameters). Constants: momentum β=0.95\beta= 0.95, gradient-EMA βm=0.95\beta_m = 0.95, rank r=32r = 32, one power iteration, spectral refresh every p=4p = 4 steps, λν=2.0\lambda_\nu= 2.0, λc=0.25\lambda_c = 0.25, tube half-width δ=0.35\delta= 0.35, temperature grid βw∈{0,0.001,0.002,0.005,0.01,0.02,0.05,0.1,0.25,0.5,1,2,4}\beta_w \in\{0, 0.001, 0.002, 0.005, 0.01, 0.02, 0.05, 0.1, 0.25, 0.5, 1, 2, 4\}, surrogate penalties λdiff=0.5\lambda_{\mathrm{diff}} = 0.5, λunc=0.5\lambda_{\mathrm{unc}} = 0.5, λtube=0.05\lambda_{\mathrm{tube}} = 0.05, hard selection below a learning rate of 0.05, no weight decay; AdamW uses β1=0.99\beta_1 = 0.99, β2=0.999\beta_2 = 0.999, ϵ=10−8\epsilon= 10^{-8}. The tube projection clamps the weights to [1−δ,1+δ][1-\delta, 1+\delta] and renormalizes ∥w∥2=r\lVert w\rVert_2 = \sqrt{r} (all constants and surrogate definitions are collected in Supplementary Note 6); z(a)z(a) standardizes the advantage vector to zero mean and unit root-mean-square. The cross-fitted surrogate gain evaluates ηg(2)⋅w(1)−12η2B⋅w(1)2\eta g^{(2)} \cdot w^{(1)} - \frac{1}{2}\eta^2 B \cdot w^{(1)2} for weights w(1)w^{(1)} fitted on g(1)g^{(1)}, and symmetrically, relative to unit weights; its penalties are the ν\nu-weighted mean of (w2−1)2(w_2-1)^2 (diffusion), the absolute difference of the two cross gains (uncertainty) and the mean squared distance from unit weight (tube). The metric variant keeps exponential averages of the row and column energies of the gradient EMA (signal, SS) and of the innovation (noise, NN), forms the reliability ρ=S/(S+N)\rho= S/(S+N), sets row and column temperatures T∝ρ1/4T \propto\rho^{1/4} normalized to unit geometric mean and clipped to [0.5, 2], builds the basis and the projections on Tr M Tc\sqrt{T_r}\,M\,\sqrt{T_c} and removes the metric before the update. The Muon baseline uses momentum 0.95 with Nesterov mixing, five quintic Newton–Schulz iterations with coefficients (3.4445, −4.7750, 2.0315) and the scale max⁡(1,n/m)\max(1,\sqrt{n/m}).

Optimizer benchmarks

Both optimizer benchmarks used the same 500 iron-containing graphs from the training LMDB (Fe-500), with a fixed 500/100/100 split, 10 epochs of 500 steps at batch size one, strict OpenEquivariance kernels and the global random seed 666, and report the Hamiltonian MAE on the 100 validation graphs at the end of training. The comparison of Figure 2a used a 33.2-million-parameter configuration. AdamW ran at a learning rate of 3.2×10−33.2 \times10^{-3}. Muon updated the same matrix parameters as the spectral route at a learning rate of 0.02, with AdamW at 3.2×10−33.2 \times10^{-3} for the other tensors, and was launched three times with the same seed (25.679, 25.682 and 25.676 meV; Figure 2a shows the first launch). The spectral-hybrid optimizer used the same parameter split with period 4, rank 32, a spectral learning rate of 0.02 and an AdamW learning rate of 5.6×10−35.6 \times10^{-3}. The matched benchmark used a 14.2-million-parameter configuration (node irreps starting 32x0e+32x0o, 64 Bessel functions) in which every optimizer ran at one learning rate of 3.2×10−33.2 \times10^{-3} and, for Muon and the spectral update, on every tensor with at least two dimensions; the spectral update used a full-rank basis refreshed every step. AdamW, Muon, the spectral update and its metric variant were each run with seeds 666, 1 and 2 in otherwise identical configurations. The two benchmarks and the production run use three different model sizes and are reported separately (Supplementary Table S1).

Test evaluation and band-structure comparison

Test errors are computed over the matrix elements whose DFT+U reference is nonzero. Each orbital block is stored as a 2×26×262 \times26 \times26 array, and entries outside the basis of its two atoms are zero padding in both the reference and the prediction; they are excluded, which leaves 1,482,157,610 of the 5,506,865,000 stored entries of the 4,073,125 spin-resolved test blocks. The MAE and coefficient of determination in Figure 2c are pooled over all of these elements (1.802 meV, 0.99984), and the per-graph MAE averages over the nonzero elements of one graph (mean 2.047 meV, median 1.667 meV, 95th percentile 4.302 meV). Per-element errors attribute each graph’s MAE to every element in its formula, so they are formula-attributed, not orbital-block-resolved. The band structures in Figs. 3 and 5 and Supplementary Fig. S1 come from diagonalizing the predicted and the converged DFT+UU Hamiltonian on the same 141-point kk path (protocol and all window errors in Supplementary Note 3 and Supplementary Table S8). In this comparison the structure is fixed at every UU (no relaxation), and the model predicts the Hamiltonian for the magnetic state of the converged DFT+UU calculation. Both sides are referenced to the OpenMX chemical potential of the converged calculation, and the window MAE is the mean absolute eigenvalue difference over all band and kk-point pairs where either side lies within 1 eV of it. The model and DFT+UU are measured with the same definitions. The path gap is zero when any band crosses the chemical potential; otherwise it is the difference between the lowest eigenvalue above and the highest below it, over both spin channels. The same-band splitting is the largest ∣En↑(k)−En↓(k)∣|E_{n\uparrow}(k)-E_{n\downarrow}(k)| over the plotted path, pairing bands by index within each spin channel and keeping pairs with both energies within 2 eV of the chemical potential (1 eV where stated; Supplementary Table S8 gives the 0.5, 1, 2 and 4 eV values). The candidate ranking used a different, model-only quantity, the largest splitting on an 11×11×1011 \times11 \times10 Brillouin-zone mesh within 4 eV of an estimated Fermi level with bands paired by nearest energy (168.1 meV for Ag3RuO4\mathrm{Ag}_3\mathrm{RuO}_4 at U=4U = 4 eV). It ranks candidates and is not used as a validation number. The adjudication splitting (Fig. 5a,c and Supplementary Table S4) is a third quantity, measured over a 9×9×99 \times9 \times9 Brillouin-zone mesh within 4 eV of the estimated Fermi level: the largest distance from an eigenvalue of one spin to the nearest eigenvalue of the other spin, which needs no band pairing. It was computed with the same code and settings from the converged DFT+UU Hamiltonian of the antiferromagnetic state and, for the model values in Fig. 5c, from the predicted Hamiltonian of that state. The test band overlays (Supplementary Fig. S5) solve the generalized eigenproblem on the stored predicted and reference Hamiltonians with the stored overlap matrices, at four path nodes and twelve off-axis points per graph.

For the counterfactual test (Supplementary Fig. S4d) we drew, with a fixed seed (20261002), 200 of the 204 test graphs that are antiferromagnetic-like and contain a magnetic atom with 0<U<80 < U < 8 eV. Three copies changed only the conditioning inputs (every UU set to 0; every UU between 0 and 8 eV set to 8 eV; every spin set along +z+z) and were evaluated with the same checkpoint, runtime settings and metric code. The stored DFT+UU targets and H0H^0 were left unchanged while only the conditioning inputs were altered. The unmodified copy reproduces the original test errors exactly.

DFT+UU reference calculations

All first-principles references were computed with OpenMX 3.9 full self-consistent SCF with the Dudarev UeffU_{\mathrm{eff}} correction [5, 32]. The application uses a 45-element UeffU_{\mathrm{eff}} table (31 d-channel and 14 f-channel entries, Supplementary Table S5 and Supplementary Fig. S7). Its 8 entries for La, Lu, Tb, Dy, Ho, Er, Tm and Yb exceed the trained window of 8 eV and are extrapolations; the 43-candidate calibration uses only the in-window d-channel subset (Ueff≤6.4U_{\mathrm{eff}} \le6.4 eV). For each calibration candidate we converged a set of magnetic configurations, the ferromagnetic configuration plus antiferromagnetic configurations generated deterministically from the structure, on fully scaled cells; the first antiferromagnetic configuration in this order is AFM1. The ground state is the lowest configuration after normalization to the parent cell, and a near-degeneracy flag comes from the per-magnetic-atom gap to the opposite-label competitor (gate at 1.0 meV). Supplementary Table S3 is the full ledger and Supplementary Table S4 lists the adjudicated candidates. The 43 candidates are GNoME structures from the top of the model’s rankings, and their reduced compositions do not occur among the 24,774 reduced compositions of the training structures (pymatgen[50] check). Ag3RuO4\mathrm{Ag}_{3}\mathrm{RuO}_{4} and the controls are Materials Project compounds whose compositions do occur in training, and they are reported separately for that reason.

Validation criteria and controls

A screening gate fixed before any DFT+U result was seen accepts a screened altermagnet candidate only with a self-consistent antiferromagnetic ground state and sustained moment, symmetry-permitted altermagnetism and a same-band splitting at least three times the model’s band error on that structure; it decides which candidates are prioritized. The validation verdict uses DFT+U quantities only: both magnetic states converged with the antiferromagnetic state lowest, a sustained moment, a spin-group classification that permits altermagnetism[47], and a nonzero spin splitting of the DFT+U bands of the antiferromagnetic state, measured as defined above. A candidate whose antiferromagnetic splitting is confirmed but whose ground state could not be settled is recorded as partial. The 24 GNoME candidates were run with the tabulated UeffU_{\mathrm{eff}} of each element, in DFT+U and in the model alike.

The ferromagnetic references were first started from the occupations of the screening inputs, which carry no moment. For the 14 candidates whose first reference failed or collapsed they were rerun from polarized moments (the antiferromagnetic magnitudes, all aligned, total occupation per site unchanged) with otherwise identical settings, and with Kerker-preconditioned mixing as a second variant. By a rule fixed before the result, the same rerun was applied to NdLuAl2(Co3B)2\mathrm{NdLuAl}_{2}(\mathrm{Co}_{3}\mathrm{B})_{2}, whose first ferromagnetic reference had converged only to a low-moment solution. Where the two variants converge to different ferromagnetic solutions, the lower one is the reference. A run counts as converged when the band energy changes by less than 10−710^{-7} Hartree between steps, has moved by less than 1 meV over the five preceding steps and the density residual has fallen at least a thousandfold during the run. A candidate whose rerun converges below the antiferromagnetic state is negative; one whose rerun converges above it, with its moments kept, passes this step; one for which neither variant converges is partial. The convergence record of each rerun is in Supplementary Note 7.

The primitive-cell comparison sets AFM1 only against the ferromagnetic state. For the seven candidates that passed it we therefore converged, under a protocol fixed before the results, the two antiferromagnetic configurations of a doubled supercell generated deterministically from the structure, each against AFM1 in the same supercell. These runs used the k-point density of the primitive 6×6×66 \times6 \times6 mesh, the production input, a cold start, the convergence rule above and the same reruns. A candidate stays validated when AFM1 is lowest and beats every other configuration by more than 1.0 meV per magnetic atom and by more than the energy swing of either run over its last five steps. A lower configuration that is not altermagnetic makes it negative; a margin inside these bounds, or a required configuration that stays unconverged after these reruns, makes it partial. AFM1 stayed lowest in five candidates, with the next configuration 83 to 1,169 meV per parent cell higher.

The spin-group class comes from FindSpinGroup[51, 52, 53] on the converged antiferromagnetic state, read on the transition-metal sublattice that carries the splitting, with moment magnitudes averaged over each crystallographic orbit of the non-magnetic structure so that sub-0.1 μB\mu_{\mathrm{B}} scatter between equivalent sites does not break the symmetry; where a rare-earth 4f moment is present it is uncompensated and the full state is ferrimagnetic. Two variants of this rule are reported in Supplementary tbl:S4 and Supplementary Note 7; comparing the multisets of up and down moment magnitudes per element gives the same verdict for all five validated candidates. NiO and MnO were run through the identical gate as negative controls. Ag3RuO4\mathrm{Ag}_{3}\mathrm{RuO}_{4} was converged in the ferromagnetically seeded and AFM1 states at Ueff=0U_{\mathrm{eff}} = 0, 2, 4, 6, 8 and 10 eV, compared with the model on the same k path at each UU, and classified with spinspg/amcheck (space group P4122P4_{1}22, four Ru sites).

Exchange couplings and magnetic order

Exchange couplings JijJ_{ij} are extracted with TB2J[44] from the predicted Hamiltonian of the ferromagnetic reference configuration (Green's-function formula[45], 7×7×77 \times7 \times7 k mesh, per-material cutoff). The DFT-side couplings for the parity use the same settings on the converged OpenMX Hamiltonian of the same reference configuration, with bonds paired by sites and lattice vector. Only isotropic couplings are used. The zero-temperature order of each material comes from simulated annealing[54] of the isotropic Heisenberg model on the learned couplings (Supplementary Note 2). The candidate rankings ran the frozen model on GNoME structures[18] in their predicted ground-state configuration, and the spin-group class follows the spin-space-group formalism[52, 53].

Computational cost

Timings refer to the 32-atom Ag3RuO4\mathrm{Ag}_{3}\mathrm{RuO}_{4} cell at U = 4 eV. The DFT+U reference is the mean of 12 self-consistent OpenMX runs on 55 MPI ranks (316.3 s). The model timing is the warm compute core on one NVIDIA H100 GPU (30.4 s for graph construction, the forward pass and conversion of the predicted blocks to the OpenMX format), of which the forward pass takes 2.5 s. A single wrapped call that includes start-up and model loading took 420.2 s, which is not faster than one DFT+U calculation; the saving requires reusing the loaded model across queries. The comparison spans different hardware and one structure, and it is not a scaling measurement.

Data availability

The data that support the findings of this study are available from the corresponding authors on reasonable request.

Code availability

The code is available at https://github.com/QuantumLab-ZY/HamGNN.

Acknowledgements

We acknowledge financial support from the National Key Research and Development Program of China (grant no. 2022YFA1402901, H.X.), NSFC (grant no. 12504262, Y.Z.), NSFC (grant no. 12188101, H.X.), Shanghai Science and Technology Program (grant no. 23JC1400900, H.X.), the Guangdong Major Project of the Basic and Applied Basic Research (Future functional materials under extreme conditions—grant no. 2021B0301030005, H.X.), Shanghai Pilot Research—Fudan University 21TQ1400100 (grant no. 23TQ017, H.X.), the robotic AI-Scientist platform of Chinese Academy of Sciences (H.X.) and New Cornerstone Science Foundation (H.X.).

Competing interests

The authors declare no competing interests.

References

  1. [1]Jungwirth, T., Marti, X., Wadley, P. & Wunderlich, J. Antiferromagnetic spintronics. Nature Nanotechnology 11, 231–241 (2016).DOI
  2. [2]Šmejkal, L., Sinova, J. & Jungwirth, T. Emerging research landscape of antiferromagnetism. Physical Review X 12, 040501 (2022).arxiv.org/abs/2204.10844
  3. [3]Li, X., Wu, X., Li, Z., Yang, J. & Hou, J. G. Bipolar magnetic semiconductors: a new class of spintronics materials. Nanoscale 4, 5680 (2012).DOI
  4. [4]Anisimov, V. I., Zaanen, J. & Andersen, O. K. Band theory and Mott insulators: Hubbard U instead of Stoner I. Physical Review B 44, 943–954 (1991).pubmed.ncbi.nlm.nih.gov/9999600
  5. [5]Dudarev, S. L., Botton, G. A., Savrasov, S. Y., Humphreys, C. J. & Sutton, A. P. Electron-energy-loss spectra and the structural stability of nickel oxide: An LSDA+U study. Physical Review B 57, 1505–1509 (1998).
  6. [6]Cococcioni, M. & de Gironcoli, S. Linear response approach to the calculation of the effective interaction parameters in the LDA+U method. Physical Review B 71, 035105 (2005).DOI
  7. [7]Himmetoglu, B., Floris, A., de Gironcoli, S. & Cococcioni, M. Hubbard-corrected DFT energy functionals: The LDA+U description of correlated systems. International Journal of Quantum Chemistry 114, 14–49 (2014).DOI
  8. [8]Horton, M. K., Montoya, J. H., Liu, M. & Persson, K. A. High-throughput prediction of the ground-state collinear magnetic order of inorganic materials using density functional theory. npj Computational Materials 5, 64 (2019).DOI
  9. [9]Butler, K. T., Davies, D. W., Cartwright, H., Isayev, O. & Walsh, A. Machine learning for molecular and materials science. Nature 559, 547–555 (2018).DOI
  10. [10]Schütt, K. T., Gastegger, M., Tkatсhenko, A., Müller, K.-R. & Maurer, R. J. Unifying machine learning and quantum chemistry with a deep neural network for molecular wave-functions. Nature Communications 10, 5024 (2019).
  11. [11]Unke, O. T. et al. SE(3)-equivariant prediction of molecular wavefunctions and electronic densities. In Advances in Neural Information Processing Systems 34 (NeurIPS 2021) (2021).arxiv.org/abs/2106.02347
  12. [12]Li, H. et al. Deep-learning density functional theory Hamiltonian for efficient ab initio electronic-structure calculation. Nature Computational Science 2, 367–377 (2022).DOI
  13. [13]Gong, X. et al. General framework for e(3)-equivariant neural network representation of density functional theory Hamiltonian. Nature Communications 14, 2848 (2023).
  14. [14]Zhong, Y., Yu, H., Su, M., Gong, X. & Xiang, H. Transferable equivariant graph neural networks for the Hamiltonians of molecules and solids. npj Computational Materials 9, 182 (2023).DOI
  15. [15]Yu, H., Xu, Z., Qian, X., Qian, X. & Ji, S. Efficient and equivariant graph networks for predicting quantum Hamiltonian. In Proceedings of the 40th International Conference on Machine Learning, PMLR 202 (2023).arxiv.org/abs/2306.04922
  16. [16]Zhong, Y. et al. Universal machine learning Kohn–Sham Hamiltonian for Materials. Chinese Physics Letters 41, 077103 (2024).DOI
  17. [17]Wang, Y. et al. Universal materials model of deep-learning density functional theory Hamiltonian. Science Bulletin 69, 2514–2521 (2024).DOI
  18. [18]Merchant, A. et al. Scaling deep learning for materials discovery. Nature 624, 80–85 (2023).DOI
  19. [19]Li, H. et al. Deep-learning electronic-structure calculation of magnetic superstructures. Nature Computational Science 3, 321–327 (2023).DOI
  20. [20]Zhong, Y., Zhang, B., Yu, H., Gong, X. & Xiang, H. Accelerating the electronic-structure calculation of magnetic systems by equivariant neural networks. Preprint at https://arxiv.org/abs/2306.01558 (2023).
  21. [21]Yu, H. et al. Complex spin Hamiltonian represented by an artificial neural network. Physical Review B 105, 174422 (2022).DOI
  22. [22]Yu, H. et al. Spin-dependent graph neural network potential for magnetic materials. Physical Review B 109, 144426 (2024).DOI
  23. [23]Yu, H. et al. Physics-informed time-reversal equivariant neural network potential for magnetic materials. Physical Review B 110, 104427 (2024).
  24. [24]Eckhoff, M. & Behler, J. High-dimensional neural network potentials for magnetic systems using spin-dependent atom-centered symmetry functions. npj Computational Materials 7, 170 (2021).DOI
  25. [25]Novikov, I., Grabowski, B., Körmann, F. & Shapeev, A. Magnetic moment tensor potentials for collinear spin-polarized materials reproduce different magnetic states of bcc Fe. npj Computational Materials 8, 13 (2022).arxiv.org/abs/2012.12763
  26. [26]Rinaldi, M., Mrovec, M., Boch karev, A., Lysogorskiy, Y. & Drautz, R. Non-colliner magnetic atomic cluster expansion for iron. npj Computational Materials 10, 12 (2024).arxiv.org/abs/2305.15137
  27. [27]Yang, T. et al. Deep learning illuminates spin and lattice interaction in magnetic materials. Physical Review B 110, 064427 (2024).arxiv.org/abs/2304.09606
  28. [28]Zhong, Y., Wang, R., Gong, X. & Xiang, H. A universal spin–orbit-coupled Hamiltonian model for accelerated quantum material discovery. Nature Machine Intelligence 8, 403–414 (2026).arxiv.org/abs/2504.19586
  29. [29]Deng, B. et al. CHGNet as a pretrained universal neural network potential for charge-informed atomistic modelling. Nature Machine Intelligence 5, 1031–1041 (2023).arxiv.org/abs/2302.14231
  30. [30]Ozaki, T. Variationally optimized atomic orbitals for large-scale electronic structures. Physical Review B 67, 155108 (2003).DOI
  31. [31]Ozaki, T. & Kino, H. Numerical atomic basis orbitals from H to Kr. Physical Review B 69, 195113 (2004).DOI
  32. [32]Han, M. J., Ozaki, T. & Yu, J. O(N) LDA+U electronic structure calculation method based on the nonorthogonal pseudoatomic orbital basis. Physical Review B 73, 045110 (2006).DOI
  33. [33]Geiger, M. & Smidt, T. e3nn: Euclidean neural networks. Preprint at https://arxiv.org/abs/2207.09453 (2022).
  34. [34]Thomas, N. et al. Tensor field networks: Rotation- and translation-equivariant neural networks for 3D point clouds. Preprint at https://arxiv.org/abs/1802.08219 (2018).
  35. [35]Batzner, S. et al. E(3)-equivariant graph neural networks for data-efficient and accurate interatomic potentials. Nature Communications 13, 2453 (2022).DOI
  36. [36]Bharadwaj, V., Glover, A., Buluç, A. & Demmel, J. An efficient sparse kernel generator for O(3)-Equivariant deep networks. In 2025 Proceedings of the Conference on Applied and Computational Discrete Algorithms (ACDA), 32–46 (Society for Industrial and Applied Mathematics, 2025).arxiv.org/abs/2501.13986
  37. [37]Jain, A. et al. Commentary: The Materials Project: A materials genome approach to accelerating materials innovation. APL Materials 1, 011002 (2013).DOI
  38. [38]Gallego, S. V. et al. MAGNDATA: towards a database of magnetic structures. I. the commensurate case. Journal of Applied Crystallography 49, 1750–1776 (2016).DOI
  39. [39]Loshchilov, I. & Hutter, F. Decoupled weight decay regularization. In International Conference on Learning Representations (ICLR) (2019).
  40. [40]Kingma, D. P. & Ba, J. Adam: A method for stochastic optimization. In International Conference on Learning Representations (ICLR) (2015).arxiv.org/abs/1412.6980
  41. [41]Liu, J. et al. Muon is scalable for LLM training. Preprint at https://arxiv.org/abs/2502.16982 (2025).
  42. [42]Bernstein, J. & Newhouse, L. Old optimizer, new norm: An Anthology. Preprint at https://arxiv.org/abs/2409.20325 (2024).
  43. [43]Krempaský, J. et al. Altermagnetic lifting of Kramers spin degeneracy. Nature 626, 517–522 (2024).arxiv.org/abs/2308.10681
  44. [44]He, X., Helbig, N., Verstraete, M. J. & Bousquet, E. TB2J: A python package for computing magnetic interaction parameters. Computer Physics Communications 264, 107938 (2021).DOI
  45. [45]Liechtenstein, A. I., Katsnelson, M. I., Antropov, V. P. & Gubanov, V. A. Local spin density functional approach to the theory of exchange interactions in ferromagnetic metals and alloys. Journal of Magnetism and Magnetic Materials 67, 65–74 (1987).DOI
  46. [46]Wilson, E. B. Probable inference, the law of succession, and statistical inference. Journal of the American Statistical Association 22, 209–212 (1927).DOI
  47. [47]Smolyanyuk, A., Šmejkal, L. & Mazin, I. I. A tool to check whether a symmetry-compensated collinear magnetic material is antiferro- or altermagnetic. SciPost Physics Codebases 30 (2024).arxiv.org/abs/2401.08784
  48. [48]Yu, H., Zhong, Y., Ji, J., Gong, X. & Xiang, H. Time-reversal equivariant neural network potential and Hamiltonian for magnetic materials. Preprint at ChemRxiv (2022).DOI
  49. [49]Yaida, S. Fluctuation-dissipation relations for stochastic gradient descent. In International Conference on Learning Representations (ICLR) (2019).arxiv.org/abs/1810.00004
  50. [50]Ong, S. P. et al. Python Materials Genomics (pymatgen): A robust, open-source python library for materials analysis. Computational Materials Science 68, 314–319 (2013).DOI
  51. [51]Yu, Y. et al. Identifying oriented spin space groups and related physical properties using an online platform FINDSPINGROUP. National Science Review nwag614 (2026).DOI
  52. [52]Liu, P., Li, J., Han, J., Wan, X. & Liu, Q. Spin-Group symmetry in magnetic Materials with negligible Spin-Orbit coupling. Physical Review X 12, 021016 (2022).DOI
  53. [53]Jiang, Y. et al. Enumeration of Spin-Space groups: Toward a complete description of symmetries of magnetic orders. Physical Review X 14, 031039 (2024).DOI
  54. [54]Kirkpatrick, S., Gelatt, C. D. & Vecchi, M. P. Optimization by simulated annealing. Science 220, 671–680 (1983).pubmed.ncbi.nlm.nih.gov/17813860

Paper details

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

views · 5

downloads · 0

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

  • Physics and Astronomy

Not recorded for this paper

View statement
Looking for related papers…
Contents