Introduction

Pain is an unpleasant experience caused by actual or potential tissue damage. Acute pain in the early stage of tissue injury has important warning and protective significance for individual survival, but persistent chronic pain may lead to multi-dimensional behavioral abnormalities1, placing a huge burden on society and economy2. Accumulated lines of evidence have defined chronic pain not simply as a sustained state of nociception, but as an allostatic state established through gradually progressing plastic changes in the central nervous system, reflected in the dynamic changes in spontaneous brain activity3 and neuroplasticity4 of pain-related neuronal activities.

Spontaneous pain occurs without apparent external cause or trigger, often in a state of continuous fluctuation5. Persistent spontaneous pain modulates evoked responses to external stimuli, such as nociception and negative affect, thus affects overall progression of pain6. Clinically, spontaneous pain uniquely exists in pathological pain conditions and is the most frequent and severe suffering from patients, which seriously affects the quality of life7. Traditionally, due to technical limitations, the vast majority of preclinical pain research and drug development is based on evoked rather than spontaneous pain models8,9, constituting a crucial reason for repeated failures of novel analgesics in clinical trials. While peripheral mechanisms are appearing5, brain mechanisms of spontaneous pain are poorly defined.

Multiple brain regions experience dynamic changes in pain10. The primary somatosensory cortex (S1) and the lateral thalamus consistently respond to nociceptive signals11, whereas the limbic system correlates more closely with persistent spontaneous pain12 and the chronicity of pain13. In particular, the medial prefrontal cortex (mPFC) plays an important role in spontaneous pain14,15, and depicts distinct features of pain compared to S1. Neural oscillations at the gamma band (60–90 Hz) in the mPFC positively correlate to the subjective perception of ongoing pain16, whereas ongoing pain intensity is reflected by mPFC blood-oxygen level dependent (BOLD) signals17. mPFC is composed of different subregions with distinct anatomy and functions, in that, the dorsal part to the insula connectivity conduces to identify patients prone to persistent back pain18. In rodents with peripheral inflammation, the infralimbic cortex (IL), ventral pole of the mPFC, shows disrupted activity and connectivity with ventral hippocampal CA1 during persist spontaneous pain, and rescuing this dysfunction relieves spontaneous pain and accelerates overall recovery6. By contrast, the prelimbic cortex (PL), dorsal pole of the mPFC, has been demonstrated to encode behaviors specifically associated with fear19, learning20, and perception15,21. Counterpart of this mPFC subregion in humans is involved in spontaneous pain in imaging studies22,23. Notably, excitatory pyramidal neurons in the deep layers of PL exhibit intrinsic excitability24 and transcriptional changes25 and emerge as key players in chronic pain26,27. However, direct evidence for the involvement of the PL neuronal population in encoding and modulating spontaneous pain behaviors is lacking. In the present study, with combinative application of longitudinal monitoring of pain behaviors, in vivo electrophysiological dynamics, activity-dependent labeling with robust activity system (RAM), optogenetic/chemogenetic manipulations, and virus-mediated circuit tracing, we identify a neuronal ensemble in the PL that specifically encodes spontaneous pain, and verify its electrophysiological characteristics, behavioral functions, and circuit architecture in rats with chronic inflammatory pain.

Results

PL is a core brain region involved in spontaneous pain behaviors induced by peripheral inflammation

The spontaneous pain behaviors of rats with intraplantar injection of complete Freund’s adjuvant (CFA), including spontaneous paw lifting, licking and flinches (referred as spontaneous paw lifting thereafter), were monitored before and 1, 3, 7, and 14 days after model establishment (Fig. 1a). To make a general visualization of the brain networks associated with spontaneous pain, we simultaneously and longitudinally monitored neural activities from 10 brain areas, including PL, IL, nucleus accumbens core (AcbC), nucleus accumbens shell (AcbSh), S1, medial thalamus (MD), dorsal hippocampus CA1 (dCA1), basolateral amygdala (BLA), central amygdala (CeA) and ventral hippocampal CA1 (vCA1), during the development of inflammatory pain (Figs. 1b and S1a). Granger causalities (GC) (Fig. 1c) revealed significant differences of information flows within multiple pairs of brain regions between periods with and without spontaneous paw lifting. Notably, information flows from the PL to all other regions showed significantly increased GC values during spontaneous paw lifting (Fig. 1d). The power spectral densities (PSDs) of these regions were also summarized and compared between periods with and without spontaneous paw lifting (Fig. 1e), and significantly increased activities were observed in all regions except vCA1 (Figs. 1f and S1b). In particular, the PSDs of the PL showed significantly increased power at the gamma band (32–75 Hz) during spontaneous paw lifting (Fig. 1f). By contrast, limited changes of GC values and PSD power among these brain regions were observed in other non-painful spontaneous behaviors such as self-grooming (Fig. S1c) or active locomotion (Fig. S1d). These findings indicate a potentially pivotal role of the PL in mediating inflammation-induced spontaneous pain behaviors.

Fig. 1: Pivotal role of the prelimbic cortex (PL) in spontaneous pain behaviors.
figure 1

a Spontaneous behaviors within 30-min recording sessions 0–14 days after CFA injection into left hindpaw plantar. n = 10 rats for 0, 1, 3, 14-day CFA groups, n = 8 rats for 7-day CFA group, n = 7 rats for 0, 1, 7, 14-day Sham group, n = 6 rats for 3-day Sham group. Two-way ANOVA with Bonferroni post hoc test. b Left: Schematic illustrating the relative positions of recording electrodes in pain-associated brain areas in rats with CFA injection. PL prelimbic cortex, IL infralimbic cortex, AcbC nucleus accumbens core, AcbSh nucleus accumbens shell, S1 primary somatosensory cortex, MD medial thalamus, dCA1 dorsal hippocampal CA1, BLA basolateral amygdala, CeA central amygdala, vCA1 ventral hippocampal CA1; refs, reference and ground wires in the cerebellum. Right: An example of simultaneous recordings of LFPs (band-pass filtered 0.5–100 Hz, upper) and behavioral signals (bottom) during a recording session. The diagram was created with BioRender.com. c Granger causality comparisons between the onsets and intermissions of spontaneous paw lifting behaviors between pairs of two recorded regions. The T-values (left) and P-values (right) were measured by the point-to-point two-sided paired t-tests across either two recorded regions. d Increased granger causality values of information flows from PL to other regions during periods with and without spontaneous paw lifting. Paired t-test. n = 22 recording sessions from 10 rats. **p < 0.01, ***p < 0.001, Two-way ANOVA with Bonferroni post hoc test. e. Power spectrum density (PSD) comparisons between the onsets and intermissions of spontaneous paw lifting among ten brain regions. The T-values (left) and P-values (right) measured by the two-sided paired t-tests across the frequency. f Increased gamma band power (32–75 Hz) of the PL during spontaneous paw lifting compared to the intermissions. Red and blue lines showed the mean value of PSD during the presence and absence of spontaneous paw lifting, respectively. Shaded areas define ± SEM. Two-sided paired t-tests, black bar showed significant FDR corrected p values. Data for A, D were presented as mean values ± SEM. Source data for A and D were provided as a Source Data file.

A PL neuronal ensemble encodes spontaneous pain behaviors

To elucidate the neuronal basis of the PL in spontaneous pain, we monitored PL and IL neuronal activities during spontaneous paw lifting. First, we observed increased and decreased expression of c-Fos, an immediate early gene marker of neuronal activity, in PL and IL, respectively (Fig. 2a), in the early stage (day 3) after CFA injection when spontaneous pain was apparent. Next, the spike activities of pyramidal neurons in PL and IL were recorded (Fig. 2b, c). The average firing rate of IL pyramidal neurons decreased during spontaneous paw lifting, whereas no changes were observed in the PL (Fig. S2a). Considering the diverse responsive properties of different neuronal subpopulations, we extracted neuronal ensembles in PL and IL which showed excitatory, inhibitory or neutral responses during paw lifting (Figs. 2d and S2b). While the proportion of PL neurons exhibiting excitatory and inhibitory responses were similar, a higher proportion of IL neurons exhibited inhibitory responses (Fig. 2e). Intriguingly, the proportion of PL neurons showing excitatory responses paralleled the level of spontaneous pain, with a higher proportion observed in the early stage (1–3 day) exhibiting robust paw lifting (Fig. 2e).

Fig. 2: Prelimbic neurons responding to spontaneous pain behaviors.
figure 2

