Introduction

Evoked potentials (EPs), inferred from electroencephalography (EEG) by means of trial averaging, are a common tool to investigate the relationship between neural activity, human cognition, and clinical disorders1,2,3. EPs provide a non-invasive and direct measurement of neural activity with high temporal resolution. The EPs elicited by cortical stimulation—either delivered invasively through electrical stimulation (ES), or non-invasively via transcranial magnetic stimulation (TMS)—are commonly used for functional mapping of brain networks4,5,6,7, the diagnosis of brain dysfunctions8,9,10, and the detection of consciousness in behaviorally unresponsive patients11,12,13,14,15,16. Moreover, EPs elicited by cortical stimulation speak directly to a central concern of systems neuroscience: to what extent does neural activity propagate via cortico-cortical and/or via cortico-subcortico-cortical projections? Understanding the contribution of distinct circuits to EPs is important to properly interpret experimental and clinical results.

TMS non-invasively stimulates the brain by electromagnetically inducing current flow in the cortical tissue underneath the TMS coil resting against the scalp. Despite its widespread use over 30 years of research and clinical practice17,18,19, the responses evoked by TMS have been a source of debate due to the potential contribution of peripherally induced somatosensory and auditory components of the TMS stimulation (i.e., feeling and hearing the click)20. Against this hypothesis, single neurons recordings in awake non-human primates demonstrated that TMS can induce the same stereotyped triphasic spiking pattern evoked by ES and reported in different species21,22,23,24,25,26. These responses to ES are intrinsically free of peripheral confounds and can reverberate through the cortical network for several hundreds of milliseconds after stimulus delivery27. Along the same lines, a more recent study in humans showed that TMS-EPs can propagate in the network for hundreds of milliseconds, and that such responses highly resemble the EPs generated by delivering ES to the same area28. These findings support the notion that TMS responses are not due to peripheral activations, but rather due to recurrent synaptic interactions across different regions29. Indeed, ES directly excites nearby neurons that cause secondary responses in connected neurons7,30. Responses to cortical ES are commonly used to define cortical connectivity, to the point that they are also known as cortico-cortical evoked potentials4,5,6,7, implicitly ruling out contributions from subcortical structures. In contrast, we previously proposed that cortico-thalamo-cortical interactions drive long-lasting EEG-EPs21 in mice. Indeed, thalamocortical neurons receive major inputs from the neocortex and project back to it31,32,33. As such, thalamocortical neurons are strategically positioned to relay information between cortical areas and they could be considered a major generator of the cortical postsynaptic potentials captured by the EEG34,35. Given the challenge of recording thalamic single neurons in humans, any thalamic contributions to EPs are usually indirectly inferred36 and remain largely unexplored.

Here we show that, despite the differences between species (humans versus mice) and between magnetic and electrical pulses, the late responses evoked by cortical stimulation are remarkably similar and likewise modulated by the state of the targeted cortico-thalamic network, defined here as either active or resting state. By combining causal manipulation via optogenetic intervention with multi-scale recordings (single units, LFP and EEG) in mice, and modeling of the cortico-thalamic circuits, we demonstrate that the late component in the EPs following direct cortical stimulation depends on the thalamus. We demonstrate that a common mechanism, involving thalamic intrinsic currents and cortical and thalamic GABAergic neurons, shapes the late responses to cortical stimulation in both humans and mice.

Results

Multiscale late EP responses elicited by cortical stimulation are modulated by behavioral state in humans and mice

We start by describing the basic cortical EP in humans and its modulation by behavioral state. EEG responses evoked by single pulse TMS delivered over the left premotor cortex were recorded in a group of 12 healthy volunteers (7 males and 5 females, age = 32.6 ± 11.2 mean ± STD, 2 subjects were left-handed) during rest and active conditions. For the baseline rest condition, subjects were asked to stay awake while relaxing their hands; for the active condition, subjects intermittently squeezed a rubber ball with the right hand. For these two conditions, we evaluated the early EP component in the time window 3–50 ms from TMS stimulation onset (usually ascribed to monosynaptic pathways) and the late response in the 150–250 ms window (usually ascribed to polysynaptic pathways; Fig. 1A).

Fig. 1: Behavioral-state-dependent modulation of cortico-thalamo-cortical responses evoked by the electrical and magnetic stimulation of MOs in premotor cortex in humans and mice.
Fig. 1: Behavioral-state-dependent modulation of cortico-thalamo-cortical responses evoked by the electrical and magnetic stimulation of MOs in premotor cortex in humans and mice.
Full size image

A Left to right: Schematic of the TMS-setup targeting premotor area. TMS-evoked responses for all contacts of one representative subject. Grand-average (12 subjects) during rest and active state. Rectified amplitude average of the late component (150–250 ms; shaded gray) for each subject (two-tailed Wilcoxon signed rank test: p = 0.002; same subjects are connected by lines). All boxplots show median (line), 25–75 percentile (box), maximum/minimum or 1.5 interquartile range from the 25–75 percentile (whiskers). B Left to right: 3D reconstruction from one representative subject of the stimulated cortical area (lightning symbol); recording contacts within the region of interest (ROI) responding (orange dots) and non-responding (yellow dots) to the stimulation; contacts outside the ROI (green dots). ES-evoked responses from one representative subject. Evoked iEEG rectified amplitude during rest and active state from 105 contacts (5 subjects). iEEG rectified amplitude average over the late response window (150–250 ms, shaded gray) during rest and active state for all responding ROI across subjects (Linear Mixed Effect Model: p = 0.015). C Left to right: Representation of the area recorded by an EEG electrode (gray) and the stimulated site in mice (current intensity: 66.15 ± 12.11 uA). EPs for all 30 EEG electrode traces averaged across subjects. EEG rectified amplitude evoked during rest and active state, calculated over all EEG contacts for all subjects (26 sessions, 15 subjects). Averaged EEG rectified amplitude over the late response window (150–250 ms, shaded gray) at rest and active state for all EEG electrodes across subjects (two-tailed Wilcoxon signed rank test p = 0.000579). D Modulation of murine LFP responses in MOs. Plots are structured in the same fashion as in (C). Voltages displayed in a color map as function of depth from superficial to deep layers in the y-axis (n = 13 subjects. two-tailed Wilcoxon signed rank test; p = 0.000976). E Modulation of the murine CSD in MOs. Same structure as (D) (n = 13 subjects. two-tailed Wilcoxon signed rank test; p = 0.001). Created in BioRender. Russo, S. (2025) https://BioRender.com/r30z199. Source data are provided as a Source Data file.

Compared to rest, both the rectified amplitude of the late response over premotor areas (Fc1, Fcz, Fc2, C1, Cz, C2), and its associated phase locking factor (PLF37, see methods for details on this measurement) were significantly reduced during the active condition (amplitude at rest: 1.37 ± 0.59 μV versus during active condition: 0.77 ± 0.22  V, p < 0.01, Fig. 1A; PLF at rest: 0.21 ± 0.07 versus active condition: 0.15 ± 0.05, p = 0.002, Fig. S1A). Similarly, a passive movement of the same hand induced a significant modulation of the late component (Fig. S2A). Importantly, the response modulation was not caused by potential somatosensory confounds related to TMS, as shown by a lack of a similar modulation in the somatosensory potentials (SSEPs) evoked by electrically stimulating the left median nerve (Fig. S2E). We also observed adaptation mechanisms specific for SSEP, but not for the TMS-EEG responses (Fig. S2F), corroborating the hypothesis that the late components evoked by TMS and sensory stimulation are most likely generated by different neuronal circuits. This modulation was only observed when comparing the active and resting state. Indeed, when we sorted the trials based on the phase of the squeezing movement by comparing the responses evoked by the TMS pulses delivered during the closure of the hand versus its opening, as inferred by electromyography (EMG), we observed no significant differences in the rectified amplitude and PLF of the late EEG component in 12 subjects (Fig. S2G). Moreover, the observed state-related modulation was network specific, as shown in 12 subjects whose evoked responses by TMS delivered to posterior areas (parietal and occipital lobes) in the EEG contacts above the same areas showed no significant modulation in either active or passive movement compared to rest (Fig. S2D). In the premotor TMS, the early component of the EP (3–50 ms from stimulus onset) showed a reduction in amplitude, but not in phase locking (amplitude at rest 2.24 ± 0.45 μV versus 1.88 ± 0.32 μV during active state; PLF at rest: 0.43 ± 0.8 versus active: 0.43 ± 0.9; amplitude: p < 0.01; PLF: p = 0.97; Fig. S2A), although the decreases in rectified amplitude of the early and late components were not significantly correlated (Fig. S2B; Spearman’s Correlation; p = 0.13; r = 0.46). In a set of 12 subjects, we also performed a control experiment involving rhythmic leg movements of the lower limbs. In this case the active condition was continuous, stationary cycling versus a resting condition of the legs. Similarly to the upper limb task, we observed a significant state-related modulation in the amplitude, but not PLF, of the early component (amplitude: p < 0.01; PLF: p = 0.16), and in both amplitude and PLF of the late component (amplitude: p = 0.016; PLF: p = 0.04, Fig. S2C). We conclude that the amplitude of the TMS-evoked EP in the 150–250 ms window is reduced during both active and passive movement of the contralateral hand and the legs, an effect that is network-specific, given the lack of modulation when TMS was delivered to posterior areas, and not related to somatosensory stimulation.

