2026 Volume 35 Issue 4
Article Contents

Haipeng Quan, Liqing Xu, Chaowei Mai, Yan Chao, Yuhang Wang, EAST Team. Interpretable logistic regression for predicting 1/1 kink-driven regular complete sawtooth phenomenon in EAST tokamak plasmas[J]. Chinese Physics B, 2026, 35(4): 045203. doi: 10.1088/1674-1056/ae37f5
Citation: Haipeng Quan, Liqing Xu, Chaowei Mai, Yan Chao, Yuhang Wang, EAST Team. Interpretable logistic regression for predicting 1/1 kink-driven regular complete sawtooth phenomenon in EAST tokamak plasmas[J]. Chinese Physics B, 2026, 35(4): 045203. doi: 10.1088/1674-1056/ae37f5

Interpretable logistic regression for predicting 1/1 kink-driven regular complete sawtooth phenomenon in EAST tokamak plasmas

  • Received Date: 20/10/2025
    Accepted Date: 12/01/2026
    Available Online: 01/04/2026
通讯作者: 陈斌, bchen63@163.com
  • 1. 

    沈阳化工大学材料科学与工程学院 沈阳 110142

  1. 本站搜索
  2. 百度学术搜索
  3. 万方数据库搜索
  4. CNKI搜索

Figures(8)  /  Tables(3)

Article Metrics

Article views(259) PDF downloads(1) Cited by(0)

Access History

Interpretable logistic regression for predicting 1/1 kink-driven regular complete sawtooth phenomenon in EAST tokamak plasmas

Abstract: Sawtooth phenomena are a central topic in tokamak fusion research; nevertheless, different sawtooth classes differ markedly in underlying physics, statistical abundance and diagnostic definition. This paper focuses exclusively on regular complete sawtooth — ideal, 1/1 internal-kink-driven events with full magnetic reconnection — which are the most frequent, unambiguously identifiable and theoretically best characterized (hereafter, all references to “sawtooth” denote this specific class). Compound crashes, partial-reconnection events and fast-ion-induced giant sawtooth are deliberately excluded because of their limited data volume and still-contested classification criteria, the inclusion of which would introduce intolerable label noise and theoretical ambiguity. To this aim, we propose a machine-learning-based temporal binary-classification framework that converts multi-diagnostic, high-resolution signals into precise labels distinguishing “oscillation” from “quiet” windows for this specific category, thereby supplying critical timing information for active control. A large-scale database covering 124 discharges and hundreds of millions of samples was constructed, and three representative algorithms — logistic regression, decision tree and random forest — were trained and compared. Among them, logistic regression achieved the best and most robust performance, reaching 95% accuracy on an independent test set and significantly outperforming the other models. Furthermore, shapley additive explanations (SHAP) was innovatively employed to quantify the contribution magnitude and direction of key physical features to the onset of regular 1/1 sawtooth, substantially enhancing model interpretability and physical fidelity. The study provides an efficient and robust predictor for the active intervals of ordinary 1/1 sawtooth; the uncovered correlations between physical drivers and sawtooth behavior lay a solid foundation for deepening the understanding of regular sawtooth evolution and for optimizing control strategies, thereby holding significant promise for improving the operational stability of fusion plasmas.