a Enhanced c-Fos expression of PL neurons in rats with CFA injection (day 3). Left: Representations of immunostaining of the neurons of PL (upper) and IL (bottom) in CFA (right) and Sham groups (left). Right: Statistical results. Three slices from each rat, n = 4 rats for IL-CFA group, n = 5 rats for PL and IL-Sham groups. Scale bars: 250 µm. *p < 0.05, **p < 0.01, two-sided unpaired t-test. b Electrophysiological recording sites and an example of representative high-pass filtered traces. c Bi-modal distribution of spike durations was used to identify cells as putative interneurons (gray) and pyramidal neurons (yellow). d Representative neurons showing excitatory (upper), inhibitory (middle) and neutral (bottom) responses to CFA-induced spontaneous paw lifting. Left: The spike trains were binned at a 10-s window, with episodes of spontaneous paw lifting shaded by red. The averaged firing rate was marked by blue lines. Right: The averaged firing rate during the spontaneous paw lifting were marked by red vertical lines. e The proportion of excitatory responsive neurons in the PL but not in the IL paralleled the level of spontaneous paw lifting. *p < 0.05, Chi-square test. f Schematic illustrating electrophysiological recordings of PL using silicon probes during the ibuprofen administration. g Administration of ibuprofen alleviated spontaneous paw lifting in rats with inflammatory pain. n = 6 rats, ***p < 0.001, two-sided paired t-test. h Normalized firing rate changes of putative pyramidal neurons in PL after ibuprofen administration. n = 51 units from 3 rats. The dashed lines indicated the edges of firing rates with significant increment (red) or reduction (blue). i Proportions of changed firing rates (outer pie charts) in PL neurons responding to spontaneous paw lifting behaviors (inner ring chart) after ibuprofen administration. *p < 0.05, Chi-square test for trend. j Decreased spontaneous firing rates of excitatory responsive to paw lifting neurons after ibuprofen administration. n = 11 units, *p < 0.05, two-sided Wilcoxon signed-rank test. Data for A, E, G, I and J were provided as a Source Data file. The diagrams B and F were created with BioRender.com.

To further confirm their role in encoding spontaneous pain, we recorded PL neuronal activities with administration of ibuprofen, a commonly-used nonsteroidal anti-inflammatory analgesic. In parallel to relieved spontaneous paw lifting (Fig. 2f), the activities of the excitatory responsive neuronal ensemble in the PL were significantly suppressed by ibuprofen (Fig. 2g, h), reflected in both decreased firing rate (Fig. 2j) and lower proportion (Fig. 2i). By contrast, no such changes were observed during other spontaneous behaviors such as self-grooming or locomotion (Fig. S2c). A similar neuronal ensemble was also observed in female rats with CFA injection (Fig. S2i, j) and in male rats with spared nerve injury (SNI), a model of neuropathic pain with persistent spontaneous pain behaviors (Fig. S2d, e), suggesting the presence of spontaneous pain-responsive neuronal ensembles in both genders and in different chronic pain models.

To further illustrate the encoding strategies of PL neuronal ensembles in spontaneous pain, we compared the neuronal responsive patterns to other spontaneous behaviors or multiple evoked behaviors (Fig. 3a). We first assessed the overlap between the spontaneous paw lifting-responsive neuronal ensemble with that responding to locomotion (Fig. 3c upper) or self-grooming (Fig. 3c bottom). Hypergeometric probability distribution revealed low overlaps between these two comparisons. Next, the overlaps between neuronal ensembles encoding spontaneous paw lifting and other evoked behaviors, including pin, von Frey hair, laser, and sound stimuli were also assessed (Fig. 3b, d). Unlike some high overlaps between the neuronal ensembles which encoded evoked behaviors (Fig. 3d, marked with stars), low overlaps were observed between the neuronal ensembles encoding spontaneous paw lifting and the majority of evoked behaviors (Fig. 3d, marked with triangle). We performed the same experiment in female CFA rats and confirmed the separated distribution of neuronal ensembles encoding spontaneous paw lifting and evoked pain behaviors (Fig. S2k).

Fig. 3: A prelimbic neuronal ensemble specifically encodes spontaneous pain behaviors.
figure 3

a Experimental timeline and daily recording protocol for in vivo electrophysiology before and after CFA injection. b Stimuli-evoked responses of PL pyramidal neurons in different evoked modalities. Heatmap rows represented the Z score-transformed average PSTH for individual neurons, and columns represented time bins relative to stimulus onset. The right column of the heatmap indicated the subpopulations of neurons showing excitatory (red), inhibitory (blue) and neutral responses to spontaneous paw lifting behaviors, respectively. c Pattern comparisons of PL neuronal populations which showed significant responses between spontaneous paw lifting and locomotion (upper)/self-grooming (bottom) behaviors. Left: Venn diagrams of amounts of significantly responding neurons to the behaviors, and the overlay showing the synclastic responses. (i.e., positive or negative responses in both given modalities). Right: Distributions of hypergeometric probabilities for each comparisons showing whether two neuronal response patterns were similar or significantly different. A significant difference was observed between spontaneous paw lifting and other behaviors. d Pattern comparisons of the neuronal populations showing significant responses between spontaneous paw lifting and different evoked stimuli. Left: Matrix of amounts of responding neurons to the modality combinations among evoked stimuli and spontaneous paw lifting. Right: Hypergeometric probabilities indicated the significance of the neurons responding to the modality combinations. Stars and triangles represented significantly similar and different responsive patterns to the modality combination, respectively. Significantly different patterns were observed between spontaneous paw lifting and multiple evoked modalities (pin, 15-g hair, 2-g hair, laser and sound), but not between spontaneous paw lifting and any other evoked modality. e The population activities of all PL neurons significantly distinguished a majority of evoked behaviors except brush. Left: The confusion matrix of the prediction accuracies. Right: p values of the prediction performance. f The performance in predicting evoked behaviors using spontaneous pain-irrelevant PL neurons.

An additional evaluation was performed to examine whether the neuronal ensembles of PL encoding spontaneous paw lifting could affect the PL networks encoding evoked behaviors. First, we performed a seven-way Naïve Bayes decoder to distinguish the ensemble activities for evoked behaviors (Fig. S2g). The PL neuronal ensembles accurately predicted evoked behaviors (Fig. 3e). The Naïve Bayes decoder trained using neurons irrelevant to spontaneous paw lifting (Fig. 3f) produced lower but still significantly higher than chance (~100%/7, 14.3%) predictive accuracies to evoked behaviors. These findings indicate independent neuronal responsive patterns of the PL in encoding spontaneous paw lifting than other spontaneous behaviors or evoked behaviors.

Tagging the spontaneous pain-activated neuronal ensemble in the PL

To test whether this specific PL neuronal ensemble causally encoded spontaneous pain behaviors, we tagged PL neurons that became activated during spontaneous pain with ChR2 driven by the RAM (Robust Activity Marking) promoter (a synthetic promoter with strong activity-dependent induction profile28), which relied on doxycycline (Dox) to control the labeling time window. The tetracycline-controlled trans-activator (tTA) expressed under the control of an activity-dependent promoter of RAM that enabled the expression of tags such as ChR2, via the binding of tTA to the tTA-responsive promoter element (TRE), which were inhibited by Dox. Thus, taking the rats off Dox (Dox OFF) opened a limited time window to label the neuronal ensemble activated under a given behavioral state. With this approach, intraplantar injection of CFA followed by the withdrawal of Dox was performed to label CFA-induced spontaneous pain-activated neuronal ensembles with the expression of ChR2 and EGFP (Fig. 4a). The majority of labeled PL neurons located in deep layers, and were mainly composed of excitatory neurons (EAAC1+) (99.21 ± 0.66%, Figs. 4b, c and 5b). Among the whole PL neuronal population, 16.46 ± 1.21% of glutamatergic neurons were activated by spontaneous pain and were labeled by the RAM system (Fig. S7a, b).

Fig. 4: Labeling the spontaneous pain-related neuronal ensemble in the PL via RAM system.
figure 4

a The RAM labeling system. Left: Virus strategy. Right: Timeline of virus injection, Dox switching, activated neuronal labeling and electrophysiological recording. The diagram was created with BioRender.com. b, c Characterization of labeled PL neurons in spontaneous pain induced by CFA using markers of glutamatergic (EAAC1+) and GABAergic (GAD+) neurons. Typical examples (b) and a quantitative summary (c) are shown. Scale bar, 250 µm. Three slices from each rat, n = 3 rats. d The raster plot (upper) and PSTH (bottom) of a representative opto-tagged spike unit activated by 1-Hz light pulse. e The proportion of the neurons responding to spontaneous paw lifting (inner pie charts) and 1-Hz light pulse (outer rings). n = 91 units from 3 rats. f Averaged PSTH of the tagged (green, activated), relevant (blue, inhibited) and irrelevant (orange, no significant change) neuronal subpopulations to a single light pulse. Shaded areas were defined by SEM. n = 133 units from 7 rats. g PSTHs of recorded neurons (left) in the 1-Hz protocol. Neurons were classified by a descending order of firing rate during the 1-s light-on period. Pie graphs (right) showing the proportion of neurons. h PSTHs of recorded neurons in the 3-min, 20-Hz protocol. Neurons were ordered in line with (g). i Average firing rate of the tagged and relevant neurons after optogenetic activation. n = 21 tagged, 56 irrelevant, 46 relevant units, respectively. *p < 0.05, ***p < 0.001, Friedman test. j Evoked nociceptive responses of recorded PL neurons to noxious laser on CFA-injected and uninjected hindpaws with and without optogenetic activation of spontaneous pain ensemble. Bin, 100 ms. k Averaged Z score changes. n = 21 tagged, 56 irrelevant, 46 relevant units respectively. **p < 0.01, two-way repeated measures ANOVA. Evoked spectrogram (l) and gamma power (m) of PL by noxious laser on CFA-injected and uninjected hindpaws with and without optogenetic activation. Bin, 50 ms. n Nociception-evoked gamma power after activating the spontaneous pain neuronal ensemble. n = 7 rats. *p < 0.05, two-way repeated measures ANOVA. Data for I, K and N were presented as mean ± SEM and provided as a Source Data file.

Fig. 5: Optogenetic activation of the spontaneous pain-tagged ensemble of PL aggravates pain behaviors in rats with inflammation.
figure 5

