Introduction

Non-invasive brain stimulation techniques, like repetitive transcranial magnetic stimulation (rTMS), hold promise for pain management1,2,3. Both the motor cortex (M1) and dorsolateral prefrontal cortex (DLPFC) are common targets for neuromodulation in pain processing. Currently, high-frequency M1-rTMS is recommended for its notable analgesic effect in neuropathic pain2, while the therapeutic potential of DLPFC stimulation is under scrutiny4,5, initially prompted by its success in depression treatment and the observed link between depression and pain6. A multicenter sham-controlled trial found high-frequency M1-rTMS, but not DLPFC-rTMS, superior to sham-rTMS in alleviating neuropathic pain7. Yet, studies diverge; some studies suggest similar efficacy for both M1 and DLPFC stimulation8,9, while others indicate significant analgesia solely with DLPFC-rTMS, not M1-rTMS10,11. Mechanistically, M1-rTMS is hypothesized to modulate pain via corticothalamic tracts, exerting inhibitory influence on thalamic pain processing and transmission12,13; DLPFC stimulation’s analgesic effects may stem from activating descending pain inhibitory pathways via connections with various cortical and subcortical regions14,15,16. Despite these hypotheses, a comprehensive comparison of high-frequency rTMS targeting M1 versus DLPFC on nociceptive processing remains elusive.

The experience of pain is largely dependent on the process of anticipation17,18, a process that involves the participation of the DLPFC and M119,20,21. This suggests that high-frequency rTMS stimulation of the DLPFC and M1 may modulate pain perception by regulating pain anticipation. Anticipating pain is a preparatory mechanism, observed across species, facilitating proactive responses to potential threats and aiding in the avoidance of bodily harm through adaptive behaviors22. This anticipatory coping mechanism has been associated with the suppression of α-oscillations recorded over the local sensorimotor region contralateral to the pain side23,24,25, indicating the sensorimotor cortex’s readiness to respond to impending pain. While anticipating an impending pain, the DLPFC exerts descending pain regulatory effects over brain regions like the cingulate cortex, thalamus, and periaqueductal gray14,15,26,27, preparing individuals for forthcoming pain and potentially enhancing their ability to modulate the pain experience. This highlights the different roles of M1 and DLPFC in pain anticipation: M1 primarily suppresses local α-oscillations, while DLPFC regulates global functional connectivity to respond to impending pain.

Here, this study aimed to characterize how high-frequency rTMS targeting either the M1 or DLPFC modulates pain anticipation processes, thereby influencing pain perception. We hypothesized that M1-rTMS and DLPFC-rTMS would induce distinct changes in pain anticipation. Specifically, M1-rTMS was expected to modulate anticipatory α-oscillations in local sensorimotor regions, reflecting neural readiness for impending pain and subsequently altering subjective pain perception23,24,25. In contrast, DLPFC-rTMS may influence global brain network configurations during anticipation, as indicated by EEG microstate dynamics28,29,30, potentially leading to a reduction in pain perception.

Results

Participants were randomly assigned to M1, DLPFC, or sham groups using a random allocation sequence. As depicted in Fig. 1A, participants first completed pain-related questionnaires to assess their pain sensitivity and psychological responses to pain. These pain-related profiles along with demographic characteristics of participants were effectively equated across the three groups, as outlined in Table 1. Following this, they received rTMS and performed a pain-rating task before (T0), immediately after (T1), and 60 min post (T2) rTMS application. During the task (Fig. 1B), noxious laser stimuli were applied to the dorsum of the right hand, and participants rated pain intensity and unpleasantness using a 0–10 numerical rating scale (NRS). Prior to the task, we determined individual stimulus intensity eliciting moderate pain perception (NRS = 6) through calibration. No participants requested the termination of stimulation, and the experimental protocol was well-tolerated.

Fig. 1: Schematic illustration of the experimental procedure.
figure 1

A Overview of the experimental procedure. A total of 120 participants were randomly allocated to receive a single-session M1-rTMS, DLPFC-rTMS or sham stimulation. The rTMS stimulation was delivered by a figure-of-eight coil at the hand region of the left M1 for the M1 group, and at the F3 site of the International 10–20 EEG system for the DLPFC group. Before (T0), immediately after (T1), and 60 min after (T2) rTMS application, participants completed a pain-rating task that lasted about 12 min. During the task, a series of nociceptive laser stimuli were delivered to the dorsum of the right hand. Before the T0 session, laser stimulations in the task were calibrated individually to induce a painful but tolerable stimulation level (level 6). B Trial structure of the pain-rating task. Each trial began with a visual cue (a fixation) lasting 2 s, followed by a blank screen for 8 to 12 s. Then, a noxious laser stimulus was delivered to the hand dorsum. Followingly, participants were prompted to rate the pain intensity and unpleasantness evoked by the laser stimulation on a 0 to 10 numerical rating scale, with 0 indicating no pain/unpleasantness and 10 indicating unbearable pain/unpleasantness. Pain anticipation occurs between the presentation of a visual cue and the application of laser stimulation, while pain perception begins after the laser is delivered.