1.   Introduction
  • Sawtooth oscillations represent a ubiquitous and critical magnetohydrodynamic (MHD) instability in tokamak discharges, routinely observed in devices such as EAST (qmin < 1, easily observed). These oscillations manifest as periodic relaxations of the core electron temperature and density. When the central pressure exceeds a certain threshold, an m = 1/n = 1 magnetic island forms and triggers magnetic reconnection, leading to abrupt drops in temperature and density along with rapid energy release. Such relaxation processes not only degrade confinement performance but may also excite secondary instabilities, jeopardizing device safety.[1,2] To suppress sawtooth, EAST has implemented various active control techniques, including neutral beam injection (NBI),[3–6] electron cyclotron resonance heating and current drive (ECRH/ECCD),[7–9] ion cyclotron resonance frequency (ICRF) heating,[10,11] and resonant magnetic perturbations (RMP).[12] However, achieving effective real-time intervention hinges on the ability to predict the sawtooth time window Δtsaw (i.e., from the onset time tonset to the crash time tcrash), rather than merely detecting the crash event itself. Existing research has predominantly focused on single-point crash identification, for instance, Gude et al. utilized multi-channel SXR signals to distinguish crashes from noise;[13] Van den Brand et al. employed an interacting multiple model (IMM) filter;[14] and Isei et al. applied neural networks to locate the crash time.[15] These methods generally fail to reliably capture the onset time tonset, let alone identify the full sawtooth evolution window. Implementing control only after a crash occurs cannot prevent early energy loss and is unlikely to meet the operational requirements of future long-pulse, high-performance fusion reactors. Therefore, we propose an interpretable machine learning framework that integrates logistic regression[16–20] with Shapley additive explanations (SHAP)[21,22] to achieve end-to-end identification of sawtooth-active intervals (hereafter referred to as LR–SHAP). The innovations of this framework include: (i) constructing a logistic regression-based binary classifier to directly label “sawtooth-active” and “quiet” phases, and (ii) introducing a transferability metric based on SHAP value distributions to quantify the physical mapping between diagnostic features and interval states, thereby enhancing the model’s physical interpretability and generalization capability.

    The paper is structured as follows. Section 1 reviews the relevant scientific background and elaborates on the motivation for constructing the LR-SHAP framework. Section 2 describes the database construction process, model architecture, and training and testing pipeline. Section 3 presents the model’s prediction performance and interprets the results using both global and single-point SHAP analysis. Section 4 summarizes the main research findings and outlines directions for future work.

2.   Materials and methods
  • At present, sawtooth identification on EAST still relies mainly on visual inspection of soft-x-ray (SXR) or electron cyclotron emission (ECE) traces.[23–25] Among the available diagnostics, the SXR array is nevertheless the preferred and most robust tool for such studies due to the following reasons. (i) Its signal is a line-integrated measure of electron pressure and therefore directly sensitive to the core physics driving the instability. (ii) It remains reliable even at high density, free of the cut-off limitations that frequently affect ECE. (iii) The simultaneous recording of up to 46 radial channels provides an unparalleled spatio-temporal pattern for machine-learning-based recognition.[26] Figure 1 shows a representative discharge exhibiting clear sawtooth; the enlarged window demonstrates that the characteristic slow-rise/fast-decline shape is already evident in the raw SXR trace. Figure 2 illustrates the synchronized evolution of the core and edge SXR channels around a sawtooth crash during an EAST discharge. In Fig. 2(a), the core (red) and edge (blue) SXR signals are temporally aligned, displaying the characteristic anti-correlation during a sawtooth cycle: the crash is marked by a rapid drop in the core emission, accompanied by a nearly simultaneous rise in the edge emission. This inversion reflects the inward propagation of the cooling front and the outward transport of hot plasma following the internal reconnection event. Figure 2(b) magnifies the 2.85–3.00 s window and resolves several complete saw-tooth cycles, unambiguously demonstrating their periodicity. Figure 2(c) further expands the temporal axis to the 2.87–2.90 s window, resolving a single complete sawtooth cycle that clearly exhibits three sequential phases: a slow ramp, a precursory serration, and a final rapid collapse. In subsequent steps we will also use these SXR-derived features to automatically label the sawtooth-oscillation intervals.

  • Data utilized in this study originate from standard experimental discharges of the EAST tokamak. Multiple diagnostic systems acquire signals across different measurement windows; dedicated software extracts the raw experimental dataset. To construct the analysis feature set, resampling (with SXR as the temporal baseline), temporal alignment, normalization and standardization are applied to all channels relevant to sawtooth oscillations.

    In the preliminary feature-selection stage, dozens of candidate signals potentially related to sawtooth behavior are selected based on domain experience. A Pearson correlation coefficient matrix (Fig. 3) eliminates redundancy with a threshold of |r| = 0.7; for any pair with |r| ≥ 0.7, only one channel is retained. This threshold is widely used in the fusion literature[27,28] to balance information loss against dimension reduction.

    Channels surviving |r| < 0.7 are further screened according to the following physics criteria:

    (i) Direct relevance to sawtooth crash physics: SXR (core MHD activity), magnetic probes (field perturbations), electron temperature/density (profile evolution).

    (ii) Relevance to heating/particle sources: total NBI power, total ICRF power. (fast-ion drive), deuterium signal (fueling).

    This procedure yields a 7-dimensional feature set, as detailed in Table 1.

    For model training, 124 discharge events exhibiting clear sawtooth behavior are carefully selected from EAST experimental campaigns. A sawtooth-crash-moment identification algorithm based on dual-sliding-channels and SVD[29] first obtains approximate start/end intervals of sawtooth oscillations. These intervals are further refined through manual review and are finally assigned binary labels automatically by the program. This stringent selection and labeling process ensures a high-quality dataset and provides a solid foundation for subsequent analysis and model training/testing.

  • Logistic regression models the probability of a binary outcome using the sigmoid function (the inverse log-odds transformation), producing outputs bounded between 0 and 1. This method, which dates back to Verhulst,[30] is both statistically well-founded and computationally efficient. While the signs of the coefficients indicate the direction of feature effects, they offer only limited insight into individual feature contributions. To address this limitation, we combine an L2-regularized logistic classifier (implemented with scikit-learn v1.3) with SHAP to quantitatively assess the magnitude and direction of each predictor’s influence on the “sawtooth-active” probability. The complete workflow — encompassing data preparation, model training, performance evaluation, and interpretability analysis — is summarized in Fig. 4.

  • After stratified sampling of the “sawtooth/non-sawtooth” classes from the 2020–2024 dataset (124 discharges, ≈ 2.25 × 108 instances, original ratio non-sawtooth : sawtooth > 10:1), 1% (≈ 2.25 × 106) was reserved for training and 0.2% (≈ 4.5 × 105) for validation; 6.75 × 106 instances randomly drawn from the remaining 98.8% served as an independent test set with a stratified ratio of non-sawtooth : sawtooth ≈ 2 : 1, unseen during training. The training set was balanced to approximately 1:1 to avoid class-imbalance bias. A distributed stochastic-gradient-descent logistic-regression model with L2 regularization (C = 1.0) was trained for up to 15 epochs (mini-batch size 2.56 × 105, initial learning rate 0.1); convergence was monitored via binary-cross-entropy loss on the validation set, with early stopping triggered if the loss reduction remained below 1 × 10−4 for three consecutive epochs. The final weight vector w∈ℝ7 and bias b were exported for on-line inference and subsequent SHAP analysis.

