Manuscript Offprint
arXiv:2611.08153A Generative Foundation Model for Multimodal Tokamak Tasks
ABSTRACT
Tokamak experiments record diverse measurements, including waveforms, profiles, fields, and scalars, which are used to reconstruct the plasma, forecast its evolution, recover associated control signals, and estimate disruption risk. Most models are built separately for one task and a fixed set of inputs and outputs, and each relies on a prescribed subset of diagnostics rather than structuring the full multimodal observation set to extract global, cross-signal information about the discharge. These limitations motivate a reusable foundation model that adapts to each task's input–output schema and models heterogeneous target signals jointly, rather than retraining a separate model for every configuration. In this work, we extend the TokaMark benchmark with two groups of tasks for actuator action inversion and disruption prediction, yielding 20 MAST tasks in six groups with explicit schemas and evaluation protocols. Then, we introduce GenToka, a generative tokamak foundation model that jointly generates schema-selected targets through a shared conditional diffusion Transformer, with signal-specific codecs preserving native time series, profiles, fields, and scalars; foundation pretraining and task-specific adaptation transfer cross-signal structure across all six groups. Evaluation on MAST measurements shows that GenToka reduces macro-average normalized root mean squared error relative to TokaMind by 4.7% on Groups 1–4 and by 17.7% on Group 5, and improves macro-average window-level F1 on Group 6 by 8.4% at a common validation-selected threshold. GenToka provides a reusable, generative, and multimodal pathway for experimental tokamaks, linking plasma-state reconstruction, actuator inference, and disruption warning from shared measurements to support more integrated, data-driven fusion plasma prediction and control research.
1 INTRODUCTION
Controlled nuclear fusion offers a potential source of sustainable energy, and magnetic confinement in tokamaks is a promising route toward this goal (Degrave et al., 2022). Reliable models of tokamak dynamics are needed to reconstruct plasma states, anticipate their evolution, and inform the control of stability, confinement, and magnetic configuration (Walker et al., 2020). These modeling tasks are challenging because the plasma is only partially observed: diagnostic measurements differ in physical meaning, sampling rate, spatial structure, and availability, while plasma evolution also depends on actuator histories and operating conditions. Resolving the coupled processes with physics-based simulations is high computational load, motivating surrogate models that connect these heterogeneous observations to the quantities needed for a particular operational task (Humphreys et al., 2020; Rousseau et al., 2026).
Learning tokamak dynamics from experimental measurements provides a complementary way to model these relationships. Data-driven methods have shown strong results in equilibrium reconstruction, kinetic-profile estimation, disruption prediction, and magnetic control (Joung et al., 2023; Shousha et al., 2024; Kates-Harbeck et al., 2019; Degrave et al., 2022). However, many systems are developed for a fixed signal set, output structure, and prediction horizon, which limits reuse as diagnostic availability and task requirements change. FAIR-MAST and TokaMark have improved access to experimental data and standardized evaluation across forward modeling tasks (Jackson et al., 2024; 2025; Rousseau et al., 2026), while TokaMind demonstrates the value of reusable multimodal representations (Boschi et al., 2026). Two needs remain: a broader benchmark that also covers disruption risk and inverse actuator inversion, and modeling that can characterize joint uncertainty over heterogeneous diagnostics. Supervised learning is well suited to estimating a conditional mean under a fixed input–output contract, but it returns one point prediction and often factorizes each output channel into a separate regression. Conditional generative models are more expressive in this setting, as they can represent the model dependencies jointly by different tasks. Recent work on fluid systems shows that one conditional diffusion model can span diverse tasks within a physical domain (Feng et al., 2026), suggesting a parallel generative perspective for heterogeneous tokamak objectives.
XINZHUAI 新烛时代
In this work, we introduce GenToka, a Generative Tokamak Foundation Model for heterogeneous plasma measurements. Each task is specified by a schema: the input and output signals, their physical roles, and their temporal support. GenToka encodes the available diagnostic and actuator measurements as context tokens and represents each complete requested output—a time-series window, profile, field, or scalar—by one noisy target token. This gives heterogeneous outputs a common interface for joint generation, while signal-specific heads restore their native structures after shared conditional diffusion Transformer denoising (Peebles & Xie, 2023; Ma et al., 2025).
GenToka is trained in two stages. Foundation pretraining learns cross-signal relationships through co-temporal reconstruction with randomly masked context, exposing the model to incomplete observations. Downstream fine-tuning then adapts the pretrained backbone and task-specific interfaces to the required inputs and outputs. We evaluate the predictive accuracy of individual generated outputs on MAST measurements across twenty tasks divided into six groups: equilibrium reconstruction (Group 1), magnetic dynamics (Group 2), profile and diagnostic dynamics (Group 3), long-horizon magnetohydrodynamic (MHD) dynamics (Group 4), actuator action inversion (Group 5), and disruption prediction (Group 6). Their schemas and evaluation protocols are given in Section 3 and Section 5.1.
Our contributions are:
-
Comprehensive benchmark for tokamak tasks. We define 20 tasks in six groups that connect prediction of plasma responses, actuator action inversion, and disruption prediction from historical measurements. Explicit input–output and temporal definitions enable reproducible evaluation of these complementary capabilities, providing a common basis for assessing the breadth of tokamak foundation models.
-
Generative tokamak foundation model. GenToka uses a shared diffusion Transformer to model relationships among heterogeneous output signals conditioned on the available measurements. Signal-specific interfaces preserve the native structures of time series, profiles, fields, and scalars while making them accessible to a common generative backbone. This design supports different input–output configurations through one conditional generation framework, allowing cross-signal representations learned during foundation pretraining to be reused across all six task groups.
-
Evaluation on 20 tasks using MAST measurements. Compared with the existing TokaMind model, GenToka reduces macro-average NRMSE by 4.7% across Groups 1–4 and by 17.7% across Group 5. Across Group 6, macro-average window-level F1 improves by 8.4% at a common validation-selected threshold. Paired comparisons with the same GenToka architecture initialized from scratch show additional gains from foundation pretraining. Together, these results demonstrate both competitive accuracy relative to TokaMind and the benefit of pretraining over scratch initialization across all six task groups.
2.1 TOKAMAK MODELING AND SCIENTIFIC FOUNDATION MODELS
Data-driven tokamak research has addressed equilibrium reconstruction, kinetic-profile estimation, disruption prediction, and magnetic control (Joung et al., 2023; Shousha et al., 2024; Kates-Harbeck et al., 2019; Degrave et al., 2022), with recent work further exploring multimodal reconstruction and transfer across operating settings (Jalalvand et al., 2025; Zheng et al., 2023). These studies demonstrate the value of experimental diagnostics and actuator histories, but most are organized around a prescribed signal set, output structure, and modeling task. FAIR-MAST improves access to structured experimental data (Jackson et al., 2024; 2025), while TokaMark standardizes data processing and evaluation across a suite of forward tasks (Rousseau et al., 2026). These developments provide the starting point for our twenty-task benchmark, which spans plasma-response modeling, actuator action inversion, and disruption prediction with explicit input and evaluation protocols.
Foundation models offer a complementary perspective by emphasizing reusable representations and adaptation across tasks and data configurations. Scientific foundation models have pursued such reuse in complementary settings: ClimaX pretrains across heterogeneous climate variables and spatiotemporal coverage (Nguyen et al., 2023), Poseidon transfers representations across PDE families (Herde et al., 2024), and Aurora adapts a large pretrained Earth-system model to multiple geophysical forecasting applications (Bodnar et al., 2025). A fusion-oriented perspective has further emphasized aligning foundation-model interfaces with experimental data and workflows (Churchill, 2025). Within tokamak modeling, TokaMind uses signal-aware tokens to support deterministic prediction across multiple forward tasks (Boschi et al., 2026). From this perspective, GenToka focuses on a generative interface in which heterogeneous context, physical roles, and the requested target schema jointly define the output, allowing the same formulation to span forward prediction and the additional task families studied here.
XINZHUAI 新烛时代
Table 1: Tokamak task families considered in this work. Each family can contain multiple context and target schemas without changing its underlying objective.
| Task family | Conditioning information | Requested output |
|---|---|---|
| Equilibrium reconstruction | Co-temporal magnetic and plasma observations | Global equilibrium quantities, plasma boundary, or poloidal-flux field |
| Magnetic dynamics | Recent magnetic and plasma state with task-provided actuator traces | Future magnetic and equilibrium time series |
| Profile and diagnostic dynamics | Recent profiles and diagnostics with operating context | Future kinetic profiles, global plasma quantities, or diagnostic responses |
| Long-horizon MHD dynamics | Extended multimodal history with operating context | Future plasma-current, equilibrium, or diagnostic time series |
| Actuator action inversion | State and control history with an observed same-discharge future response | Future recorded control-signal time series |
| Disruption prediction | Strictly pre-anchor diagnostic and, where configured, control-related history | A scalar time-to-disruption risk surrogate |
2.2 DIFFUSION FOR TEMPORAL AND SCIENTIFIC GENERATION
Diffusion and score-based models represent complex conditional distributions through iterative denoising (Ho et al., 2020; Song et al., 2021b), and Transformer denoisers extend this principle to structured token sequences (Peebles & Xie, 2023). Initial time-series applications established probabilistic forecasting and imputation with diffusion (Rasul et al., 2021; Tashiro et al., 2021). More recent methods combine diffusion with structured state-space models for multivariate forecasting and imputation (Lopez Alcaraz & Strodthoff, 2023), incorporate temporal dynamics into spatiotemporal forecasting (Rühling Cachay et al., 2023), and reconcile next-token prediction with full-sequence diffusion (Chen et al., 2024). At the scale of scientific applications, GenCast demonstrates diffusion-based ensemble forecasting over global weather fields (Price et al., 2025), and FluidZero shows that a single generative model can master diverse tasks in fluid systems through shared conditional diffusion (Feng et al., 2026). These works establish diffusion as a versatile model for temporal uncertainty, high-dimensional physical evolution, and multi-task reuse within a scientific domain. Their interfaces, however, are generally built around a fixed feature tensor, spatial field, or sequence type. GenToka instead treats the requested signal set and its physical roles as part of the conditioning problem, and generates heterogeneous targets in their task-defined native structures.
3 A BENCHMARK FOR HETEROGENEOUS TOKAMAK TASKS
The benchmark extends TokaMark (Rousseau et al., 2026): it retains the fourteen forward tasks in Groups 1–4 and adds six tasks in Groups 5–6 for actuator action inversion and disruption prediction, yielding twenty MAST tasks that jointly exercise plasma-response modeling, actuator recovery, and disruption risk. Every task is defined by a fixed schema—permitted observations, requested outputs, temporal support, and evaluation cohort—so that models are compared on the same physical quantities. Section 5.1 states the shared evaluation rules; Section 5.2 reports reference models on the full suite.
3.1 TASK SUITE OVERVIEW
Table 1 lists the six task groups. Groups 1–4 ask for reconstruction or forecasting of plasma responses under supplied operating context; Group 5 recovers recorded control-signal time series from an observed response in the same discharge; Group 6 estimates disruption risk from strictly pre-anchor history. Per-task signal lists and window lengths for the Group 5 and Group 6 schemas appear in Appendix A.1 (Table 4).
3.2 TASK SCHEMA FORMALISM
Tokamak signals differ in shape, and their roles depend on the modeling objective. A task schema , anchored at physical time , specifies which measurements enter as context and which quantities are requested as targets. The context component and target component enumerate role-qualified entries through index sets and . Each entry carries a descriptor with signal identity, modality, physical role, temporal support relative to , native
XINZHUAI 新烛时代
shape, and availability semantics. Schema flexibility means reusing the same underlying signals under different role assignments and time intervals through task-specific adaptation.
We make the following notations: for diagnostic and plasma-state signals, for actuator or operating signals, for plasma responses, and for recorded control signals targeted in actuator action inversion. Superscripts , co, and + mark support before, co-temporal with, and after ; the superscript ctx marks quantities routed through the conditioning pathway, including any schema-admitted post-anchor operating segment.
3.3 PLASMA-RESPONSE TASKS
Groups 1–4 evaluate reconstruction or forecasting of plasma responses. The model conditions on diagnostic and state observations together with task-provided actuator information . Reconstruction requests the co-temporal response ; forecasting requests the future response , possibly with actuator context that extends into the prediction interval. These tasks therefore measure how accurately a model predicts plasma evolution given the observations and operating signals supplied by the schema.
3.4 ACTUATOR ACTION INVERSION
Group 5 is an inverse problem that reverses the usual input–output direction. Past state and control histories are combined with a future plasma response observed in the same discharge, and the model reconstructs the associated future control signals . The targets are recorded PF-coil or gas-valve voltage traces. This group tests whether a model can recover the actuation compatible with an observed plasma response.
3.5 DISRUPTION PREDICTION
Group 6 predicts a graded disruption-risk score from measurements strictly before . For a disruptive discharge with annotated event time , remaining time is mapped to a soft time-to-disruption (Soft-TTD) target
\phi(\Delta)=\begin{cases}1,& \Delta\leq T_{\text{urgent}},\\[1+exp((\Delta-T_{\text{mid}})/\lambda_{\text{TTD}})]^{-1},& T_{\text{urgent}}<\Delta\leq T_{\text{safe}},\\0,& \Delta>T_{\text{safe}},\end{cases} \tag{1}with urgent, midpoint, and safe time boundaries and width .
4 GENTOKA: A GENERATIVE TOKAMAK FOUNDATION MODEL
GenToka builds on TokaMind (Boschi et al., 2026) and extends its supervised interface to a conditional generative formulation. Like TokaMind, heterogeneous measurements are role-qualified and encoded as tokens with signal-specific adapters; unlike TokaMind, each requested output is represented as a noisy target and modeled jointly through shared conditional diffusion rather than deterministic point regression. Signal-specific encoders and decoders still handle the geometry and temporal support of each measurement, while a diffusion Transformer captures dependencies among observations and requested outputs. We describe the conditional formulation, signal representations, joint denoising, and native-space reconstruction, followed by foundation pretraining and task-specific adaptation.
4.1 JOINTLY CONDITIONAL FORMULATION
Despite their different physical objectives, these tasks share the same computational structure: heterogeneous observations establish a condition, and the schema selects a variable set of signals to be generated jointly. For one example, the realized context collection is , where contains the native values of context entry and the same-shaped binary mask marks values that are both observed and quality-valid. The requested values form . These arrays may differ in sampling grid, dimensionality, and native output space; for actuator action inversion, the paired future response enters with its observed-response role.
The common schema-conditioned objective is
XINZHUAI 新烛时代
The target collection represents a plasma response in Groups 1–4, recorded control signals in Group 5, and the risk surrogate in Group 6. GenToka models this collection jointly to capture dependencies among the requested signals. The task-specific parameters are initialized from shared foundation parameters and then specialized to the corresponding context and target schema. In every downstream schema, a component-time element requested for generation is excluded from all conditioning paths, and unavailable or invalid target values do not contribute supervision.
4.2 OVERVIEW OF GENTOKA
GenToka generates the output signals requested by a task from its available measurements. The observed context remains clean, and diffusion is applied only to the target signals. This shared computation supports all six task groups: each task specifies the observed inputs and requested outputs, and the model learns their conditional relationship.
The schema first selects the available signals and assigns their physical and temporal roles. Signal histories are partitioned in physical time and compressed into context tokens, while each requested target window or scalar is represented by one noisy target token. A shared Transformer places all context and target tokens in the same self-attention sequence, allowing a target to draw on the complete schema-provided context and on the other requested signals. Iterative denoising then turns the target tokens into clean signal representations, which signal-specific decoders restore to time series, profiles, fields, or scalars in their native spaces.
This division of labor is central to the design. Deterministic codecs and lightweight adapters handle the geometry and scale that cannot be shared across signals, whereas the Transformer learns the dependencies that recur across schemas. One token represents a complete requested target, whether a window or a scalar, so the target-token count equals the number of requested signals and is independent of their sampling density.
Figure 1 summarizes this computation from the heterogeneous observations to the native-space outputs. The schema determines which measurements provide clean context and which signals are generated, while the same target-token pathway supports time series, profiles, fields, and scalar risk scores. The lower panels place this inference procedure in the training workflow: foundation pretraining learns reusable cross-signal representations, and task adaptation then refines the interfaces and target pathway for each schema.
4.3 ARCHITECTURE OF GENTOKA
A shared generative model for tokamak data faces two coupled sources of heterogeneity: native signal geometry and task-dependent signal selection. GenToka handles them with signal-specific deterministic codecs and schema-selected token adapters, leaving the shared diffusion Transformer to model statistical dependencies across signals. The architecture proceeds from signal representation to token construction, target-space diffusion, joint denoising, and reconstruction.
4.3.1 HETEROGENEOUS SIGNAL REPRESENTATION AND DCT3D CODEC
Tokamak diagnostics are sampled at markedly different rates, so direct concatenation into a synchronous vector requires unnecessary resampling and can obscure native temporal resolution. GenToka instead partitions each context signal into aligned intervals of fixed physical duration while retaining its native sampling grid. A signal–interval pair produces one context code; the most recent retained interval has relative position , followed by progressively earlier intervals. A complete requested target is encoded once, preserving its internal structure when it is a window without creating one target token per sample.
For context entry , let be the native-valued chunk at relative position . The fixed preprocessing map produces , and the reshape operator views a scalar trace, profile, or time-dependent field as a tensor of shape , , or , respectively, where , and are the positive spatial and temporal axis lengths of that representation. GenToka then applies an orthonormal three-dimensional discrete cosine transform (DCT3D). With denoting matrix multiplication along tensor axis , the transform and coefficient extraction are
XINZHUAI 新烛时代

