Skip to main content
Nature Communications logoLink to Nature Communications
. 2026 Jun 22;17:7838. doi: 10.1038/s41467-026-74028-6

Solving the Hubbard model with neural quantum states

Yuntian Gu 1,2,#, Wenrui Li 1,2,#, Heng Lin 2,3,#, Bo Zhan 2,4,#, Ruichen Li 1,2, Yifei Huang 2, Di He 1, Yantao Wu 4,✉, Tao Xiang 4,✉, Mingpu Qin 5,✉, Liwei Wang 1,✉, Dingshun Lv 2,6,✉
PMCID: PMC13439271  PMID: 42331803

Abstract

The rapid development of neural quantum states (NQS) has established it as a promising framework for studying quantum many-body systems. In this work, by leveraging the transformer-based architectures and developing efficient optimization algorithms, we achieve the state-of-the-art results for the doped two-dimensional (2D) Hubbard model, arguably the minimum model for high-Tc superconductivity. Interestingly, we find different attention heads in the NQS ansatz can directly encode correlations at different scales, making it capable of capturing long-range correlations in strongly correlated systems. With these advances, we find evidence for the half-filled stripe in the ground state of 2D Hubbard model with the next nearest neighboring hopping, consistent with experimental observations in cuprates. Our work establishes NQS as a powerful tool for solving challenging many-fermions systems.

Subject terms: Computational science, Electronic properties and materials, Quantum physics


Accurately solving the doped two dimensional Hubbard model is challenging due to strong correlations and finite size effects. Here, the authors present a transformer based neural quantum state with an adaptive optimization scheme that achieves state of the art accuracy on large lattices, capturing stripe ground states and reducing boundary artifacts.

Introduction

The Hubbard model1–3 is the iconic model for studying the correlation effect in many-electron systems. Though its Hamiltonian is simple, the physics it can harbor is extremely rich, including quantum magnetism, Mott insulator, charge and spin density waves, and so on. Following the discovery of cuprate high-Tc superconductors, the two-dimensional (2D) Hubbard model has attracted increasing attention due to its potential connection to the microscopic mechanism of high-Tc superconductivity4,5. The study of the 2D Hubbard model relies mainly on numerical many-body methods due to the lack of analytic solutions. In the past few decades, a variety of many-body methods were developed, including density matrix renormalization group (DMRG)6 and its higher dimension generalization in the language of tensor network states7,8, such as projected entangled pair states (PEPS)9, quantum embedding methods such as dynamical mean-field theory (DMFT)10, density matrix embedding theory (DMET)11, and different flavors of quantum Monte Carlo approaches12–14 and so on. In the past, different methods usually gave inconsistent results due to the limitations of each method15. In recent years, large scale cross-validation has been performed among different methods, and consensus has begun to reach about the ground state of the doped 2D Hubbard model, with16 and without the next nearest neighboring hopping17.

On another front, researchers are also striving to develop more accurate and efficient new methods, aiming to provide more reliable results for strongly correlated systems like the Hubbard model to unveil the underlying exotic physics. In recent years, benefiting from the rapid development in the fields of neural networks and machine learning, Neural Quantum States (NQS) have emerged as a promising approach for solving quantum many-body systems. Significant progress has been made in the development of advanced NQS methods in quantum systems since their inception by Carleo et al.18, which have markedly improved the accuracy of NQS approaches, establishing them as a powerful framework for investigating systems in quantum chemistry19–21 and interacting spin models22–24, as shown in Fig. 1A. In light of these significant achievements, a crucial question arises: how effective is this new paradigm for the study of the more challenging strongly correlated fermionic lattice models?

Fig. 1. Application, architecture, optimization, and performance of Neural Quantum States (NQS) on the Hubbard model.

Fig. 1

A Guided by the variational principle, NQS are powerful and versatile, applicable to a wide range of quantum systems, including ab initio quantum chemistry, spin models, and correlated fermionic models. B Various neural network architectures can be used to construct NQS, with increasing expressivity from Restricted Boltzmann Machines (RBM)25, Multi-Layer Perceptrons (MLP)27,28,32,36 to Transformers. These networks are optimized using methods inspired by quantum information, including Min-SR37,38, SPRING39, and the advanced MARCH method proposed in this work. C A performance comparison of different NQS methods on the 2D Hubbard model, plotting simulation accuracy against system size. We benchmark the accuracy on systems where exact solutions are available (see Supplementary Note 3 for details). This work achieves higher accuracy on larger system sizes than previously reported in other notable NQS studies, demonstrating an advancement in the field.

In this direction, extensive effort has been made to investigate the utilization of NQS methods in the context of the Hubbard model, particularly in the most challenging 2D lightly doped cases. Early attempts to apply NQS approaches to the 2D Hubbard model25,26 faced challenges in accurately representing fermionic nodal structures. Subsequent work by Luo et al.27 introduced a neural network backflow ansatz that substantially improved the representation power of the wavefunction, demonstrating its effectiveness on systems as large as 12 × 8. More recently, in 2022, Robledo et al.28 achieved highly accurate results for various geometries of the Hubbard model up to 8 × 8 by combining Hidden-Fermion Determinant States (HFDS) with Stochastic Reconfiguration (SR)29–31. Despite this notable progress, scaling NQS simulations to even larger, more physically relevant parameter regimes is hindered by network architectural limitations and optimization barriers32,33.

In this work, we make significant progress in expanding the scalability and accuracy of the NQS approach for solving the Hubbard model with two key innovations as shown in Fig. 1B. First, a NQS architecture is proposed, which leverages the self-attention mechanism34, a technique proven to be very effective in scaling up35. The built-in long-range structure makes the NQS ansatz different from tensor network states, which consist of only local tensors. This ensures that the NQS can precisely capture long-range correlations in strongly correlated systems and can accurately handle larger systems, which is infeasible for other neural network architectures like Restricted Boltzmann Machine (RBM)25 and Multi-Layer Perceptron (MLP)27,28,32,36. Second, we propose an enhanced optimization algorithm, termed Moment-Adaptive ReConfiguration Heuristic (MARCH), designed to achieve substantially faster and more stable convergence than previous optimization algorithms such as SR29–31, Min-SR37,38, and SPRING39, especially for large and frustrated systems.