Table 1 Demographic and psychometrical variables for participants in different groups

rTMS effects on laser-evoked responses

Figure 2A illustrates the immediate and delayed effects of rTMS on perceived pain ratings, with relevant statistics summarized in Table 2. A significant main effect of Group was found only for the delayed effects of rTMS on pain intensity ratings (F2, 112 = 4.14, p = 0.018, ηp² = 0.07), but not for the immediate effects (F2, 112 = 1.70, p = 0.19, ηp² = 0.03). It indicates a more pronounced reduction in ratings after DLPFC-rTMS compared to sham stimulation (p = 0.045) and M1-rTMS (p = 0.042). This highlights a delayed analgesic effect of DLPFC-rTMS in mitigating laser-evoked pain intensity ratings. However, the analysis of unpleasantness ratings indicated comparable outcomes across all three groups for both immediate (F2, 112 = 0.18, p = 0.83, ηp² = 0.003) and delayed (F2, 112 = 1.89, p = 0.16, ηp² = 0.03) effects. These results indicate that high-frequency rTMS, whether applied to M1 or DLPFC, did not significantly influence the subjective unpleasantness of pain stimuli.

Fig. 2: rTMS effects on laser-evoked responses.
figure 2

A Immediate and delayed effects of rTMS perceived pain intensity and unpleasantness. Raincloud plots combine violin plots that show the probability density function of the data, box plots, means (diamonds), and individual data points. Box plots depict the interquartile ranges and medians (black lines). Compared with the sham stimulation, DLPFC-rTMS led to a delayed analgesic effect on attenuating pain intensity. B Immediate and delayed effects of rTMS on laser-evoked potentials (LEPs). The displayed signals were measured at central electrodes (Cz, C1, C2, CPz; marked using enlarged white dots). The latency intervals indicating N2 and P2 components on the differential waveforms are marked using gray rectangles. Scalp topographies of N2 and P2 amplitude changes indicate a general decrease in LEP amplitude, particularly for the DPFC and M1 groups. C Comparisons of changes in the N2 and P2 amplitudes among groups. Compared with sham stimulation, M1-rTMS led to an immediate effect on attenuating P2 amplitudes while DLPFC-rTMS led to a delayed effect on attenuating both N2 and P2 amplitudes. *p < 0.05.

Table 2 Statistics of the immediate and delayed effects of rTMS on behavioral and neurophysiological measurements

The grand average laser-evoked potential (LEP) waveforms and topographies of N2 and P2 component amplitudes for each group and time point, along with their corresponding statistics, are presented in Supplementary Fig. S1. Overall, N2 and P2 amplitudes decreased following rTMS, with the reduction being more pronounced in the M1 and DLPFC groups. Differential LEP waveforms, illustrating changes after rTMS, are depicted in Fig. 2B, with amplitude change statistics summarized in Fig. 2C.

For the immediate effects, a significant main effect of Group was observed only in the P2 amplitude (F2, 112 = 3.50, p = 0.034, ηp² = 0.06), indicating a more pronounced amplitude reduction after M1-rTMS stimulation compared to sham stimulation (p = 0.034). This highlights an immediate analgesic effect of M1-rTMS in mitigating the P2 wave in LEPs. In terms of the delayed effects, significant main effects of Group were observed for amplitudes of N2 (F2, 112 = 3.29, p = 0.041, ηp² = 0.06) and P2 (F2, 112 = 4.21, p = 0.017, ηp² = 0.07) components. Post hoc comparisons indicated that amplitudes attenuated more after DLPFC-rTMS stimulation compared to sham stimulation (N2: p = 0.036; P2: p = 0.050). In addition, P2 amplitudes attenuated more after DLPFC-rTMS than after M1-rTMS (p = 0.034). This underscores a delayed analgesic effect of DLPFC-rTMS in mitigating the N2-P2 complex in LEPs.

rTMS effects on anticipatory EEG oscillation

