Main

Animals must decide what to eat and drink. This presents a challenge because the nutritional value of a food source may not be obvious from its external appearance and the consequences of its ingestion are not instantly apparent. Rather, animals must learn through ingestive experience the values of specific foods and fluids—whether they are worth exerting effort to obtain, and whether they should be consumed if encountered6,7,8. For example, many animals obtain most of their water from food9,10,11,12,13,14,15, and are therefore likely to learn through post-ingestive feedback which food sources are rehydrating.

Many aspects of learning about rewards involve dopaminergic (DA) neurons in the ventral tegmental area VTA16,17,18,19,20,21 (VTA-DA neurons). In response to the taste of food3,4 or water4,5, VTA-DA neurons release a burst of dopamine that confers value on associated cues. However, the taste of food and water are themselves cues that predict the subsequent satisfaction of an internal need (such as rehydration), and their value can change as animals learn about the post-ingestive effects of specific foods and fluids1,8,22. This raises the question of how internal nutrients and fluids, which are the final reinforcers of behaviour, are themselves represented in the dopamine system and used to drive learning.

DA neurons track changes in hydration

To investigate how DA neurons respond to internal changes in fluid balance, we recorded their activity before and after water consumption. Mice were outfitted for microendoscopic imaging of calcium dynamics in VTA-DA neurons (defined by expression of DAT-cre; Fig. 1a), deprived of water overnight, and then given unrestricted access to water for 5 min. The mice drank voraciously (Extended Data Fig. 1j) and—as expected—many DA neurons were transiently activated in a manner time-locked to licking4,5 (22%; Extended Data Fig. 1b and Extended Data Tables 1 and 2). However, we also detected an unexpected second wave of DA neuron activation that emerged following a delay of 10.1 ± 0.6 min from the start of drinking (Fig. 1b–e and Extended Data Fig. 1c–i). This delayed activation recruited many DA neurons (39%), involved increases in both baseline fluorescence and phasic bursts, and was unrelated to licking (the water bottle was gone). Instead, it mirrored the reported time course for water absorption into the blood23,24,25,26, suggesting that systemic rehydration itself triggers delayed activation of many DA neurons.

Fig. 1: VTA-DA neurons track systemic hydration.
figure 1

a, Representative image of GRIN lens placement and VTA-DA neurons expressing GCaMP6. b, Tuning maps of DA neuron responses from the same field of view during and after drinking water. c, Example traces of calcium dynamics in five representative neurons during and after water consumption. d, Individual neuron responses to consumption of water, intragastric (IG) infusion of water (1.2 ml), and intraperitoneal (IP) injection of water (1.2 ml) or hypertonic saline (3 M NaCl, 0.12 ml). e, Population-weighted z-score (calculated as the fraction of neurons activated or inhibited multiplied by their z-scored activity change) for each of the stimuli shown. The percentages of neurons activated (red) and inhibited (blue) are listed above and below each bar graph. ‘Post-ingestion’ is from 0 to 20 min after the end of self-paced consumption of water or 0.3 M NaCl; ‘after IG infusion’ is from 0 to 20 min after the end of intragastric infusion (1.2 ml) of water or 0.3 M NaCl; ‘after IP injection’ is from 0 to 30 min after intraperitoneal injection of water (1.2 ml), NaCl (3 M, 0.12 ml), isoproterenol (100 mg kg−1) or polyethylene glycol (PEG) (40%, 0.4 ml). f, Top, time course of the activation and then return to baseline of individual VTA-DA neurons following intragastric infusion of water (1.2 ml). Bottom, mean trace. Mice are from a separate cohort than those used in d. g, Mean activity traces of neurons (from d) activated by intraperitoneal water injection (red) and inhibited by intraperitoneal NaCl injection (blue), with concurrent blood osmolality changes plotted below. NS, P > 0.05; **P < 0.01, ***P < 0.001. Data are mean ± s.e.m. Statistics are presented in Extended Data Table 2.

To test whether this delayed response requires rehydration, we gave mice access to a hypertonic solution (300 mM NaCl) that naive mice will drink, but is ultimately dehydrating27. Consumption of this fluid caused transient DA neuron activation during drinking (Extended Data Fig. 1b,k) but did not result in a delayed increase of dopamine activity (Fig. 1e), despite similar levels of total consumption (Extended Data Fig. 1j). Of note, a small population of neurons was also inhibited, but the magnitude of this inhibition was the same following consumption of either water or hypertonic saline (Fig. 1e).

To test whether rehydration is sufficient for DA neuron activation, we equipped mice with intragastric catheters for direct fluid infusion into the stomach28. Water infusion29 (1.2 ml over 12 min) resulted in delayed activation of many recorded neurons (Fig. 1d,e, Extended Data Fig. 1m,n and Extended Data Fig. 2). This occurred 14 ± 1 min after infusion onset (varying slightly with speed of infusion; Extended Data Fig. 1o) and persisted for 30 ± 0.7 min before gradually returning to baseline (Fig. 1f). The percentage of neurons activated and the magnitude of their activation were similar following self-paced drinking and intragastric infusion (Fig. 1e). Notably, this activation was not accompanied by gross changes in movement (Extended Data Fig. 1p), a smaller response was observed if the mice were not water-deprived beforehand (Extended Data Fig. 1q), and net inhibition was observed if hypertonic (300 mM NaCl) saline was infused instead (Fig. 1e), indicating that rehydration is necessary and sufficient for the DA neuron response.

Rehydration can cause changes in blood osmolality, volume and pressure, all of which influence thirst. We therefore independently manipulated these signals to determine which are responsible for DA neuron activation following water ingestion. Intraperitoneal injections of water and hypertonic saline resulted in the activation and inhibition, respectively, of many DA neurons (Fig. 1d,e), and the time course of these DA neuron responses tracked concurrent changes in blood osmolality (Fig. 1g). Injection of mannitol inhibited DA neurons similarly to equiosmotic hypertonic saline (indicating the response reflects changes in osmolality and not changes in sodium concentration; Extended Data Fig. 1r), and the DA neuron response occurred within seconds when salt was delivered intravenously (indicating that it reflects a systemic change; Extended Data Fig. 1s–t). By contrast, injections of polyethylene glycol or isoproterenol, which decrease blood volume and blood pressure, respectively27,30,31, caused much smaller DA neuron responses (Fig. 1e). Thus, many VTA-DA neurons specifically and bidirectionally track changes in systemic osmolality, revealing an unexpected role for fluid balance in controlling activity of the dopamine system.

Neural responses to water and nutrients

We next compared how DA neurons respond to water and nutrients. We first confirmed that consumption of the liquid diet Ensure by hungry mice resulted in transient activation of many DA neurons time-locked to licking3,4 (Extended Data Fig. 3a,b). To cleanly isolate post-ingestive signals, we recorded dopamine responses to infusion of Ensure directly into the stomach (in an amount (1.2 kcal) that approximates a moderately sized meal32 and inhibits hunger-promoting AgRP neurons33). This revealed that distinct DA neuron subsets are activated during nutrient infusion (10% of DA neurons, when nutrients enter the gastrointestinal tract) and afterward (13% of DA neurons; when most nutrients are absorbed into the blood; Extended Data Fig. 3c–e). This indicates that, relative to water, nutrients activate more DA neurons while in the gastrointestinal tract, but fewer after absorption into the bloodstream (Extended Data Figs. 1u and 3c,d).