With these architectural and algorithmic advancements, we achieve state-of-the-art variational ground state energy of the 2D Hubbard model at larger sizes up to 16 × 16, for both open and periodic boundary conditions, as shown in Fig. 1C. As a result, we confirm the filled stripe ground state in the pure Hubbard model and identify a half-filled stripe ground state with the next nearest neighboring hopping t′=−0.2, consistent with experimental observations in cuprate40. Moreover, in the t′=−0.2 case, we find the stripe is horizontal, i.e., stripe arrangements prefer the longer side of the geometry. This is quite different from previous calculations on cylinders16, indicating the effectiveness of our method in eliminating the boundary effects. We also have a careful analysis of the structure of our NQS ansatz and find that different attention heads can directly encode correlations at different scales after optimization, making it capable to capture long-range correlations in the Hubbard model. Our developments in architectures and optimization strategies establish NQS as a promising paradigm for solving the Hubbard model. This framework extends readily to a broader range of strongly correlated systems, offering a new lens to explore exotic quantum many-body states resulting from strong correlations.

Results

A transformer-based NQS framework

The Hamiltonian of the Hubbard model is:

H^=−t∑⟨ij⟩,σc^iσ†c^jσ−t′∑⟨⟨ij⟩⟩,σc^iσ†c^jσ+U∑in^i↑n^i↓. 1

Here c^iσ†(c^jσ) is the creation (annihilation) operator for an electron with spin σ at site i( j), n^iσ=c^iσ†c^iσ is the particle number operator. The terms 〈ij〉 and 〈〈ij〉〉 denote pairs of nearest neighboring and next nearest neighboring sites, respectively. We study the 2D Hubbard model defined on square lattices with size N = Lx × Ly. Both open boundary conditions (OBC) and periodic boundary conditions (PBC) are adopted in this work. We set the nearest neighboring hopping amplitude t = 1 as the unit of energy. The on-site Coulomb repulsion is fixed at U = 8, a value relevant to cuprates41,42. We consider both the pure Hubbard case (t′=0) and the case with the next nearest neighboring hopping (t′=−0.2). In this work, we focus on the lightly doped regime with hole concentration of δ = 1/8, which is the most intriguing region in both the 2D Hubbard model and in cuprates.

Figure 2 presents an overview of our NQS algorithm. As shown in Fig. 2A, we employ a transformer-based NQS, parameterized by θ, to represent the amplitude ψθ(n) associated with each configuration n. Our transformer-based NQS assigns a unique high-dimensional embedding vector to each site i. These embeddings are subsequently processed through a series of multi-head attention blocks, the core component of modern large language models43. The attention block is defined as:

Attn(Q,K,V)=softmax(QK⊤/dH)V, 2

where Q,K,V∈RN×dH are feature matrices produced by neural networks. Here, N represents the number of sites in the Hubbard model, dH is the hidden dimension of the attention block. The i-th row of these matrices corresponds to the i-th site in the Hubbard model, arranged in dictionary order. The normalized attention scores Sattn, given by softmax(QK⊤/dH), allow the block to aggregate information from all sites by assigning weights. Thus, the attention block can capture complex, long-range correlations, which is crucial for modeling strongly correlated systems like the Hubbard model. The multi-head attention block employs distinct feature matrices to capture diverse correlation patterns in the system. After self-attention layers, a linear layer is employed to produce backflow orbitals M(n). The amplitude is then derived as the determinant of orbitals occupied by electrons.

Fig. 2. NQS architecture, optimization scheme, and benchmark performance on the Hubbard model.

Fig. 2

A An input lattice configuration is processed through a transformer-based neural network to generate backflow orbitals. These orbitals are then used to construct the NQS wavefunction ψθ. The variational parameters θ are optimized to find the ground state. B Optimization trajectories for MARCH and SPRING. MARCH follows a more direct path by dynamically adapting its step size for each parameter. The inset shows how SPRING's reliance on momentum might lead to overshooting, whereas MARCH's adaptive-momentum step prevents oscillations and accelerating convergence to the minimum. C Comparison of ground-state energies with PEPS (bond dimension D≥20)48 for the pure Hubbard model on 16 × Ly system with OBC. Our NQS results consistently achieve lower variational energies than PEPS across different lattice geometries. The inset shows we also outperform reference DMRG energies48 (with 32000 SU(2) multiplets) when Ly = 8. Statistical uncertainties from Monte Carlo sampling are smaller than the marker size.

In our work, we aim to find the ground state by minimizing the total energy of the wavefunction. In previous NQS studies18, SR-based optimizers have been used to minimize the energy. These optimizers effectively simulate the imaginary time evolution, enhancing the convergence rate over the standard first-order optimizer by exploiting the quantum geometric tensor44. One particular method is the SPRING algorithm39, which leverages the history of gradients to accelerate convergence and smooth out the optimization path. Building on this, we introduce the MARCH algorithm. MARCH enhances SPRING by also incorporating an estimate of the second moment of the gradients, drawing a direct parallel to how the popular Adam optimizer45 improves upon Momentum46. This addition of second-moment information is crucial for navigating the complex and high-dimensional energy landscapes that typically exist in quantum systems. It provides an estimate of the gradient’s variance, allowing MARCH to adapt the learning rate for each parameter individually. This adaptive capability offers a significant advantage, particularly when encountering challenging regions like saddle points or flat plateaus where the gradient is small. While a momentum-based method like SPRING might overshoot, MARCH can use the second-moment information to maintain progress and march confidently out of these areas. As illustrated in Fig. 2(B), this results in a more direct and efficient path to the energy minimum, leading to faster and more robust convergence.