The anticipatory EEG spectra for each group and time point, along with sensorimotor α-oscillation power statistics, are displayed in Supplementary Fig. S2. Overall, α-oscillation power increased after rTMS. To compare changes in anticipatory EEG spectra across groups, differential spectra are shown in Fig. 3A, with the effects of rTMS on sensorimotor α-oscillation power detailed in Fig. 3B. While changes in the sensorimotor α1-oscillation power were comparable among the three groups, analysis revealed main effects of Group on both immediate and delayed effects on sensorimotor α2-oscillation power (immediate: F2, 112 = 3.45, p = 0.035, ηp² = 0.06; delayed: F2, 112 = 5.24, p = 0.007, ηp² = 0.09). Post hoc comparisons revealed that compared with sham stimulation, α2-oscillation power increased more immediately (p = 0.033) or 60 min (p = 0.005) after M1-rTMS. This highlights the effect of M1-rTMS in augmenting sensorimotor α2-oscillation power while anticipating the impending painful event.

Fig. 3: rTMS effects on anticipatory EEG oscillations.
figure 3

A Anticipatory EEG spectra. Grand average of immediate (T1‒T0) and delayed (T2‒T0) effects of rTMS on anticipatory EEG spectra are showed for M1, DLPFC and sham groups. The displayed signals were measured at left sensorimotor electrodes (FC5, FC3, C5, C3, CP5, CP3; marked using enlarged white dots). The α1 and α2 frequency intervals are marked using gray rectangles on the waveforms. Scalp topographies of α1- and α2-oscillation power changes indicate a general increase in EEG oscillation power, particularly over the sensorimotor region. B Comparisons of sensorimotor α-oscillation power. Raincloud plots combine violin plots that show the probability density function of the data, box plots, means (diamonds), and individual data points. Box plots depict the interquartile ranges and medians (black lines). Compared with sham stimulation, M1-rTMS led to immediate and delayed effects on increasing sensorimotor α2-oscillation power. *p < 0.05, **p < 0.01.

Immediate and delayed effects on peak alpha frequency (PAF) in each group was illustrated in Fig. 4A. For the immediate effects, one anterior electrode cluster (F3, F4, F6, FC1, FC2, FCz, C1, C2, Cz) showed a significant modulation by the Group effect, which passed the correction of false discovery rate (FDR)31. However, analysis of delayed effects failed to identify the electrode cluster that could pass the FDR. Post hoc comparisons indicated that, compared to sham stimulation, M1-rTMS led to a more substantial elevation of anterior PAF (p = 0.001; Fig. 4B), and this effect persisted for 60 min after rTMS application (p = 0.010). This underscores the impact of M1-rTMS on elevating anterior PAF while anticipating upcoming pain.

Fig. 4: rTMS effects on peak alpha frequency (PAF).
figure 4

A Immediate and delayed effects of rTMS on PAF. The grand average scalp distributions illustrating immediate (T1‒T0) and delayed (T2‒T0) changes in PAF are presented for each group. An electrode-by-electrode analysis using one-way ANOVA with Group as a between-participant factor identified a significant anterior electrode cluster (F3, F4, F6, FC1, FC2, FCz, C1, C2, and Cz, indicated by white dots and FDR-corrected) where immediate changes in PAF differed significantly among the three groups. However, no electrode cluster demonstrated significant differences for the delayed effects on PAF after applying FDR correction. B Comparisons of PAF. Raincloud plots combine violin plots that show the probability density function of the data, box plots, means (diamonds), and individual data points. Box plots depict the interquartile ranges and medians (black lines). Compared with sham stimulation, M1-rTMS had immediate and delayed effects in enhancing anterior PAF. C Scatterplot of M1-rTMS effects on anterior PAF and sensorimotor α2-oscillation power. The changes in sensorimotor α2-oscillation power and anterior PAF were quantified as the average of immediate and delayed rTMS effects ([T1 + T2]/2 ‒ T0). Each colored dot in the scatter plots represents a single participant. The black line represents the best linear fit for the data. The gray shaded area represents the 95% confidential area. D The mediating role of sensorimotor α2-oscillation power on M1-rTMS effects that had on anterior PAF. The independent variable (X) was M1-rTMS (1 for M1 group, and ‒1 for sham group). The dependent variable (Y) was the changes in anterior PAF following rTMS ([T1 + T2]/2 ‒ T0). The mediator (M) was the changes in sensorimotor α2-oscillation power following rTMS ([T1 + T2]/2 ‒ T0). Values shown are standardized regression coefficients. *p < 0.05, **p < 0.01, ***p < 0.001.

