McGill's Graph Transformer Cracks Quantum Physics' Most Expensive Loop
A graph transformer neural network learns to solve impurity problems inside quantum embedding loops, matching exact diagonalization on the Anderson Lattice Model.
ProTakeaways
- Graph transformer NQS built as impurity solver for ghost Gutzwiller quantum embedding, paper here
- Matches exact diagonalization on Anderson Lattice Model across metallic and Mott insulating regimes
- Uses GATv2 attention on orbital graphs plus occupation and positional embeddings for wave function
- Two-metric error control system (E-tol for optimization, P-tol for sampling) stabilizes self-consistency loop
- Bottleneck is Monte Carlo property sampling, not neural network training, needing roughly 10^8 samples
- Code released at github.com/floatingCatty/Hubbard, built on top of quantax VMC package
A team from McGill, National Chung Cheng University, the Flatiron Institute, and RIT has plugged a neural network wave function into one of the harder loops in condensed matter physics, the quantum embedding self-consistency cycle. Their new paper shows a graph transformer based Neural Quantum State (NQS) can act as a drop-in impurity solver inside the ghost Gutzwiller Approximation (gGA) framework, hitting the same numbers as exact diagonalization on the Anderson Lattice Model. The twist is where the compute actually goes, and it is not where most ML people would guess.
The bottleneck nobody wanted to solve
Strongly correlated materials, things like heavy fermion compounds and Mott insulators, are hard because you cannot treat electrons as independent particles. Quantum embedding methods handle this by describing each fragment of interacting orbitals through an effective embedding Hamiltonian, where the complex environment is replaced by a simpler entangled quantum bath, with self-consistency conditions linking the effective model back to the original system. The fragment is small but interacting, and solving it repeatedly is the expensive part.
Current impurity solvers include exact diagonalization, Numerical Renormalization Group, DMRG, tensor networks, and Quantum Monte Carlo, but their computational complexity often limits their application to practically relevant systems. Neural Quantum States are appealing because they scale better with the number of orbitals, but nobody had shown they were numerically stable enough to sit inside an outer self-consistent loop without exploding.
Graphs, not just transformers
The architecture is worth looking at. Transformer models capture global interactions via attention but scale as O(N^3) in the number of sites. The authors instead adopt a graph convolutional ansatz that exploits the sparse connectivity of impurity models. Orbitals become graph nodes and single particle interactions become edges. Node messages are initialized as orbital occupation vectors, then passed through an occupation positional encoding layer that maps the four possible on-site occupations to different vector embeddings, similar to token embeddings in NLP. The main body uses GATv2 graph attention blocks, each combining a graph attention layer with a feedforward network and residual connections, mimicking a transformer. The output is two real scalars representing the wave function amplitude and complex phase.

The wave function is optimized via variational Monte Carlo using stochastic reconfiguration based on the recently proposed MinSR and SPRING methods to stabilise and accelerate the calculation, and the ansatz itself builds on the Neural Network Pfaffian for handling fermionic antisymmetry.
Keeping the loop from blowing up
The novel engineering contribution is an error control system with two knobs. Wave function optimization error is the discrepancy between the converged NQS wave function and the true ground state. The natural diagnostic is the energy variance, which must vanish for an exact eigenstate. But raw variance depends on system size, so they use a normalized dimensionless V-score, and call the resulting metric E-tol. A second metric, P-tol, controls the statistical noise when sampling physical observables to feed back into the outer embedding loop.
This matters because reaching a 0.001 residual for the embedding algorithm requires a 3-sigma error bound below 5x10^-4, which corresponds to on the order of 10^8 configuration samples, often exceeding the computational resources required for the wave function optimization itself.
The numbers
They benchmarked on a single-orbital Anderson Lattice Model on a Bethe lattice, in two physical regimes:
- U = 0.5, a metallic phase with finite spectral density at the Fermi level
- U = 3.0, a Mott insulating phase with an open gap
In the metallic regime both impurity and bath occupations were reproduced accurately, with differences on the order of 10^-3 relative to ED. In the insulating regime the impurity occupation is more sensitive to numerical accuracy, so the default NQS setting shows a larger deviation, while a higher accuracy setting recovers the ED result.

The cost analysis is where the paper gets pointed. The time cost increases by over 100 times when going from P-tol 10^-3 to 10^-4, consistent with the O(1/sqrt(M)) scaling of Monte Carlo uncertainty. For comparison the wave function optimization only takes 1.63, 2.31, and 5.70 seconds per step at the three E-tol levels. In other words, training the neural network is cheap. Sampling from it accurately is what kills you.
What is actually useful here
If you work on strongly correlated electron systems, this gives you a solver whose computational scaling looks friendlier than ED for larger orbital counts, with neural network evaluation scaling as O(N^2) and Monte Carlo sampling scaling as O(N). The obvious target is multi-orbital systems like f-orbital materials, which choke traditional solvers.
Limitations are honest and specific:
- Convergence in the Mott regime is more delicate than in the metallic regime and needs tighter tolerances
- Enforcing spin symmetries is currently handled with a Hamiltonian penalty term and post-hoc symmetrization rather than being baked into the ansatz
- Property sampling, not optimization, dominates runtime, so the real research frontier is importance sampling tailored to NQS-VMC
Code is available. The full data and reproduction code are on GitHub at github.com/floatingCatty/Hubbard, using QuSpin for the ED reference solver, and the NQS is built as an extension to the quantax VMC package. The broader message for anyone thinking about coupling neural network solvers to iterative physics workflows: the neural network is probably not your problem. The Monte Carlo estimator sitting on top of it is.