Figure 1: Overview of GenToka. (a) Unified signal representation: multimodal measurements are time-chunked and encoded with signal-specific DCT3D; context and target adapters with schema metadata yield clean context tokens. (b) Joint conditional diffusion: the same conditional Transformer denoises all requested targets jointly at each noise level while context tokens remain clean. (c) Native-space reconstruction: denoised target codes are inverse-normalized and decoded to schema-selected time series, profiles, fields, or scalar Soft-TTD scores. (d) Pretraining and task adaptation: foundation training uses co-temporal reconstruction with random context masking; each downstream schema is adapted in two stages by aligning interfaces with the backbone frozen, then refining the backbone and target pathway with the context tokenizer frozen. (e) Benchmark scope: twenty MAST tasks in six families: equilibrium reconstruction, magnetic dynamics, profile and diagnostic dynamics, long-horizon MHD-relevant dynamics, actuator action inversion, and disruption prediction.
Here is the orthonormal DCT-II matrix for an axis of length ; and index its frequency and sample coordinates, and is the Kronecker delta. Writing , the set contains retained flattened coordinates, and is the matrix that selects them. Thus, is the full coefficient tensor and is its retained context code. Singleton spatial axes allow the same operation to cover traces, profiles, and fields.
The same role-qualified codec applied to the complete target value produces the clean target code , using its own preprocessing, geometry, and support . We write for the corresponding preprocessed target. For decoded targets, is paired with the fixed inverse preprocessing map .
Each signal has a retained coefficient support selected from its training-set energy statistics. Its training-set energy statistics and selected indices are
where is the training-set second moment, or energy, of flattened coefficient for entry , and is the empirical distribution of its training chunks. The retained dimension is selected to meet a prescribed explained-energy target subject to modality-aware coverage constraints and a configured representation budget. Traces, profiles, and fields can distribute their energy differently across temporal and spatial frequencies, so each role-qualified signal receives a separate support. Once estimated from training data, the support remains fixed. Quantities for which compression is unnecessary pass through an identity codec.
XINZHUAI 新烛时代
4.3.2 SCHEMA-AWARE TOKEN CONSTRUCTION
The codec resolves differences in native shape, but its output dimension remains signal dependent, so signal-specific adapters map each code into the common hidden dimension . The context adapter is linear, , with and . It acts on the deterministic code of an observed chunk, whereas maps the normalized, diffusion-corrupted target code . Context codes remain clean and unchanged across reverse steps, while target content changes with the diffusion level and the current reverse update.
For a schema descriptor , let , and denote its underlying signal identity, modality, and assigned role. The learned lookup maps , , , and all return vectors in ; and out are the shared target-position and output-role labels. The resulting tokens are
Equation 5 is where the paths meet, but their semantics remain distinct. Context tokens carry relative chunk position and a task-specific role; target tokens use the fixed position and output role because their content spans the complete output object, either a window or a scalar. Both token types lie in . Here indexes physical-time chunks, whereas denotes diffusion level; the two axes are unrelated. Signal and modality embeddings identify the underlying quantity and native structure. The schema determines sequence composition, metadata, and adapter selection. Unavailable entries are excluded from the valid token set, while target validity controls supervision. The next subsection specifies the normalization and corruption that produce .
4.3.3 DIFFUSION IN TARGET REPRESENTATION SPACE
The target pathway above leaves two operations to specify: normalization and diffusion corruption. During training, the clean code is first centered and scaled using statistics from target in the training partition, aligning heterogeneous targets before Gaussian corruption:
(6)
Here is the empirical distribution of clean codes for target , indexes a retained coefficient, is the coordinate-wise mean, is a standard-deviation floor, and is the single root-mean-variance scale shared by all coordinates of target . The normalized clean state uses diffusion index 0 exclusively for uncorrupted content. This normalization prevents high-amplitude outputs from dominating a common objective while retaining relative scale within one target representation.
For an -level variance-preserving schedule, the noisy-state index is and each variance increment satisfies . We define , with , and write and . Forward corruption and the velocity target then form an orthogonal rotation, from which the clean code and noise can be recovered:
(7)
This construction samples from a Gaussian distribution centered at with covariance . The vector is the independent standard Gaussian perturbation of target , its corrupted state, and the corresponding velocity target; hats denote model-derived estimates. All targets in an example share , so the joint denoiser sees them at the same schedule-defined noise level, while their perturbations remain independent. Throughout this process, context tokens remain clean and provide a stable reference from which increasingly corrupted targets can be recovered. Small diffusion levels retain much of the target structure; large levels require the model to reconstruct it primarily from the schema and observed context.
XINZHUA1 新烛时代
4.3.4 JOINT DENOISING TRANSFORMER
At a fixed noise level, denoising is not a collection of independent per-signal problems. A plausible value for one target can depend on both the heterogeneous context and the other requested targets. Let be the number of requested target entries and the number of valid context-chunk tokens after temporal partitioning. The schema order induces a bijection that assigns each target entry its row in the target-token stack. Stacking the tokens from Equation 5 gives and . GenToka places targets first and concatenates the stacks along the token axis:
Full multi-head self-attention over this sequence creates direct context-to-target and target-to-target information paths, so independent Gaussian corruption does not imply an independent output distribution.
The diffusion step is embedded with sinusoidal features and a multilayer perceptron to obtain the global condition . Following diffusion Transformers (Peebles & Xie, 2023; Ma et al., 2025), every layer receives this condition through adaptive normalization. For attention and feed-forward sublayers of Transformer block , the generic argument below denotes a token matrix with hidden width :
(9)
Here is the learned embedding of noise level ; , , and are its learned scale, shift, and residual-gate vectors in . Layer normalization acts on each token, denotes feature-wise multiplication broadcast over tokens, and and are the block-specific multi-head self-attention and feed-forward networks. The binary mask equals one at valid token positions and prevents zero-valued padding positions from participating in attention; is the intermediate state after the attention residual update. Zero-initializing the modulation layer makes each residual block initially an identity map.
After Transformer blocks, final layer normalization gives . Because the target tokens occupy the first rows, the contextualized representation supplied to the head of target is . This explicit row selection connects the shared Transformer state to each signal-specific prediction pathway.
4.3.5 SIGNAL-SPECIFIC RECONSTRUCTION
Self-attention produces contextualized representations in a shared hidden space, but the requested signals still occupy different target-code spaces. Only hidden states at target positions are decoded. For target , a compact head predicts ; Equation 7 then supplies the corresponding clean-code estimate during reverse sampling. After the final update, inverse normalization and the deterministic codec restore the signal. For a coefficient tensor , orthonormality of the axis transforms gives the separable inverse . The complete reconstruction is
(10)
Here scatters the retained code back into the full coefficient vector, filling coordinates outside with zero, and unvec restores its coefficient-tensor shape. The inverse reshape recovers the preprocessed native geometry , after which restores physical signal units. The truncated encoder–decoder composition is the orthogonal projection onto the retained spectral subspace. Targets assigned an identity codec bypass the inverse DCT and are reshaped directly before inverse preprocessing. The shared backbone is thus responsible for cross-signal reasoning, while signal-specific maps handle dimensions and coordinate systems that cannot be shared.
4.4 PRETRAINING AND FINE-TUNING
GenToka separates broad representation acquisition from specialization to a downstream task. The foundation stage learns reusable relationships from a wide collection of co-temporal tokamak signals; fine-tuning then instantiated a
XINZHUAI 新烛时代
particular conditioning and generation contract. Both stages use the same target-space velocity objective, so task adaptation does not introduce a new prediction mechanism. What changes is the schema that selects context and targets, their temporal relationship, and the subset of parameters updated during optimization. Task-specific codec supports and target-normalization statistics are estimated only from the corresponding training partition and remain fixed thereafter. In the common objective below, denotes the parameter state being optimized: during foundation pretraining and during schema-specific fine-tuning.
4.4.1 FOUNDATION PRETRAINING
The foundation model is trained with a single broad, co-temporal reconstruction schema. Its clean context comprises diagnostic, plasma-state, and actuator signals, while the target collection spans both observed diagnostics and additional state or equilibrium quantities. Some diagnostics therefore appear simultaneously as context and reconstruction targets. This shared reconstruction objective trains the model to capture dependencies among diagnostics, plasma state, and actuation for transfer to downstream schemas. To discourage reliance on a fixed, complete set of contemporaneous observations, training randomly removes individual context tokens and aligned physical-time chunks. This exposes the model to varying patterns of partial evidence and encourages it to exploit correlations across signals and history.
Training follows the velocity parameterization in Equation 7. For the noisy levels defined above, each example draws ; this level is shared by all of its requested targets, whose Gaussian perturbations remain independent. In a minibatch of size , the indicator equals one when target entry provides a valid supervised code for example , and zero otherwise. The quantity is its code dimension. The masked denoising objective is
(11)
Here the superscript identifies the minibatch example, is the mean squared velocity error for one example-target pair, counts its valid examples in the minibatch, and contains the targets with ; training batches contain at least one such target. The expectation covers minibatch sampling, diffusion levels, Gaussian noise, and random context masking. Averaging first over code coordinates prevents a high-dimensional signal from dominating solely because of its representation size; averaging over valid examples and then over available targets gives each supervised signal equal influence within a minibatch. We use no additional per-signal or timestep weights. All token adapters, the shared denoising Transformer, and target heads are optimized jointly with AdamW, using linear warmup followed by cosine learning-rate decay. Numerical settings are reported with the experimental protocol.
4.4.2 SCHEMA-SPECIFIC FINE-TUNING
Fine-tuning instantiated Equation 2 with the roles and temporal support of each downstream task. For compact notation, collects available pre-anchor diagnostic, state, and control history, and denotes any post-anchor actuator or operating segment supplied by the schema. With the fixed schema components suppressed, the task-specific conditionals are
Each schema routes permitted observations to clean context and requested signals to the target pathway; absent signal groups are omitted. The conditioning and supervision rules in Section 3.2, including the Soft-TTD construction in Equation 1, apply throughout adaptation. All schemas use Equation 11; adaptation changes the signal roles, temporal support, and target codecs while retaining the same denoising objective.
The shared denoising Transformer is initialized from the foundation model, together with each context projection whose role-qualified signal identity and representation dimension remain compatible. New context maps and all
XINZHUAI 新烛时代
target-side noisy-code projections and denoising heads are initialized for the downstream schema. This fresh target pathway is intentional: the same physical quantity can acquire a different temporal support, codec, or semantic role across tasks, for which direct interface transfer would conflate distinct contracts. Target normalization is re-estimated from the downstream training partition, while the optimizer state and learning-rate schedule are initialized anew.
Adaptation proceeds in two stages. The first optimizes the schema-facing context and target modules while holding the pretrained denoising backbone fixed, allowing new interfaces to align with its representation without immediately perturbing reusable cross-signal structure. The second freezes the aligned context tokenizer and jointly refines the backbone and target pathway. Task-specific dependencies can thereby be incorporated without moving the input representation at the same time.
4.5 INFERENCE ON SPECIFIC TASKS
At inference, the selected schema instantiated one conditional contract from Equation 12 and fixes the context and requested target set; target values are not supplied to the model. Each target representation is instead initialized independently from standard Gaussian noise, while the same clean context collection is supplied at every reverse step. All targets follow a common descending noise grid and are processed together by the joint Transformer.
GenToka uses a deterministic implicit reverse process (Song et al., 2021a) on a possibly subsampled grid , where is the number of selected model-evaluation levels. For every , sampling begins with . At a nonterminal grid position , one joint model evaluation predicts for all requested targets, after which
at the terminal evaluation The first two lines are the velocity-to-clean-state and velocity-to-noise conversions from Equation 7; the third advances every target to the next shared noise level, and the fourth returns the clean normalized code from the last noisy level . At grid position , this terminal prediction is obtained by one final joint model evaluation. The number and placement of evaluation levels affect computation but not the task interface and are specified in the experimental protocol.
The terminal codes are inverse-normalized and restored to native signal spaces through Equation 10. A new initial Gaussian noise yields another conditional generation. The same joint reverse process therefore generates equilibrium responses, future plasma-response windows, recorded control-signal time series, or scalar Soft-TTD scores, with their conditioning roles and native output spaces determined by the schema.
5 EXPERIMENTAL RESULTS
The experiments provide a systematic evaluation across all 20 benchmark tasks. First, complete LSTM and TokaMark-CNN baseline results characterize the benchmark across six task groups. Second, we evaluate GenToka against Toka-Mind and use paired GenToka–Scratch experiments to examine the contribution of foundation pretraining.
5.1 BENCHMARK AND EVALUATION PROTOCOL
Data and task protocols. All experiments use MAST data distributed through FAIR-MAST and the signal-processing and evaluation conventions of TokaMark (Jackson et al., 2024; 2025; Rousseau et al., 2026). The disruption prediction signal is manually annotated by experts. The benchmark contains 20 tasks in six groups (Groups 1–6). Data partitions are disjoint at the shot level; normalization and codec statistics use training data, and model selection uses validation data only. Availability and quality rules are identical within each primary TokaMind–GenToka comparison.
Baseline model protocol. The LSTM and TokaMark-CNN baseline experiments cover all 20 tasks. Both use the benchmark's signal roles, temporal supports, frozen shot partitions, and native-space evaluator, with their respective representations and optimization settings specified in Appendix A.4.
XINZHUAI 新烛时代
Metrics. For Groups 1–5, prediction error is measured by normalized root mean squared error (NRMSE) in the native signal space. We retain for a role-qualified target entry, consistent with Section 3.2. For task schema , let be its valid test shots and the target entries evaluated in shot . The valid windows of entry form , and indexes the native points of window . At point , and are the observed and predicted values, while is the training-set standard deviation of that target. The evaluator first aggregates windows for each shot-target pair and then gives equal weight to the targets within a shot and to the shots within a task:
Within each group, we additionally report macro-averages over tasks so that high-dimensional outputs do not dominate the summary. For disruption prediction, we report window-level area under the receiver operating characteristic curve (AUROC) and F1. Windows whose Soft-TTD target is at least 0.5 are treated as positive. AUROC is computed from the continuous risk score, whereas F1 requires a fixed operating threshold. To avoid task- or method-specific operating points, we evaluate the candidate set on the six primary model–task pairs (TokaMind and GenToka on each of the three disruption schemas). If and denote the validation scores and binary labels for pair , we select
where the minimum resolves ties in favor of the lower threshold. The selected threshold is frozen before any test-set metric is computed and without using test labels; Scratch, LSTM, and TokaMark-CNN models use the same but do not participate in its selection. This protocol gives every model–task pair equal weight and keeps threshold selection separate from test evaluation.
The selected threshold is , with mean validation F1 0.5570. The full validation scan and its constituent scores are reported in Appendix A.5.
5.2 BENCHMARK REFERENCE RESULTS
The reference experiments examine how the benchmark distinguishes physical targets, input–output relationships, and available diagnostic information. The evaluation suite contains twenty tasks in six groups: Groups 1–4 comprise the fourteen forward tasks inherited from TokaMark (Rousseau et al., 2026), and Groups 5–6 comprise six newly created tasks—three actuator action inversion tasks (Group 5) and three disruption prediction tasks (Group 6). We train an LSTM and TokaMark-CNN from random initialization on each task; Table 3 reports their task-level results and group means. Patterns shared by these two reference implementations illustrate the capabilities probed by the task design. Architectures and training settings are detailed in Appendix A.4.
Separating physical targets within Groups 1–4. Tasks in Groups 1–4 distinguish reconstruction of equilibrium geometry from prediction of kinetic and magnetic dynamics. Both reference models obtain NRMSE below 0.05 for plasma-boundary reconstruction and forecasting (Tasks 1-2 and 2-2), while the profile and diagnostic family has mean errors above 0.31. A more targeted contrast appears within the long-horizon family: Tasks 4-3 and 4-5 use the same diagnostic and operating inputs and a 100 ms prediction horizon, but request the vertical magnetic-axis position and Mirnov diagnostic signals, respectively. Their NRMSE ranges are 0.0948–0.1137 and 0.7347–0.7428 across the two reference models. Preserving this distinction exposes different modeling demands across macroscopic plasma position and magnetic fluctuations that a single aggregate forecasting score would obscure.
Evaluating the response-to-control relationship. Group 5 assesses actuator action inversion: recovering the recorded control signals associated with an observed plasma response. Task 5-1 reconstructs PF-coil voltages from current responses, whereas Tasks 5-2 and 5-3 reconstruct the same six gas-valve voltage channels from an electron-density profile and D-alpha signals, respectively. Both reference implementations yield lower errors for PF-voltage reconstruction than for gas-valve reconstruction, and distinguish the two gas-valve task configurations. They motivate retaining separate schemas for magnetic actuation and fueling, with their histories and response measurements.
XINZHUAI 新烛时代
Table 2: GenToka model results across all twenty tasks. Groups 1–5 report native-space NRMSE; Group 6 reports window-level AUROC and F1, with for F1. Means are unweighted over tasks. Scratch uses the GenToka architecture with random initialization and the same downstream recipe for each task. Bold identifies the best displayed value, including ties.
| Group | Task | Metric | TokaMind | GenToka | Scratch |
|---|---|---|---|---|---|
| Group 1 | 1-1 | NRMSE ↓ | 0.1363 | 0.0941 | 0.0991 |
| 1-2 | NRMSE ↓ | 0.0439 | 0.0412 | 0.0412 | |
| 1-3 | NRMSE ↓ | 0.1200 | 0.1156 | 0.1184 | |
| Group 1 avg | NRMSE ↓ | 0.1001 | 0.0836 | 0.0862 | |
| Group 2 | 2-1 | NRMSE ↓ | 0.1289 | 0.0880 | 0.0931 |
| 2-2 | NRMSE ↓ | 0.0408 | 0.0370 | 0.0375 | |
| 2-3 | NRMSE ↓ | 0.0866 | 0.0828 | 0.0862 | |
| Group 2 avg | NRMSE ↓ | 0.0854 | 0.0692 | 0.0723 | |
| Group 3 | 3-1 | NRMSE ↓ | 0.3477 | 0.3311 | 0.3465 |
| 3-2 | NRMSE ↓ | 0.2529 | 0.2522 | 0.2943 | |
| 3-3 | NRMSE ↓ | 0.2415 | 0.2147 | 0.2255 | |
| Group 3 avg | NRMSE ↓ | 0.2807 | 0.2660 | 0.2888 | |
| Group 4 | 4-1 | NRMSE ↓ | 0.2122 | 0.2298 | 0.2582 |
| 4-2 | NRMSE ↓ | 0.2143 | 0.2302 | 0.2663 | |
| 4-3 | NRMSE ↓ | 0.0781 | 0.0691 | 0.0789 | |
| 4-4 | NRMSE ↓ | 0.3470 | 0.3116 | 0.3064 | |
| 4-5 | NRMSE ↓ | 0.7377 | 0.7487 | 0.7525 | |
| Group 4 avg | NRMSE ↓ | 0.3179 | 0.3179 | 0.3325 | |
| Groups 1–4 avg | NRMSE ↓ | 0.2134 | 0.2033 | 0.2146 | |
| Group 5 | 5-1 | NRMSE ↓ | 0.1386 | 0.0750 | 0.0822 |
| 5-2 | NRMSE ↓ | 0.3206 | 0.3065 | 0.3234 | |
| 5-3 | NRMSE ↓ | 0.2503 | 0.2024 | 0.2335 | |
| Group 5 avg | NRMSE ↓ | 0.2365 | 0.1946 | 0.2130 | |
| Group 6 | 6-1 | AUROC ↑ | 0.9281 | 0.9213 | 0.9314 |
| F1 ↑ | 0.6029 | 0.6297 | 0.6186 | ||
| 6-2 | AUROC ↑ | 0.9242 | 0.9111 | 0.9246 | |
| F1 ↑ | 0.5923 | 0.6206 | 0.6151 | ||
| 6-3 | AUROC ↑ | 0.8683 | 0.8824 | 0.8728 | |
| F1 ↑ | 0.3891 | 0.4674 | 0.4427 | ||
| Group 6 avg | AUROC ↑ | 0.9069 | 0.9049 | 0.9096 | |
| F1 ↑ | 0.5281 | 0.5726 | 0.5588 | ||
Assessing prediction under different diagnostic coverage. Group 6 holds the test windows and targets fixed while varying the historical inputs from nine historical signals to five and then to plasma current alone. With five input signals, F1 is 0.5768 for the LSTM and 0.5607 for TokaMark-CNN; with plasma current alone, the corresponding values are 0.3900 and 0.4539. Both references therefore distinguish the multivariate and current-only configurations, illustrating the value of evaluating diagnostic availability explicitly. AUROC and F1 further separate risk ranking from classification at the common operating threshold. This task family adds an event-oriented objective to the continuous-output benchmark and supports evaluation across different diagnostic configurations.
5.3 GENTOKA EVALUATION
We compare GenToka directly with TokaMind (Boschi et al., 2026). Both methods share the task schema, physical signal roles, shot split, and native-space evaluator within each primary comparison. GenToka uses signal-specific spectral codecs and token adapters instantiated from the task schema; one generated realization is evaluated for each test example. The two complete pipelines use their respective training budgets, prediction objectives, checkpoint-selection criteria, and generation procedures. Scratch uses the GenToka architecture and the same downstream recipe for each task, initialized randomly (Appendix A.2). Table 2 organizes the comparison across all twenty tasks.
XINZHUAI 新烛时代
Table 3: Benchmark reference results for all twenty tasks. LSTM and TokaMark-CNN are trained separately for each task from random initialization and evaluated with the common native-space metrics. Groups 1–4 contain the fourteen TokaMark forward tasks; Groups 5 and 6 contain the six newly created tasks (actuator action inversion and disruption prediction). Means give equal weight to tasks. Disruption F1 uses the frozen threshold . The two reference implementations use their respective representations and training recipes (Appendix A.4).
| Group | Task | Metric | LSTM | TokaMark-CNN |
|---|---|---|---|---|
| Group 1 | 1-1 | NRMSE | 0.1853 | 0.1491 |
| 1-2 | NRMSE | 0.0488 | 0.0408 | |
| 1-3 | NRMSE | 0.1302 | 0.1354 | |
| Group 1 avg | NRMSE | 0.1215 | 0.1084 | |
| Group 2 | 2-1 | NRMSE | 0.1633 | 0.1376 |
| 2-2 | NRMSE | 0.0461 | 0.0482 | |
| 2-3 | NRMSE | 0.1046 | 0.1155 | |
| Group 2 avg | NRMSE | 0.1047 | 0.1004 | |
| Group 3 | 3-1 | NRMSE | 0.3722 | 0.3675 |
| 3-2 | NRMSE | 0.2825 | 0.3307 | |
| 3-3 | NRMSE | 0.2776 | 0.2687 | |
| Group 3 avg | NRMSE | 0.3108 | 0.3223 | |
| Group 4 | 4-1 | NRMSE | 0.2489 | 0.2557 |
| 4-2 | NRMSE | 0.2596 | 0.2649 | |
| 4-3 | NRMSE | 0.0948 | 0.1137 | |
| 4-4 | NRMSE | 0.3514 | 0.5254 | |
| 4-5 | NRMSE | 0.7347 | 0.7428 | |
| Group 4 avg | NRMSE | 0.3379 | 0.3805 | |
| Groups 1–4 avg | NRMSE | 0.2357 | 0.2497 | |
| Group 5 | 5-1 | NRMSE | 0.1431 | 0.2927 |
| 5-2 | NRMSE | 0.3731 | 0.4603 | |
| 5-3 | NRMSE | 0.3410 | 0.4440 | |
| Group 5 avg | NRMSE | 0.2858 | 0.3990 | |
| Group 6 | 6-1 | AUROC | 0.9270 | 0.9060 |
| F1 | 0.5940 | 0.5683 | ||
| 6-2 | AUROC | 0.9186 | 0.9101 | |
| F1 | 0.5768 | 0.5607 | ||
| 6-3 | AUROC | 0.8542 | 0.8793 | |
| F1 | 0.3900 | 0.4539 | ||
| Group 6 avg | AUROC | 0.8999 | 0.8985 | |
| F1 | 0.5203 | 0.5276 | ||
Across Groups 1–4, GenToka lowers NRMSE relative to TokaMind on eleven of fourteen tasks, reducing the Groups 1–4 macro-average from 0.2134 to 0.2033 (4.7%).
5.3.1 OVERVIEW
Table 2 reports the full task matrix. Relative to TokaMind, GenToka improves NRMSE on eleven of fourteen plasma-response tasks and lowers the Groups 1–4 macro-average by 4.7%. It also reduces Group 5 NRMSE from 0.2365 to 0.1946 (17.7%) and raises Group 6 macro-average F1 from 0.5281 to 0.5726 (8.4%) at the shared threshold , while window-level AUROC remains comparable (0.9069 versus 0.9049). Scratch is the same GenToka architecture and downstream recipe trained from random initialization (Appendix A.2). Pretrained GenToka lowers NRMSE relative to Scratch on twelve of fourteen Group 1–4 tasks and reduces the Groups 1–4 macro-average from 0.2146 to 0.2033 (5.3%); Scratch matches GenToka on Task 1-2 and is slightly better on Task 4-4. On Group 5, pretraining lowers the group mean from 0.2130 to 0.1946 (8.6%), and on Group 6 it improves macro-average F1 from 0.5588 to 0.5726. Together, the TokaMind and Scratch comparisons indicate that both the generative modeling interface and foundation pretraining contribute to the gains summarized in Table 2. The subsections below walk through each task group with qualitative examples.
XINZHUAI 新烛时代
5.3.2 EQUILIBRIUM RECONSTRUCTION
This group tests cross-signal reconstruction from co-temporal evidence. GenToka lowers the group-mean NRMSE from 0.1001 to 0.0836 relative to TokaMind (16.4%), with lower error on all three tasks. The same architecture trained from scratch averages 0.0862 NRMSE; foundation pretraining reduces this group mean to 0.0836 and improves Tasks 1-1 and 1-3, with a tie on Task 1-2, indicating that pretraining can improve the accuracy of equilibrium reconstruction.

