Xiphoid nucleus of the midline thalamus controls cold-induced food seeking

Maintaining body temperature is calorically expensive for endothermic animals1. Mammals eat more in the cold to compensate for energy expenditure2, but the neural mechanism underlying this coupling is not well understood. Through behavioural and metabolic analyses, we found that mice dynamically switch between energy-conservation and food-seeking states in the cold, the latter of which are primarily driven by energy expenditure rather than the sensation of cold. To identify the neural mechanisms underlying cold-induced food seeking, we used whole-brain c-Fos mapping and found that the xiphoid (Xi), a small nucleus in the midline thalamus, was selectively activated by prolonged cold associated with elevated energy expenditure but not with acute cold exposure. In vivo calcium imaging showed that Xi activity correlates with food-seeking episodes under cold conditions. Using activity-dependent viral strategies, we found that optogenetic and chemogenetic stimulation of cold-activated Xi neurons selectively recapitulated food seeking under cold conditions whereas their inhibition suppressed it. Mechanistically, Xi encodes a context-dependent valence switch that promotes food-seeking behaviours under cold but not warm conditions. Furthermore, these behaviours are mediated by a Xi-to-nucleus accumbens projection. Our results establish Xi as a key region in the control of cold-induced feeding, which is an important mechanism in the maintenance of energy homeostasis in endothermic animals.

Maintaining body temperature is calorically expensive for endothermic animals 1 . Mammals eat more in the cold to compensate for energy expenditure 2 , but the neural mechanism underlying this coupling is not well understood. Through behavioural and metabolic analyses, we found that mice dynamically switch between energy-conservation and food-seeking states in the cold, the latter of which are primarily driven by energy expenditure rather than the sensation of cold. To identify the neural mechanisms underlying cold-induced food seeking, we used whole-brain c-Fos mapping and found that the xiphoid (Xi), a small nucleus in the midline thalamus, was selectively activated by prolonged cold associated with elevated energy expenditure but not with acute cold exposure. In vivo calcium imaging showed that Xi activity correlates with food-seeking episodes under cold conditions. Using activity-dependent viral strategies, we found that optogenetic and chemogenetic stimulation of cold-activated Xi neurons selectively recapitulated food seeking under cold conditions whereas their inhibition suppressed it. Mechanistically, Xi encodes a context-dependent valence switch that promotes food-seeking behaviours under cold but not warm conditions. Furthermore, these behaviours are mediated by a Xi-to-nucleus accumbens projection. Our results establish Xi as a key region in the control of cold-induced feeding, which is an important mechanism in the maintenance of energy homeostasis in endothermic animals.
The emergence of endothermy brought numerous adaptive advantages during evolution; however, it also came with a significant increase in energy expenditure. To fuel this increased energy demand, mammals dramatically adapt their foraging behaviour in response to changing temperature and there is a tight, inextricable association between ambient temperature and food intake: the colder the environment, the more food is needed to maintain core body temperature [1][2][3] . Mammals, including humans, are known to eat more in the cold. Various festivals across different cultures involving lavish feasts during winter are a testimony to our endothermic evolutionary past [4][5][6] . However, the neural basis linking the energy needs arising from the cold and the increase in feeding remain unanswered questions in our understanding of mammalian biology.
Rodents are an excellent model with which to study this association between temperature and energy consumption 7 . For example, laboratory mice (Mus musculus) can double their daily food intake when living at 4 °C, with thermogenesis contributing to around 60% of whole-body energy expenditure under these conditions 8 . Although cold sensation has been shown to acutely influence feeding through conserved somatosensory and feeding centres in the brain in both ectotherms and endotherms [9][10][11][12][13] , it remains unclear whether-or howcold-induced energy expenditure is compensated by food intake. Here we combined high-resolution metabolic and behavioural analyses to demonstrate that increased feeding in the cold is a consequence of energy expenditure; moreover, we identified the midline thalamic xiphoid nucleus (Xi) as a key hub mediating the compensatory increase in food-seeking behaviours.