A similar and significant modulation of the late responses was observed in patients with epilepsy implanted with intracerebral EEG (iEEG) electrodes for presurgical screening (3 males and 2 females, age = 30 ± 8.12 mean ± STD; for clinical details see Table S1; Fig. 1B). In this case, the single pulse ES were delivered invasively between two adjacent contacts within one iEEG depth shaft in the contralateral premotor area of the hand performing the task. The late responses evoked in nearby iEEG contacts (within 3 cm from the stimulated site) showed a significant reduction of the evoked amplitude (Fig. 1B, z-scored amplitude at rest: 5.95 ± 5.79 and during active state: 4.30 ± 4.18; p < 0.05) and PLF during active state (Fig. S1A, PLF at rest: 0.55 ± 0.27 and during active state: 0.49 ± 0.27; p < 0.05), independently of the chosen re-referencing configuration (Fig. S3A). The early component did not show any significant modulation (Fig. S3B).

To dig deeper into the circuit mechanism underlying the responses evoked by cortical stimulation, we switched to laboratory mice. Following the procedure described in Claar et al.21, we simultaneously recorded global neural signals with an EEG array and local signals with up to three Neuropixels 1.0 probes38 in awake head-fixed mice on a freely moving wheel. Close to the Neuropixels probe in secondary motor cortex (MOs), a bipolar wire electrode was intra-cortically inserted, targeting the deep layers of MOs (layer 5/6: 1.06 ± 0.05 mm below the surface). It repeatedly delivered single pulse ES while we measured the evoked electrophysiological responses (Fig. 1C–E). Pulses were delivered at three different stimulation intensities: low (minimum intensity ≥10 μA to elicit a visible EP at single-trial level), high (maximum intensity <100 µA not eliciting movements), medium (the average between low and high intensity). One Neuropixels probe was always placed in the sensorimotor-related thalamic nuclei (SM-TH; Fig. S11A; see full list of thalamic nuclei in the Methods). The stimulation of deep layers in MOs evoked robust responses in EEG, LFP, and current source density (CSD), accompanied by a stereotyped triphasic spiking pattern characterized by an initial excitation (within 10 ms), followed by an off period (i.e., neuronal silence; 10–140 ms) and a strong rebound excitation both in MOs and SM-TH (140-250 ms; Fig. 2A, Fig. S11A)21. As mice were free to run or to remain stationary, we classified trials based on wheel speed as either active or rest trials (wheel speed greater or smaller than 0.1 cm/s, respectively) and computed the average evoked potentials for EEG, LFP, and CSD for both conditions. As in humans (see above), we evaluated the early component (3–50 ms from stimulation onset) and the late component peaking between 150 and 250 ms from stimulation onset and coinciding with the rebound excitation21. The resting condition showed significantly larger amplitude and PLF in the late time window for both global (EEG) and local (LFP and CSD) signals when high and medium current intensities were applied compared to the active state (Figs. 1C–E, S4). Note that the same EEG, LFP, and CSD modulations were also observed when using speed thresholds up to 5 cm/s. However, the modulation was reduced, or not observed, when low current intensity was applied (Fig. S4). CSD analysis in MOs showed a current sink between layers 2/3 and 5 at the same time as the late response for high and medium, but not low current intensity (Figs. 1E, S4C). The sink observed in this location suggests that the late component may reflect a thalamo-cortical input, given the connectivity profile of thalamo-cortical neurons39,40. The modulation was specific for the late EP component as opposed to the early component (Fig. S5), and network specific (Fig. S6).

Fig. 2: Optogenetic-induced thalamic inhibition interferes with the late cortical response to electrical stimulation of MOs.
Fig. 2: Optogenetic-induced thalamic inhibition interferes with the late cortical response to electrical stimulation of MOs.
Full size image

A z-scored firing rate of putative excitatory neurons in SM-TH and MOs. (LD lateral-dorsal-thalamic nucleus; PO posterior thalamic nucleus; VAL ventro-anterior-lateral thalamic nucleus; VPM ventroposterior-medial thalamic nucleus). B Global mean latencies of SM-TH and MOs units and CSD, LFP, and EEG peaks latencies (20, 15, 12, 13, and 13 subjects, respectively; two-way ANOVA p = 3.65e-11, F = 15.92. Tukey-post-hoc test; p = 0.001 for all significance lines shown in the figure; p > 0.05 or n.s. for all the other comparisons). All boxplots show median (line), 25–75 percentile (box), maximum/minimum or 1.5 interquartile range from the 25–75 percentile (whiskers). C Top: histology of one representative VGAT-ChR2-YFP/wt mouse implanted with an optic fiber (gray) targeting TRN (white arrows). Bottom: Protocols combining electrical (ES) and timed-optogenetic stimulation (Opto): ES alone (black); ES followed by 50 ms Opto at 75 ms (orange) and 125 ms (green) from ES. D Representative raw traces of the single-trial responses for the protocols shown in C for SM-TH and MOs channels (AP bands) and LFP in MOs. Dashed boxes indicate the response window for evaluating first-spike latency and LFP peak (75–300 ms). E Peri-stimulus time histogram (PSTH) for 118 SM-TH (left) and 155 MOs (middle) units and MOs-LFP responses averaged across 4 mice. Color code as in (C, D). F Latency (mean ± SD) for SM-TH, MOs units and MOs-LFP peak responses for stimulation protocols shown in (C). Quantifications per state reported in Figs. S8D, G. Units’ latencies of the thalamic and cortical responses and peak latencies of MOs-LFP responses plotted in E and elicited by the protocols shown in (C) (Units: two-tailed Wilcoxon-signed rank-test; SM-TH: ES vs ES+Opto75-125 p = 2.51e-16; ES vs ES+Opto125-175 p = 0.000169; ES+Opto75-125 vs ES+Opto125-175 p = 1.98e-14; MOs: ES vs ES+Opto75-125 p = 5.53e-06; ES vs ES+Opto125-175 p = 6.45e-22; ES+Opto75-125 vs ES+Opto125-175 p = 1.02e-21; LFP: one-way ANOVA test p = 0.000016; F = 47.90; Tukey-post-hoc comparisons: ES vs ES+Opto75-125 p = 0.008293; ES vs ES+Opto125-175 p = 0.001; ES+Opto75-125 vs ES+Opto125-175 p = 0.001). H SM-TH and MOs PSTH in response to Opto alone of thalamic (left) and cortical (right) GABAergic cells. Source data are provided as a Source Data file.

Optogenetic dissection of the circuit causally proved that the thalamus is necessary to originate the late response to MOs stimulation in mice

Deep MOs electrical stimulation elicited a stereotyped triphasic spiking pattern—a brief excitation followed by 127.8 ± 4.1 ms of silence and a rebound excitation—in local cortical and thalamic neurons21 (Figs. 2A, S10B). We classified cortical units according to their spike width as regular spiking (RS) and fast spiking (FS) units (putative excitatory and inhibitory neurons, respectively; see Methods for details). Similarly, we classified thalamic units as putative SM-TH relay and reticular thalamic (TRN) units. For both resting and active state, SM-TH units rebound consistently and significantly preceded RS cortical rebound spiking and the global mean latencies of CSD, LFP and EEG peaks (p < 0.001, Figs. 2B, S7A. See also Fig. 5 in Claar et al.21). All these metrics positively and significantly correlated with the latency of SM-TH units: that is, the later the SM-TH spiked on any one trial, the later cortical RS responses on that trial (Fig. S7B; Mixed effect models, all p < 0.001). This observation points to a critical role of the thalamus in initiating the late response and generating the late EP components. To causally demonstrate such a link, we combined cortical electrical stimulation with precisely timed optogenetic inhibition of the thalamus (Fig. 2C) in transgenic mice expressing Channelrhodopsin-2 (ChR2)41 in GABAergic neurons (VGAT-ChR2-YFP/wt). These animals were implanted with a fiber optic cannula above the TRN, considered to be the major GABAergic input to thalamic relay neurons42,43,44,45 (Fig. 2C). Accordingly, optogenetic excitation of TRN generated a controlled suppression of the SM-TH units, inhibiting SM-TH at a precise time during the response to ES, independent of the behavioral state of the animal. Notably, the optogenetic stimulation reduced the spontaneous activity of SM-TH and MOs to almost zero within 10 ms (Figs. 2D, E, F, H and S8A, S8C).

Compared to electrical stimulation alone, optogenetic inhibition of SM-TH between 75–125 and 125–175 ms after the electrical stimulus extended the off-period by partially overwriting the response to the electrical stimulation and independently generating a later rebound of both thalamic and cortical units (Fig. 2). Specifically, thalamic inhibition consistently and progressively delayed the first rebound spike (defined as the first spike after the off-period, in the 75–250 ms time window) at thalamic and cortical levels, as well as the late LFP peak (Fig. 2D–G; Units: Wilcoxon signed rank tests, p < 0.01; LFP: one-way ANOVA test p < 0.001, t-test post-hoc comparisons). On average, optogenetic stimulation between 75–125 ms following the electrical stimulation delayed the response of SM-TH units, MOs units, and the peak of the LFP by 58 ± 39, 8 ± 28, and 31 ± 10 ms, respectively. When thalamic inhibition occurred 50 ms later, between 125–175 ms following electrical stimulation, response of SM-TH units, MOs units, and LFP peak were delayed by 72 ± 53, 39 ± 33, and 77 ± 14 ms, respectively.

