Neural circuit basis of placebo pain relief
Pain is a subjective experience during which mind–body interactions exert a powerful influence both on pain perception and on the success of pain treatment , . One notable example is placebo analgesia, a contextual, cue-based learning phenomenon in which an individual’s positive expectation suffices to reduce pain perception and pain-related behaviours in the absence of any analgesic drug or procedure , , . Placebo analgesia has a prominent role in both medical practice and clinical trials . Expectations of pain relief are induced during cognitive behavioural therapy to promote recovery in patients with postoperative and/or chronic pain, while strong analgesic responses in the placebo groups of clinical trials hinder the development of pain treatments. Notwithstanding the importance of this placebo effect, our understanding of its underlying biological mechanisms remains limited to human brain imaging data showing that activity in some brain regions, such as the anterior cingulate cortex (ACC), correlates with placebo analgesia – . Here we combined an advanced mouse behavioural assay of expectation-based pain relief, targeted recombination in active populations (TRAP) of neurons mediating pain-relief expectation, neural Ca 2+ imaging in freely behaving mice, single-cell RNA sequencing (scRNA-seq), electrophysiological recordings and optogenetics to establish circuit, cellular and synaptic mechanisms through which positive expectations produce pain relief.   We first developed a 7-day placebo analgesia conditioning (PAC) assay that generates a placebo-like anticipatory pain-relief expectation in mice and permits evaluation of the resulting analgesic effect (Fig. and ). The PAC apparatus consists of two chambers with distinct visual cues. The assay comprises three phases: habituation (days 1–3), conditioning (days 4–6) and post-conditioning analgesia testing (day 7; Fig. ). During the habituation phase, the floors of both chambers are set at 30 °C (innocuously warm) and the mice can freely explore both chambers. Mouse performance (for example, latency of border crossing, time spent in each chamber) on day 3 serves as the pre-conditioning baseline exploratory pattern. During the conditioning phase, the floor of chamber 1, on which the mouse begins the session, is set at 48 °C (noxiously hot), whereas the floor of chamber 2 remains at an innocuous 30 °C. This trains mice to expect pain relief when leaving chamber 1 and entering chamber 2. Finally, for the post-conditioning analgesia test (post-test), the floors of both chambers are set at 48 °C to evaluate any analgesic effect induced by the expectation of pain relief. Compared with the unconditioned control mice, conditioned mice progressively developed a significant preference for chamber 2 during the conditioning phase (days 4–6). Importantly, this preference persisted on the post-test day (Fig. ), despite that the floors of both chambers were set at the same temperature and should, in the absence of conditioning, elicit identical heat pain perception. Furthermore, conditioned mice exhibited increased latencies to revisit chamber 1 during both the conditioning phase and during the post-test (Fig. ). However, setting both chambers at 30 °C during the post-test diminished this preference (Extended Data Fig. ). Together, these results suggest that PAC generates an expectation of pain relief from chamber 2. To determine whether this PAC-induced expectation of pain relief indeed recapitulates key features of human placebo analgesia, we compared the nocifensive behaviours displayed by control and conditioned mice during the post-test (Fig. ). PAC significantly prolonged the latency for paw licking, rearing and jumping (Fig. ). Moreover, mice subjected to PAC exhibited fewer overall nocifensive behaviours during the post-test (Fig. ). This PAC-induced analgesia persisted for at least a week after the conditioning phase (Extended Data Fig. ). Importantly, administration of the opioid receptor antagonist naloxone during the post-test, but not during the conditioning phase, abolished this analgesic effect (Extended Data Fig. ), consistent with the known involvement of endogenous opioid signalling in human placebo analgesia , . Furthermore, PAC-conditioned mice exhibited reduced sensitivity to chemical pain induced by formalin injection during a modified post-test in which both floors were set to 30 °C (Extended Data Fig. ). However, outside of the PAC apparatus, the mechanical, thermal and chemical pain sensitivities of PAC-conditioned mice on day 7 were comparable to those of unconditioned mice (Extended Data Fig. ). Finally, when we confined PAC-conditioned mice to either chamber 1 or chamber 2 during the post-test by blocking the opening between the two chambers, mice displayed similar latencies to initiate nocifensive behaviours regardless of the chamber in which they were confined (Extended Data Fig. ). Notably, consistent with human studies suggesting sex differences in placebo analgesia , female mice showed behaviours similar to those of male mice during PAC (Extended Data Fig. ), but with different variability for licking ( P = 0.017) and jumping ( P < 0.001) nocifensive behaviours. Taken together, these results show that PAC produces an expectation-based analgesic effect that shares key features of human placebo analgesia, enabling modelling and investigation of placebo analgesia in rodents.   Human brain imaging studies suggest that the ACC, especially the rACC, contributes to placebo analgesia – , . Notably, the ACC contains a wide variety of cell types, including projection neurons such as intratelencephalic (IT) and pyramidal tract (PT) pyramidal neurons located in distinct cortical layers and that have diverse intracortical and subcortical connections . To identify rACC pathways that might contribute to placebo analgesia, we injected into the rACC of TRAP2 ( Fos CreERT2 ) mice an adeno-associated virus (AAV) that permits expression of synaptophysin–mRuby in a Cre-dependent manner; this approach enabled us to label the presynaptic terminals of rACC neurons that were active during PAC (Fig. ). This procedure revealed dense axonal projections from labelled layer 5 (L5) rACC neurons to three brain areas: the striatum (dorsal caudate nucleus and putamen), thalamic/subthalamic nuclei (ventral posteromedial thalamic nucleus, mediodorsal thalamic nucleus, zona incerta) and, notably, the Pn (Fig. ), a region of the pons that mediates cortico-cerebellar communication. The contributions of striatal and thalamic circuits to various sensory-discriminative and affective-motivational aspects of pain have been described previously – . However, the Pn has no established role in pain modulation, although previous studies have reported Pn activation during pain , . Notably, while relatively understudied in the pain field, the cerebellum, like the rACC, consistently shows increased activity during placebo analgesia , , , . Furthermore, patients who have experienced a cerebellar infarction exhibit impaired placebo analgesia . We therefore next investigated the function of the rACC→Pn pathway in placebo analgesia. To record the neural dynamics of rACC→Pn neurons in real time during placebo analgesia, we used a head-mounted miniature microscope to image single-cell somatic Ca 2+ activity during the PAC assay. Viral anterograde and retrograde tracing, and whole-cell recording from Pn neurons during optogenetic stimulation of rACC neuron terminals confirmed monosynaptic glutamatergic connectivity between the rACC and Pn (Extended Data Fig. ). To express GCaMP7f selectively in rACC→Pn cells, we injected a Cre-encoding rAAV with retrograde transport properties into the Pn and injected a Cre-dependent GCaMP7f-encoding rAAV into the rACC (Fig. ). The numbers of cells that we detected from each mouse varied across different phases of PAC (Extended Data Fig. ). By aligning cell maps from day 3 (before conditioning), day 6 (conditioning) and day 7 (after conditioning), we aligned a total of 205 cells across days from 6 mice (34 ± 7 cells per mouse). Notably, intracranial virus injection, GRIN lens implantation and miniature microscope mounting had no significant effect on the measured performance metrics of mice during PAC, including total walking distance and average movement speed (Extended Data Fig. ). We next examined Ca 2+ signals in these neurons during border crossing, a timepoint around which mice should expect pain relief as a conditioned response to PAC training. We found that the Ca 2+ activity of rACC→Pn neurons increased progressively during the conditioning phase (Extended Data Fig. ). On the post-test day, these neurons showed elevated Ca 2+ activity, at the levels of individual neurons (Fig. ) and of individual mice (Fig. ). Among the cross-day-aligned rACC→Pn neurons, 58% exhibited greater activity during the post-test compared with the pre-conditioning baseline, while 25% showed progressively increased activity throughout all phases (Extended Data Fig. ). Furthermore, the discriminability index of rACC→Pn neurons between the first border crossing (with conditioned pain-relief expectation) and the first crossing back (without a conditioned expectation of pain relief) also increased after conditioning (Extended Data Fig. ). This higher discriminability index during the post-test suggests that the increased activity of rACC→Pn neurons is not due to an overall increase in neural activity after conditioning. To exclude the possibility that the biophysical properties of the Ca 2+ indicator, especially its long decay dynamics, might explain the observed differences before and after PAC conditioning, we performed the same analysis using binary Ca 2+ transient event data, which yielded similar results (Extended Data Fig. ). These increases in Ca 2+ activity and discriminability index disappeared when we tested a shuffled control dataset with randomized crossing times (Extended Data Fig. ). Furthermore, we found no correlation between the activity of rACC→Pn neurons and mouse locomotor speed (Extended Data Fig. ), indicating that these cells are not merely responding to generic movement. To further confirm that increased activity in rACC→Pn neurons corresponds with pain-relief expectation and not pain-associated aversion, we compared, on the post-test day, the activity of rACC→Pn neurons during the first border crossing (with conditioned pain-relief expectation), the first crossing back (without conditioned pain-relief expectation) and the last border crossing (reduced or no conditioned pain-relief expectation due to expectation violation ). rACC→Pn neurons showed no increased activity during the first crossing back and significantly reduced activity during the last border crossing, averaged across individual neurons (Fig. ) and across mice (Fig. ). Moreover, the elevated activity of rACC→Pn neurons during the post-test progressively decreased after arriving in chamber 2 (Extended Data Fig. ), aligning well with the violation of expectation. Furthermore, we examined the relationship between the latency of the first border crossing and the activity of rACC→Pn neurons during that crossing for each mouse. We reasoned that, if rACC→Pn neurons encode the expectation of pain relief, then mice with the strongest expectation-based motivation to cross the border should show the greatest increase in rACC→Pn neuron activity. Consistent with this prediction, linear regression analysis revealed a negative correlation between the latency of the first border crossing and rACC→Pn neural activity (Fig. ), further evincing the involvement of the rACC→Pn pathway in pain-relief expectation. To clarify whether the increase in activity after conditioning was specific to rACC→Pn neurons, or rather a general feature of all rACC output neurons, we recorded the Ca 2+ dynamics of IT neurons, the other major type of deep-layer pyramidal neurons (rACC→Pn neurons are PT neurons), during PAC. IT neurons showed no significant change in Ca 2+ activity during the first border crossing after conditioning (Extended Data Fig. ), suggesting a specific role for rACC→Pn neurons during pain-relief expectation. Finally, in a separate experiment, we examined rACC→Pn neural activity during noxious thermal, noxious mechanical or innocuous mechanical stimulation (Extended Data Fig. ). None of these stimuli significantly affected rACC→Pn neural Ca 2+ activity, in agreement with the lack of significant change in rACC→Pn neural activity during licking and rearing nocifensive behaviours on the post-test day (Extended Data Fig. ), arguing against a general role for these cells in nociception or mechanosensation.   Consistent with the learning-based nature of placebo analgesia , , the Ca 2+ activity of rACC→Pn neurons increased progressively during PAC (Fig. and Extended Data Fig. ). To examine the underlying synaptic mechanisms, we used brain-slice electrophysiology. First, we labelled rACC→Pn neurons by injecting a tdTomato-encoding AAV with retrograde transport properties into the Pn (Fig. and Extended Data Fig. ). Mice were then subjected to PAC and euthanized immediately after the conditioning phase for electrophysiology recording (Extended Data Fig. ). Passive membrane properties of rACC→Pn neurons, such as the resting membrane potential, input resistance, amplitude and half-duration of the action potential, and action-potential firing frequency, remained unchanged after PAC (Extended Data Fig. ). However, rACC→Pn neurons from conditioned mice (Extended Data Fig. ), but not other L5 rACC neurons (Extended Data Fig. ), displayed more burst firing at the beginning of current injection than rACC→Pn neurons from control mice. Moreover, PAC significantly increased the amplitude, but not the frequency, of spontaneous excitatory postsynaptic currents (EPSCs; Extended Data Fig. ), suggesting a postsynaptic change in rACC→Pn neuron function. Consistent with this, the paired-pulse ratio (PPR), a measure of presynaptic function, was statistically indistinguishable between conditioned and control mice (Extended Data Fig. ), whereas the AMPAR/NMDAR ratio, a postsynaptic characteristic of synaptic transmission, increased significantly (Fig. ). We next tested whether PAC alters long-term potentiation (LTP), a cellular process that underlies learning and memory , in rACC→Pn neurons. We induced LTP using classical theta-burst stimulation (TBS). In rACC→Pn neurons from control mice, the amplitude of EPSCs increased after TBS, then quickly returned to the baseline levels. By contrast, rACC→Pn neurons from conditioned mice showed robust LTP that lasted for the entire recording period (40 min) after induction (Fig. ), indicating enhanced synaptic plasticity. Cortical inhibitory interneurons control Ca 2+ dynamics, burst firing, spontaneous release and synaptic plasticity of principal neurons through feedforward inhibition, facilitating learning . To test whether PAC alters feedforward inhibition, we recorded evoked EPSCs or IPSCs (inhibitory postsynaptic currents) in isolation by holding the membrane potential of rACC→Pn neurons at −70 mV or +10 mV, respectively (Fig. ). In brain slices from control mice, monosynaptic EPSCs were followed by large disynaptic IPSCs, confirming strong feedforward inhibition in this circuit (Extended Data Fig. ). By contrast, rACC→Pn neurons from conditioned mice received significantly weaker feedforward inhibition (Fig. ). Furthermore, the delays between EPSCs and IPSCs were markedly prolonged after conditioning (Fig. ). Similarly, PAC decreased the amplitude and delayed the latency of IPSCs specifically from parvalbumin-positive (PV + ) interneurons (Extended Data Fig. ), which critically contribute to feedforward inhibition in the cortex , . Taken together, these results demonstrate that PAC impairs both the efficacy and timing of feedforward inhibition of rACC→Pn neurons and enhances their excitability.   To test the function of the rACC→Pn pathway in placebo analgesia, we injected AAVs to express halorhodopsin (NpHR) or channelrhodopsin-2 (ChR2) in rACC neurons and implanted optic fibres bilaterally over the Pn (Fig. and Extended Data Fig. ). We then photomanipulated rACC→Pn neuron terminals of conditioned mice during the PAC post-test, beginning when mice crossed from chamber 1 to chamber 2 (Extended Data Fig. ). We found that photoinhibition substantially reduced PAC-induced latency increases in paw licking, rearing and jumping (Fig. ). Conversely, optogenetically activating the rACC→Pn pathway during the post-test significantly prolonged the latency of mice to display paw licking, but not rearing and jumping behaviours (Extended Data Fig. ). These less-pronounced behavioural changes may indicate a ceiling effect, given that Pn neurons, especially their axon terminals, show high instantaneous firing frequencies (>700 Hz) while coding sensory information . Neither photoinhibition nor photoexcitation produced detectable changes in motor coordination (Extended Data Fig. ). These results indicate that the rACC→Pn pathway mediates PAC-induced analgesia. To test whether modulating the activity of the rACC→Pn pathway could alter pain, we subjected naive mice to commonly used thermal (hot plate) and mechanical (von Frey) sensitivity tests while optogenetically manipulating the rACC→Pn pathway (Fig. ). In the hotplate test, photoinhibition of the rACC→Pn pathway decreased paw withdrawal latency, while photoexcitation increased this latency compared with control mice (Fig. ). In the von Frey test, photoinhibition of the rACC→Pn pathway increased the paw withdrawal frequency, whereas photoexcitation decreased the paw withdrawal frequency compared with the control mice (Fig. and Extended Data Fig. ). Furthermore, photoinhibition decreased the mechanical sensitivity threshold, whereas photoexcitation increased it (Fig. ). Together, these results indicate that the rACC→Pn pathway can be activated to generate analgesia.   Oprd1 + Pn neurons We next sought to manipulate the function of Pn neurons during PAC. However, our understanding of the molecular identity of Pn neurons is limited. We therefore used single-cell transcriptomics to investigate the cellular composition of the Pn and identify marker genes to gain genetic access to and manipulate Pn neurons. We used both high-throughput/low-depth (10x Genomics) and low-throughput/high-depth (SMART-seq) scRNA-seq approaches to comprehensively characterize Pn neurons (Fig. and Extended Data Fig. ). Focusing our analysis on neurons, we detected ten transcriptionally distinct clusters (Fig. ). Five clusters were Slc17a7 + (encoding vesicular glutamate transporter 1) excitatory neurons, comprising 72% of all Pn neurons. The remaining clusters were largely Slc32a1 + (encoding vesicular inhibitory amino acid transporter) inhibitory neurons (Fig. and Extended Data Fig. ). More than half of the excitatory Slc17a7 + Pn neurons coexpressed Slc17a6 (encoding vesicular glutamate transporter 2)—a rare feature for glutamatergic neurons throughout the nervous system (Fig. and Extended Data Fig. ). After examining the expression of endogenous opioid peptides and receptors, which critically contribute to pain modulation and placebo analgesia, we determined that a very large proportion of Pn neurons expresses the δ- and/or μ-opioid receptors (Fig. ). Specifically, 54% and 26% of Pn neurons express Oprd1 and Oprm1 (encoding the δ- and μ-opioid receptor, respectively). In total, 81% of Oprd1 + Pn neurons coexpress excitatory neuron markers ( Slc17a7 , Slc17a6 or both; Extended Data Fig. ). We confirmed the presence of Slc17a6 + Oprd1 + neurons in the Pn using fluorescence in situ hybridization (Fig. ). On the basis of these observations, we used an Oprd1 cre mouse line to investigate the anatomy of Oprd1 + Pn neurons and their function in placebo analgesia. To investigate whether Oprd1 + Pn neurons have a role in placebo analgesia and/or pain modulation, we first tested for a direct connection between the Oprd1 + Pn neurons and rACC projection neurons. Both AAV1-mediated anterograde transsynaptic tracing in WT mice and rabies-mediated retrograde transsynaptic tracing in Oprd1 cre mice (Extended Data Fig. ) indicated a monosynaptic connection between rACC neurons and Oprd1 + Pn neurons. Moreover, anterograde transsynaptic tagging suggested that 53% of neurons in rACC-targeted subregions of the Pn receive monosynaptic inputs from the rACC (Extended Data Fig. ). Given that photoinhibition of rACC→Pn neuron terminals abolished placebo analgesia (Fig. ), we next tested whether postsynaptic manipulation of Oprd1 + Pn neurons could produce similar effects. We injected AAVs to express NpHR or eYFP (control) in Oprd1 + Pn neurons and implanted optic fibres bilaterally over the Pn (Fig. ). Photoinhibition of Oprd1 + Pn neurons during the post-test abolished the PAC-induced prolonged latency of mice to display first paw licking, rearing and jumping (Fig. ). A more-specific strategy targeting only the Oprd1 + Pn neurons receiving rACC inputs yielded similar results (Extended Data Fig. ). Consistent with these findings, systemic administration of selective agonists for either the µ- or δ-opioid receptor also diminished the analgesic effects induced by PAC (Extended Data Fig. ). Moreover, photoinhibition of Oprd1 + Pn neurons significantly increased mechanical and thermal sensitivity in the von Frey and hotplate tests, respectively (Extended Data Fig. ). Photoinhibition of Oprd1 + Pn neurons produced no detectable change in locomotion or motor coordination (Extended Data Fig. ). Lastly, photoinhibition of Oprd1 + Pn neurons during the conditioning phase of PAC showed a trend toward attenuating PAC-induced analgesia on the post-test day (Extended Data Fig. ). Together, these results indicate that L5 rACC neurons projecting onto Oprd1 + Pn neurons critically contribute to both placebo analgesia and pain processing.   To gain further evidence that the rACC→Pn pathway mediates pain-relief expectation, we examined the primary target of Pn neurons—the cerebellum. To label the projections of Oprd1 + Pn neurons in the cerebellum, we injected into the Pn of Oprd1 cre mice an AAV encoding mGFP and synaptophysin–mRuby in a Cre-recombinase-dependent manner. The resulting tracing data showed that Oprd1 + Pn neurons mainly project to cerebellar lobules VI, Crus I and Crus II (Extended Data Fig. ), which support the cognitive functions of the cerebellum . We then used a head-mounted miniature microscope to image the dendritic Ca 2+ activity of Purkinje cells , the principal neurons of the cerebellar cortex, in lobule VI of the cerebellar vermis in freely behaving mice during PAC (Fig. ). Cerebellar Purkinje cells receive excitatory input from a single climbing fibre (CF) originating in the inferior olive and from around 200,000 parallel fibres (PFs) that relay information sent disynaptically from the Pn through cerebellar granule cells. Spontaneous CF activity (1–2 Hz) triggers dendritic Ca 2+ spikes that can pervade the entire dendritic tree, whereas PF inputs, depending on their activity level, can evoke smaller to moderate dendritic spikes – . Furthermore, when near coincident in time with CF input, PF activity can lead to supralinear Ca 2+ excitation , . Thus, if the Pn relays pain-relief expectation from the rACC to the cerebellum through PFs, then PAC should increase the amplitudes of Purkinje cell dendritic Ca 2+ spikes and the occurrence frequency of dendritic Ca 2+ spikes that are large enough to be detected by Ca 2+ imaging. To test these predictions, we analysed Ca 2+ imaging recordings from 276 cross-day-aligned Purkinje cells (Fig. ) during PAC. To identify Purkinje cells that might encode pain-relief expectation, we performed a classification analysis (Extended Data Fig. ). On the basis of Ca 2+ activity during the first border crossing (with conditioned pain-relief expectation), the first crossing back (without conditioned pain-relief expectation) and the last border crossing (reduced or no conditioned pain-relief expectation due to expectation violation), the classification algorithm resolved two main classes of Purkinje cells (clusters 1 and 2). Notably, during first crossing back and last border crossing, the average Ca 2+ activity of Purkinje cells in cluster 1 declined substantially, whereas the activity of Purkinje cells in cluster 2 increased modestly but significantly (Extended Data Fig. ). Furthermore, the Ca 2+ activity of Purkinje cells in cluster 1, but not cluster 2 (Extended Data Fig. ), progressively increased across the before, during and after conditioning phases, as seen in statistical analyses of individual neurons (Fig. ) and individual mice (Fig. ). To disentangle the distinct contributions of PF and CF inputs to the elevated Ca 2+ activity of Purkinje cells in cluster 1 during PAC, we examined the amplitudes and occurrence frequency of Purkinje cell dendritic Ca 2+ spikes. Ca 2+ spikes in Purkinje cells of cluster 1 occurred at 1.4 Hz during border crossing on the pre-test day, consistent with the spontaneous firing rate of CFs , . However, Ca 2+ spiking increased to 2.6 Hz on the last day of the conditioning phase and to 2.5 Hz on the post-test day (Extended Data Fig. ). By contrast, the Ca 2+ spiking of Purkinje cells in cluster 2 was not significantly altered during PAC (Extended Data Fig. ). Moreover, Purkinje cells of cluster 1 (Extended Data Fig. ), but not cluster 2 (Extended Data Fig. ), displayed more Ca 2+ spikes with large amplitudes after PAC. Furthermore, when considering only Ca 2+ spikes with amplitudes exceeding 3 z -scored Δ F/F , suggestive of supralinear Ca 2+ signals, both the number and amplitude of these spikes were increased for Purkinje cells in cluster 1 (Extended Data Fig. ), but not in cluster 2 (Extended Data Fig. ). Moreover, linear regression analysis showed that, across days of PAC, increased net activity levels of Purkinje cells in cluster 1, but not in cluster 2, were associated with shorter latencies for the first border crossing (Extended Data Fig. ). Both Purkinje cells in cluster 1 and the entire set of recorded Purkinje cells displayed elevated Ca 2+ activity during first border crossing after conditioning, but not during the first crossing back or the last border crossing during the post-test (Extended Data Fig. ). This effect was absent in a shuffled dataset with randomized crossing times (Extended Data Fig. ). Together, these findings support the idea that elevated PF inputs during the PAC assay drive the increased Ca 2+ activity of Purkinje cells in cluster 1 and thereby promote behavioural changes. This similar response of cerebellar Purkinje cells to that of rACC→Pn neurons during PAC directly demonstrates the cerebellum’s involvement in pain-relief expectation and the critical role of the rACC–ponto–cerebellar pathway in placebo analgesia.   Pain is a complex experience with sensory-discriminative, affective-motivational and cognitive-evaluative dimensions . Placebo analgesia epitomizes the cognitive-evaluative dimension of pain by demonstrating how cognitive factors such as expectations alter the perception of noxious events or injuries to shape pain subjectivity. To investigate the neural basis of placebo analgesia in rodents, we developed the PAC assay. This paradigm effectively establishes an expectation of pain relief in mice, resulting in reduced pain (Fig. ). Although PAC-induced analgesia may not capture all of the complexities of human placebo analgesia, this assay replicates several key features of the phenomenon, including reliance on the endogenous opioid system (Extended Data Figs. and ), the recall of pain-relief expectations over time (Extended Data Fig. ) and the inherent variability observed in human placebo analgesia (Fig. and Extended Data Fig. ). Thus, building on previous approaches to model placebo analgesia in rodents , PAC offers a simple, practical and non-pharmacological method to investigate the biology of expectation-induced analgesia at several levels. At the circuit level, our data suggest that the rACC mediates placebo analgesia by engaging the cerebellum through L5 PT projections to the Pn. Among all Pn neurons, we found that 65% express Oprd1 and/or Oprm1 (Fig. ), suggesting that the activity of Pn neurons is probably modulated by the endogenous opioid system. Notably, naloxone injections during the conditioning phase prevent the attenuation of PAC-induced analgesia caused by three consecutive days of injections (Extended Data Fig. ), and optogenetically inhibiting Oprd1 + Pn neurons during the same phase reduces PAC-induced analgesia (Extended Data Fig. ). Although these observations suggest that associative learning requires the activation of Oprd1 + Pn neurons, aligning with the Ca 2+ imaging data, the contribution of opioid signalling in this process needs to be further confirmed. Similarly, although our data suggest the involvement of both the µ- and δ-opioid receptors in PAC-induced placebo analgesia (Extended Data Fig. ), the specific opioid peptides and receptors within the rACC-Pn-cerebellar pathway, and potentially in other regions, that collectively mediate this phenomenon remain to be established. Moreover, by imaging the dendritic activity of cerebellar Purkinje cells, the sole outputs of the cerebellar cortex, during pain-relief expectation (Fig. and Extended Data Fig. ), our study provides direct, cellular-level evidence for the cerebellum’s contribution to placebo analgesia. The mechanisms by which the cerebellum modulates placebo analgesia remain to be explored. Based on its connectivity with numerous brain regions – , the cerebellum could modulate pain perception through ascending and/or descending pathways. For example, the rACC may recruit the cerebellum to indirectly modulate the descending pain modulation pathway, especially the periaqueductal grey , , to produce analgesia; this could explain the enhanced coactivation between the rACC and periaqueductal grey during placebo analgesia reported in several human studies , . At the cellular level, our Ca 2+ imaging and electrophysiological data show that PAC specifically increases the activity of Pn-projecting L5 rACC neurons (Extended Data Fig. ). While previous studies suggest that PT neurons targeting specific subcortical areas tend to be homogeneous, both genetically and in terms of morphology and function , we cannot exclude the possibility that only a subset of rACC→Pn neurons drives placebo analgesia. Notably, PT (rACC→Pn) and IT neurons display opposite activity during PAC: our electrophysiological data show reduced activity in non-PT L5 rACC neurons after conditioning (Extended Data Fig. ), and our Ca 2+ imaging data indicate that IT neurons are more active, whereas PT neurons less active, during the last border crossing in the PAC post-test (Extended Data Fig. ). The opposite activity of rACC PT and IT neurons during placebo analgesia is an interesting subject for future study. At the synaptic level, our electrophysiology data show that PAC increases the synaptic plasticity and impairs the feedforward inhibition of rACC→Pn neurons (Fig. ). Feedforward inhibition contributes to burst firing, shapes network representations of behavioural events and modulates ensemble Ca 2+ signalling during learning , . Thus, the diminished feedforward inhibition of rACC→Pn neurons probably underlies their increased burst firing after conditioning and progressively enhanced activity during PAC (Fig. and Extended Data Fig. ). Notably, in the cerebellar cortex, feedforward inhibition has also been shown to gate supralinear Ca 2+ signalling in Purkinje cell dendrites . Given that Purkinje cells display an increased number of supralinear Ca 2+ spikes after PAC (Extended Data Fig. ), suppressed feedforward inhibition may serve as a common synaptic mechanism of pain-relief expectation in both cerebral and cerebellar cortices. In conclusion, this study reveals circuit, cellular and synaptic mechanisms that underlie placebo analgesia and, more broadly, the cognitive-evaluative dimension of pain, bridging the gap with our more advanced understanding of the sensory-discriminative and affective-motivational dimensions of pain , – . Crucially, we provide evidence that this rACC–ponto–cerebellar pathway could be engaged by analgesic drugs, neurostimulation protocols and/or cognitive behavioural therapies to produce pain relief.   Animals All of the procedures were performed according to animal care guidelines approved by the Administrative Panel on Laboratory Animal Care (APLAC) of Stanford University, by the Institutional Animal Care and Use Committee (IACUC) of the University of North Carolina at Chapel Hill and by the International Association for the Study of Pain. Mice were housed at a maximum of 5 mice per cage and maintained under a 12 h–12 h light–dark cycle in a temperature-controlled environment with ad libitum access to food and water. Male or female mice with an age range of 8–12 weeks were used for the experiments. C57BL/6 wild-type (000664), TRAP2 ( Fos CreERT2 , 030323) and Pvalb cre (017320) mice were purchased from Jackson Laboratory. Oprd1 cre mice were generated at the Stanford Transgenic Research Center using standard gene targeting procedures. In brief, an IRES-cre cassette was introduced immediately following the Oprd1 stop codon through homologous recombination. After electroporation of the targeting construct into 129Sv/SvJ-derived ES cells, neomycin-resistant ES cell colonies were screened for IRES-cre insertion using long-range PCR and Southern blotting. Flp transfection was then performed to remove the FRT-flanked neomycin-resistance gene. Confirmed neomycin-excised colonies were then injected into C57BL/6 blastocysts to generate chimeric males, which were bred to C57BL/6 females to generate founders. Sample sizes for mouse behaviour and electrophysiology experiments were determined using the power analysis (‘pwr’ R package). Specifically, the function ‘pwr.t.test’ was used, with a significance level of 0.05, a power of 0.80, and effect sizes estimated from pilot experiments and/or previous studies using similar methods. For the histology experiment, samples were allocated by randomly selecting brain slices containing regions of interest. For all other experiments, samples and animals were randomized into groups. Experimenters were blinded to experimental groups before and during all mouse behavior experiments. Calcium imaging data were analyzed by two independent researchers using two different analysis pipelines at two universities. Drugs 4-OHT (H6278, Sigma-Aldrich) was prepared in absolute ethanol and Kolliphor EL (C5135, Sigma-Aldrich) and administered intraperitoneally (50 mg per kg). Naloxone (N7758, Sigma-Aldrich) was prepared in saline and administered intraperitoneally (5 mg per kg). Viral reagents To express GCaMP7f in rACC→Pn projection neurons for Ca 2+ imaging, we intracranially injected 400 nl of rAAV2-retro-hSyn-Cre-WPRE-hGH (105553-AAVrg; Addgene; titre: 7 × 10 12 viral genomes (vg) per ml) into the right Pn at the coordinates anteroposterior (AP): −4.0 mm, mediolateral (ML): +0.4 mm, dorsoventral (DV): −5.4/−5.8 mm and 400 nl of AAV1-syn-FLEX-jGCaMP7f-WPRE (104492-AAV1; Addgene; titre: 1 × 10 13 vg per ml) into the right ACC (AP: +0.75 mm, ML: +0.5 mm, DV: −1.75 mm). To express GCaMP6s in ACC IT neurons, we injected 400 nl of AAVretro-EF1a-Flpo (55637-AAVrg; Addgene; titre: 2.2 × 10 13 vg per ml) into the left dorsomedial striatum at the coordinates AP: +0.2 mm, ML: −2.0 mm, DV: −4.1 mm and 400 nl of AAV8-EF1a-fDIO-GCaMP6s (105714-AAV8; Addgene; titre: 1.8 × 10 13 vg per ml) into the right ACC. To express GCaMP8m in cerebellar Purkinje cells for Ca 2+ imaging, we intracranially injected 200 nl of AAV1-CamKIIa-JGCaMP8m (176751-AAV1; Addgene; titre: 1.8 × 10 13 vg per ml) into lobule VI of the vermis at the coordinates AP: −7.0 mm, ML: +0.0 mm, DV: −360 and −200 µm. To trace the output of rACC neurons active during PAC, we intracranially injected 400 nl of AAV-DJ-hSyn-FLEX-mGFP-2A-Synaptophysin-mRuby (Stanford Virus Core; titre: 1.2 × 10 13 vg per ml) into the rACC of TRAP2 ( Fos CreERT2 ) mice at the coordinates AP: +0.75 mm, ML: +0.5 mm, DV: −1.75 mm. To optogenetically manipulate the activity of the rACC→Pn pathway, we intracranially injected 400 nl of either AAV5-hSyn-eNpHR-eYFP (UNC Vector Core; titre: 4.4 × 10 12 vg per ml) or AAV5-hSyn-ChR2-eYFP (UNC Vector Core; titre: 5.3 × 10 12 vg per ml) into the ACC of WT mice, and 400 nl of AAV5-EF1a-DIO-eNpHR-eYFP (UNC Vector Core; titre: 4.5 × 10 12 vg per ml) into the Pn of Oprd1 cre mice. To optogenetically manipulate the activity of the Oprd1 + Pn neurons receiving monosynaptic inputs from rACC neurons, we intracranially injected in Oprd1 cre mice 400 nl of AAV1-EF1a-Flpo (55637-AAV; Addgene; titre: 2.3 × 10 13 ) into the rACC bilaterally, and then 400 nl AAV8-nEF-Con/Fon-NpHR-EYFP (137152-AAV8; Addgene; titre: 2.6 × 10 13 ) into the Pn bilaterally. To trace the output of ACC and secondary motor cortex projections to the Pn, we intracranially injected 400 nl of AAV5-hSyn-eGFP (UNC Vector Core; titre: 4 × 10 12 vg per ml) into the ACC (AP: +0.75 mm, ML: +0.5 mm, DV: −1.75 mm) and 400 nl of rAAV5-hsyn-chrimsonr-tdT (UNC Vector Core; titre: 4.6 × 10 12 vg per ml) into the secondary motor cortex (AP: +1.41 mm, ML: +0.75 mm, DV: −1.5 mm). To label rACC→Pn neurons for electrophysiological recording, we intracranially injected 400 nl of AAVretro-CAG-tdTomato (59462-AAVrg; titre: 1.2 × 10 12 vg per ml) into the right Pn at the coordinates listed above. To measure the feedforward inhibition of rACC→Pn neurons by PV + interneurons, in addition to the AAVretro-CAG-tdTomato virus injected into the Pn, we injected 400 nl of AAV5-DIO-EF1a-ChR2-eYFP (UNC Vector Core; titre: 4.0 × 10 12 vg per ml) into the rACC to express ChR2 in PV + interneurons. To trace the output of Pn neurons that receive inputs from the ACC, we injected 300 nl of the anterograde transsynaptic virus AAV1-hSyn-cre-WPRE-hGH (Addgene; titre: 1 × 10 13 vg per ml) into the ACC , then injected 400 nl of AAV-DJ-hSyn-FLEX-mGFP-2A-Synaptophysin-mRuby (Stanford Virus Core; titre: 1.2 × 10 13 vg per ml) into the Pn. The coordinates for the ACC and Pn injections were the same as for the Ca 2+ imaging experiment. To trace brain areas forming monosynaptic connections with Oprd1 + Pn neurons, we injected the AAV helper viruses AAV-FLEx-TVA-Mkate and AAV-FLEx-G into the Pn of Oprd1 cre mice. Then, 3 weeks later, a recombinant rabies virus (RVdG) was injected into the Pn. Next, 1 week after injection of the rabies virus, the brains were collected. The labelling efficiency of viruses is governed by a multifaceted interplay of factors, including the virus’s serotype and titre, the selected promoter, and the targeted cell types. Thus, the labelling efficiency of the virus used in this study cannot be consistently quantified. Stereotaxic injection and surgical procedures All surgeries were performed under aseptic conditions. Animals were anaesthetized using isoflurane (07-893-8441, Patterson Veterinary). After anaesthesia induction with 4% isoflurane in a chamber, animals were transferred to a small-animal digital stereotaxic instrument (David Kopf Instruments) and anaesthesia was maintained using 2% isoflurane. Injections were performed using a calibrated microcapillary tube (P0549, Sigma-Aldrich) and pulled with a P-97 micropipette puller (Sutter Instruments). The viral reagents were aspirated into the tube using negative pressure and delivered at a rate of around 50 nl min −1 using positive pressure. After injection, the tube was raised ~100 µm and held stationary for an additional 10 min to allow diffusion of the virus, and then slowly withdrawn at a rate of 0.05 mm s −1 . After surgery, the mice were transferred to a warm chamber until they had fully recovered, and were then returned to their home cage. Microendoscope or optical cannula implantation Microendoscope implantation in the ACC was performed as described previously , . In brief, we stereotaxically implanted a stainless steel cannula 1 week after viral injection. The cannula was fabricated with 18-G 304 S/S Hypodermic Tubing, custom cut to pieces 4.3 mm in length (Ziggy’s Tubes and Wires) and attached at one end to a Schott Glass 2 mm in diameter and 0.1 mm thick (TTL) using an optical adhesive (Norland Optical Adhesive #81, Thermo Fisher Scientific). After grinding away the excess glass using a polisher, the cannulas were carefully stored until use in implantation surgeries. For cannula implantation surgeries, mice were anaesthetized with isoflurane (4% for induction and 2% for maintenance) while the body temperature was maintained using a heating pad. After cranial hair removal, skin sterilization and scalp incision, we performed small craniotomies in three locations (AP: +5.10 mm, −3.56 mm, −3.56 mm; ML: −0.77mm, +2.06 mm, −3.01 mm) and then screwed three stainless steel screws (MX-000120-01SF, Component Supply Company) down to the dura of the skull to stabilize the implantation. We then performed a fourth craniotomy using a drill (Model EXL-M40, Osada) and a 1.4 mm round drill burr (19007-14, FST) at the coordinates AP: +0.75 mm, ML: +1.25 mm. The bone fragments and other detritus were cleared away from the opening using sterilized forceps. To prevent any increase in intracranial pressure and improve image quality, we aspirated away the overlying tissue down to approximately DV: −1.0 mm at an angle of 18°. The custom cannula was then attached to a holder (David Kopf Instruments) and lowered to AP: +0.75 mm, ML: +1.25 mm, DV: −1.8 mm at 18°. Blood and additional debris around the craniotomy were quickly removed and adhesive cement (S380 Metabond Quick Adhesive Cement System, C&B) was applied to seal the gap between the cannula and the skull. A custom-designed laser-cut headbar (18–24 G stainless steel, LaserAlliance) was placed over the left posterior skull screw, then layers of dental cement (Lang Dental) were applied to affix both the cannula and headbar to the skull. After the cement dried (7–10 min), we transferred the animal to a heated pad for recovery. After full recovery, the mice were returned to their home cage. Placement of the cranial window After cranial hair removal, skin sterilization and scalp incision, we performed small craniotomies in two locations (AP: +5.10 mm, −3.56 mm; ML: +0.77 mm, −2.89 mm) and then screwed two stainless steel screws (MX-000120-01SF, Component Supply Company) down to the dura of the skull to stabilize the implantation. We then opened an approximately 4-mm-diameter craniotomy above lobule VI of cerebellar vermis (7.0 mm posterior to bregma, 0.0 mm lateral). We first injected a virus expressing GCaMP8m into the cerebellum (DV: −360 to 200 µm). After virus injection, we gently removed the dura with fine forceps (91197-00, FST). Next, we applied Kwik-Sil (World Precision Instruments) to the border of the craniotomy. We then covered the brain with a 3-mm-diameter coverslip that we attached beneath a 5-mm-diameter coverslip before the experiment using ultraviolet-light-activated epoxy (Norland Optical Adhesive #81, Thermo Fisher Scientific). We fixed the 5-mm-diameter coverslip to the cranium with adhesive cement (S380 Metabond Quick Adhesive Cement System, C&B) and dental cement (Lang Dental). After the cement dried (7–10 min), we transferred the animal to a heated pad for recovery. After full recovery, the mice were returned to their home cage. Verification of microendoscope implantation and GCaMP expression in awake, behaving mice Three weeks after the cannula implantation, we verified the GCaMP7f/8m fluorescence and Ca 2+ activity in awake mice on a custom-designed apparatus to avoid using any general anaesthetics . Mice were head-fixed by clamping (CC-1, Siskiyou) their headbar and were allowed to run on a freely rotating wheel (InnoWheel, Thermo Fisher Scientific). For imaging rACC→Pn neurons, a naked 1.0-mm-diameter gradient refractive index (GRIN) lens probe (1050-004598, Inscopix) was lowered into the implanted cannula using forceps. A miniature microscope (nVoke, Inscopix) was attached to a holder (1050-002199, Inscopix) connected to a goniometer (GN1, Thorlabs) for x – y and y – z plane tilting. The holder was connected to a three-axis micromanipulator for lowering the miniature microscope to the optimal focal plane. Image acquisition software (nVoke, Inscopix) was used to display the incoming image frames in units of relative fluorescence changes (Δ F / F ), enabling observation of Ca 2+ activity in awake, behaving mice. If we observed Ca 2+ transients, we proceeded by mounting the miniature microscope baseplate. Miniature microscope baseplate mounting Mice were anaesthetized with isoflurane (4% for induction and 2% for maintenance) and placed onto the stereotaxic instrument. The GRIN lens probe was fixed in place with ultraviolet-light-curable epoxy (Loctite Light-Activated Adhesive, 4305). The miniature microscope with baseplate attached was stereotaxically lowered toward the top of the GRIN lens probe or coverslips until the brain tissue was in focus. We then adjusted the orientation of the miniature microscope until it was parallel to the surface of the GRIN lens probe. The baseplate was then fixed onto the skull with dental cement. To prevent external light from contaminating the imaging field of view during recording, the outer layer was coated with black nail polish (Black Onyx NL T02, OPI). After attaching the baseplate cover (1050-004639, Inscopix), the mice were transferred to a heated pad for recovery. The mice were then returned to their home cages and then housed individually. Ca 2+ imaging video recording, cell extraction and estimation of firing rates To perform Ca 2+ imaging in mice during PAC, we used an implanted GRIN lens for rACC→Pn neurons or a cranial window for cerebellar Purkinje cells and a miniaturized microscope (nVista, Inscopix). Miniature microscopes were mounted onto the head of the mouse before each behavioural experiment using a custom mounting station. Images were acquired using the Inscopix Data Acquisition Software (IDAS; Inscopix) at a frame rate of 20 Hz. The light-emitting diode intensity was set at 1.5 mW for imaging rACC→Pn neurons or 1 mW for imaging cerebellar Purkinje cell dendrites. A gain of 2 was used for all mice. Before performing cell extraction, we first corrected for brain motion in the videos using the TurboReg motion-correction algorithm. Later, we extracted both the spatial filters and the robust time traces for the regions of interest (ROIs) using EXTRACT , a robust cell extraction routine. We matched the resulting ROIs across days based on Tanimoto similarity, defined as [12pt]{minimal} 				 				  				  				  				 				 				 				 				$$T=} {}}{| | \,{}\,| {| }^{2}+| | \,{}\,| {| }^{2}-{} {}}$$ T ( x , y ) = x ⋅ y ∣ ∣ x ∣ ∣ 2 + ∣ ∣ y ∣ ∣ 2 − x ⋅ y , where x and y are vectors corresponding to flattened spatial filters. We adjusted the cut-off for the Tanimoto similarity to each mouse for best results evaluated by visual inspection, then reinitialized EXTRACT with the global cell map. This process allows EXTRACT to find cells that may be missed on different days. We performed this routine of cell extraction, across-day registration and reinitialization for five iterations. We next visually inspected all videos and discarded spurious, duplicate and dendritic ROIs. Lastly, using the verified ROIs that correspond to cells, we performed a final robust regression via EXTRACT to obtain the final traces. We took the z -score of the traces, subtracting the mean and dividing by the s.d., to standardize the trace units across days. To obtain a discrete approximation of the firing rates, we first thresholded the raw traces by a constant value, chosen as 0.5× the maximum value of the trace. The thresholded traces were searched for peak points that were at least 3 frames apart from each other, and then binarized at these peaks (Extended Data Fig. ). The firing rates were obtained by convolving the binarized peaks through a Gaussian kernel with an s.d. of 500 ms. As we thresholded the traces at the beginning and binarized the peaks at the end before convolution, the resulting firing rates did not necessarily contain all of the event times, but should be considered a discrete approximation using the binarized versions of large Ca 2+ events. We chose this approximation of firing rates for its robustness against day-to-day variations in the cell baselines and/or absolute Δ F/F values. Analysis of neural responses during crossing times across days For each condition, the mean activity of each neuron during border crossing times was calculated by averaging the z -scored neural activities (firing rates for Extended Data Fig. ) within a time window beginning 2 s before and ending 2 s after the crossing event. We chose the averaged activities inside the time window instead of performing a point estimation of neural activity. This choice was motivated by our desire to mitigate the measurement errors in crossing times from the behavioural videos and to remain agnostic to the fine structure of the neural code in short time durations, as our interest is in understanding whether the neural population reacts differently, corresponding to the level of pain relief expectation during crossing and crossing back, during each phase of PAC. To determine the extent to which the neural responses of individual cells may differ between first border crossing and crossing back, we computed a discriminability index ( d ′) 2 for each neuron using the equation [12pt]{minimal} 				 				  				  				  				 				 				 				 				$${({d}^{{} })}^{2}=_{{}}-{ }_{{}}}{{ }_{{}}}\,$$ ( d ′ ) 2 = μ forward − μ backward σ pooled , where μ forward and μ backward are the mean activity of the neuron calculated during first crossing and crossing back, respectively. σ pooled is the pooled s.d. from both conditions. To perform randomized controls for all analyses, we averaged the values of interest (discriminability index, z -scored traces and/or firing rates) with randomly selected crossing times for each neuron 100 times and created a null distribution over the neural population. Classification of Purkinje cells We conducted k -means clustering analysis to categorize Purkinje cells based on their activity during the first border crossing, first crossing back and the last crossing on the post-test day. We extracted the Ca 2+ activity of each Purkinje cell during these events within the 4 s border crossing period for each condition and then concatenated them, resulting in a Ca 2+ activity trace for each Purkinje cell with a total duration of 12 s. Subsequently, we performed silhouette analysis to determine the optimal number of clusters for this dataset, which we found to be two. Accordingly, we then applied k -means clustering to classify all cross-day-aligned Purkinje cells into two clusters. Purkinje cell Ca 2+ spike frequency and amplitude analysis To find Ca 2+ events in Purkinje cells, we first applied a threshold to the raw traces using a constant value set at 0.1 times the maximum amplitude of the trace. The thresholded traces were then scanned for peaks that were at least 3 frames apart from each other and binarized at these peaks. For frequency analysis, we counted the number of Ca 2+ events in the binarized traces of each cell during border crossing and calculated their firing frequency during this 4 s border-crossing period (Extended Data Fig. ). For Ca 2+ spike amplitude analysis, we extracted the value from the z -scored Ca 2+ traces of each cell at the timepoint of detected Ca 2+ events as the amplitude. We then selected these amplitudes during the 4 s border-crossing time for comparison (Extended Data Fig. ). For Ca 2+ spike waveform analysis, we used the z -scored trace of each Purkinje cell to identify the start, peak and end points of each spike that had an amplitude larger than 3 z -scored Δ F/F (Extended Data Fig. ). Histology Tissue collection and processing Mice were transcardially perfused with phosphate-buffered saline (PBS) followed by 4% formaldehyde in PBS. Brains were then dissected, post-fixed in 4% formaldehyde, and cryoprotected in 30% sucrose. Tissues were then frozen in Optimum Cutting Temperature compound (OCT; 4583, Tissue Tek) and sectioned using a cryostat (Leica). The brains were sectioned at 40 μm and stored in PBS at 4 °C if used immediately. For longer storage, tissue sections were placed in glycerol-based cryoprotectant solution and stored at −20 °C. For in situ hybridization, tissues were sectioned at 14 μm, collected on Superfrost Plus slides (22-037-246, Thermo Fisher Scientific) and stored at −80 °C. Immunohistochemistry Tissues were incubated for 1 h and blocked in 0.1 M PBS with 0.3% Triton X-100 (Sigma-Aldrich) plus 5% normal donkey serum. Primary and secondary antibodies were diluted in 0.1 M PBS with 0.3% Triton X-100 plus 1% normal donkey serum. The sections were then incubated overnight at 4 °C in primary antibody solution, washed in 0.1 M PBS with 0.3% Triton X-100 for 40 min, incubated for 2 h in secondary antibody at room temperature and washed in 0.1 M PBS for 40 min. The sections were then mounted using Fluoromount-G (00-4958-02, Thermo Fisher Scientific). Images were acquired on the Zeiss LSM 780 confocal microscope using Zeiss Zen software, running on a Windows PC, in the UNC Neuroscience Microscopy Core. A streptavidin conjugate (Alexa Fluor 594 conjugate, Thermo Fisher Scientific; 1:1,000) was used to visualize biocytin. In situ hybridization For in situ hybridization experiments, we used Advanced Cell Diagnostics RNAscope Technology (ACD Bioscience). In brief, wild-type mice 5–8 weeks old were deeply anaesthetized with 0.1 ml of Euthasol (NDC-051311-050-01, Virbac) and perfused transcardially with 0.1 M PBS followed by 4% formaldehyde solution in PBS. Brains were dissected, cryoprotected in 30% sucrose overnight and then frozen in OCT. Frozen tissue was cut at 20 μm onto Superfrost Plus slides and stored at −80 °C. Tissue was thawed from −80 °C, washed with PBS at room temperature and subsequently processed according to the protocol provided by the manufacturer. We first pretreated the tissue with solutions from the pretreatment kit to permeabilize the tissue, then incubated with protease for 30 min and then with the hybridization probe(s) for another 2 h at 40 °C. Data analysis for the output of TRAPed rACC neurons To quantify the output of neurons in the rACC TRAPed after PAC, we analysed the expression of mRuby in putative presynaptic axonal terminals. First, background subtraction was performed on the mRuby channels of each image using the rolling-ball algorithm in ImageJ. Subsequently, the images were thresholded to a value 4 times the mean background intensity, converting them into binary format. The pixel densities of these binary images were then calculated and normalized to the size of the specific regions displaying mRuby expression. Electrophysiology ACC slice preparation We began the PAC paradigm 3–4 weeks after virus injection. Mice were euthanized immediately after the conditioning phase of PAC. After decapitation, the brain was rapidly collected and immersed in ice-cold slicing solution containing 87 mM NaCl, 25 mM NaHCO 3 , 2.5 mM KCl, 1.25 mM NaH 2 PO 4 , 10 mM d -glucose, 75 mM sucrose, 0.5 mM CaCl 2 and 7 mM MgCl 2 (pH 7.4 in 95% O 2 and 5% CO 2 , 325 mOsm). Coronal brain slices 300 μm thick and containing the rACC were cut using a VT1200 vibratome (Leica Microsystems). After around 20 min incubation at 35 °C, the slices were stored at room temperature. Slices were then transferred to the chamber for electrophysiological recording. Slices were used for a maximum of 5 h after dissection. The experiments were performed at 21–24 °C. During the experiment, slices were superfused with a physiological extracellular solution containing 125 mM NaCl, 2.5 mM KCl, 25 mM NaHCO 3 , 1.25 mM NaH 2 PO 4 , 25 mM d -glucose, 2 mM CaCl 2 , and 1 mM MgCl 2 (pH 7.4 in 95% O 2 and 5% CO 2 , ~325 mOsm). Whole-cell patch recording of rACC→Pn neurons was performed as described previously . The pipettes (1B150F-4, WPI) were formed using a P-97 puller (Sutter Instruments). The resistance was 3–5 MΩ. Measuring action potential properties, spontaneous release and LTP induction The intracellular solution used for testing the action potential firing properties, spontaneous release and LTP induction of rACC→Pn neurons contained 135 mM K-gluconate, 20 mM KCl, 0.1 mM EGTA, 2 mM MgCl 2 , 2 mM Na 2 ATP, 10 mM HEPES and 0.3 mM Na 3 GTP (pH adjusted to 7.28 with KOH, ~310 mOsm); in a subset of recordings, 0.2% biocytin was added. To measure membrane properties and evoke action potential firing of rACC→Pn neurons, a 1 s step current (−50, 0, 50, 100, 150, 200, 250, 300 pA) was injected into the cell through the recording pipette. Spontaneous EPSCs were recorded while holding the rACC→Pn neurons at −70 mV. For LTP induction, biphasic electrical stimulations (5–8 V, 100 ms) were delivered by placing a borosilicate theta glass (2.0 mm, Warner Instruments) in layer II/III of the rACC. The glass was pulled using a vertical pipette puller and filled with perfusion solution. The fibre was stimulated using the DS4 Bi-Phasic Current Stimulator (Digitimer) at 0.02 Hz to measure evoked EPSCs of the rACC→Pn neurons for 6 min as the baseline. TBS (5 trains of burst with 4 pulses at 100 Hz, at 200 ms intervals, repeated 4 times at intervals of 10 s) was then administered to induce LTP. After LTP induction, evoked EPSCs were recorded for another 30 min to compare against the baseline. No blocker was used to block inhibitory synaptic inputs. Measuring AMPA/NMDA ratio, PPR and feedforward inhibition The Cs + -based intracellular solution used to measure the AMPA/NMDA ratio and PPR contained 130 mM Cs-methanesulfonate, 2 mM KCl, 10 mM EGTA, 2 mM MgCl 2 , 2 mM Na 2 ATP, 10 mM HEPES and 5 mM QX-314 (pH adjusted to 7.28 with CsOH, ~310 mOsm). To evoke synaptic response of rACC→Pn neurons, electrical stimulation (50–80 μA, 100 μs) was delivered by placing a concentric bipolar electrode (FHC) in layer II/III of the rACC. The selective GABA A receptor antagonist SR-95531 (10 μM; Sigma-Aldrich) was used to block IPSCs. To record EPSCs mediated by both AMPA and NMDA receptors, membrane potentials were held at voltages increasing from −80 mV to +60 mV. To measure the PPR, two electrical stimulations at different time intervals (20, 50, 100, 200, 500 ms) were used to evoke synaptic transmission. The membrane potential was set to −30 mV to record both EPSCs and IPSCs in the same trace (Extended Data Fig. ) or to either −70 mV or +10 mV to examine EPSCs or IPSCs in isolation (Fig. ). Measuring inhibitory input from PV + interneurons Slices from Pvalb cre mice were prepared as described above. An intracellular solution containing high chloride concentration (140 mM KCl, 10 mM EGTA, 2 mM MgCl 2 , 2 mM ATP, 10 mM HEPES and 2 mM QX-314; pH adjusted to 7.28 with KOH; 313 mOsm) was used for postsynaptic recordings of rACC→Pn neurons, which were conducted in the voltage-clamp configuration with a holding potential of −70 mV. For all voltage-clamp recordings, we applied hyperpolarizing test pulses (5 mV, 100 ms) to monitor series and input resistance throughout the entire experiment. Data from experiments in which series resistance changed more than 15% were discarded. Data acquisition and analysis Electrophysiological data were acquired using the Multiclamp 700b amplifier (Axon Instruments), low-pass filtered at 10 kHz, and sampled at 20 or 50 kHz using the Digidata 1440A low-noise digitizer (Axon Instruments). Stimulation and data acquisition were performed using Clampfit 10 software (Axon Instruments). Data were analysed using Stimfit v.0.14.9 ( https://github.com/neurodroid/stimfit ), Clampfit v.11.2 (Molecular Devices) and R v.4.0.3 (The R Project for Statistical Computing). sEPSCs were detected using a template-matching algorithm and verified by visual inspection . The location at which the peak EPSC was recorded while holding the membrane potential at −80 mV was used to measure the amplitude of AMPAR EPSCs. The amplitude of NMDAR EPSCs was measured 50 ms after the electrical stimulation. The synaptic latency of monosynaptic EPSCs or IPSCs was measured from the onset of the electrical stimulus to the onset of the EPSC or IPSC. The disynaptic IPSC delay (Fig. ) was measured from the onset of the EPSC at −70 mV to the onset of the IPSC at +10 mV. Cannula implantation and optogenetic manipulations For fibreoptic cannula implantation surgeries, mice were anaesthetized with isoflurane (4% for induction and 2% for maintenance) while the body temperature was maintained using a heating pad. After cranial hair removal, skin sterilization and scalp incision, we bilaterally injected a virus encoding inhibitory or excitatory opsin into the ACC using the coordinates described above for manipulating ACC terminals in the Pn. To manipulate the activity of Oprd1 + cells in the Pn, we bilaterally injected a virus encoding an inhibitory opsin into the Pn at the coordinates AP: −4.0 mm, ML: ±0.4 mm, DV: −5.4/−5.8 mm. To manipulate the activity of Oprd1 + cells in the Pn that receive rACC inputs, we bilaterally injected the AAV1-Flpo virus into the rACC, then another virus into the Pn to express an inhibitory opsin in a Cre- and Flp-dependent manner. After virus injection, we performed small craniotomies in three locations (AP: +5.10, −1.06, −3.56 mm; ML: −0.77, +2.87, −3.13 mm). Next, to stabilize the implantation, three stainless steel screws (MX-000120-01SF, Component Supply Company) were drilled into the dura of the skull. We then performed two additional craniotomies at the coordinates AP: −4.0 mm, ML: ±1.2 mm. The cannula (CFMLC12L05, Thorlabs or RWD) was then attached to a holder (David Kopf Instruments) and lowered at 10° to the coordinates AP: +4.0 mm, ML: ±1.2 mm, DV: −4.9 mm. Blood and debris around the craniotomy were quickly removed and adhesive cement (S380 Metabond Quick Adhesive Cement System, C&B) was used to seal the gap between the cannula and skull. A custom-designed laser-cut headbar (18–24 G stainless steel, LaserAlliance) was placed over the left posterior skull screw, then layers of dental cement were applied (Lang Dental) to affix both the cannula and headbar to the skull. After the cement dried (7–10 min), we transferred the animal to a heated pad until full recovery, then to their home cage. For optogenetic photostimulation of inhibitory (eNpHR3.0) or excitatory (ChR2) opsins, ferrules were connected to a 561 nm (yellow) laser diode (MGL-FN-561, Opto Engine) or 494 nm (blue) laser diode (MBL-III-473, Opto Engine LLC) using a FC/PC adaptor and a fibreoptic rotary joint (Thorlabs). The laser output was controlled using a shutter controller (SR470, Stanford Research System), which delivered yellow light continuously for the inhibitory opsin and 4 ms blue light pulses at 20 Hz for the excitatory opsin. Light output through the optical fibres was adjusted to ~5 mW at the tip of the optical fibre for inhibition and ~10 mW at the tip of the optical fibre for excitation. Behavioural tests For all behavioural assays described below, mice were acclimatized to the researcher and testing environment for at least 30 min before testing. PAC assay to induce and evaluate placebo analgesia The PAC apparatus consists of two adjacent and visually distinct chambers, using two separate thermal plates (BIOSEB) as the floor. PAC is a 7 day behavioural assay consisting of three phases: habituation (days 1–2) and pre-test (day 3), conditioning (days 4–6), and post-test (day 7; Fig. ). During the habituation and pre-test phases, the floors of both chambers are set at 30 °C and the mice are free to explore both compartments for 3 min; their performance on the pre-test day is compared with their performance on the post-test day. During the conditioning phase, the floor of the chamber on which the mouse begins the session (chamber 1) is set at 48 °C. Mice progressively learn that chamber 1 is painful and to associate chamber 2, which remains at 30 °C, with pain relief. On the post-test day, the floors of both chambers are set at 48 °C to evaluate any analgesic effect induced by the expectation of pain relief. The performance of mice was recorded for 3 min using a camera (acA1300, Basler) controlled by MATLAB (R2019b, MathWorks). The recorded videos were analysed using the machine-learning-based algorithm DeepLabCut or Ethovision XT15 (Noldus). We quantified and compared the latency of border crossings, time spent in each chamber and nocifensive behaviours (licking, rearing, jumping) of conditioned and unconditioned mice (Fig. ). Naloxone injection To investigate whether endogenous opioid activity is necessary for PAC-induced placebo analgesia, we injected mice with saline or naloxone (N7758, Sigma-Aldrich) intraperitoneally (5 mg per kg) during the conditioning phase (day 4 to 6; Extended Data Fig. ) or before the post-conditioning test on day 7 (Extended Data Fig. ). After injection, the mice were returned to their home cage for at least 30 min to reduce injection-induced stress. Saline-injected mice were used as controls. TRAP of rACC neurons during PAC Two weeks after virus injection, TRAP2 mice were subjected to an adjusted PAC assay (30 min conditioning phase on days 4–6 instead of 3 min) to label the rACC neurons encoding expectation of pain relief. TRAP2 mice were injected with 4-hydroxytamoxifen (50 mg per kg, subcutaneous) on the last day of the conditioning phase (day 6) immediately before conducting the PAC trial. After injection, the mice were allowed to remain in the PAC apparatus for 30 min, and then returned to their home cages. Then, 2 weeks later, we perfused the mice and dissected the brains to determine synaptophysin–mRuby expression in the rACC and other brain areas. Mice that underwent the same procedure but with both chambers set at 30 °C were used as controls. Pin prick To examine the Ca 2+ activity of rACC→Pn neurons during noxious mechanical stimulation (Extended Data Fig. ), we gently touched the plantar surface of the hindpaw with a 25 G needle 10 times at an interval of around 30 s (Extended Data Fig. ). As a control, a needle with a blunt end was used to measure the Ca 2+ activity of rACC→Pn neurons during innocuous mechanical stimulation. The entire procedure was recorded using a camera (acA1300, Basler) controlled by MATLAB (R2019b, MathWorks) and synchronized with the miniscope. Hindpaw radiant heat (Hargreaves) test To examine the Ca 2+ activity of rACC→Pn neurons during noxious thermal stimulation (Extended Data Fig. ), we used the Hargreaves test. Mice were placed in plastic chambers on a glass surface heated to 25 °C, through which a radiant heat source (Department of Anesthesiology, UC San Diego) could be focused onto the hindpaw. We recorded the performance of mice using a camera (acA1300, Basler) controlled by MATLAB (R2019b, MathWorks) and synchronized with the miniscope. Von Frey withdrawal threshold test Eight von Frey filaments (Stoelting), ranging from 0.007 to 6.0 g were used to assess mechanical withdrawal thresholds. Filaments were applied perpendicular to the ventral–medial hindpaw surface with sufficient force to cause a slight bending of the filament. A positive response was characterized by a rapid withdrawal of the paw away from the stimulus fibre within 4 s. The up–down method was used to determine the mechanical threshold (50% withdrawal threshold) . Von Frey withdraw frequency test To evaluate mechanical sensitivity, we used six von Frey filaments (0.07, 0.16, 0.4, 1.0, 1.4 and 6.0 g). Filaments were applied perpendicular to the ventral–medial hindpaw surface with sufficient force to cause a slight bending of the filament. Each filament was applied for 1 s. A positive response was characterized by a rapid and immediate withdrawal of the paw away from the filament. Each filament was applied five times. The frequency of reflexive withdrawal responses was calculated. Hotplate test Mice were acclimatized to the testing environment as described above. The plate temperature was set at 48 °C or 52 °C to measure thermal pain threshold. The mouse was placed onto the plate and the latency preceding licking and/or biting of a hindpaw was scored. To prevent tissue damage, a cut-off of 3 min or 1 min was set for the 48 °C and 52 °C plates, respectively. Formalin test An intraplantar injection (20 µl) of 2.5% formalin was performed in the left hindpaw of mice after the conditioning phase of PAC. The mouse behaviour was recorded for 30 min within the PAC apparatus or using a four-camera set-up enabling synchronized capture of each lateral angle. The time spent licking the injected hindpaw was scored using Ethovision XT15 (Noldus) or automatically scored using DeepEthogram, an unbiased, pixel-based machine learning algorithm . scRNA-seq and snRNA-seq Sample preparation, library generation and sequencing For low-throughput, high-depth scRNA-seq, we used the SMART-seq v4 Ultra Low Input RNA Kit for Sequencing (SSv4; TakaraBio) as described previously . To focus our high-depth analysis on neurons, we used Snap25-IRES2-cre;Ai14 ( Snap25-tdT ) mice, which express the fluorescent reporter tdTomato in neurons. The Pn was microdissected from two 8-week-old Snap25 -tdT mice (one male and one female). The mice were anaesthetized with isoflurane and perfused with artificial cerebrospinal fluid comprising CaCl 2 (0.5 mM), glucose (25 mM), HCl (96 mM), HEPES (20 mM), MgSO 4 (10 mM), NaH 2 PO 4 (1.25 mM), myo-inositol (3 mM), N -acetylcysteine (12 mM), NMDG (96 mM), KCl (2.5 mM), NaHCO 3 (25 mM), sodium l -ascorbate (5 mM), sodium pyruvate (3 mM), taurine (0.01 mM) and thiourea (2 mM), bubbled with carbogen (95% O 2 and 5% CO 2 ). The Pn was microdissected and embedded in 2% agarose, sliced into 250 µm sections with a vibratome, then subjected to enzymatic digestion with pronase (1 mg ml −1 ) for 70 min at room temperature and triturated using fire-polished Pasteur pipettes to generate single-cell suspensions. Live single Pn neurons were isolated into eight-well strips containing SSv4 lysis buffer based on DAPI − tdTomato + using fluorescence-activated cell sorting, then stored at −80 °C. To prepare single-cell transcriptome libraries, polyadenylated RNAs were reverse transcribed into full-length cDNA and subjected to 18 PCR amplification cycles according to the SSv4 protocol. Single-cell libraries were indexed and prepared for Illumina sequencing using the Nextera XT DNA Library Preparation Kit. Multiplexed libraries were sequenced on the HiSeq 2500 sequencers to generate 100 bp paired-end reads at a depth of 2.5 million reads per cell. Single-cell FastQ files were aligned to the mm10 mouse genome (GRCm38) using STAR (v.2.7.3a) . For high-throughput, low-depth single-nucleus RNA-seq (snRNA-seq) we used the 10x Chromium 3′ V3 System (10x Genomics). We microdissected the Pn from two 8-week-old female C57BL/6J mice. Pn tissues were pooled and flash-frozen on dry ice. Single-nucleus isolation was performed as described previously . Tissue was placed into a prechilled Dounce homogenizer (Kimble) containing 500 µl chilled detergent lysis buffer (0.10% Triton X-100, 0.32 M sucrose, 10 mM HEPES (pH 8.0), 5 mM CaCl 2 , 3 mM MgAc, 0.1 mM EDTA, 1 mM dithiothreitol (DTT)). Tissue was homogenized by five strokes with the ‘loose’ pestle followed by ten strokes with the ‘tight’ pestle (Kimble). Then, 1 ml of sucrose buffer (0.32 M sucrose, 10 mM HEPES (pH 8.0), 5 mM CaCl 2 , 3 mM MgAc, 0.1 mM EDTA, 1 mM DTT) was added to the Dounce homogenizer and the combined solution was passed through a 40 μm cell strainer into a fresh tube containing 1 ml of 0.32 M sucrose buffer. An additional 1 ml of 0.32 M sucrose buffer was passed through the filter and the resulting 3.5 ml solution was centrifuged at 3,200 g for 10 min at 4 °C. The pellet was resuspended with 3 ml of 0.32 M sucrose buffer and homogenized for 30 s (Ultra-Turrax disperser, setting 1). Next, 12.5 ml of 1 M sucrose buffer (1 M sucrose, 10 mM HEPES (pH 8.0), 3 mM MgAc, 1 mM DTT) was pipetted beneath the homogenate and the tube was centrifuged at 3,200 g for 20 min at 4 °C. After decanting the supernatant, the pellet was resuspended in 1 ml of resuspension solution (0.4 mg ml −1 BSA, 0.2 U μl −1 RNase inhibitor (Lucigen) in 1× PBS), filtered through a 35 µm cell strainer and diluted to a final concentration of 225 cells per µl. Single-nucleus suspensions were loaded onto two 10x Genomics chips (Chromium v3). snRNA-seq libraries were constructed according to the protocol provided by the manufacturer. Multiplexed snRNA-seq libraries were spiked with a PhiX control library (5%) and sequenced across two NextSeq 550 high-output flow-cell runs. Raw sequencing files were aligned to the mm10 mouse genome (GRCm38) and converted to gene expression matrices using the Cell Ranger pipeline (Cell Ranger v.5.0.1, default parameters). Intronic reads were included to increase assay sensitivity. Normalization, clustering and differential gene expression scRNA-seq data were analysed using Seurat (v.4.0) . For 10x Genomics datasets, nuclei expressing fewer than 200 genes and genes expressed in fewer than 5 nuclei were removed. For SSv4 data, cells expressing fewer than 1,000 genes and genes expressed in fewer than 5 cells were removed. To focus our analysis on neurons, we performed broad preliminary clustering to define principal cell types and remove cells and nuclei that lacked expression of neuronal genes ( Snap25 and Rbfox3 ) or expressed conventional glial cell markers ( Mbp , Pdgfra , Gfap , Csf1r and Pecam1 ). The final datasets comprised 4,720 neuronal nuclei from 10x experiments (8,669 median transcripts per cell; 3,816 median genes per cell) and 212 neuronal cells from SSv4 experiments (481,098 median transcripts per cell; 9,956 median genes per cell). Each scRNA-seq dataset was normalized and transformed to a common scale separately using SCTransform with the following parameters: n cells = half the total number of cells; variable.features = median number of genes expressed per cell. The resulting datasets were integrated by SCT-Pearson residuals usinng Seurat’s FindIntegrationAnchors and IntegrateData functions using the default parameters. We determined which principal components to use in subsequent clustering analyses by manually evaluating which principal components contributed to substantial variation (ElbowPlot function in Seurat). To increase cluster robustness, the optimal nearest neighbour parameter ( k ) was identified by iterating through nearest-neighbour values (FindNeighbors function in Seurat) and calculating the average silhouette score . The k -nearest-neighbour value yielding the highest average silhouette score was used for Louvain clustering. Pairs of clusters that could not be reliably distinguished by a single gene using a binomial test ( q < 0.01; log-effect size > 2.0) were dissolved and cells reassigned to the nearest cluster based on Euclidean distance in principal component (PC) space . An initial round of clustering using this method was performed to detect principal cell types (for example, neurons, microglia, astrocytes). A subsequent round of clustering was performed on neuronal principal cell types based on enrichment of neuron-specific genes ( Snap25 , Rbfox3 ) and neurotransmitter vesicular transporters ( Slc17a6 , Slc17a7 , Slc32a1 ). Cell-type-specific marker genes were identified using a binomial test to determine which genes are expressed in cells within a given cluster compared to all other cells . The expression frequency of a given gene ( g ) expressed in a specific cell population ( N ) was compared to the expression frequency in the remaining population ( M ). Thus, the P value for this test was calculated as follows: [12pt]{minimal} 				 				  				  				  				 				 				 				 				$${p}_{g}={ }_{k={N}_{g}}^{N}C(N,k)  (k)(1- ) (N-k)$$ p g = ∑ k = N g N C ( N , k ) γ ∨ ( k ) ( 1 − γ ) ∨ ( N − k ) , where γ is the proportional frequency of cells expressing the gene of interest ( M g / M ). A complete list of cluster-specific marker genes is provided in Supplementary Table . Statistics and reproducibility Statistical analysis was performed using R v.4.0.3 (The R Project for Statistical Computing). All values are reported as mean ± s.e.m. Statistical significance was tested using two-sided Wilcoxon rank-sum tests, two-sided Wilcoxon matched-pairs signed-rank tests or one- or two-way ANOVA with Tukey post hoc test. P < 0.05 was considered to be significant. P values between 0.05 and 0.1 were noted in the figures. In experiments involving electrical fibre stimulation, stimulation artifacts were blanked for display purposes. In Figs. and , two mice were examined in each group, and similar results were generated. In Extended Data Figs. and , three independent repeats were performed with similar results and representative images were shown. In Extended Data Figs. and , two independent repeats were performed with similar results. Reporting summary Further information on research design is available in the linked to this article.   All of the procedures were performed according to animal care guidelines approved by the Administrative Panel on Laboratory Animal Care (APLAC) of Stanford University, by the Institutional Animal Care and Use Committee (IACUC) of the University of North Carolina at Chapel Hill and by the International Association for the Study of Pain. Mice were housed at a maximum of 5 mice per cage and maintained under a 12 h–12 h light–dark cycle in a temperature-controlled environment with ad libitum access to food and water. Male or female mice with an age range of 8–12 weeks were used for the experiments. C57BL/6 wild-type (000664), TRAP2 ( Fos CreERT2 , 030323) and Pvalb cre (017320) mice were purchased from Jackson Laboratory. Oprd1 cre mice were generated at the Stanford Transgenic Research Center using standard gene targeting procedures. In brief, an IRES-cre cassette was introduced immediately following the Oprd1 stop codon through homologous recombination. After electroporation of the targeting construct into 129Sv/SvJ-derived ES cells, neomycin-resistant ES cell colonies were screened for IRES-cre insertion using long-range PCR and Southern blotting. Flp transfection was then performed to remove the FRT-flanked neomycin-resistance gene. Confirmed neomycin-excised colonies were then injected into C57BL/6 blastocysts to generate chimeric males, which were bred to C57BL/6 females to generate founders. Sample sizes for mouse behaviour and electrophysiology experiments were determined using the power analysis (‘pwr’ R package). Specifically, the function ‘pwr.t.test’ was used, with a significance level of 0.05, a power of 0.80, and effect sizes estimated from pilot experiments and/or previous studies using similar methods. For the histology experiment, samples were allocated by randomly selecting brain slices containing regions of interest. For all other experiments, samples and animals were randomized into groups. Experimenters were blinded to experimental groups before and during all mouse behavior experiments. Calcium imaging data were analyzed by two independent researchers using two different analysis pipelines at two universities.   4-OHT (H6278, Sigma-Aldrich) was prepared in absolute ethanol and Kolliphor EL (C5135, Sigma-Aldrich) and administered intraperitoneally (50 mg per kg). Naloxone (N7758, Sigma-Aldrich) was prepared in saline and administered intraperitoneally (5 mg per kg).   To express GCaMP7f in rACC→Pn projection neurons for Ca 2+ imaging, we intracranially injected 400 nl of rAAV2-retro-hSyn-Cre-WPRE-hGH (105553-AAVrg; Addgene; titre: 7 × 10 12 viral genomes (vg) per ml) into the right Pn at the coordinates anteroposterior (AP): −4.0 mm, mediolateral (ML): +0.4 mm, dorsoventral (DV): −5.4/−5.8 mm and 400 nl of AAV1-syn-FLEX-jGCaMP7f-WPRE (104492-AAV1; Addgene; titre: 1 × 10 13 vg per ml) into the right ACC (AP: +0.75 mm, ML: +0.5 mm, DV: −1.75 mm). To express GCaMP6s in ACC IT neurons, we injected 400 nl of AAVretro-EF1a-Flpo (55637-AAVrg; Addgene; titre: 2.2 × 10 13 vg per ml) into the left dorsomedial striatum at the coordinates AP: +0.2 mm, ML: −2.0 mm, DV: −4.1 mm and 400 nl of AAV8-EF1a-fDIO-GCaMP6s (105714-AAV8; Addgene; titre: 1.8 × 10 13 vg per ml) into the right ACC. To express GCaMP8m in cerebellar Purkinje cells for Ca 2+ imaging, we intracranially injected 200 nl of AAV1-CamKIIa-JGCaMP8m (176751-AAV1; Addgene; titre: 1.8 × 10 13 vg per ml) into lobule VI of the vermis at the coordinates AP: −7.0 mm, ML: +0.0 mm, DV: −360 and −200 µm. To trace the output of rACC neurons active during PAC, we intracranially injected 400 nl of AAV-DJ-hSyn-FLEX-mGFP-2A-Synaptophysin-mRuby (Stanford Virus Core; titre: 1.2 × 10 13 vg per ml) into the rACC of TRAP2 ( Fos CreERT2 ) mice at the coordinates AP: +0.75 mm, ML: +0.5 mm, DV: −1.75 mm. To optogenetically manipulate the activity of the rACC→Pn pathway, we intracranially injected 400 nl of either AAV5-hSyn-eNpHR-eYFP (UNC Vector Core; titre: 4.4 × 10 12 vg per ml) or AAV5-hSyn-ChR2-eYFP (UNC Vector Core; titre: 5.3 × 10 12 vg per ml) into the ACC of WT mice, and 400 nl of AAV5-EF1a-DIO-eNpHR-eYFP (UNC Vector Core; titre: 4.5 × 10 12 vg per ml) into the Pn of Oprd1 cre mice. To optogenetically manipulate the activity of the Oprd1 + Pn neurons receiving monosynaptic inputs from rACC neurons, we intracranially injected in Oprd1 cre mice 400 nl of AAV1-EF1a-Flpo (55637-AAV; Addgene; titre: 2.3 × 10 13 ) into the rACC bilaterally, and then 400 nl AAV8-nEF-Con/Fon-NpHR-EYFP (137152-AAV8; Addgene; titre: 2.6 × 10 13 ) into the Pn bilaterally. To trace the output of ACC and secondary motor cortex projections to the Pn, we intracranially injected 400 nl of AAV5-hSyn-eGFP (UNC Vector Core; titre: 4 × 10 12 vg per ml) into the ACC (AP: +0.75 mm, ML: +0.5 mm, DV: −1.75 mm) and 400 nl of rAAV5-hsyn-chrimsonr-tdT (UNC Vector Core; titre: 4.6 × 10 12 vg per ml) into the secondary motor cortex (AP: +1.41 mm, ML: +0.75 mm, DV: −1.5 mm). To label rACC→Pn neurons for electrophysiological recording, we intracranially injected 400 nl of AAVretro-CAG-tdTomato (59462-AAVrg; titre: 1.2 × 10 12 vg per ml) into the right Pn at the coordinates listed above. To measure the feedforward inhibition of rACC→Pn neurons by PV + interneurons, in addition to the AAVretro-CAG-tdTomato virus injected into the Pn, we injected 400 nl of AAV5-DIO-EF1a-ChR2-eYFP (UNC Vector Core; titre: 4.0 × 10 12 vg per ml) into the rACC to express ChR2 in PV + interneurons. To trace the output of Pn neurons that receive inputs from the ACC, we injected 300 nl of the anterograde transsynaptic virus AAV1-hSyn-cre-WPRE-hGH (Addgene; titre: 1 × 10 13 vg per ml) into the ACC , then injected 400 nl of AAV-DJ-hSyn-FLEX-mGFP-2A-Synaptophysin-mRuby (Stanford Virus Core; titre: 1.2 × 10 13 vg per ml) into the Pn. The coordinates for the ACC and Pn injections were the same as for the Ca 2+ imaging experiment. To trace brain areas forming monosynaptic connections with Oprd1 + Pn neurons, we injected the AAV helper viruses AAV-FLEx-TVA-Mkate and AAV-FLEx-G into the Pn of Oprd1 cre mice. Then, 3 weeks later, a recombinant rabies virus (RVdG) was injected into the Pn. Next, 1 week after injection of the rabies virus, the brains were collected. The labelling efficiency of viruses is governed by a multifaceted interplay of factors, including the virus’s serotype and titre, the selected promoter, and the targeted cell types. Thus, the labelling efficiency of the virus used in this study cannot be consistently quantified.   All surgeries were performed under aseptic conditions. Animals were anaesthetized using isoflurane (07-893-8441, Patterson Veterinary). After anaesthesia induction with 4% isoflurane in a chamber, animals were transferred to a small-animal digital stereotaxic instrument (David Kopf Instruments) and anaesthesia was maintained using 2% isoflurane. Injections were performed using a calibrated microcapillary tube (P0549, Sigma-Aldrich) and pulled with a P-97 micropipette puller (Sutter Instruments). The viral reagents were aspirated into the tube using negative pressure and delivered at a rate of around 50 nl min −1 using positive pressure. After injection, the tube was raised ~100 µm and held stationary for an additional 10 min to allow diffusion of the virus, and then slowly withdrawn at a rate of 0.05 mm s −1 . After surgery, the mice were transferred to a warm chamber until they had fully recovered, and were then returned to their home cage. Microendoscope or optical cannula implantation Microendoscope implantation in the ACC was performed as described previously , . In brief, we stereotaxically implanted a stainless steel cannula 1 week after viral injection. The cannula was fabricated with 18-G 304 S/S Hypodermic Tubing, custom cut to pieces 4.3 mm in length (Ziggy’s Tubes and Wires) and attached at one end to a Schott Glass 2 mm in diameter and 0.1 mm thick (TTL) using an optical adhesive (Norland Optical Adhesive #81, Thermo Fisher Scientific). After grinding away the excess glass using a polisher, the cannulas were carefully stored until use in implantation surgeries. For cannula implantation surgeries, mice were anaesthetized with isoflurane (4% for induction and 2% for maintenance) while the body temperature was maintained using a heating pad. After cranial hair removal, skin sterilization and scalp incision, we performed small craniotomies in three locations (AP: +5.10 mm, −3.56 mm, −3.56 mm; ML: −0.77mm, +2.06 mm, −3.01 mm) and then screwed three stainless steel screws (MX-000120-01SF, Component Supply Company) down to the dura of the skull to stabilize the implantation. We then performed a fourth craniotomy using a drill (Model EXL-M40, Osada) and a 1.4 mm round drill burr (19007-14, FST) at the coordinates AP: +0.75 mm, ML: +1.25 mm. The bone fragments and other detritus were cleared away from the opening using sterilized forceps. To prevent any increase in intracranial pressure and improve image quality, we aspirated away the overlying tissue down to approximately DV: −1.0 mm at an angle of 18°. The custom cannula was then attached to a holder (David Kopf Instruments) and lowered to AP: +0.75 mm, ML: +1.25 mm, DV: −1.8 mm at 18°. Blood and additional debris around the craniotomy were quickly removed and adhesive cement (S380 Metabond Quick Adhesive Cement System, C&B) was applied to seal the gap between the cannula and the skull. A custom-designed laser-cut headbar (18–24 G stainless steel, LaserAlliance) was placed over the left posterior skull screw, then layers of dental cement (Lang Dental) were applied to affix both the cannula and headbar to the skull. After the cement dried (7–10 min), we transferred the animal to a heated pad for recovery. After full recovery, the mice were returned to their home cage. Placement of the cranial window After cranial hair removal, skin sterilization and scalp incision, we performed small craniotomies in two locations (AP: +5.10 mm, −3.56 mm; ML: +0.77 mm, −2.89 mm) and then screwed two stainless steel screws (MX-000120-01SF, Component Supply Company) down to the dura of the skull to stabilize the implantation. We then opened an approximately 4-mm-diameter craniotomy above lobule VI of cerebellar vermis (7.0 mm posterior to bregma, 0.0 mm lateral). We first injected a virus expressing GCaMP8m into the cerebellum (DV: −360 to 200 µm). After virus injection, we gently removed the dura with fine forceps (91197-00, FST). Next, we applied Kwik-Sil (World Precision Instruments) to the border of the craniotomy. We then covered the brain with a 3-mm-diameter coverslip that we attached beneath a 5-mm-diameter coverslip before the experiment using ultraviolet-light-activated epoxy (Norland Optical Adhesive #81, Thermo Fisher Scientific). We fixed the 5-mm-diameter coverslip to the cranium with adhesive cement (S380 Metabond Quick Adhesive Cement System, C&B) and dental cement (Lang Dental). After the cement dried (7–10 min), we transferred the animal to a heated pad for recovery. After full recovery, the mice were returned to their home cage. Verification of microendoscope implantation and GCaMP expression in awake, behaving mice Three weeks after the cannula implantation, we verified the GCaMP7f/8m fluorescence and Ca 2+ activity in awake mice on a custom-designed apparatus to avoid using any general anaesthetics . Mice were head-fixed by clamping (CC-1, Siskiyou) their headbar and were allowed to run on a freely rotating wheel (InnoWheel, Thermo Fisher Scientific). For imaging rACC→Pn neurons, a naked 1.0-mm-diameter gradient refractive index (GRIN) lens probe (1050-004598, Inscopix) was lowered into the implanted cannula using forceps. A miniature microscope (nVoke, Inscopix) was attached to a holder (1050-002199, Inscopix) connected to a goniometer (GN1, Thorlabs) for x – y and y – z plane tilting. The holder was connected to a three-axis micromanipulator for lowering the miniature microscope to the optimal focal plane. Image acquisition software (nVoke, Inscopix) was used to display the incoming image frames in units of relative fluorescence changes (Δ F / F ), enabling observation of Ca 2+ activity in awake, behaving mice. If we observed Ca 2+ transients, we proceeded by mounting the miniature microscope baseplate. Miniature microscope baseplate mounting Mice were anaesthetized with isoflurane (4% for induction and 2% for maintenance) and placed onto the stereotaxic instrument. The GRIN lens probe was fixed in place with ultraviolet-light-curable epoxy (Loctite Light-Activated Adhesive, 4305). The miniature microscope with baseplate attached was stereotaxically lowered toward the top of the GRIN lens probe or coverslips until the brain tissue was in focus. We then adjusted the orientation of the miniature microscope until it was parallel to the surface of the GRIN lens probe. The baseplate was then fixed onto the skull with dental cement. To prevent external light from contaminating the imaging field of view during recording, the outer layer was coated with black nail polish (Black Onyx NL T02, OPI). After attaching the baseplate cover (1050-004639, Inscopix), the mice were transferred to a heated pad for recovery. The mice were then returned to their home cages and then housed individually. Ca 2+ imaging video recording, cell extraction and estimation of firing rates To perform Ca 2+ imaging in mice during PAC, we used an implanted GRIN lens for rACC→Pn neurons or a cranial window for cerebellar Purkinje cells and a miniaturized microscope (nVista, Inscopix). Miniature microscopes were mounted onto the head of the mouse before each behavioural experiment using a custom mounting station. Images were acquired using the Inscopix Data Acquisition Software (IDAS; Inscopix) at a frame rate of 20 Hz. The light-emitting diode intensity was set at 1.5 mW for imaging rACC→Pn neurons or 1 mW for imaging cerebellar Purkinje cell dendrites. A gain of 2 was used for all mice. Before performing cell extraction, we first corrected for brain motion in the videos using the TurboReg motion-correction algorithm. Later, we extracted both the spatial filters and the robust time traces for the regions of interest (ROIs) using EXTRACT , a robust cell extraction routine. We matched the resulting ROIs across days based on Tanimoto similarity, defined as [12pt]{minimal} 				 				  				  				  				 				 				 				 				$$T=} {}}{| | \,{}\,| {| }^{2}+| | \,{}\,| {| }^{2}-{} {}}$$ T ( x , y ) = x ⋅ y ∣ ∣ x ∣ ∣ 2 + ∣ ∣ y ∣ ∣ 2 − x ⋅ y , where x and y are vectors corresponding to flattened spatial filters. We adjusted the cut-off for the Tanimoto similarity to each mouse for best results evaluated by visual inspection, then reinitialized EXTRACT with the global cell map. This process allows EXTRACT to find cells that may be missed on different days. We performed this routine of cell extraction, across-day registration and reinitialization for five iterations. We next visually inspected all videos and discarded spurious, duplicate and dendritic ROIs. Lastly, using the verified ROIs that correspond to cells, we performed a final robust regression via EXTRACT to obtain the final traces. We took the z -score of the traces, subtracting the mean and dividing by the s.d., to standardize the trace units across days. To obtain a discrete approximation of the firing rates, we first thresholded the raw traces by a constant value, chosen as 0.5× the maximum value of the trace. The thresholded traces were searched for peak points that were at least 3 frames apart from each other, and then binarized at these peaks (Extended Data Fig. ). The firing rates were obtained by convolving the binarized peaks through a Gaussian kernel with an s.d. of 500 ms. As we thresholded the traces at the beginning and binarized the peaks at the end before convolution, the resulting firing rates did not necessarily contain all of the event times, but should be considered a discrete approximation using the binarized versions of large Ca 2+ events. We chose this approximation of firing rates for its robustness against day-to-day variations in the cell baselines and/or absolute Δ F/F values. Analysis of neural responses during crossing times across days For each condition, the mean activity of each neuron during border crossing times was calculated by averaging the z -scored neural activities (firing rates for Extended Data Fig. ) within a time window beginning 2 s before and ending 2 s after the crossing event. We chose the averaged activities inside the time window instead of performing a point estimation of neural activity. This choice was motivated by our desire to mitigate the measurement errors in crossing times from the behavioural videos and to remain agnostic to the fine structure of the neural code in short time durations, as our interest is in understanding whether the neural population reacts differently, corresponding to the level of pain relief expectation during crossing and crossing back, during each phase of PAC. To determine the extent to which the neural responses of individual cells may differ between first border crossing and crossing back, we computed a discriminability index ( d ′) 2 for each neuron using the equation [12pt]{minimal} 				 				  				  				  				 				 				 				 				$${({d}^{{} })}^{2}=_{{}}-{ }_{{}}}{{ }_{{}}}\,$$ ( d ′ ) 2 = μ forward − μ backward σ pooled , where μ forward and μ backward are the mean activity of the neuron calculated during first crossing and crossing back, respectively. σ pooled is the pooled s.d. from both conditions. To perform randomized controls for all analyses, we averaged the values of interest (discriminability index, z -scored traces and/or firing rates) with randomly selected crossing times for each neuron 100 times and created a null distribution over the neural population. Classification of Purkinje cells We conducted k -means clustering analysis to categorize Purkinje cells based on their activity during the first border crossing, first crossing back and the last crossing on the post-test day. We extracted the Ca 2+ activity of each Purkinje cell during these events within the 4 s border crossing period for each condition and then concatenated them, resulting in a Ca 2+ activity trace for each Purkinje cell with a total duration of 12 s. Subsequently, we performed silhouette analysis to determine the optimal number of clusters for this dataset, which we found to be two. Accordingly, we then applied k -means clustering to classify all cross-day-aligned Purkinje cells into two clusters. Purkinje cell Ca 2+ spike frequency and amplitude analysis To find Ca 2+ events in Purkinje cells, we first applied a threshold to the raw traces using a constant value set at 0.1 times the maximum amplitude of the trace. The thresholded traces were then scanned for peaks that were at least 3 frames apart from each other and binarized at these peaks. For frequency analysis, we counted the number of Ca 2+ events in the binarized traces of each cell during border crossing and calculated their firing frequency during this 4 s border-crossing period (Extended Data Fig. ). For Ca 2+ spike amplitude analysis, we extracted the value from the z -scored Ca 2+ traces of each cell at the timepoint of detected Ca 2+ events as the amplitude. We then selected these amplitudes during the 4 s border-crossing time for comparison (Extended Data Fig. ). For Ca 2+ spike waveform analysis, we used the z -scored trace of each Purkinje cell to identify the start, peak and end points of each spike that had an amplitude larger than 3 z -scored Δ F/F (Extended Data Fig. ).   Microendoscope implantation in the ACC was performed as described previously , . In brief, we stereotaxically implanted a stainless steel cannula 1 week after viral injection. The cannula was fabricated with 18-G 304 S/S Hypodermic Tubing, custom cut to pieces 4.3 mm in length (Ziggy’s Tubes and Wires) and attached at one end to a Schott Glass 2 mm in diameter and 0.1 mm thick (TTL) using an optical adhesive (Norland Optical Adhesive #81, Thermo Fisher Scientific). After grinding away the excess glass using a polisher, the cannulas were carefully stored until use in implantation surgeries. For cannula implantation surgeries, mice were anaesthetized with isoflurane (4% for induction and 2% for maintenance) while the body temperature was maintained using a heating pad. After cranial hair removal, skin sterilization and scalp incision, we performed small craniotomies in three locations (AP: +5.10 mm, −3.56 mm, −3.56 mm; ML: −0.77mm, +2.06 mm, −3.01 mm) and then screwed three stainless steel screws (MX-000120-01SF, Component Supply Company) down to the dura of the skull to stabilize the implantation. We then performed a fourth craniotomy using a drill (Model EXL-M40, Osada) and a 1.4 mm round drill burr (19007-14, FST) at the coordinates AP: +0.75 mm, ML: +1.25 mm. The bone fragments and other detritus were cleared away from the opening using sterilized forceps. To prevent any increase in intracranial pressure and improve image quality, we aspirated away the overlying tissue down to approximately DV: −1.0 mm at an angle of 18°. The custom cannula was then attached to a holder (David Kopf Instruments) and lowered to AP: +0.75 mm, ML: +1.25 mm, DV: −1.8 mm at 18°. Blood and additional debris around the craniotomy were quickly removed and adhesive cement (S380 Metabond Quick Adhesive Cement System, C&B) was applied to seal the gap between the cannula and the skull. A custom-designed laser-cut headbar (18–24 G stainless steel, LaserAlliance) was placed over the left posterior skull screw, then layers of dental cement (Lang Dental) were applied to affix both the cannula and headbar to the skull. After the cement dried (7–10 min), we transferred the animal to a heated pad for recovery. After full recovery, the mice were returned to their home cage.   After cranial hair removal, skin sterilization and scalp incision, we performed small craniotomies in two locations (AP: +5.10 mm, −3.56 mm; ML: +0.77 mm, −2.89 mm) and then screwed two stainless steel screws (MX-000120-01SF, Component Supply Company) down to the dura of the skull to stabilize the implantation. We then opened an approximately 4-mm-diameter craniotomy above lobule VI of cerebellar vermis (7.0 mm posterior to bregma, 0.0 mm lateral). We first injected a virus expressing GCaMP8m into the cerebellum (DV: −360 to 200 µm). After virus injection, we gently removed the dura with fine forceps (91197-00, FST). Next, we applied Kwik-Sil (World Precision Instruments) to the border of the craniotomy. We then covered the brain with a 3-mm-diameter coverslip that we attached beneath a 5-mm-diameter coverslip before the experiment using ultraviolet-light-activated epoxy (Norland Optical Adhesive #81, Thermo Fisher Scientific). We fixed the 5-mm-diameter coverslip to the cranium with adhesive cement (S380 Metabond Quick Adhesive Cement System, C&B) and dental cement (Lang Dental). After the cement dried (7–10 min), we transferred the animal to a heated pad for recovery. After full recovery, the mice were returned to their home cage.   Three weeks after the cannula implantation, we verified the GCaMP7f/8m fluorescence and Ca 2+ activity in awake mice on a custom-designed apparatus to avoid using any general anaesthetics . Mice were head-fixed by clamping (CC-1, Siskiyou) their headbar and were allowed to run on a freely rotating wheel (InnoWheel, Thermo Fisher Scientific). For imaging rACC→Pn neurons, a naked 1.0-mm-diameter gradient refractive index (GRIN) lens probe (1050-004598, Inscopix) was lowered into the implanted cannula using forceps. A miniature microscope (nVoke, Inscopix) was attached to a holder (1050-002199, Inscopix) connected to a goniometer (GN1, Thorlabs) for x – y and y – z plane tilting. The holder was connected to a three-axis micromanipulator for lowering the miniature microscope to the optimal focal plane. Image acquisition software (nVoke, Inscopix) was used to display the incoming image frames in units of relative fluorescence changes (Δ F / F ), enabling observation of Ca 2+ activity in awake, behaving mice. If we observed Ca 2+ transients, we proceeded by mounting the miniature microscope baseplate.   Mice were anaesthetized with isoflurane (4% for induction and 2% for maintenance) and placed onto the stereotaxic instrument. The GRIN lens probe was fixed in place with ultraviolet-light-curable epoxy (Loctite Light-Activated Adhesive, 4305). The miniature microscope with baseplate attached was stereotaxically lowered toward the top of the GRIN lens probe or coverslips until the brain tissue was in focus. We then adjusted the orientation of the miniature microscope until it was parallel to the surface of the GRIN lens probe. The baseplate was then fixed onto the skull with dental cement. To prevent external light from contaminating the imaging field of view during recording, the outer layer was coated with black nail polish (Black Onyx NL T02, OPI). After attaching the baseplate cover (1050-004639, Inscopix), the mice were transferred to a heated pad for recovery. The mice were then returned to their home cages and then housed individually.   2+ imaging video recording, cell extraction and estimation of firing rates To perform Ca 2+ imaging in mice during PAC, we used an implanted GRIN lens for rACC→Pn neurons or a cranial window for cerebellar Purkinje cells and a miniaturized microscope (nVista, Inscopix). Miniature microscopes were mounted onto the head of the mouse before each behavioural experiment using a custom mounting station. Images were acquired using the Inscopix Data Acquisition Software (IDAS; Inscopix) at a frame rate of 20 Hz. The light-emitting diode intensity was set at 1.5 mW for imaging rACC→Pn neurons or 1 mW for imaging cerebellar Purkinje cell dendrites. A gain of 2 was used for all mice. Before performing cell extraction, we first corrected for brain motion in the videos using the TurboReg motion-correction algorithm. Later, we extracted both the spatial filters and the robust time traces for the regions of interest (ROIs) using EXTRACT , a robust cell extraction routine. We matched the resulting ROIs across days based on Tanimoto similarity, defined as [12pt]{minimal} 				 				  				  				  				 				 				 				 				$$T=} {}}{| | \,{}\,| {| }^{2}+| | \,{}\,| {| }^{2}-{} {}}$$ T ( x , y ) = x ⋅ y ∣ ∣ x ∣ ∣ 2 + ∣ ∣ y ∣ ∣ 2 − x ⋅ y , where x and y are vectors corresponding to flattened spatial filters. We adjusted the cut-off for the Tanimoto similarity to each mouse for best results evaluated by visual inspection, then reinitialized EXTRACT with the global cell map. This process allows EXTRACT to find cells that may be missed on different days. We performed this routine of cell extraction, across-day registration and reinitialization for five iterations. We next visually inspected all videos and discarded spurious, duplicate and dendritic ROIs. Lastly, using the verified ROIs that correspond to cells, we performed a final robust regression via EXTRACT to obtain the final traces. We took the z -score of the traces, subtracting the mean and dividing by the s.d., to standardize the trace units across days. To obtain a discrete approximation of the firing rates, we first thresholded the raw traces by a constant value, chosen as 0.5× the maximum value of the trace. The thresholded traces were searched for peak points that were at least 3 frames apart from each other, and then binarized at these peaks (Extended Data Fig. ). The firing rates were obtained by convolving the binarized peaks through a Gaussian kernel with an s.d. of 500 ms. As we thresholded the traces at the beginning and binarized the peaks at the end before convolution, the resulting firing rates did not necessarily contain all of the event times, but should be considered a discrete approximation using the binarized versions of large Ca 2+ events. We chose this approximation of firing rates for its robustness against day-to-day variations in the cell baselines and/or absolute Δ F/F values.   For each condition, the mean activity of each neuron during border crossing times was calculated by averaging the z -scored neural activities (firing rates for Extended Data Fig. ) within a time window beginning 2 s before and ending 2 s after the crossing event. We chose the averaged activities inside the time window instead of performing a point estimation of neural activity. This choice was motivated by our desire to mitigate the measurement errors in crossing times from the behavioural videos and to remain agnostic to the fine structure of the neural code in short time durations, as our interest is in understanding whether the neural population reacts differently, corresponding to the level of pain relief expectation during crossing and crossing back, during each phase of PAC. To determine the extent to which the neural responses of individual cells may differ between first border crossing and crossing back, we computed a discriminability index ( d ′) 2 for each neuron using the equation [12pt]{minimal} 				 				  				  				  				 				 				 				 				$${({d}^{{} })}^{2}=_{{}}-{ }_{{}}}{{ }_{{}}}\,$$ ( d ′ ) 2 = μ forward − μ backward σ pooled , where μ forward and μ backward are the mean activity of the neuron calculated during first crossing and crossing back, respectively. σ pooled is the pooled s.d. from both conditions. To perform randomized controls for all analyses, we averaged the values of interest (discriminability index, z -scored traces and/or firing rates) with randomly selected crossing times for each neuron 100 times and created a null distribution over the neural population.   We conducted k -means clustering analysis to categorize Purkinje cells based on their activity during the first border crossing, first crossing back and the last crossing on the post-test day. We extracted the Ca 2+ activity of each Purkinje cell during these events within the 4 s border crossing period for each condition and then concatenated them, resulting in a Ca 2+ activity trace for each Purkinje cell with a total duration of 12 s. Subsequently, we performed silhouette analysis to determine the optimal number of clusters for this dataset, which we found to be two. Accordingly, we then applied k -means clustering to classify all cross-day-aligned Purkinje cells into two clusters.   2+ spike frequency and amplitude analysis To find Ca 2+ events in Purkinje cells, we first applied a threshold to the raw traces using a constant value set at 0.1 times the maximum amplitude of the trace. The thresholded traces were then scanned for peaks that were at least 3 frames apart from each other and binarized at these peaks. For frequency analysis, we counted the number of Ca 2+ events in the binarized traces of each cell during border crossing and calculated their firing frequency during this 4 s border-crossing period (Extended Data Fig. ). For Ca 2+ spike amplitude analysis, we extracted the value from the z -scored Ca 2+ traces of each cell at the timepoint of detected Ca 2+ events as the amplitude. We then selected these amplitudes during the 4 s border-crossing time for comparison (Extended Data Fig. ). For Ca 2+ spike waveform analysis, we used the z -scored trace of each Purkinje cell to identify the start, peak and end points of each spike that had an amplitude larger than 3 z -scored Δ F/F (Extended Data Fig. ).   Tissue collection and processing Mice were transcardially perfused with phosphate-buffered saline (PBS) followed by 4% formaldehyde in PBS. Brains were then dissected, post-fixed in 4% formaldehyde, and cryoprotected in 30% sucrose. Tissues were then frozen in Optimum Cutting Temperature compound (OCT; 4583, Tissue Tek) and sectioned using a cryostat (Leica). The brains were sectioned at 40 μm and stored in PBS at 4 °C if used immediately. For longer storage, tissue sections were placed in glycerol-based cryoprotectant solution and stored at −20 °C. For in situ hybridization, tissues were sectioned at 14 μm, collected on Superfrost Plus slides (22-037-246, Thermo Fisher Scientific) and stored at −80 °C. Immunohistochemistry Tissues were incubated for 1 h and blocked in 0.1 M PBS with 0.3% Triton X-100 (Sigma-Aldrich) plus 5% normal donkey serum. Primary and secondary antibodies were diluted in 0.1 M PBS with 0.3% Triton X-100 plus 1% normal donkey serum. The sections were then incubated overnight at 4 °C in primary antibody solution, washed in 0.1 M PBS with 0.3% Triton X-100 for 40 min, incubated for 2 h in secondary antibody at room temperature and washed in 0.1 M PBS for 40 min. The sections were then mounted using Fluoromount-G (00-4958-02, Thermo Fisher Scientific). Images were acquired on the Zeiss LSM 780 confocal microscope using Zeiss Zen software, running on a Windows PC, in the UNC Neuroscience Microscopy Core. A streptavidin conjugate (Alexa Fluor 594 conjugate, Thermo Fisher Scientific; 1:1,000) was used to visualize biocytin. In situ hybridization For in situ hybridization experiments, we used Advanced Cell Diagnostics RNAscope Technology (ACD Bioscience). In brief, wild-type mice 5–8 weeks old were deeply anaesthetized with 0.1 ml of Euthasol (NDC-051311-050-01, Virbac) and perfused transcardially with 0.1 M PBS followed by 4% formaldehyde solution in PBS. Brains were dissected, cryoprotected in 30% sucrose overnight and then frozen in OCT. Frozen tissue was cut at 20 μm onto Superfrost Plus slides and stored at −80 °C. Tissue was thawed from −80 °C, washed with PBS at room temperature and subsequently processed according to the protocol provided by the manufacturer. We first pretreated the tissue with solutions from the pretreatment kit to permeabilize the tissue, then incubated with protease for 30 min and then with the hybridization probe(s) for another 2 h at 40 °C.   Mice were transcardially perfused with phosphate-buffered saline (PBS) followed by 4% formaldehyde in PBS. Brains were then dissected, post-fixed in 4% formaldehyde, and cryoprotected in 30% sucrose. Tissues were then frozen in Optimum Cutting Temperature compound (OCT; 4583, Tissue Tek) and sectioned using a cryostat (Leica). The brains were sectioned at 40 μm and stored in PBS at 4 °C if used immediately. For longer storage, tissue sections were placed in glycerol-based cryoprotectant solution and stored at −20 °C. For in situ hybridization, tissues were sectioned at 14 μm, collected on Superfrost Plus slides (22-037-246, Thermo Fisher Scientific) and stored at −80 °C.   Tissues were incubated for 1 h and blocked in 0.1 M PBS with 0.3% Triton X-100 (Sigma-Aldrich) plus 5% normal donkey serum. Primary and secondary antibodies were diluted in 0.1 M PBS with 0.3% Triton X-100 plus 1% normal donkey serum. The sections were then incubated overnight at 4 °C in primary antibody solution, washed in 0.1 M PBS with 0.3% Triton X-100 for 40 min, incubated for 2 h in secondary antibody at room temperature and washed in 0.1 M PBS for 40 min. The sections were then mounted using Fluoromount-G (00-4958-02, Thermo Fisher Scientific). Images were acquired on the Zeiss LSM 780 confocal microscope using Zeiss Zen software, running on a Windows PC, in the UNC Neuroscience Microscopy Core. A streptavidin conjugate (Alexa Fluor 594 conjugate, Thermo Fisher Scientific; 1:1,000) was used to visualize biocytin.   For in situ hybridization experiments, we used Advanced Cell Diagnostics RNAscope Technology (ACD Bioscience). In brief, wild-type mice 5–8 weeks old were deeply anaesthetized with 0.1 ml of Euthasol (NDC-051311-050-01, Virbac) and perfused transcardially with 0.1 M PBS followed by 4% formaldehyde solution in PBS. Brains were dissected, cryoprotected in 30% sucrose overnight and then frozen in OCT. Frozen tissue was cut at 20 μm onto Superfrost Plus slides and stored at −80 °C. Tissue was thawed from −80 °C, washed with PBS at room temperature and subsequently processed according to the protocol provided by the manufacturer. We first pretreated the tissue with solutions from the pretreatment kit to permeabilize the tissue, then incubated with protease for 30 min and then with the hybridization probe(s) for another 2 h at 40 °C.   To quantify the output of neurons in the rACC TRAPed after PAC, we analysed the expression of mRuby in putative presynaptic axonal terminals. First, background subtraction was performed on the mRuby channels of each image using the rolling-ball algorithm in ImageJ. Subsequently, the images were thresholded to a value 4 times the mean background intensity, converting them into binary format. The pixel densities of these binary images were then calculated and normalized to the size of the specific regions displaying mRuby expression.   ACC slice preparation We began the PAC paradigm 3–4 weeks after virus injection. Mice were euthanized immediately after the conditioning phase of PAC. After decapitation, the brain was rapidly collected and immersed in ice-cold slicing solution containing 87 mM NaCl, 25 mM NaHCO 3 , 2.5 mM KCl, 1.25 mM NaH 2 PO 4 , 10 mM d -glucose, 75 mM sucrose, 0.5 mM CaCl 2 and 7 mM MgCl 2 (pH 7.4 in 95% O 2 and 5% CO 2 , 325 mOsm). Coronal brain slices 300 μm thick and containing the rACC were cut using a VT1200 vibratome (Leica Microsystems). After around 20 min incubation at 35 °C, the slices were stored at room temperature. Slices were then transferred to the chamber for electrophysiological recording. Slices were used for a maximum of 5 h after dissection. The experiments were performed at 21–24 °C. During the experiment, slices were superfused with a physiological extracellular solution containing 125 mM NaCl, 2.5 mM KCl, 25 mM NaHCO 3 , 1.25 mM NaH 2 PO 4 , 25 mM d -glucose, 2 mM CaCl 2 , and 1 mM MgCl 2 (pH 7.4 in 95% O 2 and 5% CO 2 , ~325 mOsm). Whole-cell patch recording of rACC→Pn neurons was performed as described previously . The pipettes (1B150F-4, WPI) were formed using a P-97 puller (Sutter Instruments). The resistance was 3–5 MΩ. Measuring action potential properties, spontaneous release and LTP induction The intracellular solution used for testing the action potential firing properties, spontaneous release and LTP induction of rACC→Pn neurons contained 135 mM K-gluconate, 20 mM KCl, 0.1 mM EGTA, 2 mM MgCl 2 , 2 mM Na 2 ATP, 10 mM HEPES and 0.3 mM Na 3 GTP (pH adjusted to 7.28 with KOH, ~310 mOsm); in a subset of recordings, 0.2% biocytin was added. To measure membrane properties and evoke action potential firing of rACC→Pn neurons, a 1 s step current (−50, 0, 50, 100, 150, 200, 250, 300 pA) was injected into the cell through the recording pipette. Spontaneous EPSCs were recorded while holding the rACC→Pn neurons at −70 mV. For LTP induction, biphasic electrical stimulations (5–8 V, 100 ms) were delivered by placing a borosilicate theta glass (2.0 mm, Warner Instruments) in layer II/III of the rACC. The glass was pulled using a vertical pipette puller and filled with perfusion solution. The fibre was stimulated using the DS4 Bi-Phasic Current Stimulator (Digitimer) at 0.02 Hz to measure evoked EPSCs of the rACC→Pn neurons for 6 min as the baseline. TBS (5 trains of burst with 4 pulses at 100 Hz, at 200 ms intervals, repeated 4 times at intervals of 10 s) was then administered to induce LTP. After LTP induction, evoked EPSCs were recorded for another 30 min to compare against the baseline. No blocker was used to block inhibitory synaptic inputs. Measuring AMPA/NMDA ratio, PPR and feedforward inhibition The Cs + -based intracellular solution used to measure the AMPA/NMDA ratio and PPR contained 130 mM Cs-methanesulfonate, 2 mM KCl, 10 mM EGTA, 2 mM MgCl 2 , 2 mM Na 2 ATP, 10 mM HEPES and 5 mM QX-314 (pH adjusted to 7.28 with CsOH, ~310 mOsm). To evoke synaptic response of rACC→Pn neurons, electrical stimulation (50–80 μA, 100 μs) was delivered by placing a concentric bipolar electrode (FHC) in layer II/III of the rACC. The selective GABA A receptor antagonist SR-95531 (10 μM; Sigma-Aldrich) was used to block IPSCs. To record EPSCs mediated by both AMPA and NMDA receptors, membrane potentials were held at voltages increasing from −80 mV to +60 mV. To measure the PPR, two electrical stimulations at different time intervals (20, 50, 100, 200, 500 ms) were used to evoke synaptic transmission. The membrane potential was set to −30 mV to record both EPSCs and IPSCs in the same trace (Extended Data Fig. ) or to either −70 mV or +10 mV to examine EPSCs or IPSCs in isolation (Fig. ). Measuring inhibitory input from PV + interneurons Slices from Pvalb cre mice were prepared as described above. An intracellular solution containing high chloride concentration (140 mM KCl, 10 mM EGTA, 2 mM MgCl 2 , 2 mM ATP, 10 mM HEPES and 2 mM QX-314; pH adjusted to 7.28 with KOH; 313 mOsm) was used for postsynaptic recordings of rACC→Pn neurons, which were conducted in the voltage-clamp configuration with a holding potential of −70 mV. For all voltage-clamp recordings, we applied hyperpolarizing test pulses (5 mV, 100 ms) to monitor series and input resistance throughout the entire experiment. Data from experiments in which series resistance changed more than 15% were discarded. Data acquisition and analysis Electrophysiological data were acquired using the Multiclamp 700b amplifier (Axon Instruments), low-pass filtered at 10 kHz, and sampled at 20 or 50 kHz using the Digidata 1440A low-noise digitizer (Axon Instruments). Stimulation and data acquisition were performed using Clampfit 10 software (Axon Instruments). Data were analysed using Stimfit v.0.14.9 ( https://github.com/neurodroid/stimfit ), Clampfit v.11.2 (Molecular Devices) and R v.4.0.3 (The R Project for Statistical Computing). sEPSCs were detected using a template-matching algorithm and verified by visual inspection . The location at which the peak EPSC was recorded while holding the membrane potential at −80 mV was used to measure the amplitude of AMPAR EPSCs. The amplitude of NMDAR EPSCs was measured 50 ms after the electrical stimulation. The synaptic latency of monosynaptic EPSCs or IPSCs was measured from the onset of the electrical stimulus to the onset of the EPSC or IPSC. The disynaptic IPSC delay (Fig. ) was measured from the onset of the EPSC at −70 mV to the onset of the IPSC at +10 mV.   We began the PAC paradigm 3–4 weeks after virus injection. Mice were euthanized immediately after the conditioning phase of PAC. After decapitation, the brain was rapidly collected and immersed in ice-cold slicing solution containing 87 mM NaCl, 25 mM NaHCO 3 , 2.5 mM KCl, 1.25 mM NaH 2 PO 4 , 10 mM d -glucose, 75 mM sucrose, 0.5 mM CaCl 2 and 7 mM MgCl 2 (pH 7.4 in 95% O 2 and 5% CO 2 , 325 mOsm). Coronal brain slices 300 μm thick and containing the rACC were cut using a VT1200 vibratome (Leica Microsystems). After around 20 min incubation at 35 °C, the slices were stored at room temperature. Slices were then transferred to the chamber for electrophysiological recording. Slices were used for a maximum of 5 h after dissection. The experiments were performed at 21–24 °C. During the experiment, slices were superfused with a physiological extracellular solution containing 125 mM NaCl, 2.5 mM KCl, 25 mM NaHCO 3 , 1.25 mM NaH 2 PO 4 , 25 mM d -glucose, 2 mM CaCl 2 , and 1 mM MgCl 2 (pH 7.4 in 95% O 2 and 5% CO 2 , ~325 mOsm). Whole-cell patch recording of rACC→Pn neurons was performed as described previously . The pipettes (1B150F-4, WPI) were formed using a P-97 puller (Sutter Instruments). The resistance was 3–5 MΩ.   The intracellular solution used for testing the action potential firing properties, spontaneous release and LTP induction of rACC→Pn neurons contained 135 mM K-gluconate, 20 mM KCl, 0.1 mM EGTA, 2 mM MgCl 2 , 2 mM Na 2 ATP, 10 mM HEPES and 0.3 mM Na 3 GTP (pH adjusted to 7.28 with KOH, ~310 mOsm); in a subset of recordings, 0.2% biocytin was added. To measure membrane properties and evoke action potential firing of rACC→Pn neurons, a 1 s step current (−50, 0, 50, 100, 150, 200, 250, 300 pA) was injected into the cell through the recording pipette. Spontaneous EPSCs were recorded while holding the rACC→Pn neurons at −70 mV. For LTP induction, biphasic electrical stimulations (5–8 V, 100 ms) were delivered by placing a borosilicate theta glass (2.0 mm, Warner Instruments) in layer II/III of the rACC. The glass was pulled using a vertical pipette puller and filled with perfusion solution. The fibre was stimulated using the DS4 Bi-Phasic Current Stimulator (Digitimer) at 0.02 Hz to measure evoked EPSCs of the rACC→Pn neurons for 6 min as the baseline. TBS (5 trains of burst with 4 pulses at 100 Hz, at 200 ms intervals, repeated 4 times at intervals of 10 s) was then administered to induce LTP. After LTP induction, evoked EPSCs were recorded for another 30 min to compare against the baseline. No blocker was used to block inhibitory synaptic inputs.   The Cs + -based intracellular solution used to measure the AMPA/NMDA ratio and PPR contained 130 mM Cs-methanesulfonate, 2 mM KCl, 10 mM EGTA, 2 mM MgCl 2 , 2 mM Na 2 ATP, 10 mM HEPES and 5 mM QX-314 (pH adjusted to 7.28 with CsOH, ~310 mOsm). To evoke synaptic response of rACC→Pn neurons, electrical stimulation (50–80 μA, 100 μs) was delivered by placing a concentric bipolar electrode (FHC) in layer II/III of the rACC. The selective GABA A receptor antagonist SR-95531 (10 μM; Sigma-Aldrich) was used to block IPSCs. To record EPSCs mediated by both AMPA and NMDA receptors, membrane potentials were held at voltages increasing from −80 mV to +60 mV. To measure the PPR, two electrical stimulations at different time intervals (20, 50, 100, 200, 500 ms) were used to evoke synaptic transmission. The membrane potential was set to −30 mV to record both EPSCs and IPSCs in the same trace (Extended Data Fig. ) or to either −70 mV or +10 mV to examine EPSCs or IPSCs in isolation (Fig. ).   + interneurons Slices from Pvalb cre mice were prepared as described above. An intracellular solution containing high chloride concentration (140 mM KCl, 10 mM EGTA, 2 mM MgCl 2 , 2 mM ATP, 10 mM HEPES and 2 mM QX-314; pH adjusted to 7.28 with KOH; 313 mOsm) was used for postsynaptic recordings of rACC→Pn neurons, which were conducted in the voltage-clamp configuration with a holding potential of −70 mV. For all voltage-clamp recordings, we applied hyperpolarizing test pulses (5 mV, 100 ms) to monitor series and input resistance throughout the entire experiment. Data from experiments in which series resistance changed more than 15% were discarded.   Electrophysiological data were acquired using the Multiclamp 700b amplifier (Axon Instruments), low-pass filtered at 10 kHz, and sampled at 20 or 50 kHz using the Digidata 1440A low-noise digitizer (Axon Instruments). Stimulation and data acquisition were performed using Clampfit 10 software (Axon Instruments). Data were analysed using Stimfit v.0.14.9 ( https://github.com/neurodroid/stimfit ), Clampfit v.11.2 (Molecular Devices) and R v.4.0.3 (The R Project for Statistical Computing). sEPSCs were detected using a template-matching algorithm and verified by visual inspection . The location at which the peak EPSC was recorded while holding the membrane potential at −80 mV was used to measure the amplitude of AMPAR EPSCs. The amplitude of NMDAR EPSCs was measured 50 ms after the electrical stimulation. The synaptic latency of monosynaptic EPSCs or IPSCs was measured from the onset of the electrical stimulus to the onset of the EPSC or IPSC. The disynaptic IPSC delay (Fig. ) was measured from the onset of the EPSC at −70 mV to the onset of the IPSC at +10 mV.   For fibreoptic cannula implantation surgeries, mice were anaesthetized with isoflurane (4% for induction and 2% for maintenance) while the body temperature was maintained using a heating pad. After cranial hair removal, skin sterilization and scalp incision, we bilaterally injected a virus encoding inhibitory or excitatory opsin into the ACC using the coordinates described above for manipulating ACC terminals in the Pn. To manipulate the activity of Oprd1 + cells in the Pn, we bilaterally injected a virus encoding an inhibitory opsin into the Pn at the coordinates AP: −4.0 mm, ML: ±0.4 mm, DV: −5.4/−5.8 mm. To manipulate the activity of Oprd1 + cells in the Pn that receive rACC inputs, we bilaterally injected the AAV1-Flpo virus into the rACC, then another virus into the Pn to express an inhibitory opsin in a Cre- and Flp-dependent manner. After virus injection, we performed small craniotomies in three locations (AP: +5.10, −1.06, −3.56 mm; ML: −0.77, +2.87, −3.13 mm). Next, to stabilize the implantation, three stainless steel screws (MX-000120-01SF, Component Supply Company) were drilled into the dura of the skull. We then performed two additional craniotomies at the coordinates AP: −4.0 mm, ML: ±1.2 mm. The cannula (CFMLC12L05, Thorlabs or RWD) was then attached to a holder (David Kopf Instruments) and lowered at 10° to the coordinates AP: +4.0 mm, ML: ±1.2 mm, DV: −4.9 mm. Blood and debris around the craniotomy were quickly removed and adhesive cement (S380 Metabond Quick Adhesive Cement System, C&B) was used to seal the gap between the cannula and skull. A custom-designed laser-cut headbar (18–24 G stainless steel, LaserAlliance) was placed over the left posterior skull screw, then layers of dental cement were applied (Lang Dental) to affix both the cannula and headbar to the skull. After the cement dried (7–10 min), we transferred the animal to a heated pad until full recovery, then to their home cage. For optogenetic photostimulation of inhibitory (eNpHR3.0) or excitatory (ChR2) opsins, ferrules were connected to a 561 nm (yellow) laser diode (MGL-FN-561, Opto Engine) or 494 nm (blue) laser diode (MBL-III-473, Opto Engine LLC) using a FC/PC adaptor and a fibreoptic rotary joint (Thorlabs). The laser output was controlled using a shutter controller (SR470, Stanford Research System), which delivered yellow light continuously for the inhibitory opsin and 4 ms blue light pulses at 20 Hz for the excitatory opsin. Light output through the optical fibres was adjusted to ~5 mW at the tip of the optical fibre for inhibition and ~10 mW at the tip of the optical fibre for excitation.   For all behavioural assays described below, mice were acclimatized to the researcher and testing environment for at least 30 min before testing. PAC assay to induce and evaluate placebo analgesia The PAC apparatus consists of two adjacent and visually distinct chambers, using two separate thermal plates (BIOSEB) as the floor. PAC is a 7 day behavioural assay consisting of three phases: habituation (days 1–2) and pre-test (day 3), conditioning (days 4–6), and post-test (day 7; Fig. ). During the habituation and pre-test phases, the floors of both chambers are set at 30 °C and the mice are free to explore both compartments for 3 min; their performance on the pre-test day is compared with their performance on the post-test day. During the conditioning phase, the floor of the chamber on which the mouse begins the session (chamber 1) is set at 48 °C. Mice progressively learn that chamber 1 is painful and to associate chamber 2, which remains at 30 °C, with pain relief. On the post-test day, the floors of both chambers are set at 48 °C to evaluate any analgesic effect induced by the expectation of pain relief. The performance of mice was recorded for 3 min using a camera (acA1300, Basler) controlled by MATLAB (R2019b, MathWorks). The recorded videos were analysed using the machine-learning-based algorithm DeepLabCut or Ethovision XT15 (Noldus). We quantified and compared the latency of border crossings, time spent in each chamber and nocifensive behaviours (licking, rearing, jumping) of conditioned and unconditioned mice (Fig. ). Naloxone injection To investigate whether endogenous opioid activity is necessary for PAC-induced placebo analgesia, we injected mice with saline or naloxone (N7758, Sigma-Aldrich) intraperitoneally (5 mg per kg) during the conditioning phase (day 4 to 6; Extended Data Fig. ) or before the post-conditioning test on day 7 (Extended Data Fig. ). After injection, the mice were returned to their home cage for at least 30 min to reduce injection-induced stress. Saline-injected mice were used as controls. TRAP of rACC neurons during PAC Two weeks after virus injection, TRAP2 mice were subjected to an adjusted PAC assay (30 min conditioning phase on days 4–6 instead of 3 min) to label the rACC neurons encoding expectation of pain relief. TRAP2 mice were injected with 4-hydroxytamoxifen (50 mg per kg, subcutaneous) on the last day of the conditioning phase (day 6) immediately before conducting the PAC trial. After injection, the mice were allowed to remain in the PAC apparatus for 30 min, and then returned to their home cages. Then, 2 weeks later, we perfused the mice and dissected the brains to determine synaptophysin–mRuby expression in the rACC and other brain areas. Mice that underwent the same procedure but with both chambers set at 30 °C were used as controls. Pin prick To examine the Ca 2+ activity of rACC→Pn neurons during noxious mechanical stimulation (Extended Data Fig. ), we gently touched the plantar surface of the hindpaw with a 25 G needle 10 times at an interval of around 30 s (Extended Data Fig. ). As a control, a needle with a blunt end was used to measure the Ca 2+ activity of rACC→Pn neurons during innocuous mechanical stimulation. The entire procedure was recorded using a camera (acA1300, Basler) controlled by MATLAB (R2019b, MathWorks) and synchronized with the miniscope. Hindpaw radiant heat (Hargreaves) test To examine the Ca 2+ activity of rACC→Pn neurons during noxious thermal stimulation (Extended Data Fig. ), we used the Hargreaves test. Mice were placed in plastic chambers on a glass surface heated to 25 °C, through which a radiant heat source (Department of Anesthesiology, UC San Diego) could be focused onto the hindpaw. We recorded the performance of mice using a camera (acA1300, Basler) controlled by MATLAB (R2019b, MathWorks) and synchronized with the miniscope. Von Frey withdrawal threshold test Eight von Frey filaments (Stoelting), ranging from 0.007 to 6.0 g were used to assess mechanical withdrawal thresholds. Filaments were applied perpendicular to the ventral–medial hindpaw surface with sufficient force to cause a slight bending of the filament. A positive response was characterized by a rapid withdrawal of the paw away from the stimulus fibre within 4 s. The up–down method was used to determine the mechanical threshold (50% withdrawal threshold) . Von Frey withdraw frequency test To evaluate mechanical sensitivity, we used six von Frey filaments (0.07, 0.16, 0.4, 1.0, 1.4 and 6.0 g). Filaments were applied perpendicular to the ventral–medial hindpaw surface with sufficient force to cause a slight bending of the filament. Each filament was applied for 1 s. A positive response was characterized by a rapid and immediate withdrawal of the paw away from the filament. Each filament was applied five times. The frequency of reflexive withdrawal responses was calculated. Hotplate test Mice were acclimatized to the testing environment as described above. The plate temperature was set at 48 °C or 52 °C to measure thermal pain threshold. The mouse was placed onto the plate and the latency preceding licking and/or biting of a hindpaw was scored. To prevent tissue damage, a cut-off of 3 min or 1 min was set for the 48 °C and 52 °C plates, respectively. Formalin test An intraplantar injection (20 µl) of 2.5% formalin was performed in the left hindpaw of mice after the conditioning phase of PAC. The mouse behaviour was recorded for 30 min within the PAC apparatus or using a four-camera set-up enabling synchronized capture of each lateral angle. The time spent licking the injected hindpaw was scored using Ethovision XT15 (Noldus) or automatically scored using DeepEthogram, an unbiased, pixel-based machine learning algorithm .   The PAC apparatus consists of two adjacent and visually distinct chambers, using two separate thermal plates (BIOSEB) as the floor. PAC is a 7 day behavioural assay consisting of three phases: habituation (days 1–2) and pre-test (day 3), conditioning (days 4–6), and post-test (day 7; Fig. ). During the habituation and pre-test phases, the floors of both chambers are set at 30 °C and the mice are free to explore both compartments for 3 min; their performance on the pre-test day is compared with their performance on the post-test day. During the conditioning phase, the floor of the chamber on which the mouse begins the session (chamber 1) is set at 48 °C. Mice progressively learn that chamber 1 is painful and to associate chamber 2, which remains at 30 °C, with pain relief. On the post-test day, the floors of both chambers are set at 48 °C to evaluate any analgesic effect induced by the expectation of pain relief. The performance of mice was recorded for 3 min using a camera (acA1300, Basler) controlled by MATLAB (R2019b, MathWorks). The recorded videos were analysed using the machine-learning-based algorithm DeepLabCut or Ethovision XT15 (Noldus). We quantified and compared the latency of border crossings, time spent in each chamber and nocifensive behaviours (licking, rearing, jumping) of conditioned and unconditioned mice (Fig. ).   To investigate whether endogenous opioid activity is necessary for PAC-induced placebo analgesia, we injected mice with saline or naloxone (N7758, Sigma-Aldrich) intraperitoneally (5 mg per kg) during the conditioning phase (day 4 to 6; Extended Data Fig. ) or before the post-conditioning test on day 7 (Extended Data Fig. ). After injection, the mice were returned to their home cage for at least 30 min to reduce injection-induced stress. Saline-injected mice were used as controls.   Two weeks after virus injection, TRAP2 mice were subjected to an adjusted PAC assay (30 min conditioning phase on days 4–6 instead of 3 min) to label the rACC neurons encoding expectation of pain relief. TRAP2 mice were injected with 4-hydroxytamoxifen (50 mg per kg, subcutaneous) on the last day of the conditioning phase (day 6) immediately before conducting the PAC trial. After injection, the mice were allowed to remain in the PAC apparatus for 30 min, and then returned to their home cages. Then, 2 weeks later, we perfused the mice and dissected the brains to determine synaptophysin–mRuby expression in the rACC and other brain areas. Mice that underwent the same procedure but with both chambers set at 30 °C were used as controls.   To examine the Ca 2+ activity of rACC→Pn neurons during noxious mechanical stimulation (Extended Data Fig. ), we gently touched the plantar surface of the hindpaw with a 25 G needle 10 times at an interval of around 30 s (Extended Data Fig. ). As a control, a needle with a blunt end was used to measure the Ca 2+ activity of rACC→Pn neurons during innocuous mechanical stimulation. The entire procedure was recorded using a camera (acA1300, Basler) controlled by MATLAB (R2019b, MathWorks) and synchronized with the miniscope.   To examine the Ca 2+ activity of rACC→Pn neurons during noxious thermal stimulation (Extended Data Fig. ), we used the Hargreaves test. Mice were placed in plastic chambers on a glass surface heated to 25 °C, through which a radiant heat source (Department of Anesthesiology, UC San Diego) could be focused onto the hindpaw. We recorded the performance of mice using a camera (acA1300, Basler) controlled by MATLAB (R2019b, MathWorks) and synchronized with the miniscope.   Eight von Frey filaments (Stoelting), ranging from 0.007 to 6.0 g were used to assess mechanical withdrawal thresholds. Filaments were applied perpendicular to the ventral–medial hindpaw surface with sufficient force to cause a slight bending of the filament. A positive response was characterized by a rapid withdrawal of the paw away from the stimulus fibre within 4 s. The up–down method was used to determine the mechanical threshold (50% withdrawal threshold) .   To evaluate mechanical sensitivity, we used six von Frey filaments (0.07, 0.16, 0.4, 1.0, 1.4 and 6.0 g). Filaments were applied perpendicular to the ventral–medial hindpaw surface with sufficient force to cause a slight bending of the filament. Each filament was applied for 1 s. A positive response was characterized by a rapid and immediate withdrawal of the paw away from the filament. Each filament was applied five times. The frequency of reflexive withdrawal responses was calculated.   Mice were acclimatized to the testing environment as described above. The plate temperature was set at 48 °C or 52 °C to measure thermal pain threshold. The mouse was placed onto the plate and the latency preceding licking and/or biting of a hindpaw was scored. To prevent tissue damage, a cut-off of 3 min or 1 min was set for the 48 °C and 52 °C plates, respectively.   An intraplantar injection (20 µl) of 2.5% formalin was performed in the left hindpaw of mice after the conditioning phase of PAC. The mouse behaviour was recorded for 30 min within the PAC apparatus or using a four-camera set-up enabling synchronized capture of each lateral angle. The time spent licking the injected hindpaw was scored using Ethovision XT15 (Noldus) or automatically scored using DeepEthogram, an unbiased, pixel-based machine learning algorithm .   Sample preparation, library generation and sequencing For low-throughput, high-depth scRNA-seq, we used the SMART-seq v4 Ultra Low Input RNA Kit for Sequencing (SSv4; TakaraBio) as described previously . To focus our high-depth analysis on neurons, we used Snap25-IRES2-cre;Ai14 ( Snap25-tdT ) mice, which express the fluorescent reporter tdTomato in neurons. The Pn was microdissected from two 8-week-old Snap25 -tdT mice (one male and one female). The mice were anaesthetized with isoflurane and perfused with artificial cerebrospinal fluid comprising CaCl 2 (0.5 mM), glucose (25 mM), HCl (96 mM), HEPES (20 mM), MgSO 4 (10 mM), NaH 2 PO 4 (1.25 mM), myo-inositol (3 mM), N -acetylcysteine (12 mM), NMDG (96 mM), KCl (2.5 mM), NaHCO 3 (25 mM), sodium l -ascorbate (5 mM), sodium pyruvate (3 mM), taurine (0.01 mM) and thiourea (2 mM), bubbled with carbogen (95% O 2 and 5% CO 2 ). The Pn was microdissected and embedded in 2% agarose, sliced into 250 µm sections with a vibratome, then subjected to enzymatic digestion with pronase (1 mg ml −1 ) for 70 min at room temperature and triturated using fire-polished Pasteur pipettes to generate single-cell suspensions. Live single Pn neurons were isolated into eight-well strips containing SSv4 lysis buffer based on DAPI − tdTomato + using fluorescence-activated cell sorting, then stored at −80 °C. To prepare single-cell transcriptome libraries, polyadenylated RNAs were reverse transcribed into full-length cDNA and subjected to 18 PCR amplification cycles according to the SSv4 protocol. Single-cell libraries were indexed and prepared for Illumina sequencing using the Nextera XT DNA Library Preparation Kit. Multiplexed libraries were sequenced on the HiSeq 2500 sequencers to generate 100 bp paired-end reads at a depth of 2.5 million reads per cell. Single-cell FastQ files were aligned to the mm10 mouse genome (GRCm38) using STAR (v.2.7.3a) . For high-throughput, low-depth single-nucleus RNA-seq (snRNA-seq) we used the 10x Chromium 3′ V3 System (10x Genomics). We microdissected the Pn from two 8-week-old female C57BL/6J mice. Pn tissues were pooled and flash-frozen on dry ice. Single-nucleus isolation was performed as described previously . Tissue was placed into a prechilled Dounce homogenizer (Kimble) containing 500 µl chilled detergent lysis buffer (0.10% Triton X-100, 0.32 M sucrose, 10 mM HEPES (pH 8.0), 5 mM CaCl 2 , 3 mM MgAc, 0.1 mM EDTA, 1 mM dithiothreitol (DTT)). Tissue was homogenized by five strokes with the ‘loose’ pestle followed by ten strokes with the ‘tight’ pestle (Kimble). Then, 1 ml of sucrose buffer (0.32 M sucrose, 10 mM HEPES (pH 8.0), 5 mM CaCl 2 , 3 mM MgAc, 0.1 mM EDTA, 1 mM DTT) was added to the Dounce homogenizer and the combined solution was passed through a 40 μm cell strainer into a fresh tube containing 1 ml of 0.32 M sucrose buffer. An additional 1 ml of 0.32 M sucrose buffer was passed through the filter and the resulting 3.5 ml solution was centrifuged at 3,200 g for 10 min at 4 °C. The pellet was resuspended with 3 ml of 0.32 M sucrose buffer and homogenized for 30 s (Ultra-Turrax disperser, setting 1). Next, 12.5 ml of 1 M sucrose buffer (1 M sucrose, 10 mM HEPES (pH 8.0), 3 mM MgAc, 1 mM DTT) was pipetted beneath the homogenate and the tube was centrifuged at 3,200 g for 20 min at 4 °C. After decanting the supernatant, the pellet was resuspended in 1 ml of resuspension solution (0.4 mg ml −1 BSA, 0.2 U μl −1 RNase inhibitor (Lucigen) in 1× PBS), filtered through a 35 µm cell strainer and diluted to a final concentration of 225 cells per µl. Single-nucleus suspensions were loaded onto two 10x Genomics chips (Chromium v3). snRNA-seq libraries were constructed according to the protocol provided by the manufacturer. Multiplexed snRNA-seq libraries were spiked with a PhiX control library (5%) and sequenced across two NextSeq 550 high-output flow-cell runs. Raw sequencing files were aligned to the mm10 mouse genome (GRCm38) and converted to gene expression matrices using the Cell Ranger pipeline (Cell Ranger v.5.0.1, default parameters). Intronic reads were included to increase assay sensitivity. Normalization, clustering and differential gene expression scRNA-seq data were analysed using Seurat (v.4.0) . For 10x Genomics datasets, nuclei expressing fewer than 200 genes and genes expressed in fewer than 5 nuclei were removed. For SSv4 data, cells expressing fewer than 1,000 genes and genes expressed in fewer than 5 cells were removed. To focus our analysis on neurons, we performed broad preliminary clustering to define principal cell types and remove cells and nuclei that lacked expression of neuronal genes ( Snap25 and Rbfox3 ) or expressed conventional glial cell markers ( Mbp , Pdgfra , Gfap , Csf1r and Pecam1 ). The final datasets comprised 4,720 neuronal nuclei from 10x experiments (8,669 median transcripts per cell; 3,816 median genes per cell) and 212 neuronal cells from SSv4 experiments (481,098 median transcripts per cell; 9,956 median genes per cell). Each scRNA-seq dataset was normalized and transformed to a common scale separately using SCTransform with the following parameters: n cells = half the total number of cells; variable.features = median number of genes expressed per cell. The resulting datasets were integrated by SCT-Pearson residuals usinng Seurat’s FindIntegrationAnchors and IntegrateData functions using the default parameters. We determined which principal components to use in subsequent clustering analyses by manually evaluating which principal components contributed to substantial variation (ElbowPlot function in Seurat). To increase cluster robustness, the optimal nearest neighbour parameter ( k ) was identified by iterating through nearest-neighbour values (FindNeighbors function in Seurat) and calculating the average silhouette score . The k -nearest-neighbour value yielding the highest average silhouette score was used for Louvain clustering. Pairs of clusters that could not be reliably distinguished by a single gene using a binomial test ( q < 0.01; log-effect size > 2.0) were dissolved and cells reassigned to the nearest cluster based on Euclidean distance in principal component (PC) space . An initial round of clustering using this method was performed to detect principal cell types (for example, neurons, microglia, astrocytes). A subsequent round of clustering was performed on neuronal principal cell types based on enrichment of neuron-specific genes ( Snap25 , Rbfox3 ) and neurotransmitter vesicular transporters ( Slc17a6 , Slc17a7 , Slc32a1 ). Cell-type-specific marker genes were identified using a binomial test to determine which genes are expressed in cells within a given cluster compared to all other cells . The expression frequency of a given gene ( g ) expressed in a specific cell population ( N ) was compared to the expression frequency in the remaining population ( M ). Thus, the P value for this test was calculated as follows: [12pt]{minimal} 				 				  				  				  				 				 				 				 				$${p}_{g}={ }_{k={N}_{g}}^{N}C(N,k)  (k)(1- ) (N-k)$$ p g = ∑ k = N g N C ( N , k ) γ ∨ ( k ) ( 1 − γ ) ∨ ( N − k ) , where γ is the proportional frequency of cells expressing the gene of interest ( M g / M ). A complete list of cluster-specific marker genes is provided in Supplementary Table .   For low-throughput, high-depth scRNA-seq, we used the SMART-seq v4 Ultra Low Input RNA Kit for Sequencing (SSv4; TakaraBio) as described previously . To focus our high-depth analysis on neurons, we used Snap25-IRES2-cre;Ai14 ( Snap25-tdT ) mice, which express the fluorescent reporter tdTomato in neurons. The Pn was microdissected from two 8-week-old Snap25 -tdT mice (one male and one female). The mice were anaesthetized with isoflurane and perfused with artificial cerebrospinal fluid comprising CaCl 2 (0.5 mM), glucose (25 mM), HCl (96 mM), HEPES (20 mM), MgSO 4 (10 mM), NaH 2 PO 4 (1.25 mM), myo-inositol (3 mM), N -acetylcysteine (12 mM), NMDG (96 mM), KCl (2.5 mM), NaHCO 3 (25 mM), sodium l -ascorbate (5 mM), sodium pyruvate (3 mM), taurine (0.01 mM) and thiourea (2 mM), bubbled with carbogen (95% O 2 and 5% CO 2 ). The Pn was microdissected and embedded in 2% agarose, sliced into 250 µm sections with a vibratome, then subjected to enzymatic digestion with pronase (1 mg ml −1 ) for 70 min at room temperature and triturated using fire-polished Pasteur pipettes to generate single-cell suspensions. Live single Pn neurons were isolated into eight-well strips containing SSv4 lysis buffer based on DAPI − tdTomato + using fluorescence-activated cell sorting, then stored at −80 °C. To prepare single-cell transcriptome libraries, polyadenylated RNAs were reverse transcribed into full-length cDNA and subjected to 18 PCR amplification cycles according to the SSv4 protocol. Single-cell libraries were indexed and prepared for Illumina sequencing using the Nextera XT DNA Library Preparation Kit. Multiplexed libraries were sequenced on the HiSeq 2500 sequencers to generate 100 bp paired-end reads at a depth of 2.5 million reads per cell. Single-cell FastQ files were aligned to the mm10 mouse genome (GRCm38) using STAR (v.2.7.3a) . For high-throughput, low-depth single-nucleus RNA-seq (snRNA-seq) we used the 10x Chromium 3′ V3 System (10x Genomics). We microdissected the Pn from two 8-week-old female C57BL/6J mice. Pn tissues were pooled and flash-frozen on dry ice. Single-nucleus isolation was performed as described previously . Tissue was placed into a prechilled Dounce homogenizer (Kimble) containing 500 µl chilled detergent lysis buffer (0.10% Triton X-100, 0.32 M sucrose, 10 mM HEPES (pH 8.0), 5 mM CaCl 2 , 3 mM MgAc, 0.1 mM EDTA, 1 mM dithiothreitol (DTT)). Tissue was homogenized by five strokes with the ‘loose’ pestle followed by ten strokes with the ‘tight’ pestle (Kimble). Then, 1 ml of sucrose buffer (0.32 M sucrose, 10 mM HEPES (pH 8.0), 5 mM CaCl 2 , 3 mM MgAc, 0.1 mM EDTA, 1 mM DTT) was added to the Dounce homogenizer and the combined solution was passed through a 40 μm cell strainer into a fresh tube containing 1 ml of 0.32 M sucrose buffer. An additional 1 ml of 0.32 M sucrose buffer was passed through the filter and the resulting 3.5 ml solution was centrifuged at 3,200 g for 10 min at 4 °C. The pellet was resuspended with 3 ml of 0.32 M sucrose buffer and homogenized for 30 s (Ultra-Turrax disperser, setting 1). Next, 12.5 ml of 1 M sucrose buffer (1 M sucrose, 10 mM HEPES (pH 8.0), 3 mM MgAc, 1 mM DTT) was pipetted beneath the homogenate and the tube was centrifuged at 3,200 g for 20 min at 4 °C. After decanting the supernatant, the pellet was resuspended in 1 ml of resuspension solution (0.4 mg ml −1 BSA, 0.2 U μl −1 RNase inhibitor (Lucigen) in 1× PBS), filtered through a 35 µm cell strainer and diluted to a final concentration of 225 cells per µl. Single-nucleus suspensions were loaded onto two 10x Genomics chips (Chromium v3). snRNA-seq libraries were constructed according to the protocol provided by the manufacturer. Multiplexed snRNA-seq libraries were spiked with a PhiX control library (5%) and sequenced across two NextSeq 550 high-output flow-cell runs. Raw sequencing files were aligned to the mm10 mouse genome (GRCm38) and converted to gene expression matrices using the Cell Ranger pipeline (Cell Ranger v.5.0.1, default parameters). Intronic reads were included to increase assay sensitivity.   scRNA-seq data were analysed using Seurat (v.4.0) . For 10x Genomics datasets, nuclei expressing fewer than 200 genes and genes expressed in fewer than 5 nuclei were removed. For SSv4 data, cells expressing fewer than 1,000 genes and genes expressed in fewer than 5 cells were removed. To focus our analysis on neurons, we performed broad preliminary clustering to define principal cell types and remove cells and nuclei that lacked expression of neuronal genes ( Snap25 and Rbfox3 ) or expressed conventional glial cell markers ( Mbp , Pdgfra , Gfap , Csf1r and Pecam1 ). The final datasets comprised 4,720 neuronal nuclei from 10x experiments (8,669 median transcripts per cell; 3,816 median genes per cell) and 212 neuronal cells from SSv4 experiments (481,098 median transcripts per cell; 9,956 median genes per cell). Each scRNA-seq dataset was normalized and transformed to a common scale separately using SCTransform with the following parameters: n cells = half the total number of cells; variable.features = median number of genes expressed per cell. The resulting datasets were integrated by SCT-Pearson residuals usinng Seurat’s FindIntegrationAnchors and IntegrateData functions using the default parameters. We determined which principal components to use in subsequent clustering analyses by manually evaluating which principal components contributed to substantial variation (ElbowPlot function in Seurat). To increase cluster robustness, the optimal nearest neighbour parameter ( k ) was identified by iterating through nearest-neighbour values (FindNeighbors function in Seurat) and calculating the average silhouette score . The k -nearest-neighbour value yielding the highest average silhouette score was used for Louvain clustering. Pairs of clusters that could not be reliably distinguished by a single gene using a binomial test ( q < 0.01; log-effect size > 2.0) were dissolved and cells reassigned to the nearest cluster based on Euclidean distance in principal component (PC) space . An initial round of clustering using this method was performed to detect principal cell types (for example, neurons, microglia, astrocytes). A subsequent round of clustering was performed on neuronal principal cell types based on enrichment of neuron-specific genes ( Snap25 , Rbfox3 ) and neurotransmitter vesicular transporters ( Slc17a6 , Slc17a7 , Slc32a1 ). Cell-type-specific marker genes were identified using a binomial test to determine which genes are expressed in cells within a given cluster compared to all other cells . The expression frequency of a given gene ( g ) expressed in a specific cell population ( N ) was compared to the expression frequency in the remaining population ( M ). Thus, the P value for this test was calculated as follows: [12pt]{minimal} 				 				  				  				  				 				 				 				 				$${p}_{g}={ }_{k={N}_{g}}^{N}C(N,k)  (k)(1- ) (N-k)$$ p g = ∑ k = N g N C ( N , k ) γ ∨ ( k ) ( 1 − γ ) ∨ ( N − k ) , where γ is the proportional frequency of cells expressing the gene of interest ( M g / M ). A complete list of cluster-specific marker genes is provided in Supplementary Table .   Statistical analysis was performed using R v.4.0.3 (The R Project for Statistical Computing). All values are reported as mean ± s.e.m. Statistical significance was tested using two-sided Wilcoxon rank-sum tests, two-sided Wilcoxon matched-pairs signed-rank tests or one- or two-way ANOVA with Tukey post hoc test. P < 0.05 was considered to be significant. P values between 0.05 and 0.1 were noted in the figures. In experiments involving electrical fibre stimulation, stimulation artifacts were blanked for display purposes. In Figs. and , two mice were examined in each group, and similar results were generated. In Extended Data Figs. and , three independent repeats were performed with similar results and representative images were shown. In Extended Data Figs. and , two independent repeats were performed with similar results.   Further information on research design is available in the linked to this article.   Any methods, additional references, Nature Portfolio reporting summaries, source data, extended data, supplementary information, acknowledgements, peer review information; details of author contributions and competing interests; and statements of data and code availability are available at 10.1038/s41586-024-07816-z.   Supplementary Table 1 Marker genes for each Pn neuron cluster (related to Fig. 5). The spreadsheet contains 10 tabs, each corresponding to a cluster of Pn neurons classified in Fig. 5b. In each tab, genes with a log-transformed effect size greater than 0.5 are listed. Reporting Summary Peer Review File   Source Data Fig. 1 Source Data Fig. 2 Source Data Fig. 3 Source Data Fig. 4 Source Data Extended Data Fig. 1 Source Data Extended Data Fig. 6 Source Data Extended Data Fig. 7 Source Data Extended Data Fig. 8   