We next compared how individual DA neurons respond to these different stimuli by aligning their responses across experiments (Fig. 2a). For drinking, individual neurons responded consistently to changes in fluid balance regardless of the method of fluid administration. For example, most neurons activated after intraperitoneal injection of water or self-paced drinking were also activated after intragastric infusion of water (Fig. 2e and Extended Data Fig. 4e). Neurons activated after intraperitoneal injection of water were correspondingly inhibited by injection of hypertonic saline (Fig. 2f). Similarly, for nutrients, the response of individual neurons after intragastric infusion of Ensure was correlated with their response after glucose injection or infusion (Extended Data Fig. 4f,h). In contrast to these consistent responses to systemic changes, there was no correlation in individual neural responses across stages of ingestion (for example, during versus after licking; Extended Data Fig. 4a–d) or between water and nutrients at the same stage (Fig. 2b–d). This reveals that there are subsets of VTA-DA neurons that are tuned to track nutrients or fluids at a specific stage of ingestion.

Fig. 2: Distinct dopamine subsystems track food and water ingestion.
figure 2

a, Maps of individual VTA-DA neurons tracked across experimental days during imaging. b, Example traces from neurons specifically responding to intragastric infusion (1.2 ml) of either Ensure or water. c, Left, proportion of neurons activated during intragastric infusion of Ensure and water. Right, individual neurons show no correlation in their response during intragastric infusion of water versus Ensure. d, Left, proportion of neurons activated from 0–20 min after the end of intragastric infusion of water or Ensure. Right, individual neurons show no correlation in their response after intragastric infusion of water versus Ensure. e, Left, example traces showing neurons activated after both intragastric infusion and intraperitoneal injection of water (1.2 ml). Middle, proportion of neurons activated by intraperitoneal and intragastric water. Right, the response of individual neurons to intraperitoneal water injection is positively correlated with their response to intragastric water injection. f, Left, example traces showing neurons that display opposite activity patterns after intraperitoneal water injection (1.2 ml) and hypertonic saline injection (3 M NaCl, 0.12 ml). Middle, proportion of neurons activated by intraperitoneal water and inhibited by intraperitoneal saline. Right, the responses of individual neurons to intraperitoneal water and intraperitoneal saline are negatively correlated. Data are mean ± s.e.m. Statistics are shown in Extended Data Table 2.

Pathway linking hydration signals to VTA

We next investigated how information about fluid balance is transmitted to the VTA. We first considered the lateral hypothalamus (LH), which is implicated in ingestive behaviour34,35 and sends a dense GABAergic (γ-aminobutyric acid-producing) projection to the VTA36 (that can activate VTA-DA neurons indirectly through inhibition of intervening GABAergic neurons in VTA37 (VTA-GABA neurons)). We prepared mice for imaging of GABAergic neurons in LH (LH-GABA neurons) and intragastric infusion and then recorded how these neurons respond to changes in fluid balance. Similar to VTA-DA neurons, many LH-GABA neurons were activated following water infusion (Extended Data Fig. 5a,b) and inhibited by injection of hypertonic saline (Extended Data Fig. 5c). To test whether the subset of LH-GABA neurons that specifically project to the VTA display these responses, we used a retrograde tracing strategy to image calcium dynamics in LH-GABA→VTA neurons, revealing that these neurons are also strongly activated following intragastric infusion of water (Extended Data Fig. 5d). Thus LH-GABA→VTA neurons track fluid balance and are poised to relay this information to the VTA.

To test whether this circuit transmits fluid balance information to the VTA (Fig. 3a), we first measured how activation of LH-GABA→VTA neurons influences the activity of VTA-GABA neurons. Optogenetic stimulation of LH-GABA terminals in the VTA combined with simultaneous imaging of VTA-GABA neuron cell bodies revealed that LH-GABA→VTA neuron activation induces strong and prolonged inhibition in the majority of VTA-GABA neurons (Extended Data Fig. 5e). This suggests that the natural activation of LH-GABA neurons by water would be sufficient to modulate VTA dynamics.

Fig. 3: A forebrain–hypothalamic pathway that conveys internal state information to the VTA.
figure 3

a, A model of a possible anatomic pathway connecting interoceptive neurons for water and nutrients to the VTA. b, Left, schematic of simultaneous microendoscope imaging of VTA-DA neurons and chemogenetic inhibition (with hM4Di) of LH-GABA neurons. Right, population responses (as defined in Fig. 1) for VTA-DA neurons activated (red) or inhibited (blue) by saline or CNO, and after water infusion following saline or CNO. c, Left, schematic of simultaneous microendoscope imaging of VTA-DA neurons and chemogenetic activation (with hM3Dq) of SFO thirst neurons. Middle, dynamics of individual VTA-DA neurons in response to water infusion after saline or CNO injection in sated mice. Right, population responses of VTA-DA neurons activated (red) or inhibited (blue) after intragastric infusion. d, Population responses of VTA-DA neurons activated (red) or inhibited (blue) after intraperitoneal injection of water. Dehydr., dehydrated. Data are mean ± s.e.m. Statistics are shown in Extended Data Table 2.

To test whether LH-GABA neurons are necessary for VTA-DA neurons to track changes in fluid balance, we targeted the inhibitory designer receptor exclusively activated by designer drugs (DREADD) hM4Di to LH-GABA neurons while imaging VTA-DA neurons. Infusion of water alone again caused strong activation of many DA neurons (Fig. 3b). Of note, silencing LH-GABA neurons before water intragastric infusion specifically blocked this subsequent VTA-DA neuron response (Fig. 3b). This suggests that LH-GABA neurons are the source of the signal that informs VTA-DA neurons about fluid balance (Fig. 3a).

Information about fluid balance enters the brain through dedicated interoceptive neurons including glutamatergic neurons in the subfornical organ (SFO) that are directly activated by dehydration27, drive thirst38,39,40,41,42,43, and are situated upstream of the LH in the thirst circuit40 (Fig. 3a). To investigate whether the SFO transmits fluid balance information to LH neurons and their VTA targets, we targeted the excitatory DREADD hM3Dq to thirst-promoting SFO neurons and imaged calcium responses in VTA-DA neurons. Injection of clozapine N-oxide (CNO) caused sated mice to drink voraciously, confirming SFO neuron activation, but CNO had only a subtle effect on VTA-DA neuronal activity at baseline (in the absence of water; Extended Data Fig. 6a), indicating that the SFO is not sufficient to drive VTA dopamine dynamics. By contrast, CNO potentiated the activation of VTA-DA neurons by subsequent administration of water, mimicking the effect of natural dehydration (Fig. 3c,d and Extended Data Fig. 1q). Similar to the SFO, stimulation of hunger-promoting AgRP neurons44,45,46 did not affect DA neuron activity at baseline but did modulate post-absorptive responses to internal nutrients (mimicking the effect of food deprivation; Extended Data Fig. 6c–f). Together, this indicates that SFO and AgRP neurons gate the magnitude of DA neuron responses to relevant changes in internal state but do not directly relay information about systemic hydration and nutrients.