Energy expenditure drives feeding in cold conditions
Housing mice at 4 °C has been reported to lead to elevated thermogenesis, energy expenditure and food intake 8,14 . To gain a more detailed view of energy expenditure, we used indirect calorimetry to determine an individual mouse's energy expenditure in real time through the measurement of oxygen and carbon dioxide exchanges 15 . Temporally resolved indirect calorimetry showed that switching the environment temperature from 23 to 4 °C immediately increased energy expenditure (Fig. 1a,b and Extended Data Fig. 1a-f). However, there was an initial decrease and substantial delay between the temperature drop and increased food intake (Fig. 1b), suggesting that rapid cold sensation might not be the direct cause of cold-induced feeding. Following quantification of the temporal association between energy expenditure and feeding we found that, as cold exposure progressed, food intake became more correlated with energy expenditure (starting at 5-6 h post cold exposure and remaining elevated thereafter; Fig.1c). On the basis of this progressive correlation, we thus defined this 5-6 h post-cold-exposure period as the onset of cold-induced energy compensation (CIEC) and focused on this time window for the remainder of the study, including video recording of mice within this period to better understand these behaviours.
Interestingly, despite the overall increase in food intake when experiencing cold, the mice mostly stayed immobile rather than actively engaging in foraging (Fig. 1d). This observation suggested that, rather than a unilateral increase in appetite, the mice faced competing priorities between conserving energy for thermogenesis (by staying immobile) versus replenishing energy supply (by seeking food). However, mice also engaged in various non-feeding, thermoregulatory behaviours under cold conditions, such as bedding retrieval and arrangement (Fig. 1d). To better understand the relationships among these behaviours, we first annotated them into 15 specific actions and used an unsupervised hidden Markov model (HMM) to identify three distinct states shown by the mice: state 1, an energy-conservation state in which they were mostly immobile; state 2, an exploration with food-seeking state with the highest probability of eating; and state 3, an exploration without food-seeking state, where mice engaged in other actions without food consumption ( Fig. 1d-g and Extended Data Fig. 2a-c). This analysis enabled us to use just three HMM states, rather than the 15 specific actions, to selectively study CIEC-induced feeding state (state 2). Because state 1 is the predominant state (Fig. 1f), we focused on characterization of outbound state transitions from state 1 for all subsequent analyses.

Brain-wide activity screen under cold conditions
To identify the circuit mechanisms underlying CIEC-induced feeding, we first performed a brain-wide c-Fos screen 16 1 | Identification of the behavioural and circuit basis of cold-induced feeding. a, Ninety-hour progression of energy expenditure (EE) and food intake (n = 24 mice). Energy expenditure is represented in green and food intake in black; lines and shading denote mean and s.e.m., respectively, of each group. b, Enlarged view of a during the switch from 23 to 4 °C. c, Scatter plot representing the relationship between energy expenditure and feeding over an 11 h period post temperature switch (during the light cycle, n = 24 mice). Each dot represents average energy expenditure and food intake across all mice at each hour. Arrowheads indicate the key transition period (at 5-6 h) after onset of cold conditions. d-f, Behavioural analysis of animals undergoing CIEC using a HMM. We defined a three-state HMM: (1) energy conservion; (2) exploration with feeding; and (3) exploration without feeding. We generated the initial estimated transition matrix by assuming equal probabilities for all transitions because we did not have a priori information. d, Representative behavioural events assessed for a male C57BL/6J mouse after being under cold conditions for 5 h. e, Representation of the HMM of CIEC-associated feeding (n = 3 mice). f, Percentage of time spent in each HMM state. g, Enlarged view from a 10 min session of e, showing HMM state assignment. h, Schematics of whole-brain clearing and volumetric three-dimensional imaging used to identify brain regions activated during CIEC. i, c-Fos mapping results for the thalamus. Each dot represents c-Fos + cell count in each distinct region based on Allen Brain Atlas registration; dot size represents the difference in signal density between the two conditions. Structures activated under thermoneutral temperature are shaded in orange and those activated under cold conditions in blue.
Cold conditions led to a broad decrease in c-Fos signal in the cortex, probably due to the overall decrease in physical activity of these animals (Extended Data Fig. 3a-c). The hypothalamus, where thermoregulation is centred 21 , showed robust c-Fos activation as expected (Extended Data Fig. 3a,d). Surprisingly, whereas most of the thalamus was suppressed under cold conditions, several ventral midline thalamic (vMT) regions showed higher activation (Fig. 1i). We decided to further explore this area for two reasons. First, in the Siberian hamster (a model for cold adaptations) lesions at the vMT have been reported to impair cold adaptation in winter 22 . Second, it was recently shown in mice that the vMT is a crucial hub for gating how internal states are translated into opposite behaviour responses (for example, freezing versus fighting) to perceived threats 21 , a scenario that resembles the competing priorities between energy-conservation and food-seeking behaviours we observed in CIEC. Next, to differentiate whether vMT activation occurred because of cold sensation or was related to CIEC, we examined c-Fos expression after either 5 h (to model CIEC) or 15 min (to model acute sensation) of cold exposure (Fig. 2a). Both conditions induced c-Fos in the median preoptic nucleus, a key region for thermoregulation (Extended Data Fig. 4b). However, as little as 5 h of cold exposure led to c-Fos activation in the Xi compared with 15 min cold exposure or housing at 30 °C; this activation was not observed in the neighbouring nucleus reuniens (Fig. 2b,c and Extended Data Fig. 4a). Following our designation of the 5-6 h post-cold-exposure period as the onset of CIEC (Fig. 1c), we define these c-Fos + Xi neurons as the Xi CIEC population, whose activation is probably due to CIEC rather than to acute cold sensation. This selective Xi activation was also observed after an extended period of cold (7 days) (Extended Data Fig. 4c). Furthermore, both male and female mice showed activation of the Xi during CIEC (Extended Data Fig. 4d).