Compared to sham stimulation, M1-rTMS immediately increased sensorimotor α2-oscillation power and anterior PAF during pain anticipation, while reducing the amplitude of the laser-evoked P2 component during pain perception. Correlation analysis among these variables (three variables, three comparisons) revealed a significant relationship between the effects of M1-rTMS on anterior PAF and sensorimotor α2-oscillation power (r76 = 0.75, p < 0.001, FDR corrected; Fig. 4C). Both were quantified as changes after rTMS application ([T1 + T2]/2 ‒ T0). Mediation analysis further revealed that M1-rTMS indirectly elevating anterior PAF via augmented sensorimotor α2-oscillation power (a*b = 0.04, SE = 0.02, confidence interval [CI] = [0.01, 0.07]; Fig. 4D). The mediating effect accounted for 51.95% of the total effect. This result suggests that M1-rTMS indirectly elevated anterior PAF via the modulation of local sensorimotor α2-oscillation power.

rTMS effects on anticipatory EEG microstates

The topographies of the four microstate classes, as shown in Fig. 5, are consistent across the three experimental groups. The statistics for immediate and delayed effects on microstates are presented in Fig. 5A (mean duration) and Supplementary Fig. S3 (occurrence and time coverage). Only the delayed effects on the mean duration of microstate C exhibited a significant main effect of Group (F2, 112 = 7.09, p = 0.001, ηp² = 0.11), indicating increased mean duration of microstate C following DLPFC-rTMS compared to sham stimulation (p = 0.004) and M1-rTMS (p = 0.005). Hence, DLPFC-rTMS led to a delayed effect on heightening the presence of microstate C that has been linked the function of default mode network.

Fig. 5: rTMS effects on prestimulus EEG microstates.
figure 5

A Topographies of microstates. The spatial configuration of the 4 microstate classes resembled the 4 well-known “canonical” microstate classes and were labeled with the letters A through D accordingly. Immediate (T1‒T0) and delayed (T2‒T0) effects of rTMS on microstate mean duration were compared among the M1, DLPFC and sham groups. Raincloud plots combine violin plots that show the probability density function of the data, box plots, means (diamonds), and individual data points. Box plots depict the interquartile ranges and medians (black lines). Compared with sham stimulation, DLPFC-rTMS led to a delayed effect on elevating the duration of microstate C. B Scatterplot of DLPFC-rTMS delayed effects on Microstate C duration and pain intensity. Each colored dot in the scatter plots represents a single participant. The black line represents the best linear fit for the data. The gray shaded area represents the 95% confidential area. C The mediating role of microstate C mean duration in the delayed effect of DLPFC-rTMS that had on pain intensity. The independent variable (X) was DLPFC-rTMS (1 for DLPFC group, and ‒1 for sham group). The dependent variable (Y) was the delayed effect of DLPFC-rTMS on laser-evoked pain intensity ratings. The mediator (M) was the delayed effect of DLPFC-rTMS on microstate C mean duration. Values shown are standardized regression coefficients. *p < 0.05. **p < 0.01.

Compared to sham stimulation, DLPFC-rTMS had delayed effects, including increased microstate C duration during pain anticipation and reduced laser-evoked pain intensity ratings and N2-P2 amplitude during pain perception. Correlation analysis among these variables (four variables, six comparisons) revealed a significant negative correlation between rTMS effects on microstate C duration and pain intensity ratings (r76 = ‒0.36, p = 0.001, FDR corrected; Fig. 5B). Mediation analysis further showed that DLPFC-rTMS indirectly attenuated pain intensity by improving the mean duration of microstate C (a*b = −0.16, SE = 0.10, CI = [−0.32, −0.03]; Fig. 5C). The mediating effect accounted for 36.90% of the total effect. Hence, analgesic effect of DLPFC-rTMS may be attributed to the modulation of microstate C that relates to default mode network.

Discussion

Using a double-blind, sham-controlled experimental design, this study demonstrates that high-frequency rTMS targeting the M1 and DLPFC induces analgesic effects by attenuating laser-evoked responses, albeit with distinct temporal courses and neural mechanisms. Specifically, high-frequency rTMS over the M1 has an immediate effect on laser-evoked P2 component, likely due to its ability to modulate cortical α-oscillation power and frequency during the anticipation of impending pain. In contrast, high-frequency rTMS over the DLPFC manifests a delayed analgesic effect, observed in the mitigation of laser-evoked pain intensity ratings and the N2-P2 complex. This delayed effect is possibly attributed to its impact on increasing the duration of microstate C, a microstate linked to the processing of internally self-referential information.

