WorksComputer Science
Toward a Multimodal Foundation Model for Plasma State Reconstruction
Abstract
Plasma experiments observe coupled physical states through sparse, heterogeneous, and incomplete diagnostics. We present a proof of concept toward a multimodal foundation model for plasma state reconstruction during magnetic reconnection, motivated by the Facility for Laboratory Reconnection Experiments (FLARE). Using 250 synthetic VPIC simulations at fixed reference electron beta , with 225 training runs and 25 disjoint validation runs, we train a 5.5M-parameter residual 3D U-Net to reconstruct three magnetic-field components and electron density from incomplete observations. The model combines spatial-only pooling, which preserves all 24 temporal frames, with global spatiotemporal self-attention and rotary positional encoding. Independently masking magnetic and density modalities across random, grid, block, and temporal patterns enables sparse sensing, cross-modal completion, density super-resolution, and temporal completion with a single set of weights and no task-specific retraining. With density fully hidden, just 0.1% magnetic spatial visibility reduces median density NRMSE from approximately 0.9 to 0.1. Conversely, observed density improves current-density reconstruction when magnetic data are absent or extremely sparse. With no magnetic observations, roughly 1% density visibility approaches the density reconstruction accuracy achieved with fully observed magnetic fields, although current structure remains more dependent on direct magnetic measurements. Full magnetic conditioning also stabilizes completion of missing future density frames. These results demonstrate bidirectional cross-modal predictive coupling within this simulation regime. Generalization across plasma regimes or to experimental measurements remains untested.
Introduction
Magnetic reconnection changes magnetic topology and converts stored magnetic energy into plasma flows, heating, and particle energization across laboratory, space, solar, and astrophysical systems [8, 19]. The Facility for Laboratory Reconnection Experiments (FLARE) at the Princeton Plasma Physics Laboratory is designed to access large-system, multiple-X-line reconnection regimes that are difficult to realize in smaller laboratory devices [9]. Its experimental program is therefore naturally associated with a state-estimation problem: the underlying plasma evolves as a coupled spatiotemporal system, while diagnostics provide only partial and modality-dependent observations.
A useful reconstruction model for such experiments should not require a separate network for every diagnostic configuration. It should accept diverse subsets of available measurements, exploit correlations between physical quantities, and reconstruct the unobserved state over both space and time. Existing machine learning approaches have demonstrated strong performance for sparse field reconstruction in fluids and geophysical systems [6, 14], and neural networks have accelerated equilibrium reconstruction in fusion plasmas from magnetic and non-magnetic measurements [2, 11]. However, these systems are usually developed around a fixed sensor representation or a task-specific mapping. In parallel, masked modeling has emerged as a general self-supervised objective for learning reusable image, video, and multimodal representations [1, 7, 17], and scientific foundation models have begun to exploit heterogeneous physical variables for multiple downstream tasks [12].
Here we combine these ideas into a single masked spatiotemporal reconstruction model for plasma fields. We treat the three-component magnetic field and normalized electron density as two coupled modalities. The processed notation corresponds to the native cylindrical VPIC components , and denotes before standardization. During training, each modality is independently subjected to spatially random, regularly sparse, contiguous-block, or temporal missingness with observation fractions ranging from fully absent to fully observed. A single residual 3D U-Net is trained to reconstruct the complete four-field state from the masked fields and their binary observation masks.
Our study is a prototype rather than a claim that a broadly general plasma foundation model has already been achieved. The present model is small by modern foundation-model standards, is trained only on synthetic VPIC data at , and has not yet been adapted to FLARE measurements. We therefore use “foundation model” only in a limited operational sense: one set of weights is trained with a broad masked objective and reused across distinct observation geometries, modality combinations, super-resolution settings, and temporal reconstruction tasks. This framing does not imply cross-regime, cross-device, or simulation-to-experiment generalization, none of which is established here. The main contributions are:
a unified mask-conditioned spatiotemporal reconstruction objective for magnetic field and density modalities with independently sampled missingness;
a residual 3D U-Net with preserved temporal resolution and global spatiotemporal attention that can infer the full state without hard-clamping observed values;
controlled experiments demonstrating bidirectional transfer between magnetic and density modalities, including magnetic ablation, density super-resolution, and conditional temporal completion; and
a sliding-window procedure showing how the same 24-frame model can be applied to longer plasma sequences.
Related work and background
Magnetic reconnection and FLARE. Magnetic reconnection is a multiscale process whose global evolution can depend on kinetic dissipation, current-sheet instability, plasmoid formation, and coupling between microscopic and macroscopic scales [8, 19]. FLARE was constructed specifically to study reconnection in multiple-X-line regimes relevant to space, astrophysical, and fusion plasmas [9]. This setting motivates data-driven methods that can fuse heterogeneous diagnostics while respecting the strongly coupled spatial and temporal structure of the plasma.
Machine learning for sparse physical reconstruction. Data-driven reconstruction from sparse sensors has a long history in fluid mechanics and scientific machine learning [4, 10]. Voronoi-assisted convolutional reconstruction can accommodate arbitrary sensor locations [6], while the attention-based Senseiver handles variable-size sparse observation sets and complex fields [14]. In plasma physics, deep neural networks have been used to infer tokamak equilibrium quantities from diagnostic measurements [11], and PlaNet combines magnetic and non-magnetic constraints with a physics-informed neural operator for equilibrium and separatrix reconstruction [2]. Our focus differs in both geometry and objective: rather than learn one fixed mapping from diagnostics to an equilibrium descriptor, we train one network to recover a time-dependent multi-field state under a distribution of missing-data patterns.
Masked multimodal representation learning. Masked autoencoding learns representations by reconstructing deliberately removed content [7]; VideoMAE extends the principle to space-time inputs [17]. MultiMAE showed that masking across multiple input and output modalities can induce cross-modal predictive coding and allow the same model to operate under different modality subsets [1]. ClimaX demonstrated a related foundation-model perspective for heterogeneous physical variables in weather and climate [12]. Our approach follows this general principle but operates directly on plasma field tensors and explicitly samples physically motivated spatial and temporal observation patterns.
Data and problem formulation
VPIC reconnection corpus
We use a synthetic corpus generated with the VPIC particle-in-cell code [3]. The present work uses the slice of a two-dimensional axisymmetric reconnection scan, comprising 250 simulations spanning , , and . Here is the reference electron beta; full simulation geometry, normalization, drive, collision model, and parameter definitions are given in Appendix A.
The native VPIC outputs are represented in the machine-learning arrays as , with . The retained domain is cm and cm; using cm gives a processed grid of spanning cm and cm. We extract contiguous 24-frame windows with a start-time stride of two frames. The split is performed by complete simulation run rather than by window: 225 runs provide 7,059 training windows and 25 disjoint validation runs provide 591 validation windows, so overlapping windows from the same physical trajectory never appear in both sets.
Each channel is standardized using mean and standard deviation statistics estimated from the training data only. The resulting statistics are
The current corpus is a methodological proxy for FLARE-oriented reconstruction rather than a validated digital twin of FLARE. Cross- generalization and adaptation to experimental measurements are left for future work.
Sparse and incomplete observations
Let denote the common observation mask for the three magnetic components and the density mask. The observed standardized fields are
The network input concatenates the four masked fields with four binary mask channels, using the same for . Explicit masks distinguish a physically zero value from a missing value.
During training, magnetic and density modalities independently sample one of five equally weighted families: spatial random, spatial grid, spatial block, temporal random, and temporal block. Random/grid spatial masks use a three-part visibility mixture: 5% probability of no visible samples, 5% probability of complete visibility, and otherwise an exact visible count sampled approximately log-uniformly between 1 and . Spatial blocks sample a random area and geometry, with equal probability of inpainting (hidden interior) and outpainting (visible interior). Temporal patterns sample the number of visible frames from 0 to ; temporal random uses scattered full frames, whereas temporal block uses a contiguous hidden or visible interval. Magnetic and density pattern, severity, and layout are independently drawn.
Method
Residual spatiotemporal U-Net
The model receives an 8-channel tensor,
and predicts all four complete standardized fields. The backbone is a four-level residual 3D U-Net [13] with channel widths (24, 48, 96, 192) and 5,526,100 trainable parameters. Each residual convolution block applies a convolution, SiLU, and a second convolution, followed by addition of a strictly linear skip path; a projection is used only when the channel count changes. We intentionally omit activation normalization in the convolutional path so that absolute feature levels and amplitudes can propagate through the linear residual path.
All downsampling is spatial only, using max pooling with kernel and stride , so the temporal dimension remains 24 throughout the encoder. Decoder features are trilinearly upsampled to the corresponding encoder resolution, concatenated with U-Net skip features, and reduced through the same residual convolution blocks. Full stage-by-stage shapes and parameter counts are given in Appendix B.
Global spatiotemporal attention
We insert global self-attention [18] after the third encoder feature map (96 channels at ) and after the bottleneck residual block (192 channels at ). Flattening the joint lattice produces 13,680 and 3,192 tokens, respectively, so each attention layer can route information jointly across space and time rather than along a preselected axis.
Both attention layers use eight heads. The 96-channel layer therefore has head dimension 12 and a joint QKV projection, while the 192-channel bottleneck has head dimension 24 and a QKV projection. The attention module is pre-normalized: LayerNorm is applied before QKV projection, followed by non-causal scaled dot-product self-attention, a linear output projection, and residual addition to the original tokens. There is no separate MLP/FFN sublayer in the attention module. The implementation calls PyTorch scaled-dot-product attention directly rather than constructing an explicit attention matrix or hard-coding a FlashAttention backend; attention dropout is zero.
Rotary position embedding [15] is applied to and separately along the temporal, , and coordinates. At the 96-channel layer, each 12-dimensional head allocates four rotary dimensions to each axis; at the 192-channel bottleneck, each 24-dimensional head allocates eight dimensions to each axis. Thus all head dimensions participate in axial 3D RoPE in the present configuration. Layer normalization remains confined to the attention branch, and the attention output projection is initialized to zero so that each attention module initially contributes an exact zero correction to the convolutional backbone.
Residual field prediction and objective
The final convolution predicts a correction to the visible standardized fields:
The output convolution is initialized to zero. Therefore, before learning begins, the network returns the supplied standardized values at observed locations and zero at hidden locations, where zero corresponds to the training-set channel mean after standardization. The learned correction is applied everywhere. We intentionally do not use a mask-gated hard data-consistency step: observed sites remain part of the reconstruction objective and can be revised by the model rather than being overwritten after inference.
The loss balances magnetic and density modalities and prevents either the large hidden region or the three magnetic channels from dominating the objective. For each modality group we compute MSE separately over visible and hidden elements and average only the non-empty terms:
where contains only subsets with at least one element. For the magnetic group, squared errors from , , and are pooled together before the visible/hidden averages are formed; density is treated as the second group. The final arithmetic mean of and therefore gives the magnetic field group and density equal overall weight regardless of channel count or visible fraction.
The final model is trained from random initialization for 4,500 epochs with AdamW, learning rate , weight decay , a 10-epoch linear warmup, and cosine decay to . Training uses automatic mixed precision and distributed data parallelism on 16 NVIDIA A100-SXM4-80GB GPUs onNERSC Perlmutter with per-GPU batch size 8 and global batch size 128. A full validation pass is performed after every training epoch, evaluating all five standardized mask patterns on the held-out validation loader. Training over 4,500 epochs required approximately 12.5 hours of wall-clock time, or about 200 GPU-hours.
Experiments and results
Unless otherwise stated, all reported results use the final checkpoint at epoch 4,500 (latest.pt), with no task-specific fine-tuning or checkpoint selection. For each setting, window-level metrics are averaged within each validation run; we then report the median and 16th–84th percentiles across the 25 runs. Density NRMSE denotes the RMSE in training-standardized density units, equivalently the density RMSE normalized by the training-set standard deviation.
For magnetic structure we report the toroidal (out-of-plane) current density. In the native cylindrical geometry this is ; to remain consistent with the processed Cartesian-like array notation and existing figures, we denote the same quantity by :
After inverse-transforming and to Tesla, we convert the spatial coordinates from centimeters to meters before differentiation. We report in A m. The dimensionless NRMSE is the RMSE of the predicted-current residual normalized by the training-set current density standard deviation, A m. Because the model does not hard-clamp visible magnetic values, error can remain nonzero even when is fully observed; spatial differentiation also amplifies small high-frequency field errors.
Standardized reconstruction benchmark
To compare missing-data geometry at matched severity, we evaluate five deterministic approximately 50%-visible masks shared across all four channels. Table 1 reports run-level median errors with 16th–84th percentile intervals. Overall MSE denotes the unweighted mean squared residual over all four standardized fields and all spatiotemporal locations. Contiguous missing regions produce the largest overall and density errors, whereas scattered and regularly sampled observations are generally easier to reconstruct; error shows additional dependence on sampling geometry.
| Task | Overall MSE | Density NRMSE | NRMSE |
| Spatial random | 0.0025 [0.0018, 0.0049] | 0.0456 [0.0333, 0.0666] | 0.3173 [0.2535, 0.4796] |
| Spatial grid | 0.0033 [0.0023, 0.0062] | 0.0581 [0.0460, 0.0785] | 0.1931 [0.1607, 0.2630] |
| Spatial block | 0.0287 [0.0117, 0.0589] | 0.0933 [0.0526, 0.1426] | 0.3724 [0.1888, 0.4926] |
| Temporal random | 0.0044 [0.0028, 0.0101] | 0.0405 [0.0288, 0.0613] | 0.1916 [0.1628, 0.2666] |
| Temporal block | 0.0217 [0.0066, 0.0576] | 0.0677 [0.0376, 0.1462] | 0.2385 [0.1702, 0.4286] |
Table 1. Standardized approximately 50%-visible evaluation. Entries are median [16th, 84th percentile] across 25 held-out runs.
Spatial reconstruction under 50% density masking
Figure 1 compares four spatial density observation geometries for a representative held-out plasmoid-merger frame while the magnetic field is fully observed. Random and checkerboard sampling, as well as block inpainting, recover the dominant density morphology with NRMSE 0.066–0.073. Block outpainting is more difficult (NRMSE 0.126), because the visible region is confined to the center while the much larger exterior must be inferred. Residuals concentrate around sharp density structures and mask boundaries.