Xi activity during CIEC-induced feeding
To determine how Xi activity represents different behavioural components induced by cold conditions in real time, we used fibre photometry to record in vivo calcium dynamics of the Xi (Fig. 2d,e). Consistent with the c-Fos results (Fig. 2b,c), we found that an acute decrease in temperature (23 to 4 °C) did not lead to activation of the Xi (Extended Data Fig. 4e). Next, we analysed Xi calcium dynamics during CIEC-associated food seeking. Freely moving mice were placed under cold conditions with food and water for 5 h before fibre photometry recording. There was a marked increase in Xi activity before each feeding event under cold conditions, but this was not observed in feeding bouts at thermoneutral temperature (non-CIEC) in the same individuals ( Fig. 2f-i), suggesting that Xi activity was selectively associated with CIEC-induced feeding. To gain additional insight into cold-induced Xi activity, we created a scenario with exacerbated cold-induced energy deficit (CIEC + ) by briefly restricting food access during the first 3 h of cold exposure. Under CIEC + conditions we observed further elevated Xi calcium transients within the same animals, suggesting that Xi activity was scalable with CIEC (Extended Data Fig. 4f-h). Furthermore, Xi neurons did not respond to canonical, fasting-induced feeding at either room temperature or 30 °C (Extended Data Fig. 4j-l), suggesting that their activity is specifically associated with CIEC but not with a general energy deficit associated with food restriction. Plasma levels of glucose and leptin, which normally decrease with fasting, were unaltered during CIEC (Extended Data Figs. 1j and 5a,b) whereas there were elevated levels of lipolysis products (Extended Data Fig. 5c-f), suggesting that non-canonical pathways are signalling the CIEC state to the brain, although the exact molecular nature of such a pathway remains to be determined.
By further incorporation of HMM states into fibre photometry analysis, we discovered that Xi activity is strongly associated with transition between the energy-conserving state (state 1) and food-seeking state (state 2), but not with transition between state 1 and the non-food-seeking, exploratory state 3 ( Fig. 2j-l and Extended Data Fig. 4i), suggesting that Xi activity is not associated with general exploratory movements. Together these results indicate that Xi neurons are specifically activated during the transition between states 1 and 2, leading to compensatory feeding in a manner that scales with increasing amplitude at higher CIEC.

Xi regulates CIEC-induced feeding
The temporal relationship between Xi activity and CIEC-induced food seeking led us to ask whether Xi neurons could causally modulate this behaviour. However, the Xi is a small, less-studied midline thalamic nucleus without well-defined boundaries or molecular markers 23,24 . Noting that CIEC selectively induced c-Fos in the Xi without activation of the surrounding areas (Fig. 2b), we hypothesized that we could target these Xi CIEC neurons based on their unique activation history during previous exposures to cold conditions. Leveraging a previously validated vCAP-TURE strategy 17,25-28 based on activity-dependent ESARE-ER-Cre-ER 29 , we targeted cold-activated Xi neurons with an hM3Dq (Gq-coupled human muscarinic M3 designer receptor exclusively activated by either a designer drug (DREADD) or a red fluorescent protein (RFP) control; Fig. 3a-c). Consistent with the specificity and efficiency of previous CAPTURE and targeted recombination in active populations work 25,27,29 , we found that Xi CIEC neurons were efficiently captured at 4 °C and that these neurons highly overlapped with cold-induced c-Fos + neurons (89.9 ± 6.7% by c-Fos/CAPTURE, 52.6 ± 12.4% by CAPTURE/c-Fos), whereas minimal neurons were captured at 30 °C (Figs. 3a,d-f and 2a,b).
Following reactivation by clozapine N-oxide (CNO), we observed significantly increased food intake in mice targeted with hM3Dq under cold conditions (Xi CIEC ) compared with those targeted with the RFP control or at 30 °C (Xi non-CIEC ) (Fig. 3g). We then used the same vCAPTURE strategy to target Xi CIEC neurons with an inhibitory hM4Di DREADD. A significant decrease in CIEC-induced food intake was observed following CNO-mediated inhibition compared with the RFP control ( Fig. 3h-j and Extended Data Fig. 6a). By contrast, neither chemogenetic inhibition nor activation affected food intake at room temperature (Extended Data Fig. 6b,c), further indicating that the role of Xi neurons is specific to cold-induced feeding.