a Diagram showing the timeline of behavioral tests. b Representative images of ChR2-EGFP expression and fiber site in the PL. PL spontaneous pain labeled neurons were re-activated (c-Fos+) following light stimulation compared to sham group and control virus group. Scale bar, 200 μm. 3 slices from each rat, n = 3 rats. ###p < 0.001 for RAM-CFA vs RAM-Sham, ***p < 0.001 for RAM-CFA vs vector-CFA, two-sided unpaired t-test. c Anatomical maps displaying the area of ChR2-EGFP expression across the anterior-posterior PL in CFA rats. n = 6 rats. d Optogenetic activation of PL spontaneous pain neuronal ensemble induced remarkable spontaneous paw lifting behaviors on day 3 after CFA injection. Bin = 10 s, n = 9 rats in RAM-Sham group, n = 10 rats in RAM-CFA and vector-CFA groups. *p < 0.05, two-sided paired t-test. e Systemic administration of ibuprofen (upper) but not peripheral administration of lidocaine (bottom) abolished light-induced aggravating spontaneous paw lifting behaviors in rats with inflammation. Bin = 10 s, n = 6 rats per group, *p < 0.05, n.s.: no significant difference, two-sided paired t-test. f Experimental design for real-time place avoidance (RTPA). g Activation of PL spontaneous pain neuronal ensembles resulted in increased place avoidance on day 5 after CFA injection. The n value was the same as that of (d). Left, time spent in paired and unpaired zone, **p < 0.01, two-sided paired t-test. Middle, RTPA scores, **p < 0.01, two-sided one sample t-test. Right, representative locomotor tracks. h Activation of PL spontaneous pain ensemble increased defecation in the light-paired zone compared with the unpaired zone. n = 10 rats, *p < 0.05, two-sided Mann–Whitney test. Optogenetic activation of the PL spontaneous pain-tagged neuronal ensemble exacerbated thermal hyperalgesia (i) and mechanical allodynia (j) in inflammatory pain. Dash line, baseline pain threshold. The n value was the same as that of (d), **p < 0.01, ***p < 0.001, two-sided paired t-test. Data for C, G and H were presented as mean ± SEM. Data for B-E, G-J were provided as a Source Data file.

To confirm the specificity of the RAM system, we performed optrode recording in the PL of labeled rats (Fig. 4d). To identify the tagged neurons, we applied 1-Hz blue light to activate the RAM+ neurons. 17.8% recorded neurons were opto-tagged, among which 62.3% and 37.7% (11.1% and 6.7% of all recorded neurons) were spontaneous paw lifting-excitatory and neutral-responsive neurons, respectively, indicating efficient RAM labeling (Fig. 4e). Based on changes in neuronal activity after 1-Hz photostimulation, recorded neurons could be categorized into 21 tagged neurons (meeting tagged criteria, see Star methods), 56 irrelevant neurons (no significant changes in firing rate after 1-Hz stimulation) and 46 relevant neurons (delayed inhibition after 1-Hz stimulation) (Fig. 4f, g). Next, we applied the 20-Hz light stimulation protocol, which was used in subsequent behavioral experiments (Fig. 4h). As expected, we observed increased average activity of tagged neurons during photostimulation, but decreased activity of relevant neurons, and no significant change in irrelevant neurons (Fig. 4i), confirming the accuracy of the categorization.

We then characterized the nociceptive response dynamics of PL neurons by optogenetically activating spontaneous pain-tagged neurons (Fig. 4j). Consistent with the neuronal specificity to spontaneous pain behaviors, the neuronal responses of tagged neurons to laser nociceptive stimuli were not affected by the optogenetic activation, while relevant neurons significantly increased their firing rates (indicated by the change of z-score) (Fig. 4k). Furthermore, we also measured the nociceptive stimulation-induced gamma oscillations, which indicated the subjective susceptibility to nociception and found the nociceptive stimulation-induced gamma oscillations were increased after activating opto-tagged neurons (Fig. 4l–n).

To explore the molecular characteristics of the spontaneous pain-related neuronal ensemble in the PL, we performed fluorescence-activated cell sorting (FACS) and transcriptome sequencing via Smart-Seq2 method (Fig. S3a, b). Compared with the randomly labeled ensemble, a total of 344 of 20,752 genes were identified to show statistically higher expression (Fig. S3c). These upregulated genes were enriched in KEGG pathways related to metabolic pathways and neurodegeneration (Fig. S4d), suggesting dysfunctional states of spontaneous pain-related neuronal ensemble in chronic inflammatory pain. In addition, the retrograde endocannabinoid signaling pathway also existed (Fig. S4d), which took part in the endogenous pain modulation and led to the mPFC dysfunction in chronic pain29.

Together, with the RAM tagging technique, we could directly examine the role of spontaneous pain-tagged PL neuronal ensemble in pain behaviors.

Spontaneous pain-tagged neuronal ensemble in the PL modulates pain behaviors

We made several predictions on the effects of genetically manipulating the spontaneous pain-tagged neuronal ensemble (Fig. 5a). First, we predicted that activating these neurons would elicit robust spontaneous pain-like behaviors. Following the previous labeling strategy (Figs. 5b, c and S3a–c), optogenetic activation of the spontaneous pain-tagged PL ensemble elicited immediate and robust paw lifting behaviors (Fig. 5d and Supplementary Movie 1), without affecting other spontaneous behaviors (Fig. S4h, i) both in an early stage of CFA-induced inflammatory pain (3 days), and in a late stage (14 days) when spontaneous pain behaviors were almost absent (Fig. S3g and Supplementary Movie 2). The paw lifting behaviors were abolished by systemic ibuprofen administration, but not by local lidocaine administration in the CFA-injected paw (Fig. 5e). Spontaneous pain induced by activation of this PL neuronal ensemble was further confirmed by real-time place aversion (RTPA), indicated by less time spent in the light stimulation-paired side (Fig. 5f, g). Interestingly, we noticed significantly increased defecation of rats with photostimulation during test sessions of RTPA measurements, also reflecting emotional aversion (Fig. 5h).

Second, in light of the effect of activating tagged neuronal ensemble on nociceptive neuronal responses (Fig. 4j, l) and the strong influence of spontaneous pain on evoked pain30,31, we predicted that modulating spontaneous pain neuronal ensembles would also affect evoked pain behaviors. As expected, activation of the spontaneous pain-tagged neuronal ensemble exacerbated both thermal hyperalgesia and mechanical allodynia in the CFA-injected inflammatory paws (Fig. 5i, j), but not in the contralateral paws (Fig. 3h, i).

Finally, considering the substantial influence of persistent spontaneous pain on neuroplasticity, we predicted that long-term inhibition of PL spontaneous pain ensemble would promote overall recovery from the inflammatory pain (Fig. 6a). The tagged PL neuronal ensemble was transfected with the virus containing hM4Di, an artificially designed receptor selectively inhibited by a designed drug CNO (Figs. 6b and S4d–f). We intraperitoneally injected CNO within 3–7 days after CFA modeling, when significant spontaneous pain behaviors and alternations of neuronal activities were detected, to persistently inhibit the PL spontaneous pain-tagged neuronal ensemble (Fig. 6a), and observed significantly reduced spontaneous paw lifting time (Figs. 6c and 4d) and strong preference to the CNO-paired chamber (Fig. 6e, f). For evoked pain, transient and persistent inhibition attenuated thermal hyperalgesia and mechanical allodynia in inflammatory pain (Figs. 6g–j and S4j). Furthermore, this strategy accelerated recovery from thermal hyperalgesia and mechanical allodynia (Fig. 6k, l). It was worth noting that neither activation nor inhibition of PL neuronal ensemble affected locomotion or anxiety-like behaviors (Fig. S5). Together, these findings reveal that the tagged PL neuronal ensemble causally mediates spontaneous pain and modulates overall pain progression.

Fig. 6: Chemogenetic silencing of the spontaneous pain-tagged neuronal ensemble of PL promotes overall recovery from chronic inflammatory pain.
figure 6

a Diagram showing the timeline of behavioral tests. b Representative images of hM4Di-EGFP expression in the PL. PL spontaneous pain neurons were inhibited following administration of CNO. Scale bar, 200 μm. Three slices from each rat, n = 3 rats. ## p < 0.01 for RAM-CFA vs. RAM-Sham, ***p < 0.01 and **p < 0.01 for RAM-CFA vs. vector-CFA, two-sided unpaired t-test. c Temporary inhibition of PL spontaneous pain neurons alleviated spontaneous paw lifting behaviors on CFA 3 day. n = 9 rats. *p < 0.05, two-sided paired t-test. d Continuous CNO delivery (in CFA 3–7 d) relieved spontaneous paw lifting behaviors on CFA 7 day. n = 9 rats. ###p < 0.001 for RAM-CFA vs. RAM-Sham, *p < 0.05 for RAM-CFA vs. vector-CFA, two-sided unpaired t-test. e Experimental design for conditioned place preference (CPP). f Inhibition of PL spontaneous pain neurons induced preference to the paired chamber in CFA. n = 7 rats in RAM-CFA group, n = 8 rats in RAM-Sham and vector-CFA groups. Left, time spent in paired and unpaired chamber, *p < 0.05, two-sided paired t-test. Middle, CPP scores, *p < 0.05, two-sided one sample t-test. Right, representative locomotor tracks. Temporary inhibition of PL spontaneous pain neurons alleviated thermal hyperalgesia (g) and mechanical allodynia (h) on CFA 3 d. Dash line, baseline pain threshold. n = 9 rats. **p < 0.01, two-sided paired t-test. Continuous CNO delivery (in CFA 3–7 d) increased thermal (i) and mechanical pain thresholds (j) on CFA 7 d, and accelerated the recovery from thermal hyperalgesia (k) and mechanical allodynia (l) in inflammatory pain. n = 9 rats. ##p < 0.01 for RAM-CFA vs. RAM-Sham, *p < 0.05, ***p < 0.001 for RAM-CFA vs. vector-CFA, two-sided unpaired t-test for (i, j). ##p < 0.01, ###p < 0.001 for RAM-CFA-injected vs. RAM-Sham-CFA-injected; **p < 0.01, ***p < 0.001 for RAM-CFA-injected vs. vector-CFA-injected, two-way repeated measures ANOVA with Bonferroni’s post hoc test for (k, l). Data for D, F, I, K, J and L were presented as mean ± SEM. Data for C, D F-L were provided as a Source Data file.