3.   Result
  • Under a fixed training/validation/test split, the proposed LR-SHAP framework was systematically benchmarked against two widely used baseline classifiers — decision tree (DT)[31] and random forest (RF).[32] Table 2 summarizes the comprehensive evaluation metrics: LR-SHAP attained an accuracy of 95%, a macro-averaged F1-score of 0.92, and balanced per-class recall values of 0.95 and 0.94 for the negative and positive categories, respectively, all of which surpass the corresponding scores of DT (accuracy 77.0%, F1 0.77, recalls 0.79 and 0.74) and RF (accuracy 84.5%, F1 0.84, recalls 0.92 and 0.76). The substantial improvements in both overall and class-specific performance indicators demonstrate the superior discriminative capacity and robustness of the LR-SHAP approach. Comparative experiments show that both decision trees and random forests lag behind logistic regression (LR) in performance, and the reasons can be summarized as follows:

    (1) Over-fitting trap of complex models

    DT chases training noise and shot-specific artifacts at deep splits, causing a large validation-test gap. RF still splits to minimal leaves despite bagging, thereby capturing high-dimensional sparse noise and degrading generalization.

    (2) Robust advantage of logistic regression

    The L2 regularization coupled with a linear hypothesis naturally limits model capacity, conferring superior robustness to high-dimensional, sparse-feature data.

    Consequently, all subsequent analyses and interpretations were carried out exclusively with the LR-SHAP model.

  • On the test set, the trained LR-SHAP model achieved 95% accuracy, macro-F1 = 0.94 and per-class recall ≥ 0.94, demonstrating good generalization to long-pulse discharge conditions unseen during training. Specific results are summarized in Fig. 5: non-sawtooth (quiet) accuracy = 97%, sawtooth accuracy = 90%, non-sawtooth recall = 0.95, sawtooth recall = 0.94, macro-F1 = 0.94.

    Analysis of class-wise prediction accuracy disparities is given as follows.

    (1) Boundary blurring “Precursor-recovery” boundary windows appear ambiguous in SXR, leading to boundary misclassifications mainly counted as FP for sawtooth, pulling its precision down to 90%.

    (2) Recall-first strategy The 1:1 training set plus F1-maximisation allows more FP, ensuring sawtooth recall ≥ 0.94 (only 6% crashes missed), satisfying the engineering requirement “better false alarm than miss”.

    (3) Macro-F1 balance The 97% versus 90% precision difference is consolidated by macro-F1 = 0.94, remains uninfluenced by sample imbalance, directly reveals the minority-class recall, and thereby confirms the model’s robustness under realistically imbalanced conditions.

    Model stability was assessed on the same test set. Table 3 shows LR-SHAP continuous-probability errors of MSE = 0.0405, RMSE = 0.2012, MAE = 0.0800; MSE < 0.05 indicates minimal squared deviation between predicted probabilities and true binary labels, demonstrating good calibration. The confusion matrix in Fig. 6 corroborates these results with TP ≈ 2.1 × 106, TN ≈ 4.3 × 106, FN ≈ 2.3 × 105, FP ≈ 1.3 × 105, and per-class recall ≥ 0.94. These low error values and the tightly concentrated probability distribution jointly indicate that the LR-SHAP framework possesses both high discriminative ability and reliable probabilistic output.