Xi CIEC neurons encode a context-specific valence
To understand how Xi CIEC neurons promote feeding at higher temporal resolution, we turned to optogenetics. We first injected ChR2-expressing AAV directly into the vMT region and analysed feeding behaviours in a CIEC scenario (Extended Data Fig. 7a,b). Optogenetic stimulation of the bulk vMT region led to higher food intake but also caused a rapid increase in overall movement that was not observed during natural adaption to cold conditions (Extended Data Fig. 7c-f). These results suggested that non-specific activation of neighbouring neurons outside the Xi may have confounded behavioural output.
To improve specificity we again used the activity-dependent vCAP-TURE system to selectively express ChR2 in Xi CIEC neurons (Fig. 4a,b). Photostimulation of ChR2-expressing Xi CIEC neurons resulted in a robust increase in food intake without changes in general movement ( Fig. 4c-f) or in an open-field test (Extended Data Fig. 8a-d) compared with RFP controls. Interestingly, in the absence of cold (that is, at rodent thermoneutrality, 30 °C), photostimulation of Xi CIEC neurons resulted in only a minor, but non-significant, change in food intake (Extended Data Fig. 8e-h), indicating that Xi CIEC neurons require a CIEC state to induce bona fide feeding in animals. In addition, video analysis showed that photoactivation of Xi CIEC resulted in more transitions from the energy-conserving HMM state 1 to the food-seeking state 2, whereas state 1-3 transitions were not altered (Fig. 4g,h). Similarly, the total time spent in state 2 increased following photostimulation ( Fig. 4i and Extended Data Fig. 8i). These results, in combination with the earlier fibre photometry data, indicate that Xi CIEC activity specifically promotes CIEC-induced feeding without affecting other general movement-related actions.
Next, to delineate how Xi neurons affect behavioural transitions, we used real-time place preference (RTPP) to determine the valence associated with Xi activation. Xi CIEC ChR2-expressing mice were first placed in a two-chamber arena without laser stimulation to determine a basal place preference. During RTPP, Xi CIEC neurons were stimulated when the mice entered one side of the arena and this stopped when they crossed to the other side (Fig. 4j,k). At room temperature, Xi CIEC activation did not change place preference. However, when RTPP was conducted under cold conditions (4 °C), the same animals switched their preference to the light-stimulated side ( Fig. 4j-m). This result is consistent with our state-dependent activity pattern found in earlier fibre photometry studies (Fig. 2f,g). Moreover, such a state-dependent valence switch was present only in ChR2-expressing mice and not in RFP controls. The RTPP results suggest that Xi-mediated state transition for food seeking during CIEC could be driven by a positive valence.

Xi-NAc mediates food seeking under cold conditions
Lastly, we sought to characterize the cell types and projection targets of the Xi. First, using vGLUT2-Cre and vGAT-Cre mice 30,31 , we found that Xi-regulated food seeking was primarily mediated by glutamatergic neurons in the Xi and not through GABAergic cells (Extended data Fig. 9a-l). Next we injected mCherry-expressing adeno-associated virus (AAV) to map the projection targets of Xi. Consistent with previous reports 23,24 , Xi projected to the nucleus accumbens (NAc), basolateral amygdala (BLA) and anterior cingulate cortex (ACC) (Fig. 5a,b). However, we should note here that because Xi is a small region and Data are mean ± s.e.m. ***P = 0.004 for AUC (h), ****P < 0. 0001 for peak dF/F (i), **P = 0.0017 for AUC (k) and **P = 0.0024 for peak dF/F (l) using two-tailed unpaired t-test. a.u., arbitrary units.