S1 and IL differentially modulate PL spontaneous pain-responsive neuronal ensemble

There are abundant afferent and efferent connections between PL and other brain regions, constituting a pain modulatory network. We asked whether specific upstream regions delivered nociceptive information to or modulated the activities of the PL spontaneous pain-responsive neuronal ensemble. From our functional connectivity data, quantification of granger connectivity showed significant and widespread changes in information flows from PL to other regions, whereas in the opposite direction, only S1 and IL showed significantly different information flows to PL (Fig. 1c). To identify direct innervation from S1 and IL to PL, we injected an anterograde virus carrying Cre (AAV1-Cre) into S1 or IL, which trans-synaptically transfected PL neurons in collaboration with a Cre-dependent virus injected in the PL (Fig. 7a, g). The projections were also examined by retrograde tracers on the Ai9 mice (Fig. S6a, b). However, the majority of PL neurons receiving direct projections from S1 and IL did not co-label with PL neurons tagged by the RAM system (Fig. S7c, d), suggesting that the tagged PL neuronal ensemble was indirectly modulated by S1 and IL. Thus, we chose to activate the projecting terminals of the S1- and IL-pathways and observe the resultant activity changes of the spontaneous pain-responsive PL neuronal ensemble by optrode recording (Fig. 7b, g). Activation of the terminals from S1 to PL increased the average firing rate of excitatory responsive neuronal ensemble (Fig. 7c), without affecting the inhibitory ensemble (Fig. 7d). On the contrary, activation of axonal terminals from IL to PL decreased the average firing rate of excitatory neuronal ensemble responding to spontaneous paw lifting behaviors (Fig. 7i), without affecting the inhibitory neuronal ensemble (Fig. 7j). Overall, enhancing functional connectivity between brain regions regulates the activity of spontaneous pain-tagged neurons.

Fig. 7: S1→PL and IL→PL projections differentially modulate PL spontaneous pain-responsive neuronal activities and pain behaviors.
figure 7

a Anterograde viral labeling strategy for S1→PL pathway (left) and representative image of PL neurons receiving projection from the S1 (right). b The viral injection strategy and optrode site for electrophysiology recording in vivo. Activation of S1→PL projection terminals increased the firing rates of spontaneous pain-excitatory responsive neurons (c, n = 28 units), but not inhibitory responsive neurons (d, n = 12 units) in the PL. *p < 0.05, Friedman test. e Activation of IL→PL projections exacerbated spontaneous paw lifting behaviors. Left: Distribution of time spent on paw lifting behaviors. Blue shadow represented the light on condition. Right: Quantification of spontaneous paw lifting behaviors time. Bin = 10 s, n = 5 rats, *p < 0.05, two-sided paired t-test. f Activation of S1→PL projections aggravated thermal hyperalgesia (left) and mechanical allodynia (right). n = 5 rats, *p < 0.05, ***p < 0.001, one-way repeated measures ANOVA. g Anterograde viral labeling strategy for IL→PL pathway (left) and representative image of PL neurons receiving projection from the IL (right). h The viral injection strategy and optrode site for electrophysiology recording in vivo. Activation of IL→PL projections decreased the firing rates of spontaneous pain-excitatory responsive neurons (i, n = 14 units), but not inhibitory responsive neurons (j, n = 10 units) in the PL. *p < 0.05, Friedman test. k Activation of IL→PL projection terminals relieved spontaneous paw lifting behaviors. Left: Distribution of time spent on paw lifting behaviors. Blue shadow represented the light on condition. Right: Quantification of spontaneous paw lifting behaviors time. Bin = 10 s, n = 5 rats, *p < 0.05, two-sided paired t-test. l Activation of IL→PL projections alleviated thermal hyperalgesia (left) and mechanical allodynia (right). n = 5 rats, *p < 0.05, ***p < 0.001, one-way repeated measures ANOVA. For the boxplots of C, D, I and J, the top and bottom of the boxes, the center lines and the whiskers represented the 75%/25%, the median and min/max values of the data, respectively. Data for C–F and I–L were provided as a Source Data file. The diagrams A, B, G and H were revised from Brain maps 4.070.

We assessed the contribution of the S1→PL and IL→PL pathways to pain behaviors. Consistent with electrophysiology findings, activation of the S1→PL pathway exacerbated spontaneous (Fig. 7e) and evoked (Fig. 7f) pain behaviors. Conversely, activation of the IL→PL pathway reduced the time of spontaneous paw lifting (Fig. 7k) and alleviated thermal hyperalgesia and mechanical allodynia (Fig. 7l). These data indicate that S1 and IL exert opposite modulatory effects on the activity of PL neuronal ensemble and pain behaviors.

We next examined the efferent targets of the tagged PL neuronal ensemble with a retrograde tracing strategy. retroAAV containing mCherry was injected in several downstream regions involved in pain modulation to label PL-projecting neurons, including AcbC, BLA, MD and ventrolateral periaqueductal gray (vlPAG) (Fig. S6c), whereas spontaneous pain neuronal ensemble in the PL was labeled with EGFP. Although electrophysiological data revealed extensive functional connections between PL and these regions when spontaneous pain behaviors were robust, the spontaneous pain-tagged PL neuronal ensemble did not send direct projections to these regions, indicated by the sparse co-labeled neurons (mCherry+/EGFP+) (Fig. S6d). Consistently, few PL axonal fluorescence signals were observed in these downstream regions (Fig. S7e, f). These findings were consistent with the fact that deep-layer cortical neurons mainly targeted superficial layers and formed local circuits, rather than sent direct efferents to other brain regions32,33. Of note, PAG showed suppressed c-Fos expression when PL neuronal ensemble was activated (Fig. S6e–g).

Discussion

Here, we present multiple lines of evidence to illustrate the unique representation and processing of spontaneous pain information in rodent PL, and characterize the properties of spontaneous pain-tagged neurons in terms of electrophysiological features, circuit architecture, responsiveness to nociception and behavioral correlates (Fig. 8). The neuronal ensemble tagged by spontaneous pain in the PL plays a dominant role in spontaneous pain behaviors, amplifies the susceptibility of the neural network to evoked nociceptive stimuli, and influences the overall progression of chronic inflammatory pain.

Fig. 8: Summary of a distinct neuronal ensemble regarding the spontaneous pain induced by peripheral inflammation in the prelimbic cortex.
figure 8

Main findings of this study elucidated a neuronal ensemble that encodes spontaneous pain behaviors in the PL, distinguished from other behaviors. The activity of these neurons inhibited other neurons, thus amplifying the nociception. The S1 and the IL modulated spontaneous pain neuronal activity and pain behaviors bidirectionally. The picture was revised from Brain maps 4.070, with the original drawing.

A distinct neuronal ensemble of spontaneous pain in the PL

Several studies have pointed out the importance of PL in chronic pain, but the majority of studies focus on changes in the overall activity of this region during acute/chronic pain and have rarely interpreted their contribution to pain from the neuronal level34,35. However, the functions of PL neuronal subsets are complex and diverse, reflected in their diverse activity changes in chronic pain and other paradigms15,21,34. In the present study, we failed to observe the difference in the average firing rate of PL neurons, but identified neuronal ensembles that respond to specific pain behaviors, confirming the heterogenous feature of the PL neuronal population.

We found that the proportion of PL neurons encoding spontaneous pain varied with the development of chronic inflammatory pain (Fig. 2), suggesting that electrophysiological features of PL neuronal ensembles could reflect the level of spontaneous pain. Indeed, the excitatory responsive ensemble is highly sensitive to ibuprofen-induced analgesia and could be labeled by the activity-dependent system (Fig. 2), verified by optogenetic tagging (Fig. 4). Manipulating these minority neurons with specific coding properties precisely affected spontaneous pain. Through transcriptome analysis, we found genes highly expressed in the PL spontaneous pain neuronal ensemble compared with background-tagged neurons. In particular, retrograde endocannabinoid signaling pathway, a major endogenous pain control system, was highly enriched (Fig. S3). In rodent mPFC, endocannabinoids act as retrograde signaling molecules on presynaptic CB1 receptors to inhibit excitatory or inhibitory synaptic transmission to control the feedforward inhibition36, and their dysfunction leads to chronic pain29.