Figure 2: On a co-temporal reconstruction example, GenToka tracks the measured electron temperature and density profiles more closely than TokaMind, matching the lower aggregate equilibrium error summarized above.
5.3.3 MAGNETIC DYNAMICS
The magnetic-dynamics family tests future response prediction under task-provided operating context. GenToka lowers NRMSE relative to TokaMind on all three tasks. The TokaMind group mean decreases from 0.0854 to 0.0692 (19.0%), with the largest task-level reduction on Task 2-1, from 0.1289 to 0.0880. Scratch reaches a 0.0723 group mean on these schemas; pretraining lowers NRMSE to 0.0692 (4.3%) and outperforms Scratch on every magnetic-dynamics task.
5.3.4 PROFILE AND DIAGNOSTIC DYNAMICS
The profile and diagnostic tasks extend the comparison to a different set of temporal and spatial outputs. GenToka lowers group-mean NRMSE from 0.2807 to 0.2660 relative to TokaMind (5.2%). Task 3-2 changes from 0.2529 to 0.2522, while Task 3-3 changes from 0.2415 to 0.2147, locating the larger gain within the family. Relative to Scratch, pretraining lowers the group mean from 0.2888 to 0.2660 (7.9%); the clearest separation is on Task 3-2, where NRMSE falls from 0.2943 to 0.2522 (14.3%), suggesting that reused cross-signal representations matter on profile-heavy forecasting targets.
XINZHUAI 新烛时代