4.   Model interpretation — SHAP
  • Traditional logistic-regression coefficients merely provide a global average slope, whereas SHAP yields instance-level attributions, captures nonlinear couplings, and mitigates multicollinearity-induced distortions. We therefore adopt SHAP-based global importance as our primary interpretative metric. Figure 7 shows that 1/1 kink-driven regular complete sawtooth onset is governed chiefly by two features: SXR intensity and total NBI power. Briefly, low SXR signals a stable state, whereas high NBI power flags an elevated trigger probability. Moreover, both high SXR and high NBI power correlate with elevated central pressure; under comparable confinement, higher pressure steepens the pressure gradient at the q = 1 surface and thereby intensifies regular 1/1 sawtooth activity. This stabilizing effect is dynamically coupled to the energy balance of the plasma core and is most clearly interpreted by distinguishing two distinct phases of the sawtooth cycle. Throughout we employ the relation

    In our database, the discharge-averaged Zeff varies by ≤15%, so ISXR is dominated by the core electron pressure neTe. A negative SHAP value therefore flags periods when this pressure is too low to supply sufficient free energy to the ideal internal kink.

    The two canonical phases implied by a negative SHAP value of the SXR signal.

    (1) Post-crash recovery phase A direct marker of core stability immediately after a sawtooth crash, energy and particles are expelled from the core, producing simultaneous drops in ne and Te. According to Eq. (1), the combined fall in ne2 and Te1/2 causes a sharp decrease in the SXR intensity. This low-SXR “negative perturbation” indicates a stable configuration for three reasons: (i) the reduced pressure gradient weakens the drive for the m/n = 1/1 kink-tearing mode; (ii) the relaxed current profile increases the magnetic shear near the q = 1 surface, temporarily raising the instability threshold; (iii) fast-ion contributions (e.g., δWK) are diminished before the core is reheated, further enhancing stability.

    The model therefore learns that a strong negative SXR perturbation is a robust signature of the recent crash and the ensuing stable recovery interval, statistically implying a longer wait-time to the next crash and receiving a large negative SHAP value.

    (2) Late energy-accumulation phase An indicator of incomplete core recovery later in the cycle, during the NBI-driven recovery, a relative negative SXR perturbation does not reflect a globally cold plasma but rather a transient setback in core-energy accumulation. Possible causes include: (i) small-scale MHD events or transient transport losses that locally reduce Te; (ii) transient impurity influx or increased core radiation (higher local Zeff) that enhances radiative losses in Eq. (1). Such a perturbation acts as a “brake” on the approach to the instability boundary; the model interprets it as a stabilizing factor that postpones the next crash.

    The negative SHAP value of the SXR signal and the positive SHAP value of the NBI power form a dynamically antagonistic pair: the former flags that the core electron pressure neTe is too low to supply sufficient free energy to the m/n = 1/1 kink mode, whereas the latter represents continuous external heating that steadily steepens ∇ (neTe). In this tug-of-war, NBI increases the core-pressure gradient, while SXR marks episodes where energy is depleted (post-crash) or transiently lost (during late reheat), thereby enlarging the stability margin and statistically delaying the next crash. By simultaneously capturing the deep relaxation after a crash and the transient energy losses in the growth phase, the model moves beyond pure correlation and identifies physically meaningful precursors and stabilizers of the sawtooth cycle.

  • To elucidate the decision logic for individual samples, we plotted SHAP force plots for tens of thousands of spatiotemporal points. In the plots, red rightward arrows increase the probability of 1/1 kink-driven regular complete sawtooth occurrence, while blue leftward arrows suppress the probability; the baseline output accumulates the SHAP contributions of each feature sequentially. Figure 8 presents three typical time points for shot 116510 (sawtooth oscillation interval [2.8598 s, 6.2494 s]): T = 2.5 s, 2.86 s, and 4.5 s correspond to Figs. 8(a), 8(b), and 8(c), respectively, and are labeled “before sawtooth oscillation,” “early sawtooth oscillation,” and “mid-oscillation”. Figure 8(a) is located 0.36 s before the first collapse, during the“absolute baseline” phase: the core exhibits low temperature and low density, auxiliary heating is relatively weak, and all MHD activities remain below threshold. The model output is only 2%, fully consistent with the physical scenario of “not yet building up a gradient.”. Figure 8(b) sits exactly at the entrance to the oscillation interval. As the NBI power rises and the instability strengthens, the model assigns this instant a ∼ 60% probability of “entering the sawtooth band”; closer to the interval edges the likelihood drops relative to points deep inside the oscillation. This “boundary-blur” effect is the main reason why the sawtooth class is recognized slightly less accurately than the non-sawtooth class, and it reflects an inherent uncertainty common to all temporal-event-detection models. Figure 8(c) is situated in the middle of the oscillation. The injected NBI power dominates the weighted contribution, serving as the core energy source driving each sawtooth cycle. The model assigns an extremely high probability (≈ 95%) that this point is within the active sawtooth region, and the interpretation aligns completely with the observed dense collapses in the experiment.