RAM-positive neurons constituted 16.46 ± 1.21% of all PL glutamatergic cells, similar to the proportion of neurons with excitatory responses defined by electrophysiological activity (19.43%). Meanwhile, 15.97% of putative pyramidal neurons in the PL were suppressed during spontaneous pain, and the proportion fluctuated as inflammation progressed. This relatively high proportion makes it reasonable to speculate that these inhibitory responsive neurons also play a role in spontaneous pain. Previous studies have shown that neuronal activity or intrinsic excitability in PL is suppressed during chronic pain, which may result from over-activation of local interneurons and increased inhibitory postsynaptic currents (IPSCs)37. However, the lack of specificity in recording and manipulating these neurons leaves their function unclear. Due to technical limitations, current activity-based neuronal manipulation systems mainly rely on the expression of immediate early genes such as c-Fos, and the lack of widely recognized molecular markers of inhibitory activity and corresponding manipulation systems makes it difficult to clarify the function of these neurons. In addition, sparse co-labeling of RAM+ neurons with GAD65/67 were observed in the present study. GABAergic neurons contain different subtypes in the PL, and the labeling efficiency of immediate early gene-based (IEG) activity reporting systems (such as the RAM labeling system) in specific brain regions or cell types depends on the propensity of these cells to express IEG. Previous studies have shown that activated PV+ interneurons seem less likely to express IEG28. In pain studies, the major interneurons observed to be activated in the PL region are PV+ interneurons37, while no other types of interneurons (such as VIP+ and SST+) have been reported38,39.

Studies employing unsupervised machine learning techniques have confirmed the utility of duration and frequency of paw lifting posture as a reliable marker of an animal’s pain status in both CFA-induced animal models and post-drug intervention scenarios, thereby presenting a novel avenue for pain assessment and evaluation of drug efficacy40. Importantly, this behavior transcends mere motor or postural adjustments, as it is intricately linked to electrophysiological shifts in several brain regions, most notably in the mPFC (Fig. 1), which become pronounced during states of pain40. Additionally, spontaneous paw lifting encompasses a wide array of mechanisms, spanning from the peripheral to the central nervous system. In the context of neuropathic and inflammatory pain, this behavior demonstrates a significant association with both peripheral nociceptor, spinal dorsal horn and brain activities6,41. However, it needs to be noted that manifestation of spontaneous pain could be independent of inputs from peripheral and spinal levels. In an unusual case report of phantom pain patient whose right leg was amputated, sympathetic blocks did not change spontaneous and evoked pain; epidural and spinal anesthesia abolished evoked pain but had no effect on spontaneous phantom pain42. These results suggest that the activity in cutaneous C fibers and spinal nociceptive systems are not necessary to maintain central processing that account for painful sensations, which may localize in the brain. Our results confirm that activation of PL spontaneous pain-tagged ensemble exacerbates behavioral performance under blockage of the peripheral nociceptors by lidocaine (Fig. 5e), which also supports this viewpoint.

Dissociation of neuronal basis for spontaneous pain and evoked pain

Neuroimaging studies have revealed that spontaneous pain is associated preferentially with changes in the limbic system and the medial pain system, while evoked pain relates more to the lateral pain system23,43. However, gamma oscillations in the mPFC have been shown to reflect both nociception44 and ongoing pain16 in chronic pain patients. The neurobiological basis for regulating spontaneous pain and evoked pain appears to be integrated in the PL, though through different mechanisms. The PL neuronal ensemble activated by peripheral nociceptive stimuli has been demonstrated by multiple techniques in various pain models15,21. Peripheral tissue damage reduces the activity and excitability of pyramidal neurons in the PL, and activating PL relieves pain and negative emotions34,45. However, there is also evidence of increased excitability of pyramidal neurons in the PL. Specifically activating nociceptive neurons within the PL leads to persistent pain hypersensitivity15. This heterogeneity of neuronal responses suggests functional distinction of PL neuronal subpopulations in pain processing46, consistent with the diverse neuronal responses observed in PL during spontaneous pain. The present study captures the ensemble encoding spontaneous pain and confirms their dissociation from the nociceptive ensemble in the PL.

Another intriguing finding is that activation of the spontaneous pain-tagged ensemble enhances susceptibility of the evoked nociceptive ensemble to noxious stimuli, showing stronger responses in both electrophysiological (Fig. 4j, k) and behavioral aspects (Figs. 5 and 6). The gamma oscillation, a potential biomarker of pain revealed by several studies35,44, is also enhanced in the PL (Fig. 4l–n). Similar findings are also reported by neuroimaging studies where baseline fluctuations of spontaneous pain positively affect pain-intensity ratings upon nociceptive stimulation in the ACC47 and the S131, indicating that basal brain activity profoundly modifies evoked pain responses.

In addition, hyperactivity in the spontaneous pain ensemble appears to inhibit the basal activity of evoked pain ensemble. Despite the fact that optogenetically tagged and manipulated neurons (which are primarily neurons encoding spontaneous pain) are not directly associated with nociceptive responses, the firing rates of these neurons seem to increase when exposed to nociceptive stimuli (as shown in Fig. 4j). However, as the tagged neurons do not fully represent the ensemble of neurons encoding spontaneous pain (as shown in Fig. 4e), the amplification of nociceptive responses is primarily contributed by “relevant neurons,” which are not tagged and not involved in encoding spontaneous pain.

PL-centered cortical circuit dynamics regulate spontaneous pain

There is general agreement in the important role of the S1 in pain perception and modulation48. Spontaneous pain drives the S1 regional network into a synchronized state, whereas reversal of this synchronization alleviates pain in a neuropathic pain model49. Besides, gamma-band oscillations in the S1 correlate with subjective pain perception, which is accompanied by decreased expression of c-Fos in the PL35. With the anterograde transsynaptic virus, we confirmed a direct projection from S1 to PL, which promoted the manifestation of spontaneous pain in electrophysiological and behavioral aspects (Fig. 7). Enhancing sensory input from the S1 to the ACC amplifies evoked pain and pain-aversive behaviors50, which indicates that S1 transmits nociceptive information to pain-affected cortical regions and is consistent with the role of the S1-PL pathway in the present study. Additionally, chronic pain seems to strengthen this cortical association, resulting in an increased response that adversely impacts both spontaneous and evoked pain perception.

The IL also participates in the regulation of the spontaneous pain, reflected by the inhibited brain activity and functional connectivity with the ventral hippocampus6. As a pair of homologous but heterogenous subregions, the PL and IL are thought to be involved in dichotomous aspects of various behaviors, such as fear memory21, goal-directed behaviors51 and pain52,53. This difference not only stems from the distinct projections of these two subregions but may result from a direct functional suppression of the IL on the PL29,51,52 which is also demonstrated in the present study. It is worth to note that this inhibitory regulation of the PL ensemble representing spontaneous pain may not be achieved through direct synaptic connections, but most likely through local interneurons in the PL54.

With double labeling of retrograde tracing and RAM system, we did not detect direct efferents of spontaneous pain ensemble in MD, BLA, vlPAG or AcbC (Fig. S6). However, we cannot exclude the possible involvement of other downstream projection regions, which warrant future investigation. One rational explanation is that the spontaneous pain neuronal ensemble amplifies pain perception through local circuits within the PL through the feedforward inhibitory circuits55. In particular, layer 5 cortical cells receive a significantly larger fraction of local inhibitory inputs, suggesting that many mPFC inhibitory cells participate in feedforward inhibitory circuits driven by long-range inputs56,57. In addition, layer 6 may modulate other laminar cortical responses directly through intracortical projections during sensory representation and sensorimotor integration33. Notably, PL neurons encoding spontaneous pain and those projecting to the PAG appear to be independent ensembles. We propose that the PAG-projecting PL neurons may be inhibited by the spontaneous pain neuronal ensemble, reflected by the decreased expression of c-Fos, thus leading to weakened descending inhibitory pathway26,27,58. This observation explains why increased activity in spontaneous pain neuronal ensemble suppresses the baseline activity of neurons encoding evoked pain.

Methods

Animals

Adult male and female Sprague-Dawley rats (the age of 8–10 weeks at the beginning of experiments) were provided by the Department of Laboratory Animal Sciences, Peking University Health Science Center (Beijing, China). Ai9 mice at the age of 6–12 weeks old were also used for experiments. Ai9 mice were acquired from Prof. Haitao Wu (Institute of Basic Medical Sciences, Beijing, China). Rats and mice were housed in 3–4 cohorts unless otherwise noted in a room temperature of ~23 °C and humidity of 50–60% under a 12-h dark-light cycle with free access to food and water. All experimental procedures were approved by the Animal Care and Use Committee of Peking University (approval number: LA2021114), according to the guidelines of the International Association for the Study of Pain.

CFA-induced inflammatory pain

Following our previous protocol6, the rat was anesthetized with isoflurane. The plantar surface of the left hindpaw was cleaned with 75% ethanol before a total of 100 µl complete Freund’s adjuvant (CFA, Sigma-Aldrich, St Louis, USA) was injected intraplantarly to induce inflammatory pain. Control rats received injections of equal volumes of normal saline.

SNI-induced inflammatory pain

The neuropathic pain model of spared nerve injury (SNI) rats was established as previously described59. In brief, the left common peroneal and tibial nerves were tightly ligated with 5.0 silk sutures, and sectioned distal to the ligation with removal of 2–4 mm nerve stump, leaving the sural nerve left intact.

In vivo electrophysiology: surgery

