Organizations: Department of Mechanical and Aerospace Engineering, Princeton University, NJ, USA · Oak Ridge Institute for Science and Education, Oak Ridge, TN, USA · Princeton Plasma Physics Laboratory, NJ, USA
Finding which phenomena occur in a tokamak discharge, and when, is often a manual task. Previous efforts at labeling events have been task-specific, each with its own corpus of data. We introduce Tokamak-SI, which combines the labels and labeling methods of many earlier studies into a single scalable, time-aligned, and categorical dataset covering observations from confinement, detachment, alfven eigenmodes (AE), edge localized modes (ELM), sawtooth, tearing modes (TM), and resistive wall modes in DIII-D tokamak. Models based on this, which can extend the labels to new shots, match or beat earlier detectors on its labels, including for AE, ELM, and TM detection. Tokamak-SI is intended to enable task-specific benchmarking, physics-searchable archives, and direct identification of key events during an experiment.
Figures & tables
Figure 1: Shot interpretation on DIII-D shot #199597 (0.1–6.2 s). (a) Raw CO 2 interferometer cross-power spectrogram (chords R0 × V1). (b) Automatically labeled CO 2 spectrogram combining TokEye’s output with toroidal mode number n from the Mirnov array and labels from Tokamak-SI. (c) D α with the automatically labeled ELM intervals (coral boxes) and confinement regimes. (d) Neutral beam power. (e) Normalized beta βN . (f) Automatic labels: AE , TM , confinement regimes, ELM , sawtooth; color present, gray absent, hatched uncertain, blank unassessed.
Figure 2: F1 on original and Tokamak-SI labels. Dashes: trivial baselines. Row 3: shots with present or absent time (numbers) and hours of that time (bars).
Model
AUROC
AUPRC
F1
Alfvén eigenmodes
ae-ours (ours)
0.982
0.992
0.944
ae-rcn ( Garcia et al., 2023 )
0.836
0.918
0.774
ae-lstm ( Garcia et al., 2023 )
0.714
0.842
0.715
Confinement Regimes
confine-cnn ( Gill et al., 2023 )
0.889
0.713
0.703
Table 1: Model scores per label set. Bold: best per metric among models scored on the same bins.
Appendix figures & tables13 assets
Supplementary material from the paper’s appendix.
Appendix
Phenomenon
Labeled
Expert-reviewed
Positive
Present (s)
AE
195
195
194
350.2
Tearing mode
28,521
0
4,820
2902.3
Confinement (4 classes, merged)
448
0
–
–
ELM ing
676
120
517
440.3
Sawtooth
13,319
3
5,639
5229.4
RWM (onsets)
33
0
33
–
Appendix
Table 2: Labels in Tokamak-SI. “Labeled” counts the AE dense labels and, otherwise, every shot of the original, rule or detector source. Confinement has no absent class, so the last two columns do not apply. RWM onsets are points. Detachment counts detached bins as present.
CO 2 R0 × V1/V2/V3 cross-power; else magnetics and ECE spectrograms
neither CO 2 nor magnetics and ECE
ELM ing
ELM ing intervals; absent inside H-mode is ELM -free
D α with transient activity
no filterscopes
Confinement
One class per bin: L, H, QH , WPQH , or uncertain
D α , line-averaged density, βN
no filterscopes
Tearing mode
A rotating n=1 or n=2 mode: magnetic RMS above 12 G ( n=1 ) or 6 G ( n=2 ) for 50 ms with a rotating line
n=1 and n=2 magnetic RMS and frequency; Mirnov spectrogram and n fit; radial field for locks
gaps in the magnetic RMS
Sawtooth
A train of ≥ 3 core ECE crashes with inversion, 20–250 ms apart; absent only where valid core ECE shows no crashes
ECE profile and channels, D α
ECE cut off, invalid or missing
RWM
From each listed onset until the n=1δBp falls back below threshold (10–300 ms); uncertain 20 ms before it
n=1δBp , βN , li , Ip
no probe data
Appendix
Table 3: Definition summary. “Not observable” is set when the deciding diagnostics are missing.
Figure 3: Annotation and dense labels on two benchmark shots, 0–2 s. Top: CO 2 R0 spectrogram (80–250 kHz); dashed lines bound the annotation’s marked stretch. Below: the annotation (blank: not marked) and the dense labels (gray: absent). The annotation marks 12% of each shot, the dense labels 90% and 51%. A detector that follows the activity is scored a false positive outside the marked stretch.
Model
AUPRC
AUROC
Presence F1
Crash F1
189324
190637
saw-ours
0.974 [0.958, 0.984]
0.984 [0.976, 0.991]
0.958 [0.941, 0.970]
0.891 [0.872, 0.907]
0.871
0%
saw-hl3
0.489 [0.403, 0.593]
0.752 [0.703, 0.799]
0.483 [0.427, 0.537]
0.679 [0.611, 0.746]
0.897
5%
saw-derivative
0.573 [0.500, 0.646]
0.870 [0.853, 0.889]
0.729 [0.667, 0.785]
0.657 [0.584, 0.727]
0.654
13%
always present
0.259 [0.218, 0.302]
0.500
0.411 [0.358, 0.464]
–
–
100%
Appendix
Table 4: Sawtooth benchmark , out of fold on 2 ms bins of the 386 training shots (three shot-grouped folds), against the rule with time that has no q=1 surface counted absent, so it measures agreement, not accuracy. Crash F1 counts picks within 2 ms of a rule crash; saw-hl3 has no crash output, so its row gates the derivative picker by its presence output. Last two columns: AUROC on the reviewed span of 189324, and the share of 190637’s reviewed ELM span called present.
RWM presence, DIII-D (assumed negatives)
Model
AUROC
AUPRC
F1
rwm-ours []
0.967 [0.946, 0.986]
0.523 [0.403, 0.644]
0.529 [0.432, 0.609]
rwm-brf []
0.711 [0.661, 0.760]
0.014 [0.009, 0.021]
0.034 [0.014, 0.060]
rwm-ours minus rwm-brf
+0.257[+0.200,+0.315]
+0.509[+0.392,+0.625]
+0.495[+0.403,+0.577]
always present
0.500
0.007
0.013
Appendix
Table 5: RWM presence on 10 ms bins of the listed shots, against the durations of Section B.6 : 93 present and 14,082 assumed-negative bins, one run day held out at a time. rwm-ours adds the n=1δBp , I-coil activity and q=2 rotation to rwm-brf ’s inputs; the durations end on the same δBp .
Figure 4: Detachment on shot 201081 and per shot. Top: the label, the Afrac and TangTV states (green attached, coral detached, gray uncertain or none), the lower divertor’s radiated fraction fdiv over its baseline, front height DZ with its cutoffs, and divertor Thomson Te . a–c: attached (2000–2400 ms), detached (2550–4550 ms) and attached (4600–5500 ms) intervals; dotted: published Te drops at 2650 and 4450 ms. Bottom: share of each assessed shot’s bins by label and source.
Table 6: AE benchmark in full on the 3,800 frames of the 19 benchmark shots. Precision, recall and F1 at each detector’s own threshold; best F1 over all thresholds is optimistic. Each panel’s last row: ae-ours on all 60 validation shots.
Figure 5: AUROC (rows 1–2) and AUPRC (rows 3–4) in the settings of Figure 2 . The confinement REPORTED bar is its paper’s bound of at least 0.99 per class; the RWM REPORTED bar is the NSTX forest’s forecast AUROC on NSTX. Dashes: trivial baselines.
Regime
Windows (test shots)
Precision
Recall
F1
AUROC
AUPRC
Paper F1 (P / R)
confine-cnn : five random by-shot splits under the paper’s protocol, pooled (142 distinct shots, 200 shot-tests)
L-mode
23,693 (40)
0.847
0.750
0.795 [0.64, 0.89]
0.937
0.808
0.94 (0.98 / 0.90)
H-mode
79,557 (69)
0.841
0.875
0.858 [0.78, 0.91]
0.925
0.940
0.97 (0.95 / 0.98)
QH -mode
44,061 (59)
0.744
0.790
0.766 [0.66, 0.85]
0.912
0.781
0.94 (0.92 / 0.96)
WPQH -mode
5,552 (7)
0.658
0.278
0.39 [0.00, 0.69]
0.785
0.324
0.90 (0.95 / 0.86)
Macro
152,863 (142)
0.773
0.673
0.703 [0.59, 0.79]
0.889 [0.81, 0.95]
0.713
0.94 (0.95 / 0.93)
Appendix
Table 7: Confinement benchmark in full. Top: confine-cnn under its paper’s protocol, pooled over five random by-shot splits (one split scores 0.684 ± 0.074); last column: its paper’s scores. WPQH rests on 7 test shots. Bottom: confine-ours , experimental and circular. On confine-cnn ’s test windows, confine-ours minus confine-cnn is +0.207[+0.09,+0.31] .
Method
AUROC
AUPRC
F1
Absent-bin FPR
Absent-span alarm
Alarm, trimmed
All reviewed: 119 shots/12,409 bins
elm-ours
0.941 [0.906, 0.967]
0.877 [0.774, 0.949]
0.830 [0.778, 0.871]
0.113 [0.075, 0.152]
0.596 [0.478, 0.689]
0.427 [0.343, 0.495]
elm-peaks
–
–
0.757 [0.680, 0.827]
0.063 [0.032, 0.100]
0.105 [0.063, 0.168]
0.096 [0.056, 0.154]
always-present
0.500 [0.500, 0.500]
0.376 [0.322, 0.430]
0.546 [0.487, 0.601] †
1.000 [1.000, 1.000]
1.000 [1.000, 1.000]
0.915 [0.845, 0.976]
BES subset: 73 shots/6,843 bins
elm-ours
0.941 [0.898, 0.972]
0.875 [0.751, 0.961]
0.845 [0.786, 0.896]
0.123 [0.071, 0.184]
0.610 [0.452, 0.742]
0.436 [0.351, 0.511]
Appendix
Table 8: ELM benchmark , cross-validated on 50 ms bins wholly inside one reviewed span. On the BES shots, elm-ours minus elm-elmo is AUROC +0.023[−0.014,+0.067] and F1 +0.002[−0.052,+0.058] . Alarm: share of absent spans a detection touches, also with 25 ms trimmed from each edge. The peak finder seeded the review; the last block keeps spans whose edges the experts moved by more than 1 ms. † Recall ≥ 0.99.
Model
Shots / bins
AUROC [CI]
AUPRC [CI]
F1 [CI]
Segmental F1 [CI]
Original targets: CNN at its card’s threshold, DSM at its inner-validation threshold
tm-cnn-published (thr. 0.5) †
79 / 5.6k
.897 [.832,.952]
.601 [.385,.799]
.611 [.437,.750]
–
tm-dsm-500ms-published
80 / 8.4k
.721 [.614,.828]
.294 [.179,.442]
.177 [.107,.266]
–
Tokamak-SI labels, uncertain time excluded
tm-cnn-published †
278 / 31.0k
.974 [.959,.987]
.903 [.838,.948]
.779 [.689,.848]
.615 [.504,.713]
tm-cnn-published (thr. 0.5) †
278 / 31.0k
.974 [.959,.987]
.903 [.838,.948]
.708 [.582,.808]
.588 [.416,.746]
Appendix
Table 9: Tearing-mode benchmark : recovery of the magnetic rule. F1 uses inner-validation thresholds except the CNN rows marked thr. 0.5 (its card’s); the saved DSM has no published threshold. Segmental F1 matches segments at IoU 0.5. Top: original targets. Middle and bottom: uncertain time excluded or scored as negative. “Published” rows are the saved forecasters, “retrained” rows the same architectures retrained for detection. † Training overlap unknown.
Figure 6: ELM labels and detectors on shots 195111 (a) and 200427 (b), at the 75th and 25th percentiles of elm-ours F1. Top: D α . Shading: reviewed crowd, single- ELM and absent spans. Bottom: elm-ours probability and threshold, elm-elmo detections and the peak finder’s spans. In (b), the single- ELM span at 2689–2765 ms lies in a high-recycling phase, so ELM identity there is ambiguous.
Figure 7: Tearing-mode labels on shots 189514 (a mode that decays) and 191672 (an n=2 mode, then an n=1 mode that locks): the label bar (onsets as triangles, uncertain time gray, a confirmed lock hatched), a Mirnov spectrogram, and the n=1 and n=2 magnetic RMS.
Plasma diagnostic models for tokamak fusion devices are almost universally evaluated on clean, complete sensor data. In practice, fusion diagnostics fail regularly: acquisition systems start late, individual sensors die, and signal dropouts cluster precisely when a plasma disruption is approaching. We present the first systematic robustness benchmark for plasma diagnostic ML using the TokaMark dataset of 11,573 MAST shots, evaluating XGBoost, LSTM, Transformer, and the TokaMark CNN baseline across six physically-grounded failure scenarios and three imputation strategies. We introduce the Robustness Score (RS) for standardized cross-architecture comparison. Our central finding is that disruption-proximate sensor failure (corruption injected in the final window timesteps) collapses sequence model performance (LSTM +212% NRMSE) while a statistical feature model remains comparatively stable (XGBoost +37%). Forward-fill imputation eliminates nearly all degradation from random dropout for sequence models (LSTM +57% to ~0%), but offers little help when the end of the window is corrupted. Shot-level alarm evaluation using ground-truth disruption timestamps reveals that LSTM alarm detection collapses to TPR=0.00 under proximate sensor failure, while mean-fill imputation recovers it to TPR=1.00, a reversal of the pattern observed in NRMSE. Plasma current emerges as the single most critical diagnostic across all architectures (+73% to +140% upon removal). Code, data, and trained checkpoints are available at https://github.com/Neerav-Gupta/tokamark-robustness.
We present TokaMind, to our knowledge the first open-source foundation model for tokamak plasma dynamics, based on a Multi-Modal Transformer (MMT) and pretrained on heterogeneous diagnostics from the publicly available MAST dataset. TokaMind supports multiple data modalities (time-series, 2D profiles, and videos) with different sampling rates, robust missing-signal handling, and efficient task adaptation via selectively loading and freezing four model components. To represent multi-modal signals, we use a lightweight fixed-basis Discrete Cosine Transform embedding (DCT3D) and provide a clean interface for alternative embeddings (e.g., Variational Autoencoders). We evaluate TokaMind on the recently introduced MAST benchmark TokaMark, which comprises 14 tasks with heterogeneous reconstruction and forecasting objectives. Our results show that fine-tuned TokaMind outperforms the strongest benchmark baseline on all but one task. Compared with training the same architecture from scratch under a matched epoch budget, warm-start adaptation is most beneficial on demanding downstream settings, including long-horizon forecasting and high-dimensional equilibrium objectives. These findings highlight the value of multi-modal pretraining for tokamak plasma dynamics and provide a practical, extensible foundation for future fusion modeling tasks. Training code and model weights are publicly available at github.com/UKAEA-IBM-STFC-Fusion-FMs/tokamind and huggingface.co/UKAEA-IBM-STFC, respectively.
Tobia Boschi, Andrea Loreti, Nicola C. Amorisco +13
IBM Research Dublin, Ireland · UK Atomic Energy Authority Abingdon, UK · STFC Hartree Centre Daresbury, UK
Disruption predictors must warn the plasma control system early enough for the intended response, and the required warning time differs between mitigation and avoidance. We view a warning system as a predictor that outputs a disruption risk and an alarm policy that acts on it, and ask which risk the predictor should learn. Binary classifiers do not specify when a disruption occurs, and survival analysis models the full distribution of the time to disruption, whereas an alarm depends only on the risk within a finite horizon. We introduce two horizon-focused targets into tokamak disruption prediction: a horizon-truncated survival objective and fixed-horizon early event prediction (EEP) with temporal label smoothing (TLS). We compare them with binary classification and survival analysis on the DIII-D, Alcator C-Mod, and EAST databases of DisruptionBench, evaluating the risk by its threshold-free ranking at a 40 ms deadline and the alarm policy by thresholds calibrated on validation data. On every device, TLS outperforms the deep survival models in both ranking and alarm performance; TLS performs best on DIII-D and EAST, and a random forest trained on a hard horizon target performs best on C-Mod. TLS also improves the calibrated alarm performance over hard targets placed at either end of its smoothing range on all devices, isolating the benefit of label smoothing. Horizon truncation alone did not consistently improve survival analysis. Alarm performance remains limited on C-Mod and DIII-D and varies strongly across training seeds, and ablations show that the target should extend to the required warning time.
Takeshi Koshizuka, Takaharu Yaguchi
RIKEN AIP, Japan. · Kyushu University IMI, Fukuoka, Japan.