Figure 3: During magnetic-dynamics forecasting, GenToka follows the separatrix in more tightly than Toka-Mind on this discharge, echoing the largest single-task NRMSE gain in the family.
5.3.5 LONG-HORIZON MHD DYNAMICS
For the extended-horizon schemas, GenToka and TokaMind have the same group-mean NRMSE at the displayed precision (0.3179). GenToka has lower error on Tasks 4-3 and 4-4, while TokaMind has lower error on Tasks 4-1, 4-2, and 4-5. Scratch averages 0.3325 NRMSE on this group; pretraining lowers the group mean to 0.3179 (4.4%) even though Scratch is slightly better on Task 4-4, so the long-horizon tie with TokaMind still reflects a gain over random initialization.
5.3.6 ACTUATOR ACTION INVERSION
Actuator action inversion evaluates the recovery of recorded control-signal time series from historical measurements and a future plasma response observed in the same discharge. Across Tasks 5-1–5-3, GenToka lowers NRMSE relative to TokaMind by 45.9%, 4.4%, and 19.1%, respectively, giving a 17.7% reduction in the group mean. Table 5 reports the corresponding native-space errors for all sixteen target components. These TokaMind–GenToka results use the complete pipeline settings specified in the comparison protocol. Pretraining lowers the group mean from 0.2130 to 0.1946 (8.6%) relative to Scratch, with GenToka ahead on all three inverse tasks, indicating that foundation pretraining helps relate observed responses to control trajectories bidirectionally rather than relying on task-only training alone.
XINZHUAI 新烛时代

