Experimental model and subject details
Mice were group-housed on a 12 h light:12 h dark cycle with ad libitum access to food (Purina Rodent Chow, 5001) and water unless otherwise noted. Temperature (21.5–22.3 °C) and humidity (50 ± 15%) were controlled. Group-housed adult male and female mice (at least eight weeks old) were used for experiments. Npy1r-cre (Jackson Laboratory 030544, B6.Cg-Npy1rtm1.1(cre/GFP)Rpa/J (ref. 46), Npy-Flp (Jackson Laboratory 030211, B6.Cg-Npytm1.1(flpo)Hze/J)47, Pdyn-IRES-cre (Jackson Laboratory 027958, B6;129S-Pdyntm1.1(cre)Mjkr/LowlJ)48, Penk-IRES2-cre (Jackson Laboratory 025112, B6;129S-Penktm2(cre)Hze/J), Vglut2-IRES-cre (Jackson Laboratory 016963, Slc17a6tm2(cre)Lowl/J)49, Y1-lox/lox (Npy1rlox/lox; ref. 50), Lbx1-cre (Lbx1tm3.1(cre)Cbm)51, Npy-IRES-cre (Jackson Laboratory 027851, B6.Cg-Npytm1(cre)Zman/J)52, Agrp-IRES-cre (Jackson Laboratory 012899, Agrptm1(cre)Lowl/J)53, NPY-hrGFP (Jackson Laboratory 006417, B6.FVB-Tg(Npy-hrGFP)1Lowl/J) and C57BL/6J mice were used for experiments. Genotyping of the Y1-lox/lox mice was performed using primers and conditions provided by Jackson Laboratory. All other strains were genotyped by Transnetyx. Sample sizes were chosen based on standards in the neuroscience field and our prior data. All mice were habituated to handling and experimental conditions prior to experiments. For within-subject behavioural analyses, all mice received all experimental conditions. Conditions were counter balanced unless otherwise noted, and order was randomly assigned. For between-subject analyses, mice were randomly assigned to experimental condition. In experiments where data were analysed post hoc (formalin, hot plate, fibre photometry and miniscope) blinding was performed during data analysis. In experiments where behaviour was analysed by investigators collecting the data (von Frey test and acetone test), blinding was performed prior to data collection. We performed experiments in both male and female subjects and did not observe any significant sex differences. All procedures were approved by the University of Pennsylvania, University of Florida and University of Pittsburgh Institutional Animal Care and Use Committees.
Spatial transcriptomics
Tissue collection and sectioning
Transcardial perfusion with ice-cold saline was performed 1 h after formalin injection (see below). Following perfusion to remove circulating blood, brains were quickly dissected and placed on an aluminium foil boat in liquid nitrogen for rapid freezing. Once frozen, the brains were transferred to a 25 ml conical tube and submerged in liquid nitrogen for an additional 10 min. Fully frozen brains were stored at −80 °C overnight prior to sectioning. Frozen brains were transferred to a pre-cooled (−20 °C) cryostat and allowed to equilibrate to the chamber temperature. Brains were then mounted and coronal sections (10 µm thickness) were collected at −5.20 mm from bregma and mounted onto VWR Superfrost Plus Micro Slides, ensuring placement within the 15 mm × 20 mm scan area required for the CosMx spatial molecular imager. Slides were kept within the cryostat chamber at −20 °C throughout the sectioning process and stored at −80 °C overnight. Tissue was collected from three mice, with two slides containing six sections each (two from each mouse).
Slide preparation and in situ hybridization
All procedures were performed according to manufacturer specifications.
NBF fixation and baking. Slides were removed from −80 °C storage and immediately placed into ice-cold 10% neutral buffered formalin (NBF) for a 2 h fixation. Following fixation, slides were washed three times with 1× phosphate-buffered saline (PBS) to remove residual fixative. Slides were then positioned vertically and baked at 60 °C for 30 min to enhance tissue adhesion.
Tissue dehydration and target retrieval. Slides were incubated in 4% SDS to remove residual lipids and proteins, followed by serial dehydration using increasing concentrations of ethanol. For target retrieval, slides were immersed in a pre-warmed retrieval solution and incubated at 100 °C for 20 min. After retrieval, slides were washed in PBS, dehydrated with 100% ethanol and air-dried at room temperature for 30 min.
Tissue permeabilization. Brucker-supplied incubation frames were applied to the slides, outlining the scan area containing the tissue. The digestion buffer was prepared by diluting proteinase K and protease A in protease A buffer as the diluent. Four-hundred microlitres of the digestion buffer was applied to each slide, ensuring complete coverage of the tissue within the incubation frame. Slides were incubated at room temperature for 30 min to facilitate tissue permeabilization. Following incubation, slides were washed thoroughly with 1× PBS to remove residual enzymes.
Fiducial preparation, application and post-fixation. Brucker-supplied fiducial stock solution underwent a five-step sonication and vortex process to ensure uniform dispersion. The stock solution (0.1%) was diluted to 0.00015% using 2× SCC-T solution through a two-step serial dilution to maintain dilution accuracy. For fiducial application, 250 µl of the diluted fiducial solution was applied per slide, thoroughly mixing by vortex before each application to prevent fiducial clumping. Slides were incubated at room temperature for 5 min, followed by a PBS wash to remove excess fiducials. Immediately after washing, slides were transferred into 10% NBF for 1 min for post-fixation. Fixation was then halted using the NBF stop buffer (Tris-glycine buffer), and slides were subsequently stored in 1× PBS.
NHS-acetate preparation and application. Pre-prepared NHS-acetate powder aliquots were carefully mixed with Bruker-supplied NHS-acetate buffers by pipetting up and down slowly to prevent bubble formation, yielding a 100 mM solution. Two hundred and fifty microlitres of the prepared buffer was applied to each slide within the incubation frame. Slides were incubated at room temperature for 15 min in a light-protected staining tray to prevent photodegradation. Following incubation, slides were thoroughly washed with 2× SSC solution to remove excess buffer.
Overnight in situ hybridization. The 1,000-plex mouse neuroscience RNA probe mix, custom probe mix, and ribosomal RNA (rRNA) segmentation markers were aliquoted into PCR tubes and denatured at 95 °C for 2 min in a preheated thermal cycler. Immediately after denaturation, the aliquots were crash-cooled on ice for at least 1 min to prevent reannealing. The hybridization mix was prepared by combining: 1,000-plex mouse neuroscience RNA probe mix, custom probe mix, rRNA segmentation markers, RNA inhibitor and Bruker-supplied buffer R. One-hundred and fifty microlitres of the hybridization mix was applied to each slide within the incubation frame, and an incubation frame cover was placed over the frame to prevent evaporation. Slides were then transferred to a hybridization tray lined with wipes soaked in 2× SSC, creating a humid chamber to maintain optimal hybridization conditions. The tray was placed in a hybridization oven at 37 °C for 16–18 h overnight to allow for probe–target binding.
Stringent wash. Two batches of stringent wash solution were prepared by mixing 100% formamide and 4× SSC solution in a 1:1 ratio within a 50 ml conical tube. The solution was incubated in a 37 °C water bath for at least 30 min to equilibrate to the desired temperature. After hybridization, slides were removed from the hybridization oven, and incubation frame covers were carefully removed. To eliminate residual unbound probes, each slide was briefly dipped in 2× SSC at room temperature. Slides were transferred into the preheated stringent wash solution and incubated twice for 25 min at 37 °C to maintain optimal stringency conditions. Following the stringent washes, slides were washed twice in 2× SSC to remove any remaining formamide.
Nuclear and cell segmentation staining. The nuclear stain (DAPI) buffer was prepared by diluting nuclear stain stock in the Bruker-supplied blocking buffer at a 1:40 ratio. Two-hundred microlitres of the prepared stain was applied to each slide and incubated for 15 min at room temperature, protected from light to prevent photobleaching. Following nuclear staining, slides were washed with 1× PBS to remove excess stain. The segmentation mix was prepared by diluting GFAP and histone markers in the Bruker-supplied blocking buffer. Staining was performed by applying the segmentation mix to each slide and incubating for 1 h in a humidity chamber, protected from light.
Flow cell assembly. Incubation covers were carefully removed from the slides, and flow cells were placed over the slides to maximize clearance of the scan area. The slide–flow cell system was then positioned into the Bruker-supplied flow cell assembly tool, ensuring precise adhesion of the flow cell to the slide. To prevent sample desiccation, the assembled flow cells were dipped into 2× SSC, allowing the solution to enter through the fluidics ports and maintain hydration.
Instrument set-up and loading and flow cell configuration. A new acquisition was started and the pre-bleaching and cell segmentation profiles specific to mouse neuronal tissue for RNA assays were selected to optimize imaging parameters. Flow cells were then loaded into the instrument, initiating the run. Upon verifying proper reagent flow, segmentation imaging was performed.
CosMx spatial molecular imaging. Following cell segmentation imaging, the CosMx software displayed the segmented image with four fluorescent markers (DAPI, GFAP, rRNA and histone) across four channels. Using the segmentation data for ease of visualization, fields of view (FOVs) were manually selected based on regions of interest for spatial transcriptomics. Each FOV measured 0.51 × 0.51 mm, and approximately 250–300 FOVs were selected per slide, prioritizing areas of the PBN. Once finalized, the instrument initiated reporter cycling, during which the selected FOVs were imaged over a period of approximately 6 days to capture transcriptomic data.
Preprocessing and data integration
Following completion of reporter cycling, data analysis was initiated using the AtoMx Spatial Informatics Platform (SIP).
Cell segmentation validation. The first step involved cell segmentation analysis to verify the accuracy of initial segmentation settings. If segmentation was suboptimal, advanced parameters were adjusted to re-segment cells.
Study creation and quality control. A pipeline of sequential analyses was established using cloud-based processing, beginning with quality control (QC). The QC module flagged: cells with low transcript counts, cells with high negative probe percentages and FOVs with potential artefacts. The QC results indicated no issues with FOVs. One per cent of cells were flagged for low transcript counts.
Normalization and dimensionality reduction. Expression data were normalized from raw counts to account for variability in library size and transcript abundance across cells and FOVs. Seurat’s default LogNormalize method was used, where feature counts per cell were divided by the total transcript counts for that cell, and counts were multiplied by a scale factor and then transformed using natural log (log1p). Principal component analysis (PCA) was performed, with 50 principal components computed. PCA results were used to generate a UMAP for visualization, Leiden clustering for identifying distinct cell clusters, and InSituType cell typing, an unsupervised method that detects cell clusters without a reference matrix. Cell types were later assigned based on marker gene expression and cellular characteristics. Visualization outputs included a heatmap of marker genes, aiding in the identification of cell types.
Neighbourhood analysis and spatial composition. To analyse spatial organization, we applied neighbourhood analysis using the cell typing module. This identified distinct cellular niches based on cell type composition and x–y spatial coordinates. Multiple runs were performed with varying distance parameters to uncover emergent spatial patterns at different scales of neighbourhood reach.
Data export and integration. All processed data—including QC metrics, normalized and raw expression values, PCA results, UMAP embeddings, Leiden clustering and neighbourhood analysis outputs—were exported alongside spatial transcript locations, polygon coordinates for cell segmentation boundaries, and FOV positions. Datasets were saved in multiple formats, including Seurat objects (.rds) for integration with R-based pipelines and spreadsheet files (.csv) for Python-based pipelines for further computational analysis.
Data integration, standardization and AnnData construction. Before integrating the datasets, naming conventions and data structures were examined to ensure consistency. Then, a virtual ‘stitched’ slide was created by adjusting global pixel coordinates and FOV names of slide 2 to ensure ample separation from slide 1. The stitched expression matrix, polygon, metadata, and FOV files were stored as unique variables and used to construct an annotated data (AnnData) object using Scanpy. The raw count matrix (stitched expression matrix.csv file), which contained gene expression values per cell, was converted into a dense 2D NumPy array to ensure compatibility with AnnData. Finally, the integrity of the dataset was verified by checking the dimensions of the AnnData object and previewing the metadata to confirm correct indexing and feature alignment. This structured dataset served as the foundation for all downstream transcriptomic and spatial analyses.
Transcriptomic and spatial analysis of the PBN and neuronal subpopulations
Region-specific spatial analysis and AnnData refinement. To accurately isolate the PBN, spatial plots (for example, Leiden clustering and neighbourhood analysis) were exported from Scanpy and overlaid in Adobe Illustrator. Polygon vector outlines were manually drawn to outline each PBN. Since 12 brain sections were imaged, a total of 24 polygons were generated. The polygon layer was then exported as a .png file and dynamically stitched onto a Scanpy-generated spatial plot, ensuring precise alignment with the dataset. The Shapely Python package was used to extract the pixel coordinates of each vectorized polygon. Each polygon was assigned a unique identifier based on the slide number, brain section, and hemisphere. The pixel coordinates defining each polygon were stored as predefined Shapely polygons within a dictionary. The spatial coordinates of all cells were extracted from adata.obsm[“spatial”], and the function assign_polygon_labels() iterated through each cell to determine if it fell within any of the predefined polygons using Shapely’s.contains() method. A Boolean mask was applied to exclude cells outside of the designated regions, and a new AnnData object was generated, containing only cells within the identified PBN regions. The new adata also contains the PBN unique identifier created for each polygon, stored in the obs attribute.
Quality control and filtering. Quality control steps were performed using Scanpy’s preprocessing module to filter out low-quality cells and lowly expressed genes. Cells with fewer than 100 detected transcripts were removed using scanpy.pp.filter_cells(). Additionally, genes expressed in fewer than 400 cells were removed using scanpy.pp.filter_genes().
Normalization and dimensionality reduction. To preserve raw transcriptomic data, the primary expression matrix (X) was copied into a new layer (adata.layers[“counts”]) before performing normalization. Global scaling was applied using scanpy.pp.normalize_total(), which normalizes transcript counts to 10,000 per cell to correct for variations in sequencing depth. A natural log transformation (scanpy.pp.log1p()) was then applied to the normalized counts to reduce the influence of outliers and approximate a normal distribution for improved statistical analyses. PCA was performed using scanpy.pp.pca() to reduce the dataset’s dimensionality while retaining key variance.
Determination of principal components and graph construction. To assess the optimal number of principal components for downstream analysis, the variance ratio was extracted from the PCA results, and an elbow plot was generated. The plot indicated that retaining at least 43 principal components captured the majority of variance in the dataset. A k-nearest neighbour (kNN) graph was then constructed using scanpy.pp.neighbors(), where each cell was connected to its 10 nearest neighbours (n_neighbors=10), and distances were computed using the first 50 principal components (n_pcs=50). Leiden clustering (scanpy.tl.leiden()) was subsequently applied to the graph to identify transcriptionally distinct cell clusters. A resolution parameter of 1.3 (resolution=1.3) was chosen, where higher values result in more granular clustering.
UMAP visualization and parameter optimization. UMAP was used for dimensionality reduction and visualization of cell clustering. The UMAP projection was initially computed using default parameters and minor adjustments were made to improve cluster separation.
Identification and removal of non-neuronal clusters. UMAP projections were examined with additional overlays of known marker genes to assess cluster identity. Glial marker genes (for example, Aqp4, Slc1a3, Cx3cr1, P2ry12, Tmem119, Mbp, Olig1, Olig2 and Pdgfra) were visualized to identify clusters that are highly enriched in non-neuronal cell populations. As a validation step, neuronal markers (Slc17a6, Slc17a7 and Slc32a1) were plotted to confirm that neuronal clusters did not overlap with glial-dominant populations. Following this assessment, clusters identified as non-neuronal were removed, and a new AnnData object was created containing only neuron-enriched cells. To ensure a clean dataset, all prior analyses, including PCA, UMAP and kNN graph computations, were reset (adata.uns entries such as X_umap, X_pca, neighbors, distances and connectivities were removed). This neuron-only dataset was then reprocessed from raw counts using the same normalization, log transformation and dimensionality reduction pipeline. PCA was recomputed, and the elbow plot was reassessed to determine the optimal number of retained principal components. The kNN graph, Leiden clustering and UMAP projection were recalculated to refine neuronal cluster assignments. Adjustments to clustering and visualization parameters were made iteratively to ensure biologically meaningful representation of neuronal subpopulations.
Visualization of gene expression. To visualize gene expression across clusters, UMAP plots were generated for genes of interest. Spatial expression patterns were examined using scanpy.pl.spatial(). Dot plots were generated using scanpy.pl.dotplot() to display gene expression levels and the proportion of expressing cells within each Leiden cluster.
To investigate the relationship between IEG expression and genes of interest, raw transcript counts were extracted from the primary data matrix (adata.X). A predefined threshold was applied to classify cells as either ‘expressing’ or ‘non-expressing’ Npy1r. Fos expression values were similarly extracted and stored. A separate DataFrame was created for ease of manipulation, where the median Fos expression of non-expressing cells was calculated to establish a baseline. This baseline was used to compute relative Fos expression (IEG_rel), enabling comparative analysis. A box plot was generated using Seaborn to visualize differences in Fos expression between Npy1r expressing and non-expressing cells within each Leiden cluster.
To identify marker genes for the Leiden clusters, sc.tl.rank_genes_groups() was used to perform differential expression analysis across clusters. The results were visualized using sc.pl.rank_genes_groups(), which ranks genes based on their log fold change (logFC) from highest to lowest. The top marker genes for each cluster were selected and presented in a dot plot to highlight representative gene expression patterns across clusters.
rAAV constructs
The following recombinant adeno-associated virus (rAAV) vectors were used: AAV5.hSyn.DIO.hM3D(Gq).mCherry (Addgene 44361 from B. Roth54, titre: 2.1 × 1013 genome copies (GC) per ml), AAV8.hSyn.DIO.hM4D(Gi) (Addgene 44362 from B. Roth54, titre: 2.2 × 1013 GC ml−1), AAV2.FLEX.DTR.GFP (Addgene 124364 from E. Azim and T. Jessell55, titre: 2.0 × 1013 GC ml−1), AAV8.hSyn.fDIO.hm3D(Gq).mCherry.WPREpA (Addgene 154868 from U. Gether), AAV8.hSyn.DIO.mCherry (Addgene 50459 from B. Roth, titre: 3.6 × 1013 GC ml−1), AAV1.Syn.Flex.GCaMP6s.WPRE.SV40 (Addgene 100845 from D. Kim and the GENIE project56, titre: 4.2 × 1013 GC ml−1), AAV1.hSynapsin1.axon.GCaMP6s (Addgene 111262 from L. Tian57, titre: 4.1 × 1013 GC ml−1), AAV1.syn.FLEX.splitTVA.EGFP.tTA (Addgene 100798 from I. Wickersham58, titre: 1.2 × 1012 GC ml−1), AAV1.TREtight.mTagBFP2.B19G (Addgene 100799 from I. Wickersham58, titre: 1 × 1013 GC ml−1), pSADdeltaG.mCherry (Addgene 32636 from E. Callaway59, titre: 3.8 × 1012 GC ml−1), AAV1.CBA.DO(FAS).GCaMP6s (Addgene plasmid 110135 from B. Sabatini60, packaged by Vigene Biosciences, titre: 4.1 × 1013 GC ml−1), AAV1.hSyn.Cre.WPRE.hGH (Addgene 105553 from J. M. Wilson, 2.5 × 1013 GC ml−1), AAV1.CAG.FLEX.EGFP (Addgene 59331 from I. Wickersham), AAV1.hSyn.GRAB_NPY1.0 (Addgene 208676 from Y. Li61 packaged by Neurotools), AAV1.CAG.GFP.U6.m.Npy1r.shRNA (Vector Biolabs), AAV1-EF1a-double floxed-hChR2(H134R)-EYFP-WPRE-HGHpA (Addgene 20298 from K. Deisseroth, titre: 2.1 ×1013 GC ml–1) and AAV1.FLEX.tdTomato (Addgene 28306 from E. Boyden, titre: 3.1 × 1013 GC ml−1). In the above vectors: hSyn refers to the human SYN1 promoter; FLEX, Cre-dependent flip-excision switch; WPRE, woodchuck hepatitis virus response element; GCaMP, genetically encoded calcium indicator resulting from a fusion of GFP, M13 and calmodulin; DIO, double-floxed inverted orientation; fDIO, Flp-dependent double-floxed inverted orientation; hM4, human M4 muscarinic receptor; DTR, diphtheria toxin receptor; Ef1a, eukaryotic translation elongation factor 1α; SV40, simian virus 40; TVA, tumour virus receptor A; EGFP, enhanced green fluorescent protein; HGHpA, human growth hormone polyA.
Surgery
Intracerebral viral injections and fibre-optic and cannula placement
Viral injections and implants were performed as previously described62. In brief, mice were anaesthetized with isoflurane (3% induction, 1.5–3% maintenance), given ketoprofen (5 mg kg−1, subcutaneous injection) and bupivacaine (2 mg kg−1, subcutaneous injection) and placed into a stereotaxic frame (Stoelting, 51730). For viral injections, a craniotomy was performed above the injection site and virus injected at the following coordinates: lPBN: lambda −1.2 mm, midline ±1.4 mm, skull surface −3.3 mm; subparafascicular nucleus: bregma −2.3 mm, midline ±0.25 mm, skull surface −3.8 mm; vlPAG: bregma −4.5 mm, midline ± 0.2 mm, skull surface −2.7 and −2.55; arcuate: bregma −1.35 mm, midline ± 0.25 mm, skull surface −6.3 mm. Cre-dependent hM3D(Gq), hM4D(Gi), DTR, and mCherry were injected bilaterally (100–150 nl per side). Cre-dependent GCaMP6s, Cre-off GCamp6s, rabies helper viruses and rabies virus were injected unilaterally (150–200 nl). Rabies helper viruses were diluted, mixed, and injected in a single solution with a final dilution of 1:200 (TVA), 1:15 (G), and (for non-specific tracing only) 1:3 (Cre). Equal volumes of Cre-off GCaMP6s and Cre-dependent tdTomato were mixed and injected in a single solution. For fibre photometry experiments, an optic fibre (400 μm core, NA 0.66, Doric) was lowered 0.2 mm above the injection site and secured with metabond (Parkell) and dental cement. For pharmacological experiments, mice were implanted with 26-gauge guide cannulae (Plastics One) above the lPBN secured with metabond and dental cement. For miniscope imaging, Cre-dependent GCaMP6s (diluted, titre: 8 × 1012) was injected unilaterally as described above. Then, a gradient index (GRIN) lens (0.6 mm diameter, 7.3 mm length, NA 0.5, Inscopix) was lowered 0.2 mm above the injection site and secured with metabond. A custom machined headbar was secured to the skull with super glue (Loctite Gel Control) and metabond, and then the whole implant was secured with black dental cement (Ortho-Jet). Kwik-Sil (WPI) was used to protect the lens before baseplate implantation. Two weeks later, the mouse was again anaesthetized and placed in the stereotaxic frame. A miniature microscope with a baseplate (UCLA Miniscope Project and OpenEphys) attached was lowered until the GRIN lens was in focus, and then slowly raised until cells were visible. The baseplate was secured using dental cement and the miniscope was detached. Mice were given at least two weeks for recovery and transgene expression. Expression and fibre placements were verified post-mortem.
Spinal cord injections
Spinal cord viral injections were performed as previously described13. Mice were anaesthetized with isoflurane (3% induction, 1.5–3% maintenance) and given ketoprofen (5 mg kg−1, subcutaneous injection) and bupivacaine (2 mg kg−1, subcutaneous injection). An approximately 3 cm incision was made through the skin to expose vertebrae T12, L1, and L2. The muscle was gently removed and a laminectomy was performed to expose the spinal cord. The mouse was then placed in a stereotaxic frame to hold the spinal column in place. Cre-dependent axon GCaMP6s was injected unilaterally 0.5 mm lateral from the anterior spinal artery and 0.3 mm ventral from the dura mater. Two 500-nl injections were performed at the rostral and caudal ends of the exposed spinal cord. The skin was then sutured, and mice were given at least 3 weeks for recovery and viral expression.
Pain models
Spared nerve injury
Mice were anaesthetized with 5% isoflurane and anaesthesia was maintained at 2% isoflurane throughout surgery. The left hindlimb was shaved with electric trimmers and sterilized with 70% ethanol and povidone-iodine (Medline). An incision (2–3 cm) was made in the skin of the upper left hindleg and the muscle was spread to expose the branches of the sciatic nerve. The peroneal and tibial branches were ligated with silk suture (6-0) and transected. The skin was closed with 9-mm wound clips and topical triple antibiotic ointment (Neosporin) was applied to the wound. Wound clips were removed approximately 10 days post-surgery. Behavioural experiments began 14 days following surgery. Sham surgery involved the same surgical procedures, including exposure of the nerve but no ligation–transection32.
Persistent inflammation
CFA (Sigma) was diluted 1:1 in saline and subcutaneously injected (30 μl) into the plantar surface of the paw of lightly anaesthetized mice (isoflurane). CFA experiments were performed between 1 and 4 days after CFA injection.
Hunger and thirst models
Food and water deprivation
For 24 h food deprivation, mice were placed in a clean cage with alpha dry bedding and ad libitum access to water, but no food, 24 h prior to experimentation. Ad libitum-fed control mice were also placed in a clean cage with alpha dry bedding but were given free access to chow. For 24 h water deprivation, the water bottle was removed from the home cage 24 h prior to experimentation. Body weight was measured before removing food or water and before experiments began.
Hypovolemic thirst
Mice were injected with PEG (30% subcutaneous injection) or saline and placed back in the home cage with the water bottle removed. They were placed in the behavioural chamber to habituate 45 min later. Formalin, von Frey and cold sensitivity tests began 60 min after PEG injection. To confirm that this dose induced thirst, a separate group of mice were injected and placed immediately into a new cage with an inverted 15 ml conical tube with a lick spout filled with water. Volume of water consumed was measured after 1 and 2 h and compared with saline injected controls.
Behavioural assays
DREADD-evoked food intake
Mice were habituated for at least 1 h to a cage with a lined floor (Kimberly-Clark, 75460) and ad libitum access to food and water. Following habituation, food was removed from the cage and mice were injected with clozapine-N-oxide (CNO, 1 mg kg−1 intraperitoneal) or saline and placed back in the cage with a weighed pellet of chow. Food was weighed after 1 h, accounting for crumbs.
Formalin test
Mice were habituated to handling and restraint before experiments began. Mice were placed in a clear enclosure for a 15 min habituation period. Then, 20 μl of 2% formalin (Sigma) were injected subcutaneously into the dorsal surface of the hindpaw. Tests were video-recorded and time spent licking during the 1 h assay was measured by scorers blinded to experimental condition. The time spent licking was grouped into 5 min bins, and the total time spent licking during the acute (0–5 min) and inflammatory (15–60 min) phase was calculated. In experiments where unilateral lPBN recordings or infusions took place, the contralateral paw was injected unless otherwise noted.
Effects of predator odour on formalin test. Mice were placed in the arena with a piece of absorbent paper taped to the side for a 15 min habituation period. Thirty microlitres of TMT (diluted 1:10 in PBS) or PBS was then pipetted onto the absorbent paper. 15 min later, formalin was injected into the paw as described above.
Effects of conditioned fear on formalin test. Mice were placed in a fear conditioning chamber (HABITEST modular behavioural test system, Coulbourn Instruments). After a 10 min habituation period, 1 shock (1 mA, 2 sec) was administered every 2 min over the course of 10 min (5 shocks total)63. 24 h later, mice were injected with formalin as described above. Mice were placed into the environment either immediately (to measure acute phase responding) or 20 min later (to measure inflammatory phase responding). Because conditioned fear extinguishes within 10 min, pain responding was only monitored in the fear-conditioned environment for 10 min. Mice were either placed in the shocked context (square chamber, grey walls and ceiling, shock rod flooring, cleaned with 70% ethanol) or an unshocked context (rounded chamber, black and white checkered walls and ceiling, cleaned with 5% acetic acid). Behaviour was video-recorded for 10 min following chamber entry. Freezing was scored automatically using ANY-Maze software (Stoelting, v7.08) and manually validated. Paw licking was scored manually.
Effects of lPBN Y1R neuron inhibition and AgRP neuron stimulation on formalin test. CNO (1 mg kg−1) was injected intraperitoneally before the 15 min habituation period. The formalin test was then performed as described above.
von Frey test
Mice were habituated to small plexiglass chambers atop mesh flooring for 2 h per day for 3 days before experimentation and for 15 min before each test. The ascending method64: ten von Frey filaments (ranging from 0.04 g to 10 g) were used. Starting with the smallest von Frey filament and continuing in ascending order, each filament was applied to the plantar surface of the hindpaw until the filament bent. Each filament was tested 5 times with 1 min between each trial. A positive response was defined by one or more of the following: paw withdrawal, guarding, licking, shaking, or jumping. The number of positive responses was recorded for each filament, and the percentage of responses for each filament was calculated (# of withdrawal trials/total trials). Threshold was determined as the first filament at which the mouse had a positive response to 3 or more trials. The ascending method was used for CFA experiments. The up/down method65: logarithmically increasing calibrated von Frey filaments (Stoelting) ranging from 0.008 g to 6.0 g with a mean log interval of 0.41g were used for testing. Beginning with the 0.4 g filament, filaments were applied perpendicular to the surface of the lateral hindpaw with sufficient force to cause bending of the filament (~30°). A positive response was defined by one or more of the following: paw withdrawal, guarding, licking, shaking, or jumping. A positive response was followed by application of a lower gram force filament, while a negative response was followed by application of a higher gram force filament to calculate the 50% withdrawal threshold for each mouse. The up/down method was used for SNI experiments.
Acetone-induced cold sensitivity test
Acetone drop withdrawal testing was performed in the same Plexiglas chambers following von Frey testing. A syringe attached to PE-90 tubing with a tip flared to a 3.5 mm diameter was used to apply a 10 μl droplet of acetone to the lateral surface of the hindpaw. The length of time the animal spent lifting, shaking, and attending to the paw directly following droplet application was recorded, with a 30 s cutoff. Three trials were averaged for the final result32.
Effects of lPBN Y1R neuron activation on von Frey and cold sensitivity tests. Compound 21 (1 mg kg−1) was injected intraperitoneally 30 min before behavioural experiments.
Hot plate test
A cast iron plate with plexiglass walls was placed on a hot plate and heated to 52 °C. Mice were placed on the hot plate for 1 min (behaviour) or 20 s (fibre photometry). All sessions were video-recorded and the latencies to lick the forepaws, lick the hindpaws, and jump were scored along with the number of jumps during the test. Scoring was performed by experimenters blinded to experimental condition.
Effects of predator odour on hot plate test. Thirty microlitres of TMT was pipetted onto absorbent paper taped to the plexiglass wall. The mouse was then placed on the hot plate and responses were recorded as described above. The following data points were excluded: one mouse from each group did not lick their forepaws during the assay and two PBS mice and one TMT mouse jumped onto the paper for several seconds and therefore their jump score was excluded.
Effects of food deprivation on hot plate test. Naive mice were placed on the hot plate as described above for a habituation trial. Food was removed from half the cages as described above and the assay was run again the next day. Food was then returned to all mice.
Effects of hypothalamic AGRP or NPY neuron stimulation and Y1R neuron inhibition on hot plate test. Mice expressing DREADDs in the arcuate or PBN were placed on the hot plate as described above for a habituation trial. At least 2 days later, half the mice were injected with saline and half with CNO (1 mg kg−1, intraperitoneal) followed by the hot plate test 30 min later. For NPY neuron stimulation, the experiment was then counter balanced three days later.
Inflammation-induced sensitization
An alligator clip (UQ003, Uniquers) was applied to the ventral surface of the paw as previously described to establish the baseline neural response to mechanical pain38. At least two days later, CFA was injected into the plantar surface of the paw as described above. The neural response to clipping the paw was recorded 48 h later in ad libitum-fed mice. Food was then removed from the cage. The neural response to clipping the paw was measured again, 24 h later, in food-deprived mice. Paw size was measured daily using a plethysmometer (Stoelting, 57140) to ensure that any effects were not due to changes in inflammation levels.
Conditioned place avoidance
Two-sided apparatuses were used with distinct visual (black versus white walls) and textural (flooring: plastic versus soft textural side of Kimtech bench-top protector) cues. A neutral middle zone to shuttle between sides was maintained and the chamber was equipped with an overhead camera to track mouse position. Mice were habituated to the apparatus and a pre-conditioning preference was determined over four 30 min sessions via ANY-maze software (Stoelting). Conditioning was performed daily for four days. During conditioning, mice expressing hM3D(Gq) or control virus in lPBN Y1R neurons were injected with saline (intraperitoneally) and placed into their non-preferred side for 30 min in the morning and injected with CNO (1 mg kg−1, intraperitoneal) and placed into their preferred side for 30 min in the afternoon. To test post-conditioning preference, mice were again placed in the chamber with free access to both sides for two 30 min sessions, and their activity was tracked. The percentage of time spent in the CNO-paired side of the chamber before and after conditioning was calculated and averaged to determine the shift in preference caused by activation of lPBN Y1R neurons.
Innate fear assay
Mice were placed in a chamber with absorbent paper taped to the floor on one side and their activity was tracked by an overhead camera. After a 15 min baseline period, 30 μl of TMT was pipetted onto the paper and mice were left in the chamber for another 15 min. Using ANY-maze, we quantified the number of entries into and time spent in the ‘odour zone’, which was defined as the area around the absorbent paper with a circumference of the mouse’s body length (excluding the tail).
Conditioned taste aversion
Mice were habituated to cages with lined flooring for at least 1 h and food was removed from the home cage for 24 h as described above. On day 1, mice were given 0.5 g of strawberry or orange Jell-O. Five minutes after their first bite, mice were injected with either saline (control) or LiCl (to induce aversion, 125 mg kg−1, intraperitoneal) and allowed to finish the Jell-O. Mice were then returned to their home cages with ad libitum access to chow and water. The next day, food was again removed from the cage. On the third day, mice were presented with 1.5 g of the same flavour of Jell-O they had on day 1, and the weight of the remaining Jell-O was recorded at 30 min and 60 min.
Open field assay
Mice were habituated to the open field area (400 mm2) for 15 min. Mice were then tracked by ANY-maze software (60 min for ablation experiments, 30 min for all other experiments). The centre was defined as the middle third of the arena.
Drugs and pharmacology
Formalin (2%, Sigma), PEG (30%, average relative molecular mass 1,500, Acros Organics), CFA (50%, Sigma), LiCl (12.5 mg ml−1, Sigma), CNO (0.1 mg ml−1, Tocris), ghrelin (60 μg ml−1) and diphtheria toxin (0.5 mg ml−1, List Labs) were diluted in normal saline. Formalin and CFA were injected subcutaneously in the hindpaw at a volume of 20 μl (formalin) or 30 μl (CFA). PEG was injected subcutaneously at a volume of 20 μl per g body weight. Ghrelin, LiCl and CNO were injected intraperitoneally at a volume of 10 μl per g body weight. Diphtheria toxin was injected intramuscularly at a volume of 5 μl per g body weight. Mice received 3 diphtheria toxin injections under light isoflurane anaesthesia with 48 h between injections.
Effects of lPBN NPY Y1 receptor antagonist on the analgesic effects of competing threats
For all experiments, mice were habituated to handling and infusion procedures. BIBO 3304 (Tocris) was dissolved in DMSO and frozen in aliquots. Aliquots were thawed and diluted 1:1 in artificial cerebrospinal fluid (aCSF) before each experiment. Three micrograms of BIBO 3304 or vehicle (1:1 solution of DMSO and aCSF) was microinjected (100 nl) with a Hamilton syringe attached to an internal cannula (Plastics One) and microlitre syringe pump (PHD Ultra, Harvard Apparatus) into the lPBN of mice immediately before the formalin test, von Frey test, or acetone test (see above).
Effects of lPBN NPY on persistent inflammatory and neuropathic pain
Neuropeptide Y (NPY, Tocris) was dissolved in saline and frozen in aliquots. Aliquots were thawed and diluted 1:1 in aCSF before each experiment. NPY (0.1 μg in 100 nl) or vehicle (aCSF, 100 nl) was microinjected with a Hamilton syringe attached to an internal cannula as described above. Mice were then placed on the caged floor and allowed to habituate for 15 min before the von Frey or acetone tests began.
Calcium imaging
Fibre photometry
Dual-wavelength fibre photometry was performed as described66,67. Two excitation wavelengths (470 nm and 405 nm) were delivered through fibre-coupled LEDs (Thorlabs, M470F3 and M405F1) modulated at 211 and 566 Hz by a real-time amplifier (Tucker-Davis Technologies, RZ5P or RZ10x). Excitation lights were filtered and combined by a fluorescence minicube (Doric). The light was delivered through a 400 µm core, 0.57 NA low autofluorescence optical fibre (Doric, MFP_400/430/1100-0.57_1m_FC-MF2.5_LAF) to the implanted fibre (Doric, MFC_400/430-0.66_4.0mm_MF2.5_FLT). The fibres were secured by a clamp (Thorlabs, ADAF2). LED power was set between 20 and 40 µW emitted from the fibre tip to minimize bleaching. GCaMP fluorescence was collected from the same optical fibre and focused onto a femtowatt receiver (Newport, Model 2151, gain set to DC LOW). Fluorescence was sampled at 1,017 Hz and demodulated by the processor. LEDs were externally controlled by Synapse (Tucker-Davis Technology) and synchronized cameras (Ailipu Technology) were used to video record mice during experiments. Mice were habituated to tethering before experiments began. A 5 min baseline before any stimulus was given was recorded and used to normalize subsequent changes in fluorescence.
Fibre photometry after SNI. Three weeks following fibre-optic implant surgeries, animals were habituated to Plexiglas chambers, elevated wire mesh, and patch cable attachment for 1 h each 2 days prior to experiments. On the day of experimentation, animals were habituated in Plexiglas chambers on elevated wire mesh for 1 h before having patch cables attached to the implanted fibre-optics and habituating for an additional 30 min with the experimenter in the room. Baseline recordings were performed to innocuous and noxious stimuli according to the following paradigm: 0.07 g von Frey filament, 1.0 g von Frey filament, acetone, and blunted pin prick. Calcium transients were collected continuously (FP3002, Neurophotometrics) during the stimulation protocol. Each stimulus was applied to the lateral surface of the left hindpaw three times 2 min apart, and all three responses were averaged to represent the animal’s response to that stimulus. Following baseline recordings, animals underwent SNI surgery in the left hindlimb to induce neuropathic pain. The fibre photometry protocol was repeated 21 days after SNI surgery.
Fibre photometry analysis
Data were exported to MATLAB (MathWorks) from Synapse using scripts provided by Tucker-Davis Technology. Custom MATLAB scripts were used to independently normalize the demodulated 470 nm and 405 nm signals. ΔF/F was calculated (F − Fbaseline)/Fbaseline, with Fbaseline being the median of the 300 s before the stimulus. z-Scores were used in cases where multiple days separated within subject recordings in order to correct for changes in signal strength over time. Data were down-sampled to 1 Hz. Subsequent plotting and analyses were performed in MATLAB and Prism 10 (GraphPad). Mean ΔF/F was calculated by integrating ΔF/F over a period of time after the stimulus and then dividing by the integration time. Maximum ΔF/F during hot plate recordings were calculated by finding the maximum ΔF/F value of each mouse during the hot plate window. Recordings comparing paw licking during formalin and sucrose application to the paw were smooth with a 5 s sliding window for visualization only.
SNI fibre photometry analysis. Custom MATLAB scripts were used to normalize the GCamp6s (470 nm) signal to the isosbestic signal (405 nm), controlling for motion artefacts as well as photobleaching. The change in fluorescence (ΔF/F) was calculated by subtracting the GCamp6s signal during stimulation from the average GCamp6s signal over the 10 s directly prior to stimulation. Mean and maximum ΔF/F were calculated as described above.
Fitting fibre photometry signal from behaviour. To fit the photometry signal to licking behaviour, we denote the ΔF/F photometry signal as \(\varphi (t)\). First, we subtract the value such that 1% of the signal \(\varphi (t)\) is negative and fit the behaviour of each individual mouse to its photometry recording by minimizing the sum of squares:
$$\mathop{\text{min}}\limits_{A,\tau }\mathop{\sum }\limits_{t=0}^{T}{\left({\varphi }(t)-A{{\rm{e}}}^{-\frac{t}{\tau }}\ast L(t)\right)}^{2}.$$
L is the licking behaviour, a binary sequence, and it is convolved with an exponential kernel. We find the parameters by looping over time constant \(\tau \), and utilize least squares to find A. To constrain \(\tau \), we choose the time constant that gives the highest average Pearson correlation on all other mice in the same experimental condition. We report the ensuing Pearson correlation coefficients, indicating the extent to which the behaviour co-varies with the bulk calcium signal. We model the slow component, denoted by \(s(t)\), in the photometry signal by two Gaussian curves:
$$s(t)={a}_{1}{{\rm{e}}}^{-{({a}_{2}-t)}^{2}/2{a}_{3}^{2}}+{a}_{4}{{\rm{e}}}^{-{({a}_{5}-t)}^{2}/2{a}_{6}^{2}}.$$
We fit the six parameters to the lower envelope of the calcium signal using MATLAB functions envelope and fmincon. Specifically, we subtract the lower envelope using argument peak and a smoothing of 30 s. We do this to model the slow baseline signal on top of which the fast behavioural fluctuations ride. We then fit the behavioural sequence \(L(t)\) to the difference between the photometry signal and the slow component, using the earlier described method:
$$\mathop{\text{min}}\limits_{A,\tau }\mathop{\sum }\limits_{t=0}^{T}{\left({\varphi }(t)-s(t)-A{{\rm{e}}}^{-\frac{t}{\tau }}\ast L(t)\right)}^{2}.$$
Microendoscopy
A miniature microscope (Miniscope Project, UCLA) was used to image individual lPBN Y1R neurons. Mice were habituated to handling and the attachment of the camera by the experimenter for at least one week prior to experiments. Open-source software (Miniscope Project, UCLA) was used to acquire video from the miniscope and a behavioural camera. Optimal LED power, gain, and focal plane were determined for each mouse that provided the clearest view and dynamic range of the most cells. Recoded timestamps were used to synchronized frames across data streams. For the formalin test, a 5 min baseline recording was obtained. Formalin was then injected as described above, and recording commenced for 1 h. To avoid bleaching, the LED was shut off for 1 min every 5 min.
Microendoscopy analysis
Calcium imaging data were analysed using custom code based on the open-source analysis pipeline Minian68. In brief, videos were preprocessed to remove glow artefacts and background signal and correct for motion using both rigid and non-rigid motion correction. Then, units were detected and traces extracted using the CNMF algorithm. Two spatial and two temporal updates were used to identify cells based on spatial footprints and temporal dynamics. Each identified unit was either confirmed or rejected by the experimenter. The calcium traces and behavioural videos were loaded into the open-source MATLAB GUI Bento for behavioural annotation69. We annotated for paw-licking, face-grooming, rearing and walking during the first 5 min before the formalin injection, and during the 60 min after injection. The Pearson correlation between the behaviours and each individual neuron was computed, after z-scoring the neurons using the mean and s.d. of their baseline activity. A neuron was classified as a ‘lick on’ neuron when the correlation was significantly larger than expected—that is, when the correlation was larger than 97.5% of all correlations obtained by reshuffling the paw-licking bouts 3,000 times. We classified neurons as correlated with ‘other behaviour’ in the same manner, using the annotations for rearing, grooming and walking. To identify neurons modulated by the pain state, we take the activity of neurons during which no annotated behaviour occurs and compare it to their baseline activity. A neuron is then classified as a ‘pain on’ neuron when it is: (1) unclassified by a behaviour; and (2) the s.d. of activity after formalin injection was significantly larger than the s.d. of activity before—that is, the difference was larger than 97.5% of all differences obtained by reshuffling the time series of the neuron 3,000 times. Conversely, a neuron is a ‘pain off’ neuron when it is: (1) unclassified by a behaviour; and (2) the median activity is significantly lower after the injection.
Model of pain behaviour
To model the control of pain-evoked licking behaviour under competing needs, we assume that animals aim to reduce experienced pain while also minimizing effort expended70. Animals show multiple behaviours in response to acute and chronic pain, including active coping methods like wound licking (an instinctive behaviour that cleans and disinfects wounds71) and more passive strategies such as paw guarding to reduce allodynia; for the purpose of comparison to experimental data, this model focuses only on wound licking behaviour. Excess wound licking leads to risk of lesion formation and infection72, and the act of wound licking costs energy and saliva and comes with an ‘opportunity cost’, in that it prevents the animal from pursuing other activities required for survival. ‘Effort’ in this model may therefore be taken as an abstract variable that encapsulates the overall negative consequences of licking more than is necessary to reduce pain.
We therefore posit a minimal reinforcement learning model of pain-related behaviour consisting of two state variables and one action variable, where the action is either licking \((L=1)\) or not licking \((L=0)\), and the state variables are ‘pain’ (P) and ‘effort’ (E). Mathematically, the model aims to maximize the sum of discounted future rewards. However, because there are no traditional rewards, we define the reward in terms of deviations from a homeostatic setpoint, inspired by Keramati & Gutkin73:
$${D}({t})={P}^{2}(t)+\alpha {E}^{2}(t)$$
where \(D(t)\) is the drive at time t, assuming zero pain and effort as the optimal homeostatic setpoint. We define the reward R(t), to be optimized, as the difference in drive:
$$\max \mathop{\sum }\limits_{t=0}^{T}{\gamma }^{t}R(t)=\max \mathop{\sum }\limits_{t=0}^{T}{\gamma }^{t}(D(t)-D(t+1))$$
The parameter \(\gamma \) is smaller than 1 and determines temporal discounting, T is the total simulation time. The parameter \(\alpha \) may set the relative cost of pain versus effort but is here chosen to be one. Given this definition, a behavioural policy is defined as a mapping from the two-dimensional state of the system \((P(t),E(t))\) to the action \(L(t)\) (whether to lick).
Before finding this behavioural policy, we must first define how the two state variables—pain and effort—are modified by the licking action L and by ascending nociceptive input in the assay.
We first consider the effort state variable, denoted E. Effort is exerted with each lick, and gradually recovers after a lick bout is over; it therefore takes the form of an exponential filter of the licking:
$$E(t)=A{{\rm{e}}}^{-t/{\tau }_{E}}\ast L(t)$$
where ⁎ denotes the convolution operation, \({\tau }_{E}\) is the time constant of exponential smoothing and \(A\) is the scaling factor. As an abstract state variable, the units of E are somewhat arbitrary. Therefore, to select the values of \({\tau }_{E}\) and \(A\), we referenced the range of values found for exponential and scaling terms when fitting a linear filter of licking behaviour and slow input to the photometry data. This gave us values of \({\tau }_{E}=4\,\sec \) and \(A=0.07\).
We next considered the pain state variable, denoted P. In designing the form of P, we noted that a linear model could not reproduce the finding that competing need states inhibit inflammatory but not acute pain, unless we either: (1) assume these two forms of pain come from different sources, one of which is independent of regulation by NPY; or (2) introduce a nonlinearity in the relationship between ascending pain and the pain state. To test whether the latter model of a single pain source would be sufficient to account for observed behaviour, we here introduced a nonlinearity into P, designing it to be a saturating integral of the ascending nociceptive input from the formalin injection:
$$x(t+1)=x(t)+\frac{1}{{\tau }_{P}}((P(t)-x(t))+{P}_{{\rm{input}}}(t)-wL(t))$$
where the subscript denotes time, \({\tau }_{P}\) is an integration time constant, \(w\) is the degree to which licking affects the pain state, and Pinput is ascending nociceptive input. Like E, P is an abstract quantity with arbitrary units; thus, we set our integration time constant and licking weight to ensure that P and E were of comparable magnitude: this gave us \(w=0.035\) and \({\tau }_{P}=5\,\sec \). For the case of formalin injection, Pinput was modelled as the sum of two Gaussians, such that P resembles the slow signal in the photometry (see ‘Fibre photometry analysis’ and Extended Data Fig. 10). \(f(\cdot )\) is a nonlinearity that keeps the value of P between a minimal and maximal level (Extended Data Fig. 10), {\(f(x)=0\) if \(x < 0\), \(f(x)=x\) if \(x < K\) and \(f(x)=K+\tanh (10x)/10\) if \(x > K\)}. Here, the value K is chosen to match model output to mice ad libitum licking behaviour, K = 0.35. Thus, x is an intervening variable shaped by: (1) the effect of licking; (2) the ascending pain input; and (3) the difference between x and P, which is positive when x < 0, 0 in the linear portion of \(f\), and negative when x > K. The difference term therefore has the effect of a restoring force that reduces excursions outside the linear regime of \(f\).
Having established E and P, we can next learn a behavioural policy that maximizes reward, that is, maximizes \(\mathop{\sum }\limits_{t=0}^{T}{\gamma }^{t}(D(t)-D(t+1))\). We parametrized the model’s behavioural policy by a feedforward network: \(L(t)={g}_{\theta }(P(t),E(t))\), and used Q-learning74 to find the network parameters \(\theta \). The feedforward network is all-to-all connected, with 6 hidden layers of 128 rectified linear units. To avoid having to model the duration of lick bouts, when the policy generates a lick, the duration is sampled from the empirical distribution of lick bout durations found in the data. We give more details and vary multiple aspects of the model in the Supplementary Information. In short, we verify that a linearization of the pain dynamics or adding delay to the licking feedback, \(-{wL}(t-d)\), does not affect our results qualitatively.
We study the effect of competing needs in the model by modulating the three parts of the model as shown in Fig. 4a, denoting the modulation by a constant NPY > 0. During training, 25% of trials were randomly selected to include the modulation and in other trials we set NPY = 0. We verified that selecting 50% of trials at random did not change our results (Supplementary Note). Each of the three parts is manipula ted in two ways.
Modulation I: modelling a change in the integration of pain input
We tested two alternative ways of manipulating integration of nociceptive input:
$$\begin{array}{c}{\rm{Manipulation}}\,1.\\ \,\,x(t+1)=x(t)+\frac{1}{{\tau }_{P}}(P(t)-x(t)+{P}_{{\rm{input}}}(t)-wL(t)-{\rm{NPY}})\end{array}$$
$$\begin{array}{c}{\rm{Manipulation}}\,2.\\ x(t+1)=x(t)+\frac{1}{{\tau }_{P}}(P(t)-x(t)+{P}_{{\rm{input}}}(t)-wL(t)-{\rm{NPY}}\cdot x(t)).\end{array}$$
We find that this model can reproduce the experimentally observed reduction in licking when we set NPY = 0.001 and NPY = 0.0075, respectively.
Modulation II: modelling an increase in the effort cost of licking
We tested two alternative ways of manipulating the effort cost of licking, either by doubling the time constant \({\tau }_{E}\) or doubling the amplitude \(A\) in the equations for the dynamics of E:
$${\rm{Manipulation}}\,1\,.E(t)=A{{\rm{e}}}^{-\frac{t}{{\tau }_{E}+{\rm{NPY}}}}\,* \,L(t)$$
$${\rm{Manipulation}}\,2\,.E(t)=(A+{\rm{NPY}}){{\rm{e}}}^{-\frac{t}{{\tau }_{E}}}\,* \,L(t).$$
Modulation III: changing the behavioural policy
We tested two alternative ways of incorporating the third axis to the behavioural policy, introducing NPY as a scaling of either the pain variable or the effort variable in the reward function:
$${\rm{Manipulation}}\,1\,.\,D(t)=f{(x(t)-{\rm{NPY}})}^{2}+{\alpha E}^{2}(t)$$
$${\rm{Manipulation}}\,2\,.\,D(t)={P}^{2}(t)+\alpha (1+{\rm{NPY}}){E}^{2}(t).$$
Here, NPY = 0.1 and NPY = 0.2 respectively. In this revised policy, NPY is given as an additional input to the feedforward network: \(L(t)={g}_{\theta }(P(t),E(t),{\rm{NPY}})\), and we assume that its value remains constant during the time of the experiment.
Only the modulation to pain state integration leads to behavioural and state timeseries consistent with the data. We show the first manipulation of each modulation in Fig. 4, while the second manipulation is shown in Extended Data Fig. 10.
Histology
Verification of viral expression and fibre placement
Mice were transcardially perfused with 0.1 M PBS followed by 4% paraformaldehyde (PFA). Brains were removed and post-fixed for 4 h in PFA and then washed overnight in PBS. Coronal brain sections were cut (150–200 μm sections) on a vibratome, washed twice with PBS, and mounted and coverslipped with Fluorogel. Epifluorescence images were taken on a Leica stereoscope to verify fibre and cannula placements and viral expression. In rare cases (1 Y1R, 2 Vglut2 and 1 non-Y1R) animals died before fibre locations could be determined.
Immunohistochemistry
Brain sections were incubated overnight at 4 °C with primary antibodies diluted in PBS, 1% BSA and 0.1% Triton X-100. Antibodies used: goat anti-AgRP (1:2,500, Neuromics, GT15023), rabbit anti-FOS (1:1,500, Cell Signaling Technology, 2250) guinea pig anti-RFP (1:10,000)75 and rabbit anti-GFP (1:5,000, Invitrogen, A-11122). Sections were washed 3 times and incubated with species appropriate and minimally cross-reactive fluorophore-conjugated secondary antibodies (Donkey anti-Goat Cy5 AffiniPure 705-175-147, Donkey anti-Rabbit Cy5 Affinipure 711-175-152, Donkey anti-Guinea Pig Cy3 AffiniPure 706-165-148, and Donkey anti-Rabbit Alex Fluor 488 AffiniPure 711-545-152, all 1:500, Jackson ImmunoResearch) for 2 h at room temperature. Sections were washed twice with PBS and mounted and coverslipped with Fluorogel. Confocal images were taken on a Leica DM6 Upright Microscope using a 20× or 63× objective using LASX (v.3.7.4) software.
Tissue clearing and light sheet microscopy
Light sheet microscopy was used to visualize lPBN Y1R projections. Tissue clearing and light sheet microscopy were performed by LifeCanvas Technologies. Samples were preserved using SHIELD reagents (LifeCanvas Technologies) according to the manufacturer’s instructions76, and were then delipidated using Clear+ delipidation reagents (LifeCanvas Technologies). Samples were index matched by incubating in 50% EasyIndex (refractive index = 1.52, LifeCanvas Technologies) overnight at 37 °C followed by incubation in 100% EasyIndex for 1 day. The samples were then imaged using a SmartSPIM axially swept light sheet microscope using a 3.6× (0.2 NA) objective (LifeCanvas Technologies).
Fluorescence in situ hybridization
Brains were post-fixed overnight and then transferred to a 30% sucrose solution for 48 h. Brains were then frozen in OCT compound (Fisher Scientific) and stored at −80 °C. Brains were sectioned at 12–15 µm in a cryostat onto Superfrost Plus slides (Fisher Scientific) and stored at −80 °C until use. Fluorescence in situ hybridization (FISH) was performed according to manufacturer instructions (RNAscope fixed-frozen tissue, ACD) using the following probes: Mm-Npy1r (427021), Mm-Penk (318761), Mm-Pdyn (318771), Mm-Tacr1 (428781) and Mm-Calca (578771).
FISH imaging. Sections were imaged on a slide scanning light microscope (Keyence). Exposure times were kept consistent across all sections in an experiment. Tile scans were collected of the entire lPBN using a 40× objective and stitched using BZ X800 Analyzer Software (Keyence).
FISH analysis. FISH analyses were performed in ImageJ (NIH, v.1.53 f). ROIs were drawn manually by circling all DAPI-positive areas in the lPBN. Then, in each channel, the intensity of five representative ‘background’ regions without any fluorescent labelling and the intensity of 20 single ‘dots’ representing an mRNA transcript were measured. The approximate dot number per cell was calculated by dividing the total intensity of a DAPI-labelled ROI minus the background by the average dot intensity. A cell was considered positive if it had an estimated dot number greater than or equal to 1.
Slice electrophysiology
Slice preparation
Animals were deeply anaesthetized with isoflurane and rapidly decapitated. Following brain dissection, the brain was submerged in oxygenated ice cold N-methyl-d-glucamine (NMDG) recovery solution (in mM: 2.5 KCl, 20 HEPES, 1.2 NaH2PO4, 25 glucose, 93 NMDG, 30 NaHCO3, 5.0 Sodium ascorbate, 3.0 sodium pyruvate, 10 MgCl2 and 0.5 CaCl-2H20; 300–305 mOsm). The brain was blocked and coronal slices were obtained using a Campden Instruments 7000 smz-2 vibrotome in ice-cold, oxygenated NMDG solution. After sectioning, slices were transferred to a recovery holding chamber containing 32 °C NMDG solution. Slices recovered for 10 min before being transferred to a holding chamber containing room temperature aCSF (in mM: 119 NaCl, 2.5 KCl, 1.3 MgCl2.6H2O, 2.5 CaCl2.2H2O, 1 NaH2PO4.H2O, 26.2 NaHCO3 and 11 glucose; 287–295 mOsm). Slices were allowed to recover for an additional 1 h before recording.
Electrophysiology
Electrophysiology experiments were performed on a Scientifica Slicescope Pro system. Recordings were acquired using a Multiclamp 700B amplifier and a Digidata 1550B digitizer. Data was filtered at 2 kHz and digitized at 10 kHz. Slices were superfused with oxygenated 30 °C aCSF. Recordings took place in the lPBN dorsal to the superior cerebellar peduncle and ventral to the ventral spinocerebellar tract. Y1R-expressing neurons were identified by fluorescent reporter and patched with 3–6 MΩ pipettes prepared with a Sutter Instrument P-97 pipette puller. For synaptic connectivity experiments, these pipettes contained a CsMeSO3 based internal solution (in mM: 120 CsMeSO3, 15 CsCl, 8 NaCl, 10 HEPES, 0.2 EGTA, 5 TEA-Cl, 4 Mg2-ATP, 0.3 Na2-GTP, 0.1 Spermine tetrahydrochloride, 5 QX-314 bromide, 5 phosphocreatine disodium salt; pH 7.4, 290 mOsm). Channelrhodopsin-mediated optically evoked post synaptic potentials were generated using 0.3 ms 490 nm light pulses from a CoolLED pE-4000 illumination system. For CFA sEPSC recordings and DREADD validation recordings, pipettes were filled with a potassium gluconate-based internal solution (in mM: 135 potassium gluconate, 10 NaCl, 2 MgCl2, 0.16 CaCl2, 10 HEPES, 0.5 EGTA, 4 Mg2-ATP, 0.4 Na2-GTP. Membrane potential was clamped at −60 mV and cells were allowed to equilibrate for 5 min following establishment of the whole-cell configuration. For CFA recordings, animals were sacrificed 24 h post 30 µl 1:1 CFA: saline paw injection. sEPSCs were recorded in the voltage clamp configuration for 3 min and analysed in Clampfit 11 with a stringent best-fit template. For DREADD validation recordings, cells were injected with sufficient current in the current clamp configuration to maintain their membrane potential at −50 mV for hM4D(Gi) recordings. Following a 3-min baseline, 1 µM of CNO was bath-applied.
Statistics and reproducability
Data were expressed as mean ± s.e.m. in figures and text unless noted otherwise. Paired or unpaired two-tailed t-tests, Wilcoxon signed-rank tests, and Pearson regressions were performed as appropriate. One-way, two-way and three-way ANOVA were used to make comparisons across more than two groups. The Shapiro–Wilk test was used to test the normality of residuals. Equal variance was not assumed, and Welch’s corrections or Greenhouse–Geisser corrections were applied. To compare Pearson’s correlations between groups, Fisher’s z-transformation was applied to r values before conducting t-tests. One statistical outlier was identified using the ROUT method and was removed from Extended Data Fig. 8q (TMT). In Fig. 1g, samples with fewer than 10 cells that met the criteria were excluded (Cluster N5 Npy1r+, 1 excluded; Cluster N8 Npy1r+, 6 excluded; Cluster N9 Npy1r+, 3 excluded; Cluster N10 Npy1r+, 2 excluded). Clusters N11–N14 were excluded owing to low cell counts in both groups. Micrographs are representative of four mice (Fig. 5h), three mice (Extended Data Fig. 2d), four mice (Extended Data Fig. 3c, control), five mice (Extended Data Fig. 3c, ablated), two mice (Extended Data Fig. 5b), three mice (Extended Data Fig. 8b), six mice (Extended Data Fig. 8d–i), two mice (Extended Data Fig. 8w) and three mice (Extended Data Fig. 9a). All statistics were performed using Prism 10 (GraphPad). Test, statistics, significance levels and sample sizes for each experiment are listed in Supplementary Tables 1–3. Not significant, P > 0.05, t-tests and post hoc comparisons: *P < 0.05, **P < 0.01, ***P < 0.001; interaction: †P < 0.05, ††P < 0.01, †††P < 0.001; main effect (group, condition or drug): #P < 0.05, ##P < 0.01, ###P < 0.001.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.