Prior research has shown that rTMS can induce lasting cortical modulation32. In this study, we applied 10 Hz rTMS targeting either the M1 or the DLPFC to explore their immediate and delayed analgesic effects on acute nociceptive pain. Our results revealed a significant reduction in laser-evoked pain intensity ratings 60 min after DLPFC-rTMS. Generally, repeated laser stimulation resulted in decreased pain ratings, potentially due to an increased perception of pain controllability. DLPFC activation during controllable pain has been correlated with decreased activity in the insula and thalamus, highlighting DLPFC’s role in mediating pain inhibition when pain is perceived as controllable33. This implies that DLPFC-rTMS may enhance the sense of controllability, thereby promoting greater pain inhibition. Supporting this analgesic effect, DLPFC-rTMS also resulted in a delayed reduction in the amplitudes of the laser-evoked N2-P2 complex. LEPs are valuable for assessing thin fiber and spino-thalamic function due to their selective activation of the spino-thalamic pathway34. The N2-P2 complex, a key feature of LEPs, involves multiple brain generators35,36: N2 component originates from the bilateral operculo-insular cortices and anterior cingulate cortex (ACC), while the P2 component primarily arises from the ACC. This indicates that DLPFC-rTMS influenced brain regions involved in nociceptive processing, particularly the ACC (the main generator of N2 and P2 waves) and the operculo-insular cortex (contributing to the N2 wave).

In contrast, M1-rTMS did not significantly affect subjective pain ratings in either the immediate or delayed test phases. This finding aligns with some studies that found no change in heat pain perception compared to placebo8,37, though others have reported reduced heat pain following M1-rTMS38,39. More consistent analgesic effects of M1-rTMS have been observed with cold pain, such as increased cold pain thresholds8,40,41. This suggests that the type of pain modality may influence the effectiveness of M1-rTMS12, with a stronger impact on cold pain detected by cold-sensitive receptors. Further research is needed to explore this hypothesis across different pain modalities. Notably, M1-rTMS significantly reduced the laser-evoked P2 amplitude, which component originates from the ACC35,36 and is associated with involuntary attention capture by nociceptive events42. Thus, while M1-rTMS may not affect conscious pain evaluation, it appears to reduce attentional engagement towards novel nociceptive events. This suggests that M1-rTMS influences pain perception at a neurophysiological level in healthy individuals, even if these changes do not directly translate into altered pain ratings. These findings underscore the complexity of pain as a multidimensional experience43 involving distinct neural circuits that collectively shape pain perception.

To evaluate the impact of high-frequency rTMS on pain anticipation, we compared changes in EEG activity following presentation of pain-predictive cues, but before painful stimuli delivery. We focused on anticipatory sensorimotor α-oscillations, reflecting preparatory mechanisms of the sensorimotor cortex23. These α-oscillations comprise both α1-oscillations linked to general alertness and α2-oscillations regulating task-specific sensorimotor processes24,44. Our results revealed that M1-rTMS increased sensorimotor α2-oscillation power compared to sham stimulation, with effects lasting up to 60 min post-stimulation. Notably, cortical α-oscillation power inversely correlates with both blood-oxygen-level-dependent signal and cortical excitability45,46. Increased α-oscillation power suggests functional inhibition of cortical regions responsive to irrelevant information during task engagement47,48. It implies that M1-rTMS inhibited the sensorimotor cortex during anticipation of an impending pain, indicating a reduction in preparatory mechanisms within the sensorimotor cortex.

Beyond power or amplitude, frequency is another crucial characteristic of EEG α-oscillations. The frequency of α-oscillation reflects an internal brain clock controlling information processing speed; a faster internal clock (higher PAF) corresponds to quicker cognitive processing, such as cognitive control49. Inter-subject differences in PAF are linked to cognitive and memory performance variations50. Not only a “trait” variable, PAF is also a “state” variable, reflecting intra-subject fluctuations in moment-to-moment performance. It increases with cognitive demands and task engagement51,52, indicating task-induced modulation. Here, our findings showed elevated PAF at anterior electrodes following M1-rTMS compared to sham stimulation. This frequency shift induced by M1-rTMS may indicate increased engagement of the prefrontal cortex and heightened cognitive control during anticipation of impending pain. Importantly, M1-rTMS elevated anterior PAF by enhancing sensorimotor α2-oscillations. Thus, M1-rTMS indirectly accelerated α-oscillations at the prefrontal cortex by inhibiting cortical excitability in the local sensorimotor cortex.