5.   Conclusion and perspectives
  • To address the critical need for real-time control of 1/1 kink-driven regular complete sawtooth oscillations in tokamaks, this study proposes, for the first time, an interpretable machine learning framework capable of end-to-end prediction of sawtooth-active intervals. By constructing a large-scale database containing 108 samples (2.25 × 108 data points), we systematically compare the classification performance of logistic regression, decision tree, and random forest models. The results demonstrate that the logistic regression model, utilizing only seven diagnostic inputs, achieves 95% accuracy on an independent test set (6.75 × 106 samples), with per-class recall rates of 0.94 and 0.95. It significantly outperforms traditional algorithms while demonstrating strong robustness under high-dimensional, sparse, and class-imbalanced conditions. Error analysis reveals MSE = 0.0405, RMSE = 0.2012 and MAE = 0.0800 for the probability outputs, with the calibration error consistently remaining below 0.05. These metrics confirm that the model possesses both excellent discriminative capability and a reliable probability distribution, making it suitable for direct application in subsequent feedback control. Both global and individual SHAP interpretations consistently demonstrate that, under identical constraints and heating conditions, low SXR values correspond to a relatively flat core pressure gradient, representing a stable state. In contrast, an increase in NBI power amplifies the central pressure gradient and facilitates regular 1/1 sawtooth triggering, which aligns with established physical understanding. The introduction of SHAP enables multi-scale interpretability from macroscopic trends to individual cases, providing a data-driven quantitative basis for both macroscopic research and case-by-case analysis of regular 1/1 sawtooth phenomena, and establishing an algorithmic foundation for quasi-real-time control.

    Future work will focus on the following directions. (1) Embedding the framework into the EAST real-time control system and utilizing FPGA-based acceleration to achieve end-to-end inference latency of less than 1 ms. (2) Introducing online incremental learning to mitigate potential concept drift during long-pulse discharges. (3) Exploring the integration of deep temporal models (e.g., temporal CNN-transformer) with SHAP to capture more complex nonlinear evolution characteristics while maintaining interpretability.

Figure (8)  Table (3) Reference (32)

Catalog

    /

    DownLoad:  Full-Size Img  PowerPoint
    Return
    Return