These combined architectural and algorithmic advancements enable us to accurately tackle 2D Hubbard model with expanded sizes beyond the reach of previously NQS methods. We first perform benchmark calculations for systems under PBC for the pure Hubbard model (t′=0) at half-filling, where numerical exact ground state energies can be obtained by Auxiliary Field Quantum Monte Carlo (AFQMC)47. The NQS energies are consistent with the AFQMC results within twice the statistical errors (see Supplementary Table 1).

We then benchmark the new NQS method on the doped pure Hubbard model under OBC with varying sizes Lx and Ly. Direct comparisons of ground-state energies with state-of-the-art DMRG and PEPS48 results are presented in Fig. 2C (with Hartree-Fock energies as reference). In narrow systems such as Ly≤6, the DMRG energy is the lowest. However, when reaching the 2D limit by increasing the width of the system, where DMRG fails to capture the area law of entanglement entropy, the NQS results surpass DMRG. Noticeably, in the entire range of Ly we studied, NQS achieves lower variational energies than those reported by state-of-the-art PEPS with bond dimension D≥2048.

Attention mechanism reveals physical correlations

To gain deeper insight into how the transformer architecture captures the intricate physics of the Hubbard model, we examine the attention patterns learned by the network49. In our transformer ansatz, the heads after optimization are found to specialize in capturing the correlations at different scales present in the ground-state wave function. This emergent specialization is analogous to observations in fields like natural language processing, where different attention heads in a transformer learn distinct, interpretable patterns such as syntactical dependencies34. In Fig. 3, we visualize the normalized attention scores, Sattn, from the first layer for representative half-filled systems, which quantify the learned pairwise importance between sites. Similar results for the doped cases or deeper layers can be found in Supplementary Figs. 1–10.

Fig. 3. Visualization of the attention mechanism.

Fig. 3

Shown is how a lattice site attends to another target site in the 2D pure Hubbard model for lattice sizes of 8 × 8, 10 × 10, and 12 × 12 at half filling. The four attention heads, which are equivalent and have been rearranged by pattern for clarity, each correspond to a specific physical aspect: short-range correlations, nearest-neighbor hopping, antiferromagnetic correlations, and complex and delocalized correlations in the ground state.

The results show: the first head clearly learns to prioritize local interactions, with Sattn decaying with the distance between sites to capture short-range correlations. The second head specializes in nearest-neighbor hopping, focusing its attention almost exclusively on the four adjacent sites–a fundamental process in the Hubbard model. The third head successfully identifies the emergent antiferromagnetic order, assigning high attention scores in a checkerboard pattern characteristic of this magnetic correlation. The final head appears to capture more complex, delocalized phase information, exhibiting a sophisticated pattern that is crucial for accurately representing the full complexity of the wave function. Importantly, varying the total number of attention heads in our architecture reveals that the network consistently converges to the three specific local patterns mentioned above (short-range, nearest-neighbor, and antiferromagnetic), suggesting their physical relevance. Further details regarding these structural variations are provided in Supplementary Fig. 11. Ultimately, this specialization demonstrates the ability of the transformer’s attention mechanism to identify the fundamental physical correlations governing the system.

Filled stripe order in pure Hubbard model

The ground state of the lightly doped pure (t′=0) 2D Hubbard model was established as the filled stripe before16. Recently Liu et al.48 observed a crossover of the stripe direction with the increase of system widths for systems under OBC, indicating the existence of a large finite size effect in systems with open boundaries. We performed systematic calculations of the pure Hubbard model for different sizes under both OBC and PBC. For systems with OBC, we find stripe states that match well with the results obtained from PEPS but with lower energies (see Fig. 2C). In particular, our results also demonstrate a crossover between horizontal (i.e., stripe stretching along the longer direction of the lattice) and vertical stripes (i.e., stripe stretching along the shorter direction of the lattice) as a function of system width (from Ly = 8 to Ly = 12, see Supplementary Fig. 15–16). But when we switch to PBC, the crossover vanishes (see Supplementary Fig. 18–19), indicating the crossover is a finite size and open boundary effect. The ability to handle systems under PBC with NQS can mitigate the finite size effect, allowing to obtain more reliable results in the thermodynamic limit. By studying systems under PBC, we observe a robust, filled stripe phase with wavelength of λ = 8 as shown in Fig. 4A, a result that is consistent with previous findings16. Simulations on smaller 8 × 8 and 12 × 12 lattices (see Supplementary Fig. 20-21) show clear finite-size effects due to their incommensurability with the wavelength λ = 8.

Fig. 4. Hole and spin density distributions in the ground state for different lattice sizes with U = 8 and hole doping δ = 1/8 under PBC in the Hubbard model.

Fig. 4

The magnitude of the local spin density is represented by the size of the arrows, while the spin orientation expectation value of Sz is denoted by the up/down direction of the arrows. Hole density is depicted using a color scale. Charge and spin stripes are clearly visible in all three systems. A Results for the 16 × 16 pure Hubbard model (t′=0), where a stripe state with period λ = 8 is observed. B Results for the 8 × 16 system with t′=−0.2, exhibiting a stripe state with λ = 4 extending along the y-axis. C Results for the 32 × 8 system with t′=−0.2, exhibiting a stripe state with λ = 4 extending along the x-axis. Notice that in the rectangular lattices for t′=−0.2 (panels B and C), the stripes consistently orient themselves along the longer geometrical axis of the system (horizontal), even though both spatial orientations are allowed under PBC. Additional results can be found in the Supplementary Material.

Half-filled stripe order in t′-Hubbard model