Tellingly, for all tested protocols, the firing of thalamic units in the late window always preceded activity of cortical units (Fig. 2F, G). As opposed to thalamic inhibition, optogenetic stimulation of GABAergic neurons in MOs minimally affected the rebound response (Fig. S8B; MOs: ES Only = 208 ± 39 ms; ES+Opto75-125 = 213 ± 40 ms; ES+Opto125-175 = 220 ± 44 ms; SM-TH: ES Only = 201 ± 36 ms; ES+Opto75-125 = 191 ± 32 ms; ES+Opto125-175 = 204 ± 36 ms). However, optogenetic activation of only GABAergic units in MOs did induce a suppression of firing rate in both RS MOs and SM-TH units (Fig. 2H, S8C). Overall, these causal manipulations demonstrated that the thalamus is necessary to originate the rebound activity following electrical stimulation in mice.

EP late component to MOs stimulation correlates with thalamic state-dependent unit synchronization

Upon further investigating rebound activity of cortical and thalamic units, we found that the evoked firing rate in MOs and SM-TH units was not modulated by the subject’s state in the same way as the EEG, LFP, and CSD responses. We indeed observed an increase in the firing rate calculated over the late response time window during the active state (Figs. 3A, S9, S10; p = 0.03, rest lower than active state) as opposed to the decrease of the late component magnitude described above (Fig. 1). Therefore, MOs and SM-TH firing rate changes in the late response window did not explain the state-related modulation of the EPs. The EPs modulation was observed even at the level of the CSD showing a current sink between layers 2/3 and 5 (Figs. 1E, S4C) suggesting thalamo-cortical input39,40. Hence, we further analyzed the thalamic rebound responses, and we found that the rectified amplitude of the EP late component was correlated to the synchronicity and bursting frequency of thalamic units (see below for more details, Fig. S13). These factors were modulated by the baseline firing rate of SM-TH units, which in turn was modulated by the state of the subject (Figs. 3, S13). This observation became apparent after clustering the evoked inter-spike-interval (evoked ISI) in the late response time window of the putative thalamic relay units (Fig. 3B, C) (see Methods for units’ type classification). Given the clear bimodal distribution of the evoked ISI response of putative relay neurons (Fig. 3C), as opposed to a unimodal distribution of the cortical RS, cortical FS, and TRN units (Fig. S11B; Dip test; p < 0.001 for putative thalamic relay units; p > 0.05, ns for all the other groups), the data-driven cluster analysis (see Methods for details) identified two distinct types of rebound activity likely generated by the same thalamic cell-types (given the similarities across several features of their spike waveforms; Fig. S11C). One with a short-evoked ISI (<17.88 ms), referred to as high-firing units (HF; n = 569), and a second one characterized by a long-evoked ISI (>17.88 ms) and referred to as low-firing units (LF; n = 700) (Fig. 3C–E). HF units responded earlier and with less variability than LF units (Fig. S11D) during the early phase (3–50 ms), suggesting that HF units may be more effectively activated by the electrically stimulated cortical neurons, in line with the simulated data (see section below). Furthermore, the strength of the electrical stimulus (i.e., current intensity) affected not only the overall number of responsive units, but also the relative size of the two subsets, such that higher stimulation intensities revealed progressively more HF units than LF units (Fig. S12), corroborating the idea that these two subsets reflected two different response patterns to the cortical stimulation due to their different connectivity profile. Specifically, HF units may be more directly connected to the stimulated site, hence they receive more synaptic inputs from the stimulated cortical neurons (see next section for details).

Fig. 3: Behavioral-state-dependent modulation of rebound thalamic units’ synchronization evoked by MOs electrical stimulation underlies the modulation of the late EP component in mice.
Fig. 3: Behavioral-state-dependent modulation of rebound thalamic units’ synchronization evoked by MOs electrical stimulation underlies the modulation of the late EP component in mice.
Full size image

A Modulation of SM-TH units’ evoked firing rate. Left: Evoked SM-TH firing rate at the population level during rest and active state (1269 units from 21 subjects). Right: SM-TH firing rate averaged over the late response (150–250 ms; shaded gray) during rest and active state across subjects (two-tailed Wilcoxon signed rank test p = 0.03; active state larger than rest). All boxplots show median (line), 25–75 percentile (box), and maximum/minimum or 1.5 interquartile range from the 25–75 percentile (whiskers). B Inter spike interval (ISI) histogram of the late responses (150–250 ms) evoked by MOs electrical stimulation in thalamic putative relay units (1269 units from 21 subjects). The bimodal distribution identifies two distinct response patterns: high-firing (HF, gray empty bars; 569 units) and low-firing (LF, gray filled bars; 700 units) neurons. The vertical line represents the threshold used to separate the two response patterns centered at 17.88 ms. C Response dynamic of HF units. Top: Schematic representation of a single trial raster plot. Bottom-left: raster plot of evoked responses by electrical stimulation of a representative HF unit. Bottom-right: grand-average evoked response for all 569 HF units (21 subjects) peaking within the late response time window (150–250 ms, shaded area). D Response dynamic of LF units (LF). Plots are structured in the same fashion as C (700 units, 21 subjects). E Putative thalamic relay units’ features comparisons between during rest and active state across subjects. Left: Average baseline firing rate, evoked ROV and evoked response frequency during rest and activity across HF units (two-tailed Wilcoxon signed rank test, Bonferroni corrected; Baseline firing rate: p < 2.13e-184; Evoked ROV: p = 0.37, ns; Response frequency: p = 1.90e-33; empty boxes). Right: the same quantifications as (D) visualized with filled boxplots are shown for LF units (two-tailed Wilcoxon signed rank tests; Baseline firing rate: p = 5.67e-169; Evoked RPV: p = 1.38e-05; Response frequency: p = 0.08, ns; filled boxes). Source data are provided as a Source Data file.

The late excitatory response was characterized in terms of synchronicity, quantified for both HF and LF units as response onset variability (ROV), calculated at the single-trial level as the standard deviation of the rebound onset latency across units and per trial; and response frequency, calculated as the inverse of the evoked ISI within units (Fig. S13A). By correlating baseline firing rate, ROV, response frequency and late EP component amplitude at the EEG level, we found that the active state almost doubled the thalamic baseline firing rate (from 6.78 ± 4.4 Hz at rest to 12.48 ± 4.6 Hz during active state; p < 0.001), correlating with a decreased synchronicity as quantified by the increased onset variability of LF units (from 35.7 ± 11.8 ms at rest to 40.7 ± 8.2 ms during active state; p < 0.001; a cross-correlational analysis confirmed the synchronicity modulation as function of state, Fig. S13D) and to a smaller response frequency of HF units (from 309 ± 126 Hz at rest to 241 ± 116 Hz during active state; p < 0.001). Together, these two factors reduced the amplitude of the late EP component during active state compared to rest (Figs. 1, 3 and S13).

Cellular mechanisms underlying the stereotyped pause-rebound response to cortical electrical stimulation

To better understand the mechanism(s) underlying the responses evoked by electrical stimulation, we used a previously developed computational model of the thalamo-cortical system46,47,48 (Fig. 4A). This network model is of the Hodgkin-Huxley type; it simulates realistic thalamo-cortical interactions and includes cortico-cortical, cortico-thalamic, and thalamo-cortical synaptic weights, as well as conductances for different voltage and Ca2+ gated currents. The model allows us to simulate rest and active conditions by changing the input and neuromodulation49,50,51. Specifically, we simulated the active condition by increasing the excitability of all thalamo-cortical (TC; corresponding to the in vivo SM-TH units) neurons. This was implemented by decreasing K+ leak currents and increasing the cortico-thalamic52 and cortico-reticular stochastic inputs simulated as Poisson process administered in AMPA synapses connecting cortico-thalamic (PY, corresponding to the in vivo RS cortical units) neurons to TC and TRN neurons53, compared to the rest condition (15 trials per condition).

Fig. 4: Biophysically realistic simulation of the response to cortical electrical stimulation recapitulates the in vivo results and provides potential explanatory mechanisms underlying the stereotyped evoked activity.
Fig. 4: Biophysically realistic simulation of the response to cortical electrical stimulation recapitulates the in vivo results and provides potential explanatory mechanisms underlying the stereotyped evoked activity.
Full size image