Article
we currently do not have a genetic marker for CIEC-activated Xi neurons, our tracing studies have a limitation in regard to targeting of neighbouring regions such as PVH and Re. To further confirm and determine whether one or more of these projections corresponded to the Xi CIEC population, we designed a double-labelling experiment in which retrograde CTB dyes were individually injected into the NAc, BLA and ACC. We found that the highest overlap between cold-activated c-Fos and CTB was in Xi-NAc projecting neurons ( Fig. 5d-g), prompting us to test the role of Xi-NAc projection in cold-induced feeding. We injected ChR2-expressing AAV into the Xi and implanted an optic fibre above either the NAc, BLA or ACC (Fig. 5i,j, top and Extended Data Fig. 9a). Photoactivation of Xi-NAc projection, but not Xi to ACC or BLA projection, resulted in a significant increase in food intake (Fig. 5i,j and Extended Data Fig. 10a,b). These projection-specific effects were further confirmed using two fibre implants (NAc and BLA) in the same animals but photostimulated sequentially (Extended Data Fig. 10c-g). Finally, using RTPP, we also found that activation of Xi to NAc projection resulted in a cold-dependent positive valence whereas activation of other projections failed to do so (Fig. 5k,l). Together, these results show that Xi-to-NAc projection primarily mediates cold-induced food-seeking behaviours.

Discussion
Through leverage of whole-brain screening, in vivo calcium imaging and chemo-and optogenetic manipulations, we demonstrated that the Xi nucleus serves as a key brain region in the promotion of cold-induced food-seeking behaviours. Although cold-induced feeding has been a c 30   widely reported across animal species, including humans, our study suggested that such a feeding increase was neither a direct response to cold sensation nor a unilateral increase in food-seeking behaviours but rather a dynamic outcome of the transitional priorities between energy conservation and replenishment in response to elevated caloric debt in cold conditions.
Interestingly, although Xi activity was associated with behavioural transitions (Fig. 2j), it returned to baseline before feeding began (Fig. 2f), suggesting that sustained Xi activity is not required for feeding. The vMT/Xi has recently been shown to gate behavioural shifts between saliency-reducing and -enhancing strategies in response to visual threats in mice 25    Article endogenous Xi activity might gate behavioural transitions from energy conservation to a replenishing (feeding) state, because experimental activation of Xi increased CIEC-associated feeding (Figs. 3g and 4c), potentially by lowering the threshold required to increase the probability of state 1-2 transitions (Fig. 4g-i). This gating, however, is specific to the cold context in which coordinating energy expenditure and intake is critical for survival: it appears to be less involved in starvation conditions, in which the drive for feeding is more unilateral (Extended Data Fig. 4). This specificity suggests that additional CIEC-associated inputs, such as metabolites, hormones or interoceptive signals, acting on one or more upstream regions of Xi, are necessary for Xi-mediated behavioural gating and valence transitions. Further studies are required to elucidate the identities and mechanisms of these inputs. In concert with all available evidence, we propose that the Xi could represent an important mechanism for dynamic switching of opposing survival strategies during specific natural behaviours. Feeding behaviours are tightly regulated by both homeostatic and reward circuits [32][33][34] . The Xi is a less-studied brain region that is not a direct component of the classic hypothalamic or limbic reward systems. However, it projects to multiple well-known regions involved in feeding regulation, including the prefrontal cortex, BLA and NAc 21 (Fig. 5a,b). We found that Xi-regulated feeding and valence-switching behaviours 4    were primarily mediated by the Xi to NAc projection. As a limbic reward centre, the NAc is known to integrate motivational and sensory signals to guide motor output 35,36 and regulate feeding 37,38 . On the basis of our findings, we propose that the NAc is a key downstream target of the Xi in motivation of animals to switch behavioural states as dictated by the internal metabolic state. It remains to be determined, however, how Xi activity interacts or integrates with other aspects of the canonical feeding framework and, especially, what the identity of its input signals are. Although feeding is one of the most extensively studied rodent behaviours, it has primarily been modelled in the context of food restriction (for example, overnight fasting) in the creation of negative energy balance. Cold-induced feeding provides a new paradigm to study appetite that is driven by energy expenditure. Although both food restriction and energy expenditure create a net negative energy balance, the organismal physiology can be markedly different-for example, fasting is associated with lower blood glucose, leptin and insulin and suppressed thermogenesis and basic metabolic rates, whereas cold adaptation is accompanied by high glucose utilization, elevated thermogenesis and higher metabolic rates. Cold-induced energy compensation and associated neural substrates (such as the Xi and many others shown by the whole-brain screen) could provide an entry point in understanding naturalistic energy deficit created by other high-EE states such as exercise and lactation, findings that will be important not only for understanding fundamental mammalian biology but also for obesity and weight management.

