bioRxiv Science⌕ Search

Biology subjects

Kahilakoski, O.-P.

Publications and source records attributed to Kahilakoski, O.-P..

6 recordsLinked to original sources

Automated robotic control system for EEG-BCI-guided closed-loop TMS

Brain-state-guided and closed-loop transcranial magnetic stimulation (TMS) protocols have emerged as methods for decreasing the variability and increasing the therapeutic effectiveness of stimulation protocols. However, most existing brain-state-dependent TMS systems only control the timing of stimulation, while the location is fixed and manually adjusted between blocks or sessions. This limits flexible targeting of distributed networks. We developed a system that jointly manages TMS pulse timing and location automatically controlled by an electroencephalography (EEG)-based brain- computer interface (BCI). A machine-learning algorithm infers the brain state in real time to guide the robotic coil placement and target. We present a proof-of-concept study in which a BCI controlled both the target site and the timing of TMS. A pre-trained convolutional neural network discriminated between resting state and movements performed with the right or left hand; the classifier output determined the hemisphere in which primary-motor-cortex hand area was stimulated and when. Preprocessing and decoding of 2-s EEG segments required 150 ms, and the robot took 7.5 s to move from the vertex home position to the predefined motor targets. The EEG-BCI-guided robotic TMS system expands the toolkit for brain-state-dependent and closed-loop neurostimulation by enabling control of stimulus location based on volitional brain activity. Thus, the system can benefit both neuroscience research and clinical neuromodulation applications. A prominent application of the system is automatically controlling spinal cord injury or motor disorder TMS rehabilitation with motor imagery, optimizing stimulation timing to the brain state producing optimal rehabilitation results.

neuroscience↗

TMS timed to interictal epileptiform discharges

Interictal epileptiform discharges (IEDs) are pathological hypersynchronous bursts of electrical brain activity that occur between seizures in patients with epilepsy. IEDs are caused by transient brain states that are difficult to predict, making them a challenging neurophysiological and technological case for brain-state-dependent stimulation. Administering stimulation at IED onset may provide insight into the epileptic network and optimize neurostimulation therapies. Here, we assessed the feasibility of IED-triggered transcranial magnetic stimulation (TMS) in two children with self-limited epilepsy with centrotemporal spikes (SeLECTS), a common pediatric epilepsy in which IEDs emerge from the motor cortex. A convolutional neural network (CNN) was trained on the participants pre-recorded electroencephalography (EEG) data with IEDs annotated by an epileptologist. The CNN was integrated into an EEG-processing pipeline that classified EEG segments as "IED" or "non-IED" in real time. With this pipeline, TMS pulses were administered during IED or non-IED periods in an interleaved, randomized design. We stimulated both the motor cortex generating the IEDs and the contralateral motor cortex and tested the impact of IEDs on TMS-evoked potentials (TEPs). Our study demonstrated that TMS can be timed to IEDs and that there is a site-specific increase in TEP amplitude when stimulating during IEDs. Out of the TMS pulses aimed at an IED, 39% and 19% were successfully delivered during an IED for the two participants, respectively. For future research, we propose ways to address the methodological challenges of IED-timed TMS, enabling brain-state-dependent TMS for epilepsy research and treatment.

neuroscience↗

Fast and standardized motor-hotspot determination with automated TMS mapping

Determining the optimal stimulation target for motor responses (motor hotspot) and the required intensity for reliably eliciting said responses (motor threshold) are common procedures in transcranial magnetic stimulation (TMS) research and treatments. However, the procedures for determining them are user-dependent, slow, and lack standardization, leading to long stimulation sessions with potentially inadequate outcomes. Partially automated algorithms for determining the motor threshold have been developed, but the motor hotspot is still largely mapped by hand. Automating the hotspot mapping will accelerate the process and improve standardization and accuracy. We developed a fully automated algorithm for finding the motor hotspot with multi-locus TMS and Bayesian optimization. Tested online in five healthy participants, the algorithm located motor hotspots with (mean {+/-} 95% CI) 2.1 {+/-} 0.7 mm and 6 {+/-} 2{degrees} difference from the global best target with only (mean) 47 stimuli. This is a significant improvement from previous motor-mapping algorithms, which do not optimize for stimulation location and orientation simultaneously. This accurate, fast, and user-independent procedure paves the way for faster experimental processes and more streamlined clinical applications.

neuroscience↗

A High-Precision Timing Method and Digital Interface for Closed-Loop TMS