Figure 4: When predicting kinetic profiles ahead in time, GenToka produces smoother, better-aligned and than TokaMind, consistent with the stronger reductions on the most profile-heavy targets.
Figure 7 aggregates the same pattern across Groups 1–5: GenToka lowers group-mean NRMSE relative to TokaMind in Groups 1–3 and Group 5, with matched displayed means in Group 4.
5.3.7 DISRUPTION PREDICTION
Group 6 evaluates disruption prediction using nested sets of historical inputs: nine signals in Task 6-1, five in Task 6-2, and plasma current alone in Task 6-3 (Table 4). AUROC measures window-level risk ranking, and F1 measures classification at the common validation-selected threshold .
GenToka achieves higher F1 than TokaMind on all three tasks: 0.6297, 0.6206, and 0.4674, compared with 0.6029, 0.5923, and 0.3891. The corresponding absolute gains are 0.0268, 0.0283, and 0.0783, increasing macro-average F1 from 0.5281 to 0.5726 (8.4%). The largest gain occurs on Task 6-3, which uses plasma current alone; GenToka also achieves higher AUROC on this task (0.8824 versus 0.8683). TokaMind has higher AUROC on Tasks 6-1 and 6-2, with macro-averages of 0.9069 for TokaMind and 0.9049 for GenToka across all three tasks. The consistent F1 improvement therefore identifies an advantage at the shared classification threshold, including the single-signal setting. Scratch macro-average F1 is 0.5588 under the same threshold; pretraining raises it to 0.5726 (2.5%), with the largest relative gain again on Task 6-3, where F1 increases from 0.4427 to 0.4674 (5.6%). AUROC is already high for every model (roughly 0.87–0.93), so GenToka can be slightly below TokaMind or Scratch on Tasks 6-1 and 6-2 without a large practical gap in ranking.
6 DISCUSSION
The MAST evaluation suggests that a schema-flexible generative interface can cover the same breadth as deterministic multimodal predictors while improving accuracy on several task families. Relative to TokaMind, GenToka lowers macro-average error on plasma-response and actuator-inversion groups and raises disruption F1 at a shared operating
XINZHUAI 新烛时代