Online content
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 https://doi.org/10.1038/s41586-023-06430-9.

Mice
Animal experiments were performed either at Scripps Research Institute, La Jolla or Beth Israel Deaconess Medical Center. Experiments were approved by either the Scripps Research Institute's or Beth Israel Deaconess Medical Center's Institutional Animal Care and Use Committee, respectively. Experiments were performed on mice aged 2-6 months. Wild-type C57BL/J6 mice were injected with viruses between at 6-8 weeks of age and were allowed to recover for at least 1 week before experiments or experiment-related habituation. Group size was not predetermined based on statistical power law but on previously published studies. Animals were randomly assigned to different experimental groups before viral injections. Both males and females were used for histology and c-Fos labelling. Male mice were used for free-moving behavioural studies.

Stereotactic viral injection and fibre implantation
Mice were anaesthetized with 3.0% isoflurane in an induction chamber and, after 5 min, the animals' heads were fixed on a stereotactic device (Kopf) using ear bars. Mice were maintained under 0.8-1.2% isoflurane during surgery on a warm heating pad (body temperature was maintained at 36 °C). Heads were shaved to remove hair and, using a scalpel blade, a midline incision was made to expose the skull. The head was balanced using a bregma and lambda system on the stereotaxic headstand. Using dental drills, small craniotomies were made above the site of injection. The virus was infused at 75 nl min −1 using a Nanoject II (Drummond) injector connected to a 10 μl Hamilton syringe. The needle was retained at the injection site for 10 min before withdrawal. Mice were allowed to recover for 1-2 weeks before experiments or experiment-related habituation.

Cold and warm exposure
A temperature-controlled rodent incubator (no. RIS28SSD, Powers Scientific), maintained at 4 °C, was used for cold exposure. For thermoneutrality conditions a temperature-controlled warm room set to 30 °C was used. For all temperature-exposure experiments, all mice were individually housed with a small amount of bedding materials to ensure that each individual received the same temperature exposure. For cold exposure, animals were directly transferred to the 4 °C incubator in a lidless cage to facilitate temperature equilibrium. Mice were provided free access to chow food and water during most coldand warm-exposure experiments, except in the CIEC + condition and during inhibitory chemogenetic experiments, in which they were food restricted for various amounts of time as indicated in individual figures.

Optogenetic, chemogenetic and food-intake measurement
Mice were allowed to recover for 7 days after optogenetic implant surgery for the non-selective optogenetics experiment, or for 14 days after tamoxifen injection for the vCAPTURE cohort of mice. Optogenetic mice were trained and habituated to pellets (20 mg pellets, no. F0071, Bioserv) along with the pellet-dispensing system FED2 (ref. 39) in their home cage for 5 days, before being provided free access to food pellets for 4 days to avoid development of a hedonic value for food pellets. The mice were further habituated to the behavioural chambers for 5 days with food pellets and FED2 before the first experiment. All food-intake experiments were performed between 08:00 and 15:00 to avoid the natural circadian cycle influence on feeding behaviour.
For optogenetics experiments, experimental mice were connected to a blue-light laser (473 nm) with an optical fibre (200 μm diameter, 0.22 NA, RWD Life Science). Light was delivered in 10 ms pulses at 20 Hz, 3 s on/2 s off, for 10 min. Light power at the fibre tip was 10 mW. For chemogenetics experiments, a regular chow pellet was used for measurement of food intake by weight to increase throughput. The stock solution of CNO was prepared freshly by dissolving in DMSO and was then diluted in saline; mice were injected with 3 mg kg -1 CNO for activation of the Gq cohort and 5 mg kg -1 for the inhibitory Gi cohort. Control mice were given the same amount of CNO as the experimental cohort.