For in vivo electrophysiological recording, electrode or optrode implantation for multi-channel recording was based on a custom, 3D-printed design. (ref) For multiple brain regions recording, 4 tetrodes with a microdrive were used in the PL (AP: +3.5 mm, ML: −0.6 mm, DV: −2.5 mm) and 2 tetrodes with a microdrive were used in the IL (AP: +3.0 mm, ML: −0.5 mm, DV: −4.4 mm) for recording local field potentials (LFP) and multi-unit activities. Non-moveable single tungsten wires (diameter 50 µm, California Fine Wires Company) were used for recording LFPs in the AcbC (AP: +1.5 mm, ML: −1.5 mm, DV: −6.0 mm), AcbSh (AP: +1.5 mm, ML: −1.0 mm, DV: −7.0 mm), S1HL (AP: −1.0 mm, ML: −2.8 mm, DV: −1.0 mm), MD (AP: −3.0 mm, ML: −0.5 mm, DV: −5.0 mm), dCA1 (AP: −3.6 mm, ML: −2.6 mm, DV: −2.2 mm), BLA (AP: −2.4 mm, ML: −4.8 mm, DV: −7.5 mm), CeA (AP: −2.4 mm, ML: −4.0 mm, DV: −7.4 mm), vCA1 (AP: −5.5 mm, ML: −5.5 mm, DV: −5.5 mm). For PL recording, 8 tetrodes of tungsten wires (20 µm in diameter, California Fine Wires Company) array or 16-channel silicon probe (A1*16-5mm-100-703-H_21mm, Neuronexus) with a microdrive were used. For the optotrode implantation, 4 tetrodes combined with the optical fiber (200 µm in diameter, Originopto, Hangzhou, China) were used. The impedance of tetrode was between 1 and 1.5 MΩ, the impedance of a single electrode was between 500 kΩ and 1 MΩ.

The animals were initially anesthetized with isoflurane at 3% of the gas volume, which gradually decreased and stabilized at 1.0 to 1.5%. Once stably anesthetized, the animal was fitted with ear bars and mounted in the stereotaxic frame. Electrodes or optrode were fixed on the skull by dental acrylic and protected by a custom, 3D-printed shell for the longitudinal recording. The reference and ground wires were set on the cerebellum. After surgery, the rat was singly housed and allowed to recover for at least one week before further experiments.

In vivo electrophysiology: recording

For electrophysiological recordings, the rat was allowed to move freely in a transparent plastic chamber (30 cm × 30 cm × 40 cm) with video tracking. Electrophysiology data were acquired using a 32-channel Intan system (Intan Technologies, Los Angeles, USA). To achieve simultaneous recording with optic stimulations. Each rat was habituated to the testing environment for at least three days prior to recording.

Electrophysiology recording was performed when the rat was quietly awake. Under the resting phase, the acclimated rats were placed in the chamber and recorded for 30 min without any external stimulation.

Under the stimulation phase, we delivered a range of noxious, aversive stimuli to animals, including noxious pin (25 G needle), light touch (15 g von Frey filament), mild touch (2 g von Frey filament), brush, noxious heat (laser), air puff (aurilave, ~300-ms air per squeeze), sound (~85 dB for 300 ms). Laser stimulation was generated by an ultra-pulse carbon dioxide laser therapeutic machine (DM-300, Dimei, Changchun, China) and delivered to the left hindpaw (injected with CFA) of the recorded rat from the guide arm. The laser power ranged from 2 to 4 W with an emission time of 20 ms. Needle, von Frey filaments, and brush were applied on the left paw. Air puff was aimed at the left cheek. The stimulus interval was no less than 40 s to avoid injury. Five recording sessions were conducted for each rat on 0 (baseline), 1, 3, 7, and 14 days after CFA injection.

For administration of ibuprofen, ibuprofen (Sigma-Aldrich) was dissolved in 1% carboxymethylcellulose before administration, and administered by oral gavage at a dose of 10 mg/kg on CFA day 3. Thirty-minute in vivo recording was performed before (as “Before” in Fig. 2) and 30 min after administration (as “Ibuprofen” in Fig. 2).

For opto-stimulation, 1-Hz blue light pulses (470 nm, 5-ms pulse width, 10 mW at fiber tip, 60 repetitions) were delivered to identify the opto-tagged firing units at the start of recording session. We performed 3-min blue light (470 nm, 20 Hz, 5-ms pulse width, 10 mW at fiber tip) on RAM-labeled rats under spontaneous state and when noxious heat stimuli (laser) were applied on the hindpaw. To examine the effect of activating the IL- and S1-PL pathways, we delivered 3-min blue light (470 nm, 5 ms, 10 mW at fiber tip) on the PL in the rats with virus injected into IL and S1, respectively. The optogenetic system sent the TTLs to the electrophysiological data acquisition system when the light pulses were generated.

Electrophysiological data analysis

Data preprocessing

Electrophysiological data were preprocessed using NDManager60 and in-house MATLAB functions. To extract local field potentials (LFPs), electrophysiological data were down-sampled to 1250 Hz, lowpass filtered at 200 Hz, and notch filtered between 48 and 52 Hz. Channels with noise contamination were excluded artificially. Then the segments with or without locomotion behaviors were extracted from fixed duration (30 min in the resting stage of the recording sessions), and split into 1-s epochs for following LFP analysis.

Power spectral density analysis

The power spectral density (PSD) of the LFPs from each channel was calculated using a multi-taper estimation adopted by the function mtsepctrumsegc.m in Chronux toolbox61. Then the PSD power from corresponding channels of each brain region was averaged to get the PSD of each recorded brain region at the subject level. To compare the variations of PSD power in the conditions between the presence and absence of the locomotion activities (e.g., spontaneous pain associated paw lifting or flinching, self-grooming and locomotion), the paired t-tests were applied at each frequency of PSD power, and the p values were corrected using False Discovery Rate (FDR).

Granger causality analysis

To evaluate the directional communications among LFPs of multiple brain regions. The Multivariate granger causalities were estimated, using the MVGC MATLAB Toolbox62. The LFP epochs were first down-sampled to 250 Hz and then used to estimate the corresponding VAR model parameters. The best MVAR model order up to 20 was determined using Akaike information criteria. We then calculated the autocovariance sequence from the VAR parameters and obtained the time domain conditional Granger causality (GC) value. The GC value from corresponding channels of each brain region were averaged to get the GC value from each recorded brain region to others. The statistical method was the same as above.

Spectrogram

To calculate the time-frequency spectrogram of the PL during laser stimuli, we used Gabor wavelet and the spectrum was normalized to baseline (0.5 s before laser onset) for each trial. The spectrum at 1 s after laser onset was averaged in gamma band (60–90 Hz), for comparison between light-on/-off and CFA-injected/without injected conditions.

Spike detection and classification

The raw electrophysiological data were high-pass filtered at 300 Hz before spike sorting. The time intervals from the filtered data where the amplitude variance exceeded 2 standard deviations were considered to contain multi-unit activities. For the data from tungsten tetrode recording, the multi-unit activities were subsequently decomposed using a principal component analysis, and single-unit activity (i.e., individual spikes) were sorted automatically using KlustaKwik, followed by manual adjustment using the software Klusters60. For the data from linear silicon probes, the multi-unit activities were sorted using the open-source algorithm SpyKING CIRCUS, a method that relies on density-based clustering and template matching to assign spike clusters to individual contacts in electrode arrays without cluster overlay63. The templates of spike clusters were visualized and manually curated by phy 2.0 (www.github.com/cortex-lab/phy), a graphic user interface for the sorting of large-scale electrophysiological data64.

Subsequently, spike units were classified using CellExplorer65, and were generated from putative pyramidal neurons or interneurons based on the duration of the action potential, which is defined as the latency difference between the trough and the peak of the waveform. Based on the bimodal distribution of the durations of all recorded spikes, a data-driven approach was adopted to determine the threshold to separate interneurons from pyramidal neurons (i.e., the pit between the two peaks of the distribution)66,67, which was 500 μs in the present study. The putative interneurons were excluded from further analysis due to their very few counts.

Identification of neuronal responses to locomotion behaviors

To compare whether a neuron showed significantly increased or decreased firing rate during the locomotion behaviors (e.g., spontaneous pain-induced paw lifting or flinching, self-grooming and locomotion), the Monte Carlo method was adopted to evaluate the confidence distribution of the neuron firing rate within the randomized occurrences of the locomotion behaviors during the fixed observation duration. For details, the time segments in which locomotion behavior exists were randomly permutated in the fixed observation duration to generate the surrogate data (Fig. S2b). The averaged firing rates of these time segments were collected from 200 permutations, to generate the confidence distribution of the given neuron’s firing rate. The probability (p-value) of the neuron firing rate was identified by the position of the mean firing rate of the actual time segments in the distribution of neuron firing rate from the surrogate data. Then the neuron was classified as the excitatory (significantly higher than the confidence distribution), inhibitory (significantly lower than the confidence distribution) or neutral response (Fig. 2e).

Spike firing analysis

To estimate the modulation of spike firing by evoked behaviors (e.g., von Frey hair, brush, pin, laser, sound and air puff stimuli in Fig. 3b and laser stimuli in Fig. 4j) and thus calculated spike density functions, we segmented the data using a window analysis time of 4 s (−2 s to 2 s with respect to stimulus onset). For each trial, the spike firing rate was binned using a 100-ms window and normalized to the baseline using a Z-score (i.e., by dividing the baseline-subtracted value by the standard deviation within the pre-stimulus interval). Spikes with a firing rate <1 Hz within the 2 s before the stimulus onset were excluded for further analyses.