Microstate analysis considers EEG signals from the entire brain simultaneously, providing a global representation of functional states and enabling the study of whole-brain neuronal networks53,54. Here, we applied microstate analysis to EEG data recorded during pain anticipation to assess how rTMS influenced large-scale whole-brain network function. Compared to sham and M1-rTMS stimulation, we found that the mean duration of microstate C, characterized by a symmetric anterior-to-posterior configuration, increased 60 min after DLPFC-rTMS application. This increase in microstate C duration could explain its analgesic effect on pain intensity ratings, providing a mechanism underlying DLPFC-rTMS’s analgesic effects. Previous studies using source imaging techniques or combined EEG-fMRI have reported activity for microstate C in regions overlapping with the default mode network’s ‘self-experience’ subnetwork55,56. Its duration and occurrence decreased during arithmetic tasks compared to no-task rest and autobiographical memory tasks, suggesting its involvement in cognitive processing of personally significant information and self-reflection57,58. Hence, DLPFC-rTMS-induced analgesia may arise from modulation of the default mode network that involves in self-referential internal mentation59.

Taken together, we observed distinct timing in the analgesic effects of M1-rTMS and DLPFC-rTMS on pain anticipation and perception: M1-rTMS had an immediate impact on anticipatory α-oscillations and nociceptive processing, whereas DLPFC-rTMS exerted a delayed effect on global brain networks and nociceptive pain. One possible explanation is the distinct functional roles and connectivity patterns of the stimulated brain regions. M1 has direct connections to primary somatosensory regions60, facilitating rapid changes in pain perception following stimulation. In contrast, the DLPFC is considered a key node in networks implicated in nociceptive processing and pain modulation15, requiring time for distributed networks to integrate and modulate pain processing. Another explanation lies in the different neuropharmacological mechanisms of action for the analgesic effects of M1/DLPFC rTMS61. Naloxone injection significantly decreases M1-rTMS-induced analgesia but does not affect DLPFC-rTMS effects40, indicating involvement of endogenous opioid systems selectively in M1-rTMS-induced analgesia. On the other hand, rTMS of the left DLPFC can evoke the release of striatal dopamine in humans62. These evidences imply that neuroplastic changes induced by M1/DLPFC rTMS could be through synaptic potentiation mechanisms involving different neurotransmitters.

The distinct timing and neural mechanisms of M1-rTMS and DLPFC-rTMS provide valuable insights for personalized pain treatment strategies. M1-rTMS offers immediate effect on pain processing, while DLPFC-rTMS has a delayed effect, suggesting that treatment could be tailored based on the desired timing of relief. Both techniques influence pain anticipation, suggesting potential for preventing future pain. Furthermore, identifying EEG biomarkers associated with rTMS effects could enhance treatment precision by enabling objective monitoring and individual outcome prediction, ultimately improving patient care.

Conclusion

This study shows that high-frequency rTMS targeting M1 and DLPFC has distinct, time-dependent effects on pain anticipation and perception. M1-rTMS has immediate effects on modulating cortical α-oscillations during pain anticipation and nociceptive processing, while DLPFC-rTMS exerts delayed effects on the global brain networks during anticipation, as well as on nociceptive processing and pain perception. These findings deepen our understanding of rTMS analgesic mechanisms and offer a scientific basis for selecting specific rTMS targets in clinical practice, highlighting the role of different brain regions in pain modulation.

Methods

Participants

A total of 120 healthy participants were recruited for this study (65 females, mean age ± SEM = 20.36 ± 0.20 years). These participants were randomly allocated into the M1, DLPFC, or sham group (n = 40 per group). None of the participants reported any medical conditions related to acute or chronic pain, cardiovascular or neurological diseases, psychiatric disorders, current use of medication, or any contraindications for TMS application. Data from five participants were excluded due to incomplete records or excessive EEG artifacts (n = 1 in the DLPFC group, n = 1 in the M1 group, and n = 3 in the sham group), resulting in a final sample of 115 participants for analysis. All participants provided written informed consent before the experiments, adhering to the principles of the Declaration of Helsinki. The experimental procedures were approved by the Ethics Committee of the Medical School of Shenzhen University. All ethical regulations relevant to human research participants were followed.

Assessment of pain-related profiles

