Sample-Based Neural Diagonalization (SND)
- SND is a neural-network-assisted method that predicts eigenvalue spectra or selects basis states to enable efficient diagonalization in quantum models.
- It replaces costly exact diagonalization with surrogate models in both spin–fermion and quantum Ising setups, reducing complexity from O(N³) to O(N·h).
- Adaptive basis SND (AB-SND) extends this approach by learning basis transformations that concentrate ground-state weight for more precise energy estimates.
Sample-based Neural Diagonalization (SND) denotes a class of neural-network-assisted strategies for reducing the cost of diagonalization in quantum many-body computation. In the literature represented by Stratis et al., SND is a feed-forward eigenvalue surrogate used inside Monte Carlo sample generation for the spin–fermion, or double-exchange, model, replacing repeated exact diagonalization of a fermionic matrix by direct prediction of its spectrum (Stratis et al., 2022). In later work on sample-based diagonalization (SBD), SND instead denotes an autoregressive neural sampler that selects basis configurations for projected diagonalization, while adaptive-basis SND (AB-SND) augments this with a learnable basis transformation (Cantori et al., 18 Aug 2025). This suggests that the unifying idea is not a single canonical architecture, but the use of learned samples or learned spectra to make spectrally informed computation tractable.
1. Scope of the term and problem classes
The term SND is used in two distinct settings. In the spin–fermion setting, the computational bottleneck is the repeated evaluation of all single-particle eigenvalues for a Hamiltonian that depends on a classical spin configuration. In the SBD setting, the bottleneck is the selection of a small but effective basis subspace whose projected Hamiltonian yields an accurate ground-state estimate. In both cases, the learned model is coupled directly to a diagonalization-related step rather than being used only as a generic regressor or classifier.
| Setting | Learned object | Computational role |
|---|---|---|
| Spin–fermion model | Full spectrum or free energy | Replace exact diagonalization during Monte Carlo proposals |
| SBD for quantum Ising models | Autoregressive sampler | Select basis states for projected diagonalization |
| AB-SND | Sampler plus basis transformation | Concentrate the ground state before projected diagonalization |
A common source of confusion is to assume that SND names a single fixed algorithm. In the cited literature, it instead names two related but non-identical constructions: one predicts eigenvalues of a configuration-dependent Hamiltonian, and the other learns how to sample basis states that make a projected Hamiltonian accurate. The overlap lies in the reliance on neural networks to extract spectrally relevant information from samples.
2. Spin–fermion SND as neural eigenvalue prediction
In the spin–fermion formulation, the system consists of classical unit spins with and , coupled to spinful fermions on the same sites. The single-orbital spin–fermion, or double-exchange, Hamiltonian is
with , Hund coupling , Pauli matrices 0, and nearest-neighbor pairs 1. For each classical-spin update in a Monte Carlo sweep, one must recompute all single-particle eigenvalues 2 of the 3 fermion matrix, and standard dense diagonalization scales as 4 (Stratis et al., 2022).
Three surrogate models are compared in this formulation: a linear Heisenberg model fitting 5 as 6, an 7 feed-forward network predicting free energy directly, and an 8 model predicting the full spectrum. The SND construction is the eigenvalue model. Its input is the flattened real vector
9
The architecture is fully connected with one hidden layer of size 0, Softplus activation 1, and a linear output layer of size 2 interpreted as predicted eigenvalues. After inference, the 3 outputs are sorted so that 4.
Training uses exact-diagonalization data generated at each temperature 5 from three independent Metropolis–Hastings chains. After a warm-up of 6 proposals, the procedure generates 7 samples for training and 8 for validation and test, with thinning by saving one in every 9 proposals, where 0 is the acceptance ratio. Each saved spin configuration is labeled by its full eigenvalue set and free energy. Data augmentation exploits translation invariance and global 1 rotation invariance using a discrete Euler-angle grid,
2
excluding the identity, which augments each raw sample by up to 23 non-trivial variants.
The training loss for the eigenvalue model is the mean absolute error per eigenvalue,
3
while mean squared error on a held-out test set is monitored as a secondary metric. Optimization uses Adam with initial learning rate 4 and exponential decay
5
for 6 epochs. Recommended hyperparameters are specified for both one and two dimensions: for 1D with 7, 8 uses 9 and 0 uses 1; for 2D with 2, 3 uses 4 and 5 uses 6.
3. SND as learned basis selection in sample-based diagonalization
In the later SBD formulation, the Hilbert space is expressed in the computational 7 basis 8 with 9. A standard testbed is the transverse-field Ising model
0
whose full Hilbert dimension is 1. One selects a subset of 2 basis states
3
defines the projector
4
and forms the projected Hamiltonian
5
Diagonalizing the 6 matrix 7 yields eigenvalues 8, with 9 a variational upper bound to the true ground-state energy 0 and 1 as 2 (Cantori et al., 18 Aug 2025).
The central issue is how to choose the 3 basis states so that 4 is accurate while 5. Standard SBD samples configurations from a heuristic distribution, such as squared amplitudes of a variational neural-quantum-state, but this fails when the true ground state is delocalized in the computational basis. SND replaces the fixed heuristic sampler by an autoregressive neural network 6 trained to focus on bitstrings with large ground-state weight, with the explicit target
7
Training proceeds in 8 batches of 9 sampled bitstrings each. For batch 0, the sampled set 1 defines a subspace Hamiltonian whose lowest eigenvalue is 2. The loss is
3
with 4. The corresponding REINFORCE-style gradient is
5
Minimizing this objective shifts probability mass toward sample sets that yield low projected energies.
AB-SND extends this by introducing a parameterized basis transformation optimized jointly with the sampler. The paper considers single-spin and non-overlapping two-spin rotations, which are tractable on classical computers, and also more expressive global unitaries that can be implemented using quantum circuits. The stated purpose is to make the ground-state wave function more concentrated, thereby enlarging the regime in which sample-based diagonalization remains effective.
4. Neural architectures, observables, and algorithmic use
The two SND formulations differ sharply in architecture. In the spin–fermion case, the network is a shallow fully connected regressor with a single hidden layer and linear spectral output. In the SBD case, the network is a Transformer encoder with causal masking, using 2 layers, 4 heads, and embedding size 64 to realize the autoregressive factorization
6
At step 7, the model sees 8 plus optional conditioning for AB-SND, and output logits are converted to probabilities by a softmax, optionally temperature-scaled during inference (Cantori et al., 18 Aug 2025).
In the spin–fermion setting, SND is embedded directly into thermodynamic estimation. Given exact eigenvalues 9, the fermionic free energy is
0
SND replaces 1 by 2 and computes
3
The resulting surrogate free energy is used in the Metropolis acceptance step,
4
and the same replacement is propagated into the formulas for average internal energy, specific heat, magnetization 5, and staggered magnetization 6 (Stratis et al., 2022).
In the SBD setting, by contrast, the learned model is not predicting eigenvalues of the full Hamiltonian. It is selecting a basis in which a smaller projected Hamiltonian can be assembled and diagonalized. The optimization target is therefore energetic rather than reconstructive: the reported relative error is
7
This distinction matters conceptually. In the spin–fermion formulation, the network acts as a surrogate for a spectral map 8; in the SBD formulation, it acts as a proposal mechanism for the subspace itself.
5. Benchmarks, accuracy, and scaling behavior
For the spin–fermion model, the reported results show a strong separation between one and two dimensions. In 1D with 9, 0 reaches test-set 1 and mean absolute error per eigenvalue of order 2–3. Over 4, the reported errors are 5. In 2D with 6, similar MSE levels are obtained at all temperatures, with slightly higher errors at the lowest 7; over 8, 9 yields errors 00 down to 01. For thermodynamic observables in 1D, all models reproduce 02, 03, 04, and 05 within statistical error using 06 Monte Carlo samples. In 2D, only 07, and to a lesser extent the RKKY-inspired Heisenberg model, remain accurate for 08 and 09 below 10, whereas the free-energy network 11 fails in the low-temperature regime despite low MSE on 12. The computational comparison is 13 per update step for exact diagonalization versus 14 for SND inference; for 15 and 16, the reported proposal-stage speed-up is 17–18, with end-to-end acceleration depending on how many proposals are retained versus discarded (Stratis et al., 2022).
For SBD-based SND and AB-SND, the benchmarks cover 1D ferromagnetic TFIM with periodic boundaries up to 19, 2D square-lattice TFIM with open boundaries at 20, and a 2D Edwards–Anderson spin glass with 21 at 22. The reported dependence on sample count 23 shows that, for 24 where the ground state is concentrated, all SBD variants improve as 25 grows. Standard SBD from NQS sampling saturates around 26 when 27 in the 2D-EAM. SND matches NQS-SBD for small 28 but fails for the disordered spin-glass regime, with error 29. AB-SND with single-spin rotations outperforms both, reaching 30 with 31. As a function of transverse field, standard methods fail as 32, while AB-SND maintains small 33 from 34 to 35, with only a peak near the quantum phase transition 36 and still reported error 37 for 38. For scaling with system size, the paper reports that achieving 39 in the 1D TFIM at 40 requires exponentially growing 41 for standard NQS-SBD beyond 42, whereas AB-SND with adaptive single-spin rotations needs essentially constant 43 up to 44. Additional results indicate that non-overlapping two-spin adaptive rotations further reduce 45 near criticality, and that a proof-of-concept shallow VQE-style circuit on 6 qubits with 16 samples yields 46 except extremely close to 47 (Cantori et al., 18 Aug 2025).
6. Limitations, misconceptions, and extensions
A common misconception is that low scalar free-energy error is sufficient for reliable thermodynamics. The spin–fermion results explicitly counter this in two dimensions: the free-energy network 48 can exhibit low MSE on 49 and still fail in the low-50 regime for 51 and 52. The corresponding interpretation given in the source is that SND works best when the target is the full spectrum, because a richer target retains more information than the scalar free energy. The same source also states that simple 1D chains can be captured even by low-dimensional Heisenberg fits, whereas in 2D the spectrum network is crucial. Reported limitations include overfitting of 53 in 2D, training cost scaling as 54 because each label contains 55 eigenvalues, and a practical limit around 56 (Stratis et al., 2022).
In the SBD line of work, a different misconception would be to equate SND with exact reconstruction of wave-function amplitudes. The stated objective is energy-based: SND and AB-SND target low projected energies rather than direct amplitude reconstruction. Reported limitations include duplicate samples as 57 grows, non-convex optimization landscapes, and degradation of plain SND near critical points or in spin-glass regimes. The paper notes that increasing the effective temperature in the final softmax dramatically raises the yield of unique samples while barely affecting 58. It further suggests advanced RL or second-order optimizers for difficult landscapes, deeper entangling circuits on real quantum hardware for greater accuracy, and extensions to excited states via deflated diagonalization or to time evolution by projecting the propagator (Cantori et al., 18 Aug 2025).
The two lines of work also point to different extension paths. In the spin–fermion setting, retraining on spectra is proposed for other quantum-classical hybrids such as Holstein and Kondo-lattice models, with the additional suggestion that one may pre-train at high temperature and reuse the spectrum network across temperatures, and that equivariant architectures such as graph-neural networks could incorporate lattice symmetries more directly. In the SBD setting, AB-SND indicates that basis adaptation can be as important as sampling itself when the target state is delocalized. Taken together, these results support a narrow but technically significant conclusion: within the current literature, SND is best understood as a neural mechanism for concentrating spectral relevance—either by predicting the spectrum attached to a sampled configuration, or by sampling the basis states on which a projected diagonalization should be performed.