English

A first realization of reinforcement learning-based closed-loop EEG-TMS

Machine Learning 2026-02-09 v1

Abstract

Background: Transcranial magnetic stimulation (TMS) is a powerful tool to investigate neurophysiology of the human brain and treat brain disorders. Traditionally, therapeutic TMS has been applied in a one-size-fits-all approach, disregarding inter- and intra-individual differences. Brain state-dependent EEG-TMS, such as coupling TMS with a pre-specified phase of the sensorimotor mu-rhythm, enables the induction of differential neuroplastic effects depending on the targeted phase. But this approach is still user-dependent as it requires defining an a-priori target phase. Objectives: To present a first realization of a machine-learning-based, closed-loop real-time EEG-TMS setup to identify user-independently the individual mu-rhythm phase associated with high- vs. low-corticospinal excitability states. Methods: We applied EEG-TMS to 25 participants targeting the supplementary motor area-primary motor cortex network and used a reinforcement learning algorithm to identify the mu-rhythm phase associated with high- vs. low corticospinal excitability. We employed linear mixed effects models and Bayesian analysis to determine effects of reinforced learning on corticospinal excitability indexed by motor evoked potential amplitude, and functional connectivity indexed by the imaginary part of resting-state EEG coherence. Results: Reinforcement learning effectively identified the mu-rhythm phase associated with high- vs. low-excitability states, and their repetitive stimulation resulted in long-term increases vs. decreases in functional connectivity in the stimulated sensorimotor network. Conclusions: We demonstrated for the first time the feasibility of closed-loop EEG-TMS in humans, a critical step towards individualized treatment of brain disorders.

Keywords

Cite

@article{arxiv.2602.06907,
  title  = {A first realization of reinforcement learning-based closed-loop EEG-TMS},
  author = {Dania Humaidan and Jiahua Xu and Jing Chen and Christoph Zrenner and David Emanuel Vetter and Laura Marzetti and Paolo Belardinelli and Timo Roine and Risto J. Ilmoniemi and Gian Luca Romani and Ulf Zieman},
  journal= {arXiv preprint arXiv:2602.06907},
  year   = {2026}
}
R2 v1 2026-07-01T10:24:48.643Z