A Structure of the biophysically realistic model, modified from Krishnan et al.46. B Top: Schematic representation of cortical electrical stimulation applied to the centered half of cortical neurons (both PY and IN, highlighted). Bottom: cortical inputs to TC-neurons as function of their relative position in the network. C Representative stimulation-evoked intracellular voltage for one PY-neuron (top) and one TC-neuron (bottom). D Intracellular voltage for one representative trial for all PY (top) and TC (bottom) neurons. E Median latency of the firs- evoked-spike in the early (0–50 ms, top) and in the rebound response (75–250 ms, bottom) for PY and TC neurons (30 sessions; early responses: PY:3.15 ± 3.22 ms; TC:8.38 ± 7.03 ms; two-tailed Wilcoxon-rank-sum test, p = 1.56e-20. Rebound responses: PY:151.56 ± 11.83 ms; TC:141.80 ± 9.68 ms; two-tailed Wilcoxon-rank-sum test, p = 1.11e-04). All boxplots show median (line), 25–75 percentile (box), maximum/minimum or 1.5 interquartile range from the 25–75 percentile (whiskers). F Median intracellular voltage during baseline and during 25–100 ms response window for PY-neurons (top) and TC-neurons (bottom). The intracellular voltage of PY-neurons is not affected in the response window compared to baseline (32 rest and 32 active trials; Baseline:-63.08 ± 0.32 mV; Response:-63.16 ± 0.88 mV; Wilcoxon-rank-sum test, p = 0.46), while TC-neurons show a significant decrease of 6.26 mV (30 sessions; Baseline:-61.38 ± 0.36 mV; Response:-67.64 ± 3.13 mV; two-tailed Wilcoxon-rank-sum test, p = 3.87e-20). G Intrinsic current dynamics for one representative TC-neuron over time from the stimulation onset (0 ms). Left to right: total synaptic inputs, h-current, and T-current. H Simulated responses evoked by cortical stimulation in absence of either TRN or cortical GABAergic neurons. Top: schematic representation of the simulation when TRN neurons were silenced and the associated intracellular voltage for one representative trial for cortical (left) and thalamic (right) neurons. Bottom: schematic representation of the simulation when GABAergic cortical neurons were silenced and the associated intracellular voltage for one representative trial for PY (left) and TC (right) neurons. I Average intracellular voltage during the stimulus-induced off-period (25–100 ms) in 50-centrally-located TC-neurons across different GABA-A connectivity strength in IN- > PY (x-axis) and TRN- > TC (y-axis) connections. Source data are provided as a Source Data file.

To replicate the ES protocol, we imposed a depolarizing current of 100 mA for 1 ms to half of the cortical neurons (250 PY and 50 interneurons (IN) located in the center of the network (Fig. 4B)). Each TC neuron received cortical inputs from the closest PY neurons within a certain radius (Fig. 4B). So, the TC neurons in the center of the network received inputs from several stimulated PY neurons with respect to the TC neurons at the periphery of the simulation (Fig. 4B). This was reflected in terms of cumulative synaptic inputs from the stimulated PY neurons to TC neurons, showing that the stimulated PY neurons exert maximum effect on thalamic neurons in the center of the network, and progressively decreased towards the borders of the stimulated area (Fig. 4B).

The model successfully recapitulated the triphasic response characteristics observed in the mouse (Figs. 3A21, 4D, and S9A). Specifically, it showed that during the cortical and thalamic off-periods, between 25 and 100 ms after stimulation, there was no significant change, compared to baseline, in the membrane potential of PY neurons (p = 0.46; Baseline: -63.08 ± 0.32 mV; Response: -63.16 ± 0.88 mV, Fig. 4C, F left) but the membrane potentials of the TC neurons were significantly hyperpolarized (p < 0.001; Baseline: -61.38 ± 0.36 mV; Response: -67.64 ± 3.13 mV; Fig. 4C, F right). This hyperpolarization, which followed an early spike of the same cells due to the stimulation driven cortical input, was caused jointly by a reduction of cortico-thalamic excitatory inputs and inhibition from the TRN cells (Fig. 4G, left). As the hyperpolarization gradually increased (reaching values lower than -75mV), it was accompanied by (a) de-inactivation of the low-threshold Ca2+ (T-) currents and (b) slow activation of the h-currents (Fig. 4G, center). The activation of the h-currents then led to the depolarization and quick activation of the T-currents triggering low-threshold Ca2+ spike (Fig. 4G, right), as previously described54. To further clarify the mechanisms allowing thalamic hyperpolarization, we performed additional simulations in absence of TRN and cortical inhibitory neurons (Fig. 4H). When TRN was silenced, the pause-burst pattern appeared to be largely unaffected (Fig. 4H, top). Conversely, when cortical interneurons were silenced, PY showed a reduced off-period, and the thalamic rebound was abolished. However, the thalamus did show a period of hyperpolarization probably induced by TRN (Fig. 4H, bottom).

We independently varied the cortical and thalamic GABA-A connectivity strength, observing that both contribute to generate a larger stimulus-induced hyperpolarization in TC neurons (Fig. 4I), triggering the thalamic rebound. Importantly, our optogenetic experiments confirmed that the activation of cortical or thalamic GABAergic units alone is sufficient to induce conjoint cortical and thalamic off-periods (Figs. 2H and S8C). Lastly, as suggested by the mouse data, the model confirms that TC neurons exhibit two rebound regimens, determined by the amount of synaptic inputs they receive from cortical neurons (Wilcoxon rank sum test; p < 0.001; HF: 0.77 ± 0.098 μS/cm2; LF: 0.37 ± 0.16 μS/cm2; Fig. S14) and that the differences in the thalamic rebound during rest and active state depends on the hyperpolarization level of TC neurons (Fig. S14). Indeed, the active state condition led to a relative depolarization of TC neurons, so that the reduction of cortical input was insufficient to fully de-inactivate T-channels in TC neurons (Fig. S14).

Discussion

We demonstrate that the thalamus is a major contributor to the late evoked potential (EP) component elicited by cortical stimulation in mice and provide compelling evidence for a similar role in humans. In mice, we proved that the thalamus is necessary to generate this late component via a causal manipulation of the cortico-thalamic circuit by combining electrical stimulation with optogenetic inhibition (Fig. 2). Given the striking similarities in the EP waveforms (Figs. 1, 5A) and the comparable behaviorally modulated late components in humans, we infer that similar mechanisms underly the EPs in both species. Specifically, the state of the subject modulates the degree of spike synchronicity and burst frequency of the thalamic-evoked rebound responses, which in turn modulate the amplitude of the late EP component captured by the EEG electrodes (Fig. 3). A biophysical simulation of the cortico-thalamic circuit46 predicted that these stereotyped evoked responses are mediated by the intrinsic dynamics of thalamic currents in conjunction with thalamic and cortical GABAergic neurons (Fig. 4).

Fig. 5: Similar mechanisms in mouse and human explain the evoked responses following invasive and non-invasive stimulation.
Fig. 5: Similar mechanisms in mouse and human explain the evoked responses following invasive and non-invasive stimulation.
Full size image

A Evoked responses elicited by cortical stimulation (invasive and non-invasive) are remarkably similar between human and mouse. Left: grand average EEG evoked responses rectified and normalized by their maximum value elicited by TMS in humans (green, 12 subjects) and by ES in mice (blue, 15 subjects). Right: grand average iEEG and LFP evoked responses rectified and normalized by their maximum value elicited by ES in humans (green, 5 subjects) and mice (blue, 13 subjects). B Diagram of the thalamocortical circuits at baseline characterized by recurrent inhibitory and excitatory loops within secondary motor cortex (MOs), between MOs and somatomotor thalamus (SM-TH) and thalamic reticular nucleus (TRN). Possible mechanisms underlying the off-period following cortical stimulation. In scenario (1), the cortical stimulation activates TRN which in turn suppresses SM-TH via a volley of GABAergic inputs which causes the thalamic off-period and in turn the cortical off-period. In scenario (2), the early excitatory response in the cortex induces a GABAergic-mediated cortical off-period, which interrupts the recurrent loops sustaining the activity in cortex and thalamus, ultimately inducing thalamic and cortical off-periods. The two scenarios are not mutually exclusive and are likely to occur synergistically as shown by our simulated and in vivo data. In both cases, the thalamic hyperpolarization engages low-threshold calcium currents, It, which initiate the thalamic rebound response and the consequent cortical rebound.

The key role of the thalamus in generating the late EP

Electrical stimulation of the deep layers of MOs in mice elicits a stereotyped triphasic spiking pattern in cortical and thalamic neurons that resembles the responses evoked at the EEG level21. We found that the late EP component, between 150 and 250 ms from stimulation onset, is modulated by the behavioral state, such that its magnitude decreases in running animals, not only at the EEG level, but also at the LFP and CSD levels (Fig. 1). We used timed optogenetic manipulations to demonstrate that this late component depends on thalamic (Fig. 2) and far less on cortical activity (Fig. S8). Like the late EP component (Fig. 1), the pause-burst pattern in the thalamus is state-dependent: while mice are running, the thalamus is more depolarized (high baseline firing rate, Figs. 1, 3) compared to resting. As shown using a biophysical network model46, running reduces stimulation-evoked hyperpolarization in thalamo-cortical neurons (Fig. S14) that is necessary to de-inactivate the voltage-gated, T-current55, and evoke the subsequent spike bursts56,57,58,59. These currents decrease the bursting frequency and population synchronicity of the rebound compared to rest (Fig. 3, S14). Previous work showed that the state-dependent transition of thalamo-cortical (TC) neurons58 from burst firing to single spiking mode is mediated by metabotropic glutamate receptors60. These two neuronal patterns of activity are often associated with sleep and arousal, respectively61, although bursting may sporadically occur during wakefulness62,63. Our results show that the subject’s state (Figs. 1, 3) and the intensity of the ES (Fig. S4) modulate the late EP component via their effects on thalamic bursting frequency and synchronicity.

We observed a similar state-dependent modulation in humans, such that when the stimulated cortico-thalamic network is activated by movement, either active or passive, the late EP component measured by EEG (or iEEG) is smaller than at rest (Figs. 1 and S2, S3). The modulation observed during passive movement suggests that peripheral inputs are sufficient to change the state of the thalamus. Importantly, like in mice (Fig. S6), the modulation of the rebound in humans is region specific, as it is not observed if the stimulation is delivered to a posterior cortical area not directly engaged by the task (Fig. S2), and is specific to the late, rather than the early, EP component (Figs. S2, S3, S5), emphasizing their different mechanistic origins.