It was found that the doped pure Hubbard model may not host superconductivity for parameter relevant to the under-doped regime of cuprate superconductors50. To pursue superconducting ground states, the simplest modification is to include the next nearest neighboring hopping (t′) term. On one hand, a finite t′ can account for the electron and hole doping asymmetry in the phase diagram of cuprates. On the other hand, electronic structure calculations41,42 show a finite t′≈−0.2 term indeed exists in the one band effective Hamiltonian of cuprates. A recent study by Xu et al.17 found that the phase diagram of the Hubbard model with t′=−0.2 agrees well with the cuprates, where fractional filling stripe coexists with the d-wave superconductivity in the hole doping region. The t′ term frustrates the anti-ferromagnetic order in the parent compound and makes the doped stripe state fragile. Importantly, large finite size and boundary effect51 was found for the wavelength of the stripe state in the hole doping region, which fluctuates in the vicinity of λ = 417.

We perform systematic calculations for systems under PBC with t′=−0.2. With PBC, we can get rid of the boundary effect. Our calculations on large sizes show the ground state for the t′=−0.2 Hubbard model is consistent with the half-filled stripe, i.e., with wavelength λ = 4, as shown in Fig. 4B. These results indicate that the previous found fluctuating wavelengths for stripe may result from the finite size and boundary conditions. The λ = 4 stripe agrees well with the experimental observation of cuprates40, providing further evidence to support the relevance of the t′ Hubbard model to cuprates.

Horizontal stripes are energetically favored over vertical stripes

Previous numerical studies on stripe order in the Hubbard and related models have been conducted on cylindrical geometries with DMRG52–56. However, such boundary conditions and their related finite-size effect can inherently favor the formation of vertical stripe orientations. To alleviate the possible boundary effect, we study systems with PBC in both directions. We systematically study systems with size Lx × 8 where Lx is ranged from 8 to 32, with t′=−0.2 and δ = 1/8 (see Eq. (1)). We consistently observe that a horizontal stripe configuration is energetically favored in the ground state while the system can accommodate half-filled stripe in both horizontal and vertical directions (see Fig. 4B, C), Fig. 5 and Supplementary Figs. 22–27.

Fig. 5. Energy difference between vertical stripe and horizontal stripe.

Fig. 5

Kinetic energy, potential energy, and total energy results are all shown. We systematically study systems Lx × 8 with Lx ranging from 8 to 32, with t′=−0.2 and δ = 1/8. We can find that the horizontal stripe has lower energy for all the systems (notice that for 8 × 8 system, vertical and horizontal stripes are the same). Moreover, the results show that the gain of energy in the horizontal stripe is mainly from the kinetic energy. Statistical uncertainties from Monte Carlo sampling are smaller than the marker size.

These results suggest the existence of a tendency toward fewer long stripes rather than multiple fragmented ones in the systems, different from previous studies on cylinders17. From Fig. 5, we can also find that the gain of energy for the horizontal stripe state is mainly from the kinetic energy, while the potential energy in the horizontal stripe is slightly higher. A simple explanation is that the formation of a long river of holes in the horizontal stripe is beneficial to the kinetic energy. A comprehensive understanding of this observation needs further investigation.

For rectangular systems with a width not divisible by 8, a horizontal stripe with wavelength λ = 4 is impossible, resulting in geometric frustration. One such example is the 16 × 10 system, for which we find that the trend for horizontal stripe wins and the ground state has a wavelength of λ = 5 while the vertical stripe state with λ = 4 has a higher energy (see Supplementary Figs. 29-30). In another example for the 16 × 12 system, the trend for wavelength 4 wins in the competition and the ground state is a vertical stripe (see Supplementary Fig. 31).

For the pure Hubbard model, it is also possible that the true ground state is a horizontal stripe. But the resolution of this issue requires the study of systems that can accommodate stripes with a wavelength 8 in both vertical and horizontal directions. The smallest size for such systems under PBC is 32 × 16, which is beyond our present capacity.

Accuracies and scalability

We then evaluate the accuracy and scalability of our approach under PBC. As illustrated in Fig. 6A, the computational cost scales polynomially (approximately O(N3)) with the number of sites. Furthermore, variance per site, a proxy for relative error when exact ground-state energies are unknown, grows slowly as the system expands up to 256 sites (Fig. 6B). Finally, Fig. 6C shows that the error can be systematically reduced by increasing the expressivity of the ansatz.

Fig. 6. Scalability and accuracy benchmarks under PBC.

Fig. 6

A Computation time per step as a function of the number of lattice sites, demonstrating polynomial scaling. B Variance (which serves as a proxy for relative error) versus the number of sites, indicating a controlled, slow growth for larger systems when t′=0. C Error (using the zero variance extrapolated value as reference) systematically decreasing as a function of the training cost on the 32 × 8 (t′=−0.2) system, parameterized by the number of heads and determinants. Statistical uncertainties from Monte Carlo sampling are smaller than the marker size.

Additionally, we conduct a zero-variance extrapolation on a 16 × 4 pure Hubbard model and a 32 × 8 lattice with t′=−0.2. The extrapolated ground state energies are—0.7673 and –0.7491, respectively. Therefore, the estimated errors for the two systems are 0.006 and 0.009. Furthermore, we observe that the d-wave correlation is progressively enhanced as the calculation becomes more accurate. This finding highlights the necessity for careful and controlled calculations when drawing conclusions about superconductivity, which will be our pursuit in the future. Detailed results regarding the variance extrapolation and d-wave correlations are provided in Supplementary Note 4.

Discussion

In this work, we propose a NQS framework for studying quantum many-body systems by leveraging the cutting-edge machine learning architectures and developing accurate optimization algorithms. State-of-the-art results for the 2D doped Hubbard model with expanded system sizes are achieved with this new framework. NQS enables the study of 2D Hubbard model under periodic boundary conditions, which is crucial to get rid of the boundary effect and makes the extrapolation to the thermodynamic limit reliable. By studying 2D Hubbard model with large systems under periodic boundary conditions, we confirm the filled stripe phase in the ground state of the doped pure (t′=0) Hubbard model. When the next nearest neighboring hopping term (t′=−0.2) is included, the ground state is found to be half-filled stripes, consistent with experimental observation in cuprates. Noticeably, the direction of the stripe for t′=−0.2 is determined to be horizontal when the width and the length are not equal, different from previous studies17. These results indicate that previous calculations on systems with open boundary suffer from the boundary effect and underscore the effectiveness of the NQS method in gaining more reliable results.

