Abstract
Transcranial magnetic stimulation (TMS) combined with electroencephalography (EEG) provides a powerful framework to probe and modulate human cortical and corticospinal excitability. In recent years, brain state-dependent EEG–TMS paradigms have gained increasing interest by synchronizing stimulation to ongoing neural activity. However, traditional approaches relying on single oscillatory features or fixed thresholds have yielded heterogeneous and often inconsistent results, motivating the adoption of machine learning (ML) and artificial intelligence (AI) methods to model brain state in a multivariate, data-driven manner. This review synthesizes current ML and deep learning (DL) approaches aimed at predicting cortical and corticospinal excitability from pre-stimulus EEG. We contextualize these methods within brain state-dependent EEG–TMS frameworks based on oscillatory phase, power, and network-level features, and within evolving definitions of brain state that move beyond local biomarkers toward distributed, large-scale, and dynamically evolving neural representations. The reviewed studies span feature-engineered models, data-driven decoding approaches, and emerging adaptive closed-loop frameworks. Finally, we discuss key methodological challenges, translational barriers, and future directions toward personalized, interpretable, and fully closed-loop neuromodulation systems.
1. Introduction
Transcranial magnetic stimulation (TMS) is a non-invasive neuromodulation technique widely used to probe and modulate human cortical excitability. The combination of TMS with electroencephalography (EEG) has substantially expanded the potential of TMS-based research [1]. EEG is non-invasive, provides high temporal resolution, and is relatively low-cost, making it possible to monitor brain activity continuously during TMS protocols. TMS–EEG integration enables the investigation of both immediate cortical responses and ongoing neural dynamics. Although now widely adopted, this approach has become technically feasible only in the last two decades, largely due to the development of TMS-compatible EEG amplifiers equipped with sample-and-hold circuitry, which prevents signal saturation during the TMS pulse [2].
TMS–EEG experiments can be broadly categorized into two main branches [2]: (i) TMS–EEG for extracting neurophysiological markers, where TMS acts as a perturbational probe and cortical circuit integrity is quantified via TMS-evoked EEG responses; and (ii) TMS–EEG for assessing or modulating brain activity, in which stimulation is applied to actively influence ongoing neural processes. Consequently, TMS–EEG pipelines have rapidly gained attention across basic neuroscience, cognitive research, and clinical practice, with applications ranging from the study of motor system physiology to the development of therapeutic interventions for neurological and psychiatric disorders [2].
Despite these promising approaches, TMS–EEG research is characterized by substantial variability across studies. In fact, experimental outcomes can be influenced by multiple parameters, including stimulation intensity, coil geometry and orientation, pulse waveform, inter-stimulus interval, signal preprocessing strategies, and artifact handling. Importantly, the brain state at the time of stimulation has also been identified as a factor contributing to this variability, adding a physiological layer of complexity to TMS responses [3,4,5,6].
Corticospinal excitability is most commonly quantified using motor evoked potentials (MEPs) elicited by stimulation of the primary motor cortex [7]. MEP amplitude reflects the excitability of a complex cortico–subcortical–spinal circuitry involving multiple excitatory and inhibitory pathways. In parallel, TMS-evoked EEG potentials (TEPs) have been proposed as complementary markers of cortical excitability. TEPs capture the spatiotemporal propagation of TMS-induced activity across cortical networks and may provide information beyond corticospinal output alone. Together, MEPs and TEPs offer a comprehensive picture of cortico-spinal and cortico-cortical excitability in relation to a TMS stimulus.
A growing body of research has focused on brain state-dependent stimulation, showing that TMS responses depend on ongoing oscillatory, spectral, and network dynamics [8]. Several real-time TMS–EEG studies have attempted to exploit this dependency by synchronizing stimulation to specific EEG rhythms, power amplitude, or oscillatory phases. While promising, these approaches have yielded partly discordant results, highlighting the difficulty of defining, detecting, and reliably targeting physiologically relevant brain states in real time [9]. Variability and replicability remain central challenges in brain stimulation research [10], emphasizing the need to understand their underlying sources.
Technological advances in TMS hardware have further expanded the range of controllable parameters. Modern controllable TMS systems allow adjustment of pulse shape, pulse duration, and current direction, and all of which can influence cortical excitability [11].
The increasing number of controllable variables, combined with the complexity of brain state dynamics, creates a multidimensional problem that is difficult to model using traditional threshold-based or univariate approaches.
Within this context, machine learning (ML) and artificial intelligence (AI) provide powerful tools for integrating multiple EEG features, stimulation parameters, and temporal dynamics into predictive models. ML and deep learning (DL) algorithms can capture complex nonlinear interactions, enabling the prediction of corticospinal excitability and paving the way toward effective closed-loop TMS paradigms [8].
The rationale for closed-loop approaches is further supported by the inherent physiological organization of the nervous system, particularly the sensorimotor system, as a closed-loop network continuously integrating sensory feedback and motor output. Investigating such systems exclusively with open-loop paradigms may limit mechanistic insight [12].
Moreover, in clinical neuroscience, closed-loop and AI-driven TMS-EEG methodologies are increasingly explored in neurodegenerative diseases and acquired brain injuries such as stroke. Brain state-dependent stimulation approaches hold particular promise in neurological and psychiatric conditions characterized by pathological alterations in oscillatory activity and network dynamics, including Parkinson’s disease, Alzheimer’s disease, major depressive disorder, and stroke [13,14]. In these populations, abnormal oscillatory patterns—such as increased beta synchronization in Parkinson’s disease [15], abnormalities in theta–gamma oscillations in Alzheimer’s disease [16,17], or frontal alpha asymmetry in depression [18]—may themselves constitute relevant targets for state-dependent neuromodulation. However, the translation of such approaches into routine clinical practice remains limited, and initial results, although encouraging, have yet to demonstrate consistently robust therapeutic outcomes [1,13,19]. A key challenge in this context is the substantial heterogeneity inherent to these pathological conditions, which compounds the already considerable inter-individual variability in healthy populations. Consequently, the oscillatory features most predictive of cortical excitability or therapeutic response may not be stable across patients, sessions, or even electrode locations, making fixed, population-level biomarkers insufficient. In such a context, personalized approaches that adapt to the individual patient’s neurophysiological profile are therefore a paramount necessity. In this regard, ML and AI frameworks offer a means to identify subject-specific EEG biomarkers of excitability and to dynamically update stimulation strategies as neural patterns evolve. Furthermore, EEG-derived biomarkers of neurological recovery or clinical improvement could themselves serve as adaptive stimulation targets as proposed in [20]. Proof-of-concept studies, such as that by Mahmoud et al. [21], demonstrate the feasibility of closed-loop TMS–EEG in stroke patients, representing an important step toward clinical translation and application of such technologies.
This review focuses on ML and AI approaches applied to EEG data for predicting corticospinal excitability following TMS. The Section 1 briefly examines real-time EEG-TMS studies that synchronize stimulation to oscillatory power or phase within specific frequency bands. The Section 2 addresses the multi-facet concept of brain state, discussing how an instantaneous brain state can be defined, operationalized, and quantified. We also highlight the challenges associated with its formalization. The Section 3 reviews the current state of the art in ML and DL algorithms used to model and predict TMS outcomes from EEG features. Finally, open challenges and future directions are discussed. While ML approaches are currently used to improve prediction of corticospinal excitability, they constitute a pivotal step toward fully adaptive, closed-loop neuromodulation frameworks.
2. Brain State-Dependent Transcranial Magnetic Stimulation
In brain state-dependent EEG-TMS paradigms, the TMS delivery is synchronized to specific features of ongoing brain activity recorded via EEG. The underlying rationale is that the neural response to TMS is not stationary, but depends on the instantaneous oscillatory, spectral, and network state of the brain activity. The goal of this section is not to provide an exhaustive methodological review of brain state-dependent EEG-TMS approaches proposed to date, as other previous overviews with that aim are already available [8,9,13], but rather to attempt a brief description of the main approaches in order to establish a foundation for subsequent ML-based developments.
Among the earliest and most widely studied strategies is phase-based stimulation, where single-pulse TMS over the primary motor cortex has been shown to elicit larger MEPs when applied during the trough or early rising phase, compared to the peak or random phases, of the ongoing sensorimotor mu oscillation [3,22]. Beyond motor output, oscillatory phase has also been demonstrated to influence cortical responses measured via TEPs [5]. In parallel, power-based approaches have shown that higher oscillatory power, particularly within sensorimotor rhythms, is associated with larger MEP amplitudes [23,24], and other studies also highlighted the role of beta-band activity in modulating corticospinal excitability [24,25]. Despite the growing number of studies, brain state-dependent EEG-TMS frameworks remain characterized by substantial heterogeneity in methodologies, datasets, experimental protocols, and outcome measures, often yielding contradictory results [26,27].
An additional challenge inherent to these paradigms is the requirement for real-time estimation of oscillatory power or phase, which relies on predictive techniques that introduce estimation errors and temporal delays. Several methods have been proposed, including regression-based approaches and event-timing prediction strategies [28]. Shirinpour et al. [29] introduced the Educated Temporal Prediction (ETP) method, a robust real-time phase detection algorithm that estimates oscillatory interpeak intervals from short training data and applies bias correction to predict future peaks, outperforming Fourier-based and autoregressive prediction methods.
Nevertheless, most existing brain state-dependent EEG-TMS paradigms still rely on an effectively open-loop architecture, in which TMS is synchronized to ongoing brain activity but stimulation parameters are not dynamically adapted based on the neural response itself, limiting the extent to which the loop can be considered fully closed [9].
Taken together, these findings suggest that brain state cannot be fully captured by single oscillatory features or predefined thresholds but rather reflects a multidimensional framework emerging from the interaction of temporal, spectral, and network-level processes. This motivates the need for analytical frameworks that integrate heterogeneous EEG features and their nonlinear relationships.
3. Defining Brain State: Concepts and Neurophysiological Markers
The definition of a brain state remains an open and actively investigated research line. To date, most of EEG-TMS studies aiming at synchronizing stimulation with ongoing brain activity have relied on single, local biomarkers to characterize the brain state, typically applying a threshold-based strategy to trigger stimulation, as described in the previous section. These approaches predominantly focus on instantaneous and spatially localized features, such as oscillatory phase or power measured at or near the stimulation site. As an example, the phase of the sensorimotor μ rhythm has been frequently used as a proxy for cortical excitability and employed to time TMS delivery [3,5,30].
However, representing the brain state through a single biomarker is unlikely to fully capture the complexity of the distributed neural processes that collectively shape the brain’s functional condition in the moment of stimulation. This limited representation may contribute to the substantial heterogeneity and lack of reproducibility observed both across participants and across studies. Indeed, several investigations have been forced to restrict their analyses to subsets of participants exhibiting specific oscillatory patterns or sufficient signal strength, thereby limiting generalizability. These limitations highlight the need for a more comprehensive definition of brain state that integrates multiple dimensions of neural activity.
Early attempts to conceptualize brain states as distributed patterns of activity date back to the work D. Lehmann et al. in 1987, who introduced the concept of microstates [31,32]—discrete states of potential distributions. Following this definition Z. Ding et al. in [33] demonstrated that the microstate present at the moment of TMS delivery modulates the brain’s response to stimulation.
In this context, L. Marzetti et al. in [34] proposed an explicit, large-scale, and functionally grounded conceptualization of brain state, termed Fast-dynamic, Large-scale Brain State (FLBS). A key conceptual advance of this framework is the shift from local, channel-specific EEG features toward network-level descriptions of brain activity, making FLBS particularly suited for closed-loop neuromodulation paradigms. Marzetti et al. further refined this concept by introducing Endpoint-Related FLBS (ER-FLBS), defined as brain states whose occurrence is causally linked to improved stimulation outcomes, such as enhanced or stabilized neural, behavioral, or peripheral responses (e.g., TEPs, MEPs, connectivity measures, or clinical scores). This makes FLBS not merely descriptive but explicitly defined by their functional relevance, serving as targets for closed-loop, real-time TMS interventions.
This network-oriented perspective aligns with earlier conceptual work by A. S. Greene et al. [35] who characterized brain states as widely distributed patterns of activity arising from specific cognitive or physiological conditions and influencing future physiology or behavior. Moreover, Greene et al. emphasized that brain states can be captured differently across neuroimaging modalities and that a comprehensive understanding requires the integration of multiple measurement techniques. Within the EEG-TMS framework, EEG provides high temporal resolution measurements of ongoing neural dynamics, while TMS enables causal probing of functional interactions, making their combination particularly well suited for studying and targeting dynamic brain states.
A further step in this direction was proposed by Makkinayeri et al. [36], who extracted broadband, large-scale transient brain states from pre-stimulus source-space EEG data recorded during TMS using a Hidden Markov Model (HMM) approach. This framework enabled the identification of recurring network-level brain states and the establishment of a systematic association between transient large-scale neural configurations and corticospinal excitability.
Taken together, these considerations underscore the necessity of moving beyond single-feature, local representations of brain state toward multivariate, large-scale, and dynamically evolving models. Such an increase in dimensionality and complexity spontaneously motivates the adoption of AI and ML methods, which are well suited to integrate heterogeneous features, infer latent brain states, and operate within the temporal constraints required for real-time EEG-TMS applications with the main aim of effectively closing the loop.
4. Machine Learning Approaches for EEG-Based Prediction of Cortical and Corticomotor Excitability
In the present section, the principal studies [37,38,39,40,41,42,43,44,45,46,47] that have investigated the relationship between pre-TMS brain activity and the neural response to TMS using ML and DL approaches are systematically reviewed. In addition, two ‘proof of concept’ studies are also reported [48,49]. A schematic representation of the conceptual framework is reported in Figure 1. Although ML and AI methods are widely applied in neuroscience research [50,51,52], only a limited number of studies, summarized in Table 1 and Table 2, have addressed this specific aspect.
Figure 1.
Schematic representation of the ML and DL workflow analyzed in this review. Pre-stimulus EEG data are processed and fed into classification or regression algorithms to predict the neural response to TMS. The predicted response can be quantified either as TMS-evoked potentials (TEPs) derived from post-stimulus EEG or as motor-evoked potentials (MEPs) measured via post-stimulus EMG.
Table 1.
ML and DL studies predicting TMS responses from pre-stimulus EEG. For each study, the table reports: participant number and type, whether participant or trial pre-selection was applied, real-time implementation, prediction target (MEPs), features used for prediction, feature selection methods (when applicable), classification or regression models, validation approaches, and reported performance metrics. Abbreviations used in the table are: AUC = area under the curve; CNN = convolutional neural network; CSP = Common Spatial Pattern; LDA = linear discriminant analysis; LR = logistic regression; MEP = motor evoked potential; mRMR = minimal Redundancy–Maximal Relevance; PCA = principal component analysis; RF = Random Forest; SD = standard deviation; SVM = support vector machine; TEP = TMS-evoked EEG potential.
Table 2.
ML and DL studies predicting TMS responses from pre-stimulus EEG. For each study, the table reports: participant number and type, whether participant or trial pre-selection was applied, real-time implementation, prediction target (TEPs), features used for prediction, feature selection methods (when applicable), classification or regression models, validation approaches, and reported performance metrics. Abbreviations used in the table are: AUC = area under the curve; CNN = convolutional neural network; CSP = Common Spatial Pattern; LDA = linear discriminant analysis; LR = logistic regression; MEP = motor evoked potential; mRMR = minimal Redundancy–Maximal Relevance; PCA = principal component analysis; RF = Random Forest; SD = standard deviation; SVM = support vector machine; TEP = TMS-evoked EEG potential.
In the proposed studies, the prediction target is the response to the TMS stimulus, which reflects cortical and corticospinal excitability. This response is quantified using MEPs [37,38,39,40,41,42,45,47,48,49] and TEPs [43,44,45,46]. Features are extracted from processed EEG data acquired during the pre-stimulus interval and subsequently selected and provided as input to the predictive models. In contrast, in two studies [40,46] the raw EEG data are directly supplied to the models, which automatically learn and select relevant features.
Moreover, to facilitate cross-study comparison, Figure 2 presents the performance outcomes reported in the included studies. It should be noted that different metrics were used across studies; therefore, while the common axis provides a visual overview, direct comparisons between studies employing different metrics should be interpreted with caution.
Figure 2.
Forest plot depicting the performance outcomes of the studies on a shared axis (S. J. Hussain, L. G. Cohen & M. Bönstrup, 2019 [37], S. J. Hussain & R. Quentin, 2022 [38], M. Ermolova et al., 2024 [39], J. Metsomaa et al., 2021 [40], L. Haxel et al., 2025a [41], U. U. Khatri et al., 2025 [42], O. Ahola et al. 2025 [45], Bisogno et al., 2025 and Moaveninejad et al., 2025 [43,44], L. Haxel et al., 2025 b [46]). Given the heterogeneity of the reported metrics (e.g., NRMSE, AUC, accuracy, F1, ), the visualization allows for an overall overview, but direct cross-study comparisons should be interpreted cautiously.
4.1. MEP Based Prediction
The studies [37,38,39,40,41,42,47,48,49] reviewed in the present section employ a range of ML methodologies to predict the presence or magnitude of MEPs, or more generally corticospinal excitability (CsE), from EEG activity recorded in the pre-stimulus interval preceding TMS. Methodologically, these works span from hypothesis-driven feature engineering combined with classical statistical or ML models, to more data-driven decoding approaches and, more recently, adaptive closed-loop learning frameworks.
The study by Hussain et al. [37] investigated whether transient beta rhythm events in EEG could predict trial-by-trial corticospinal excitability, indexed by MEP amplitudes. EEG from the motor cortex was decomposed to extract event-based beta features including event number, amplitude, duration, and temporal proximity to stimulation, alongside mean beta power. Beta events were defined as segments exceeding subject-specific percentile thresholds (75th or 82nd percentile) for at least 1.5 cycles. Each feature was evaluated using linear mixed-effects regression with subject-level random intercepts. Model comparison via likelihood-ratio tests assessed whether beta event features added predictive power beyond mean beta power. Generalization performance was quantified using 10-fold cross-validation, yielding moderate correlations (Spearman’s ρ ≈ 0.61–0.62; normalized RMSE ≈ 0.13). Although several beta event features showed significant associations with MEP size, none improved prediction beyond mean beta power, suggesting that event-based representations did not provide additional explanatory power in this framework.
On this line of feature-engineered EEG extraction, Hussain and Quentin, 2022 [38], introduced a personalized, EEG-based ML framework aimed at decoding motor cortical excitability at the single-trial level. Using low-density EEG recorded immediately prior to single-pulse TMS, the authors trained individualized linear discriminant analysis (LDA) classifiers to distinguish between high- and low-excitability trials. Personalized classifiers successfully discriminated between low and high excitability states in 80% of participants. Notably, cross-subject generalization was poor, highlighting the highly individualized nature of EEG-CsE relationships. The study further demonstrated that (1) informative EEG features persist up to 3 s before stimulation, and (2) classifiers could be trained with as few as 50 trials. Gamma-band features emerged as the most consistently informative across participants. Owing to its low computational burden (~10 ms per trial), this approach appears to be suitable to support real-time, brain state-dependent TMS protocols.
Ermolova et al. in [39] proposed a ML framework based on supervised spatial filtering using analytic Common Spatial Patterns (aCSP), a complex-valued extension of CSP that operates on analytic EEG signals to maximize variance differences between conditions, capturing both amplitude and phase information [53]. EEG trials were discretized into high- and low-excitability states according to extreme MEP amplitudes. Subject-specific aCSP filters were then learned to maximize variance differences between these two conditions within a 0.5 s pre-TMS window. The variances of the extracted components served as features for classification by means of a regularized LDA model. Model performance was assessed using a nested cross-validation scheme, with an outer loop estimating subject-level classification accuracy and an inner loop optimizing hyperparameters, including the number of aCSP components and the regularization strength. The approach achieved an average classification accuracy of approximately 68%, reaching statistical significance in 95% of subjects. Notably, comparable decoding performance was obtained using standard (real-valued) CSP, suggesting that oscillatory power rather than phase information primarily drives excitability prediction.
While the aforementioned studies relied on predefined spectral or event-based features, Metsomaa et al. [40] advanced toward a more data-driven decoding strategy for predicting CsE from pre-stimulus EEG. In this work, EEG epochs were first processed using CSP to derive spatial filters that maximally discriminated between high- and low-excitability states, followed by principal component analysis (PCA) to reduce feature redundancy. The resulting feature vectors were classified using Logistic Regression (LR), with nested cross-validation employed for both hyperparameter tuning and unbiased performance estimation. To assess robustness and practical applicability, the authors systematically reduced the number of EEG channels using a CSP-driven backward elimination procedure, in which the least important channel was removed iteratively, and showed that decoding performance remained stable with as few as 20 electrodes. Neurophysiological interpretability was addressed by transforming discriminative filters into source-level activation patterns, which localized primarily to the sensorimotor cortex of the stimulated hemisphere and were dominated by μ-rhythm activity (8–11.5 Hz). Compared to a fixed Hjorth-C3 spatial filter, individualized decoding achieved significantly higher accuracy (67% versus 57%), demonstrating the importance of tailoring filters to each subject to minimize leakage from irrelevant cortical activity. Stability and generalizability analyses revealed that within-subject decoding over time was robust, whereas cross-subject decoding remained limited, consistent with earlier findings on inter-individual variability.
The most comprehensive feature-based EEG-CsE decoding framework to date was proposed by Lisa Haxel et al. (2025) [41], who introduced an EEG-based ML pipeline integrating sensor-level, source-level, and connectivity-based EEG features. Using a larger single-pulse TMS dataset, the authors implemented a nested 5 × 5 cross-validation scheme to rigorously estimate model performance. Feature selection relied on a two-stage minimum Redundancy-Maximum-Relevance (mRMR) procedure, which efficiently selects features that are highly relevant to the target while minimizing redundancy among them, and three classifiers—Random Forest (RF), linear Support Vector Machine (SVM) with recursive feature elimination, and LR with sequential forward selection—were evaluated. Hyperparameters were optimized via grid search for each model.
The pipeline achieved mean accuracy of approximately 71%, outperforming previous EEG-based MEP prediction studies. Notably, performance did not differ significantly across classifiers, suggesting that feature quality and signal analysis played a more critical role than the specific learning algorithm.
Importantly, the results demonstrated temporal generalizability, high consistency of predictive features across experimental protocols, and distinct neurophysiological subgroups among participants, characterized by either low-frequency sensorimotor features or gamma-band parietal features. They also reported substantial inter-individual variability in the predictive feature patterns, highlighting the potential need for personalized decoding pipelines. Interestingly, incorporating source-level features did not significantly enhance performance relative to sensor-level features alone, indicating that well-designed sensor-space representations may be sufficient for CsE decoding.
Finally, Humaidan et al. [48] proposed a proof-of-concept real-time adaptative closed-loop EEG-TMS framework in which Reinforcement Learning (RL) was used to adapt stimulation parameters online with the goal of maximizing corticospinal excitability. In RL frameworks, an agent learns to make sequential decisions by interacting with an environment and receiving feedback as rewards, optimizing its actions to achieve a predefined goal without relying on labeled data. Here, the SMA–M1 network was defined as the environment, discrete phase bins of the sensorimotor μ-rhythm constituted the actions, and SMA-to-M1 facilitation—quantified by the ratio of paired-pulse to single-pulse MEP amplitudes—represents the optimization target and reward signal. Real-time EEG processing was used to estimate the oscillatory phase. A Deep Q-Learning (DQN) agent, a deep neural network that uses experiences to approximate the reward of implemented actions [54] within a RL framework, was trained during stimulation without prior labeled data, converging within a limited number of trials in a single-subject experiment. Unlike the preceding studies, no explicit classification or regression of MEPs was performed; performance was instead evaluated based on learning convergence and increases in facilitation. As such, this work should be interpreted as a feasibility demonstration of adaptive, reward-driven EEG-TMS optimization rather than a directly comparable MEP prediction study. In a recent study, Humaidan et al. [47] introduced a closed-loop RL framework representing a methodological addition toward real-time optimization of EEG–TMS protocols. In this work, the RL agent was trained online during EEG–TMS sessions to identify the phase of the sensorimotor μ-rhythm associated with high vs. low corticospinal excitability, corresponding to two experimental conditions: targeting either an increase or a decrease in MEP amplitudes. Discrete phase bins of ongoing EEG activity were treated as actions, while corticospinal excitability, indexed by MEPs, served as the reward signal guiding the learning process. The RL agent successfully converged on individualized optimal phases. Using linear mixed-effects models to assess the time effects, stimulation condition (MEP increase vs. decrease), and their interaction on MEP amplitudes, the authors demonstrated that targeted stimulation at these learned phases produced significant increases in MEP amplitude immediately post-training in the increase condition, confirming the feasibility and effectiveness of adaptive, real-time, closed-loop EEG-guided TMS for individualized modulation of corticospinal excitability.
Toward network-level approaches, Marzetti et al., 2024 [49], presented a proof-of-concept framework leveraging source-space EEG and network-level functional connectivity features to predict corticospinal excitability. In this study, EEG signals from the pre-stimulation interval were projected to the source space and phase-locking connectivity (iPLV) between the left primary motor cortex (lM1) and other motor network nodes (left supplementary motor area and right M1) was computed in the μ-rhythm band. Linear regression models used either connectivity features alone, lM1 phase alone, or a combination of both in order to predict MEP amplitudes. Results showed that combining local (lM1 phase) and long-range (Motor Network connectivity) features provided the best predictive performance, demonstrating that network-level EEG features can enhance MEP prediction beyond local oscillatory markers.
In their study [42], Khatri et al. introduced a real-time, personalized whole-brain EEG-TMS framework capable of targeting strong and weak corticospinal tract (CST) states, quantified via binarization of MEP amplitudes. Unlike previous offline studies, their pipeline included an offline calibration session to train a single-subject classifier, followed by a real-time application session using the specific classifier. They trained individualized LDA classifiers on pre-stimulus EEG data from single-pulse, brain-state-independent TMS sessions to predict trial-by-trial corticospinal excitability (strong vs. weak CST states). Features were extracted across all EEG channels, processed using CSP and spectral decomposition across five frequency bands (theta, alpha1, alpha2, beta1, beta2), and evaluated via 5-fold cross-validation on each participant’s dataset, yielding an offline classification performance with average F1 ≈ 0.68. After single-subject model calibration, the trained classifiers were applied online in real time, triggering TMS only when predicted CST states occurred. Results demonstrated high targeting accuracy (≈90–95%), increased MEP amplitudes during predicted strong versus weak CST states, and reduced trial-to-trial variability in the strong CST states, confirming both the efficacy and feasibility of real-time brain state-dependent stimulation. The study also explored non-personalized classifiers, showing that group-level models could achieve comparable offline F1 performance (≈0.69), although their real-time applicability remains untested. By combining full-scalp EEG, real-time prediction, and TMS delivery, this work represents a key methodological advance beyond proof-of-concept studies [48,49], providing a practical and validated framework for closed-loop, personalized brain state-dependent TMS interventions.
4.2. TEPs Based Prediction
To date only two studies [43,44,46] have investigated whether pre-TMS stimulus EEG activity in healthy participants can be leveraged to predict with ML algorithms post-stimulus TEPs.
Bisogno and Moaveninejad et al. [43,44] quantified TEPs in terms of evoked local field power (eLFP), extracted from the electrode closest to the stimulation site (C3) over the left primary motor cortex. Pre-stimulus EEG features were computed from the same channel and included oscillatory power in canonical frequency bands (delta, theta, alpha, beta and gamma) as well as Higuchi’s Fractal Dimension (HFD) [55], a nonlinear index of signal complexity related to brain criticality. The authors implemented a two-stage supervised regression framework. In the first stage, multiple ML regressors were trained to predict pre-stimulus HFD from frequency-domain power features, demonstrating that oscillatory activity at C3 encodes nonlinear information about local neural complexity, and the best performance was achieved by the optimized stacking regressor (R2 ≈ 0.71). In the second stage, pre-stimulus frequency power band features together with predicted HFD were used to predict post-stimulus eLFP. In this step, ensemble models, which combine base learners to improve prediction accuracy, including gradient boosting and voting regressors, yielded the highest performance, explaining approximately 70% of the single-trial variability in TMS-evoked responses. Gradient boosting regressors implement a sequential approach in which each model corrects the errors of the previous one, while voting regressors combined predictions from multiple models. Hyperparameters’ optimization was conducted using grid search with cross-validation and feature relevance was assessed via mutual information, which identified gamma-band power as the most informative predictor, followed by beta power and HFD.
Whereas Bisogno et al. [43] relied on handcrafted spectral and nonlinear EEG features combined with classical ensemble regression models, Ahola et al. [45] used linear mixed-effects models to regress single-trial TEP and MEP amplitudes, rather than treating it as a classification problem. Pre-stimulus features included theta, alpha, beta, and gamma band powers extracted from cortical parcels, along with coil position deviations and temporal trial trends. Results revealed that fluctuations in pre-stimulus alpha, beta, and gamma power reliably predicted cortical TEP amplitudes, while alpha and gamma power also influenced corticospinal MEPs, highlighting both local and network-level contributions to instantaneous excitability.
Haxel et al. [46], in contrast, introduced PRIME (Personalized Real-time Inference of Momentary Excitability), a DL framework designed to predict trial-by-trial cortical excitability directly from raw pre-stimulus EEG. PRIME focuses on predicting TEP amplitudes, focusing primarily on the N45 component, a cortical marker associated with excitation–inhibition balance [56,57,58,59]. Single-trial TEP amplitudes are extracted using individualized source-level dipole modeling. PRIME’s architecture consists of three main components: (i) a spatiotemporal convolutional front-end, (ii) a Structured State-Space (S4) temporal modeling and (iii) a prediction head. In the first stage (i) the model first applies temporal convolutions to extract time-domain features, followed by spatial convolutions across EEG channels to learn inter-channel dependencies. Pooling and dropout are implemented to reduce dimensionality. The S4 module (ii) then models long-range temporal dependencies within short pre-stimulus EEG windows (50 ms). S4 models are a class of deep sequence architectures specifically designed to process sequential data by capturing dependencies across extended time horizons in a computationally efficient manner; this property is particularly advantageous in the context of pre-stimulus EEG analysis, where cortical excitability is shaped by the interplay of oscillatory dynamics unfolding across multiple frequency bands and timescales simultaneously. The prediction head (iii) is the final classifier and consists of an adaptative pooling layer and a linear layer that outputs the excitability estimate. The learning framework consists of three stages: a population-level pretraining in which the model is first trained on a multi-subject EEG-TMS dataset, a subject-specific calibration to finetune the model on individual aspects and a trial-by-trial online adaptation. During deployment, PRIME continuously updates its parameters using supervised continual finetuning with a sliding window of recent trials.
The authors reported that PRIME significantly outperforms conventional EEG decoding architectures, such as EEGNet [60], ShallowConvNet [61], DeepConvNet [61], ATCNet [62], as the full framework achieves median ROC-AUC values of approximately 0.68, demonstrating reliable discrimination of high and low cortical excitability.
Importantly, all pre-stimulus computations—including EEG preprocessing and inference—are completed within 10 ms, roughly satisfying the real-time requirements for closed-loop TMS applications.
The authors further evaluated whether EEG features predictive of cortical excitability generalize to corticospinal excitability, assessed via MEPs. While PRIME showed moderate generalization to another cortical TEP component (P60), performance dropped to near-chance levels when predicting MEPs. This finding suggests a partial dissociation between cortical and corticospinal excitability, emphasizing that EEG-based predictors optimized for cortical responses may not directly transfer to downstream motor output. Finally, occlusion-based sensitivity analyses revealed that theta (4–8 Hz) and alpha (8–13 Hz) oscillations over left frontocentral regions contribute most strongly to excitability prediction.
4.3. TMS Parameter Optimization
On an another side, recent studies [63,64,65] have also demonstrated the growing role of ML and probabilistic optimization in automating and improving the selection of TMS’s physical parameters, including coil’s orientation and position, and stimulation intensity. Tervo et al. (2020) [63] introduced BOOST, a framework based on Bayesian optimization and Gaussian process regression to adaptively optimize TMS coil location and orientation using MEPs as feedback. In contrast, Fang Jin et al. [64] applied supervised ML to TMS’s parameters (orientation, position and intensity) by formulating the problem as a binary classification task aimed at predicting whether a MEP would be elicited. Ensemble learning methods achieved moderate predictive accuracy, particularly in within-subject models, highlighting both the feasibility of data-driven prediction and the strong inter-individual variability inherent in TMS responses. Extending Bayesian optimization beyond EMG-based feedback, Tervo et al. (2022) [65] demonstrated automated closed-loop optimization of stimulation orientation using EEG signals, maximizing the amplitude of early TMS-evoked potentials (P20–N40). Their results showed that probabilistic modeling enables reliable convergence to optimal stimulation parameters using only a few tens of pulses. Together, these findings illustrate a methodological progression from predictive modeling to adaptive, closed-loop optimization of TMS physical parameters, underscoring Bayesian optimization as a particularly powerful ML framework for individualized, real-time TMS parameter tuning.
5. Challenges and Future Directions
The ML and DL studies reviewed in this work should be interpreted within the broader conceptual framework of brain state-dependent stimulation and evolving definitions of brain state. Collectively, these investigations provide both the theoretical foundation and the initial methodological building blocks for next-generation EEG-TMS systems, in which stimulation is no longer triggered by isolated oscillatory features, but rather guided by multivariate, subject-specific representations of brain state inferred through data-driven models. In this context, the reviewed approaches mark the transition from hypothesis-driven, single-feature paradigms toward learning-based frameworks capable of capturing the intrinsic complexity and variability of neural dynamics.
Most of the ML-based approaches previously described predominantly rely on handcrafted EEG features and classical statistical or ML models. Hussain et al. [37] investigated event-based beta-band features using linear mixed-effects regression, demonstrating moderate predictive power but limited added value beyond mean spectral power. Building on this feature-engineering paradigm, Hussain and Quentin [38] and Ermolova et al. [39] employed personalized linear classifiers, including LDA combined with CSP or analytic CSP, to decode high versus low corticospinal excitability. These studies consistently highlighted the strong inter-individual variability of EEG–excitability relationships and the necessity of subject-specific models, while also demonstrating computational feasibility for real-time applications.
Metsomaa et al. [40] moved toward a more data-driven decoding pipeline combining CSP-based spatial filtering, dimensionality reduction, and logistic regression to improve classification accuracy and robustness. Haxel et al. in [41] further advanced this line of research by integrating sensor-level, source-level, and connectivity-based EEG features, and this study achieved the highest reported performance (~71% accuracy).
In parallel, a smaller but growing body of work has focused on predicting cortical rather than corticospinal responses to TMS [43,44,46], demonstrating that pre-stimulus EEG encodes substantial information about cortical excitability; however, the limited match of these EEG predictors with MEP results suggests a partial dissociation between cortical and corticospinal excitability and underscores the importance of carefully defining the prediction target when designing ML-based EEG-TMS systems.
Beyond predictive modeling, a conceptual shift towards an adaptive and closed-loop approach is represented by the studies of Humaidan et al. [47,48] that proposed a framework based on reinforcement learning, in which stimulation timing, relative to the brain state, was optimized online. Khatri et al. [42] represent a key methodological advance by integrating offline single-subject calibration with real-time deployment, thereby bridging the gap between offline decoding and practical closed-loop neuromodulation.
Although collectively promising, a cross-study comparison requires careful consideration of substantial differences in experimental design, sample size, and trial selection strategies, all of which may influence the reported performance metrics. Sample sizes vary considerably across the reviewed studies, ranging from eight participants in J. Metsomaa et al. [40] to 50 in L. Haxel and O. Ahola studies [41,45,46], with most studies recruiting between 12 and 20 healthy participants (see Table 1 and Table 2). This variability may limit the statistical power of smaller studies and raises concerns about the generalizability of learned models, particularly given the strong inter-individual variability that characterizes TMS-EEG research. A further methodological criticality concerns trial selection: several studies [39,40,41] restricted analysis to extreme MEP or TEP trials, selecting only the highest and lowest amplitude responses, to maximize class separability and enhance decoding performance, which may introduce an optimistic bias. These design choices, combined with the heterogeneity of validation strategies, ranging from simple hold-out splits to rigorous nested cross-validation schemes, make direct numerical comparison across studies challenging and should be taken into account when interpreting the performance metrics summarized in Figure 2.
On another side, parallel studies [63,64,65] have explored ML and probabilistic optimization strategies for automating TMS physical parameters, such as coil orientation, position, and stimulation intensity extending the closed-loop concept beyond neural state toward a comprehensive, data-driven optimization of stimulation delivery.
A plausible future scenario, schematically illustrated in Figure 3, involves a two-stage workflow. In a first calibration phase, ML or DL models are trained on subject-specific EEG-TMS data to learn individualized mappings between pre-stimulus brain activity and the neural response to stimulation. In a second phase, these models are deployed in real time to detect and predict the occurrence of a desired brain state and accordingly trigger TMS delivery. Crucially, this framework naturally extends toward a fully closed-loop architecture, in which models are continuously updated through online adaptation based on the observed TMS responses. In such a loop, neural feedback—such as MEPs, TEPs, or connectivity measures—could be further employed to provide real-time feedback to the participant, reflecting their current cortical excitability and actively involving them in the modulation process.
Figure 3.
Graphical representation of the proposed future closed-loop EEG-TMS framework. In the first calibration phase (top row), a ML or DL model is trained on single-subject data to generate an optimized, individualized predictive model. In the second, real-time phase, this model is used online to guide TMS delivery according to the predicted brain state. The neural responses to TMS close the loop by both updating the model for fine-tuning and providing feedback to the participant, which can take various forms such as control of a computer application, interaction with a virtual reality environment, or operation of a robotic effector.
Within this perspective, model-driven channel selection represents an important and underexplored opportunity. Several of the reviewed studies [37,43,44] recorded high-density EEG while ultimately relying on a subset of channels for classification or regression. In future closed-loop implementations, the calibration phase could be used to identify the most informative channels for each individual, enabling a reduction in EEG montage during real-time operation. This would substantially shorten preparation times, reduce participant burden, and improve computational efficiency, while preserving predictive performance.
The proposed evolution of EEG-TMS systems also shares strong conceptual and methodological similarities with the field of brain–computer interfaces (BCIs) [66]. Early attempts to explicitly merge BCI and TMS were proposed by Gharabaghi et al. [67], who implemented a closed-loop system in which TMS was delivered contingent on beta-band event-related desynchronization during motor imagery, with robotic feedback reinforcing the ongoing neural activity. Although tested in only two participants, including a stroke patient, this study exemplifies how stimulation contingent on instantaneous brain states can enhance functional relevance compared to open-loop protocols. More recently, Yasen et al. [68] systematically discussed the conceptual boundaries and overlaps between BCIs and non-invasive brain stimulation techniques, including TMS, particularly in clinical contexts such as stroke rehabilitation, where such hybrid systems may hold significant translational potential.
Importantly, the BCI literature provides valuable methodological insights for EEG-TMS research, especially regarding the use of ML and DL algorithms [69,70]. ML and DL algorithms have been widely applied to EEG decoding across domains such as motor imagery, emotion recognition, and neurological disorder detection. Different BCI paradigms have used classical classifiers (such as LDA, SVM, k-Nearest Neighbour), standard neural networks, CNN-based architectures (e.g., EEGNet [60]), and hybrid DL models [71,72]. Notably, Riemannian geometry–based classifiers and transfer learning approaches have also gained prominence, with recent comparative studies suggesting comparable performance between Riemannian methods and CNNs [73]. Similar algorithmic families are increasingly being adopted in clinical BCI applications, including neurorehabilitation and dementia research, often achieving higher decoding accuracies than those currently reported in EEG-TMS studies [74,75].
Despite the encouraging developments, several challenges must still be addressed in EEG-TMS research to close the loop. First, predictive performance remains a limiting factor: while BCI studies routinely report accuracies exceeding 70%, EEG-TMS prediction of excitability often yields more modest results. Second, available datasets are typically small and demographically homogeneous, predominantly involving young, healthy participants. This limits generalizability and neglects age-related changes and pathological alterations in brain rhythms that are highly relevant for clinical translation. Third, most ML-based EEG-TMS models have been validated exclusively in offline, post hoc analyses, with only a few exceptions [42,48] demonstrating real-time feasibility.
Addressing these challenges would pave the way toward genuinely personalized neuromodulation strategies, in line with the broader paradigm of precision medicine increasingly advocated in neuroscience and clinical research [76]. In such a framework, the participant is no longer a passive target of stimulation but an active component of the closed loop, with neural responses continuously shaping stimulation timing, parameters, and feedback. From a translational perspective, usability and wearability also become critical considerations. Advances in hardware, such as the real-time closed-loop EEG–TMS device proposed by Tang et al. [77], which triggers stimulation based on the event-related desynchronization (ERD) activity and emphasizes portability and ease of use, are particularly relevant for long-term and potentially home-based rehabilitation applications.
Beyond EEG, complementary neuroimaging modalities such as diffusion MRI, which captures time-dependent anomalous diffusion of water molecules in brain tissues and has demonstrated sensitivity to microstructural alterations in neurodegenerative conditions [78,79], may offer additional biomarkers to be integrated into future multimodal and longitudinal brain-state monitoring frameworks, further enriching the picture provided by electrophysiological measures alone.
Finally, the interpretability of especially DL models remains a key concern. The “black box” nature of many high-performing algorithms limits their acceptance in medical contexts, where mechanistic understanding and clinical trust are essential [80]. At the same time, growing efforts in explainable AI aim to improve transparency without sacrificing performance, offering tools to link model decisions to neurophysiological mechanisms and clinically meaningful features [81]. Progress in this direction will be crucial for translating ML-driven EEG-TMS systems from experimental settings to robust, interpretable, and clinically translatable neuromodulation technologies.
Author Contributions
E.M. wrote the manuscript and produced figures/tables. P.B. conceived the study, supervised the work, provided guidance on literature, and critically revised the manuscript. All authors have read and agreed to the published version of the manuscript.
Funding
Elena Mongiardini is funded by Bando SFPR 2022, SABES-ASDAA.
Data Availability Statement
No new data were created or analyzed in this study. Data sharing is not applicable to this article.
Acknowledgments
During the preparation of the manuscript, the author used AI to generate some portions of the figures. The authors have reviewed and edited the output and take full responsibility for the content of this publication.
Conflicts of Interest
The authors declare no conflicts of interest.
References
- Ziemann, U.; Bai, Y.; Baumer, F.M.; Beck, M.M.; Belardinelli, P.; Belvisi, D.; Bender, S.; Bergmann, T.O.; Bortoletto, M.; Casarotto, S.; et al. Clinical Utility and Prospective of TMS–EEG: Updated Review from an International Expert Group. Clin. Neurophysiol. 2026, 184, 2111487. [Google Scholar] [CrossRef] [Scilit]
- Farzan, F.; Vernet, M.; Shafi, M.M.D.; Rotenberg, A.; Daskalakis, Z.J.; Pascual-Leone, A. Characterizing and Modulating Brain Circuitry through Transcranial Magnetic Stimulation Combined with Electroencephalography. Front. Neural Circuits 2016, 10, 73. [Google Scholar] [CrossRef] [Scilit]
- Zrenner, C.; Desideri, D.; Belardinelli, P.; Ziemann, U. Real-Time EEG-Defined Excitability States Determine Efficacy of TMS-Induced Plasticity in Human Motor Cortex. Brain Stimul. 2018, 11, 374–389. [Google Scholar] [CrossRef] [Scilit]
- Zrenner, B.; Zrenner, C.; Gordon, P.C.; Belardinelli, P.; McDermott, E.J.; Soekadar, S.R.; Fallgatter, A.J.; Ziemann, U.; Müller-Dahlhaus, F. Brain Oscillation-Synchronized Stimulation of the Left Dorsolateral Prefrontal Cortex in Depression Using Real-Time EEG-Triggered TMS. Brain Stimul. 2020, 13, 197–205. [Google Scholar] [CrossRef] [Scilit]
- Desideri, D.; Zrenner, C.; Ziemann, U.; Belardinelli, P. Phase of Sensorimotor μ-Oscillation Modulates Cortical Responses to Transcranial Magnetic Stimulation of the Human Motor Cortex. J. Physiol. 2019, 597, 5671–5686. [Google Scholar] [CrossRef] [Scilit]
- Gordon, P.C.; Belardinelli, P.; Stenroos, M.; Ziemann, U.; Zrenner, C. Prefrontal Theta Phase-Dependent rTMS-Induced Plasticity of Cortical and Behavioral Responses in Human Cortex. Brain Stimul. 2022, 15, 391–402. [Google Scholar] [CrossRef] [Scilit]
- Klomjai, W.; Katz, R.; Lackmy-Vallée, A. Basic Principles of Transcranial Magnetic Stimulation (TMS) and Repetitive TMS (rTMS). Ann. Phys. Rehabil. Med. 2015, 58, 208–213. [Google Scholar] [CrossRef] [Scilit]
- Zrenner, C.; Ziemann, U. Closed-Loop Brain Stimulation. Biol. Psychiatry 2024, 95, 545–552. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Chen, H.; Liu, T.; Song, Y.; Ding, Z.; Li, X. State-Dependent Transcranial Magnetic Stimulation Synchronized with Electroencephalography: Mechanisms, Applications, and Future Directions. Brain Sci. 2025, 15, 731. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Gaffney, C.J.; Sliwinska, M.W.; Thut, G.; Nuttall, H.E. Editorial: Improving Reliability of Brain Stimulation: What Works and What Doesn’t? Front. Hum. Neurosci. 2023, 17, 1150586. [Google Scholar] [CrossRef] [Scilit]
- Alavi, S.M.M.; Vila-Rodriguez, F.; Mahdi, A.; Goetz, S.M. Closed-Loop Optimal and Automatic Tuning of Pulse Amplitude and Width in EMG-Guided Controllable Transcranial Magnetic Stimulation. Biomed. Eng. Lett. 2022, 13, 119–127. [Google Scholar] [CrossRef] [Scilit]
- Potter, S.M.; El Hady, A.; Fetz, E.E. Closed-Loop Neuroscience and Neuroengineering. Front. Neural Circuits 2014, 8, 115. [Google Scholar] [CrossRef] [Scilit]
- Wischnewski, M.; Shirinpour, S.; Alekseichuk, I.; Lapid, M.I.; Nahas, Z.; Lim, K.O.; Croarkin, P.E.; Opitz, A. Real-Time TMS-EEG for Brain State-Controlled Research and Precision Treatment: A Narrative Review and Guide. J. Neural Eng. 2024, 21, 061001. [Google Scholar] [CrossRef] [Scilit]
- Liu, B.; Hu, C.; Bao, P. Precision TMS through the Integration of Neuroimaging and Machine Learning: Optimizing Stimulation Targets for Personalized Treatment. Front. Hum. Neurosci. 2025, 19, 1682852. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Little, S.; Brown, P. The Functional Role of Beta Oscillations in Parkinson’s Disease. Park. Relat. Disord. 2014, 20, S44–S48. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Kitchigina, V.F. Alterations of Coherent Theta and Gamma Network Oscillations as an Early Biomarker of Temporal Lobe Epilepsy and Alzheimer’s Disease. Front. Integr. Neurosci. 2018, 12, 36. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Traikapi, A.; Konstantinou, N. Gamma Oscillations in Alzheimer’s Disease and Their Potential Therapeutic Role. Front. Syst. Neurosci. 2021, 15, 782399. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Allen, J.J.B.; Cohen, M.X. Deconstructing the “Resting” State: Exploring the Temporal Dynamics of Frontal Alpha Asymmetry as an Endophenotype for Depression. Front. Hum. Neurosci. 2010, 4, 232. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Rektorová, I.; Pupíková, M.; Fleury, L.; Brabenec, L.; Hummel, F.C. Non-Invasive Brain Stimulation: Current and Future Applications in Neurology. Nat. Rev. Neurol. 2025, 21, 669–686. [Google Scholar] [CrossRef] [Scilit]
- Rösch, J.; Emanuel Vetter, D.; Baldassarre, A.; Souza, V.H.; Lioumis, P.; Roine, T.; Jooß, A.; Baur, D.; Kozák, G.; Blair Jovellar, D.; et al. Individualized Treatment of Motor Stroke: A Perspective on Open-Loop, Closed-Loop and Adaptive Closed-Loop Brain State-Dependent TMS. Clin. Neurophysiol. 2024, 158, 204–211. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Mahmoud, W.; Baur, D.; Zrenner, B.; Brancaccio, A.; Belardinelli, P.; Ramos-Murguialday, A.; Zrenner, C.; Ziemann, U. Brain State-Dependent Repetitive Transcranial Magnetic Stimulation for Motor Stroke Rehabilitation: A Proof of Concept Randomized Controlled Trial. Front. Neurol. 2024, 15, 1427198. [Google Scholar] [CrossRef] [Scilit]
- Zrenner, C.; Kozák, G.; Schaworonkow, N.; Metsomaa, J.; Baur, D.; Vetter, D.; Blumberger, D.M.; Ziemann, U.; Belardinelli, P. Corticospinal Excitability Is Highest at the Early Rising Phase of Sensorimotor Μ-Rhythm. NeuroImage 2023, 266, 119805. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Thies, M.; Zrenner, C.; Ziemann, U.; Bergmann, T.O. Sensorimotor Mu-Alpha Power Is Positively Related to Corticospinal Excitability. Brain Stimul. 2018, 11, 1119–1122. [Google Scholar] [CrossRef] [Scilit]
- Wischnewski, M.; Haigh, Z.J.; Shirinpour, S.; Alekseichuk, I.; Opitz, A. The Phase of Sensorimotor Mu and Beta Oscillations Has the Opposite Effect on Corticospinal Excitability. Brain Stimul. 2022, 15, 1093–1100. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Torrecillos, F.; Falato, E.; Pogosyan, A.; West, T.; Di Lazzaro, V.; Brown, P. Motor Cortex Inputs at the Optimum Phase of Beta Cortical Oscillations Undergo More Rapid and Less Variable Corticospinal Propagation. J. Neurosci. 2020, 40, 369–381. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Madsen, K.H.; Karabanov, A.N.; Krohne, L.G.; Safeldt, M.G.; Tomasevic, L.; Siebner, H.R. No Trace of Phase: Corticomotor Excitability Is Not Tuned by Phase of Pericentral Mu-Rhythm. Brain Stimul. 2019, 12, 1261–1270. [Google Scholar] [CrossRef] [Scilit]
- Mai, W.; Zhao, X.; Chen, P.; Zhao, Y.; Wang, H.; Wang, X.; Liu, Z.; Jin, J.; Yin, T. The Association of EEG μ Rhythm Phase and Power with TMS-Assessed Cortical Excitability States. Sensors 2025, 25, 7187. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- De Matola, M.; Miniussi, C. Brain State Forecasting for Precise Brain Stimulation: Current Approaches and Future Perspectives. NeuroImage 2025, 307, 121050. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Shirinpour, S.; Alekseichuk, I.; Mantell, K.; Opitz, A. Experimental Evaluation of Methods for Real-Time EEG Phase-Specific Transcranial Magnetic Stimulation. J. Neural Eng. 2020, 17, 046002. [Google Scholar] [CrossRef] [Scilit]
- Schaworonkow, N.; Triesch, J.; Ziemann, U.; Zrenner, C. EEG-Triggered TMS Reveals Stronger Brain State-Dependent Modulation of Motor Evoked Potentials at Weaker Stimulation Intensities. Brain Stimul. 2019, 12, 110–118. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Lehmann, D.; Ozaki, H.; Pal, I. EEG Alpha Map Series: Brain Micro-States by Space-Oriented Adaptive Segmentation. Electroencephalogr. Clin. Neurophysiol. 1987, 67, 271–288. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Lehmann, D.; Strik, W.K.; Henggeler, B.; Koenig, T.; Koukkou, M. Brain Electric Microstates and Momentary Conscious Mind States as Building Blocks of Spontaneous Thinking: I. Visual Imagery and Abstract Thoughts. Int. J. Psychophysiol. 1998, 29, 1–11. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Ding, Z.; Wang, Y.; Niu, Z.; Ouyang, G.; Li, X. The Effect of EEG Microstate on the Characteristics of TMS-EEG. Comput. Biol. Med. 2024, 173, 108332. [Google Scholar] [CrossRef] [Scilit]
- Marzetti, L.; Makkinayeri, S.; Pieramico, G.; Guidotti, R.; D’Andrea, A.; Roine, T.; Mutanen, T.P.; Souza, V.H.; Kičić, D.; Baldassarre, A.; et al. Towards Real-Time Identification of Large-Scale Brain States for Improved Brain State-Dependent Stimulation. Clin. Neurophysiol. 2024, 158, 196–203. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Greene, A.S.; Horien, C.; Barson, D.; Scheinost, D.; Constable, R.T. Why Is Everyone Talking about Brain State? Trends Neurosci. 2023, 46, 508–524. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Makkinayeri, S.; Guidotti, R.; Basti, A.; Woolrich, M.W.; Gohil, C.; Pettorruso, M.; Ermolova, M.; Ilmoniemi, R.J.; Ziemann, U.; Romani, G.L.; et al. Investigating Brain Network Dynamics in State-Dependent Stimulation: A Concurrent Electroencephalography and Transcranial Magnetic Stimulation Study Using Hidden Markov Models. Brain Stimul. 2025, 18, 800–809. [Google Scholar] [CrossRef] [Scilit]
- Hussain, S.J.; Cohen, L.G.; Bönstrup, M. Beta Rhythm Events Predict Corticospinal Motor Output. Sci. Rep. 2019, 9, 18305. [Google Scholar] [CrossRef] [Scilit]
- Hussain, S.J.; Quentin, R. Decoding Personalized Motor Cortical Excitability States from Human Electroencephalography. Sci. Rep. 2022, 12, 6323. [Google Scholar] [CrossRef] [Scilit]
- Ermolova, M.; Metsomaa, J.; Belardinelli, P.; Zrenner, C.; Ziemann, U. Blindly Separated Spontaneous Network-Level Oscillations Predict Corticospinal Excitability. J. Neural Eng. 2024, 21, 036041. [Google Scholar] [CrossRef] [Scilit]
- Metsomaa, J.; Belardinelli, P.; Ermolova, M.; Ziemann, U.; Zrenner, C. Causal Decoding of Individual Cortical Excitability States. NeuroImage 2021, 245, 118652. [Google Scholar] [CrossRef] [Scilit]
- Haxel, L.; Ahola, O.; Belardinelli, P.; Ermolova, M.; Humaidan, D.; Macke, J.H.; Ziemann, U. Decoding Motor Excitability in TMS Using EEG-Features: An Exploratory Machine Learning Approach. IEEE Trans. Neural Syst. Rehabil. Eng. 2025, 33, 103–112. [Google Scholar] [CrossRef] [Scilit]
- Khatri, U.U.; Pulliam, K.; Manesiya, M.; Cortez, M.V.; Millán, J.d.R.; Hussain, S.J. Personalized Whole-Brain Activity Patterns Predict Human Corticospinal Tract Activation in Real-Time. Brain Stimul. 2025, 18, 64–76. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Bisogno, A.L.; Moaveninejad, S.; Corbetta, M.; Porcaro, C. Pre-Stimulus Neural Dynamics Predict TMS Responses: The Role of Fractal Dimension and Oscillatory Activity. Comput. Biol. Med. 2025, 198, 111220. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Moaveninejad, S.; Bisogno, A.L.; Cauzzo, S.; Corbetta, M.; Porcaro, C. A Machine Learning Pipeline for Evaluating Pre-Stimulus EEG Features and Their Impact on Post-Stimulus TMS-EEG Responses. In Proceedings of the 2025 IEEE International Conference on Metrology for eXtended Reality, Artificial Intelligence and Neural Engineering (MetroXRAINE), Ancona, Italy, 22–24 October 2025; pp. 91–96. [Google Scholar]
- Ahola, O.; Haxel, L.; Ermolova, M.; Humaidan, D.; Mutanen, T.P.; Laine, M.; Makkonen, M.; Ukharova, E.; Roine, T.; Lioumis, P.; et al. Predictive Modeling of TMS-Evoked Responses: Unraveling Instantaneous Excitability States. NeuroImage 2025, 322, 121553. [Google Scholar] [CrossRef] [Scilit]
- Haxel, L.; Ahola, O.; Kapoor, J.; Ziemann, U.; Macke, J.H. Personalized Real-Time Inference of Momentary Excitability from Human EEG. NeuroImage 2025, 322, 121547. [Google Scholar] [CrossRef] [Scilit]
- Humaidan, D.; Xu, J.; Chen, J.; Zrenner, C.; Vetter, D.E.; Marzetti, L.; Belardinelli, P.; Roine, T.; Ilmoniemi, R.J.; Romani, G.L.; et al. A First Realization of Reinforcement Learning-Based Closed-Loop EEG-TMS. arXiv 2026. [Google Scholar] [CrossRef] [Scilit]
- Humaidan, D.; Xu, J.; Kirchhoff, M.; Romani, G.L.; Ilmoniemi, R.J.; Ziemann, U. Towards Real-Time EEG–TMS Modulation of Brain State in a Closed-Loop Approach. Clin. Neurophysiol. 2024, 158, 212–217. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Marzetti, L.; Basti, A.; Guidotti, R.; Baldassarre, A.; Metsomaa, J.; Zrenner, C.; D’Andrea, A.; Makkinayeri, S.; Pieramico, G.; Ilmoniemi, R.J.; et al. Exploring Motor Network Connectivity in State-Dependent Transcranial Magnetic Stimulation: A Proof-of-Concept Study. Biomedicines 2024, 12, 955. [Google Scholar] [CrossRef] [Scilit]
- Onciul, R.; Tataru, C.-I.; Dumitru, A.V.; Crivoi, C.; Serban, M.; Covache-Busuioc, R.-A.; Radoi, M.P.; Toader, C. Artificial Intelligence and Neuroscience: Transformative Synergies in Brain Research and Clinical Applications. J. Clin. Med. 2025, 14, 550. [Google Scholar] [CrossRef] [Scilit]
- Reis, T.C.; Machado, A. Advancing Post-Stroke Rehabilitation: Emerging and Current Neuromodulation Approaches and Integration of Artificial Intelligence-Driven Closed-Loop Systems. Sens. Neurosci. 2025, 1, e8. [Google Scholar] [CrossRef] [Scilit]
- Gopinath, N. Artificial Intelligence and Neuroscience: An Update on Fascinating Relationships. Process Biochem. 2023, 125, 113–120. [Google Scholar] [CrossRef] [Scilit]
- Falzon, O.; Camilleri, K.P.; Muscat, J. The Analytic Common Spatial Patterns Method for EEG-Based BCI Data. J. Neural Eng. 2012, 9, 045009. [Google Scholar] [CrossRef] [Scilit]
- Terven, J. Deep Reinforcement Learning: A Chronological Overview and Methods. AI 2025, 6, 46. [Google Scholar] [CrossRef] [Scilit]
- Higuchi, T. Approach to an Irregular Time Series on the Basis of the Fractal Theory. Phys. D Nonlinear Phenom. 1988, 31, 277–283. [Google Scholar] [CrossRef] [Scilit]
- Premoli, I.; Castellanos, N.; Rivolta, D.; Belardinelli, P.; Bajo, R.; Zipser, C.; Espenhahn, S.; Heidegger, T.; Müller-Dahlhaus, F.; Ziemann, U. TMS-EEG Signatures of GABAergic Neurotransmission in the Human Cortex. J. Neurosci. 2014, 34, 5603–5612. [Google Scholar] [CrossRef] [Scilit]
- Darmani, G.; Zipser, C.M.; Böhmer, G.M.; Deschet, K.; Müller-Dahlhaus, F.; Belardinelli, P.; Schwab, M.; Ziemann, U. Effects of the Selective A5-GABAAR Antagonist S44819 on Excitability in the Human Brain: A TMS-EMG and TMS-EEG Phase I Study. J. Neurosci. 2016, 36, 12312–12320. [Google Scholar] [CrossRef] [Scilit]
- Belardinelli, P.; König, F.; Liang, C.; Premoli, I.; Desideri, D.; Müller-Dahlhaus, F.; Gordon, P.C.; Zipser, C.; Zrenner, C.; Ziemann, U. TMS-EEG Signatures of Glutamatergic Neurotransmission in Human Cortex. Sci. Rep. 2021, 11, 8159. [Google Scholar] [CrossRef] [Scilit]
- Er, A.; Belardinelli, P.; Marchand-Pauvert, V.; Ziemann, U.; Marrelec, G. Effects of Pharmacological Modulation of Corticalexcitability on Resting-State EEG PAC in Humans. Res. Sq. 2026. [Google Scholar] [CrossRef] [Scilit]
- Lawhern, V.J.; Solon, A.J.; Waytowich, N.R.; Gordon, S.M.; Hung, C.P.; Lance, B.J. EEGNet: A Compact Convolutional Neural Network for EEG-Based Brain–Computer Interfaces. J. Neural Eng. 2018, 15, 056013. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Schirrmeister, R.T.; Springenberg, J.T.; Fiederer, L.D.J.; Glasstetter, M.; Eggensperger, K.; Tangermann, M.; Hutter, F.; Burgard, W.; Ball, T. Deep Learning with Convolutional Neural Networks for EEG Decoding and Visualization. Hum. Brain Mapp. 2017, 38, 5391–5420. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Altaheri, H.; Muhammad, G.; Alsulaiman, M. Physics-Informed Attention Temporal Convolutional Network for EEG-Based Motor Imagery Classification. IEEE Trans. Ind. Inform. 2023, 19, 2249–2258. [Google Scholar] [CrossRef] [Scilit]
- Tervo, A.E.; Metsomaa, J.; Nieminen, J.O.; Sarvas, J.; Ilmoniemi, R.J. Automated Search of Stimulation Targets with Closed-Loop Transcranial Magnetic Stimulation. NeuroImage 2020, 220, 117082. [Google Scholar] [CrossRef] [Scilit]
- Jin, F.; Bruijn, S.M.; Daffertshofer, A. Machine Learning Approaches to Predict Whether MEPs Can Be Elicited via TMS. J. Neurosci. Methods 2024, 410, 110242. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Tervo, A.E.; Nieminen, J.O.; Lioumis, P.; Metsomaa, J.; Souza, V.H.; Sinisalo, H.; Stenroos, M.; Sarvas, J.; Ilmoniemi, R.J. Closed-Loop Optimization of Transcranial Magnetic Stimulation with Electroencephalography Feedback. Brain Stimul. 2022, 15, 523–531. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Wolpaw, J.; Wolpaw, E.W. (Eds.) Brain–Computer Interfaces: Principles and Practice; Oxford University Press: Oxford, UK, 2012; ISBN 978-0-19-538885-5. [Google Scholar]
- Gharabaghi, A.; Kraus, D.; Leao, M.T.; Spüler, M.; Walter, A.; Bogdan, M.; Rosenstiel, W.; Naros, G.; Ziemann, U. Coupling Brain-Machine Interfaces with Cortical Stimulation for Brain-State Dependent Stimulation: Enhancing Motor Cortex Excitability for Neurorehabilitation. Front. Hum. Neurosci. 2014, 8, 122. [Google Scholar] [CrossRef] [Scilit]
- Yasen, A.; Sun, W.; Gong, Y.; Xu, G. Progress in the Combined Application of Brain-Computer Interface and Non-Invasive Brain Stimulation for Post-Stroke Motor Recovery. Clin. Neurophysiol. 2025, 180, 2111383. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Vallabhaneni, R.B.; Sharma, P.; Kumar, V.; Kulshreshtha, V.; Reddy, K.J.; Kumar, S.S.; Kumar, V.S.; Bitra, S.K. Deep Learning Algorithms in EEG Signal Decoding Application: A Review. IEEE Access 2021, 9, 125778–125786. [Google Scholar] [CrossRef] [Scilit]
- Hossain, K.M.; Islam, M.A.; Hossain, S.; Nijholt, A.; Ahad, M.A.R. Status of Deep Learning for EEG-Based Brain–Computer Interface Applications. Front. Comput. Neurosci. 2023, 16, 1006763. [Google Scholar] [CrossRef] [Scilit]
- Lotte, F.; Bougrain, L.; Cichocki, A.; Clerc, M.; Congedo, M.; Rakotomamonjy, A.; Yger, F. A Review of Classification Algorithms for EEG-Based Brain–Computer Interfaces: A 10 Year Update. J. Neural Eng. 2018, 15, 031005. [Google Scholar] [CrossRef] [Scilit]
- Aggarwal, S.; Chugh, N. Review of Machine Learning Techniques for EEG Based Brain Computer Interface. Arch. Comput. Methods Eng. 2022, 29, 3001–3020. [Google Scholar] [CrossRef] [Scilit]
- Eder, M.; Xu, J.; Grosse-Wentrup, M. Benchmarking Brain–Computer Interface Algorithms: Riemannian Approaches vs Convolutional Neural Networks. J. Neural Eng. 2024, 21, 044002. [Google Scholar] [CrossRef] [Scilit]
- Williams, C.; Anik, F.I.; Hasan, M.M.; Rodriguez-Cardenas, J.; Chowdhury, A.; Tian, S.; He, S.; Sakib, N. Advancing Brain-Computer Interface Closed-Loop Systems for Neurorehabilitation: Systematic Review of AI and Machine Learning Innovations in Biomedical Engineering. JMIR Biomed. Eng. 2025, 10, e72218. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Elashmawi, W.H.; Ayman, A.; Antoun, M.; Mohamed, H.; Mohamed, S.E.; Amr, H.; Talaat, Y.; Ali, A. A Comprehensive Review on Brain–Computer Interface (BCI)-Based Machine and Deep Learning Algorithms for Stroke Rehabilitation. Appl. Sci. 2024, 14, 6347. [Google Scholar] [CrossRef] [Scilit]
- Figee, M.; Mayberg, H. The Future of Personalized Brain Stimulation. Nat. Med. 2021, 27, 196–197. [Google Scholar] [CrossRef] [Scilit]
- Tang, Y.; Wang, Y.; Zhang, W.; Liu, X.; Li, Y.; Hu, W.; Ding, L.; Feng, F.; Chen, X.; Feng, J.; et al. Magnetic NeuroRing: A Portable Adaptive Brain-Computer Interface for Real-Time Transcranial Magnetic Stimulation in Post-Stroke Motor Rehabilitation. npj Biomed. Innov. 2026, 3, 4. [Google Scholar] [CrossRef] [Scilit]
- Cherstvy, A.G.; Safdari, H.; Metzler, R. Anomalous Diffusion, Nonergodicity, and Ageing for Exponentially and Logarithmically Time-Dependent Diffusivity: Striking Differences for Massive versus Massless Particles. J. Phys. D Appl. Phys. 2021, 54, 195401. [Google Scholar] [CrossRef] [Scilit]
- Novikov, D.S.; Fieremans, E.; Jespersen, S.N.; Kiselev, V.G. Quantifying Brain Microstructure with Diffusion MRI: Theory and Parameter Estimation. NMR Biomed. 2019, 32, e3998. [Google Scholar] [CrossRef] [Scilit]
- Dias, N.; Pinho, L.; Silva, S.; Freitas, M.; Figueira, V.; Pinho, F. The Black Box Paradox: AI Models and the Epistemological Crisis in Motor Control Research. Information 2025, 16, 823. [Google Scholar] [CrossRef] [Scilit]
- Presacan, O.; Ojha, J.; Yazidi, A.; Monteiro, E.; Lind, P.G. A Comprehensive Review of Explainable AI in Deep Learning Algorithms for EEG Analysis. ACM Trans. Comput. Healthc. 2025, 7, 16. [Google Scholar] [CrossRef] [Scilit]
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.