To estimate the modulation of spike firing changes by Ibuprofen administration, the averaged firing rate were normalized using the modulation index:

$${{{\rm{M}}}}{{{\rm{I}}}}=\frac{{{{{\rm{Firing\; rate}}}}}_{{{{\rm{after}}}}}-{{{{\rm{F}}}}{{{\rm{iring\; rate}}}}}_{{{{\rm{b}}}}{{{\rm{efore}}}}}}{{{{{\rm{F}}}}{{{\rm{iring\; rate}}}}}_{{{{\rm{a}}}}{{{\rm{fter}}}}}+{{{{\rm{Firing\; rate}}}}}_{{{{\rm{before}}}}}}\,$$
(1)

Firing rate before and Firing rate after were the averaged firing rates in 30 min before and after Ibuprofen administration respectively. The neurons were classified to show the increased or decreased modulations by Ibuprofen if the firing rates after administration changed over those before administration for 20% (MI ± 0.09).

Identification of neuronal responses to evoked behaviors

To identify neurons whose firing rates were modulated by the occurrence of evoked behaviors, we compared the mean firing rate within the 2-s after stimulus onsets with the mean firing rate within the 2-s before stimulus onsets, using a paired-sample t-test. Based on the statistical results, the neurons were classified as excitatory (showed significantly higher firing rate in the post-stimulus interval than that in the pre-stimulus interval), inhibitory (showed significantly lower firing rate in the post-stimulus interval than that in the pre-stimulus interval) and neutral responses.

Evaluation of neuronal ensembles responding to different behaviors

To evaluate whether the neuronal ensembles responding to different evoked behaviors and different locomotion behaviors were consistent with a hypothesis of statistically independent coding ensembles, we estimated the likelihood that units’ coding identities were assigned independently. This analysis allowed us to calculate the overlap ratio of “similar responding neurons”, which showed both excitatory and inhibitory responses in two different behaviors. The likelihood (p-value) of the overlap was determined by assessing the hypergeometric probability of real overlap in the relative hypergeometric distribution of expected overlaps68, which was achieved using the hygepdf.m function in MATLAB.

Decoding the neuronal ensembles of multiple evoked behaviors

To assess the possibility of predicting multiple evoked behaviors by prelimbic neuronal ensembles, we implemented the Naïve Bayes classifier using the function fitcnb of Matlab. The kernel smoothing of data distributions was adopted to the model, and the fivefold cross-validation was used to construct the confusion matrix in predicting trial types. The confusion matrix was then normalized at each column (corresponding to each actual trial type) by the number of each trial type to get the predicted trial type probability. To ensure that the decoding accuracy was unlikely obtained by chance, another 200 rounds of Naïve Bayes predictions were performed to construct the permutated confusion matrixes, in which labels of trial types were shuffled to train the Naïve Bayes classifier. The probability (p-value) of the prediction was identified by the position of the correct predicted counts of true trials in the distribution of predictions from the permutated confusion matrixes (Fig. S2g). To testify whether the neuronal ensembles of PL which encoded spontaneous pain behaviors affect the decoding capabilities of other evoked behaviors, we estimated the prediction probabilities to multiple evoked behaviors using the selected neurons that the neurons showed significant responses to spontaneous pain behaviors were excluded. In order to illustrate the impact of a decreased number of neurons in model estimation on predictive performance, we randomly selected the same number of neurons from all neurons for an additional 50 rounds for model prediction. The distribution of the prediction accuracy for each trial type was summarized and compared to the actual prediction accuracies with all neurons and the selected neurons. (Fig. S2h).

Identification of neuronal responses to optic stimulation

To identify whether a spike unit was directly triggered by optic stimuli (e.g., the opto-tagged neuron), 60 trials of single optic pulse (5-ms width, 10 mW) were applied to rats through the optrode in each recording session.

The opto-tagged neurons were identified based on the stimuli-associated spike latency test (SALT)69, which calculated the Jensen-Shannon divergence for spike latency histograms. The spike unit with a short spike latency (<5 ms), low jitter (<3 ms) and significant change (p < 0.001) in spike timing relative to the onset of optic stimuli was regarded as an opto-tagged neuron (Fig. 4d).

Moreover, according to the responses of spike units to a single optic pulse, we found a considerable proportion of spike units showing decreased firing rates after optic stimulation, which indicated an indirect optic modulation. Therefore, we used similar criteria (see Identifications of neuronal responses to evoked behaviors) to classify whether the spike units (opto-modulated or opto-unmodulated neurons) beyond opto-tagged neurons were modulated by the occurrence of single optic pulse. The mean firing rate within the 1-s before and after stimulus onsets was considered.

Behavioral test: spontaneous paw lifting

Rats were placed in a transparent plastic chamber (30 cm × 30 cm × 30 cm) and video-recorded for 30 min. CFA- and SNI-induced spontaneous nociceptive behavior was analyzed by counting the time spent on lifting, licking and flinching of the injected hindpaw in this 30 min period. Locomotion behavior was according to the time of spatial displacement. Self-grooming was defined as the grooming of the face and body by the forepaws.

Behavioral test: real-time place avoidance (RTPA)

The CPA apparatus was a circular arena 80 cm in diameter which was artificially divided into two semicircles and rats were allowed to move freely for 45 min in a dimly lit room containing white noise (~60 dB). Movement was tracked by the video camera positioned above the arena. Entry into one semicircle resulted in photostimulation. Stimulation and no-stimulation sides were counterbalanced between animals. The time spent in each zone was measured using the SMART software (version 2.5.21, Panlab, SMART Video tracking, Harvard Apparatus). The arena was cleaned with 75% ethanol between tests.

$${{{{\rm{RTPA}}}}\; {{{\rm{score}}}}}=\frac{{{{{\rm{T}}}}\; {{{\rm{stimulation}}}}\; {{{\rm{side}}}}}{{{\, - \, }}}{{{{\rm{T}}}}\; {{{\rm{non}}}}\; {{{\rm{stimulation}}}}\; {{{\rm{side}}}}}}{{{{{\rm{T}}}}\; {{{\rm{total}}}}}}\times 100\%$$
(2)

Behavioral test: conditioned place preference (CPP)

The CPP apparatus was a three-chamber box with a middle chamber (10 cm × 30 cm × 30 cm) which could be opened or closed off to either of two end chambers (30 cm × 30 cm × 30 cm). The two end-chambers were differentiated by distinct visual and tactile features.

During the preconditioning session, the rats were released to freely explore the apparatus for 15 min. During the conditioning session, rats underwent “pairing” where they were individually restricted to one end chamber after receiving vehicle injection for 30 min in the morning. Four hours after vehicle injection, they were restricted to the other end chamber for 30 min after receiving the CNO injection. Chamber pairing was counterbalanced in different rats. On the test day, rats were allowed to explore all chambers for 15 min.

CPP score was calculated as follow:

$${{{{\rm{CPP}}}}\; {{{\rm{score}}}}}=\frac{{{{{\rm{T}}}}\; {{{\rm{test}}}}}{{{\, - \, }}}{{{{\rm{T}}}}\; {{{\rm{preconditioning}}}}}}{{{{{\rm{T}}}}\; {{{\rm{preconditioning}}}}}}\times 100\%$$
(3)

Ttest was the time in the drug-paired chamber on the test day. Tpreconditioning represented the time in the drug-paired chamber on the preconditioning day.

Behavioral test: evoked nociceptive responses

Each rat was adapted in a Plexiglas box for 30 min per day for three consecutive days before measurement. Paw withdrawal latencies (PWLs) were measured by a focused radiant heat (40 W of power) applied to either hindpaw (Hargreaves Method, IITC 390). PWLs were recorded three times and averaged as the thermal pain threshold. A cut-off value of 30 s was set to avoid possible tissue injury. Fifty percent paw withdrawal thresholds (50% PWTs) were measured by von Frey hairs (0.41 to 15.1 g; North Coast, Gilroy, CA, USA) applied to the central plantar surface of either hindpaw. The 50% PWTs were calculated by the “up and down” method.

Behavioral test: open field test

The apparatus was a 100 cm × 100 cm × 50 cm box (Shanghai Mobiledatum Information Technology Co., Shanghai, China) in a quiet and 30 lux illuminated room. Each rat was placed in the central area and video-recorded for 5 min. The behaviors were analyzed by using the SMART software. The field was cleaned with 75% ethanol between tests.

Behavioral test: elevated plus-maze test

The elevated plus-maze test was performed on the next day of the open field test unless otherwise noted. The maze (Shanghai Mobiledatum Information Technology Co., Shanghai, China) was placed 50 cm above the floor in a 30-lux illuminated room and consisted of two open arms and two closed arms (48 cm × 8 cm and 40 cm wall height for the closed arms). Each rat was placed onto the central area, heading toward the same open arm, and videotaped in the following 5 min. The behaviors were analyzed by using the SMART software. The maze was cleaned with 75% ethanol between tests.

Activity-dependent labeling

For spontaneous pain behaviors-related neurons labeling, rats were placed on doxycycline chow 24 h prior to surgery (40 mg/kg, ReadyDietech, Shenzhen, China) and kept on doxycycline chow following virus injection. Doxycycline chow was typically withdrawn 48 h prior to CFA injection and replaced with regular feed. After labeling, high concentration doxycycline chow (1 g/kg, ReadyDietech, Shenzhen, China) was supplied for stopping labeling. Then rats were kept with 40 mg/kg Dox food till the end of the experiment. During the labeling period, the rats were placed in the homecage without any external stimuli.

