electrons learn to dance: A Foundation Model for Quantum Materials
Apr 2026, Yanjiang
A neural network models electron quantum phases in moiré materials, revealing a sharp first-order transition.
What if you could solve the hardest equation in physics not once, but a million times over, and in doing so, watch a liquid freeze into a crystal through the eyes of a machine? That is precisely what a preprint (arXiv:2604.26018) proposes. A team led by Liang Fu at MIT — Khachatur Nazaryan and Fu — has built something they call QERNEL, a neural network that doesn’t just calculate the behavior of electrons in a solid. It learns the entire phase diagram. Throw it a parameter — say, the strength of an electrical potential landscape — and it spits back the ground state, whether that turns out to be a quantum liquid or a frozen electron crystal. And somewhere in between, it discovers a cliff.
We are accustomed to artificial intelligence handling language, folding proteins, generating images that never existed. But solving the Schrödinger equation — the one that governs all of chemistry and condensed matter physics from first principles — has remained a fortress. The reason is simple and brutal. Electrons repel each other. Their fates are entangled in a combinatorial nightmare where the number of possible configurations grows exponentially with every particle you add. For a system of a hundred electrons, writing down the full quantum state would require more numbers than there are atoms in the visible universe. We don’t solve that equation so much as we wrestle it into a corner, making approximations that work beautifully in one setting and collapse in another. QERNEL changes the game by refusing to make a fixed approximation. It makes, instead, a flexible one — conditioned on exactly where in parameter space you ask it to look.
To understand what makes this necessary, consider a semiconductor moiré heterobilayer. That mouthful describes two atom-thin sheets, typically a transition metal dichalcogenide like WSe₂, stacked at a slight twist. The lattice mismatch and the rotation conspire to produce an interference pattern — a moiré — that looks like a honeycomb blown up to a hundred times its natural size. Electrons moving through this landscape feel a gentle, long-wavelength modulation of their potential energy. Turn a knob in the lab — an electric field, pressure, twist angle — and the modulation depth, denoted by the Greek letter lambda, changes. At low lambda, electrons ignore the moiré and form a correlated liquid, a Fermi sea sloshing with quantum fluctuations. At high lambda, they freeze into a generalized Wigner crystal: each electron pinned to a moiré cell, a ghostly lattice of trapped charge. Somewhere in the middle, a phase transition happens. Where, exactly, and how sharply, has been hard to pin down. Traditional computational methods either treat the liquid well and fumble the crystal, or vice versa. To map the transition, you must solve the equation anew at every value of lambda. For a hundred electrons, that is like being asked to redraw a detailed city map every time the traffic lights change.
QERNEL achieves the same accuracy as a leading baseline with six times fewer parameters and trains six times faster. This efficiency leap makes large-scale quantum simulations far more practical and accessible. (Source: arXiv:2604.26018)
QERNEL side-steps this entirely. The architecture is a single neural network — a “weight-shared” model, meaning the same set of learned parameters processes electrons at every value of lambda. What changes is the context. Think of an actor who has memorized not a single script, but the emotional logic of a character so thoroughly that they can improvise convincingly in any scene you drop them into. The context arrives through a technique called FiLM conditioning — Feature-wise Linear Modulation. The moiré potential is encoded as a numerical vector, and this vector tweaks the flow of information through the network at multiple depths, shifting and rescaling the signals that represent electron positions and spins. The network is not recalculating from scratch for each lambda. It is being tuned on the fly, like a radio dial moving across stations without ever losing the signal. This is not will, but a design that allows a single model to interpolate across parameter space.
Interaction energy jumps at a critical threshold, splitting into two distinct branches that reveal a sudden electron reorganization. This sharp transition, from a fluid-like to a crystal-like state, shows how electrons collectively change phase under external forces. (Source: arXiv:2604.26018)
The architecture borrows two efficiency tricks from the world of large language models — and this is where the “Large Electron Model” in the title earns its name. The first is a mixture of experts. Not every pathway through the network is needed for every input. A router examines each electron configuration and decides which subset of specialized sub-networks, or experts, should handle it, plus a small shared expert that always contributes. The result is that the model has the expressive power of a much larger network while only activating a fraction of its parameters per query. Imagine a university where every question is routed to just the right three professors and one generalist, rather than filling a lecture hall with the entire faculty. The second trick is grouped-query attention. In standard attention mechanisms, every “query” — a question about how one electron relates to others — gets its own set of key and value vectors, which store information about what other electrons are doing. That redundancy adds up. Grouped-query attention lets multiple queries share a single set of keys and values, slashing the memory footprint. The combined effect is stark. Against a baseline model called PsiFormer, QERNEL reaches the same accuracy with roughly six to seven times fewer parameters. At comparable size, it trains about six times faster. It is not simply doing the same thing more cheaply; the efficiency itself enables scaling to system sizes — over a hundred electrons — where the baseline would choke.
Then comes the discovery. Having trained a single QERNEL model on a range of lambda values for a 54-electron system, the team plotted the interaction energy per electron as a function of moiré strength. The data split into two almost perfectly straight lines, meeting at a sharp kink near lambda equals 1.05 — not a smooth crossover, not a gradual bend, but an abrupt change in slope. This is the unmistakable signature of a first-order phase transition, where the ground state reorganizes itself catastrophically at a critical threshold. The total energy, by contrast, remained smooth through the same region, exactly as thermodynamics demands for a finite system: it is the internal reorganization, the competition between kinetic and potential terms, that carries the signature. On the weak-lambda side, inferred charge densities showed a uniform, featureless sea — a Fermi liquid. On the strong side, sharp peaks appeared, electrons localizing into the honeycomb cells of the moiré like marbles settling into an egg carton. The model had not been told about phases. It had been shown examples and asked to interpolate. The cliff emerged from the interpolation itself, a genuine discovery rather than a re-verification of known physics.
This changes the conversation. For decades, computational condensed matter physics has lived under a kind of empirical law: you pick your method based on what phase you expect to find, and you pray the method survives the transition. Quantum Monte Carlo techniques, for example, excel at liquid states but suffer from the notorious sign problem when electrons begin to localize. Density functional theory is fast but often fumbles strong correlations. QERNEL sidesteps this by refusing to commit to a single approximation scheme. Its inductive bias — the built-in assumptions about what kinds of wavefunctions are physically reasonable — is general enough to encompass both liquid and crystal. It is not that the model is assumption-free, which is impossible. It is that its assumptions are meta-assumptions: about smoothness, about how information flows through many-body wavefunctions, about the value of sharing computational work across parameter values. This is a philosophical shift as much as a technical one. The question is no longer “what is the ground state for this particular set of conditions,” but “what family of ground states lives in this region of parameter space, and how are they connected.” It is the difference between taking a single photograph and filming a movie.
But we should pause. The rhetorical arc of “AI discovers physics” is seductive and also dangerous. A neural network that finds a kink in interaction energy has not, in any meaningful sense, understood the phase transition. It has interpolated a function that has a kink. The discovery is real — the data point to a sharp reorganization — but the interpretation of that reorganization as a Wigner crystallization came from the researchers, not the network. The machines are not doing physics. They are doing function approximation that we, the human physicists, recognize as physics. This is not a failure of computation, but a difference in kind — the same difference that separates a library from a librarian.
That distinction matters because of where this is headed. The paper explicitly frames QERNEL as a step toward a “Large Electron Model” — a foundation model for solids, parallel in spirit to the large language models that have transfigured artificial intelligence. The analogy is imperfect in ways that are illuminating. A language model trained on the internet can, with enough scale, produce passable translations of languages it was never explicitly taught, because languages share deep structural regularities. The hope for a Large Electron Model is that electrons in different materials — moiré heterobilayers, twisted cuprates, strange metals — might also share deep structural regularities in how their wavefunctions organize. A model trained on a variety of Hamiltonians might, at sufficient scale, generalize to systems it has never seen. This is an open question, not a settled thesis. Unlike human languages, which evolved in a shared cognitive bottleneck, quantum systems can be genuinely, radically different from one another. A Fermi liquid and a spin liquid may have less in common than English and Japanese. The scaling laws that govern language models may not transfer.
But the direction is clear, even if the timeline remains uncertain. QERNEL demonstrates that parameterized, conditional neural wavefunctions can capture sharp phase transitions in systems large enough to be physically nontrivial, and it does so with an efficiency that leaves room to scale. The team envisions extending the architecture to handle more electronic bands, more lattice geometries, and eventually entirely different materials systems. Perhaps one day, when a condensed matter physicist wants to know whether a newly fabricated heterostructure will be a metal or an insulator, they will query a Large Electron Model, much as a structural biologist now queries AlphaFold to predict a protein’s shape. The model will have learned, from thousands of prior calculations, the subtle choreography of electron correlation that determines the difference between flow and freeze.
There is, in this vision, something almost vertiginous. The Schrödinger equation was written down in 1926. For a century, we have solved it piecemeal, system by system, approximation by approximation, always knowing that the exact solution for more than a handful of interacting particles lies beyond human reach. QERNEL does not give us the exact solution either. But it gives us something arguably more valuable: a single viewpoint from which to survey an entire phase diagram, revealing not just individual states but the boundaries between them. The cliff emerges not because someone programmed it in, but because electrons, collectively, refuse to change their minds gradually. They reorganize catastrophically, and a sufficiently flexible neural network — one that has learned the family resemblance across a continuum of Hamiltonians — catches the moment it happens. The road ahead will require larger models, more diverse training data, and rigorous benchmarks to separate interpolation from genuine extrapolation. But for now, we have seen something new: a machine watching a quantum liquid freeze into a crystal, and telling us where the ice begins.
Yanjiang is an online editor of Loom Science
References
- Khachatur Nazaryan et al., QERNEL: a Scalable Large Electron Model, arXiv:2604.26018