ObjectiveCurrent transcranial magnetic stimulation (TMS) protocols exhibit high inter-subject variability in treatment outcomes, highlighting the need for personalized, brain-state-dependent closed-loop stimulation protocols. To enable such protocols, we aim to provide robust, precisely timed external control of TMS, with stimulation timed relative to feedback signals such as the electroencephalogram (EEG). ApproachCommercial TMS devices typically rely on trigger signals for precise external pulse timing, while adjusting stimulation parameters, such as intensity, is better handled via serial digital communication, which supports robust error detection and feedback. However, combining these communication methods is inherently complex and prone to timing issues, such as race conditions. Furthermore, trigger signals lack capabilities essential for real-time systems, such as preventing late pulse delivery. We present a method for precise and accurate pulse timing, implemented through a digital interface that uses exclusively serial digital messaging, eliminating the need for trigger signals. This interface enables external control of pulse timing, intensity, and other parameters. The TMS device maintains its own internal clock and delivers pulses at pre-scheduled times, decoupling timing precision from the control device. Additionally, we propose a method for synchronizing such time-tracking TMS devices with commercial EEG systems, enabling precisely timed EEG-TMS. Main resultsUsing these methods, our custom TMS device delivered pulses precisely aligned to the EEG signal, with timing errors consistently below 0.3 ms. These errors were constrained by the experimental setup, including the sampling rate of our EEG device and the signal-to-noise ratio affecting pulse detection. SignificanceOur timing method achieves sub-millisecond precision in brain-state-dependent closed-loop EEG-TMS, providing a foundation for robust TMS timing that supports adaptive, personalized stimulation protocols. The digital control interface, co-designed with our TMS device, integrates pulse timing and parameters, setting a precedent for future advancements in computer-controlled TMS.

bioengineering↗

NeuroSimo: an open-source software for closed-loop EEG- or EMG-guided TMS

ObjectiveOur goal was to create open-source software for closed-loop EEG-TMS that allows researchers to rapidly prototype and develop novel stimulation paradigms in a high-level programming language. This addresses the limitations of current solutions, which often rely on proprietary hardware and software, limiting their accessibility and customizability, or comprise ad-hoc pipelines tailored to specific use cases. ApproachWe developed NeuroSimo, a software platform that enables arbitrary EEG-TMS stimulation protocols written in Python, leveraging Pythons ecosystem of scientific, neuroimaging, and machine learning libraries. The core software is written in C++ with an embedded Python interpreter and employs the Robot Operating System (ROS 2) for inter-process communication. NeuroSimo runs on real-time-enabled Linux Ubuntu, using LabJack T4 for pulse triggering, and supports two EEG device models (Bittium NeurOne, BrainProducts actiCHamp) and TMS devices that deliver pulses via trigger signals. The software includes a graphical user interface for configuration and performance monitoring, and supports GPU processing for neural network computations. Main resultsIn brain-state-dependent stimulation using the Phastimate algorithm, which targets TMS pulses to the trough of sensorimotor -rhythm, NeuroSimo achieved a median timing error of 0.2 ms (95% CI: 0.2-0.2 ms), a 99th-percentile of 0.6 ms (0.6-0.6 ms), and a maximum of 1.4 ms. SignificanceAs an open-source platform combining Pythons flexibility with real-time closed-loop EEG-TMS, NeuroSimo enables researchers to develop and implement novel therapeutic approaches, marking a significant advance in personalized brain stimulation.

bioengineering↗

Characterizing an electronic-robotic targeting platform for precise and fast brain stimulation with multi-locus transcranial magnetic stimulation

1.BackgroundMulti-locus TMS (mTMS) enables precise electronic control of brain stimulation targeting, eliminating the need for physical coil movement. However, with a small number of coils, the stimulation area is constrained, and manually handling the coil array is cumbersome. Combining electronic mTMS targeting with robotics will enable automated, user-independent, and precise brain stimulation protocols. ObjectiveCharacterizing an open-source electronic-robotic mTMS platform for rapid and accurate brain stimulation targeting. MethodsWe developed an automated robotic mTMS positioning platform. The accuracy of the system was quantified with a TMS characterizer that measures the TMS-induced electric field on a spherical cortex model. We used a 5-coil mTMS device equipped with a set of five coils coupled to a collaborative robot. The induced electric-field distortion generated by robot coupling was evaluated for each coil. We compared the accuracy of robotic-electronic targeting by repositioning the mTMS coil set with the robotic and the conventional manual positioning. ResultsOur collaborative robot-based system offers submillimeter precision and autonomy in positioning mTMS coil sets. The electronic-robotic mTMS platform was approximately 1.8 mm and 1.0{degrees} more accurate than the conventional manual positioning. Integrating robotics and mTMS automates brain stimulation procedures, resulting in minimal reliance on user expertise and subjective analysis. ConclusionOur open-source platform combining rapid mTMS targeting with robotic precision enhances the safety and reproducibility of brain stimulation techniques, enabling more efficient and reliable outcomes than previous techniques.

neuroscience↗