Paper commentary
UniHam: A Large-Scale SOC-Complete Dataset and Benchmark for Hamiltonian Learning in Materials
UniHam provides a SOC-complete Hamiltonian dataset for materials learning
- Problem Existing Hamiltonian datasets are small and often omit spin-orbit coupling, which heavy-element materials need. Without it, the relativistic effects in those materials are missed.
- Method UniHam labels 100,000+ crystals with DFT Hamiltonians computed with full spin-orbit coupling. The authors use OpenMX, whose localized orbitals give compact matrices that suit graph models.
- Results On the benchmark, HamGNN reached 1.50 meV total Hamiltonian MAE, against 2.44 meV for DeepH-pack.

Figure 1 : Overview of the UniHam Benchmark Framework. The pipeline consists of three stages: (1) Data Generation: Con- structing high-quality Hamiltonian labels using relativistic DFT (OpenMX) with full Spin-Orbit Coupling (SOC) and DFT+U corrections. (2) Benchmarking: Training representative models (HamGNN, DeepH) on the UniHam dataset containing 100k+ complex-valued Hamiltonians. (3) Comprehensive Evaluation: Assessing model performance across three dimensions: Hamil- tonian Reconstruction (MAE), Out-of-Distribution (OOD) Generalization (testing both unseen elements and varying atom counts), and Downstream Physical Properties (Bandgaps, Band structures, and DOS near the Fermi level).
Original paper · CC BY 4.0 · Yuewen Huang, Pin Chen, Yutong Lu · UniHam: A Large-Scale SOC-Complete Dataset and Benchmark for Hamiltonian Learning in Materials · Original paper figure · Extracted the figure area from page 2 of the original PDF.Why Hamiltonian learning lacks data
Machine-learning surrogates for DFT usually predict scalar targets such as total energy or band gaps. The electronic Hamiltonian matrix carries more information, because a single diagonalization of one accurate matrix yields band structures and DOS. The bottleneck is the label itself, since a Hamiltonian is a high-dimensional, symmetry-constrained matrix.
Building that label requires fully self-consistent electronic-structure calculations, which makes large-scale curation substantially more expensive than collecting energies or forces.
Spin-orbit coupling (SOC) is the gap that existing collections handle worst. Without SOC, Hamiltonians stay real-valued, which misses the relativistic effects that heavy-element, magnetic and topological materials need. With SOC, complex-valued spin-mixing terms appear and the matrix dimension effectively doubles. That raises both data-generation cost and learning difficulty, so the community lacks an open, large-scale, SOC-complete dataset.
The DeepH-style set of 12,062 structures was built from Materials Project under explicit filtering rules, yet it was not released as a public benchmark. The HamGNN set of about 44k structures is likewise not publicly available. Materials-HAM-SOC offers an open SOC-inclusive option, but it covers only about 17k crystals. Because no open set combined scale and SOC completeness, the authors set out to build UniHam with 100k+ crystals over 72 elements.
One open, SOC-complete label set
Each structure in UniHam is labelled with a complex-valued Hermitian Hamiltonian computed with full SOC. The authors enabled full SOC and non-collinear spin for all structures, regardless of whether they are magnetic. OpenMX builds its basis from localized pseudo-atomic orbitals, which give compact real-space matrices that fit graph-based models without basis transformations.
The calculations use the PBE functional, so the labels depend on that exchange–correlation choice.
The authors applied DFT+U to 3d and 4f elements, with the effective Hubbard parameter Ueff = U − J standardized across the dataset. Pulay mixing starts at weight 0.3, with minimum 0.001 and maximum 0.4, and extrapolation begins after six iterations. Each run is a single electronic evaluation at the input geometry, so the Hamiltonian matches the given structure exactly.
Most structures contain 10 to 60 atoms, and a long tail extends to 444 atoms. The authors report that 66.6% of structures include at least one heavy element with Z ≥ 37. Data came from ICSD (43.0%), Matgen (52.5%) and COD (4.5%), so the sources differ in composition.
Splits, OOD tests and error metrics
Even on 80 GB H100 cards with batch size 1, cells above about 60 atoms failed during back-propagation, so the training pool stops at 60 atoms. The capped pool of about 90,000 structures splits into about 86,000 training, 2,000 validation and 2,000 test structures. Each structure goes into a bin set by its rarest element, and seeded shuffling with seed=42 allocates structures across splits.
Binning this way ensures that rare elements such as Tc and Pm appear in all splits, so test scores aren't trivially poor on unseen species.
OOD-Size keeps the Recon-id model unchanged and tests it on 4,328 structures with 61 to 444 atoms per unit cell. That test asks whether local message-passing architectures transfer to much larger cells without retraining. OOD-Comp instead removes element groups from training and retrains, so the held-out elements are never seen. The three scenarios are In, rare earths and noble gases, and they grow in chemical distance from In.
Each test structure falls into exactly one scenario, which yields 3,111, 845 and 285 test structures for In, RE and NG.
The primary metric is gauge-corrected Hamiltonian MAE, because a global shift changes no downstream physics. The shift is the overlap-weighted average of the difference between predicted and reference Hamiltonians. Band-energy MAE and DOS MAE apply the same gauge idea to eigenvalues and densities inside an energy window. Band gap error is the absolute difference between predicted and DFT-reference gaps for non-metallic structures.
The Pearson correlation adds a shape measure that stays insensitive to uniform shifts.
Two equivariant baselines: DeepH-pack and HamGNN
Both baselines take only the crystal structure as input, without a zeroth-step Hamiltonian. DeepH-pack uses the DeepH-E3 architecture, which reaches E(3)-equivariance through equivariant networks on local atomic neighborhoods. The model uses 3 message-passing blocks, 2 attention heads and a radial cutoff of 10.0 Å.
HamGNN is an O(3)-equivariant network that the authors run with 3 equivariant message-passing layers. Its radial cutoff is 26.0 Bohr (≈13.8 Å), and it uses 64 Bessel radial basis functions with a gate nonlinearity. The authors test two HamGNN variants on the same architecture to isolate the effect of spectral supervision. HamGNN (Base) minimizes only the Hamiltonian matrix element MAE loss.
HamGNN (FT) starts from a second-stage fine-tuning that adds a band-energy loss, which enforces eigenvalue-level constraints.
Eigenvalue-level fine-tuning is built into HamGNN, but DeepH-pack has no matching step. So the authors report only the MAE-trained variant of DeepH-pack, and they don't compare a fine-tuned DeepH-pack. The public DeepH-pack software doesn't natively support datasets above about 10k structures. To train on the full 86k training set, the authors add an epoch-level data sharding strategy to DeepH-pack.
Both models train on 8 NVIDIA H100 GPUs with FP32 precision, and the full hyperparameters appear in Appendix B.
This setup makes the MAE-only comparison fair, while the HamGNN (FT) variant isolates the value of the band-energy loss. The next results use these two models to test reconstruction accuracy on the Recon-id test set.
Reconstruction accuracy on the Recon-id test set
On the Recon-id test set, both models reach sub-3 meV total Hamiltonian MAE, so equivariant networks can learn complex-valued Hamiltonians from structure. HamGNN also has lower error on 96.5% of test structures, so the advantage is not driven by a few outliers. The evaluation splits each error into real, imaginary and total parts, because SOC makes the Hamiltonians complex-valued.
Most of the error sits in the real part, at 2.96 meV for HamGNN and 4.49 meV for DeepH-pack. The imaginary part carries the SOC spin-flip terms, and it is much smaller: 0.0412 meV for HamGNN and 0.385 meV for DeepH-pack. The imaginary-to-real ratio is 1.4% for HamGNN against 8.6% for DeepH-pack, which the authors read as better resolution of fine SOC couplings.
Stratified by SOC strength, both models get worse from the weak to the strong regime. HamGNN rises from 1.10 to 1.74 meV, and DeepH-pack rises from 1.90 to 2.76 meV. HamGNN's medium-4d value of 1.38 meV sits just below its light-3d value of 1.42 meV, so the trend is not strictly steady. The authors attribute the rise to an intrinsic difficulty in learning relativistic effects, not to one architecture.
The hard cases concentrate in strong-SOC, small-cell, high-symmetry phases, which light-element benchmarks would not expose. The authors present this as evidence that UniHam gives a stricter testbed for Hamiltonian learning.
Size and composition generalization
Models trained on cells of at most 60 atoms are tested on much larger unit cells, from 61 to 444 atoms, without retraining. HamGNN reaches an OOD/ID MAE ratio of 0.89 on this system-size task, so its error on the larger cells is slightly below its in-distribution error. DeepH-pack shows a qualitatively similar trend, which the authors attribute to the locality of message passing that ties each block to a local environment.
Because each matrix block depends on a local chemical environment set by a radial cutoff, the global system size matters little.
Compositional tests are much harder, because all structures holding a held-out element are removed from training and the model is retrained. DeepH-pack's ID MAE of 2.89, 3.14 and 5.09 meV for In, RE and NG rises to 22.49, 22.73 and 31.48 meV when those elements are removed from training.
Per-element rare-earth results follow the same ordering across the five held-out lanthanides. DeepH-pack ranges from 19.59 to 26.15 meV across Pr, Nd, Sm, Dy and Ho, while HamGNN ranges from 4.42 to 6.80 meV. The authors call architecture decisive for robustness, because architectural choices that give modest in-distribution gains become decisive for zero-shot compositional generalization.
They didn't test models that combine held-out element groups with larger cells in the same run.
Downstream band gaps, bands and DOS
Diagonalizing a predicted Hamiltonian yields band gaps, band energies and DOS, which get compared with DFT references. The comparison runs inside an energy window: from E_VBM minus 3 eV to E_CBM plus 3 eV for non-metals, and from minus 3 eV to plus 3 eV for metals. HamGNN (Base) reaches a band gap MAE of 1.697 eV, and HamGNN (FT) cuts that error to 0.622 eV.
Band-structure MAE drops from 1.612 to 0.360 eV on the same change. The authors credit this drop to spectral supervision, because FT adds a band-energy stage on top of the Base model.
The Hamiltonian ranking doesn't carry over cleanly, though. HamGNN (Base) reaches 1.50 meV total MAE, against 2.44 meV for DeepH-pack. Its band gap MAE is 1.697 eV, against 1.925 eV for DeepH-pack, so the band gap gap stays small. Band-structure MAE shows the same weak edge: 1.612 eV for HamGNN (Base) against 1.795 eV for DeepH-pack. That is why the authors call Hamiltonian MAE alone an insufficient proxy, and DOS is harder still, with MAE falling only from 7.48 to 4.73 states per eV.
Figure 4 shows three cases, starting with La6Cu2Si2Se14 predicted by HamGNN (Base). That structure reaches a band MAE of 0.028 eV, with La, Cu, Si and Se well represented in training. C4Os4 from the same model reaches a band MAE of 11.4 eV. The authors tie that failure to strong SOC from Os and to its training coverage of about 0.5% of structures.
For Bi4Se4O12F4, HamGNN (FT) largely removes the conduction-band artifacts that HamGNN (Base) produces.