vCAPTURE labelling of Xi CIEC -associated neurons
To label CIEC-associated neurons in the vMT/XI region with activating Gq-DREADD, mice received a stereotaxic injection of viral cocktail with ESARE-ER-Cre-ER + DIO-Gq and were habituated with the setup every day for 2-3 h for 1 week. ESARE-ER-Cre-ER/Gq mice were randomly divided into Xi CIEC and Xinon-CIEC groups. On the day of labelling, the Xi CIEC group of mice were placed in cold conditions for 6 h with ad libitum food and water. Mice were given 20 mg kg -1 4-TM (Sigma, no. H6278) by intraperitoneal injection 6 h after being placed under cold conditions. When these mice enter CIEC, the vMT/Xi neurons that are active during CIEC induce FOS and CreERT2. Following 4-TM injection, CreERT2 will selectively recombine the AAV8-hSyn-DIO-Gq-mCherry-encoding Cre-dependent Gq-DREADD in the cell that was expressing FOS. This recombination leads to permanent expression of Gq-DREADD in those cells, which can then be selectively activated at a later point by administration of the DREADD agonist CNO. Following 4-TM injections, these mice were kept under cold conditions for a further 2 h before being returned to their home cage and maintained at 23 °C. As a control, we generated a further cohort of mice that received a stereotaxic injection of the same viral cocktail as Xi CIEC and were habituated using the same protocol except that, on the day of labelling, they received 20 mg kg -1 4-TM injection after being maintained at 30 °C for 6 h rather than being kept under cold conditions. The c-Fos data in Fig. 1 show that very few cells were active in the vMT/ Xi region while mice were under thermoneutral conditions for 6 h compared with the scenario under cold conditions. We term this cohort of mice Xinon-CIEC. Both sets of mice were injected at the same time of day to avoid labelling variability associated with the circadian rhythm. A similar protocol was followed for the optogenetics mice that received a stereotaxic injection of a viral cocktail of AAV5-ESARE-ER-Cre-ER-PEST and AAV8-Ef1a-DIO-hChR2(H134R)-p2AScarlett.

Histology
Mice were anaesthetized with isoflurane before transcardial perfusion with ice-cold PBS, followed by cold 4% paraformaldehyde (PFA). Brains were removed and post-fixed overnight with 4% PFA at 4 °C. The following day, fixed brains were submerged in 3% agarose and kept under cold conditions for 2 h for embedding. Brains were sliced on a vibratome (Leica VT1000S) into 80 μm coronal sections and collected as two equal sets in a six-well plate filled with PBS. For immunohistochemistry staining permeabilization, brain sections were incubated with a blocking buffer containing PBS, 0.3% TritonX-100 (PBST) and 5% donkey serum for 1 h at room temperature, with gentle shaking. After permeabilization, brain sections were incubated with primary antibodies at 4 °C in a blocking buffer for 16 h. Next, brain slices were washed three times with PBST for 20 min each to wash away unbound primary antibody and were then incubated with secondary antibodies for 1 h at room temperature diluted in blocking buffer. Finally, brain slices were washed again with PBST three times, 20 min each, to wash away unbound secondary antibody before mounting onto super-frost Plus glass slides (VWR). Brain slices were imaged using an Olympus FV3000 confocal microscope with ×10 objective, 0.6 numerical aperture and water immersion (XLUMPlanFI, Olympus). Each brain slice was imaged at 10 μm Z-stack. c-Fos quantification was performed for a single plain (numbers mm -2 ). For double-labelling c-Fos vCAPTURE quantification, cells were counted in a region of interest defined manually following anatomical landmarks. Antibodies used for histology are: c-Fos antibody (Cell signaling, no. 2250, diluted 1:400), anti-rabbit-488 ( Jackson Immuno Research, no. 711-546-152, diluted 1:400).

Whole-brain imaging and analysis
Wild-type C57BL/J6 mice were habituated to the behavioural setup for 5 days before the actual experiment. On the day of the experiment, individually housed mice were maintained under either cold (4 °C) or thermoneutral (30 °C) conditions for 6 h with free access to food and water before perfusion. Brains were harvested and fixed overnight in 4% PFA. Whole-brain clearing, imaging and automated analysis were performed by LifeCanvas Technologies through a contracted service. In brief, fixed whole brains were prepared with SHIELD (stabilization under harsh conditions via intramolecular epoxide linkages to prevent degradation) to preserve protein antigenicity before being actively cleared and immunolabelled with a c-Fos antibody using SmartBatch+. Labelled brains were index matched by EasyIndex and imaged by volumetric lightsheet microscopy (SmartSPIM), followed by image post-processing, cell quantification, atlas registration and regional graphics. The averaged numbers of c-Fos + cells in each region were grouped into seven 'buckets' based on ABA annotations for data visualization. Dot size represents mean differences between 30 and 4 °C conditions in each region.