Optogenetics

For manipulating RAM-labeled neurons, vector viruses used for optogenetics (AAV9-RAM-d2TTA::TRE-ChR2-EGFP and AAV9-RAM-d2TTA::TRE, 2.0 × 1012 virus particles/ml) were purchased from BrainVTA Technology (Wuhan, China). The virus solution was injected bilaterally into the PL (AP + 3.5 mm; ML ± 0.5 mm from bregma; DV −2.5 mm from brain surface) with 0.5 µl/hole, 1 holes/side, at a speed of 0.1 µl/min. After injection, needles were left in situ for an additional 5 min. Then the optical fibers were bilaterally implanted 0.5 mm above PL and secured with four screws and dental acrylic cement on the skull. Behavioral tests were performed 4 weeks after virus injection. For the rats used in the electrophysiology experiments, optrode implantation was performed 3 weeks after the virus expression.

For manipulating IL/S1-PL pathways, vector viruses used for optogenetics (rAAV-hSyn-ChR2-mCherry, 1.4 × 1013 virus particles/ml) were purchased from BrainVTA Technology (Wuhan, China). The virus solution was injected bilaterally into the IL (AP + 3.0 mm; ML ± 0.5 mm from bregma; DV −4.4 mm from brain surface) or S1HL (AP −1.0 mm; ML ± 2.8 mm from bregma; DV −1.0 mm from brain surface) with 0.5 µl/hole, 1 holes/side, at a speed of 0.1 µl/min. After 4 weeks, optrodes were implanted in the PL as described previously.

Chemogenetics

For chemogenetics, AAV9-RAM-d2TTA::TRE-hM4Di-EGFP (1 × 1012 virus particles/ml) were packaged and purchased from BrainVTA Technology (Wuhan, China). Virus injection followed procedures similar to the optogenetics experiment. Clozapine N-oxide (CNO; Tocris, Bristol, UK) was dissolved in PBS at a concentration of 0.5 mg/ml. Rats were injected intraperitoneally (i.p.) (1.0 mg/kg). Behavioral tests started 30 min after the drug injection.

FACS (Fluorescence-activated cell sorting)

Rats were executed by cervical dislocation and brains were acutely removed. The PL was isolated on ice with a mouse brain matrix, mechanically dissociated in DMEM/F12 media, and then incubated with papain (1 mg ml–1) for 30 min at 37 °C. Then tissue pieces were dissociated into single cells by gentle trituration and filtered through a 70 μm cell strainer (F613462, BBI). Sorting was performed using a fluorescence-activated cell sorter (BD Biosciences) in the single-cell sorting mode selecting cells with high mCherry fluorescence. Cells were collected in tubes with lysis components and ribonuclease inhibitor for subsequent RNA sequencing.

RNA-seq and analysis

The amplification was carried out by the Smart-Seq2 method. An Oligo dT primer was introduced to the reverse transcription reaction for first-strand cDNA synthesis, followed by PCR amplification to enrich cDNA and magnetic beads purification to clean up the production. Then, the cDNA production was examined by Qubit 3.0 Fluorometer (Thermo Fisher Scientific, USA) and Agilent 2100 Bioanalyzer (Agilent, USA) to ensure the expected production with length around 1~2 kbp. Then, the cDNA was sheared randomly by ultrasonic waves for Illumina library preparation protocol including DNA fragmentation, end repair, 3′ ends A-tailing, adapter ligation, PCR amplification and library validation. After library preparation, PerkinElmer LabChip GX Touch and Step OnePlus Real-Time PCR System were introduced for library quality inspection. Qualified libraries were then loaded on illumina Hiseq platform (illumina, USA) for PE150 sequencing.

The Clean Data were filtered, which were statistically for the quality and data quantity, including Q30 statistics, data quantity statistics, base content statistics, etc. Reference gene and genome annotation files were downloaded from the UCSC, using Bowtie2 to build the reference genome library, and then the clean data were mapped to the reference genome by TopHat. HTSeq was run to calculate counts of each gene, and RPKM (Reads Per Kilobase of exon model per Million mapped reads) was used to assess expression quantity.

Differentially expressed genes were detected by DESeq2 with library batches as covariate. Genes were considered to be differentially expressed if the Benjamin–Hochberg adjusted p-value was below 0.05 and the fold change was above 2. Pathway enrichment of statistical clusters was performed using DAVID version 6.7 (https://david-d.ncifcrf.gov/) with the Benjamin–Hochberg adjusted p-value < 0.05 is considered significant.

Mapping of pathways

For the downstream of spontaneous pain-related neurons, on the basis of the RAM-labeled virus, we injected a retrograde tracer virus (retroAAV-hSyn-mCherry, 1.4 × 1013 virus particles/ml, BrainVTA Technology, Wuhan, China) into the downstream brain region, including vlPAG (AP: −7.8 mm, ML: ±0.8 mm, DV: −6.0 mm), AcbC (AP: +1.5 mm, ML: ±1.5 mm, DV: −6.0 mm), BLA (AP: −2.4 mm, ML: ±4.8 mm, DV: −7.5 mm), MD (AP: −3.0 mm, ML: ±0.5 mm, DV: −5.0 mm), respectively, and with 0.5 µl/hole, 1 holes/side, at a speed of 0.1 µl/min. For the group that only injected RAM-labeled virus in the PL, we also took the slices through various brain regions from AP + 2.5 to AP −7.0 to determine where there is a EGFP signal.

For the projections from S1/IL to the PL, two strategies were used: an anterograde virus AAV1-cre-GFP (2.0 × 1013 virus particles/ml, BrainVTA Technology, Wuhan, China) was injected in bilateral S1HL or IL with 0.5 µl/hole, 1 holes/side, and a cre-dependent virus AAV9-DIO-mCherry (2.0 × 1013 virus particles/ml, BrainVTA Technology, Wuhan, China) was injected in bilateral PL. Another strategy was injecting a retrograde tracer virus (retroAAV-cre, 1.4 × 1013 virus particles/ml, BrainVTA Technology, Wuhan, China) into the PL (AP: +1.65 mm, ML: ±0.3 mm, DV: −1.65 mm) with 0.3 µl/hole, 1 holes/side, on Ai9 mice. Both strategies need 4 weeks for virus expression.

Histology

The rat was deeply anesthetized with 1% sodium pentobarbital (0.1 g/kg, i.p.) and perfused intracardially with 0.9% saline followed by 4% paraformaldehyde (PFA, in 0.1 M phosphate buffer, pH 7.4). The isolated brain was post-fixed with 4% PFA for 12 h and cryoprotected in 20% and 30% sucrose solutions in turn. The fixed brain was cut into 50-µm thick slices for identifying electrode tracks and 30-µm thick slices for immunostaining.

Recording sites were identified by visual examination of electrolytic lesions, which were induced by passing currents (2 mA, 15 s) through an electrode at each site. The brain slices were stained with Nissl (Leica DMI 4000B, Wetzlar, Germany).

For verification of RAM-labeled neurons, free-floating sections were washed in the PBS, blocked with a buffer containing 3% bovine serum albumin and 0.3% Triton X-100 for 1 h, and incubated with the following primary antibody at 4 °C for 24 h: goat anti-glutamate transporter (EAAC1) antibody (1:500, AB1520, Merck Millipore) and rabbit anti-GAD65/67 antibody (1:500, ab49832, Abcam, USA). Sections were then washed in PBS and incubated with the secondary antibody at room temperature for 90 min: Alexa Fluor 594-conjugated donkey anti-goat IgG (1:500, A11058, Invitrogen, Waltham, MA, USA) and Alexa Fluor 647-conjugated donkey anti-rabbit IgG (1:500, A31573, Invitrogen, Waltham, MA, USA).

For c-Fos immunostaining, we performed light stimulation (see in “Optogenetics”) or CNO injection (see in “Chemogenetics”) 90 min before perfusion. Free-floating sections were obtained and dealt with as described before, incubated with the following primary antibodies at 4 °C for 24 h: mouse anti-NeuN antibody (1: 200, ab104224, Abcam, USA), rabbit anti-c-Fos antibody (1:500, 2250S, Cell Signaling Technology, USA). Sections were washed in PBS and incubated with secondary antibody at room temperature for 90 min: Alexa Fluor 594-conjugated goat anti-mouse IgG (1:500, A11005, Invitrogen, Waltham, MA, USA) and Alexa Fluor 647-conjugated donkey anti-rabbit IgG (1:500, A31573, Invitrogen, Waltham, MA, USA).

Images were taken by a laser scanning confocal microscope (model FV1000, Olympus Co., Ltd, Tokyo, Japan).

Statistics

Data were expressed as mean ± SEM. Group comparisons were made using either one-way or two-way analysis of variance (ANOVA) followed by Bonferroni post hoc tests. Single variable comparisons were made with two-tail unpaired Student’s t-test. Chi-square analyses were used to compare proportions. Mann–Whitney tests or Wilcoxon signed-rank tests were used to compare in vivo neural firing rates. Friedman test was used in the comparisons of three or more groups with abnormal distribution. All statistics were calculated using GraphPad Prism 9 software or MATLAB R2022a. p < 0.05 was taken as statistically significant. All statistical values are shown in Supplementary Table 1.

Reporting summary

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