Figure 1. Spatial density reconstruction with the magnetic field fully observed and density approximately 50% masked. Rows show random sampling, a regular checkerboard, block inpainting, and block outpainting. Prediction panels are raw model outputs rather than hard-clamped fields.
Bidirectional cross-modal reconstruction
We next isolate cross-modal information transfer with a paired magnetic ablation (Figure 2). For every held-out window, the two density conditions use exactly the same nested magnetic-probe ranking; only density visibility changes. When density is fully hidden, the median density NRMSE is close to 0.9 with no magnetic observations, but falls to roughly 0.1 with only 0.1% of spatial magnetic locations visible and approaches a – floor around 1% visibility. Thus sparse magnetic measurements strongly constrain density.

Figure 2. Paired magnetic ablation with nested magnetic probe sets. Blue curves use fully hidden density; orange curves use fully visible density with the identical magnetic masks. Left: density NRMSE. Right: derived NRMSE. Bands denote the 16th–84th percentile across held-out runs.
The reverse direction is visible in . When magnetic information is absent or extremely sparse, fully observed plasma density substantially reduces current density error relative to the density-hidden case. As magnetic coverage increases, the two curves converge, and at complete magnetic visibility both approach the same low error floor. This paired experiment provides evidence of bidirectional cross-modal predictive benefit rather than independent single-field interpolation.
Density super-resolution
Figure 3 sweeps exact density-probe counts of 0, 10, 100, and 1,000, corresponding to 0, 0.105, 1.05, and 10.47% of the 154 62 spatial grid. With the magnetic field fully observed, density NRMSE is already near 0.06 even with zero density probes, and additional density measurements provide only modest gains. Without magnetic observations, however, density error drops by almost an order of magnitude with only 10 probes and reaches the B-conditioned density error level by roughly 1% density visibility.