There are many differences between homo sapiens and mus musculus, including neuronal population, gene expression, and brain size64,65,66. The approximately thousand-fold difference in brain size should affect the timing of signal conduction from thalamus to cortex and vice versa. However, given an estimated conduction velocity of 5–50 m/s67, the difference in thalamo-cortical conduction times between the two species will be below 10 ms, significantly smaller than the 100 ms time window that defines the late EP component in this study. Compatible with our results are the several similarities across these two mammalian species, ranging from common thalamic burst dynamics68,69,70,71 and remarkable conservation of brain rhythms72 to shared features of thalamo-cortical and cortico-cortical connections73. Moreover, we focused on the presence of the state-dependent modulation per se, rather than comparing the absolute magnitude of the modulation, expected to be different due to the differences in recording and stimulating modalities in mice and humans. We defined the active state for mice and humans in different ways: running and actively squeezing a rubber ball or passively moving the same hand, respectively. To account for the different definition of active state, for the experiments in humans, we stimulated the premotor cortex contralateral to the hand engaged by the active or passive task, thus realistically comparing an active condition of the perturbed cortico-thalamic network to a resting state. This interpretation is supported by the observation that rhythmic movement of the lower limbs in the EEG-TMS humans’ setup, here stationary cycling, more comparable to running in mice (Fig. S2C), induced an analogous modulation.

Mechanisms of neural responses to cortical stimulation

We previously showed21 that deep ES stimulates pyramidal cells, including thalamic-projecting ones. This generates an initial excitation in cortex and in the thalamus mainly via orthodromic activation from the cortex as suggested by the significantly larger variability of the first spike latency in the SM-TH compared to MOs (Wilcoxon test; p < 0.001) and the lack of significant differences between SM-TH nuclei and TRN in the latency of the first spike (Wilcoxon test; p = 0.99). This initial excitation is followed by an off-period and a rebound excitation initiated by the thalamus21 (Fig. 2). This rebound is characterized by bursting dynamics (Fig. 3), mediated by the intrinsic dynamic of T-currents, in thalamic relay cells55. T-currents are activated by the depolarizing h-current, primarily mediated by HCN channels74,75,76, which in turn is activated by pronounced hyperpolarization24,63,77,78,79,80 (Fig. 4G). According to our model, the cortical stimulation significantly hyperpolarizes the thalamus—as opposed to the cortex, whose intracellular voltage is comparable to baseline (Fig. 4F)—by both withdrawal of excitation due to the cortical silence and di-synaptic inhibition via stimulation of TRN neurons, the primary source of GABAergic inputs to the relay thalamic nuclei43,44,45,74 (Fig. 5B). Similarly, the cortical off-period may be due to a transient inhibition mediated by GABAergic neurons, and/or a lack of excitatory input from the thalamus. Because cortical and thalamic areas sustain each other’s firing through recurrent loops (Fig. 5B), it is difficult to isolate the individual effects. Indeed, a suppression of either cortex or thalamus by directly activating their GABAergic neurons induced a significant reduction of firing rate in both areas (Figs. 2H, S8C).

Cortical stimulation generates an initial excitation locally (including in GABAergic neurons) and in the thalamus, followed by an off-period in both regions. When we ran the simulation in the absence of cortical GABAergic neurons, we did not observe the evoked pause-rebound pattern in either cortex or thalamus (Fig. 4H, bottom), suggesting that the cortical GABAergic neurons are critical for generating the stimulation-induced cortical and thalamic off-period. Their key role in deactivating recurrent local activity after an electrical stimulus has been shown before in cortical slices81. This induced local down state could trigger a down state in the directly connected thalamic nuclei by reducing the cortical inputs to them, hence causing an off-period in the thalamus. In line with previous findings82, cortical stimulation directly activates a subset of TRN neurons, as supported by TRN recordings from six animals where only two responded to the stimulation with a stereotyped triphasic pattern (Fig. S10B). Our model shows that TRN neurons are also necessary to evoke the thalamic off-period (Fig. 4H, top). The thalamus still hyperpolarized following ES even when the cortical GABAergic neurons were silenced (Fig. 4H, bottom), possibly due to direct engagement of TRN, confirming its contribution to the thalamic off-period. The magnitude of the thalamic hyperpolarization is indeed affected by the strength of GABA-A connectivity in both cortex and thalamus (Fig. 4I), further supporting the hypothesis that GABAergic neurons in both cortex and thalamus concurrently contribute to generate the thalamic pause-rebound pattern.

Following the off-period, we observe a rebound response in the thalamus, characterized by spike bursts, and a subsequent rebound in the cortex. We showed that when TRN is optogenetically activated (Figs. 2, S8), it interferes with the electrically evoked pause-burst dynamic by further suppressing the thalamic relay neurons (Fig. S8). A possible explanation is that optogenetic TRN activation keeps thalamic relay cells hyperpolarized such that the h-current is not sufficient to depolarize the membrane, thus overwriting the response to ES and then generating an independent rebound burst (low-threshold Ca2+ spike) later. Once the optogenetic stimulation of TRN neurons ends, the thalamic relay cells respond with an even larger rebound activation (Fig. 2B). With the thalamus optically suppressed, the cortex cannot generate an independent rebound, extending the evoked off-period over 240 ms, hence overwriting and generating a delayed rebound in cortex and thalamus (Fig. 2). On the other hand, when ES was combined with direct optogenetic activation of cortical GABAergic neurons, we did not cause a similar delay of the rebound response in either cortex or thalamus. Taken together these two observations causally demonstrate the thalamic dependency of the late rebound response to ES (Fig. S8). Thus, we propose that both cortical and thalamic GABAergic neurons contribute to hyperpolarizing the thalamus after cortical stimulation, which in turn enables the thalamic rebound response (Fig. 5B). Our results are in line with previous findings showing that stimulation of the cortico-thalamic pathway triggers a prominent depolarization followed by a long-lasting hyperpolarization frequently ending with a burst discharge of thalamic relay cells83,84. In some cases, the hyperpolarization remained even after lesioning the reticular thalamic complex83, suggesting that sources other than the TRN can induce inhibitory postsynaptic potentials (IPSP). Although both studies83,84 attributed the remaining IPSPs to other thalamic interneurons, an earlier experiment that inactivated visual cortex via cooling led to a decrease of baseline firing rate and changes of response features to visual stimuli in the directly connected units of the lateral geniculate thalamic nucleus85. This study demonstrated that the lack of cortical inputs can suppress thalamic activity85, as also confirmed by our simulated (Fig. 4) and optogenetic data (Fig. 2, S8). This mechanism coexists with the IPSPs followed by a rebound burst of TC neurons induced by TRN86 and shaped by neuromodulators associated to different states of arousal.

Importantly the state of the subject, i.e. anesthetized versus awake, could affect the time course of the responses21. However, the time course of the off-period here described is in line with a reduction of cortical excitatory PSPs (EPSPs) and a reduction of firing probability of TC neurons evoked by a thalamic electrical pulse when a conditioning paired pulse was delivered to the cortex of anesthetized cats up to 100 ms before it87. Interestingly, the electrically evoked responses elicited by cortical stimulation resemble the interictal spikes spontaneously occurring in epileptic patients (data not shown because intentionally excluded from the analyzed dataset used for this study). From a mechanistic perspective, both electrical stimulation and epileptic spikes are associated with the abrupt recruitment of a local ensemble of neurons and thus may engage similar mechanisms, suggesting that the cortico-thalamo-cortical loop may contribute to the generation of pathological spike-and-waves.

In our hands, cortical stimulation induced two different thalamic response patterns, high-firing (HF) and low-firing (LF) (Fig. 3) in both in vivo and simulated data (Fig. S14). Rather than reflecting different neuronal types (Fig. S11), these two response patterns are explained by the connectivity profile of each neuron (Fig. S14). Thalamic neurons receiving large inputs from the stimulated cortical area showed a HF response (Fig. S14), and they responded more promptly and with less variability than thalamic neurons receiving smaller inputs from the stimulated cortical area and characterized by a LF response (Fig. S11D). In vivo data further supported this prediction, showing that the intensity of the electrical stimulus affected not only the overall number of responsive units, but also the relative size of the two subsets, such that higher current intensities showed a progressive shift from LF to HF response patterns (Fig. S12).

Intriguingly, the similarities in the stimulation-evoked responses and their behavior-dependent modulation are observed across stimulation modalities (Figs. 1, 5A). In line with this observation, TMS in non-human primates evokes stereotyped triphasic spiking responses27 and engages GABAergic cortical neurons88. The origin of the late EEG responses evoked by TMS in humans have been a source of controversy, given that multisensory peripheral factors may contribute to their generation20. However, our control experiments (Fig. S2) showed that the observed modulation was not due to sensory responses to TMS89. This result confirms that the late components evoked by confounds-controlled TMS are likely generated by a direct cortico-thalamic activation—even for low TMS intensities90—that engages similar mechanism as the one elicited by invasive ES in humans and mice (Figs. 1, 5). TMS and ES activate the underlying tissue through different mechanisms30,91,92,93,94,95,96,97,98, which may explain why the early component evoked by TMS (Fig. S2) is modulated by the state, but the one evoked by ES in mice and humans is not (Figs. S3, S5). However, early and late components in the TMS-EEG experiments are independently modulated (Fig. S2), thus supporting the hypothesis that they originate from different mechanisms. We therefore conclude that both TMS and ES directly engage the thalamus.