To test whether this modulatory effect of SFO neurons on the VTA is conveyed through the LH, we again targeted hM3Dq to thirst-promoting SFO neurons and then imaged calcium dynamics in LH-GABA→VTA neurons. Chemogenetic stimulation of SFO neurons potentiated the activation of LH-GABA neurons by intragastric water infusion, similar to the effect of natural dehydration (Extended Data Fig. 6g) and as observed in VTA-DA neurons (Fig. 3c,d). Activating SFO neurons alone also caused a small but significant modulation of LH-GABA neuron activity at baseline (Extended Data Fig. 6g). Together, these findings reveal that SFO neurons modulate dopamine responses to water, at least in part, through effects on upstream LH-GABA neurons (Fig. 3a).

Dopamine release at stages of ingestion

To investigate how information about fluids and nutrients is transmitted from the VTA to downstream circuits, we prepared mice for intragastric infusion and fibre photometry recording of extracellular dopamine using GRAB-DA5 (Fig. 4a and Extended Data Fig. 7) in six densely innervated projection targets of VTA-DA neurons36—the infralimbic prefrontal cortex (IL), the basolateral amygdala (BLA), the dorsal striatum (DS), and three subdivisions of the nucleus accumbens (NAc) (lateral (lat), medial shell (mSh) and core). We also prepared mice for recordings in the VTA itself to measure local dopamine release47,48,49. We then measured dopamine release at these seven sites (Extended Data Fig. 8a) in response to an array of stimuli associated with ingestion, including self-paced eating and drinking as well as intragastric infusions of nutrients and fluids.

Fig. 4: Dopamine release at different VTA targets tracks different stages of ingestion.
figure 4

a, Schematic showing the setup and seven recording sites (red circles) for measuring dopamine release. b, Left, example recording from the mSh showing dopamine release during the oral phase of water ingestion (30 s after the start of licking). Right, mean dopamine release in each recorded region during this oral phase during water (blue) and Ensure (orange) consumption. c, Left, example recording from BLA showing dopamine release during gastrointestinal phase for Ensure (first 12 min after intragastric infusion starts). Right, mean dopamine release in each recorded region during this gastrointestinal phase during water and Ensure infusion. d, Left, example recording from VTA showing dopamine release during systemic phase for water (12 to 50 min after the start of intragastric infusion). Right, mean dopamine release in each recorded region during this systemic phase following water and Ensure infusion. e, Left, schematic of projection-specific imaging. Middle, mean responses of VTA-DA→BLA neurons and VTA-DA→mSh neurons during water intragastric infusion (gastrointestinal phase highlighted). Right, mean responses (population-weighted z-score) of activated neurons projecting to BLA and mSh. *P < 0.05. Data are mean ± s.e.m. Statistics are shown in Extended Data Tables 2 and 3.

This revealed that dopamine is released at different brain sites in a way that tracks the passage of nutrients and fluids through stages of ingestion (from the mouth to gastrointestinal tract to blood; Fig. 4b–d and Extended Data Table 3). We found that oral nutrients and fluids triggered dopamine release in many brain regions that was time-locked to licking of food and water, including in NAc, as shown previously4,5. Subsequent detection of water in the gastrointestinal tract was represented in multiple areas but not the NAc, whereas gastrointestinal nutrients triggered dopamine release in BLA alone (Fig. 4c). Of note, dopamine release in BLA ramped up over tens of seconds during drinking in a manner more consistent with gastric filling than immediate orosensory feedback (Extended Data Fig. 8f). We confirmed with projection-specific imaging that the differential dopamine release in NAc and BLA in response to gastrointestinal signals matches the cell body calcium dynamics of the VTA-DA neurons that project to these two areas (Fig. 4e and Extended Data Fig. 8e).

In addition to these oral and gastrointestinal responses, we observed a third, post-absorptive stage that was characterized by prolonged dopamine release in the VTA itself (Fig. 4d). This (presumably somatodendritic47,48,49) dopamine release gradually ramped up following either self-paced drinking or intragastric water infusion, remained elevated for tens of minutes, and was potentiated by prior water deprivation (Extended Data Fig. 8c). Dopamine release in VTA was also observed (but with a more rapid onset) following intraperitoneal injection of water (Extended Data Fig. 8d), and the time course of dopamine release by VTA-DA neurons in response to water administered by these various routes mirrored the calcium dynamics of a large subpopulation of VTA-DA neurons (Fig. 1), which in turn tracked systemic rehydration. In addition to the VTA, we also observed dopamine release in DS during and after intragastric infusion of water (Fig. 4c,d and Extended Data Fig. 8b,c,f). Together, these findings reveal that the dopamine system is organized such that different stages of ingestion preferentially trigger dopamine release in distinct subsets of downstream targets.

Role of dopamine in learning about fluids

Many animals obtain their water from diverse sources, including foods9,10,11,12,13,14,15, and therefore must learn which foods and fluids are rehydrating through ingestive experience. We considered the possibility that the activation of dopamine neurons by systemic rehydration could be involved in this learning process. Of note, although water rewards are widely used to train animals50, attempts to bypass normal drinking and drive operant behaviour with intragastric fluids alone have been unsuccessful51,52. However, we reasoned that changes in fluid balance might be more efficient at driving learning about oral cues such as flavours, since these two modalities are tightly coupled during normal ingestion.

To test this idea, we developed a closed-loop system for coupling licking to intragastric infusion, so that the flavour and rehydrating ability of an ingested solution could be independently varied (Fig. 5a; inspired by previous studies of nutrient flavour conditioning8,22,53,54,55,56). We programmed this system such that each lick of one flavoured solution triggered intragastric infusion of an equal volume of saline, and each lick of a differently flavoured solution triggered intragastric infusion of an equal volume of water. As a result, consumption of only one solution is rehydrating, but this cannot be initially anticipated on the basis of taste.

Fig. 5: Post-ingestive changes in fluid balance drive learning about fluids via VTA-DA neurons.
figure 5

a, Schematic of closed-loop system for fluid preference training. Mice are hydrated by consumption of one flavoured solution (flavour A) and mildly dehydrated by another (flavour B) via intragastric infusion of water or saline that is triggered by licking. b, Preference for flavour A before and after training. c, Changes in total consumption on the first and last days of training. d, Left, GRAB-DA fluorescence in mSh and BLA during consumption of the dehydrating solution on first and last training days. Right, summary plots of lick-triggered GRAB-DA responses on first and last training days with each solution. e, Inhibiting VTA-DA neurons during training selectively after water access has been removed (minutes 10–60) eliminates preference learning in mice expressing GtACR but not in mCherry controls. Data are mean ± s.e.m. Statistics are shown in Extended Data Table 4.

