scieee AI-readable full text Open interactive document viewer

Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis

Mijancos Martínez, Gema

Abstract

The combination of TMS (transcranial magnetic stimulation) and EEG (electroencephalography) allows a functional assessment of cortical regions in a controlled, non-invasive way and without the need of having subjects under study perform a task. Thanks to this combination, a characterization of the cerebral signals of schizophrenic patients (16) and healthy controls (15), through the TMS-evoked potentials (TEPs), will be performed. Two protocols will be evaluated: SICI (short-interval intracortical inhibition) and LICI (long-interval intracortical inhibition), which activate different inhibitory-type receptors (GABA-A and GABA-B, respectively). In both protocols, there are signals with a single TMS-pulses (SP) or with paired-pulses (two pulses, PP). Thus, besides the characterization, the different results obtained will be compared between type of pulses, protocols and groups of study. The methodology followed is the typical one for this type of signals: removal of the TMS-pulse(s); ICA (independent component analysis) application to delete the artefactuated or noisy components; signal reconstruction with the good components and bad channel and bad trial rejection. Once the pre-processing is finished and the signal is clean, the TMS-evoked potentials are obtained. For the purpose of finding the differences between PP and SP, the former signal is subtracted from the latter and a modulation ratio is computed. The TEPs found are P25, N30, P50, N100, P140, N160 and P200. Regarding the differences between types of pulses, the observed that the TEP amplitudes for LICI PP are lower than the ones for LICI SP. However, this difference is not clearly seen in SICI protocol. As to the differences between subjects, it seems that the controls have greater inhibition than the patients. In conclusion, the results are remarkably similar to the ones expected. Due to the small sample size and the fact that it is still a poorly studied filed, some results do not match completely with the ones in the literature, but they follow the same tendency

Full text

