MBFormer: Transformer Model for Excited States
- MBFormer is a transformer-based approach that learns many-body interactions from mean-field inputs to predict excited-state observables within the GW-BSE framework.
- It employs a symmetry-aware, grid-free tokenization of Kohn–Sham states using E(2)-equivariant embeddings to handle variable system sizes in 2D materials.
- The model achieves high accuracy in predicting quasiparticle and exciton properties, with interpretability provided by attention mechanisms linking physical electron–hole interactions.
Searching arXiv for the specified paper and closely related context. arXiv search query: (Hou et al., 7 Jul 2025) MBFormer transformer many-body materials GW BSE MBFormer is a transformer-based learning paradigm for quantum many-body interactions in real materials, introduced as a symmetry-aware, grid-free model that learns the many-body hierarchy directly from mean-field inputs and predicts excited-state quantities within the GW plus Bethe–Salpeter equation (GW-BSE) formalism (Hou et al., 7 Jul 2025). It is designed for regimes in which the effective interactions are nonlocal in space, strongly energy-dependent, and dependent on the full manifold of occupied and unoccupied mean-field states across the Brillouin zone, conditions under which nearsightedness-based surrogates for ground-state Hamiltonians are not adequate. In the reported implementation, MBFormer is trained on 721 two-dimensional materials from the C2DB database and targets state-resolved quasiparticle energies, exciton energies, exciton oscillator strengths, and exciton wavefunction distributions.
1. Problem setting and conceptual scope
MBFormer is motivated by the difficulty of predicting excited-state properties in real materials when the relevant interactions are both nonlocal and energy-dependent. In many-body perturbation theory, the quasiparticle self-energy depends on the entire manifold of occupied and unoccupied mean-field states across the Brillouin zone and on frequency , while the electron–hole Bethe–Salpeter kernel couples electron–hole basis states nonlocally in both -space and band space (Hou et al., 7 Jul 2025). These dependencies imply variable, system-dependent basis sizes and invalidate assumptions that underlie tight-binding models and many ML surrogates for ground-state Hamiltonians.
Within this setting, MBFormer learns a post-DFT mapping from Kohn–Sham states and metadata to excited-state observables. The learned functional is expressed as
The predicted quantities are explicitly state-resolved: quasiparticle energies , exciton energies , exciton oscillator strengths , and exciton wavefunction distributions represented either as amplitudes or derived spatial electron–hole probability densities.
A common misconception would be to regard MBFormer as a direct replacement for ab initio GW-BSE solvers. The reported formulation is more specific: it is trained to mimic post-DFT many-body perturbation theory functionals from mean-field inputs. This distinction matters because the model inherits its targets, and therefore its domain of validity, from the GW-BSE data on which it is supervised.
2. Relation to GW and the Bethe–Salpeter equation
The GW component is framed around the frequency-dependent self-energy operator
or, more explicitly,
0
The quasiparticle energy for a Kohn–Sham state 1 is written as
2
with renormalization factor
3
In the MBFormer experiments, the learned target is the scalar G4W5 correction per 6,
7
The excitonic component is based on the Bethe–Salpeter eigenvalue problem in the electron–hole basis 8:
9
where 0 contains screened direct and typically unscreened exchange electron–hole interactions. Oscillator strength is represented as
1
and optical absorption can be expressed through
2
The exciton wavefunction distribution is
3
with marginal spatial densities obtained by integration over one coordinate.
The role of MBFormer in this formal structure is to approximate the action of the many-body self-energy and electron–hole interaction kernels on the relevant basis. This suggests that the model is not merely fitting scalar spectra, but is organized around the same hierarchy that distinguishes one-particle and two-particle sectors in MBPT.
3. Architecture: symmetry-aware, grid-free transformer
MBFormer is described as grid-free because it operates in the mean-field basis rather than on fixed real-space grids (Hou et al., 7 Jul 2025). Its inputs are per-state tokens carrying learned descriptors of Kohn–Sham wavefunctions together with metadata, specifically energies 4, band indices 5, and momenta 6. The architecture uses two disjoint token sets that mirror the structure of MBPT. The source set is a large collection of Kohn–Sham states, 7, representing the ground-state environment. The target set is task-dependent: single-particle states 8 for GW and electron–hole pairs 9 for BSE. Because the model is input-size agnostic, it can accommodate variable numbers of source and target tokens across materials.
Symmetry-awareness is introduced through an E(2)-equivariant variational autoencoder, denoted E2-VAE, which integrates E2-CNN layers into a U-Net. This embedding enforces equivariance to planar rotations and translations and robustness to coordinate permutations and changes in lattice size, properties that are directly relevant for 2D materials and varying simulation cells and 0-grids. Sinusoidal positional embeddings are applied to momentum coordinates 1, band indices 2, and energies 3 so that reciprocal-space meta-information is included without imposing an arbitrary token ordering.
Tokenization combines latent wavefunction information and metadata. Real-space information from 4 is compressed into a latent vector 5, which is fused with encoded 6, 7, and 8. For the GW task, target tokens are single-particle tokens with initialization 9. For the BSE task, electron–hole pair tokens are assembled by concatenation or tensor product:
0
The transformer itself uses encoder-decoder stacks with attention, residual connections, and Add & Norm (LayerNorm) blocks. The encoder performs self-attention over source tokens to produce a latent representation of the ground-state environment. The decoder processes target tokens with self-attention and cross-attends to the encoder latent. Attention is the mechanism through which nonlocal, energy-dependent coupling is represented:
1
Because the learned projections depend on descriptors that include band energies, 2-vectors, and compressed wavefunction features, attention provides a route for coupling target excitations to the entire source manifold. In the BSE decoder, the normalized attention weights are directly used to predict wavefunction moduli 3.
4. Output heads, objectives, and training protocol
The architecture supports multiple output heads within a unified encoder-decoder framework (Hou et al., 7 Jul 2025). For GW, the output is a scalar 4 for each target single-particle token, with quasiparticle energies obtained as
5
For BSE, the model predicts exciton eigenvalues 6, oscillator strengths 7, and distributional outputs 8 derived from attention rows.
The training objectives are correspondingly heterogeneous. Energies are optimized with mean squared error or mean absolute error,
9
Oscillator strengths use MSE or MAE on max-normalized dipoles,
0
Wavefunction amplitudes are trained with Jensen–Shannon divergence between normalized distributions:
1
Multi-task training uses weighted sums such as
2
The dataset comprises 721 two-dimensional materials from the Computational 2D Materials Database. Ground-state DFT supplies Kohn–Sham orbitals and energies, while GW-BSE calculations provide supervision for quasiparticle corrections, exciton energies, oscillator strengths, and exciton amplitudes. Preprocessing extracts 3 in plane-wave representation, compresses them via E2-VAE, and attaches positional encodings for 4, 5, and 6. Tokens are then partitioned into source and target sets according to the task. For GW, source tokens include many occupied and unoccupied states and targets are selected single-particle states. For BSE, the source is analogous and the targets are electron–hole pairs formed near the band edges.
The reported train-test protocols are task-specific. For GW, the split is 80% train and 20% test across the 721 materials. For BSE, it is 90% train and 10% test. An additional augmentation study is carried out for monolayer hBN, where 900 BSE Hamiltonians are generated over different 7-mesh sizes and small shifts in the Brillouin zone; training on 6 coarse meshes with 84 augmentations, approximately 10% of the dataset, is used for inference on fine unseen 8-grids. Optimization follows a standard transformer pipeline with AdamW-style decoupled weight decay, LayerNorm, residual connections, feed-forward sublayers, weight decay, and early stopping on validation metrics.
5. Quantitative performance, ablations, and interpretability
On the GW task, MBFormer achieves mean absolute error of approximately 9 and 0 across test materials (Hou et al., 7 Jul 2025). The mean of the G1W2 corrections in the test set is approximately 3 with standard deviation approximately 4. The model reproduces smooth quasiparticle bandstructures and shows the expected dependence on the number of source states, described in the paper as “empty-band” convergence behavior. In a cross-attention ablation with variable source size, increasing source states from 1 to 60 conduction bands reduces validation MSE from approximately 5 to approximately 6, corresponding to approximately 43% improvement.
On the BSE task, the reported exciton-energy performance is MAE approximately 7 over all excitons, improving to approximately 8 for the first 100 lowest-energy excitons, with 9. The hBN 0-grid inference study yields exciton-energy performance of 1 and MAE approximately 2 on fine unseen 3-grids. For oscillator strengths, the reported dipole MAE is approximately 4 after max-normalization, and reconstructed absorption spectra 5 match BSE. For exciton amplitudes, attention-derived distributions 6 reproduce BSE amplitudes with low JSD below 0.05 for band-edge excitons, while higher-energy excitons show larger JSD due to mixing and degeneracy.
The ablation results identify attention as the critical mechanism. For BSE, including self-attention reduces validation MSE from approximately 7 to approximately 8, about 75% improvement, and reduces MAE from approximately 9 to approximately 0, about 62.5% improvement. Increasing depth without attention, including 20-layer models, does not recover this gain. For GW, reducing the source-state count worsens validation loss, consistent with missing scattering channels and poorer approximation of the polarizability.
Interpretability is tied directly to the attention mechanism. Attention maps identify which mean-field states most strongly couple to a given target excitation. In the BSE setting, the attention row for exciton 1 approximates the distribution 2, linking learned weights to physical electron–hole amplitudes across 3 and band indices. In the GW setting, cross-attention analysis shows improved prediction when more high-energy unoccupied states contributing to screening are included. A plausible implication is that MBFormer’s interpretability is not merely post hoc, but partly embedded in how the decoder represents many-body couplings.
6. Positioning, computational characteristics, and limitations
The paper positions MBFormer against earlier ML approaches for excited states in two ways (Hou et al., 7 Jul 2025). Relative to prior ML for GW bandstructures that handcraft state representations, exemplified by Knøsgaard–Thygesen, MBFormer is reported to attain state-of-the-art MAE of approximately 4 while producing smooth bandstructures through learned latent representations of Kohn–Sham states. Relative to direct spectrum predictors such as GNNopt for absorption, it yields state-resolved excitonic quantities 5, 6, and 7, which enables interpretability and downstream physics analyses. The important distinction is that MBFormer is structured around state-level many-body observables rather than solely around aggregate spectra.
The computational profile follows from token-based attention. Per layer, the attention mechanism scales as 8, with 9 given by the number of source plus target states selected for the task. In the reported formulation, this token count is typically orders of magnitude smaller than the full plane-wave grid. Compared to ab initio GW with naive 0 scaling and BSE with 1 scaling in system size, MBFormer inference is described as lightweight once trained and capable of delivering orders-of-magnitude speedups for excited-state prediction across materials. Variable numbers of states are handled through masking, padding, and batching, and the combination of grid-free tokenization, positional encodings, and 2-grid augmentation supports interpolation across different samplings.
The stated limitations are domain-specific rather than incidental. The model is trained on 2D materials, so transfer to 3D or strongly correlated systems may require retraining and revised symmetry encoders, including E(3)-equivariant extensions. Predictions are sensitive to the quality of the mean-field inputs, so inaccurate Kohn–Sham states can degrade performance, especially for subtle many-body features. Exciton degeneracy and continuum states produce larger JSD for amplitudes and greater variability in oscillator strengths at higher energies. Frequency dependence is learned only implicitly through metadata, and the authors note that explicit 3-dependent features may improve self-energy modelling.
The extension directions identified in the paper include 3D materials with an E(3)-equivariant embedder; spin–orbit coupling and magnetic order with appropriate symmetry encodings; phonons and temperature effects through electron–phonon couplings and finite-temperature screening; prediction of mobilities, lifetimes, and linewidths; defects, heterostructures, and interfaces; charged excitations such as trions; biexcitons; polaritons under light–matter coupling; and dynamical many-body phenomena through temporal or frequency channels. These directions indicate that MBFormer is intended not only as a model for GW-BSE observables in 2D materials, but as a general transformer-based template for many-body learning in materials systems, provided that the symmetry embedding and supervision targets are adapted appropriately.