We first determined preferences at baseline by giving mice a two-bottle test with these flavours in the absence of intragastric infusion. Mice were then trained by providing isolated access to each solution (which now triggered intragastric infusion) for three one-hour sessions on consecutive days. After training, the mice were tested again with a two-bottle test in the absence of infusion to measure any learned changes in preference. This revealed that mice learn to strongly prefer solutions paired with water infusion, as measured by two-bottle test (Fig. 5b and Extended Data Table 4) and consumption during training (Fig. 5c and Extended Data Fig. 9a), which was accompanied by changes in consumption-triggered dopamine release in both NAc and BLA (Fig. 5d and Extended Data Fig. 10). This indicates that slow and delayed changes in fluid balance can drive robust learning and changes in dopamine release, when paired with an appropriate oral cue.

To test whether DA neuron activity is necessary for this learning process, we used the inhibitory opsin stGtACR2 to silence VTA-DA neurons throughout training, which blocked the acquisition of fluid preference (Extended Data Fig. 9b). However VTA-DA neurons are activated by both oral and post-ingestive signals (Fig. 1). To test specifically the function of post-ingestive DA neuron activity, we modified the training protocol so that mice had access to each fluid for only 10 min per training session (thereby separating in time water consumption from its post-absorptive effects, which begin approximately 10 min after the start of drinking) (Extended Data Fig. 1d). Mice robustly learned to prefer the flavour associated with water infusion using this new protocol (Extended Data Fig. 9c), which enabled us to test the role of post-ingestive signals by optogenetically silencing VTA-DA neurons only after water access had been removed. Silencing of VTA-DA neurons during this post-absorptive phase was sufficient to block the acquisition of learned preference (Fig. 5e). This reveals that the activation of VTA-DA neurons by systemic hydration is necessary for learning the consequences of fluid ingestion, even when this activation occurs after consumption has ceased.

Summary

Here we have shown that embedded within the mesolimbic dopamine system are multiple subsystems that track the internal, post-ingestive consequences of eating and drinking. We found that changes in fluid balance have particularly strong effects on DA neuron calcium dynamics, which led us to investigate how hydration signals are communicated to the dopamine system and used for learning. This revealed that GABAergic neurons in the LH relay information about systemic hydration to the VTA, whereas thirst-promoting neurons in the SFO control the gain of this signal. We further showed that dopamine is released in different downstream sites in response to detection of food and fluids at progressive stages of ingestion. We probed the function of these signals using a behavioural paradigm that uncouples the oral and systemic effects of ingested fluids, which revealed that post-ingestive rehydration alone can drive robust learning and that this requires VTA-DA neurons. This exposes an organizational logic whereby ingestion of food and water and their subsequent effects on internal state are differentially represented in the dopamine system and used for learning.

Previous studies of the dopamine system and fluids have focused on drinking and acute responses to water cues4,19,57,58. We examined changes in fluid balance over longer timescales and found that systemic dehydration and rehydration trigger the inhibition and activation, respectively, of many VTA-DA neurons. These responses track changes in blood osmolality, persist for tens of minutes, are independent of the method of fluid administration, and correlate with local dopamine release in the VTA. The function of somatodendritic dopamine release is poorly understood but is spatially localized, controlled by unique firing patterns and synaptic machinery47,49, and has the potential to gate the activity of specific DA neuron subsets and inputs47,59,60. Together these findings reveal that changes in fluid balance modulate not only DA neuron responses to water cues61, but also directly modulate the system as a whole.

In contrast to fluids, several studies have reported that ingested nutrients trigger dopamine release in striatum62,63,64,65,66, and we detected a subtle increase in dopamine in NAc mSh (but not core or lateral NAc or DS) after nutrients were delivered to the stomach (Fig. 4d). However, we found unexpectedly that intragastric nutrients triggered the highest level of dopamine release in BLA during both the gastrointestinal and systemic phase (Fig. 4c,d). The BLA is well known for processing nutrient information67 and previous work has shown that BLA lesions68 or pharmacology55 can block flavour learning. These findings prioritize further investigation of the VTA→BLA pathway to understand how internal nutrient signals drive learning about food.

Learning about foods and fluids requires bridging multiple timescales of signals. The dopamine system is well known for its role in learning relationships between external cues and gustatory rewards19,20, such as the sight of water and its taste. However, the taste of water is itself a cue that predicts a delayed change in fluid balance, and whether and how animals learn such relationships has been unclear. Here we have shown that animals can learn to associate tastes with delayed bodily rehydration, which activates VTA-DA neurons, and that this delayed activity is necessary for learning. This identifies a key pathway that enables animals to learn which foods and fluids to consume in order to remain hydrated. Further investigation of this circuitry may reveal principles for how the brain bridges the gap between transient cues associated with ingestion and delayed physiologic effects.

Methods

Experimental protocols were approved by the University of California, San Francisco Institutional Animal Care and Use Committee, following the NIH Guide for the Care and Use of Laboratory Animals.

Mouse strains