Figure 4 : Qualitative comparison of predicted band structures. (Top left) La 6Cu2Si2Se14 predicted by HamGNN (Base), achieving near-perfect agreement (band MAE = 0.028 eV). (Top right) C 4Os4 predicted by HamGNN (Base), showing severe deviations (band MAE = 11.4 eV) due to strong SOC from Os. (Bottom) Bi 4Se4O12F4 predicted by HamGNN Base (left) vs. HamGNN FT (right), demonstrating how eigenvalue-level fine-tuning corrects conduction-band artifacts.
Original paper · CC BY 4.0Direct-gap screening and transfer to GNoME
Direct-gap semiconductors matter for LEDs, lasers and solar cells because their band edges align at the same crystal momentum, which allows radiative recombination without phonon mediation. Finding them conventionally needs full DFT+SOC calculations for each candidate, which becomes a bottleneck for high-throughput screening. The authors run HamGNN (FT) on the 2,000-structure Prop-id test set, where it flags 1,241 insulators with a predicted band gap above 0.1 eV.
For these insulators, the predicted direct- versus indirect-gap classification agrees with DFT ground truth in 83.4% of cases. No DFT run is needed at inference, because both the Hamiltonian prediction and the diagonalization that yields gap types are model-driven.
The sample follows the Materials Project direct-to-indirect gap ratio, so the screen mirrors realistic screening conditions. Materials Project serves as an independent DFT reference, since it uses different pseudopotentials and exchange–correlation functionals. Of the 720 direct-gap predictions, 92% are confirmed in Materials Project.
The band-gap distribution of these candidates peaks at narrow gaps, with 67.1% falling between 0 and 2 eV, as Table 8 shows. They present the experiment as transfer of an SOC-complete model to an independently constructed dataset, without DFT at inference time. For the authors, spectral-level supervision makes these models actionable for discovery tasks, not only accurate on aggregate metrics.
Where the UniHam results stop
On an NVIDIA H100 with 80 GB and a batch size of 1, structures above about 60 atoms per cell ran out of memory during back-propagation. The authors therefore trained only on cells of at most 60 atoms, and held out 4,328 larger structures for testing. The authors also note that this overhead inflates file sizes and training time, and it limits batch size, model capacity and hyperparameter search.
The benchmark covers only two models, DeepH-pack and HamGNN, and both take the crystal structure as their sole input. NextHAM uses a zeroth-step Hamiltonian, which needs an extra electronic-structure computation beyond the input structure. NextHAM also uses a different DFT software stack, so a direct comparison would mix model capability with representation mismatch.
DeepH-pack was run only in its MAE-trained form, because it lacks the eigenvalue-level fine-tuning that HamGNN offers. So the gain from band-energy supervision shows up for HamGNN alone.
The GNoME transfer test applied the UniHam-trained HamGNN (FT) to 3,000 structures without any retraining. The 720 predicted direct-gap candidates were checked only against Materials Project, where 92% were confirmed. They didn't test other reference databases, so agreement with independent DFT codes is still unverified.
The authors report that both models degrade for heavy elements and strong SOC, and they leave that challenge open. Density of states reconstruction stays harder than band structure prediction, with only moderate correlation even for HamGNN (FT). Hamiltonian MAE alone isn't a sufficient guide to physical fidelity, so the authors call for downstream-aware training objectives.
Paper info
- Authors
- Yuewen Huang, Pin Chen, Yutong Lu
- Venue
- arXiv · Preprint
- First published
- 2026-11-9
- Added
- 2026-11-10
- Updated
- 2026-11-9
- Version
- v1
- arXiv
- 2611.12509
- DOI
- 10.1145/3770855.3817531
- Category
- cs.LG · cond-mat.mtrl-sci
- Original paper terms
- CC BY 4.0
- What we show
- Paper info, commentary and permitted figures from the original paper
AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.
Abstract
Accurate prediction of electronic Hamiltonians would enable broad property inference while avoiding the high computational cost of Density Functional Theory (DFT). However, progress toward general-purpose materials foundation models is limited by a data bottleneck: existing Hamiltonian datasets are typically small, lack structural diversity, and often omit essential relativistic physics such as spin--orbit coupling (SOC). We therefore construct UniHam, a large-scale Hamiltonian dataset and benchmark suite comprising 100,000+ DFT-computed complex-valued Hermitian Hamiltonians with full SOC, covering 72 elements and a wide range of crystal geometries and symmetries (spanning diverse lattice types and space-group families). Building on UniHam, we benchmark two representative state-of-the-art models under a standardized protocol and introduce complementary evaluation metrics that jointly assess three dimensions: (i) Hamiltonian reconstruction accuracy, (ii) out-of-distribution (OOD) generalization across composition/symmetry shifts, and (iii) the ability to support downstream property prediction from the predicted Hamiltonians. Experiments on UniHam demonstrate that the proposed benchmark and metrics effectively differentiate model capabilities, revealing intrinsic SOC- and element-dependent failure modes, large variations in compositional OOD robustness, and the necessity of spectral-level evaluation to assess whether Hamiltonian predictions reliably support downstream electronic-structure properties. Overall, UniHam provides a reproducible, SOC-complete benchmark that can sharpen model comparisons and accelerate the development of next-generation foundation models for quantum materials.
Quote from the paper
Yuewen Huang, Pin Chen, Yutong Lu (2026). UniHam: A Large-Scale SOC-Complete Dataset and Benchmark for Hamiltonian Learning in Materials. arXiv:2611.12509v1. https://doi.org/10.1145/3770855.3817531
BibTeX
@article{huang2026uniham,
title = {{UniHam: A Large-Scale SOC-Complete Dataset and Benchmark for Hamiltonian Learning in Materials}},
author = {Yuewen Huang and Pin Chen and Yutong Lu},
year = {2026},
eprint = {2611.12509},
archivePrefix = {arXiv},
doi = {10.1145/3770855.3817531},
url = {https://arxiv.org/abs/2611.12509v1}
}