We also have a careful analysis of the attention patterns learned in the ground state of 2D Hubbard model. Interestingly, we find that after the energy optimizations, different heads within our NQS specialize in encoding the correlations at different scales of the ground-state wave function. This special structure enables our NQS ansatz to effectively capture long-range correlations, which is crucial for the accurate calculation of strongly correlated quantum many-body systems.

There is much room for the future development of NQS. On one hand, the development of more efficient optimization approaches could enable the study of even large system sizes, which is crucial for more reliable finite size scaling in the doped Hubbard model. On the other hand, more sophisticated NQS ansatz for the calculation of dynamic and finite temperature properties57 are needed to further unveil the physics of the Hubbard model and establish the microscopic theory for cuprate. We anticipate that NQS framework will continue benefiting from the development in the broad machine learning community. Nevertheless, our results demonstrate that NQS is an effective framework for solving challenging many-fermions systems.

Methods

Variational Monte Carlo

VMC is a quantum Monte Carlo method based on the variational principle of quantum mechanics. Upon choosing a wavefunction ansatz ψθ, minimizing the energy of this ansatz with respect to the parameters θ makes ψθ an approximation to the ground state. In this work, we adopt a neural network as the wavefunction ansatz. The neural network takes occupation number n as input and outputs the amplitude of the wavefunction, n∣ψθ=ψθ(n). The energy of the wavefunction can be written as the expectation value of the local energy, i.e.

Ēθ=ψθ∣H^∣ψθψθ∣ψθ=En~ψθ2/ψθ2[Elocθ(n)], 3

where

Elocθ(n)=∑n′ψθ(n′)ψθ(n)n′H^n 4

is the local energy. Exact calculation of the energy using Equation (3) is infeasible in an exponentially large Hilbert space. However, we can approximate this summation using the Monte Carlo method. A set of occupation numbers {ni}i=1B is sampled from the probability distribution defined by the squared amplitude of the wavefunction using Markov chain Monte Carlo (MCMC) techniques. The local energy of occupation numbers, Elocθ(n), can be efficiently calculated from the Hubbard model Hamiltonian, with the number of summation terms in Equation (4) scaling linearly with the size of the system. Therefore, parameters of the neural network can be optimized to approach the ground state of the Hubbard model:

θ*=argminθĒθ. 5

Wavefunction ansatz

As illustrated in Fig. 2A, we employ a neural quantum state (NQS) ansatz to represent the many-body quantum state ψ of a fermionic system with N lattice sites. Each individual site corresponds to a 4 dimensional physical Hilbert space spanned by 0, ↑, ↓, and ↑↓. We encode the four possible tokens into a d dimensional vector via an embedding matrix E∈R4×d. To account for spatial arrangement, crucial due to the permutation equivariance of self-attention, these embeddings are augmented with learnable positional encodings. To this end, we add the matrix P∈RN×d to the input embedding. The embedded input can be compactly written into a matrix X(0)=[E(n1)+P1,...,E(nN)+PN]⊤∈RN×d. Then, L Transformer blocks follow, each of which transforms the input via the following equation:

Y(l)=X(l−1)+Attn(l)(X(l−1)), 6
X(l)=Y(l)+FFN(l)(Y(l)), 7

where l ∈ [L], Attn(l) and FFN(l) denote the multi-head self-attention layer and the feed-forward network for the l-th Transformer block, respectively:

Attn(l)(X)=∑h=1HsoftmaxXWQ(l,h)(XWK(l,h))⊤/dHXWV(l,h)(WO(l,h))⊤, 8
FFN(l)(X)=σ(XWF(l)). 9

The variational parameters WQ(l,h),WK(l,h),WV(l,h),WO(l,h)∈Rd×dH are the query, key, value, and output matrices of the head h, respectively. dH = d/H is the hidden dimension of each head. WF(l)∈Rd×d is the weight matrix in the FFN(l). The activation σ is chosen as SiLU58.

The final output X(L) is transformered by a linear layer to produce K sets of backflow orbitals Mk∈R2N×Ne, where k ∈ [K]. The Slater matrix Φk is formed by selecting rows of Mk corresponding to the occupied position in the input configuration n. The overall NQS wavefunction is a linear combination of these determinants:

n∣ψ=∑k=1Kdet[Φk]. 10

Optimization

Stochastic reconfiguration (SR) is one of the most popular optimization methods for NQS. In this work, however, we propose an advanced SR algorithms named Moment-Adaptive ReConfiguration Heuristic (MARCH), most directly inspired by the SPRING algorithm39. MARCH combines ideas from the widely used Adam optimizer in traditional machine learning45 and the recently introduced efficient Min-SR algorithm37,38.

The SR parameter update is typically defined as

dθ=argmindθ′En∣O(n)dθ′−ϵ(n)∣2≈argmindθ′1B∑i=1B∣O(ni)dθ′−ϵ(ni)∣2, 11

where O(n)=∂∂θlogψθ(n)−En′[∂∂θlogψθ(n′)], ϵ(n)=−δτ(Eloc(n)−En′[Eloc(n′)]), B denotes batch size in MCMC sampling.

To express the problem in a standard linear algebra form, we construct a matrix O~ and a vector ϵ~ by stacking the contributions from each of the B samples in the batch:

O~=O(n1)O(n2)⋮O(nB)∈RB×Nparamsandϵ~=ϵ(n1)ϵ(n2)⋮ϵ(nB)∈RB. 12

Since O~ might be ill-conditioned, the conventional method is to add some form of regularization. For example, a Tikhonov regularization is usually added to yield the regularized problem as follows:

dθ=argmindθ′1λ∣∣O~dθ′−ϵ~∣∣2+∣∣dθ′∣∣2. 13

MARCH differs from previous SR algorithms by adaptively translating and scaling dθ individually for each parameter based on the estimation of the first and second moments.

The overall objective function can be written as:

dθk=argmindθ′1λ∣∣O~dθ′−ϵ~∣∣2+∣∣diag(vk−1)1/4(dθ′−ϕk−1)∣∣2, 14

where k denotes the current step, diag(vk−1) is the diagonal matrix whose main diagonal is composed of vk−1. The first-order moment estimator, ϕk = μdθk, acts as a momentum term. Intuitively, ϕ carries the momentum, which accelerates updates in directions of persistent gradients and dampens oscillations. The second moment estimator, vk=βvk−1+(dθk−μdθk−1)2, tracks the volatility of the gradient. A large vk indicates that the gradient is changing erratically, so the update of the parameter is suppressed to prevent divergence. Conversely, a small vk implies a stable gradient, allowing the parameter to be updated more aggressively. The behavior of these estimators is governed by the hyperparameters μ, β, and λ, which are detailed in Supplementary Note 6.

Therefore, the explicit update formula can be derived. We first define π=diag(vk−1)1/4(dθ′−ϕk−1),U=O~diag(vk−1)−1/4,ζ=ϵ~−O~ϕk−1. The Eq. (14) can be recast as:

π=argminπ′1λ∣∣Uπ′−ζ∣∣2+∣∣π′∣∣2. 15

We can reduce the computational budget from O(Nparams3) to O(B2Nparams) by Woodbury matrix identity:

π=(UTU+λI)−1UTζ 16
=1λI−UT(λI+UUT)−1UUTζ 17
=1λUT−UT(λI+UUT)−1(UUT+λI−λI)ζ 18
=UT(λI+UUT)−1ζ. 19

Finally, we can write down the parameters update formula as:

dθ=diag(vk−1)−1/2O~T(O~diag(vk−1)−1/2O~T+λI)−1(ϵ~−O~ϕk−1)+ϕk−1. 20

Supplementary information

Acknowledgements

We thank ByteDance Seed for inspiration and encouragement, and Hang Li for his guidance and support. We thank Xiangjian Qian for providing DMRG benchmark results. We are grateful to Yuxi Zhu for helping with graphics. D.H. discloses support from the National Natural Science Foundation of China (NSFC 62376007). Y.W. discloses support from a start-up grant of the Institute of Physics, Chinese Academy of Sciences (IOP-CAS). T.X. discloses support from the National Natural Science Foundation of China (Grant No. 12488201). M.Q. discloses support from the National Key Research and Development Program of the Ministry of Science and Technology of China (2022YFA1405400), the National Natural Science Foundation of China (Grant No. 12274290), and the Innovation Program for Quantum Science and Technology (2021ZD0301902). L.W. discloses support from the National Science and Technology Major Project (2022ZD0114902) and the National Natural Science Foundation of China (NSFC 92470123, NSFC 62276005).

Author contributions

L.W. and D.L. conceived this project. Y.G. designed the algorithm, wrote the code and performed the calculation with helps from W.L., H.L., R.L and Y.H, all of whom contributed to preliminary explorations. Y.G. and W.L. visualized the data. B.Z., Y.W., M.Q. and T.X. provided valuable insight in the physics of the Hubbard model. Y.W. wrote the PEPS code for the benchmark with t′ hopping. D.H. provided insights into neural network model design. All authors contributed to the analysis of the data, the discussion of the results and the writing of the manuscript.

Peer review

Peer review information

Nature Communications thanks the anonymous reviewers for their contribution to the peer review of this work. A peer review file is available.

Data availability

We have not analysed any datasets as our work proceeds within a theoretical and mathematical approach. The figures and tables shown contain all the available data, which was generated using the provided code.

Code availability

The initial version of the code for producing the results in this work is available on Code Ocean: https://codeocean.com/capsule/8740417/tree/v1. The full code is available at https://github.com/bytedance/laqx.

Competing interests

The authors declare no competing interests.

Footnotes

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

These authors contributed equally: Yuntian Gu, Wenrui Li, Heng Lin, Bo Zhan.

Change history

10/21/2026

A Correction to this paper has been published: https://doi.org/10.1038/s41467-026-79114-3

Contributor Information

Yantao Wu, Email: yantaow@iphy.ac.cn.

Tao Xiang, Email: txiang@iphy.ac.cn.

Mingpu Qin, Email: qinmingpu@sjtu.edu.cn.

Liwei Wang, Email: wanglw@pku.edu.cn.

Dingshun Lv, Email: ywlds163@gmail.com.

Supplementary information

The online version contains supplementary material available at https://doi.org/10.1038/s41467-026-74028-6.