Experiments used adult mice (>6 weeks old) of both sexes, housed in temperature- and humidity-controlled facilities with 12-h light–dark cycle, and ad libitum access to water and standard chow (PicoLab 5053). We obtained DAT-ires-cre (B6.SJL-Slc6a3tm1.1(cre)Bkmn, Jackson cat. no. 006660) and Vgat-ires-cre (Slc32a1tm2(cre)Lowl, Jackson #016962) mice from Jackson Labs. Vgat-ires-flp knock-in mice (B6.Cg-Slc32a1tm2.1(flop)Hze) and Npy-ires-flp knock-in mice (B6.Cg-Npytm1.1(flop)Hze) from the Allen Institute for Brain Science. DAT-ires-cre knock-in mice were crossed with Vgat-ires-flp knock-in mice or with Npy-ires-flp knock-in mice to generate double mutants.

Behaviour

For all behaviour and recordings, mice were placed in sound-isolated behavioural chambers (Coulbourn Habitest Modular System) exclusively during the dark cycle. The chambers were cleaned between experiments to remove any remaining olfactory cues from previous experiments. All mice were habituated for at least 1 h to the behavioural chamber (with recording equipment and intragastric catheter simultaneously attached) before being used for any experiments on subsequent days. Mice were additionally re-habituated to the behavioural chamber for 10–20 min at the beginning of each testing session (during which the LED used for imaging was turned on, to reduce any initial bleaching artifacts at the beginning of the recording).

For lick response experiments, mice were either water-deprived (for experiments using water or 300 mM NaCl consumption) or food-deprived (for experiments using Ensure consumption) for 24 h prior to the experiment. Mice were then given access to a lickometer containing the appropriate solution (water, Ensure, or 300 mM NaCl solutions) for a total of 5 min, which was defined as beginning with the first lick bout (to control for the fact that some mice had a longer latency to drink). Access was terminated by removing the bottle from the chamber, with care to prevent any remaining olfactory cues (for example, by cleaning any drops). Experiments measuring responses to consumption of 300 mM NaCl were performed only on naive mice, because animals can learn to avoid hypertonic solutions after a single experience69. All mice were habituated initially to the lickometer and recording setup by providing access to a bottle containing water for one hour with the microendoscope camera attached.

Intraperitoneal injections were performed on the right side of the mouse. For recording responses to intraperitoneal injections alone, recordings continued for 30 min following injection. For recording response modulation by DREADD activation, CNO injection was followed by subsequent intragastric infusion or intraperitoneal injection after 5 min (see below). We used the following doses as indicated in the figure legends: 1.2 ml water, 0.6 ml 50% glucose, 0.12 ml 3 M NaCl, and 1.2 ml 154 mM NaCl (isotonic saline). Mice were given a sham intraperitoneal injection one day before being used for these experiments to habituate the mice.

Intravenous injections were performed by injecting hypertonic saline (100 μl, 1 M NaCl) into the lateral tail vein, while the mouse was kept in a custom-made restraint system that allows for concurrent imaging. Mice were habituated for 30 min to the setup before the experiment began. For recording responses to intravenous injections, recordings continued for 30 min following injection. The animals were not anaesthetized during these experiments.

Intragastric infusions were delivered at a rate of 100 or 200 μl min−1 using a syringe pump (Harvard Apparatus 70–2001), for 6 or 12 min (resulting in either 0.6 or 1.2 ml total infused volume). Solutions of NaCl (154 or 300 mM), glucose (25%) and Ensure were prepared using deionized water. We previously measured the latency for fluids to pass through the intragastric catheter itself as approximately 13 s at an infusion rate20 of 200 μl min−1. For infusion experiments, the intragastric catheter was attached to the syringe pump using plastic tubing and adapters (AAD04119, Tygon; LS20, Instech) before mice were placed into the behavioural chamber.

Vagal defferentation was performed by injecting mice prepared for microendoscopic imaging of VTA-DA neurons (see below section) with 50 mg kg−1 capsaicin. Mice were kept under anaesthesia with isoflurane for 1 h starting immediately before injection to avoid unnecessary pain, according to previously published protocols70. Efficacy of deafferentation was determined by testing number of eye wipes in the 15 s after ocular delivery of 0.1% capsaicin (compared with mice which underwent the same deafferentation surgery but received a saline injection; Extended Data Fig. 5f).

Intragastric catheterization

Intragastric catheters were installed following our published protocols20,24. In brief, sterile access veterinary catheters (C30PU-RGA1439, Instech Labs) were attached to sterile vascular access buttons (VABM1B/22, 22, Instech Labs). Mice were anaesthetized with ketamine-xylazine, the catheter was surgically implanted into the avascular stomach, and the port on the access button was secured to the mouse’s back (with the port facing out, that is, dorsally). A protective aluminium cap (VABM1C, Instech Labs) was placed over the port to protect it between experiments. Mice were allowed one week to recover following intragastric surgery before the start of experiments.

Preparation of mice for microendoscopy

Mice were prepared for microendoscope recordings using the general procedures we have reported20. In brief, in the first surgery mice were injected with an adeno-associated virus (AAV) expressing a GCaMP and a GRIN lens was lowered into the brain. Four weeks later, mice underwent a second surgery in which a baseplate (Inscopix 100-000279) was placed above the lens and affixed with adhesive cement (MetaBond) and then covered after surgery with a baseplate cover (Inscopix 100-000241). Most animals then underwent a third surgery to install an intragastric catheter for fluid infusions into the stomach. The details for each cohort are below.

Microendoscope imaging of VTA-DA neurons

DAT-cre mice (n = 14) were prepared for imaging by injecting AAV5-Syn-FLEX-GCaMP6f-WPRE-SV40 (300 nl; 7.2 × 1012 viral genome copies (vg) ml−1; Addgene) into the left VTA (−3.1 mm AP, +0.5 mm ML, −4.5 mm DV) and installing a GRIN lens (6.1 × 0.5 mm; Inscopix 1050-004610) 0.15 mm above the injection site in the same surgery. In subsequent surgeries, each mouse was baseplated and then equipped with an intragastric catheter.

Microendoscope imaging of LH-GABA neurons

VGAT-cre mice (n = 5) were prepared for imaging by injecting AAV5-Syn-FLEX-GCaMP6f-WPRE-SV40 (300 nl; 7.2 × 1012 vg ml−1; Addgene) into the left LH (−1.5 mm AP, +1.0 mm ML, −5.1 mm DV) and installing a GRIN lens (8.3 × 0.5 mm; Inscopix 1050-004611) 0.15 mm above the injection site in the same surgery. In subsequent surgeries, each mouse was baseplated and then equipped with an intragastric catheter

Microendoscope imaging of LH-GABA→VTA neurons

VGAT-cre mice (n = 3) were prepared for imaging by injecting AAV1-Ef1a-fDIO-GCaMP6m (300 nl; 2 × 1012 vg ml−1; Janelia Vector Core) into the left LH (−1.5 mm AP, +1.0 mm ML, −5.1 mm DV), CAV2-Flx-Flp (300 nl; 6 × 1012 vg ml−1; Plateforme de Vectorologie) into left VTA (−3.1 mm AP, +0.5 mm ML, −4.5 mm DV) and installing a GRIN lens (8.3 × 0.5 mm; Inscopix 1050-004611) 0.15 mm above the LH injection site. In subsequentsurgeries, each mouse was baseplated and then equipped with an intragastric catheter.

Microendoscope imaging of VTA-GABA neurons and simultaneous optogenetic activation of LH-GABA neuron terminals

VGAT-cre mice (n = 3) were prepared for imaging by injecting AAV5-hSyn-DIO-ChrimsonR-tdTomato (300 nl; 4.4 × 1012 vg ml−1; Addgene) in the left LH (−1.5 mm AP, +1.0 mm ML, −5.1 mm DV); AAV5-Syn-FLEX-GCaMP6f-WPRE-SV40 (300 nl; 7.2 × 1012 vg ml−1; Addgene) in the left VTA (−3.1 mm AP, +0.5 mm ML, −4.5 mm DV) and installing a GRIN lens (6.1 × 0.5 mm; Inscopix 1050-004610) 0.15 mm above the injection site in the same surgery. To stimulate during recording, a 620 nm LED was delivered through the nVoke 2.0 camera (15 mW mm−2 LED power, 20 Hz pulse frequency, 1 ms pulse width, 2 s ON and 3 s OFF cycle).

Microendoscope imaging of VTA-DA neurons and simultaneous LH-GABA neuron inhibition

DAT-cre::VGAT-Flp mice (n = 6) were prepared for imaging by injecting AAVDJ-hSyn-fDIO-hM4Di-mCherry (400 nl; 1.1 × 1013 vg ml−1; Stanford) bilaterally into the LH (−1.5 mm AP, ± 1.0 mm ML, −5.1 mm DV); AAV5-Syn-FLEX-GCaMP6f-WPRE-SV40 (300 nl; 7.2 × 1012 vg ml−1; Addgene) into the left VTA (−3.1 mm AP, +0.5 mm ML, −4.5 mm DV); and installing a GRIN lens (6.1 × 0.5 mm; Inscopix 1050-004610) 0.15 mm above the injection site in the same surgery. In subsequent surgeries, each mouse was baseplated and then equipped with an intragastric catheter.

Microendoscope imaging of VTA-DA neurons and simultaneous SFO-Glut neuron activation

DAT-cre mice (n = 3) were prepared for imaging by injecting AAV2-CamKIIa-HA-hM3Dq-ires-mCitrine (100 nl; 2 × 1012 vg ml−1; UNC Vector Core) into the SFO (−0.6 mm AP, 0 mm ML, −2.8 mm DV); AAV5-Syn-FLEX-GCaMP6f-WPRE-SV40 (300 nl; 7.2 × 1012 vg ml−1; Addgene) into the left VTA (−3.1 mm AP, +0.5 mm ML, −4.5 mm DV); and installing a GRIN lens (6.1 × 0.5 mm; Inscopix 1050-004610) 0.15 mm above the injection site in the same surgery. To confirm functional expression of hM3D, mice were injected with either CNO or saline (100 μl) and then were given access to water for 5 min (Extended Data Fig. 6a). In subsequent surgeries, each mouse was baseplated and then equipped with an intragastric catheter

Microendoscope imaging of VTA-DA neurons and simultaneous AgRP neuron activation

DAT-cre::NPY-Flp mice (n = 3) were prepared for imaging by injecting AAV1-Ef1a-fDIO-hM3Dq-mCherry (200 nl; 3 × 1012 vg ml−1; Stanford) into the ARC bilaterally (−1.75 mm AP, ± 0.2 mm ML, −5.9 mm DV); AAV5-Syn-FLEX-GCaMP6f-WPRE-SV40 (300 nl; 7.2 × 1012 vg ml−1; Addgene) into the left VTA (−3.1 mm AP, +0.5 mm ML, −4.5 mm DV), and installing a GRIN lens (6.1 × 0.5 mm; Inscopix 1050-004610) 0.15 mm above the injection site in the same surgery. To confirm functional expression of hM3D, mice were injected with CNO or saline (100 μl) and consumption of Ensure was recorded for 5 min (Extended Data Fig. 6c). In subsequent surgeries, each mouse was baseplated and then equipped with an intragastric catheter

Microendoscope imaging of LH-GABA→VTA neurons and simultaneous SFO-Glut neuron activation

VGAT-cre mice (n = 4) were prepared for imaging by injecting AAV2-CamKIIa-HA-hM3Dq-ires-mCitrine (100 nl; 2 × 1012 vg ml−1; UNC Vector Core) into the SFO (−0.6 mm AP, 0 mm ML, −2.8 mm DV), AAV1-Ef1a-fDIO-GCaMP6m (300 nl; 2 × 1012 vg ml−1; Janelia Vector Core) into the left LH (−1.5 mm AP, +1.0 mm ML, −5.1 mm DV), and CAV2-Flx-Flp (300 nl; 6 × 1012 vg ml−1; Plateforme de Vectorologie) into left VTA (−3.1 mm AP, +0.5 mm ML, −4.5 mm DV). A GRIN lens (8.3 × 0.5 mm; Inscopix 1050-004611) was implanted 0.15 mm above the LH injection site in the same surgery. In subsequent surgeries, each mouse was baseplated and then equipped with an intragastric catheter

Microendoscope imaging of VTA-DA→NAc mSh neurons

DAT-cre mice (n = 3) were prepared for imaging by injecting AAV1-Ef1a-fDIO-GCaMP6m (300 nl; 2 × 1012 vg ml−1; Janelia Vector Core) into the left VTA (−3.1 mm AP, +0.5 mm ML, −4.5 mm DV) and CAV2-Flx-Flp (100 nl; 6 × 1012 vg ml−1; Plateforme de Vectorologie) into left NAc mSh (+1.3 mm AP, +0.5 mm ML, −4.4 mm DV). A GRIN lens (6.1 × 0.5 mm; Inscopix 1050-004610) was implanted 0.15 mm above the VTA injection site in the same surgery. In subsequent surgeries, each mouse was baseplated and then equipped with an intragastric catheter

Microendoscope imaging of VTA-DA→BLA neurons

DAT-cre mice (n = 3) were prepared for imaging by injecting AAV1-Ef1a-fDIO-GCaMP6m (300 nl; 2 × 1012 vg ml−1; Janelia Vector Core) into the left VTA (−3.1 mm AP, +0.5 mm ML, −4.5 mm DV) and CAV2-Flx-Flp (200 nl; 6 × 1012 vg ml−1; Plateforme de Vectorologie) into left BLA (−1.8 mm AP, +2.9 mm ML, −4.7 mm DV). A GRIN lens (6.1 × 0.5 mm; Inscopix 1050-004610) was implanted 0.15 mm above the VTA injection site in the same surgery. In subsequent surgeries, each mouse was baseplated and then equipped with an intragastric catheter.

Microendoscope recordings

Microendoscopy videos were acquired at 8 Hz (0.6–0.8 mW mm−2 455 nm LED power, 8.0 gain, 2× spatial downsampling) using Inscopix software (Data Acquisition Software v. 151; https://support.inscopix.com/support/products/nvista-30-and-nvoke-20/data-acquisition-software-v151). After acquisition, videos were first pre-processed, spatially (binning factor of 2) and temporally (binning factor of 2) downsampled, put through a spatial bandpass filter (to remove noise and out-of-focus cells), and motion-corrected using Inscopix Data-Processing Software (v1.3.1, https://support.inscopix.com/support/products/data-processing-software/inscopix-data-processing-v131). Videos were removed if excessive motion (larger than the diameter of the average neuron in any direction) occurred that could not be addressed by additional motion-correction. Activity traces for individual neurons were then extracted from these videos using the constrained non-negative matrix factorization (CNMF-E) pipeline (http://www.github.com/zhoupc/cnmfe) implemented in MATLAB. After initial CNMF-E segmentation, extracted neurons were manually refined to avoid uncorrected motion artefacts, region of interest duplication and over-segmentation of the same spatial components. Neurons were removed if large bleaching artefacts (which fit a defined exponential decay function) occurred during the 10 min baseline period. For each experiment, activity traces for individual neurons were extracted from recordings from 3–6 mice and then pooled for subsequent analysis. We could readily align cells between recording sessions separated by two weeks. This relied on custom software combined with manual verification of all alignments.

Head acceleration was acquired using Inscopix software (Data Acquisition Software v. 151) from the 3-axis accelerometer built into the nVoke/nVista cameras, which provided xyz acceleration data at 50 Hz temporal resolution.

Fluid consumption was monitored with a capacitive lickometer and recorded using the nVista/nVoke (v. 3.0 nVista system; v. 2.0 nVoke system; https://support.inscopix.com/support/products/nvista-30/nvista-30) data acquisition systems and software (Data Acquisition Software v. 151; https://support.inscopix.com/support/products/nvista-30-and-nvoke-20/data-acquisition-software-v151) during microendoscope imaging experiments.

Dopamine photometry

Wild-type mice (C57BL/6J, Jackson cat. no. 000664) were prepared for photometry recordings by injecting AAV9-hSyn-GRAB-DA1h (200 nl; 1.8×1013 vg ml−1; Janelia Vector Core) into the following sites: left VTA (n = 10 mice; −3.1 mm AP, +0.5 mm ML, −4.5 mm DV), BLA (n = 12 mice; −1.8 mm AP, +2.9 mm ML, −4.7 mm DV), IL PFC (n = 13 mice; +1.7 mm AP, +0.3 mm ML, −2.85 mm DV), DS (n = 8 mice; +1.5mm AP, +1.5mm ML, −3.5mm DV); NAc mSh (n = 14 mice; +1.3 mm AP, +0.5 mm ML, −4.4 mm DV), NAc core (n = 7 mice; +1.4 mm AP, +1.0 mm ML, −4.5 mm DV), or lateral NAc (n = 8 mice; +1.0 mm AP, +1.75 mm ML, −5.0 mm DV). In the same surgery, an optical fibre (0.4 mm inner diameter by 3.5, 5.4, or 6.3 mm length; Doric Lenses, MFC_400/430-0.48) was installed 0.1 mm above the injection site. After allowing at least one week to recover from intracranial surgery, mice then underwent a second surgery to install an intragastric catheter as described above.

For GRAB-DA signal acquisition, implanted mice were tethered to a patch cable (Doric Lenses, MFP_400/460/900-0.48_2m_FCM-MF2.5). Continuous 6 mW blue LED (470 nm) and UV LED (405 nm) served as excitation light sources. These LEDs were driven by a multichannel hub (Thorlabs), modulated at 211 Hz and 511 Hz respectively, and delivered to a filtered minicube (Doric Lenses, FMC6_AE(400–410)_E1(450–490)_F1(500–540)_E2(550–580)_ F2(600–680)_S) before connecting through optic fibres (Doric Lenses, MFC_400/430-0.48). GRAB-DA GFP signals and UV isosbestic signals were collected through these same fibres into a femtowatt silicon photoreceiver (Newport, 2151). Digital signals were sampled at 1.0173 kHz, demodulated, lock-in amplified, sent through a processor (RZ5P, Tucker-Davis Technologies), and collected by Synapse (TDT). After the experiment, these data was exported via Browser (TDT), and in MATLAB temporally downsampled to 4 Hz. All plotted photometry traces in this paper are an average of two replicate traces for the same mouse (performed within 2 weeks of each other), with the exception for 300 mM NaCl consumption which can only be tested once when mice are naive. In some cases, mice were removed from the study due to health issues before they could be tested with all stimuli, and as a result some pairwise comparisons are not possible for every mouse in the cohort.

Fluid consumption was also monitored with an electrical lickometer and recorded using software Synapse (TDT), and afterwards exported via Browser (TDT), and analysed in MATLAB.

For GRAB-DA photometry recording during fluid preference training, access to the flavoured solutions was restricted during a baseline period of 10 min at the beginning of the recording (this was in addition to the 10–20 min acclimatization period previously mentioned).

Chemogenetics

We prepared mice for in vivo chemogenetic activation or inhibition as described above. CNO (1 mg kg−1, 100 μl) or vehicle (0.6% DMSO in saline) was delivered by intraperitoneal injection.

Fluid preference training

Mice were continuously water restricted by providing 1 ml of water per day (in addition to water obtained during testing and training) and were removed from the study if their body weight fell below 85% of the initial body weight. Mice were tested and trained using a ten-day protocol based on similar procedures for nutrient flavour conditioning22. In brief, the initial preference for the solutions was determined using a two-bottle test over the first two days. Training occurred over the next six days, after which preference was reassessed. Mice were acclimatized to the behavioural chamber for 10–20 min before flavoured solutions became accessible. Approximately equal number of female and male mice were used for all fluid preference training experiments. Catheters for intragastric infusion were attached to the mice during all experiments (including two-bottle tests). Mice were taken off water restriction immediately after the ten-day training protocol and were allowed one week to recover.

During training, mice were given isolated access to one of two flavoured solutions, which triggered intragastric infusion when consumed. Mice were separated out into four groups. For the first three days of training, the first group was given 1 h access to one solution containing 0.05% unsweetened Grape Kool-Aid (Kraft Foods) mixed with 0.025% Saccharin. Consumption of this solution, measured using an electrical lickometer, triggered 1 μl intragastric infusion of 600 mM NaCl. For the next three consecutive days, the solution was replaced with a solution containing 0.05% unsweetened Lemon-Lime Kool-Aid (Kraft Foods) mixed with 0.025% Saccharin, which triggered 1 μl intragastric infusion of water when consumed. The second group went through the same training, but the order of the flavours was reversed. The third and fourth group went through the same protocols as groups one and two respectively, but instead grape was associated with water infusion and lime was associated with 600 mM NaCl infusion. In brief, the groups were as follows. Group 1: grape→NaCl infusion (days 1–3); lime→water infusion (days 4–6); group 2: lime→water infusion (days 1–3); grape→NaCl infusion (days 4–6); group 3: grape→water infusion (days 1–3); lime→NaCl infusion (days 4–6); group 4: lime→NaCl infusion (days 1–3); grape→water infusion (days 4–6).

Initial and acquired preferences were determined using two-bottle tests on two subsequent days before and after training (four days total). Flavoured solution placement (front or back of the cage) was randomized on the first day and reversed on the second day of the two-bottle test.

For two-bottle tests, mice were given 1 h access to two solutions containing 0.05% unsweetened Kool-Aid, either lemon-lime or grape (Kraft Foods), mixed with 0.025% Saccharin. Preference for the lime solution was calculated using the formula (lime licks/total licks). Fluid consumption was monitored with an electrical lickometer and recorded using software Synapse (TDT), and afterwards exported via Browser (TDT), and analysed in MATLAB.

For some experiments (Fig. 5e and Extended Data Fig. 9c) access was given for a limited time during training. These experiments were done according to the same protocol above, but access to the flavoured solution was removed 10 min after the first lick during each training day.

For VTA-DA silencing throughout fluid preference training (Extended Data Fig. 9b), AAV8-hSyn-DIO-stGtACR2-fRED (400 nl, 7.9 × 1012 vg ml−1; Stanford) or AAV5-Ef1a-DIO-mCherry (400 nl, 7.3 × 1012 vg ml−1; UNC Vector Core) was injected into the VTA bilaterally (−3.1 mm AP, ± 0.5 mm ML, −4.5 mm DV) and an optical fibre with a 200-μm inner diameter (Thorlabs FT200UMT, CFLC230-10) was placed 0.30 mm above and between the injection sites (−3.1 mm AP, 0 mm ML, −4.2 mm DV) in the same surgery in DAT-cre mice (n = 11 mice). During the training period, a DPSS 473-nm laser (Shanghai Laser and Optics Century BL473-100FC) was controlled by Graphic State software (v.4.2, http://www.coulbourn.com/category_s/363.html) through a TTL signal generator (Coulbourn H03-14) and synchronized with bottle availability. The laser power was measured to be ~1–2 mW at the patch cable tip and was delivered continuously for the experimental hour.

For delayed VTA-DA silencing during fluid preference training (Fig. 5e), AAV8-hSyn-DIO-stGtACR2-fRED (400 nl, 7.9 × 1012 vg ml−1; Stanford) or AAV5-Ef1a-DIO-mCherry (400nl, 7.3 × 1012 vg ml−1; UNC Vector Core) was injected into the VTA bilaterally (−3.1 mm AP, ± 0.5 mm ML, −4.5 mm DV), and two optical fibres with a 200-μm inner diameter (Thorlabs FT200UMT, CFLC230-10) were placed at angle 100 μm away from the 2 target sites in the same surgery in DAT-cre mice (n = 12 mice). During the training period, a DPSS 473-nm laser (Shanghai Laser and Optics Century BL473-100FC) was turned on 10 min after the first lick during each training day. Immediately prior to the laser turning on, access to the solution was removed, such that silencing did not overlap with consumption. The laser power was measured to be ~1–2 mW at the patch cable tip and was delivered continuously for the remainder of the experimental hour.

Plasma osmolality measurements

Mice received an intraperitoneal injection (1.2 ml water or 0.12 ml 3 M NaCl). Blood (250 μl) was collected EDTA-coated capillary tubes (RAM Scientific 07-6011) from the right cheek 5 min before the injection and from the left cheek at a specific timepoint following the injection (0 min, 5 min, 10 min, 15 min, 20 min, 25 min or 30 min). The blood collection process took on average 30 s per mouse (samples were thrown out if collection took over 2 min). The blood was centrifuged (1,000g for 30 min), and the supernatant was removed and again centrifuged (10,000g for 30 min) to isolate plasma. Plasma quality was graded according to colour and samples were thrown out with a lightness under 70% (see the colour #ff6666 for reference). Plasma osmolality was immediately measured in duplicate for each sample using a freezing-point osmometer (Fiske Associates 210). The difference between the osmolalities of the two samples was used for analysis. Mice were allowed one week for recovery between samples.

Histology

Mice were transcardially perfused with PBS followed by 10% formalin. Whole brains were dissected, and kept in 10% formalin overnight at 4 °C. The next day, the brains were transferred to 30% sucrose for overnight cryo-protection at 4 °C. Sections (40 μm) were prepared with a cryostat. To visualize fluorescent labelling, these sections were mounted with DAPI Fluoromount-G (Southern Biotech) and then imaged with the confocal microscope without staining. Images underwent minimal processing using ImageJ (v.1.53e).

Data analysis

We analysed behaviour data, fibre photometry data and microendoscope imaging data using custom MATLAB (v.R2020b, http://www.mathworks.com/products/matlab) scripts.

For microendoscope imaging analysis, all responses were normalized using the function z = (Craw − μ)/σ, where Craw is an output of the CNMF-E pipeline, μ is mean Craw during the baseline period (first 10 min) and σ is the standard deviation of Craw during that same baseline period. For action potential analysis, the inferred spike rate (S; output of CNMF-E pipeline) was used. For baseline fluorescence analysis, Craw was put through a 1/60 Hz lowpass filter (which removes all changes occurring faster than 1 min).

For photometry analysis, all responses were normalized using the function: ΔF/F0 = (F − F0)/F0, where F is the raw photometry signal and F0 is the fluorescence predicted using the signal obtained with 405 nm excitation (using a linear regression model of both signals during the 10 min baseline period; Extended Data Fig. 7a–c). For data presentation, plotted traces were additionally downsampled to 1 Hz (this was done to decrease the size of each graph).

For quantification of activity at different timescales of ingestion, certain epochs were defined for oral, gastrointestinal, and systemic stages of ingestion. These epochs were updated after analysing the rise times of each response in initial recordings. Neurons were considered activated during these epochs, if their mean change of activity during the epoch exceeded +1z (and, in the case of Extended Data Fig. 3c, was greater than the mean change of activity during other epochs).

Oral (lick) responses were defined for microendoscope recordings as the average z-scored change of activity in the 30 s following the start of the first licking bout. For GRAB-DA recordings, lick (oral) responses were defined as the average ΔF/F0 change of fluorescence in the 30 s following the start of the first licking bout. Throughout the paper, a drinking bout is defined as any set of licks lasting ten or more seconds in which no inter-lick interval is greater than two seconds. For fluid preference training, all lick bouts for a single mouse were averaged and treated as a single replicate.

Gastrointestinal responses were defined as average changes of activity occurring in the 12 min after the start of intragastric infusion (based on the length of most infusions in this paper, as well as rise time of systemic response).

Systemic (absorptive) responses were initially defined (Fig. 1) as average changes of activity occurring after solution access was removed or intragastric infusion and intraperitoneal injection ended. Based on subsequent analysis of rise time (10–14 after the start of drinking and intragastric infusion), and to ensure systemic responses were distinct from those during the gastrointestinal phase, systemic (absorptive) responses were redefined as average changes of activity occurring 12–32 min after the start of intragastric infusion or first lick bout for microendoscopic recordings (or 12–50 min after the start of intragastric infusion or first lick bout for photometry recordings). In both photometry and microendoscopic recordings, systemic responses were defined as 0–30 min after intraperitoneal injection. Rise time was calculated as the time it takes an activated or inhibited neuron to reach 50% of its peak activity change in a sigmoidal fit. A neuron was considered inhibited during a particular epoch if the average change of activity was more negative than −1z, and activated if the average change of activity was more positive than +1z.

Head acceleration was defined as the rectified sum of acceleration in all axes from the accelerometer positioned on the nVista/nVoke camera (see ‘Microendoscope recordings’). This summed signal was filtered at 5 Hz with a third-order zero-phase Butterworth filter (to remove transients). Acceleration below a threshold (defined by Otsu’s method) was used to distinguish movement from rest.

Throughout this Article, values are generally reported as mean ± s.e.m. (error bars or shaded area). In figures with simple linear regressions, shaded areas represent the 95% confidence interval for the line of best fit. Except for linear regressions, nonparametric tests were uniformly used. P values for paired and unpaired comparisons were calculated using two-sided permutation tests (10,000 iterations or exact when possible). P values for comparisons across multiple groups were initially assessed using ANOVA but reported as values from two-sided permutation tests. Occasionally, one-sided permutation tests were performed when a particular outcome was clearly expected from experiments done earlier in the paper (one-sided tests were used for Fig. 5e and Extended Data Fig. 9b, and throughout Fig. 4 and Extended Data Fig. 8). For the main results in Fig. 1, intra-class correlations71 (= variance between mice/total variance) and linear-mixed model effects were calculated (Extended Data Table 1) to ensure the effects were not due to outliers originating from one mouse. Power calculations were used to predetermine sample size when prediction of effect size was possible based on previous experiments (for example, a power calculation was used for Fig. 5e but not for Fig. 5b). The experiments were not randomized. The investigators were blinded to allocation during experiments and outcome assessment during the two VTA-DA silencing experiments.

Reporting summary

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