Before the experiment, participants completed several pain-related questionnaires to assess their pain sensitivity and psychological responses to pain. Specifically, the fear of pain questionnaire assessed fear-related behaviors63; the pain catastrophizing scale measured catastrophic thinking64; the pain sensitivity questionnaire evaluated subjective pain perception in daily life65; the pain vigilance and awareness questionnaire captured attention and vigilance towards pain66; and the pain anxiety symptoms scale assessed fear and anxiety specific to pain67.

rTMS administration

We employed a double-blinded, sham-controlled experimental design, overseen by two experimenters: one overseeing pain assessment and data analysis, and the other administering rTMS.

We utilized a figure-eight-shaped air-cooled coil connected to a Magstim Rapid2 system for both single-pulse TMS and rTMS delivery. Resting motor threshold (RMT) determination involved applying single-pulse TMS to the left M1 with the coil angled at 45° relative to the midline. RMT was defined as the minimum intensity eliciting at least three out of five motor evoked potentials (MEPs) >0.05 mV in amplitude in the relaxed first dorsal interosseous muscles68.

For rTMS, we delivered 15 trains of 10-s stimulation at 10 Hz, with a 20-s inter-train interval, totaling 1500 pulses4. rTMS targeted either the left M1 or DLPFC at 80% of RMT intensity. Coil placement was over the hand region of the left M1 for the M1 group and at the F3 electrode for the DLPFC group69. In the sham group, the coil was positioned vertically 90° to the skull surface over either the M1 or DLPFC, without inducing MEPs but producing scalp nerve and muscle sensations70.

Pain-rating task

The pain-rating task’s single-trial structure is depicted in Fig. 1B. Each trial commenced with a visual cue with 2-s duration, followed by an 8 to 12 s blank screen. A noxious laser (radiant-heat) stimulus was then administered to the dorsum of the right hand, which was generated using an infrared neodymium yttrium aluminum perovskite (Nd:YAP) laser with a wavelength of 1.34 μm and a pulse duration of 4 ms (Electronical Engineering, Italy). After a 2-s blank interval, participants verbally reported perceived pain intensity and unpleasantness on the predefined 0–10 NRS. The inter-trial interval was maintained at 2–4 s. Each session of the task comprised 30 trials and lasted ~12 min. The target region of the laser was manually shifted by at least 1 cm in a random direction after each stimulation.

EEG data recording

Continuous EEG data were recorded throughout the pain-rating task. Participants sat on a comfortable chair in a silent and temperature-controlled room. They were instructed to focus on the stimuli, keep their eyes open, and gaze at a fixation point on the screen. EEG data were recorded using 64 Ag-AgCl scalp electrodes placed according to the International 10–20 system (Brain Products GmbH; bandpass filter: 0.01–100 Hz; sampling rate: 1000 Hz). The FCz was used as the online recording reference and the ground electrode was positioned at the AFz. The electrode-to-skin impedances were kept below 10 kΩ for all electrodes.

EEG data analysis

The EEG data underwent preprocessing using EEGLAB71. Continuous EEG data were band-pass filtered within the range of 1 to 30 Hz. For LEP analysis, epochs time-locked to the onset of laser stimulation were extracted with a 1500-ms time window (500 ms prestimulus and 1000 ms poststimulus), with baseline correction applied using the prestimulus interval. Anticipatory EEG analysis involved epochs time-locked to the laser onset within a 4000-ms time window (4000 ms prestimulus). EEG epochs were visually inspected, and those with transient jumps in isolated EEG channels were manually removed. Consequently, 1.50 ± 2.54 epochs were rejected, representing less than 3% of the total EEG epochs. This left us with ~29 trials per condition, which is within the acceptable range for analyses of time-domain LEPs72, frequency-domain EEG oscillations23 and EEG microstates73. The remaining epochs were subjected to independent component analysis (ICA)74, where components associated with ocular movements (e.g., blinks, saccades) and muscle artifacts were identified and removed. Following ICA and an additional baseline correction, EEG data were re-referenced to the average reference, with the reference electrode FCz incorporated into the electrode array.

Time-domain analysis of LEPs

Single-trial LEP waveforms corresponding to identical experimental conditions (T0, T1, and T2) were averaged, resulting in three single-participant LEP waveforms. Subsequently, these individual average LEP waveforms were further averaged to generate group-level waveforms for each experimental group. The amplitudes of N2 and P2 components in LEPs were compared among the M1, DLPFC, and sham groups. The amplitudes of these two LEP components were quantified as the mean amplitudes within their respective time windows and at electrodes demonstrating maximal responses. The N2 and P2 amplitudes were measured at central electrodes (Cz, C1, C2, CPz), within 200–230 ms and 350–450 ms after laser stimulus onset, respectively.