References

  • 1.Hubbard, J. Electron correlations in narrow energy bands. Proc. R. Soc. Lond. A276, 238–257 (1963). [Google Scholar]
  • 2.Qin, M., Schäfer, T., Andergassen, S., Corboz, P. & Gull, E. The hubbard model: A computational perspective. Annu. Rev. Condens. Matter Phys.13, 275–302 (2022). [Google Scholar]
  • 3.Arovas, D. P., Berg, E., Kivelson, S. A. & Raghu, S. The hubbard model. Annu. Rev. Condens. matter Phys.13, 239–274 (2022). [Google Scholar]
  • 4.Anderson, P. W. The resonating valence bond state in la2cuo4 and superconductivity. Science235, 1196–1198 (1987). [DOI] [PubMed] [Google Scholar]
  • 5.Zhang, F. C. & Rice, T. M. Effective hamiltonian for the superconducting cu oxides. Phys. Rev. B37, 3759–3761 (1988). [DOI] [PubMed] [Google Scholar]
  • 6.White, S. R. Density matrix formulation for quantum renormalization groups. Phys. Rev. Lett.69, 2863–2866 (1992). [DOI] [PubMed] [Google Scholar]
  • 7.Cirac, J. I., Pérez-García, D., Schuch, N. & Verstraete, F. Matrix product states and projected entangled pair states: Concepts, symmetries, theorems. Rev. Mod. Phys.93, 045003 (2021). [Google Scholar]
  • 8.Xiang, T. Density Matrix and Tensor Network Renormalization (Cambridge University Press, Cambridge, 2023).
  • 9.Verstraete, F. & Cirac, J. I. Renormalization algorithms for quantum-many body systems in two and higher dimensions. https://arxiv.org/abs/cond-mat/0407066. cond-mat/0407066 (2004).
  • 10.Georges, A., Kotliar, G., Krauth, W. & Rozenberg, M. J. Dynamical mean-field theory of strongly correlated fermion systems and the limit of infinite dimensions. Rev. Mod. Phys.68, 13–125 (1996). [Google Scholar]
  • 11.Knizia, G. & Chan, G. K.-L. Density matrix embedding: A simple alternative to dynamical mean-field theory. Phys. Rev. Lett.109, 186404 (2012). [DOI] [PubMed] [Google Scholar]
  • 12.Gubernatis, J., Kawashima, N. & Werner, P. Quantum Monte Carlo Methods: Algorithms for Lattice Models (Cambridge University Press, Cambridge, 2016).
  • 13.Becca, F. & Sorella, S. Quantum Monte Carlo Approaches for Correlated Systems (Cambridge University Press, Cambridge, 2017).
  • 14.Zhang, S. Auxiliary-Field Quantum Monte Carlo for Correlated Electron Systems, Vol. 3 of Emergent Phenomena in Correlated Matter: Modeling and Simulation, Ed. E. Pavarini, E. Koch, and U. Schollwöck (Verlag des Forschungszentrum Jülich, 2013).
  • 15.LeBlanc, J. P. F. et al. Solutions of the two-dimensional hubbard model: benchmarks and results from a wide range of numerical algorithms. Phys. Rev. X5, 041041 (2015). [Google Scholar]
  • 16.Zheng, B.-X. et al. Stripe order in the underdoped region of the two-dimensional Hubbard model. Science358, 1155–1160 (2017). [DOI] [PubMed] [Google Scholar]
  • 17.Xu, H. et al. Coexistence of superconductivity with partially filled stripes in the hubbard model. Science384, eadh7691 (2024). [DOI] [PubMed] [Google Scholar]
  • 18.Carleo, G. & Troyer, M. Solving the quantum many-body problem with artificial neural networks. Science355, 602–606 (2017). [DOI] [PubMed] [Google Scholar]
  • 19.Pfau, D., Spencer, J. S., Matthews, A. G. & Foulkes, W. M. C. Ab initio solution of the many-electron schrödinger equation with deep neural networks. Phys. Rev. Res.2, 033429 (2020). [Google Scholar]
  • 20.Ren, W., Fu, W., Wu, X. & Chen, J. Towards the ground state of molecules via diffusion monte carlo on neural networks. Nat. Commun.14, 1860 (2023). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 21.Li, R. et al. A computational framework for neural network-based variational monte carlo with forward laplacian. Nat. Mach. Intell.6, 209–219 (2024). [Google Scholar]
  • 22.Nomura, Y. & Imada, M. Dirac-type nodal spin liquid revealed by refined quantum many-body solver using neural-network wave function, correlation ratio, and level spectroscopy. Phys. Rev. X11, 031034 (2021). [Google Scholar]
  • 23.Roth, C., Szabó, A. & MacDonald, A. H. High-accuracy variational monte carlo for frustrated magnets with deep neural networks. Phys. Rev. B108, 054410 (2023). [Google Scholar]
  • 24.Yu, Q.-H. & Lin, Z.-J. Solving quantum many-particle models with graph attention network. Chin. Phys. Lett.41, 030202 (2024). [Google Scholar]
  • 25.Nomura, Y., Darmawan, A. S., Yamaji, Y. & Imada, M. Restricted boltzmann machine learning for solving strongly correlated quantum systems. Phys. Rev. B96, 205152 (2017). [Google Scholar]
  • 26.Ibarra-García-Padilla, E. et al. Autoregressive neural quantum states of fermi hubbard models. Phys. Rev. Res.7, 013122 (2025). [Google Scholar]
  • 27.Luo, D. & Clark, B. K. Backflow transformations via neural networks for quantum many-body wave functions. Phys. Rev. Lett.122, 226401 (2019). [DOI] [PubMed] [Google Scholar]
  • 28.Robledo Moreno, J., Carleo, G., Georges, A. & Stokes, J. Fermionic wave functions from neural-network constrained hidden states. Proc. Natl. Acad. Sci.119, e2122059119 (2022). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 29.Sorella, S. Generalized lanczos algorithm for variational quantum monte carlo. Phys. Rev. B64, 024512 (2001). [Google Scholar]
  • 30.Nightingale, M. & Melik-Alaverdian, V. Optimization of ground-and excited-state wave functions and van der waals clusters. Phys. Rev. Lett.87, 043401 (2001). [DOI] [PubMed] [Google Scholar]
  • 31.Sorella, S., Casula, M. & Rocca, D. Weak binding between two aromatic rings: Feeling the van der waals attraction by quantum Monte Carlo methods. J. Chem. Phys.127, 014105 (2007). [DOI] [PubMed]
  • 32.Zhou, Y.-T., Zhou, Z.-W. & Liang, X. Solving fermi-hubbard-type models by tensor representations of backflow corrections. Phys. Rev. B109, 245107 (2024). [Google Scholar]
  • 33.Karthik, V. & Medhi, A. Convolutional restricted boltzmann machine correlated variational wave function for the hubbard model on a square lattice. Phys. Rev. B110, 125125 (2024). [Google Scholar]
  • 34.Vaswani, A. et al. Attention is all you need. Advances in neural information processing systems30 (2017).
  • 35.Kaplan, J. et al. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361 (2020).
  • 36.Inui, K., Kato, Y. & Motome, Y. Determinant-free fermionic wave function using feed-forward neural networks. Phys. Rev. Res.3, 043126 (2021). [Google Scholar]
  • 37.Chen, A. & Heyl, M. Empowering deep neural quantum states through efficient optimization. Nat. Phys.20, 1476–1481 (2024). [DOI] [PMC free article] [PubMed] [Google Scholar]
  • 38.Rende, R., Viteritti, L. L., Bardone, L., Becca, F. & Goldt, S. A simple linear algebra identity to optimize large-scale neural network quantum states. Commun. Phys.7, 260 (2024). [Google Scholar]
  • 39.Goldshlager, G., Abrahamsen, N. & Lin, L. A kaczmarz-inspired approach to accelerate the optimization of neural network wavefunctions. J. Comput. Phys.516, 113351 (2024). [Google Scholar]
  • 40.Tranquada, J., Sternlieb, B., Axe, J., Nakamura, Y. & Uchida, S. -i Evidence for stripe correlations of spins and holes in copper oxide superconductors. nature375, 561–563 (1995). [Google Scholar]
  • 41.Andersen, O., Liechtenstein, A., Jepsen, O. & Paulsen, F. Lda energy bands, low-energy hamiltonians, , t″, t⊥(k), and J⊥. J. Phys. Chem. Solids56, 1573–1591 (1995). [Google Scholar]
  • 42.Hirayama, M., Yamaji, Y., Misawa, T. & Imada, M. Ab initio effective hamiltonians for cuprate superconductors. Phys. Rev. B98, 134501 (2018). [Google Scholar]
  • 43.Brown, T. et al. Language models are few-shot learners. Adv. neural Inf. Process. Syst.33, 1877–1901 (2020). [Google Scholar]
  • 44.Cheng, R. Quantum geometric tensor (fubini-study metric) in simple quantum system: A pedagogical introduction. arXiv preprint arXiv:1012.1337 (2010).
  • 45.Kingma, D. P. & Ba, J. Adam: A method for stochastic optimization. https://arxiv.org/abs/1412.6980. 1412.6980 (2017).
  • 46.Sutskever, I., Martens, J., Dahl, G. & Hinton, G. On the importance of initialization and momentum in deep learning. In International conference on machine learning, 1139–1147 (PMLR, 2013).
  • 47.Qin, M., Shi, H. & Zhang, S. Benchmark study of the two-dimensional hubbard model with auxiliary-field quantum monte carlo method. Phys. Rev. B94, 085103 (2016). [Google Scholar]
  • 48.Liu, W.-Y., Zhai, H., Peng, R., Gu, Z.-C. & Chan, G. K.-L. Accurate simulation of the hubbard model with finite fermionic projected entangled pair states. Phys. Rev. Lett.134, 256502 (2025). [DOI] [PubMed] [Google Scholar]
  • 49.Viteritti, L. L., Rende, R., Parola, A., Goldt, S. & Becca, F. Transformer wave function for two dimensional frustrated magnets: Emergence of a spin-liquid phase in the shastry-sutherland model. Phys. Rev. B111, 134411 (2025). [Google Scholar]
  • 50.Qin, M. et al. Absence of superconductivity in the pure two-dimensional hubbard model. Phys. Rev. X10, 031016 (2020). [Google Scholar]
  • 51.Chung, C.-M., Qin, M., Zhang, S., Schollwöck, U. & White, S. R. Plaquette versus ordinary d-wave pairing in the -hubbard model on a width-4 cylinder. Phys. Rev. B102, 041106 (2020). [Google Scholar]
  • 52.White, S. R. & Scalapino, D. J. Density matrix renormalization group study of the striped phase in the 2d t − J model. Phys. Rev. Lett.80, 1272–1275 (1998). [Google Scholar]
  • 53.Jiang, Y.-F., Zaanen, J., Devereaux, T. P. & Jiang, H.-C. Ground state phase diagram of the doped hubbard model on the four-leg cylinder. Phys. Rev. Res.2, 033073 (2020). [Google Scholar]
  • 54.Huang, E. W., Mendl, C. B., Jiang, H.-C., Moritz, B. & Devereaux, T. P. Stripe order from the perspective of the Hubbard model. npj Quantum Mater.3, 22 (2018). [Google Scholar]
  • 55.Jiang, H.-C. & Devereaux, T. P. Superconductivity in the doped Hubbard model and its interplay with next-nearest hopping . Science365, 1424–1428 (2019). [DOI] [PubMed] [Google Scholar]
  • 56.Lu, X., Chen, F., Zhu, W., Sheng, D. N. & Gong, S.-S. Emergent superconductivity and competing charge orders in hole-doped square-lattice t − j model. Phys. Rev. Lett.132, 066002 (2024). [DOI] [PubMed] [Google Scholar]
  • 57.Šimkovic, F., Rossi, R., Georges, A. & Ferrero, M. Origin and fate of the pseudogap in the doped hubbard model. Science385, eade9194 (2024). [DOI] [PubMed] [Google Scholar]
  • 58.Elfwing, S., Uchibe, E. & Doya, K. Sigmoid-weighted linear units for neural network function approximation in reinforcement learning. Neural Netw.107, 3–11 (2018). [DOI] [PubMed] [Google Scholar]

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Supplementary Materials

Data Availability Statement

We have not analysed any datasets as our work proceeds within a theoretical and mathematical approach. The figures and tables shown contain all the available data, which was generated using the provided code.

The initial version of the code for producing the results in this work is available on Code Ocean: https://codeocean.com/capsule/8740417/tree/v1. The full code is available at https://github.com/bytedance/laqx.


Articles from Nature Communications are provided here courtesy of Nature Publishing Group

RESOURCES