Figure 3. Density super-resolution as a function of exact density probe count, shown as spatial visibility. Fully observed magnetic fields (blue) strongly constrain density even without density probes; when B is absent (orange), about 1% density visibility is sufficient to approach the density error floor, while remains more dependent on magnetic observations.
The panel reveals an important asymmetry. Plasma density measurements alone provide information about magnetic and current structure, but even 10.47% density visibility leaves substantially less accurate than when is directly observed. Plasma density is therefore more strongly constrained by cross-modal context than the derived current structure.
Conditional temporal completion
To probe temporal completion, we retain a prefix of the 24-frame density window and hide all later density frames. Prefix lengths of 23, 18, 12, and 6 leave missing suffixes of 1, 6, 12, and 18 frames, respectively. Figure 4 shows that density error remains at a few within the observed prefix and rises sharply at the completion boundary. Longer horizons are more difficult, particularly when magnetic fields are also hidden. With fully observed magnetic fields, future density NRMSE remains near 0.05–0.07 over much of the missing interval; without , median errors and run-to-run variation grow more strongly with completion depth.

Figure 4. Conditional temporal completion within a 24-frame context. Colors denote the missing-suffix length; solid and dashed curves correspond to fully observed and fully hidden magnetic fields. Full magnetic context stabilizes future density reconstruction, while B-hidden error increases with completion depth.
When is fully visible, this is conditional temporal completion rather than causal forecasting: the model estimates conditioned on and over the full 24-frame window. The B-hidden condition is closer to forecasting from density history alone. The substantially larger B-hidden error further shows that missing entire magnetic snapshots is more demanding than interpolating density from cross-modal context.
Discussion
The experiments support three main conclusions. First, one masked model handles irregular sparse sensing, regular super-resolution, contiguous inpainting/outpainting, modality ablation, and temporal completion without task-specific retraining; this is the limited sense in which the model is foundation-like. Second, magnetic field and density provide complementary information: sparse magnetic observations strongly constrain plasma density, while plasma density helps recover current structure when magnetic measurements are absent or extremely sparse, although remains more dependent on direct magnetic information. Third, missingness geometry matters: scattered spatial and temporal observations are generally easier to reconstruct than contiguous missing blocks. Global attention is intended to route information over long distances, but it does not impose a physical evolution law.
Important limitations remain. Results use only synthetic VPIC simulations at reference electron beta , with no demonstrated cross- generalization, robustness to experimental noise or calibration error, or sim-to-real transfer to FLARE. The held-out runs are randomly drawn from the same Cartesian parameter grid and form a validation split rather than a separate third test set, so the present evaluation does not test generalization to unseen values of , , or . The masks also represent idealized grid-based observations rather than realistic FLARE diagnostic geometries such as fixed probe layouts or line-integrated measurements. Only magnetic field and density are modeled, and the 5.5M-parameter network is a proof of concept rather than a large-scale foundation model. We also do not isolate the contributions of the residual output formulation, spatial-only pooling, global attention, or RoPE through systematic architecture ablations, and we do not compare against classical sparse-reconstruction baselines such as linear or Voronoi-assisted interpolation, so the reported errors quantify absolute reconstruction quality rather than improvement over simpler methods. Because observed values are not hard-clamped, predictions can deviate from measurements at observed sites, by a few in standardized units in the cases examined here (Figure 4). The model does not explicitly enforce physical consistency constraints and produces deterministic point estimates without calibrated predictive uncertainty. Future work should expand the corpus and modalities, test stronger held-out parameter splits and realistic diagnostic geometries, incorporate stronger temporal and physical inductive biases, and evaluate explicit data-consistency and probabilistic objectives.
Conclusion
We presented a unified masked spatiotemporal model as a step toward a multimodal foundation model for plasma state reconstruction across sparse sensing, cross-modal completion, super-resolution, and temporal completion. The results demonstrate bidirectional predictive coupling between magnetic-field and density observations within a single model. This single- synthetic study is a proof of concept; cross-regime and simulation-to-experiment transfer, including FLARE, remain future work.
Acknowledgments and Disclosure of Funding
This research used resources of the National Energy Research Scientific Computing Center (NERSC), a U.S. Department of Energy Office of Science User Facility, under NERSC award GenAI@NERSC. C.D. acknowledges support from the U.S. Department of Energy under Grant No. DE-SC0024639 and the Alfred P. Sloan Research Fellowship.
VPIC corpus and training details
The corpus used in this work contains the Cartesian product of the run-name parameters shown in Table 2, yielding 250 complete simulations. This is one slice of the broader factorial VPIC scan; the present machine-learning experiments use only this fixed- slice. The HDF5 packer stores the native VPIC outputs using processed channel names and records the run parameters as HDF5 attributes. The 90/10 run-level split uses seed 1234, producing 225 training runs and 25 disjoint validation runs.
| Quantity | Definition | Units / normalization | Values |
| Reference electron beta, | dimensionless | 0.2 | |
| Multiplier on the Coulomb collision rate evaluated at initial | dimensionless | 0, 1, 2, 3, 5, 6, 7, 8, 9, 10 | |
| Uniform axial field added to the coil vacuum field; reconnecting-plane component, not a guide field | 0, 0.1, 0.15, 0.2, 0.3 | ||
| Flux-core-current drive time | 40, 70, 100, 150, 200 | ||
| dt | Output cadence | ||
| Grid | Processed spatial grid | — | 154 × 62 |
| Domain | Retained reconstruction window | cm |
Table 2. Physical meaning and coverage of the VPIC parameters used for training and evaluation. The metadata field dt is an output cadence, not the PIC integration timestep.
Simulation setup and normalization
The VPIC calculations are two-dimensional and axisymmetric in cylindrical geometry, with one cell in the toroidal direction and all three field and velocity components retained. The vessel spans cm and 150 cm in . Perfectly conducting walls reflect particles. Two flux cores of radius 16 cm are centered at cm and cm; each carries a prescribed toroidal current in its inner 4 cm and absorbs particles that reach the core. At , the region outside the cores contains uniform Maxwellian electrons and ions with , , and no drift. The plasma is initialized in the coil vacuum field plus the uniform axial field , with initially.
Reconnection is driven by the prescribed flux-core current
which decreases from to over and then rises again; each nominal run extends to . This follows the MRX-type pull-reconnection setup of Dorfman et al. [5]. Coulomb electron–electron, electron–ion, and ion–ion collisions are included using the Takizuka–Abe binary-collision method [16]. The simulations use , and lengths are anchored to cm for hydrogen, giving cm and cm. The native grid spacing is two electron Debye lengths, with 200 macro-particles per cell per species.
Frames are written at an output cadence . Each saved frame is a short boxcar time average over the first 20% of its output interval. The PIC integration timestep is distinct from this cadence and is set independently at 0.98 of the Courant limit. The native output window used here is cm and cm; the processed radial coordinate is cm. The outputs contain , , and in units of and electron density in units of .
Preprocessing, windowing, and split
The preprocessing pipeline starts from four VPIC CSV sequences corresponding to native , , , and , represented in the processed arrays as , , , and . For each simulation run, frames are matched by integer frame identifier; packing requires the four variables to contain identical frame identifiers, the first frame to be zero, and the sequence to be contiguous. Each frame is read as float32 and stored in HDF5 with dataset layout and channel order . Run metadata, including the run-name field (physically ), , , , , , , and , are stored as HDF5 attributes.
The training dataset lazily reads the HDF5 files and extracts every valid contiguous 24-frame window with start-time stride two, returning tensors in order. Masking is not performed in the dataset loader; it is sampled online by the training loop after normalization. The split is made by complete run name with seed 1234, using 10% of the 250 runs for validation. This yields 225 training runs (7,059 windows) and 25 disjoint validation runs (591 windows). Channel means and standard deviations are estimated from training data only, with the training script configured to use at most 50 training batches for this estimate; the resulting statistics are the values reported in Section 3.1.
Mask sampling and standardized evaluation
During training, the magnetic field and density modalities independently draw one of the five mask families with equal probability. For spatial_random and spatial_grid, the exact visible-site count is sampled independently for each modality using a three-component mixture: probability 0.05 at zero visible sites, probability 0.05 at all sites, and otherwise an approximately log-uniform count in . The three magnetic components share one magnetic layout. Spatial block masks draw a target block area from a continuous uniform mask fraction, randomize block location and aspect ratio, and choose inpainting versus outpainting with equal probability. Temporal random and temporal block masks draw the number of visible frames uniformly from ; the former scatters the visible frames and the latter uses a contiguous visible or hidden interval. Magnetic and density pattern, severity, and layout are sampled independently.
The standardized benchmark in Table 1 uses deterministic approximately 50%-visible masks shared by all four channels, so differences primarily reflect geometry rather than severity. spatial_random uses exactly distinct visible sites sampled with seed 4321; spatial_grid uses the checkerboard rule ; spatial_block keeps the lower half of the index visible and masks the upper half; temporal_random keeps even-numbered local frames and masks odd-numbered frames; and temporal_block keeps the first half of the 24-frame window and masks the second half.
Each evaluation window is scored separately. For each physical simulation run and mask setting, window-level metrics are first averaged arithmetically over all windows from that run. The reported central value is then the median of these per-run means across the 25 held-out runs, and the uncertainty band or interval is the 16th–84th percentile across runs. Overall MSE is the mean squared residual over all four standardized channels and all locations. Density NRMSE is . The metric is computed after inverse transformation to physical magnetic field units and is normalized by the training-set standard deviation as described in § 5.
Optimization and execution
The final run uses AdamW with learning rate , weight decay , 10 epochs of linear warmup, cosine decay to , gradient-norm clipping at 1.0, and automatic mixed precision. Training runs for 4,500 epochs with batch size 8 per GPU on 16 GPUs, giving global batch size 128. Distributed execution uses PyTorch DistributedDataParallel with NCCL on four Perlmutter nodes with four NVIDIA A100-SXM4-80GB GPUs per node. After every epoch, the same held-out validation loader is evaluated under all five standardized mask patterns; no validation-skipping interval is used, so training contains 4,500 complete in-training validation passes. The run starts from random model weights; no previous checkpoint is used for initialization. Checkpoints record the model state, optimizer state, epoch, best validation score, training arguments, channel statistics, model version, and masking version. The launcher permits exact resume from the most recent checkpoint only when the recorded training parameters match the requested configuration.
For clarity, the effective model and training options are:
--betas 0.2 --delta-t 24 --stride-t 2
--batch-size 8 --epochs 4500 --lr 2e-4
--warmup-epochs 10 --min-lr 2e-6 --weight-decay 1e-4
--base-channels 24 --channel-mults 1 2 4 8
--use-attention --spatial-only-pooling --amp
--mask-patterns spatial_random 1 spatial_grid 1 spatial_block 1
temporal_random 1 temporal_block 1
--density-visible-p-zero 0.05 --density-visible-p-full 0.05
--magnetic-visible-p-zero 0.05 --magnetic-visible-p-full 0.05
The final run used the NERSC pytorch/2.13.0 software environment. Runtime inspection of that installation gives Python 3.12.13, PyTorch 2.13.0+cu130, CUDA 13.0 as reported by torch.version.cuda, NCCL 2.29.7, and cuDNN 9.20.0. The launcher invokes python -m torch.distributed.run (torchrun) with the c10d rendezvous backend and initializes PyTorch DistributedDataParallel with NCCL. Automatic mixed precision is enabled. These version strings are properties of the loaded NERSC module rather than hard-coded source constants.
| Item | Version / setting |
| System | NERSC Perlmutter, A100-SXM4-80GB GPU nodes |
| NERSC module | pytorch/2.13.0 |
| Python | 3.12.13 |
| PyTorch | 2.13.0+cu130 |
| CUDA build | 13.0 |
| NCCL | 2.29.7 |
| cuDNN | 9.20.0 |
| Distributed training | PyTorch DDP / NCCL, 16 GPUs |
| Precision | Automatic mixed precision (AMP) |
Table 3. Software and distributed-training environment used for the final run.
Training was continued across four scheduler sessions from the most recent checkpoint; resume restores the optimizer and epoch state and is accepted only when the recorded training configuration matches the requested run. Active distributed steps sum to 45,143 s (12 h 32 min), or approximately 200.6 allocated GPU-hours on 16 GPUs; including scheduler overhead outside the active steps, the four sessions span 47,072 s (13 h 4 min). These timing records include the validation pass performed after every epoch; no separate train-only and validation-only timers were recorded. The approximately 200 GPU-hour figure refers to the final reported training run; preliminary model-development runs used additional compute that was not comprehensively tracked, and separate wall-clock timings were not recorded for the post-hoc evaluation scripts.
Reproducibility scope
The released training and evaluation code specifies the machine-learning pipeline starting from the processed VPIC HDF5 field outputs, including window construction, masking, training, checkpointing, and evaluation. The original VPIC simulations were generated independently of the present machine-learning study, and the complete VPIC input decks and numerical configuration are not included in the current release. An anonymized code and checkpoint archive is available at https://anonymous.4open.science/r/neurips_anonymous_supplement-11CC/. The archive provides the training and evaluation code, model implementation, exact run-level split metadata, sanitized final checkpoint, configuration files, software-environment specification, and reproduction scripts. The processed VPIC corpus itself is not distributed with the present submission while data provenance, attribution, and release permissions are being finalized with the simulation contributors. Consequently, the released materials allow the model implementation, training configuration, checkpoint, and evaluation pipeline to be inspected and reused, but exact re-execution of the reported VPIC numerical evaluations requires access to the processed corpus. Regenerating the underlying VPIC simulations from particle-in-cell initial conditions is not required once the processed corpus is available.
Architecture and implementation details
Table 4 summarizes the tensor geometry of the model for one window, while Table 5 reports the exact trainable parameter allocation. MaxPool3d uses kernel=stride , so odd spatial dimensions are floored on the encoder path. The decoder uses trilinear interpolation to the exact skip-tensor shape before concatenation, restoring the original grid without requiring divisibility by powers of two. The two attention branches together contain 186,048 parameters (3.37% of the model); most parameters remain in the convolutional encoder, bottleneck, and decoder.
| Stage | Feature shape | Attention tokens |
| Input | – | |
| Encoder 0 | – | |
| Encoder 1 | – | |
| Encoder 2 + attention | 13,680 | |
| Encoder 3 | – | |
| Bottleneck + attention | 3,192 | |
| Decoder 2 | – | |
| Decoder 1 | – | |
| Decoder 0 | – | |
| Output | – |
Table 4. Stage-by-stage feature geometry of the residual U-Net. Shapes omit batch dimension and are written as channels .
| Module | Parameters |
| Encoder 0 | 21,000 |
| Encoder 1 | 94,608 |
| Encoder 2 | 378,144 |
| Encoder 3 | 1,512,000 |
| Bottleneck residual block | 1,991,040 |
| Decoder 2 | 1,023,264 |
| Decoder 1 | 255,888 |
| Decoder 0 | 64,008 |
| Encoder-2 attention | 37,440 |
| Bottleneck attention | 148,608 |
| Output conv. | 100 |
| Total | 5,526,100 |
Table 5. Trainable parameter count by top-level module.
The two attention modules use the same structural sequence,
with obtained from a single linear projection of . At Encoder 2, , , and , so each of has 96 features per token and the combined projection has 288 outputs. At the bottleneck, , , and , giving 192 features per , , or tensor and 576 outputs in the combined projection. The RoPE slices are dimensions per head for at Encoder 2 and at the bottleneck. No MLP/FFN or attention dropout is used.
The implementation uses torch.nn.functional.scaled_dot_product_attention with dropout_p=0 and is_causal=False. No attention backend is explicitly selected in the model code. The residual attention output projection and the final field-output convolution are both initialized to zero, so the added attention path and the final learned field correction start from zero.
Long-sequence sliding reconstruction
The network is trained on 24-frame windows. To test longer sequences without retraining, we recursively apply the model with sliding steps of 1, 12, and 24 frames. The appendix experiment uses 1,000 fixed density probes (10.47% spatial visibility), considers the first 48 frames of each sufficiently long held-out run, and evaluates 18 validation runs. The statistical unit is the simulation run: each run contributes one 48-frame RMSE curve per setting, after which median and 16th–84th percentile bands are computed across runs.
Figure 5 shows that more overlap is not necessarily better. The time-averaged median frame RMSE is approximately 0.020/0.022 for step 1, compared with 0.017/0.017 for steps 12 and 24 (fully visible / fully hidden magnetic field). On the displayed B-hidden canonical trajectory, aggregate 48-frame NRMSE values are 0.0796, 0.0731, and 0.0739 for steps 1, 12, and 24, respectively. This suggests that extremely frequent recursive reuse can accumulate model error rather than monotonically refine the trajectory. The procedure is an offline long-sequence reconstruction method, not a causal forecasting algorithm.