Figure 5: At a 100 ms horizon the two models diverge on magnetic-axis and separatrix geometry on the same shot, explaining why long-horizon averages can tie even when individual targets favor different models.

Figure 6: Given an observed plasma response in the same discharge, GenToka reconstructs the recorded PF-coil voltages more faithfully than TokaMind, in line with the large gains on magnetic actuation inversion.
XINZHUAI 新烛时代

Figure 7: Relative test-NRMSE improvement of GenToka over TokaMind by task family (positive is better): GenToka leads on equilibrium, magnetic, profile, and actuator-inversion families, ties on long-horizon MHD, and Scratch without pretraining is consistently weaker.

Figure 8: Near a disruption-warning window with multivariate history, GenToka assigns clearer separation at the shared risk threshold than TokaMind, matching the improved F1 despite similar AUROC.
XINZHUAI 新烛时代
threshold, indicating that joint target-space denoising and foundation pretraining complement the TokaMind-style token organization rather than replacing the need for careful task specification. Paired comparisons with Scratch further show that initialization matters: the same architecture and downstream recipe benefit from pretraining on co-temporal signals before schema-specific adaptation, especially where tasks require relating many diagnostics to heterogeneous outputs.
Three limitations point to directions for extending this line of work. Non-autoregressive multi-step prediction. Each task generates a complete output window in one conditional pass rather than advancing time autoregressively with updated context. This matches the fixed-horizon offline schemas used here and in TokaMark, but it restricts direct deployment in settings where the model must be applied repeatedly along a discharge, for example, rolling forecasting, iterative reconstruction, or closed-loop control.
Actuator inversion versus unified control modeling. Group 5 focuses on recovering recorded control-signal trajectories for a given actuator pathway from an observed plasma response. A next step is to cast control objectives as additional schemas within the same generative tokamak foundation interface, so that forward modeling, inversion, disruption risk, and control sit in one conditional framework, as unified multi-task generative models have demonstrated in other physical domains (Feng et al., 2026). Concretely, control tasks could be realized by guiding generation on explicit control targets, such as desired plasma states, tracking goals, or stability margins, while reusing the shared denoising backbone and signal-specific decoders.
Single-equipment training. Foundation pretraining and downstream adaptation in this study use MAST data only; unification is therefore across tasks and signal roles on one equipment rather than across tokamak parameters, coil configurations, and diagnostic inventories. Incorporating additional equipment with harmonized multimodal records would test cross-equipment transfer and clarify whether schema-flexible pretraining can support equipment-agnostic tokamak foundation models under realistic distribution shift.
7 CONCLUSION
This work presents an extended tokamak task benchmark and GenToka, a generative foundation model that adapts to schema-defined inputs and outputs, with the goal of unifying plasma-response forecasting, actuator action inversion, and disruption risk under one multimodal interface on experimental measurements. We extend TokaMark with other two groups of tasks in Groups 5–6, yielding 20 tasks in six groups with explicit schemas, shared evaluation protocols, and complete LSTM and TokaMark-CNN reference results. GenToka builds on the TokaMind token organization and replaces deterministic prediction with joint conditional diffusion over heterogeneous targets, using signal-specific codecs and a shared Transformer denoiser, with foundation pretraining followed by task-specific adaptation. On the MAST data, GenToka reduces macro-average NRMSE relative to TokaMind by 4.7% on Groups 1–4 and by 17.7% on Group 5, improves macro-average window-level disruption F1 by 8.4% at a common validation-selected threshold, and outperforms the same architecture initialized from scratch, indicating benefits from both the generative formulation and foundation pretraining. Together, the benchmark and model provide a reusable and generative pathway for integrated tokamak modeling.
ACKNOWLEDGMENTS
This work is supported by the Zhongguancun Academy (Grant Nos. C20250518, XTS0080). We would also like to thank the development groups of TokaMark and TokaMind for open-sourcing their datasets and code, which provided the foundation for this work.
XINZHUAI 新烛时代
REFERENCES
Cristian Bodnar et al. A foundation model for the earth system. Nature, 641(8065):1180–1187, 2025. doi: 10.1038/s41586-025-09005-y.
Tobia Boschi, Andrea Loreti, Nicola C. Amorisco, Rodrigo H. Ordonez-Hurtado, Cécile Rousseau, George K. Holt, Eszter Székely, Alexander Whittle, Samuel Jackson, Adriano Agnello, Stanislas Pamela, Alessandra Pascale, Robert Akers, Juan Bernabe Moreno, Vassil Alexandrov, and Mykhaylo Zayats. TokaMind: A multi-modal transformer foundation model for tokamak plasma dynamics, 2026. arXiv:2602.15084.
Boyuan Chen, Diego Martí Monsó, Yilun Du, Max Simchowitz, Russ Tedrake, and Vincent Sitzmann. Diffusion forcing: Next-token prediction meets full-sequence diffusion. In Advances in Neural Information Processing Systems, volume 37, 2024.
R. Michael Churchill. AI foundation models for experimental fusion tasks. Frontiers in Physics, 12:1531334, 2025. doi: 10.3389/fphy.2024.1531334.
Jonas Degrave et al. Magnetic control of tokamak plasmas through deep reinforcement learning. Nature, 602:414–419, 2022. doi: 10.1038/s41586-021-04301-9.
Haodong Feng, Haoren Zheng, Peiyan Hu, Hongyuan Liu, Chenglei Yu, Long Wei, Ruiqi Feng, Jinlong Duan, Dixia Fan, and Tailin Wu. FluidZero: Mastering diverse tasks in fluid systems through a single generative model. Preprint, Research Square, 2026. URL https://doi.org/10.21203/rs.3.rs-6881567/v3. Version 3, 26 February 2026.
Maximilian Herde, Bogdan Raonić, Tobias Rohner, Roger Käppeli, Roberto Molinaro, Emmanuel de Bézenac, and Siddhartha Mishra. Poseidon: Efficient foundation models for PDEs. In Advances in Neural Information Processing Systems, volume 37, pp. 72525–72624, 2024.
Jonathan Ho, Ajay Jain, and Pieter Abbeel. Denoising diffusion probabilistic models. In Advances in Neural Information Processing Systems, volume 33, pp. 6840–6851, 2020.
David Humphreys et al. Advancing fusion with machine learning research needs workshop report. Journal of Fusion Energy, 39(4):123–155, 2020. doi: 10.1007/s10894-020-00258-1.
Samuel Jackson, Saiful Khan, Nathan Cummings, James Hodson, Shaun de Witt, Stanislas Pamela, Rob Akers, Jeyan Thiyagalingam, and The MAST Team. FAIR-MAST: A fusion device data management system. SoftwareX, 27:101869, 2024. doi: 10.1016/j.softx.2024.101869.
Samuel Jackson, Saiful Khan, Nathan Cummings, James Hodson, Shaun de Witt, Stanislas Pamela, Rob Akers, and Jeyan Thiyagalingam. An open data service for supporting research in machine learning on tokamak data. IEEE Transactions on Plasma Science, 2025. doi: 10.1109/TPS.2025.3583419.
Azarakhsh Jalalvand, SangKyeun Kim, Jaemin Seo, Qiming Hu, Max Curie, Peter Steiner, Andrew Oakleigh Nelson, Yong-Su Na, and Egemen Kolemen. Multimodal super-resolution: Discovering hidden physics and its application to fusion plasmas. Nature Communications, 16:8506, 2025. doi: 10.1038/s41467-025-63492-1.
Semin Joung et al. GS-DeepNet: Mastering tokamak plasma equilibria with deep neural networks and the Grad-Shafranov equation. Scientific Reports, 13:15799, 2023. doi: 10.1038/s41598-023-42991-5.
Julian Kates-Harbeck, Alexey Svyatkovskiy, and William Tang. Predicting disruptive instabilities in controlled fusion plasmas through deep learning. Nature, 568(7753):526–531, 2019. doi: 10.1038/s41586-019-1116-4.
Juan Miguel Lopez Alcaraz and Nils Strodthoff. Diffusion-based time series imputation and forecasting with structured state space models. Transactions on Machine Learning Research, 2023.
Xin Ma, Yaohui Wang, Xinyuan Chen, Gengyun Jia, Ziwei Liu, Yuan-Fang Li, Cunjian Chen, and Yu Qiao. Latte: Latent diffusion transformer for video generation. Transactions on Machine Learning Research, 2025.
Tung Nguyen, Johannes Brandstetter, Ashish Kapoor, Jayesh K. Gupta, and Aditya Grover. ClimaX: A foundation model for weather and climate. In Proceedings of the 40th International Conference on Machine Learning, volume 202 of Proceedings of Machine Learning Research, pp. 25904–25938, 2023.