Frequency-domain analysis of anticipatory EEG

The power spectral analysis of EEG data recorded before the onset of laser stimulus was conducted using the FieldTrip function ft_freqanalysis75, which implements a multitaper frequency transform. The analysis derived absolute power spectra in the 1–30 Hz range, with 0.25 Hz bins, from non-overlapping 4-s epochs of prestimulus EEG data. A discrete prolate spheroidal sequence taper was applied to the data to mitigate any edge artifacts. Power spectra were computed individually for each channel and epoch.

Considering previous research linking PAF to individual pain sensitivity76,77,78, rTMS effects on PAF were assessed. Employing the center of gravity method within the 6–14 Hz range, PAF was estimated for each participant in every epoch and subsequently averaged within the same experimental condition (T0, T1, and T2). To pinpoint the spatial location where rTMS modulates PAF, we conducted an electrode-by-electrode one-way analysis of variance (ANOVA) with a between-participant factor of Group (M1, DLPFC, sham) to assess the immediate (T1‒T0) or delayed (T2‒T0) effects on PAF. This analysis provided scalp distributions of F values and P values for each main effect. To address the issue of multiple comparisons, we controlled the significance level using the FDR method31.

Given the established role of anticipatory sensorimotor α-oscillations in shaping subsequent pain perception23,24,79 and the distinct neural functions of α1 and α2 bands44,80, we further investigated whether rTMS modulates sensorimotor α1- and α2-oscillation power before the onset of laser stimulus. Single-participant EEG spectra, corresponding to identical experimental conditions (T0, T1, and T2), were averaged to obtain individual EEG spectra. Specifically, α1 and α2 frequency intervals were individually defined as [PAF − 2, PAF] and [PAF, PAF + 2], respectively. In these spectra, α-oscillation power at sensorimotor electrodes contralateral to pain side (FC3, FC5, C3, C5, CP3, CP5) was averaged within the α1 and α2 frequency intervals for each condition.

Microstate analysis of anticipatory EEG

The preprocessed EEG data underwent bandpass filtering between 2 and 20 Hz. Global field power (GFP) was computed for each participant in each condition by calculating the standard deviation of EEG signals across all electrodes at each time point. Topographical atomize–agglomerate hierarchical clustering was then applied to EEG topographies corresponding to GFP waveform peaks, disregarding polarity. Group-level clustering was performed based on individual cluster maps within a specific condition, followed by topographic clustering across blocks within the same group, resulting in group-wise microstates. Microstate time series were constructed for each participant in each condition using a “back-fitting procedure,” assigning the specific group-wise microstate to each time point based on correlation coefficients between EEG topographies and identified microstate topographies. From the microstate time series, three commonly used EEG microstate features—duration, occurrence, and time coverage—were extracted.

Statistical analysis

Statistical analyses were conducted using IBM SPSS statistical analysis package (version 22; IBM Corp., Armonk, NY). We conducted a full two-way ANOVA with factors of Group (M1, DLPFC, and sham) and Time (T0, T1, T2) on the dependent variables during pain anticipation and perception, with results detailed in Supplementary Table S1. However, our primary objective was to evaluate the effects of M1/DLPFC-rTMS on pain anticipation and perception by comparing changes induced by rTMS to those from sham stimulation. To this end, we used difference scores (T1‒T0 and T2‒T0) as our dependent variables, minimizing baseline variability and enabling a clearer comparison of rTMS treatment effects. Immediate (T1‒T0) and delayed (T2‒T0) effects of rTMS on measurements of pain anticipation and perception were analyzed as outcome variables. These outcome variables were compared using one-way ANOVAs with a between-participant factor of Group (M1, DLPFC, and sham). Post hoc comparisons were conducted when a main effect was significant, with Bonferroni correction applied for multiple comparisons.

Having identified the effects of rTMS on pain anticipation and perception, we conducted correlation analyses to determine the relationship among these variables. To address the issue of multiple comparisons, we applied the FDR correction to adjust significance levels31. We further explored whether rTMS-induced analgesia could be explained by its effect on anticipatory EEG activities. Mediation analyses were conducted using the PROCESS macro in SPSS81. We employed a percentile bootstrap estimation analysis with 5000 bootstrapped samples to compute the mediation effect. The analysis yielded 95% CIs of the indirect effects, considered statistically significant at p < 0.05 when the 95% CIs did not include zero.

Reporting summary

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