Master’s Thesis Master in Neuroengineering and Rehabilitation Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis REPORT Author: Gema Mijancos Martínez Director: Alejandro Bachiller Matarranz Joan Francesc Alonso López Call: April 2022 Escola Tècnica Superior d’Enginyeria Industrial de Barcelona Pàg. 2 Report Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg.3 Resum La combinació de la TMS (estimulació magnètica transcranial, per les seves sigles en anglès) i l’electroencefalograma permet una avaluació funcional directa de regions corticals d’una manera controlada, no invasiva i sense necessitat de realitzar una tasca per part del subjecte d’estudi. És amb la combinació d’aquestes dues tècniques que es vol caracteritzar les senyal cerebrals de persones amb esquizofrènia (16) i persones sanes (15), obtenint els potencials evocats pel TMS (TEP). S’avaluen dos protocols: SICI (short-interval intracortical inhibition) i LICI (longinterval intracortical inhibition), que activen diferents receptors de tipus inhibitori (GABA-A i GABA-B, respectivament). Dins d’aquests protocols, hi ha senyals amb un sol pols de TMS (SP) o amb dos polsos (PP). Així doncs, a part de la caracterització de la senyal, també es comparen els resultats entre els diferents tipus de polsos (1 ó 2), els protocols i els dos grups d’estudi. La metodologia seguida és la típica per aquest tipus de senyals: eliminació del pols o polsos; aplicació d’ICA (anàlisis de components independents), per tal d’eliminar aquelles components artefactuades i/o sorolloses; reconstrucció de la senyal amb les components bones i eliminació de canals i experiments sorollosos. Un cop s’ha fet el pre-processament de la senyal i aquesta està neta, es busquen els potencials evocats pel pols(os) del TMS. Per buscar les diferències entre PP i SP, es resta la primera senyal a la segona i es calcula un rati de modulació. S’han trobat els TEPs P25, N30, P50, N100, P140, N160 i P200. Referent a les diferències entre tipus de polsos, s’observa que les amplituds dels TEPs és menor en LICI PP que en LICI SP. Tanmateix, aquesta diferencia no es veu tan clara en el protocol SICI. Pel que fa les diferències entre subjectes, sembla que els controls (les persones sanes) tenen més inhibició que no pas els pacients. En conclusió, els resultats obtinguts són bastant propers als esperats. Degut a la mida reduïda de la mostra i a que es tracta d’un camp encara poc estudiat, els resultats no són exactament els de la literatura però sí que van en la mateixa línia. Pàg. 4 Report Resumen La combinación de la TMS (estimulación magnética transcranial, por sus siglas en inglés) y el electroencefalograma permite una avaluación funcional directa de regiones corticales de una manera controlada, no invasiva y sin necesidad de realizar una tarea por parte del sujeto de estudio. Es con la combinación de ambas técnicas que se quiere caracterizar las señales cerebrales de personas con esquizofrenia (16) y personas sanas (15), obteniendo los potenciales evocados por el TMS (TEPs). Se evalúan dos protocolos: SICI (short-interval intracortical inhibition) y LICI (long-interval intracortical inhibition), que activan diferentes receptores de tipo inhibitorio (GABA-A y GABA-B; respectivamente). Dentro de estos protocolos, hay señales con un solo pulso de TMS (SP) o con dos pulsos (PP). Así pues, a parte de la caracterización de la señal, también se comparan los resultados entre los diferentes tipos de pulsos, los protocolos y los dos grupos de estudio. La metodología seguida es la típica para este tipo de señales: eliminación del pulso o pulsos; aplicación de ICA (análisis de componentes independientes), con el fin de eliminar las componentes artefactuadas y/o ruidosas; reconstrucción de la señal con las componentes buenas y eliminación de canales y experimentos ruidosos. Una vez hecho el pre-procesado de la señal y ésta está limpia, se buscan los TEPs. Para buscar las diferencias entre PP y SP, se resta la primera señal a la segunda y se calcula una ratio de modulación. Se han encontrado los TEPs P25, N30, P50, N100, P140, N169 y P200. Referente a las diferencias entre tipos de pulsos, se observa que las amplitudes de los TEPs son menores en LICI PP que en LICI SP. Sin embargo, esta diferencia no se ve tan clara en SICI. En cuanto a las diferencias entre sujetos, parece ser que los controles (personas sanas) tienen más inhibición que los pacientes. En conclusión, los resultados son muy similares a los esperados. Debido al tamaño reducido de la muestra y a que es un campo poco estudiado, los resultados no son exactamente iguales a los de la literatura, pero sí que van en la misma línea. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg.5 Abstract The combination of TMS (transcranial magnetic stimulation) and EEG (electroencephalography) allows a functional assessment of cortical regions in a controlled, non-invasive way and without the need of having subjects under study perform a task. Thanks to this combination, a characterization of the cerebral signals of schizophrenic patients (16) and healthy controls (15), through the TMS-evoked potentials (TEPs), will be performed. Two protocols will be evaluated: SICI (short-interval intracortical inhibition) and LICI (longinterval intracortical inhibition), which activate different inhibitory-type receptors (GABA-A and GABA-B, respectively). In both protocols, there are signals with a single TMS-pulses (SP) or with paired-pulses (two pulses, PP). Thus, besides the characterization, the different results obtained will be compared between type of pulses, protocols and groups of study. The methodology followed is the typical one for this type of signals: removal of the TMSpulse(s); ICA (independent component analysis) application to delete the artefactuated or noisy components; signal reconstruction with the good components and bad channel and bad trial rejection. Once the pre-processing is finished and the signal is clean, the TMS-evoked potentials are obtained. For the purpose of finding the differences between PP and SP, the former signal is subtracted from the latter and a modulation ratio is computed. The TEPs found are P25, N30, P50, N100, P140, N160 and P200. Regarding the differences between types of pulses, the observed that the TEP amplitudes for LICI PP are lower than the ones for LICI SP. However, this difference is not clearly seen in SICI protocol. As to the differences between subjects, it seems that the controls have greater inhibition than the patients. In conclusion, the results are remarkably similar to the ones expected. Due to the small sample size and the fact that it is still a poorly studied filed, some results do not match completely with the ones in the literature, but they follow the same tendency. Pàg. 6 Report Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg.7 Summary SUMMARY ___________________________________________________ 7 1. GLOSSARY ______________________________________________ 9 2. PREFACE _______________________________________________ 13 2.1. Origin of the project ...................................................................................... 13 2.2. Motivation ..................................................................................................... 13 2.3. Previous requirements ................................................................................. 14 3. INTRODUCTION __________________________________________ 15 3.1. Objectives ..................................................................................................... 15 4. THEORETICAL FRAMEWORK ______________________________ 16 4.1. Schizophrenia ............................................................................................... 16 4.1.1. Symptoms ....................................................................................................... 16 4.1.2. Brain areas involved in schizophrenia ............................................................. 17 4.2. Non-invasive brain stimulation...................................................................... 18 4.2.1. tCS .................................................................................................................. 18 4.2.2. TMS ................................................................................................................ 19 4.3. EEG .............................................................................................................. 21 4.3.1. EEG processing .............................................................................................. 21 4.3.2. TMS-EEG ....................................................................................................... 22 4.4. TMS-EEG and schizophrenia ....................................................................... 28 4.4.1. Characterization .............................................................................................. 28 4.4.2. Clinical application .......................................................................................... 31 5. METHODOLOGY _________________________________________ 35 5.1. Signal acquisition and dataset ...................................................................... 35 5.2. Algorithm/Pipeline......................................................................................... 38 5.2.1. Pre-processing ................................................................................................ 40 5.2.2. Processing ...................................................................................................... 55 5.2.3. Statistical analysis ........................................................................................... 58 6. RESULTS AND DISCUSSION _______________________________ 59 6.1. Clean signal .................................................................................................. 59 6.2. TMS-evoked potentials (TEPs) .................................................................... 61 6.2.1. All subjects ...................................................................................................... 61 6.2.2. Comparison between type of subjects and pulse type .................................... 65 6.3. Single-pulse signal vs paired-pulse signal .................................................... 67 Pàg. 8 Report 6.3.1. Temporal signal ............................................................................................... 67 6.3.2. Spatial distribution of TEPs .............................................................................. 69 6.3.3. Modulation ratio (PP/SP) .................................................................................. 75 7. PROJECT’S SCHEDULE ___________________________________ 77 8. FUTURE WORK __________________________________________ 78 9. ENVIRONMENTAL IMPACT ANALYSIS _______________________ 79 10. ECONOMICAL ANALYSIS __________________________________ 80 CONCLUSIONS ______________________________________________ 83 ACKNOWLEDGEMENTS _______________________________________ 87 BIBLIOGRAPHY ______________________________________________ 89 References ............................................................................................................ 89 Complementary bibliography ................................................................................. 92 Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 9 1. GLOSSARY AEP: Auditorily evoked potential; potential triggered by a sound. AMT: Active motor threshold. AP: Action Potential. AUC: Area under the curve. CS: Conditioning stimulus. CSP: Cortical Silent Period. dB: Decibel. DLPFC: Dorsolateral prefrontal cortex. dTMS: Deep TMS. EEG: Electroencephalography. EMG: Electromyography. ERD: Event-related desynchronization. ERP: Event-related potential. ERS: Event-related synchronization. fMIR: Functional magnetic resonance imaging. HC: Healthy control. HCUV: Hospital Clínico Universitario de Valladolid. HEOG: Horizontal electrooculography. IC: Independent component. ICA: Independent component analysis. ICF: Intracortical facilitation. Pàg. 16 Report 4. THEORETICAL FRAMEWORK 4.1. Schizophrenia Schizophrenia is a chronic brain disorder (or mental disorder) characterized by the alteration of cognitive processes. It may result in some combination of hallucinations (typically hearing voices), delusions and extremely disordered thinking and behaviour ⎯such as disorganized speech, social withdrawal or lack of motivation⎯ that impairs daily functioning, and can be disabling. Thus, schizophrenia is a psychosis that affects 20 million people worldwide, according to the WHO. Effective lifelong treatments are available. With these treatments, most symptoms of schizophrenia improve greatly and the likelihood of recurrence can be diminished. Similarly to other cognitive impairments, the outlook ameliorates if the patient is diagnosed in an early stage. Men are usually diagnosed in their late teens or early twenties, while women are diagnosed in their late twenties and thirties, though it can occur at any age. Moreover, its severity, duration and frequency vary from person to person. Some may have only one psychotic episode, while others may have many episodes throughout their lifetime but living a relatively normal life. On the other hand, other symptoms might worsen over time. 4.1.1. Symptoms Some of the early symptoms are subtle, including change in grades (for teens), social withdrawal, trouble concentrating, temper flares and difficulty speaking. In addition, the symptoms can be classified as follows: ⎯ Disorganized symptoms: confused and disordered thinking and speech, trouble with logical thinking, problems making sense of everyday sights, sounds, and feelings and sometimes abnormal movements, among others. ⎯ Cognitive symptoms: problems in attention, concentration and memory. For instance: forgetting or losing items, not having working memory (using the information immediately after learning it) or being unable to decide due to difficulty in processing information. They sometimes might suffer from anosognosia (being unaware of their own mental health condition or not perceiving it accurately). Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 17 ⎯ Negative symptoms: related to those that diminish a person’s abilities. Some of them are lack of motivation, difficulties in planning, beginning and sustaining activities, reduced expression of emotions via facial expression or voice tone, reduced speaking, lack of the ability to experience pleasure and poor hygiene and grooming habits. ⎯ Positive symptoms: referring to added thoughts or actions that are not based in reality: hallucinations (as commented before, usually hearing voices), delusions (beliefs not supported by objective facts, such as paranoia), catatonia (where the person may stop speaking and their body may be fixed in a single position for a very long time) and exaggerated or distorted perceptions, beliefs and behaviours. 4.1.2. Brain areas involved in schizophrenia Schizophrenic patients appear to have altered connectivity (hypo and hyper) and circuitry, caused at least by the susceptibility genes and arbitrated through a perturbation of brain development and synaptic plasticity [1], [2]. Thus, the ongoing neuroplastic changes play a role in the course of the disease and the neuropathology involves interconnected circuits and associated brain areas [2]. It also has been proven that there is no gliosis (proliferation and hypertrophy of the supporting cells of the brain) in SCZ, thus the disorder is likely to be neurodevelopmental in origin [1]. Meta-analysis of structural magnetic resonance imaging (MRI) reveals grey matter volume deficits in the temporal lobe, the parietal cortex and the thalamus. Post-mortem studies have shown volume loss in the hippocampus [3]. Besides, they are in accordance with the results of the MRI studies, as they also showed a change of volume of the temporal lobe as well as a change in the number and size of neurons and the density [4]. This change in size, making them smaller, suggests less extensive axonal and dendritic trees and hence, the neurons may be making fewer connections [1]. Regarding the frontal lobe, which has also a reduced volume, the cell density and their size have been found reduced along with a decreased intermediate neuron, which seems to be related to the low activity of the frontal lobe seen in functional studies [4]. Diffusion tensor imaging studies demonstrated that the myelin of the membranes was reduced (which may lead to impaired nerve cell propagation of information) as well as the white matter anisotropy in the deep left prefrontal and temporal cortex [3]. Functional magnetic resonance imaging studies have shown disturbed connectivity in complex hippocampal, prefrontal and cerebellar-thalamic-prefrontal networks [3]. Regarding genetics, a decreased expression of glutamatergic and gamma-amino-butyric acid (GABA)ergic synaptic proteins and its consecutive disturbance of microconnectivity has been reported [3]. Moreover, mutations of the Notch4 gene, which controls functions such as Pàg. 18 Report increases, differentiation and migration of nerve stem cells, have been reported. Other candidates genes to be susceptible are i) DISC1, that have a role of adjustment of nervous system migration and extension of nervous system projections during the neuronal development period [4]; ii) the reelin gene (related to the formation of neuronal connections), since abnormal regulation and expressions have been reported [1] and iii) the BDNF (brainderived neurotrophic factor) gene, which encodes the expression of the BDNF or abrineurin, a neurotrophic factor essential for regulating the survival, differentiation, morphology and synaptic remodelling of neurons during development [4]. 4.2. Non-invasive brain stimulation Non-invasive brain stimulation (NIBS or NBS) is a set of different technologies and techniques that allow the stimulation of the brain by altering the brain activity through the cerebral cortex, without the necessity of conducting a surgical process or entering any device into the head of the subject [5]. There are two different techniques: transcranial current stimulation (tCS) and transcranial magnetic stimulation (TMS). One of the differences between them is that TMS provokes the depolarization of the cells, which leads to the creation of the action potential (AP). However, tCS simply induces membrane depolarization, modulating the excitability of a region and changing the probability of having an AP [5-6]. These techniques can be used either for research or diagnosis, as they are useful to observe disease-related changes in brain activation, inhibition or connectivity. Moreover, it also can be used for treating different brain disorders (e.g. depression) and in neurorehabilitation, for instance after a stroke or a spinal cord injury [7]. 4.2.1. tCS tCS, which dates back to the 19th century, involves direct (tDCS) and alternating (tACS) current stimulation. For the former, a low-amplitude (0.5-4 mA) direct current is applied to the scalp using electrodes for some seconds or even minutes [8]. The electric current flows from the cathode to the anode penetrating the skull and modifying the neuronal transmembrane potentials (increasing or decreasing the excitability) in the current path. Usually, the excitability of the region under the cathode decreases and the one in the anode increases [5]. On the other hand, tACS uses a current that alternates at a frequency specified by the operator to directly interfere with ongoing brain oscillations [9]. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 19 4.2.2. TMS The transcranial magnetic stimulation was first presented in 1985 by Anthony Baker and coworkers from the University of Sheffield. Based on Faraday’s Law, when a pulse of electric current passes through a coil, it generates a rapidly changing magnetic pulse, if the current has sufficient strength and short duration. Being the coil placed in the subject’s head the magnetic pulse generated penetrates his/her scalp and skull to reach the cortex with negligible attenuation. Then, the pulse of the magnetic field induces a secondary ionic current in the brain, which can trigger action potentials in cortical neurons [10]. It can be applied repeatedly, producing changes in the cortex that last more than the stimulation. Among other brain stimulation methods, TMS is unique since it activates all its primary target neurons at the same time [11]. 4.2.2.1. Detailed stimulation The current flows shortly in the coil and generates the magnetic field that induces an electric current in the underlying tissues, evoking multiple responses in the corticospinal neurons. Depending on the site of the stimulation (where on the cortex it is applied), there will be different behavioural results. For instance, applying the magnetic stimulation on the motor cortex a movement in the contralateral muscles might be induced; or applying it on the visual cortex might induce the perception of a beam of light. The electric current acts on neurons, inhibiting or stimulating them and affecting their function, as messengers of electrical signals. All the effects (so, the activation of the cortex) are determined by the intensity of the magnetic field, the frequency and duration of the magnetic pulses as well as by the shape, size, type and orientation of the coil -the induced fieldwith respect to the sulci (a depression or groove in the cerebral cortex) being perpendicular to the cortical surface the optimal direction [11-12]. The area stimulated is only the starting point of the desired effect, but thanks to the net of neural circuits different distant areas will be affected. In addition, this widespread network allows the TMS to generate neuromodulating effects in deep brain and brainstem areas where current cannot be induced directly [12]. Thus, the TMS-evoked response observed afterwards is probably due to cellular mechanisms that were triggered by the pulse, not by the pulse itself or remnants of accumulated charge [11]. Regarding the frequency of the pulse, the TMS will have an inhibitory (for low frequencies, meaning 1 Hz or less) or excitatory effect (for high frequencies, i.e, greater than 1 Hz). Moreover, the pulses can be administered as single, paired or in series, which is called repetitive TMS (rTMS). The first two types (single and paired) are used for neurodiagnostic Pàg. 20 Report purposes and the latter has a therapeutic benefit in psychiatric disorders [13]. The best-known effect is the motor-evoked potential (MEP) measured from peripheral muscles after the application of a TMS pulse in the motor cortex. Moreover, from estimates of synaptic delays and axonal transmission velocities, the time of activation of other brain regions after the pulse can be predicted. TMS may also trigger oscillatory activity or perturb ongoing rhythms; for instance, event-related synchronization (ERS) or desynchronization (ERD) [11]. Figure 1. Magnetic flux of the coil and the induced current in the brain. From: Hallett, M. “Transcranial magnetic stimulation and the human brain”. Nature 406, 147–150, 2000. 4.2.2.2. Coils As commented above, the magnetic stimulation is provided by a coil inside of which there is a copper conductor wire that produces the current that flows in a circular way generating the magnetic field. Several types of coils can be used, regarding how deep the stimulation should be: round and Fo8 (butterfly) for the standard TMS (less deep) and double cone coils, H or HCA for the dTMS (deep TMS) [14]. Figure 2. Butterfly (left) and double cone (right) coils. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 21 4.2.2.3. Risks and side effects It is considered a safe technique, as it is non-invasive. Nevertheless, it can have some side effects. The most common ones are headache, discomfort at the stimulation site, dizziness and tickling and spasms in the facial muscles. Moreover, the risk of suffering from epileptic seizures during the TMS is very low. The main relative contraindications for TMS are pregnant women and children under 2 years of age. Regarding the absolute contraindications, there are patients with uncontrolled epilepsy, patients with corporal electronic devices (such as pacemakers, implantable defibrillators, insulin pumps…) or intracranial ferromagnetic elements (stents, plates, screws, etc.). 4.3. EEG Electroencephalography (EEG) is a non-invasive neurophysiological technique that records the electrical activity of the brain through the electrodes placed in the scalp of the subject. This electrical activity is produced by the ionic currents generated during the neuronal activity and it was captured for the first time by the psychiatrist Hans Berger in 1928 and since then it has been used as a tool for diagnosis, mainly in the fields of neurology and neurosurgery [15]. The EEG is the temporal and spatial sum of the post-synaptic potentials of the pyramidal neurons. These neurons generate ionic currents that contribute to the generation of an electrical field, which is recorded by the EEG. Nevertheless, this field cannot be captured “clean”, as it is distorted by brain structures such as the cranial bone or the cerebrospinal fluid. The signal of the field is commonly represented in a graph of voltage vs time. The EEG signal varies between subjects, as it is complex, variable and non-uniform and the location of the electrodes might be modified. It usually ranges between 10 µV and 100 µV [15]. There are two main types of recording: basal or resting-EEG and event-related potentials (ERP). For the resting-EEG, the subject must be resting and usually with his/her eyes closed. On the other hand, to capture the ERP, a stimulus is needed (typically visual or auditory) to examine its response. In this project, the response to a TMS pulse is studied, being the pulse the stimulus. 4.3.1. EEG processing The processing of bio-signals and, hence, EEG processing has the objective of extracting meaningful information of the signals in order to characterize disorders, diseases and pathologies as well as to facilitate the work to the medical staff. With the characterization, a better and more precise diagnosis is possible and can be used to help the professionals to Pàg. 22 Report make and/or to support a decision [16]. Although through the years the processing has been visual, advanced methodologies of signal processing allow the identification of features or biomarkers non-detectable visually. Moreover, as it is an automatic (or semi-automatic) process, it decreases the time needed to its inspection and increases the objectivity (it is not as biased as the visual inspection, where the expertise of the professional and his/her personal bias have an important impact, as well as fatigue) and uniformity in the diagnosis. The EEG processing can be divided in three different stages: 1. Recording of the signals and its pre-processing (mainly cleaning them, removing artefacts and denoising them). 2. Processing (segmentation, filtering, feature calculation, etc). 3. Classification of the signal. 4.3.2. TMS-EEG TMS-EEG allows the possibility, non-invasively, of a direct functional assessment of specific cortical regions in a controlled manner without the necessity of performing a task [11], [17]. To obtain a good signal-to-noise ratio (SNR) it is important that the recording system has a low noise level but at the same time, it must be insensitive or it must recover quickly from the TMS pulse [11]. Even with the best technology available, the signal will be subject to different kinds of artefacts. The most common are briefly described below, but different TMS machines, experimental arrangements and study designs can alter the recordings and the physiological TMS-EEG artefact profiles, resulting in longer or new artefacts [18]. 4.3.2.1. Artefacts 4.3.2.1.1 Hardware artefacts Standard EEG systems cannot be used together with TMS because the pulse may saturate traditional amplifiers. Hardware solutions have been found to deal with it. Furthermore, the recharge of the TMS device for the next pulse may cause a significant artefact. To avoid this problem, monophasic devices must be used or insert a recharging delay circuit in the stimulation instruments [11, 17]. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 23 4.3.2.1.2 Muscle activity It is the most pervasive artefact and results from the inadvertent stimulation of scalp muscles when the TMS pulse is triggered. It is a peak that appears 5 to 8 ms after the pulse (the pulse is also seen in the EEG recording), making impossible the recovery of neural activity earlier than 15 to 20 ms. Usually, the TMS pulse and a few milliseconds after it are removed from the EEG, thus some muscle activity remains. This is the reason why some researchers call this artefact the remaining-tail end [17-18]. The artefact can be reduced (even though some part of the data will be removed) by moving or reorienting the coil, by reducing the TMS intensity or by a combination of them [11]. Nevertheless, the muscle activity can also be recorded throughout the recording, as the scalp muscles can be activated by other reasons apart from the TMS pulse. The muscles most likely to be activated are the neck, the mastication, facial, frontal, temporal or masseter [11]. 4.3.2.1.3 Decay artefact It is also a peak but smaller in amplitude than the previous artefact, often demonstrates an opposite polarity and has a slower recovery than the muscle artefact. It is also related to the size of TMS-evoked muscle activity [17]. These two artefacts (muscle activity evoked by the TMS pulse and the decay artefact) recover within 10 to 12 ms, although small baselines offset may still be present depending on the configuration [18]. 4.3.2.1.4 Blinks and eye movement artefact There is a steady potential of several millivolts, which can be large compared to the EEG signal, across each eyeball. Some subjects perform systematic eye movements and all of them blink (triggered by the TMS pulse), its contaminating the signal. In the recording, a peak at 90 ms approximately is observed and topography concentrated over anterior electrodes. Thus, blinks are origin and time-locked. Its removal has minimal effect in the TMS-evoked activity [11, 17]. 4.3.2.1.5 Auditory-evoked potential (AEP) and somatic sensation When the pulse is triggered a loud click (up to 120 dB) is produced, which activates the auditory system of the subject. This can be observed in the recording as peaks between 80 and 100 ms (after the pulse) over the fronto-central regions. To guarantee the elimination of the response, a masking sound with the same frequency spectrum as the TMS clicks (to minimize its power) must be used in addition to hearing protection. As the subject is already hearing a Pàg. 24 Report sound similar to the TMS-pulse, the pulse would be masked by it and there will not be a huge auditory-evoked potential. It is impossible to be completely confident that removal does not affect TEPs (TMS-evoked cortical potentials) [11, 17]. Furthermore, TMS-elicited scalp sensations produce evoked responses. It is very difficult to evaluate the degree of contribution of somatosensory signals due to TMS-activated muscles movements. However, researchers have concluded that it is not a major problem [11]. 4.3.2.1.6 Electrodes and noise-related artefacts When the electrode moves with respect to the electrolyte, the distribution of the charge at the interfaces is disturbed and a momentary change of the potential is noted. This displacement can be caused by muscle movements, accidental contact of the coil to the electrodes during stimulation or by electromagnetic forces. The electrode can also be polarized and it may take up to hundreds of milliseconds to return to the equilibrium potential after the pulse [11]. In addition, it is important to check that the impedance is always below 5 kΩ since the artefacts from electrode movement or polarization are smaller when the resistance is low. Furthermore, the contact between the TMS coil and the electrodes not only can “spoil” the recording but also heat the electrodes, with the risk of provoking skins burns [11]. Topographically, the noise-related artefacts are centred on a single electrode and do not display activity time-locked to the TMS pulse and typically account for outlier activity in individual channels [17]. It is important to bear in mind that even with state-of-the-art EEG systems, the recording of TMS-EEG is still a challenge. Therefore, it is necessary to systematically analyse the design, execution and data analysis of TMS-EEG recordings. 4.3.2.2. Typical pipeline for TMS-EEG acquisition and pre-processing 4.3.2.2.1 Acquisition Skin preparation is essential for a proper signal acquisition and it must be cleaned beforehand. The electrode impedance has to be kept below 5 kΩ by using enough amount of gel but avoiding short-circuits between close electrodes. The coil should be immobilized with respect to the head, without touching or indirectly affecting the electrodes during the measurement. To obtain a better and more precise stimulation, neuronavigation techniques such as MRI or fMRI of the subject’s head can be used. It is especially useful when the target area of the cortex is behaviourally silent: its stimulation does not provoke an observable response [11]. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 25 4.3.2.2.2 Protocols There are different protocols and types of pulse depending on what is going to be assessed (cortical excitability, plasticity or connectivity) [19]. Focusing on the type of pulse, it can be single-pulse; meaning that each trial or epoch will have just one TMS pulse (a test stimulus only, TS), or paired-pulse; where each trial will have two pulses, being the first pulse the conditioning stimulus (CS), which usually is set to a subthreshold intensity (low-intensity), and the second the test stimulus (TS), set to a suprathreshold intensity (high-intensity) [19-20]. The threshold intensity, and hence, what establishes if the intensity applied is either subthreshold or suprathreshold is the resting motor threshold (RMT), which is the minimum intensity needed to produce a motor-evoked potential (MEP) that exceeds a peak-to-peak amplitude (usually 50 µV) in at least half of the trials when the subject is at rest. Other thresholds can be used, such as the active motor threshold (AMT), defined as the minimum intensity needed to produce a MEP greater than 0.1 mV (in at least half of the trials) when the subject is performing an isometric contraction of the target muscle at about 10 to 30% of the maximum force. Generally, the subthreshold is around 60 to 80% of the RMT or 70 to 90% of the AMT. The paired-pulse TMS (ppTMS) can reflect cortical inhibition and facilitation at specific interstimulus intervals (ISIs). Regarding this interval, there is a stimulation paradigm of short or long-interval intracortical inhibition, SICI and LICI, respectively, which are also the names of the protocols. LICI occurs following ppTMS with an interstimulus interval between 50 and 200 ms and both pulses are delivered at a suprathreshold intensity. On the other hand, SICI occurs in response to a subthreshold conditioning stimulus followed by a suprathreshold stimulus with an ISI between 1 and 6 ms [19, 21]. Other paradigms exist, such as the short-latency afferent inhibition (SAI), the intracortical facilitation (ICF), or the cortical silent period (CSP), which will not be explained. Figure 3. Diagram of paired-pulse paradigm. Pàg. 32 Report Furthermore, the use of non-invasive neuromodulation may be more appropriate than invasive one, as they are generally well-tolerated and hold a considerable safety profile [2]. Up-to-date attempts have been made to eradicate and/or mitigate positive, negative and cognitive symptoms through neurostimulation. 4.4.2.1. Positive symptoms Most studies have focused on treating these symptoms, especially auditory hallucinations. To do so, low-frequency rTMS has been used to reduce hyper-activation present during speech processing, which happens in auditory hallucinations. There is a high degree of variability in the stimulation parameters, brain region targeted, the degree of treatment resistance, and duration of treatment [35]. Nonetheless, the majority of studies stimulate the left temporoparietal cortex. However, there are mixed results; while some articles yielded positive outcomes others do not. Some meta-analyses have been performed providing the same information [13, 39]. In addition, the stimulation has limited benefits for other psychotic symptoms [35]. Due to the variable results, investigators have attempted to examine means to enhance the efficacy and durability of the rTMS effects by applying high-frequency (instead of low), usage of deep TMS or stimulating other regions (Broca’s area, DLPFC, the middle temporal gyrus, Wernicke’s area, the superior temporal gyrus, etc.) obtaining mixed results [35, 39]. Likewise, a Cochrane review led to the same conclusions: even though some studies have been successful in reducing positive symptoms, some others have not found enough evidence. Furthermore, the quality of them was very low and the sample size small [40]. 4.4.2.2. Negative symptoms TMS is typically administered to enhance the “hypofrontality” of the dominant prefrontal cortex to improve negative symptoms [35]. Here again, some studies have a positive result when applying high-frequency TMS to SCZ patients, while others did not find any substantial improvement [13]. Higher pulse frequency, stronger stimulus intensity, longer treatment duration, younger age and shorter duration of illness were associated with better outcomes. Also, there was a trend suggesting a worsening of positive symptoms while trying to mitigate negative ones. Nevertheless, these are shortterm effects, from small trials and influenced by heterogeneity in patients and TMS administration. Moreover, sham stimulation also resulted in a significant within-group improvement [35]. These observations have led to the investigation of newer sites of stimulation, that have ended Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 33 in mixed and limited results [35]. Thus, opinions vary as to the effectiveness of high-frequency TMS in treating negative symptoms [13]. 4.4.2.3. Cognitive symptoms TMS had limited detrimental effects on cognition, and could perhaps be leveraged to enhance cognition when delivered under strictly monitored conditions [35]. Some of the studies treating negative symptoms have also presented improvement in depressive symptoms and neurocognitive deficits [13]. A controlled trial and a meta-analysis demonstrated significant improvement in working memory. Another one showed that cognition improved only in one of the seven domains assessed (verbal fluency). Similar improvements in overall neurocognitive performance were observed in a trial with a small sample. However, a large, multi-centre study found no benefits [35]. Pàg. 34 Report Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 35 5. METHODOLOGY 5.1. Signal acquisition and dataset Signals were acquired at the HCUV. They used a 64-channel EEG amplifier (BrainVision, actiCHamp 64) following the 10-10 international system. Sixty-one channels of the cap were used (see Figure 5) and the remaining 3 were used to record the VEOG, HEOG (electrooculography vertical and horizontal, respectively) and EMG (electromyography). The electrode impedance was kept below 5kΩ and the frequency sample was 25000 Hz. The TMS machine was a butterfly coil of MagPro X100 of MagVenture, specifically the model MCF-B70. The signals were recorded with Brain-Vision Recorder programme. Figure 5. EEG system for recording the signals. The electrodes in orange were the ones used. Figure 6. Butterfly TMS-coil used in the recording. Pág. 36 Report The protocols employed for TMS were LICI and SICI with paired-pulses (PP) and single pulses (SP) (more information about the paradigms in Section 4.3.2.2.2). For the single pulse, they used an intensity 120% of the RMT. For the paired-pulse depending on the protocol, LICI or SICI, they used 120% RMT for the conditioning and test stimulus or 80% for the conditioning stimulus and 120% RMT for the test stimulus, respectively (see Figure 7). The interstimulus interval also varied between LICI and SICI. For the former, ISI had a value of 100 ms and for the latter, a value of 4 ms. In both protocols, SICI and LICI, the intervals between pulses (independently if they are single or paired) are semi-randomized between 5 and 7 seconds in order to prevent the anticipation of the next pulse. Figure 7. Protocols followed for the acquisition. A) Top: SICI PP. Bottom: LICI PP. B) SP. The first step of the acquisition is to determine the RMT (resting motor threshold) of the subject. It is determined through the relative frequency method [41]; defined as the minimum intensity needed to evoke a motor potential of an amplitude greater than 50 µV peak-to-peak in at least 5 pulses of a series of 10 magnetic pulses. For its determination, the electrodes were placed in the contralateral hand (specifically at the first dorsal interosseous muscle) to the stimulated hemisphere (left hemisphere if the subject was right-handed and right hemisphere if the subject was left-handed) and the primary motor cortex was stimulated. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 37 Figure 8. A) Right hand with the first dorsal interosseous muscle pointed with an arrow. B) Brain with the dorsolateral prefrontal cortex highlighted in blue and pointed with an arrow. Once the RMT is defined (as a percentage of the intensity) the LICI and SICI protocols are applied, along with the SHAM condition (out of the scope of this project). The TMS-pulse is triggered between the F3 and F5 electrodes, which offers a more precise stimulation of the left DLPFC and a low inter-subject variability in absence of MRI-guided neuronavigation equipment [42-43]. Figure 9. Diagram of the TMS-coil placed between F3 and F5 electrodes to trigger the pulse. The database for the project consists on 16 patients and 15 healthy controls. Six patients had had only one episode of schizophrenia (first-episode patients) and the others were chronic patients. Demographic data are summarized in the table below. Pág. 38 Report Controls Patients Sex Male 11 11 Female 18 12 Age Mean 25.6 31.8 STD 10.5 10.5 Years of study Mean 14.6 13.9 STD 2.2 3.1 RMT Mean 64.7 66.7 STD 8.8 10.3 Table 1. Demographic information of the database included on the study. At the time of the acquisition, only two recordings were made: LICI and SICI. For each one, there were single or paired-pulses triggered randomly throughout the recording. Thus, the distinction between PP and SP was done later in the pre-processing. After this differentiation, four different recordings were available for each subject: two single-pulse TMS-EEG signals (noted as LICI SP or SICI SP, even though both of them are the same), paired-pulse LICI TMS-EEG signal (LICI PP) and paired-pulse SICI TMS-EEG signal (SICI PP). 5.2. Algorithm/Pipeline The toolbox used throughout this pipeline is FieldTrip, a collaborative software tool based on MATLAB, which holds functions for the pre-processing and processing of TMS-EEG signals. One of the good points of Fieldtrip is that (the) data is organised in a structure, containing different fields such as the sample frequency, the labels of the channels, the trials, etc. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 39 Figure 10. Example of how the data is organised. Roughly, the algorithm follows more or less the structure described in Section 4.3.2.2 (Typical pipeline for TMS-EEG acquisition and pre-processing), which is visually shown below. Figure 11. Flowchart of the TMS-EEG signal processing. Pág. 40 Report 5.2.1. Pre-processing 5.2.1.1. Epoching (define trials) The first step, once the signal is loaded, is to define the trials. Raw data is either one following the LICI or the SICI protocol and it includes both single-pulse and paired-pulse TMS-EEG signals, as commented above. In each recording there are 150 trials or epochs (counting both SP and PP). Thus, there are 225 pulses of TMS throughout the signal (75 trials of SP plus 75 trials of PP, which are 150 pulses for PP). For the purpose of defining the aforementioned trials, the name of the event (the trigger of the pulse) has to be found, which in this case is marked with the label “S15”. Then, the data between 1 second before and after the event is selected. Once it is located, it is necessary to distinguish between PP or SP, taking into account the distance between two consecutive events, the ISI. If the time between the two pulses is less than 0.4 seconds, it is considered paired-pulse, otherwise it is considered single pulse and labelled as such (0 for single-pulse and 1 for paired-pulse). Finally, each trial has a length of 2 seconds of data (50,000 samples) with the TMS pulse(s) centred. Figure 12. Raw TMS-EEG signal of the LICI PP paradigm. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 41 Figure 13. Raw TMS-EEG signal of the SICI PP paradigm. Left: entire signal. Right: Zoom in of the signal from - 0.06s to 0.06 s. Figure 14. Raw TMS-EEG signal of the LICI SP paradigm. 5.2.1.2. Artefact exclusion: removal of ringing artefact The following step is to delete the part of the signal that holds the TMS pulse. Depending on the TMS protocol and type of pulse (SP, LICI PP or SICI PP), different amount of data is Pág. 48 Report Figure 23. Example of bad trial that had to be removed before ICA application. In three different subjects, the TMS machine did not work properly in one trial of each subject, triggering more than one or two pulses, depending on the type of pulse signal. These trials were detected and remove before ICA application. Figure 24. Example of a TMS-EEG signal with several TMS pulses due to a malfunction of the TMS machine. Finally, in one subject, a channel was particularly noisy in all the trials, affecting too many ICs. The channel was detected and deleted before the application of ICA. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 49 Figure 25. Signals of the bad channel from different trials of the same subject. Therefore, ICA application is not only useful (and needed) to select the components necessary to reconstruct the signal, but also it can be a revision process of these initial steps of the preprocessing. TMS-EEG is a novel field of research and their pre-processing guidelines are not completely described. Therefore, in this moment a semi-automatic procedure would be the best option. 5.2.1.6. Signal reconstruction As soon as the component selection is finished, the next step is to reconstruct the signal with the ICs that hold brain signal information. To do so, another FieldTrip function is used, in which the user only have to introduce the index of the components to not include in the reconstruction. Then, the signal is band-pass filtered between 0.5 Hz and 70 Hz and downsampled to 5000 Hz in order to reduce computational time in the following steps. 5.2.1.7. Bad channels and bad trials removal Now, the signal is clean enough to decide which trials to keep. Different common algorithms of trial rejection have been implemented in order to determine which one works better. For the purpose of confirming that the automatic selection (the algorithm) works properly, a manual trial selection was performed for a few recordings. This selection was, once again, made by three experience researchers. The trials that were shared by at least two of them were classified as bad. Moreover, there was a ‘doubts’ section for each researcher. If the trial appeared in two ‘doubts’ section and the other researcher marked it as bad, the trial was classified as bad too. Pág. 50 Report Even though this step is typically easily implemented, the signals processed are not typicalEEG as the vast majority of artefacts has been removed by ICA. Next, it includes a description of the performed process. First, a magnitude threshold was implemented, taking into account the mean and the standard deviation. Nonetheless, a lot of “good” trials were selected as bad, since the threshold had very low magnitude values. Consulting the literature, the z-score used in Wu et al., [25] was reproduced. Two different thresholds for this measure were implemented: 2.5 and 3 value of z-score. The number of trials detect as bad was reduced, however they did not match with the ones determined manually. Then, the entropy of the signal was used as a parameter, following the code developed by Tost et al. [45]. Yet again, the trials selected as bas were not the same as the ones detected manually. Lastly, the joint probability and the kurtosis, both being statistical measures, were used to create a threshold. Even though some of the trials selected manually were included, the algorithms did not match the expectations. Given the bad results, a new strategy was defined and implemented. 5.2.1.7.1 Bad channels detection First of all, it was observed that the activity of some channels were noisier than the rest of the channels. Then, it was decided to select previously the bad channels. To do so, the kurtosis of each channel in each trial is computed, obtaining a matrix with a size Nchannels x Ntrials. Then, this matrix is sorted from the lowest to the greatest value. Of all the data, just the 80% of it is used to compute a threshold free of outliers. Therefore the 10% of the lowest values and the 10% of the greater values were not used for the threshold calculation. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 51 Figure 26. Simple diagram showing the selection of data for the threshold computation. A threshold for each trial is calculated with the following equation, taken into account the mean and the standard deviation. This threshold for a specific trial indicates the maximum value “allowed” for each channel in this trial. 𝑡ℎ𝑡𝑟𝑖𝑎𝑙 = 𝑚𝑒𝑎𝑛(𝑣𝑎𝑙𝑢𝑒𝑠_𝑘𝑢𝑟𝑡𝑜𝑠𝑖𝑠𝑐ℎ,𝑡𝑟𝑖𝑎𝑙𝑠) + 5 ∗ 𝑠𝑡𝑑(𝑣𝑎𝑙𝑢𝑒𝑠_𝑘𝑢𝑟𝑡𝑜𝑠𝑖𝑠𝑐ℎ,𝑡𝑟𝑖𝑎𝑙𝑠) Equation 1 Nonetheless, if a channel has a great value for a great number of trials, it perhaps would not be detected as bad (because the threshold for those trials would be great as well; although the greatest values have already been removed by using just the 80% of the data). To avoid this from happening, a common threshold is computed by calculating the median of all the thresholds, obtaining one threshold for subject. 𝑡ℎ𝑐𝑜𝑚𝑚𝑜𝑛 = 𝑚𝑒𝑑𝑖𝑎𝑛(𝑡ℎ𝑡𝑟𝑖𝑎𝑙) Equation 2 Finally, each value of kurtosis (each channel for each trial) is compared to the common threshold. If it is higher than the threshold, the channel corresponding to the value is classified as bad. If the channel is classified as bad in more than 25% of the trials, the channel is deleted and interpolated. For the interpolation, is important to bear in mind that the neighbours’ channels have to be good or otherwise different artefacts will be included in the new interpolated channel. Thus, once the bad channels and their neighbour channels are detected, if a neighbour channel is also a bad channel, the channel is deleted and filled with NaNs. Then, all the bad channels are interpolated. As an example, in the figure below a trial with 5 bad channels is displayed (blue, orange, purple, blue and magenta ones for subplots ‘Channels 1 to 10’, ‘Channels 11 to 20’, ‘Channels Pág. 52 Report 31 to 40’ and ‘Channels 51 to 62’, respectively). The interpolated channels are shown in Figure 28. Figure 27. Trial with bad channels. Figure 28. Trial with bad channels interpolated. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 53 5.2.1.7.2 Bad trials detection Once the data has no bad channels, the trial rejection is performed. Here, two different thresholds have been employed: a maximum threshold and a range threshold. Both of them consider the magnitude of the signal. Following the same procedure as the bad channel detection, the 80% of the data is used. Therefore, the mean and the standard deviation of each channel for each trial is computed and sorted, and then, the 80% of them in the middle are selected. Lastly, the two different thresholds are computed, following the equation below: 𝑡ℎ_𝑏𝑎𝑑_𝑡𝑟𝑖𝑎𝑙𝑐ℎ = 𝑚𝑒𝑎𝑛(𝑚𝑒𝑎𝑛_𝑣𝑎𝑙𝑢𝑒𝑠𝑐ℎ,𝑡𝑟𝑖𝑎𝑙𝑠) + 𝑘 ∗ 𝑚𝑒𝑎𝑛(𝑠𝑡𝑑𝑣𝑎𝑙𝑢𝑒𝑠𝑐ℎ,𝑡𝑟𝑖𝑎𝑙𝑠) Equation 3 For the maximum threshold, the k takes a value of 7 and for the range threshold, a value of 5. When one channel in the trial surpasses, in absolute value, the maximum threshold, the trial is selected as ‘bad trial’. Nevertheless, if a channel has a value between the range threshold and maximum threshold, the trial is selected as ‘possible bad trial’. Subsequently, these channels (the ones that are the responsible for the ‘possible bad trial’ label) are counted for each trial. If a trial has more than 10% of the channels (6 channels) in this range (between maximum and range thresholds), the trial is finally labelled as ‘bad’. All the trials selected by this algorithm match with the ones selected manually. Subject Number of channels that surpass the maximum threshold (bad trial) Number of channels that are in between the range threshold and the maximum (possible bad) Trial rejected? 1 1 0 Yes 2 0 5 No 3 2 4 Yes 4 0 13 Yes Table 2. Example of bad trials and possible bad trials for different subjects and its decision whether or not the trial is finally rejected. Finally, the ‘bad’ trials are removed from the data and the signals are completely clean. Some examples of bad and good trials are displayed below. Pág. 54 Report Figure 29. Example of bad trial. Figure 30. Example of bad trial. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 55 Figure 31. Example of good trial. Different clean signals for various channels are shown in Section 6.1. 5.2.2. Processing 5.2.2.1. Characterization Once the signals are clean, they are processed in order to characterize them. Since one of the objectives is to identify the common TMS-evoked potential (TEP) peaks, it is needed to average the signal across trials and subjects because those aforementioned deflections (TEPs) are not easily seen in single trials or averaging just a few. Nevertheless, before doing the averaging is important to adjust the length of the LICI PP signal (which is the signal that has the two parts of the trials concatenated instead of interpolated, see 5.2.1.2) with the LICI SP signal, as a comparison between paired-pulse and single-pulse signals is going to be performed later on. For the purpose of having the same length in the signals from LICI protocol, the first sample that was eliminated in the pre-processing is found in the new signal, as the frequency sample has changed. Then, a vector with NaNs that has the same length as the samples deleted in Pág. 56 Report 5.2.1.2 (removal of ringing artefact) is inserted just after the aforementioned sample (i.e, the samples deleted before are substituted by NaNs values). Doing so, the LICI PP signal has an equal length to LICI SP. Furthermore, both are aligned in time, meaning that the signals have the time 0 at the same sample. However, the signals of the SICI PP and SICI SP signals are not aligned in time. There is a difference of 13 samples between the time 0 for both signals. Thus, in order to aligned them, 13 samples are removed at the begging or the end of the signal, depending on its type of pulse (PP or SP, respectively). Figure 32. Drawing of the process to aligned the SICI SP and SICI PP signals. When all signals have the same number of samples and are aligned in time, an averaging across trials is done for each subject, obtaining one signal for each subject, protocol and type of pulse. As an example, subject 1 will have 4 TMS-EEG signals, one for each protocol and type of pulse (LICI PP, LICI SP, SICI PP and SICI SP). Then, a grand average is performed averaging the signals across subjects. Finally, a unique signal for each protocol and type of pulse is obtained and the common TEP peaks can be found. Temporal windows where the peaks are expected are predefined so the peaks are searched on those windows. Then, the aforementioned peaks are visually inspected and a narrower and more precise windows are defined to obtain the peaks in the signals of every Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 57 subject. In particular, two different set of windows where defined: one for the SICI protocol and another for the LICI protocol taking into account the SP signal. For the purpose of comparing both type of pulses, each SP signal is subtracted from its analogue PP. Another measure to compare single-pulse and paired-pulse signals is computed. Following the procedure done in Cash et al. [46], a modulation ratio is computed. This consists of the division of the TEP’s amplitude of the PP signal by the TEP’s amplitude of the SP signal. 𝑚𝑜𝑑𝑢𝑙𝑎𝑡𝑖𝑜𝑛 𝑟𝑎𝑡𝑖𝑜 = 𝑇𝐸𝑃 𝑎𝑚𝑝𝑙𝑖𝑡𝑢𝑑𝑒 𝑇𝑀𝑆 − 𝐸𝐸𝐺 𝑃𝑃 𝑇𝐸𝑃 𝑎𝑚𝑝𝑙𝑖𝑡𝑢𝑑𝑒 𝑇𝑀𝑆 − 𝐸𝐸𝐺 𝑆𝑃 Equation 4 More specifically, the TEP amplitude is the mean amplitude of the signal in the time windows defined after the location of the peaks in the grand averaged signals. TEP amplitude were obtained for all channels, however, it could be interested to group the TEP activity in a region of interest (ROI). In this work, it is proposed to use a ROI that includes the channels on the left DLPFC cortex, which are: FP1, AF7, AF3, F7, F5, F3, F1, FC5, FC3, FC1 [46]. The ROI can be seen in Figure 33. Figure 33. Channel distribution around the scalp with the ROI identified. The algorithm developed can be found in a GitHub repository. The link to the repository is in Annex 2 of the Annex document. Pág. 64 Report Figure 43. Signal averaged for all the subjects for LICI PP with the TEPs marked with vertical lines. One of the objectives of the project was to locate the TEPs for the different protocols (SICI and LICI) and type of pulses (SP and PP). Some main TEP components have been defined in the literature: P25, N40, P60, N100, P185 or P200 [17, 19, 20, 36]. Table 3 depicts the time latency found for each signal (in ms): Protocol\ Name of the peak P25 N30 P50 N100 P140 N160 P200 SICI SP 24.6 32 50 101.8 142.2 159.2 201.4 SICI PP 18.6 27 39 96.8 123.4 151 207 LICI SP 24.2 34.6 48 99.4 137.8 163 211.2 LICI PP - - 46 71.6 110.6 169.2 214.6 Table 3. Latencies of the peaks found for each protocol and type of pulses. The peaks found are: P25, N30, P50, N100, P140, N160 and P200, which relatively match with the peaks described in the literature (P25, N40, P60, N100, P185 or P200, depending on the article). However, the N40 and P60 peaks appear a few milliseconds before. Moreover, in some references, the last 3 peaks (P140, N160 and P200) are evaluated together, which will Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 65 be P185. Nonetheless, in this project they have been considered separately since the differences in amplitude are noticeable. Comparing both types of pulses for each protocol, it seems that the PP signal is equivalent to the SP signal displaced to the left, as can be seen in both the figures and Table 3, observing the latencies between types of pulses for each protocol. This behaviour may be due to the fact that the cerebral cortex is more excited for the paired-pulse paradigm. In PP signals, the first pulse excites the cortex, the TMS-evoked potentials start to form and then a second pulse is triggered, exciting even more the cortex and advancing the aforementioned potentials. Following this train of thoughts, it is normal that for the LICI PP signal the appearance of the TEPs are even earlier. PP response is a composition of the neural response to the first TMS-pulse and the second one. In SICI protocol, the ISI is low (4 ms), hence as Figure 42 shows, the TEP components are very similar to SICI SP ones. Nevertheless, in LICI protocol, the interstimulus interval is higher (100 ms) and then, the neural response could be viewed as a superposition of the effect to both TMS pulses. In order to avoid this effect and to study only the influence of the first pulse (CS; the SP signal would be just TS, test stimulus), Premoli et al.,[47] corrected the PP signal by subtracting the SP signal from the PP signal aligned to the first pulse (CS). Thus, the PP signal has a time equal to 0 in the first pulse and not in the second one, which is the case of this project. However, Cash et al., [46] decided not to do the subtraction since they state that changes in the amplitude of TEPs components are unrelated to the influence of CS alone, and this is what has been followed in the project. Future work will assess the procedure developed by Premoli et al. [47]. 6.2.2. Comparison between type of subjects and pulse type In the previous section, a grand average was performed for all subjects. However, the database contains neurological data form SCZ patients and from healthy controls (HC). Figure 44 and Figure 45 show the comparative between the grand average of the subjects that belong to each group. Pág. 66 Report Figure 44. Grand average for both type of subjects for SICI protocol and both type of pulses (SP and PP). Figure 45. Grand average for both type of subjects for LICI protocol and both type of pulses (SP and PP). Observing the Figure 44, it can be seen that the morphology of different pulses for SICI protocol is quite similar for the same group of subjects. Thus, the SICI SP signal is similar to the SICI PP signal for boh, schizophrenic patients as well as the same signals for healthy controls. Besides, the signals for each group are quite similar between them. Nonetheless, the P140 and the N160 peaks are more pronounced in the control group, taking more positive values for P140 TEP and less positive for N160 TEP. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 67 Regarding the figure of LICI protocol, the TEPs for the PP pulse in both groups appear earlier, as has been stated in the previous results. Here again, the N160 peak is not very pronounced in the LICI SP signal for patients and the difference of amplitude between peaks is not huge. However, the amplitude of the TMS-evoked potentials for the PP signal is lower than the amplitude for the SP signal for the controls. Equally to SICI signals, the obtained TEPs for LICI PP and LICI SP are broadly similar between diagnostic groups. According to the literature, the amplitude of the TEPs following the paired-pulse should be lower than the amplitude of the TEPs that follows a single-pulse (for each protocol and in a healthy subject). This is expected because the first pulse of the paired-pulse activates inhibitory-type receptors (concretely, GABA-A receptors for SICI protocol and GABA-B for LICI protocol). However, as the inhibitory mechanisms are altered in SCZ, what is expected for patients is a less difference of amplitudes of TEPs. This has been proven for the SICI protocol but there are disparate results for LICI [20, 46, 47, 48]. To sum up, what is expected for each protocol is a similar morphology of the signals for each group but with different magnitude between PP and SP; with greater differences in the control group than in the patient group since the inhibitory mechanisms are well activated for the former. In these results, the difference in amplitude taking into account both types of pulses are clearer seen in LICI than in SICI since for the latter the only difference in magnitude is in the earlier TEPs (P50). In the next section, the aforementioned difference between SP and PP pulses are deelpy analysed. 6.3. Single-pulse signal vs paired-pulse signal 6.3.1. Temporal signal To assess the inhibition response on different subjects, it is common to compute the difference between SP and PP. Figure 46 and Figure 47 show the subtraction of SP data minus PP data for both protocols (SICI and LICI) and for both diagnostics (SCZ patients and HC). Pág. 68 Report Figure 46. Signals obtained for subtracting SICI PP signal to SICI SP signal for controls and patients. Figure 47. Signals obtained for subtracting LICI PP signal to LICI SP signal for controls and patients. Observing Figure 46, it is seen that the amplitude of both signals, one for the HC and other for SCZ patients, is closer to 0, meaning that there are few differences between single-pulse and paired-pulse SICI. This, in return means that the level of inhibition is more or less the same for both type of pulses. Nevertheless, HC group shows greater variability at the initial response (few milliseconds after the stimulus). In this case, controls’ difference takes values farther from 0, which indicates that there is a change in amplitude, in the milliseconds closer to the stimulus Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 69 (as stated in the previous section). It, in return, indicates more differences of inhibition between both types of pulses in the TEPs nearer to the stimulus. Moreover, the inhibition for this TEP (P50) is greater in the HC than in the SCZ patients. Regarding LICI protocol (Figure 47), the difference of the level of inhibition between SP and PP is larger than SICI What is expected is to obtain positive values since, theoretically, SP should have a greater amplitude than PP. This positiveness is observed around 150 ms to 250 ms after the pulse, meaning that the inhibition applying a paired-pulse is greater than the one obtained after a single-pulse. However, both signals (HC and SCZ patients) take similar values, so the inhibition is more or less the same for both groups. 6.3.2. Spatial distribution of TEPs In order to compare the TEP components a tinier time windows were implemented to detect the averaged TEP in the defined time window. The average signal of every type of subject, healthy controls and schizophrenic patients, were performed. These time windows were defined based on the signals of SICI SP and LICI SP, which are the references. Figure 48. Signal averaged for all subjects for SICI SP with the time windows marked. The exact values of the windows are the following. Dark blue: 19-29 ms. Dark green: 28-37 ms. Red: 40-60 ms. Purple: 88-112 ms. Yellow: 120-150 ms. Black: 185-226 ms. Light blue: 120-226 ms. Pink: 150-183 ms. Pág. 70 Report Figure 49. Signal averaged for all subjects for LICI SP with the time windows marked. The exact values of the windows are the following. Dark blue: 19-29 ms. Dark green: 29-38 ms. Red: 40-60 ms. Purple: 86-110 ms. Yellow: 124-150 ms. Black: 188-227 ms. Light blue: 124-227 ms. Pink: 150-176 ms. To see the activation differences in the scalp, topoplots of the signal obtained from the subtraction on the second time windows are displayed. Figure 50. A) Topoplot and temporal signal for both SP-PP SICI and SP-PP LICI for the first time window. B) Temporal signal for SICI SP and LICI SP for both group of subjects for the first time window. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 71 Figure 51. A) Topoplot and temporal signal for both SP-PP SICI and SP-PP LICI for the second time window. B) Temporal signal for SICI SP and LICI SP for both group of subjects for the second time window. Figure 52. A) Topoplot and temporal signal for both SP-PP SICI and SP-PP LICI for the third time window. B) Temporal signal for SICI SP and LICI SP for both group of subjects for the third time window. Pág. 72 Report Figure 53. A) Topoplot and temporal signal for both SP-PP SICI and SP-PP LICI for the fourth time window. B) Temporal signal for SICI SP and LICI SP for both group of subjects for the fourth time window. Figure 54. A) Topoplot and temporal signal for both SP-PP SICI and SP-PP LICI for the fifth time window. B) Temporal signal for SICI SP and LICI SP for both group of subjects for the fifth time window. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 73 Figure 55. A) Topoplot and temporal signal for both SP-PP SICI and SP-PP LICI for the sixth time window. B) Temporal signal for SICI SP and LICI SP for both group of subjects for the sixth time window. Figure 56. A) Topoplot and temporal signal for both SP-PP SICI and SP-PP LICI for the seventh time window. B) Temporal signal for SICI SP and LICI SP for both group of subjects for the seventh time window. Pág. 80 Report 10. ECONOMICAL ANALYSIS In this chapter, the budget for the project is detailed below. Personal costs Task Hours Cost (€/h) Total (€) Student Research 50 25 1250 Programming 600 25 15000 Writing 120 25 3000 Meetings 30 25 750 Director Work review 100 40 4000 Meetings 30 40 1200 Co-director Work review 30 40 1200 Meetings 10 40 400 BIOART Professors Meetings 8 40 320 SUCEDE clinical collaborators Meetings 8 40 320 TOTAL 27440 Table 5. Staff budget. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 81 Software costs Units Total (€) MATLAB R2021b (Student license) 1 35 FieldTrip 1 0 Office 365 Home 1 69 TOTAL 104 Table 6. Software budget. Electricity costs Months Cost(€/month) Total (€) Electricity 8 80 640 Table 7. Electricity budget. Budget Cost (€) Personal Costs 27440 Software Costs 104 Electricity Costs 640 TOTAL 28184 Table 8. Budget's summary with the total sum. Table 9. Budget's summary with total sum. Pág. 82 Report Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 83 CONCLUSIONS The main objective of this project is the development of a semi-automatic algorithm that enables the possibility to pre-process raw TMS-EEG signals ⎯obtaining a sufficiently clean signal for its further processing⎯ and to characterize the signal by identifying the common TEPs present in the literature. Then, a comparison between type of pulses (single or paired) and between subjects (schizophrenic patients and healthy controls) has been made taken into account the aforementioned TEPs. • Pre-processing design: Regarding the pre-processing stage, it has fulfilled the expectations; developing an algorithm that has as output a good clean signal. The current proposal could be considered as semi-automatic, since some steps require the researcher’s intervention. In particular, the manual selection of the independent components (the output of the ICA application) takes up a lot of time. This is due to the fact that the opinion of the three experts has been taken into account, hence the total time required for this includes the time needed for an individual selection and the time for a common selection. Another unexpected issue during the development of the pre-processing algorithm has been the trial and channel rejection. Initially, we started using a semi-automatic procedure. Nevertheless, the final algorithm allows an automatic rejection of both, artefactuated channels and trials, without any user intervention. Taking all this into account, it can be concluded that the objective of having a good cleaning of the data, and hence, the raw TMS-EEG signal, has been achieved; as the final signals (before the characterization) were not noisy nor artefactuated. • Characterization of TEP data: Concerning the process and characterization of the TMS-EEG signals, the different TMSevoked potentials have been correctly identified. As results section shows, the TEP components obtained match those found in previous studies. For the purpose of comparing the differences caused by the type of pulses for each protocol, the PP signal has been subtracted from the SP signal. For the SICI protocol, the results are somewhat different from those expected, as there were just slight differences in amplitude between both pulses. On the other hand, for the LICI protocol, the expected Pág. 84 Report results have been obtained, seeing a smaller amplitude of the TEPs in PP signal than in SP. The same has been verified with the topographical figures, as well as with the modulation ratios. Regarding the diagnostic of the subjects included in the study, as it could be expected healthy controls showed more inhibition than schizophrenic patients. This was observed for some of the TEPs components and it fits with the hypothesis that establishes an inhibition dysfunction related with the schizophrenia disorder. Finally, a spatial analysis was performed to localise the distribution of TEPs. The TMSevoked potentials have been located and the comparison between type of pulses and subjects has been performed. In this case, the comparison with previous results is more difficult since there are few studies that have included topographical results. Although some of the results were not exactly the expected, it may be because of the sample size since they show a tendency toward the results obtained in other studies. Besides, with the continuous growth of the database (new TMS-EEG signals are being processed), it is expected that the results will meet those of the literature. The pre-processing and processing of TMS-EEG signals is still a poorly known field and it requires great control of the different steps of the data analysis, such as filtering and epoching among others. In particular, a good artefact removal and a precise selection of the independent components since a bad one might delete crucial data or the reconstructed signal might be too noisy. In this project, this entire procedure has been addressed starting from raw data and ending up obtaining a good characterization of it. Throughout the process, every step has been revised so it was robust for all the data. Therefore, the result of the project is a robust algorithm that will be very useful for its application in new subjects or others TMS-EEG databases. Finally, form a personal and academic point of view, with the development of the project I have been able to refine and widen my previous knowledge of signal processing. I understood better the different artefacts one might encounter in a TMS-EEG signal as well as I gained more experience in the interpretation of various plots and figures. Moreover, my skills with MATLAB programming have improved and I learnt how to use FieldTrip. Thus, the development of the project has enriched me as a researcher. Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 85 Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pàg. 87 Acknowledgements First of all, I would like to thank very much all the help, the guidance and the support I received from the director of this project, Dr. Alejandro Bachiller Matarranz, as well as the one received from the co-director, Dr. Joan Francesc Alonso López. I also would like to extend that appreciation to all the members of the BIOART group, who has given me advice for different parts of the project. This project would have not been possible without the help and the clinical view of Inés Fernández and Vicente Molina, staff of the Hosptial Clínico Universitario de Valladolid and members of the SUCEDE group. Finally, I want to thank my family and friends, with whom I have been able to disconnect from the stress of work and university. Pág. 88 Report Improving the quality of combined EEG-TMS neural recordings: artifact removal and time analysis Pág. 89 Bibliography References [1] P. J. Harrison, “Neuropathology of schizophrenia,” Psychiatry, vol. 7, no. 10, pp. 421– 424, 2008. [2] H. Edemann-Callesen, C. Winter, and R. Hadar, “Using cortical non-invasive neuromodulation as a potential preventive treatment in schizophrenia - A review,” Brain Stimul., vol. 14, no. 3, pp. 643–651, 2021. [3] A. Schmitt, A. Hasan, O. Gruber, and P. Falkai, “Schizophrenia as a disorder of disconnectivity,” Eur. Arch. Psychiatry Clin. Neurosci., vol. 261, no. SUPPL. 2, pp. 150– 154, 2011. [4] S. Iritani, “Neuropathology of schizophrenia: A mini review,” Neuropathology, vol. 27, no. 6, pp. 604–608, 2007. [5] A. D. Boes, M. S. Kelly, N. T. Trapp, A. P. Stern, D. Z. Press, and A. Pascual-Leone, “Noninvasive brain stimulation: Challenges and opportunities for a new clinical specialty,” J. Neuropsychiatry Clin. Neurosci., vol. 30, no. 3, pp. 173–179, 2018. [6] L. Gomez Fernandez, “Estimulación cerebral no invasiva en las enfermedades neurológicas y psiquiátricas,” Rev. Cuba. Neurol. y Neurocir., vol. 8, no. 2, pp. 1–17, 2019. [7] S. L. Liew, E. Santarnecchi, E. R. Buch, and L. G. Cohen, “Non-invasive brain stimulation in neurorehabilitation: Local and distant effects for motor recovery,” Front. Hum. Neurosci., vol. 8, no. JUNE, pp. 1–15, 2014. [8] T. Wagner, A. Valero-Cabre, and A. Pascual-Leone, “Noninvasive human brain stimulation,” Annu. Rev. Biomed. Eng., vol. 9, pp. 527–565, 2007. [9] J. Vosskuhl, D. Strüber, and C. S. Herrmann, “Non-invasive Brain Stimulation: A Paradigm Shift in Understanding Brain Oscillations,” Front. Hum. Neurosci., vol. 12, no. May, pp. 1–19, 2018. [10] J. D. Kroptov, “Transcranial Magnetic Stimulation,” in Functional Nueromarkers for Psychiatry, J. D. Kroptov, Ed. Academic Press, 2016, pp. 281–283. [11] R. J. Ilmoniemi and D. Kičić, “Methodology for combined TMS and EEG,” Brain Topogr., vol. 22, no. 4, pp. 233–248, 2010. [12] A. Pascual-Leone and J. M. Tormos-Muñoz, “Estimulación magnética transcraneal: fundamentos y potencial de modulación de redes neuronales específicas,” Rev. Neurol., vol. 46 Suppl 1, pp. S3–S10, 2008. [13] J. C. Cole, C. G. Bernacki, A. Helmer, N. Pinninti, and J. P. O’Reardon, “Efficacy of