Predicting magnetism with first-principles AI
Authors
Max Geier, Liang Fu
Abstract
Computational discovery of magnetic materials remains challenging because magnetism arises from the competition between kinetic energy and Coulomb interaction that is often beyond the reach of standard electronic-structure methods. Here we tackle this challenge by directly solving the many-electron Schrödinger equation with neural-network variational Monte Carlo, which provides a highly expressive variational wavefunction for strongly correlated systems. Applying this technique to transition metal dichalcogenide moiré semicondutors, we predict itinerant ferromagnetism in WSe$_2$/WS$_2$ and an antiferromagnetic insulator in twisted $Γ$-valley homobilayer, using the same neural network without any physics input beyond the microscopic Hamiltonian. Crucially, both types of magnetic states are obtained from a single calculation within the $S_z=0$ sector, removing the need to compute and compare multiple $S_z$ sectors. This significantly reduces computational cost and paves the way for faster and more reliable magnetic material design.
Concepts
The Big Picture
Imagine trying to find the lowest point in a vast mountain range while blindfolded. You can only feel the ground immediately beneath your feet, and the landscape has millions of peaks and valleys. That’s roughly the challenge facing physicists who want to predict whether a new material will be magnetic.
Magnetism seems deceptively simple — stick a magnet to your refrigerator and it just works. But at the quantum level, magnetism emerges from a delicate tug-of-war between two competing forces: the kinetic energy that wants electrons to roam freely, and the electrical repulsion that makes electrons push each other apart.
These forces operate at vastly different energy scales, and the magnetic state a material settles into is often a whisper atop a roar, nearly impossible to resolve with standard computational methods. Techniques like density functional theory (a widely used approach that handles electron interactions only approximately) routinely fail to predict whether a material is actually magnetic.
MIT physicists Max Geier and Liang Fu have turned to neural networks to cut through this complexity, directly solving the quantum equations that govern electrons in real materials and predicting two completely different kinds of magnetism from scratch, without any physics assumptions baked in.
Key Insight: A single neural network, trained by pure energy minimization with no prior physics knowledge, can spontaneously discover whether a material is magnetic and what kind of magnet it will be.
How It Works
The approach centers on neural-network variational Monte Carlo (NN-VMC), a technique that encodes the quantum wavefunction (the mathematical object describing all possible states of every electron simultaneously) inside a neural network. Instead of approximating electron-electron interactions, NN-VMC confronts them head-on.

Here’s the basic workflow:
- Define the Hamiltonian. Write down the microscopic equations governing the electrons: their kinetic energy, mutual repulsion, and the periodic potential of the crystal lattice. (The Hamiltonian is the formal expression for the system’s total energy.) No assumptions about spin ordering, no physics-informed initialization.
- Parameterize the wavefunction. Represent the many-electron wavefunction as a sum of determinants, a structure that enforces the quantum rule that no two electrons can occupy the same state. The orbitals in these determinants are computed by a transformer neural network, the same architecture behind modern language models, repurposed here to approximate quantum states.
- Minimize the energy. Train the network to find the lowest possible energy. It learns the ground state on its own, guided only by the equations of quantum mechanics.
- Read off the magnetism. Compute the total spin ⟨S²⟩ and staggered magnetization (a measure of whether neighboring atoms have parallel or opposing spins) from the trained wavefunction. If ⟨S²⟩ > 0, you have a magnet; the spatial pattern reveals whether it’s ferromagnetic or antiferromagnetic.
The critical technical trick involves the Sz = 0 sector, a constraint that keeps up-spin and down-spin electrons equal so the system appears overall non-magnetic going in. Conventional methods compute the ground state in each spin sector separately and compare energies, which is expensive and error-prone.
Geier and Fu recognized that all possible magnetization values can in principle be accessed from a single calculation in this sector. The network can find a magnetically ordered state, with spins spontaneously aligning in the x-y plane, starting from this apparently non-magnetic configuration purely by following the energy gradient downhill.
The materials studied are moiré semiconductors: atomically thin crystals stacked with a slight twist or lattice mismatch, creating a long-wavelength interference pattern that fundamentally alters how electrons behave. These systems have become a hotbed for exotic quantum phases because their properties can be tuned electrically. Here, the specific systems are WSe₂/WS₂ heterobilayers and twisted Γ-valley homobilayers of WS₂, MoS₂, and MoSe₂.

For WSe₂/WS₂, NN-VMC predicts itinerant ferromagnetism, a metallic state where electrons remain delocalized but collectively align their spins. This is the same phenomenon behind iron’s magnetism. For the homobilayer system, it finds an antiferromagnetic insulator, where electrons localize and neighboring sites develop opposing spin orientations. Two completely different magnetic phases, from the same framework, from the same fundamental equations.
Why It Matters
The stakes extend well beyond academic curiosity. Powerful permanent magnets, the kind driving electric motors and wind turbines, currently depend on rare-earth elements like neodymium and samarium. These materials are geopolitically sensitive and environmentally costly to mine. Finding rare-earth-free alternatives requires understanding what makes a material magnetic before synthesizing it, which demands exactly the kind of reliable predictive theory that has so far eluded computational physics.
Beyond the specific materials, the results show that neural networks trained purely on first-principles physics can discover qualitatively different ground states without human guidance. The same network that finds ferromagnetism in one material finds antiferromagnetism in another — not because it was told to, but because the energy landscape demanded it. As moiré systems continue to reveal new quantum phases (superconductivity, Mott insulators, Wigner crystals), tools that can navigate that energy landscape reliably will be essential. Working within the Sz = 0 sector alone makes the method significantly more practical for screening candidate materials at scale.
Bottom Line: By combining transformer neural networks with variational quantum mechanics, Geier and Fu have built a first-principles compass for magnetic materials — one that finds the right answer without being told what to look for, and does it more efficiently than any prior method.
IAIFI Research Highlights
The work brings together transformer architectures from machine learning and the variational Monte Carlo formalism from quantum many-body physics, showing that AI tools originally developed for language can solve fundamental equations of quantum mechanics in real materials.
A single neural network autonomously identifies qualitatively distinct quantum phases, both ferromagnetic and antiferromagnetic, purely through energy minimization. This positions neural-network wavefunctions as a general-purpose tool for strongly correlated electron systems.
By directly solving the many-electron Schrödinger equation in moiré semiconductors without approximation, the method sidesteps longstanding failures of density functional theory and Hartree-Fock in predicting magnetic order driven by subtle exchange-correlation effects.
Future work can extend this framework to screen rare-earth-free permanent magnet candidates and probe other correlated phases in moiré heterostructures. The full paper is available at [arXiv:2602.09093](https://arxiv.org/abs/2602.09093) (submitted February 2026), from the Liang Fu group at MIT.