Figure 5. Sliding-window extension to 48-frame sequences with 1,000 fixed density probes. Left: median frame RMSE across 18 held-out runs for different slide steps and magnetic conditions. Middle/right: predictions and residuals for a representative B-hidden trajectory.
References
- [1]Roman Bachmann, David Mizrahi, Andrei Atanov, and Amir Zamir. Multimae: Multi-modal multi-task masked autoencoders. In Computer Vision – ECCV 2022, volume 13697 of Lecture Notes in Computer Science, pages 348–367. Springer, 2022. doi: 10.1007/978-3-031-19836-6_20.DOI
- [2]Matteo Bonotto, Domenico Abate, and Leonardo Pigatto. Reconstruction of plasma equilibrium and separatrix using convolutional physics-informed neural operator. Fusion Engineering and Design, 200:114193, 2024. doi: 10.1016/j.fusengdes.2024.114193.DOI
- [3]K. J. Bowers, B. J. Albright, L. Yin, B. Bergen, and T. J. T. Kwan. Ultrahigh performance three-dimensional electromagnetic relativistic kinetic plasma simulation. Physics of Plasmas, 15(5):055703, 2008. doi: 10.1063/1.2840133.DOI
- [4]Steven L. Brunton, Bernd R. Noack, and Petros Koumoutsakos. Machine learning for fluid mechanics. Annual Review of Fluid Mechanics, 52:477–508, 2020. doi: 10.1146/annurev-fluid-010719-060214.DOI
- [5]S. Dorfman, W. Daughton, V. Roytershteyn, H. Ji, Y. Ren, and M. Yamada. Two-dimensional fully kinetic simulations of driven magnetic reconnection with boundary conditions relevant to the magnetic reconnection experiment. Physics of Plasmas, 15(10):102107, 2008. doi: 10.1063/1.2991361.DOI
- [6]Kai Fukami, Romit Maulik, Nesar Ramachandra, Koji Fukagata, and Kunihiko Taira. Global field reconstruction from sparse sensors with voronoi tessellation-assisted deep learning. Nature Machine Intelligence, 3(11):945–951, 2021. doi: 10.1038/s42256-021-00402-2.DOI
- [7]Kaiming He, Xinlei Chen, Saining Xie, Yanghao Li, Piotr Dollár, and Ross Girshick. Masked autoencoders are scalable vision learners. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 16000–16009, June 2022. doi: 10.1109/CVPR52688.2022.01553.DOI
- [8]Hantao Ji, William Daughton, Jonathan Jara-Almonte, Ari Le, Adam Stanier, and Jongsoo Yoo. Magnetic reconnection in the era of exascale computing and multiscale experiments. Nature Reviews Physics, 4(4):263–282, 2022. doi: 10.1038/s42254-021-00419-x.DOI
- [9]Hantao Ji, Jongsoo Yoo, Peiyun Shi, Euichan Jung, Kush Maheshwari, Adam Robbins, Sunghyun Son, Adam Stanier, Yang Ren, Sayak Bose, Dylan Corl, Keith Corrigan, Robert Cutler, William Daughton, Robert Ellis, Geoffrey Goettelfinger, Ronald Hatcher, Philip Heitzenroeder, Frank Hoffmann, Jonathan Jara-Almonte, Michael Kalish, Thomas Kozub, Enrique Merino, Weiguo Que, Benjamin Smith, John Wallace, Xin Zhao, Sofia Avrutskiy, Neal Crocker, Seth Dorfman, Yuka Doke, Corina Dunn, William Fox, Boting Li, Xiaocan Li, Clayton Myers, Shohgo Okazaki, Joshua Pawlak, Tongnyeol Rhee, Byonghoon Seo, Taiju Suzuki, Yang Zhang, Stuart Bale, Amitava Bhattacharjee, Troy Carter, Chuanfei Dong, James Drake, Jan Egedal, Erik Gilson, Michiaki Inomoto, Jonathan Menard, Yasushi Ono, Stewart Prager, John Ser, Hiroshi Tanabe, and Masaaki Yamada. The FLARE facility, 2026. URL https://arxiv.org/abs/2608.17332.
- [10]George Em Karniadakis, Ioannis G. Kevrekidis, Lu Lu, Paris Perdikaris, Sifan Wang, and Liu Yang. Physics-informed machine learning. Nature Reviews Physics, 3:422–440, 2021. doi: 10.1038/s42254-021-00314-5.DOI
- [11]Jingjing Lu, Youjun Hu, Nong Xiang, and Youwen Sun. Fast equilibrium reconstruction by deep learning on east tokamak. AIP Advances, 13(7):075007, 2023. doi: 10.1063/5.0152318.DOI
- [12]Tung Nguyen, Johannes Brandstetter, Ashish Kapoor, Jayesh K Gupta, and Aditya Grover. ClimaX: A foundation model for weather and climate. In Andreas Krause, Emma Brunskill, Kyunghyun Cho, Barbara Engelhardt, Sivan Sabato, and Jonathan Scarlett, editors, Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pages 25904–25938. PMLR, 2023. URL https://proceedings.mlr.press/v202/nguyen23a.html.arxiv.org/abs/2301.10343
- [13]Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention – MICCAI 2015, volume 9351 of Lecture Notes in Computer Science, pages 234–241. Springer, 2015. doi: 10.1007/978-3-319-24574-4_28.DOI
- [14]Javier E. Santos, Zachary R. Fox, Arvind Mohan, Daniel O’Malley, Hari Viswanathan, and Nicholas Lubbers. Development of the senseiver for efficient field reconstruction from sparse observations. Nature Machine Intelligence, 5(11):1317–1325, 2023. doi: 10.1038/s42256-023-00746-x.DOI
- [15]Jianlin Su, Yu Lu, Shengfeng Pan, Ahmed Murtadha, Bo Wen, and Yunfeng Liu. Rofor mer: Enhanced transfer transformer with rotary position embedding. Neurocomputing, 568:127063, 2024. doi: 10.1016/j.neucom.2023.127063.DOI
- [16]Tomonor Takizuka and Hirotada Abe. A binary collision model for plasma simulation with a particle code. Journal of Computational Physics, 25(3):205–219, 1977. doi: 10.1016/0021-9991(77)90099-7.DOI
- [17]Zhan Tong, Yibing Song, Jue Wang, and Limin Wang. VideoMAE: Masked autoencoders are data-efficient learners for self-supervised video pre-training. In Advances in Neural Information Processing Systems, volume 35, pages 10078–10093, 2022. doi: 10.52202/068431-0732.DOI
- [18]Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30, pages 5998–6008, 2017.arxiv.org/abs/1706.03762
- [19]Masaaki Yamada, Russell Kulsrud, and Hantao Ji. Magnetic reconnection. Reviews of Modern Physics, 82(1):603–664, 2010. doi: 10.1103/RevModPhys.82.603.DOI