William Peebles and Saining Xie. Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 4195–4205, 2023.
Ilan Price, Alvaro Sanchez-Gonzalez, Ferran Alet, Tom R. Andersson, Andrew El-Kadi, Dominic Masters, Timo Ewalds, Jack Stott, Shakir Mohamed, Peter Battaglia, and Remi Lam. Probabilistic weather forecasting with machine learning. Nature, 637:84–90, 2025. doi: 10.1038/s41586-024-08252-9.
Kashif Rasul, Calvin Seward, Ingmar Schuster, and Roland Vollgraf. Autoregressive denoising diffusion models for multivariate probabilistic time series forecasting. In Proceedings of the 38th International Conference on Machine Learning, volume 139 of Proceedings of Machine Learning Research, pp. 8857–8868, 2021.
Cécile Rousseau, Samuel Jackson, Rodrigo H. Ordonez-Hurtado, Nicola C. Amorisco, Tobia Boschi, George K. Holt, Andrea Loreti, Eszter Székely, Alexander Whittle, Adriano Agnello, Stanislas Pamela, Alessandra Pascale, Robert Akers, Juan Bernabe Moreno, Sue Thorne, and Mykhaylo Zayats. TokaMark: A comprehensive benchmark for MAST tokamak plasma models, 2026. arXiv:2602.10132.
Salva Rühling Cachay, Bo Zhao, Hailey Joren, and Rose Yu. DYffusion: A dynamics-informed diffusion model for spatiotemporal forecasting. In Advances in Neural Information Processing Systems, volume 36, 2023.
Ricardo Shousha, Jaemin Seo, Keith Erickson, Zichuan Xing, SangKyeun Kim, Joseph Abbate, and Egemen Kolemen. Machine learning-based real-time kinetic profile reconstruction in DIII-D. Nuclear Fusion, 64(2):026006, 2024. doi: 10.1088/1741-4326/ad142f.
Jiaming Song, Chenlin Meng, and Stefano Ermon. Denoising diffusion implicit models. In International Conference on Learning Representations, 2021a.
Yang Song, Jascha Sohl-Dickstein, Diederik P. Kingma, Abhishek Kumar, Stefano Ermon, and Ben Poole. Score-based generative modeling through stochastic differential equations. In International Conference on Learning Representations, 2021b.
Yusuke Tashiro, Jiaming Song, Yang Song, and Stefano Ermon. CSDI: Conditional score-based diffusion models for probabilistic time series imputation. In Advances in Neural Information Processing Systems, volume 34, pp. 24804–24816, 2021.
Michael L. Walker, Peter de Vries, Federico Felici, and Eugenio Schuster. Introduction to tokamak plasma control. In 2020 American Control Conference (ACC), pp. 2901–2918. IEEE, 2020. doi: 10.23919/ACC45564.2020.9147561.
Wei Zheng et al. Disruption prediction for future tokamaks using parameter-based transfer learning. Communications Physics, 6:181, 2023. doi: 10.1038/s42005-023-01296-9.
XINZHUAI 新烛时代
A ADDITIONAL EXPERIMENTAL PROTOCOLS
A.1 SCHEMAS OF THE EXPANDED TASKS
Table 4 records the observed context, paired future information, requested targets, and temporal support of each extension. The three risk configurations have nested historical inputs and identical test shot identities, cut times, window indices, and Soft-TTD targets.
Table 4: Schemas of the six extension tasks. Windows are relative to the cut time and are left-closed, right-open. Task 5 conditions on a paired observed future plasma response to reconstruct the corresponding actuator time series. Task 6 uses causal history to predict a continuous soft time-to-disruption target.
| Task | Observed history | Observed future response | Prediction target | Window and held-out cohort |
|---|---|---|---|---|
| 5-1 | Magnetic diagnostics; PF-coil, solenoid and plasma currents; past PF voltages; optional NBI power. | P2/P4/P5 coil currents, solenoid current and ; optional LCFS () contour. | Four PF voltage traces: P1, P2, P4, P5. | History: 5 ms; response/target: 25 ms; 1 ms cut grid; 1,103 test shots. |
| 5-2 | Magnetic diagnostics; PF-coil, solenoid and plasma currents; line-integrated density; Thomson , ; past current/density requests, NBI power, cumulative gas and gas-valve voltages. | Thomson electron-density profile. | Six gas-valve voltage traces: G1, G2, G3, G4, G11, G12. | History: 150 ms (Thomson: 5 ms); response/target: 50 ms; 1 ms cut grid; 681 test shots. |
| 5-3 | Thomson , ; D-alpha and upper/lower soft-X-ray camera voltages; past current/density requests, NBI power, cumulative gas and gas-valve voltages. | Three-channel D-alpha voltage time series. | Six gas-valve voltage traces: G1, G2, G3, G4, G11, G12. | History: 5 ms; response/target: 50 ms; 1 ms cut grid; 803 test shots. |
| 6-1 | Nine signals: , line-integrated density, radiated power, D-alpha voltage, lower soft-X-ray camera voltage, , internal inductance , diamagnetic energy and minor radius. | — | Soft time-to-disruption risk. | History: 100 ms; 10 ms cut grid; 933 test shots / 39,967 windows. |
| 6-2 | Five signals: , line-integrated density, D-alpha voltage, lower soft-X-ray camera voltage and minor radius. | — | Soft time-to-disruption risk. | Same history, grid, shots, window coordinates and targets as 6-1. |
| 6-3 | Plasma current . | — | Soft time-to-disruption risk. | Same history, grid, shots, window coordinates and targets as 6-1. |
A.2 BACKBONE AND PAIRED INITIALIZATION PROTOCOLS
The DCT-based actuator action inversion and disruption-risk models use twelve Transformer blocks with hidden width 384, six attention heads, and feed-forward width 1536. Full attention operates over the context and target tokens, with timestep-conditioned AdaLN. Diffusion operates on target codec representations, while individual conditioning signals use their schema-defined DCT or identity codecs.
For each Group 1–4 task, pretrained GenToka and Scratch use the same architecture and downstream recipe, differing in initialization. The Group 5 pairs also share the frozen task schema, preprocessing, codec supports, optimizer settings, and training windows. Both Group 5 models use AdamW, batch size 2048, and 100 epochs: 25 epochs of interface alignment with the backbone frozen, followed by 75 epochs with the context tokenizer frozen. The second-stage backbone learning rate is , with a six-epoch backbone warmup. The reported Group 5 evaluations use the final epoch-100 checkpoint. Diffusion uses 1000 cosine-schedule training levels, velocity prediction, signal-scalar target normalization, and two deterministic implicit sampling steps (). The frozen seed is 54.
For disruption prediction, GenToka and Scratch use AdamW, batch size 2048, and the same two-stage 25+75-epoch structure, with second-stage backbone learning rate and a six-epoch backbone warmup. Both use balanced Soft-TTD training strata and the same selected training windows. Their checkpoints are selected by sampled native-space validation NRMSE on a fixed, shot-stratified set of 3000 validation windows. The risk models likewise use two implicit sampling steps with . The TokaMind–GenToka comparisons evaluate their complete training and prediction pipelines; the paired GenToka–Scratch comparisons hold the downstream recipe fixed.
XINZHUAI 新烛时代
A.3 NATIVE-SPACE ACTUATOR ACTION INVERSION COMPONENT RESULTS
The Group 5 output roles cover four PF-coil voltage channels in Task 5-1 and six gas-valve voltage channels in each of Tasks 5-2 and 5-3. Table 5 reports each component on the same frozen accepted test cohort and native-space normalization used by its matched TokaMind–GenToka comparison. GenToka has lower NRMSE on all sixteen components.
Table 5: Decoded native-space component NRMSE on the frozen Group 5 test cohorts. Each component uses the shared signal-role standard deviation and equal weighting across accepted test shots. Relative reduction is measured against TokaMind. Component averages differ from task NRMSE because task NRMSE pools output components within each shot before averaging across shots.
| Task | Target component | TokaMind | GenToka | Reduction (%) |
|---|---|---|---|---|
| 5-1 | XDC_PF_F_P1 | 0.1545 | 0.0706 | 54.3 |
| 5-1 | XDC_PF_F_P2 | 0.0710 | 0.0360 | 49.3 |
| 5-1 | XDC_PF_F_P4 | 0.1437 | 0.0825 | 42.6 |
| 5-1 | XDC_PF_F_P5 | 0.1507 | 0.0881 | 41.5 |
| 5-2 | G1 | 0.2930 | 0.2842 | 3.0 |
| 5-2 | G2 | 0.2874 | 0.2761 | 3.9 |
| 5-2 | G3 | 0.2921 | 0.2808 | 3.8 |
| 5-2 | G4 | 0.2982 | 0.2850 | 4.4 |
| 5-2 | G11 | 0.3110 | 0.2950 | 5.2 |
| 5-2 | G12 | 0.3130 | 0.2960 | 5.4 |
| 5-3 | G1 | 0.2327 | 0.1910 | 17.9 |
| 5-3 | G2 | 0.2304 | 0.1863 | 19.1 |
| 5-3 | G3 | 0.2312 | 0.1888 | 18.3 |
| 5-3 | G4 | 0.2344 | 0.1889 | 19.4 |
| 5-3 | G11 | 0.2444 | 0.1918 | 21.5 |
| 5-3 | G12 | 0.2450 | 0.1944 | 20.6 |
A.4 BENCHMARK REFERENCE ARCHITECTURES AND TRAINING
The benchmark reference suite contains forty trained models: one LSTM and one TokaMark-CNN for each of the twenty tasks. Every model is initialized randomly and trained for 50 epochs. Table 6 summarizes the optimization settings; task schemas, shot partitions, conditioning-time restrictions, and native-space evaluation rules are shared across the reference implementations. The reported CNN results are reruns under these benchmark schemas and settings, including the six extension tasks.
A.4.1 LSTM
The LSTM uses the same retained DCT coefficients as GenToka: truncated inverse DCT reconstructs each allowed conditioning chunk, which is encoded along physical time by a two-layer LSTM; a second two-layer LSTM processes the chunk sequence independently for each role–signal pair before fusion and coefficient-space regression. Signals assigned identity codecs retain their native values. Within-chunk sequences are reduced to at most 32 temporal samples. The within-chunk and across-chunk hidden widths are 16 and 32, respectively, followed by a 128-dimensional fusion network. Predictions are decoded into native signal space for evaluation; the scalar Soft-TTD target uses its identity codec.
A.4.2 TOKAMARK-CNN
The convolutional reference retains the multi-branch encoder–fusion–decoder structure of the TokaMark baseline (Rousseau et al., 2026). Each signal branch operates on standardized native arrays, using one-, two-, or three-dimensional convolutions according to the native temporal and spatial axes. Each encoder has three convolutional stages with kernel size 3, stride 3, padding 1, ReLU, max pooling, and batch normalization. The base width is 16, increasing to 32 and 64 channels; a linear projection produces a 32-dimensional branch representation. A two-layer MLP fuses historical branch representations. Schema-permitted future conditioning signals are encoded by separate branches and incorporated through a second fusion MLP.
XINZHUAI 新烛时代
Each requested output has a three-stage transposed-convolution decoder with kernel size 3 and stride 3, with per-layer cropping to the required native shape. The fused 32-dimensional representation is repeated across output chunks, retaining the TokaMark decoder structure. Task schemas route the observed response into the conditioning branches for actuator action inversion and restrict disruption inputs to pre-anchor history. A sigmoid maps the scalar disruption output to the Soft-TTD range. Native input and output arrays bypass the DCT representation; missing conditioning slots are zero-filled after standardization, and supervised losses respect the target masks.
Table 6: Training settings for the two benchmark reference implementations. Both use seed 54, eight GPUs, a 2% linear learning-rate warmup, and 3000 fixed shot-stratified validation windows for checkpoint selection. The reported result for each task uses its best validation checkpoint.
| Setting | LSTM | TokaMark-CNN |
|---|---|---|
| Training epochs | 50 | 50 |
| Optimizer | AdamW | Adam |
| Learning rate | ||
| Weight decay | 0 | |
| Global batch size | 1024 | 2048 |
| Supervision / selection | Masked coefficient MSE | Masked native-space MSE |
All seventeen continuous-output tasks use the same accepted test shots, target entries, per-target window counts, training-set normalization, and shot-weighted native NRMSE aggregation as the frozen benchmark evaluator. The three disruption tasks use the nested nine-, five-, and one-signal histories, balanced Soft-TTD training strata, and the common held-out window grid. LSTM and TokaMark-CNN both use the frozen F1 threshold and do not participate in threshold selection. The reference results describe the two complete training recipes; their input representations, losses, and optimization settings are specified separately.
A.5 VALIDATION OF THE COMMON DISRUPTION THRESHOLD
Equation 15 selects a common threshold using only the six primary validation sets. The threshold is frozen before test evaluation; Scratch, LSTM, and TokaMark-CNN models do not participate in its selection.
Table 7 reports the validation statistic used by this rule. Each entry is the unweighted mean F1 over the six primary model-task pairs.
Table 7: Validation macro-average F1 for the common disruption-risk threshold. The average covers TokaMind and GenToka on Tasks 6-1–6-3; no test labels are used. Bold entries identify the selected threshold and its validation score.
| 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | |
|---|---|---|---|---|---|---|---|---|---|
| Mean F1 | 0.4105 | 0.4884 | 0.5391 | 0.5570 | 0.5226 | 0.4675 | 0.3932 | 0.2983 | 0.1724 |
The mean F1 increases through and decreases thereafter, making the unique maximizer on the prespecified grid. At the selected operating point, the six constituent validation F1 values are 0.6165, 0.5993, and 0.4056 for TokaMind on Tasks 6-1–6-3, and 0.6246, 0.6177, and 0.4785 for GenToka on the same tasks, respectively. Their unweighted mean is 0.5570, which is the statistic used to freeze the test-time threshold.