Fibre photometry
Mice were attached to a patch fibre (400 μm core, NA 0.5, RWD) connected to 470 and 410 nm light sources. Fibre photometry and the acquisition setup have previously been described 25 . The 470 nm excitation light was used to measure the Ca 2+ signal and the 410 nm excitation light as a reference signal. Changes in Ca 2+ fluorescence (470 nm) signal were compared with background Ca 2+ fluorescence (410 nm), providing an internal control for movement and signal bleaching. A scientific complementary metal-oxide semiconductor camera (Hamamatsu, Orca Flash 4.0 v.2) was used to capture the patchcord end-face images, and these were processed using a previously described MATLAB code 25 . Data-acquisition hardware (National Instruments, NI PCIe-6343-X) was used to digitize images at 5 kHz. Signals were expressed in dF/F, where F represents baseline fluorescence. Video recording of behaviour was used to manually annotate and timestamp feeding and other behaviours. AUC and peak values were calculated for −20/−10 to 10 s from the defined event (for feeding and HMM states, respectively).
For fasting-refeeding experiments, mice were fasted for 16 h. Mice were placed in a tall chamber and their cannula was attached to the fibre photometry setup. Mice were allowed to habituate for 30 min and a feeding device (FED3) was placed at one corner of the chamber. FED3 was programmed to begin dispersing pellets 15 min after placing the device in the chamber to avoid the introduction of noise in the experiment. Data acquisition, analysis and processing were carried out as described above.

HMM
Wild-type C57BL/6 mice were habituated to the setup (using FED2) for 4 days before recording their behaviours at 4 °C. For each mouse two videos were recorded, one from the top view and one from the side, using two separate Logitech C270 web cameras. We manually annotated the start and end of each behaviour. Analysers were blind to the experimental groups of mice. Behaviours included sitting, shivering, head grooming, turning, lower body grooming, moving out, eating, moving back, pushing bedding, standing up, bedding retrieval, drinking, digging, grooming tail and walking. Behaviours were annotated every 1 s. HMM requires an input sequence, an estimated transition matrix and an estimated emission matrix. The input sequence was generated with data from the 180 min videos, previously analysed manually, of mice exposed to cold conditions for 4-6 h with free access to food and water. The input sequence of each mouse was put into a vector. We defined a three-state HMM: (1) energy-conserving state, (2) exploration with food consumption and (3) exploration without food consumption. We generated the initial guess for the estimated transition matrix by assuming equal probabilities for all transitions, because we did not have a priori information. We generated the initial guess for the estimated emission matrix by predicting the probability Article of behaviour in each state. We used a custom MATLAB code using the Baum-Welch algorithm to acquire transition and emission matrices. To calculate the underlying state of behaviour based on a sequence of behaviours, we used the MATLAB built-in function hmmviterbi.

RTPP
For basal place-preference measurements of activity-dependent optogenetic mice, either ChR2-XiCIEC or RFP-Xi CIEC mice were placed in a two-chamber acrylic box (60 × 25 × 30 cm 3 ), with each side of the chamber measuring 30 × 25 cm 2 ), at room temperature (23 °C). Each chamber had different contextual pattern cues on the wall: one side had a black-and-white-striped pattern and the other a dotted pattern. Mouse movements were recorded with an overhead top-view Logitech web camera for the entire 30 min session. Mice were habituated for several hours daily with a fibreoptic cable attached to their head implants for 1 week in a tall chamber before basal place preference. Videos were manually quantified for the amount of time spent in each chamber. For measurement of RTPP at room temperature, mice were placed in the centre of the place-preference chamber and the laser was switched on when all four paws of the mouse were in the stimulation chamber. The laser was manually switched on (10 mW, 10 ms, 20 Hz) and off by the operator sitting in the next room while monitoring a live overhead video of the mouse. The laser was kept on while mice remained in the stimulation chamber and switched off when they left. To test the change in valence while mice were undergoing CIEC, they were maintained at 4 °C for 5-6 h with access to ad libitum food and water before performing RTPP under cold conditions. Mice were given a 1 week gap between RTPP at 23 and 4 °C.

Open-field test
To measure anxiety-like behaviour in the optogenetics cohort, mice were placed in the outer zone of a white-walled, acrylic, open-field arena (60 × 60 cm 2 ) and movement was recorded for 20 min using a top-view Logitech web camera. The laser was turned on and off intermittently for a 3 min period by an operator sitting in the next room while monitoring a live video feed. Total time and distance in the central 40% of the area were analysed using custom automated tracking software. The open-field test was performed only once for each mouse. Mice were returned to their home cage after the session.

Statistics
Two-way ANOVA was used to assess how behaviour was affected by other factors (for example, RTPP tested by optogenetic manipulations and temperature). Unpaired t-testing was used for comparisons between two groups. Two-tailed tests were used throughout, with α = 0.05. Multiple comparison adjustments, biological replicates and significance definitions are included in each figure legend.

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

Data availability
All numerical data are included in Supplementary Information. All other data are too large to deposit in a public repository but are available from corresponding author.