Implications of the study

Overall, our in vivo and in silico results (Figs. 2,3,4) suggest that the main actors of the late responses to cortical stimulation (invasive and non-invasive) are the intrinsic thalamic currents, Ih and It, in thalamo-cortical cells and the cortical and thalamic GABAergic neurons. As these are similar across species, from mice to non-human primates to humans, we surmise that the neural responses to cortical stimulation originate from highly preserved mechanisms, including the thalamic dependency of the late EP component68,69,70,71. Note that this does not exclude cortico-cortical contributions. Given that we demonstrated that the thalamus plays a critical role in shaping these responses, it is reasonable to expect that it also plays a major role in the effectiveness of all the research, clinical and neuroprosthetic applications based on cortical stimulation4,7,11,12,17,18,99,100,101,102,103.

The thalamic state-dependency of the late EP component (Fig. 3) suggests that the thalamic feedback that reaches the cortex is integrated with information related to the state of the thalamus. We therefore propose that this late EP may be used as a non-invasive indicator of the state of the thalamus, potentially representing a biomarker for thalamo-cortical (dys)functions.

Methods

Mouse experiment

Mouse data has been collected through the experimental procedures described in Claar, et al.21. A summary of these methods and details of the procedures that differ are provided below.

Mice

Mice were maintained in the Allen Institute animal facility and used in accordance with protocols approved by the Allen Institute’s Institutional Animal Care and Use Committee under protocols 1703, 2003 and 2212. Experiments performing electrical stimulation alone used C57BL/6 J wild-type mice (n = 21), while experiments performing optogenetic manipulation used VGAT-ChR2-YFP/wt mice (n = 4). Male and female of both wild-type C57BL/6 J mice and VGAT-ChR2-YFP/wt mice were purchased from Jackson Laboratories (JAX stock #000664) and were 9–28 weeks old at the time of in vivo electrophysiological recordings.

After surgery, all mice were single-housed (reverse 12 h light cycle; temperatures 20–22 °C; humidity 30–70%; ad libitum access to food and water). All experiments were performed during the dark cycle.

Surgical procedures and habituation

Each mouse went through the following order of procedures prior to the day of the experiment: (1) mice were deeply anesthetized with isoflurane via inhalation (induction at 5%, maintenance at 1–2%) and underwent sterile surgery to implant an EEG array and a titanium headframe; (2) five days of recovery time post-surgery; (3) at least 3 weeks of habituation to head-fixation; (4) and a second sterile surgery to perform small craniotomies to allow for insertion of the stimulating electrode and Neuropixels probes. Refer to Claar et al.21 and our protocols.io repository for details on surgical procedures, animal habituation and recording setup104.

The day of the first surgery, mice undergoing optogenetic stimulation of the thalamus were implanted with an optical fiber targeting the reticular nucleus of the thalamus. After removing the skin and exposing the skull, we drilled a hole (0.5 mm in diameter) at the following coordinates relative to bregma AP: 1.7 mm; ML: 2.0 mm, and slowly inserted a syringe needle to a depth of 3250 μm, waited for 5 min for the tissue to stabilize and then retracted the syringe needle and inserted the optical fiber. The optical fiber was then secured to the skull with White C&B Metabond (Parkell, Inc, Edgewood, NY, USA) together with the titanium headframe.

Experimental procedure: EEG and Neuropixels recordings and cortical electrical stimulation

For detailed methods see the methods section in Claar et al.21. In summary: the day of the experiment, the mouse was placed on the running wheel and fixed to the headframe clamp with two set screws. A thin layer of Kwik-Cast was removed to expose the craniotomies and abundant ACSF was added on top of the skull to keep the exposed brain tissue hydrated. A 3D-printed cone was then lowered to prevent the mouse’s tail from contacting the probes and a black curtain was lowered over the front of the rig, placing the mouse in complete darkness and free to run or rest at its discretion. Up to three Neuropixels probes were inserted targeting MO, SS, VIS, and thalamic nuclei. We restricted our analysis of thalamic nuclei to those that had strong projections to and/or from motor and SS areas105,106: anteroventral, central lateral, mediodorsal, posterior, ventral anterior-lateral, ventral posterolateral, ventral posteromedial, and ventral medial. We refer to these collectively as the SM-TH, disregarding the distinction between first and higher order thalamic regions. In addition to recording from multiple Neuropixels probes, the 30 electrode EEG array was connected to a 32-channel head-stage (RHD 32ch, Intan Technologies, Los Angeles, California) controlled by an Open Ephys acquisition board21,107. Electrical stimulation was delivered through a custom bipolar platinum-iridium stereotrode (Microprobes for Life Science, Gaithersburg, Maryland) consisting of two parallel monopolar electrodes (50 kOhm impedance) with a vertical offset of 300 µm between the two tips. The stimulating electrode was acutely inserted using a 3-axis micromanipulator, like the Neuropixels probes, targeting secondary motor cortex (MOs), layer 5/6 (1.4 ± 0.24 mm below the brain surface). Up to 120 biphasic, charge-balanced, cathodic-first current pulses (200 μsec per phase, 3.5-4.5 sec jittered inter-stimulus interval) were delivered at three different current intensities (up to 360 pulses total). The current intensities were chosen for each animal before starting the experiment based on the following criteria: (1) the maximum stimulation intensity was selected as the maximum intensity that did not evoke any visible twitches (below 100 μA), (2) the minimum stimulation intensity was selected as the minimum intensity that evoked a visible response for most of the EEG electrodes (n > 15) for at least 20 ms following the stimulus onset, (3) the medium stimulation intensity was selected as the average between maximum and minimum stimulation intensity (High: 66.15 ± 12.11 μA; Intermediate: 47.35 ± 13.30 μA; Low: 30.59 ± 15.80 μA). For the optogenetic experiments a step function of 5 mW blue light was applied for 50 ms at 75 ms or 125 ms after the electrical stimulation onset either targeting the thalamus (Fig. 2) or targeting MOs (Fig. S8).

EEG quality control and pre-processing

Before the experiment, the EEG signals were tested by exposing the animal to visual flashes and evaluating the signal-to-noise ratio of the EEG evoked responses. Animals with low signal-to-noise ratio, high levels of 60 Hz noise, large long-lasting stimulation-related artifacts, or large movement artifacts were not included for further analyses. Experimental EEG data was then preprocessed as follows. The stimulation artifact was masked by copying the raw signal from -9 to -3 ms, reversing, and replacing it in the -3 to +3 ms artifact window. After artifact masking, EEG recordings were visually inspected to identify electrodes containing noise artifacts or remaining large and/or long-lasting stimulation artifacts. These were excluded from further analysis, removing an average of 3.9 ± 3.7 artifact-contaminated electrodes out of 30 for each subject. EEG signals from all good electrodes were high-pass filtered (0.5 highpass 3rd order Butterworth filter, signal.butter and signal.filtfilt function from Scipy—Python). Finally, the continuous EEG signals were segmented into epochs from -2 to +2 s from stimulus onset and saved for further analysis.

Neuropixels EPs pre-processing

Continuous Neuropixels LFP signals were segmented into epochs from -2 to +2 s from stimulus onset, detrend (signal.detrend function from Scipy—Python), and saved for further analysis.

To compute CSD, LFP epochs underwent an automatic channel rejection based on Chebyshev’s inequality, iteratively interpolating any channel whose amplitude instantaneously exceeded ±7 standard deviations with respect to the others (similar to Russo et al.108) The cleaned LFP voltages were smoothed in time (smoothing window = 1.6 ms) and space domain (1st smoothing window = 26 channels; 2nd smoothing window = 4 channels). The CSD was calculated as the second spatial derivative109 from the cleaned, smoothed LFP signals. The CSD formulation employed assumes an ohmic conductive medium, constant extracellular conductivity (σ = 0.3 S/m), and homogeneous in-plane neuronal activity, with the boundary condition of zero current outside the sampled area.

Neuropixels units pre-processing

Neuropixels AP raw signals were also artifact masked before being pre-processed and spike-sorted using Kilosort 2.0110 as described by Siegle, Jia et al.38. After spike sorting, any spikes that occurred during the artifact window (0 to +2 ms from stimulus onset) were removed from further analysis. High quality units were identified for further analysis using metrics described by Siegle, Jia et al.38 We classified cortical regular spiking (RS) and fast spiking (FS) neurons (putative pyramidal and inhibitory neurons, respectively) based on their spike waveform duration (RS duration > 400 μs; FS duration ≤ 400 μs)111,112,113,114,115,116. Similarly, thalamic units were classified as putative relay neurons if their spike width was above 450 μs105,117,118 and putative reticular (TRN) neurons if their spike width was below 350 μs118.

Ex vivo imaging and localization of electrodes

The day of the experiment before insertion, all Neuropixels probes and the stimulating electrode were coated with a fluorescent dye (Vybrant DiI/DiO/DiD, ThermoFisher Scientific, Waltham, MA, USA) by repeatedly immersing them in a well filled with the dye and removing each probe slowly, allowing the dye to dry on the surface. To localize the probes, we followed the procedure we extensively described in Claar et al.21. Briefly, after extracting the brains, we sliced them into 100 μm coronal sections using a vibratome (Leica VT1000S) and imaged with a fluorescent microscope (Olympus VS110/120) at 10× magnification, or whole brains were imaged using serial two-photon tomography119,120. Images of the 100 μm coronal sections were aligned to the Allen Institute Common Coordinate Framework (CCFv3) following the process detailed by McBride et al.121 and images from serial two-photon tomography were aligned to the CCFv3 following the process detailed by Oh et al.119. Fluorescent tracks corresponding to the location of the Neuropixels probes, and the stimulation electrode were manually identified in the aligned images. For each Neuropixels probe the locations of major structural boundaries along the track was manually aligned with the physiology data38,122.

Intracerebral EEG

Subjects

Subjects included in the present section were selected from a population of patients affected by drug-resistant focal epilepsy undergoing presurgical screening with intracerebral EEG (iEEG) electrodes in “C. Munari” Epilepsy Surgery Center (ASST Niguarda-Ospedale Ca’ Granda, Milan, Italy). Inclusion criteria were applied as follows: (I) adult, (II) location of one or more iEEG electrodes in premotor areas, (III) epileptogenic zone located outside the stimulated premotor site, (IV) absence of neurological and psychiatric deficits preventing the execution of the tasks (3 males and 2 females, age = 30 ± 8.12 mean ± STD; for clinical details see Table S1). No sex- or gender-based analysis was explicitly conducted in this work due to the small sample size.

All patients included in the present section provided written informed consent. The experimental protocol was approved by the local ethics committee of Milan (ID 348-24.06.2020, Milano AREA C Niguarda Hospital, Milan, Italy) in line with the Declaration of Helsinki.

Intracerebral EEG setup

iEEG was recorded from platinum-iridium semiflexible multi-contact intracerebral probes (diameter: 0.8 mm, contact length: 1.5 mm, inter-contact-spacing 2 mm; Dixi Medical, Besancon France). The number and location of the intracerebral electrodes was decided according to one or more clinical hypotheses, as described in Cossu et al. and Cardinale et al.123,124 iEEG electrodes were implanted using a robotic assistant (Neuromate, Renishaw Mayfield SA). Overall, each subject was implanted with 18 ± 1.4 electrodes (8–18 contacts per electrode; 164.6 ± 3 bipolar and 190.4 ± 1.6 monopolar contacts per patient). iEEG signal was acquired through a 192-channels amplifier (Nihon-Kohden Neurofax-1200) and sampled at 1000 Hz. Two adjacent contacts located entirely in white matter served as reference and ground.

Contacts localization

For each subject, the location of intracerebral contacts was assessed by coregistering the pre-implant 3D-T1 magnetic resonance image (MRI; Achieva 1.5 T, Philips Healthcare, Holland, Amsterdam) with the post-implant Computed Tomography (CT; O-arm 1000 system, Medtronic, Ireland, Dublin) of the subject using the FLIRT software tool125. The MRI was processed through Freesurfer126, the location of each contact was estimated using the two software SEEG Assistant127 and 3D Slicer128 and assigned to an anatomical area of the Desikan-Killany atlas129. The anatomical location of each contact was visually confirmed by a trained neurophysiologist. Stimulated contacts in premotor areas were functionally confirmed according to their ability to induce a dystonic motor response of the contralateral hand when electrically stimulated with high-frequency stimulation (50 Hz for 5 s130).

Experimental procedure

Experimental procedures were performed at Niguarda Hospital under medical supervision. During the stimulation sessions, patients were sitting on a hospital bed, and they underwent video-EEG monitoring. Electrical stimulation (square positive biphasic bipolar pulses; pulse width: 0.5 ms) was administered through a Nihon-Kohden Neurofax-1200 system (Nihon Kohden, Tokyo, Japan) and delivered between two adjacent contacts pertaining to the same electrode and located in the premotor area (Broadman area 6). Each patient underwent intracerebral stimulation at rest and during self-paced intermittent hand squeezing task contralateral to the stimulated hemisphere. The order of the conditions was randomized for each patient. Depending on the clinical timeline, each stimulation session included 26.4 ± 3.1 pulses with a stimulation frequency of 0.5 Hz. The stimulation intensity administered for each patient was selected as the highest intensity (maximum 5 mA) without inducing twitches nor subjective perceptions. No seizures occurred during the stimulation protocol.

Intracerebral EEG pre-processing

The stimulation artifact was removed through a tukey-filter15. The raw signal was filtered (1 Hz zero-phase 3rd order Butterworth highpass filter; butter and filtfilt functions from Matlab) and epoched from -700 – 1300 ms around the pulse. iEEG signal was bipolar referenced by subtracting the activity of each channel to the contiguous channel. For both monopolar and bipolar recordings, all channels and trials signals were visually inspected and rejected if electrical artifacts and/or epileptic events were present. Only the signals recorded from responding contacts (exceeding 6 standard deviations of the baseline131) located within 3 cm from the stimulated area were retained for further analyses in the region of interest (ROI). Following the standard practice we used z-scored signals7,108,132,133,134.

TMS-EEG experiments

Subjects

Subjects were recruited from a population of healthy adults and screened for eligibility (7 males and 5 females, age = 32.6 ± 11.2 mean ± STD, 2 subjects were left-handed). Participants were excluded if the medical screening indicated any of the following conditions: suspected pregnancy, presence of metal parts, clinical history suggestive of epilepsy or brain lesions, cognitive impairment preventing the execution of the tasks, recent intake of drugs with neurological effects. No sex- or gender-based analysis was explicitly conducted in this work due to the small sample size.

All subjects provided written informed consent. The experimental protocol was approved by the local ethics committee of Milan (Ethics Committee Milano Area A, Milan, Italy) in line with the Declaration of Helsinki.

TMS-EEG setup

TMS was performed using a 50/70 mm Air Cooled Focal figure-of-eight coil (Aircooled focal coil, Nexstim Plc, Finland) driven by a stimulator unit (NBS9 stimulator unit, Nexstim Plc, Finland). TMS pulses were triggered from an external trigger box (BrainProducts, Munich, DE) and delivered with a randomized inter-pulse-interval jittered between 2 and 2.3 s. The targeted site was continuously monitored on the subject 3D-T1 MRI through the real-time neuronavigation system integrated in the NBS9 system (Nexstim Plc, Helsinky, FI).

EEG signals were recorded by using TMS-compatible 64 channels EEG amplifiers (either BrainAmp MR+ and BrainAmp DC, Brain Products, Gilching, Germany) connected to a high-density 64-channel cap (EasyCap, Wörthsee, DE) whose EEG c-shaped electrodes were positioned in the standard 10–20 locations. The impedance of all electrodes was kept below 10 kΩ by applying Electro-Gel (Electro-cap International, Inc., OH, US) and EEG signals were sampled at 5000 Hz. EEG reference and ground electrodes were positioned on the subjects’ forehead.

Experimental procedure

Experimental procedures were performed at the University of Milan, Italy. Subjects laid on an electronically adjustable Nexstim chair (NBS9 chair, Nexstim Plc, Finland) wearing a high-density 64 channels EEG cap and in-ear earphones (HA-FX8, JVCKenwood Corporation, Yokohama, JP) for the administration of subject-specific masking noise to prevent TMS sound perception135. TMS was administered on the left premotor cortex (Brodmann area 6) with an inter-stimulus-interval ranging from 2 to 2.3 sec. The precise stimulation site, angle and intensity for each subject was chosen according to the criteria proposed by Casarotto et al.136 to minimize muscular artifacts and maximize cortical responses. Once the stimulation parameters have been defined, each subject underwent 3 TMS-EEG sessions for three different conditions of the right hand (contralateral to the stimulated hemisphere): resting (rest), self-paced intermittent hand squeezing of a rubber ball (active movement), and passive movement of the same hand by an experimenter (passive movement). The order of the conditions was randomized across subjects. In a subset of 5 subjects, we acquired 6 control sessions targeting either occipital and parietal areas (Broadman areas 7,17,18, and 19). For a subset of 7 subjects, we acquired an extra premotor TMS session at rest preceding the 3 randomized sessions.

Median nerve stimulation

To test whether the state-related modulation was specific to TMS evoked responses and not caused by a sensory stimulation induced by the TMS pulses themselves, we performed control experiments (10 subjects) in which we recorded the EEG response to the somatosensory stimulation of the left median nerve (somatosensory evoked potential – SSEP). The stimulation was administered through silver chloride cup electrodes placed about 5 cm apart along the median nerve on the volar side of the left forearm. The stimulated area was first scrubbed with NuPrep skin preparation gel (Weaver and Company, Denver, CO, US), then the cup electrodes were positioned using Ten20 conductive paste (Weaver and Company, Denver, CO, US) and fixed with micropore medical tape. Electrical biphasic pulses with alternating polarity were generated by an electrical stimulator (Digitimer DS10A, GB) driven by a trigger box (BrainProducts, Munich, DE) and delivered at a randomized inter-pulse-interval ranging between 2 and 2.3 sec. For each investigated condition (active movement, passive movement, and resting) we administered between 200 and 300 pulses. The order of the conditions was randomized across subjects. Stimulation intensity was determined for each subject as 90% of the motor threshold (i.e. the threshold inducing motor twitches for 50% of the delivered pulses). For a subset of 7 subjects an extra control session at rest was collected preceding the other 3 sessions.

TMS-EEG and SSEP pre-processing

EEG signals pre-processing was performed using a custom-written Matlab (The MathWorks) pipeline similar to the one described by Fecchio et al.137. For each EEG channel, we removed TMS and SSEP stimulation artifacts by replacing the signal in the 8 ms following the pulse with the mirrored signal from the 8 ms preceding the pulse. A high-pass filter was then applied (1 Hz 3rd order high-pass Butterworth filter, butter and filtfilt functions from Matlab). Channels and trials were visually inspected and rejected if contaminated by artifacts and the remaining good signals were re-referenced to the common average. EEG signals were then epoched from -600 to +600 ms around the pulse, and each epoch was lowpass filtered (Antialiasing Chebychev Type I IIR 8th order filter) and downsampled from 5000 Hz to 1250 Hz (decimate function from Matlab). Independent Component Analysis (runica function from Matlab) was used to remove the following EEG artifacts: eye movements, muscle activity, TMS decay. Finally, EEG epochs were filtered (1–45 Hz 3rd order Butterworth bandpass filter; 50 Hz notch 3rd order Butterworth filter; butter and filtfilt functions from Matlab).

In silico experiments

In silico model of thalamocortical responses to cortical stimulation

For the in silico experiments, we used the model based on our previous works (for model details see ref. 46). The model included a cortical network with 500 pyramidal neurons (PY) and 100 inhibitory neurons (IN), while the thalamus included 100 thalamocortical neurons (TC) and 100 reticular thalamic neurons (TRN). PY neurons were simulated using a two-compartment model, constituted by a dendritic and a somato-axonal compartment. Conversely, IN, TC, and TRN neurons were simulated using a single-compartment model. The synaptic connectivity between different cell types is given in Fig. 4A. Briefly, the connectivity within and between neuron types was implemented by simulating AMPA, NMDA, GABA-A, and GABA-B synapses with local connectivity using a grid-like structure.

For the purposes of this study, we added the simulation of the two conditions: rest and active state. The potassium leak currents, synaptic connection strengths and rate of random mini excitatory post synaptic potentials (miniEPSPs) of cortical and thalamic connections were identified for rest condition such that the simulated baseline firing rate was comparable in terms of order of magnitude to baseline firing rate of the mouse in vivo resting state data and based on the acetylcholine tone during rest in previous experiments49,50,51. The active condition was then simulated by increasing miniEPSPs to thalamocortical and reticular neurons by 66.7% (both from 30 mS/cm2 to 50 mS/cm2) and by reducing the potassium leak current by 26% (acetylcholine level from 1.3 to 1).

We simulated a total of 30 trials of 15 s, constituted by 15 rest trials and 15 active trials. For each trial, the stimulation was administered as a single impulse (duration: 1 ms; intensity: 100 μA) to 50% of the cortical neurons located in the center of the series (i.e. PY neurons 125–375; IN neurons 25–75). Each pulse was delivered between 8 and 9.75 s (with a time difference across trials of 125 ms) from the beginning of the simulation considered to be the time zero.

Preprocessing of in silico thalamocortical responses

Trials were split in epochs from -2 to +2 seconds around the stimulation onset. Like the mouse in vivo analyses, responsive neurons were identified as the neurons with a significant modulation of the intracellular voltage ( ± 5 standard deviations) in the time window between 0 ms and 250 ms post-stimulus onset with respect to the baseline. We then defined two response time windows: an early response window (0–50 ms) and a late response window (75–250 ms). The early time window was used to identify the percentage of responsive trial for each thalamic unit defined as the number of trials with the presence of a spike divided by the total number of trials (i.e. 30 trials, 15 during rest and 15 during active state). The same early time window was used to evaluate the early response latency for cortical neurons (at 0 ms by definition) and for thalamic neurons, calculated as the median of the first spike latency across units. The same computation was applied to the late response window (75–250 ms) to calculate the rebound latencies of cortical and thalamic neurons. For the late response window, we also evaluated: the evoked thalamic inter-spike interval (ISI), calculated for each TC neuron as the time difference between the first two spikes in the rebound response; the evoked thalamic firing rate, calculated as the inverse of the ISI; and the response onset variability (ROV), assessed for each trial as the standard deviation of the first spike latency across units and then averaged across all trials. Thalamic units were separated into high-firing (HF) and low-firing (LF) units according to the same evoked ISI threshold found in the mice data (i.e. 17.88 ms, Fig. 3A).

Data analysis

Evoked potentials (EPs) analyses

Across each mouse experiment, trials were classified by the behavioral state of the animal: quiet wakefulness, if the mouse’s speed (measured by the wheel’s angular velocity) was <0.1 cm/s from -0.5 to +0.5 from the stimulus onset; active state, if the mouse’s speed was >0.1 cm/s. For human experiments, rest and active conditions were a-priori identified by the task performed during each session.

The following analyses were applied on human EEG (ROI contacts), mouse EEG (all contacts), human monopolar and bipolar iEEG (ROI contacts), and mouse LFP and CSD (MOs contacts). The rectified amplitude of the response for each condition was computed as the absolute value of the EPs in the window of interest (early response: 3–50 ms; late response: 150–250 ms). For human and mouse EEG, mouse LFP and mouse CSD recordings, the rectified amplitude for each subject was computed as the average rectified EPs across channels.

The phase locking factor (PLF) for each condition was computed as described by Sinkkonen et al.37 In brief, the time-resolved phase of each recording site was obtained from the Hilbert transform of each single-trial signal divided by its absolute value and averaged across trials. As such, PLF captures the phase consistency across trials in an amplitude-independent and time-resolved manner. Then, single-channel PLF was computed by averaging the absolute value of the phase-vector in the window of interest (early response: 3–50 ms; late response: 150–250 ms). For human and mouse EEG, mouse LFP and mouse CSD recordings, the PLF for each subject was computed as the average PLF across channels.

EPs statistical analysis

Active EPs were compared to rest EPs in terms of both rectified amplitude and PLF of the evoked response. For human EEG, mouse EEG, mouse LFP, and mouse CSD, the average rectified amplitude of the response evoked in each session during active state was compared to the rectified amplitude of the average evoked response at rest through Wilcoxon signed rank test (wilcoxon and stats.wilcoxon functions from Matlab and Scipy—Python, respectively). For human iEEG signals, the squeezing hand task was compared to rest in terms of rectified amplitude and PLF through generalized mixed effects models (R 1.4.1717 - lmer function from lmerTest; formula: Amplitude ~ Condition + (1 | SubjectID); PLF ~Condition + (1 | SubjectID)). To compare the LFP peak latency in optogenetic experiments, we used a one-way ANOVA (stat.anova_stat from Scipy - Python) and post-hoc comparisons were performed using a Tukey test (stat. tukey_hsd from Scipy - Python).

Unit analyses

The instantaneous firing rate response of each unit was computed through an adaptive kernel algorithm for firing estimation138. Units were considered responsive if their response to the stimulation (3–500 ms from stimulation onset) exceeded ±7 standard deviations of the baseline (-500–-50 ms) firing rate. Average firing rates were computed as the average number of spikes in the time window of interest for each trial divided by the time window length.

The latency of units’ response was quantified as the median latency of the first spike in the window of interest across trials. The evoked response onset variability (ROV) was assessed as the standard deviation of the first spike latency across units for each trial.

The evoked inter-spike-interval (ISI) was quantified as the median across trials of the latency between the first spike and the subsequent spike in the time window of interest. The evoked response frequency was assessed as the reciprocal of the evoked inter-spike-interval (ISI) in the time window of interest (i.e. early response: 3–50 ms; late response: 150–250 ms).

A data-driven cluster analysis (number of clusters confirmed with Elbow method, Calinski-Harabasz score, and Davies-Bouldin score; metrics.calinski_harabasz_score and metrics.davies_bouldin_score functions from sklearn—Python) performed on the rebound ISI distribution of the thalamic relay units identified two distinct types of rebound activity here referred to as high-firing (HF) and low-firing (LF).

Cross-correlograms were computed by binning (bin size = 2 ms) the absolute value of the triangular matrix of the delay between each spike for each pair of neurons divided by the number of seed spikes. Statistical tests were computed on the cross-correlation values obtained as the average of the instantaneous cross-correlation over the first 10 ms (i.e. 5 bins).

Unit statistical analyses

The active condition was compared to rest in terms of units evoked firing rate through a Wilcoxon signed rank test (stats.wilcoxon function from Scipy - Python). Putative thalamic relay units were separated into high-firing (HF) and low-firing (LF) units through a data-driven cluster analysis (cluster.KMeans from sklearn - Python) of the ISI of the evoked response in the late time window (150–250 ms from stimulation onset). Comparison between rest and active condition for HF and LF units in terms of baseline firing rate, response frequency, and response onset variability was performed through Wilcoxon signed rank tests (stats.wilcoxon function from Scipy - Python) and Bonferroni corrected for multiple comparison (stats.multitest.multipletests function from statsmodels - Python). The statistical comparison between cross-correlation values was computed through Wilcoxon signed rank tests (stats.wilcoxon function from Scipy - Python).

Correlation of baseline firing rate with response frequency and response onset variability for HF and LF units was performed through generalized mixed effects models (smf.mixedlm function from statmodels—Python; Formula: UnitFeature ~BaselineFr + (1 | MouseID)). Similarly, correlation of response frequency and response onset variability for HF and LF units with evoked EEG rectified amplitude was performed through a mixed effect model (smf.mixedlm function from statmodels—Python; Formula: EEG Amplitude ~ResponseFrequencyHF + ResponseVariabilityHF + ResponseFrequencyLF + ResponseVariabilityLF + (1 | MouseID)).

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.