A Hypothalamic Circuit Underlying the Dynamic Control of Social Homeostasis

Summary Social grouping increases survival in many species, including humans1,2. By contrast, social isolation generates an aversive state (loneliness) that motivates social seeking and heightens social interaction upon reunion3–5. The observed rebound in social interaction triggered by isolation suggests a homeostatic process underlying the control of social drive, similar to that observed for physiological needs such as hunger, thirst or sleep3,6. In this study, we assessed social responses in multiple mouse strains and identified the FVB/NJ line as exquisitely sensitive to social isolation. Using FVB/NJ mice, we uncovered two previously uncharacterized neuronal populations in the hypothalamic preoptic nucleus that are activated during social isolation and social rebound and that orchestrate the behavior display of social need and social satiety, respectively. We identified direct connectivity between these two populations of opposite function and with brain areas associated with social behavior, emotional state, reward, and physiological needs, and showed that animals require touch to assess the presence of others and fulfill their social need, thus revealing a brain-wide neural system underlying social homeostasis. These findings offer mechanistic insight into the nature and function of circuits controlling instinctive social need and for the understanding of healthy and diseased brain states associated with social context.

to the previously identified nodes underlying social reward, specific hypothalamic circuits may exist that underlie social homeostasis.
Work described here uncovers the identity and function of distinct genetically defined populations of neurons in the mouse hypothalamus that encode social need and social satiety.
Circuit tracing and functional analyses identify associated brain-wide neural networks underlying the homeostatic control of social grouping and point to the sense of touch as the sensory modality that informs animals about their social context. Our findings provide new insights into the neural basis of instinctive social drive and may provide new avenues to the understanding of social behavior in normal and pathological contexts.

Social rebound as a behavioral manifestation of social homeostasis
Laboratory mice prefer grouped over isolated housing 19,23 , providing an attractive experimental system to investigate the neural underpinnings of social need. Sibling cage mates (4-5 weeks) were separated and singly housed for up to 5 days, and the subsequent rebound in social interaction during reunion was quantified as a proxy for the underlying social need (Fig. 1a,   b). Experiments were performed in adult female mice to avoid interfering behaviors such as aggression or mating seen in males. We examined 6 distinct mouse strains to assess their respective levels of social drive. Most strains tested displayed significant rebounds in social from unique features in the genetic background of the FVB strain that are distinct from their impaired vision.
Together, these results show that short-term social isolation/reunion assays in FVB females offer a robust and naturalistic paradigm to investigate the neurobiological mechanisms underlying social need.

Identification of candidate neurons underlying social homeostasis
The hypothalamus is a control hub for physiological homeostasis, such that activation of specific hypothalamic populations drives distinct motivated behaviors associated with physiological needs and their satiation [13][14][15][16][17][18] . The observed rebound in social interaction following social deprivation suggests that similar homeostatic circuits may exist in the hypothalamus to control social need and satiety. To explore this hypothesis, we performed microendoscopy calcium imaging of neuronal activity in the medial preoptic nucleus (MPN), a hypothalamic nucleus involved in the control of social behavior 28, 29 . Pan-neuronal MPN imaging in freely interacting mice undergoing social isolation and subsequent reunion (Fig. 2a Video 2). Strikingly, neuronal ensembles active during social isolation were promptly inhibited upon social reunion and then re-activated upon removal of the social partner ( Fig. 2c, d, Cluster #3). This population, referred to as MPN Isolation neurons (26 ± 4% of responsive neurons), appears to track the animal's isolation state, thus representing a promising candidate population to signal social need. In addition, we observed populations of neurons activated during reunion with distinct temporal dynamics (Fig. 2c, d, Cluster #1 and #2), referred to as MPN Reunion neurons (74 ± 4% of responsive neurons), which may convey signals associated with social reunion. Principal component analysis (PCA) of ensemble activity across all simultaneously imaged neurons revealed a trajectory with an instantaneous change of representation upon reunion after isolation, and a slow shift back to an isolation state after removal of the social partner (Fig. 2e, f).
To molecularly identify candidate hypothalamic populations underlying the control of social need and satiety, we took advantage of the induction of the immediate early gene Fos as a readout of neuronal activity following behavior. Specifically, we used the activity-based and tamoxifen-inducible Cre line TRAP2 17 crossed to the reporter line Ai9 to label integrated activity across several hours during social isolation (Fig. 2g) as well as Fos in situ hybridization to visualize transiently activated neurons during social rebound (Fig. 2h). Importantly, isolationactivated neurons in the MPN were not activated by group housing, restraint stress or food deprivation (Extended Data Fig. 2c). To precisely identify MPN isolation and reunion neurons, we sought to assign these populations to our recently established spatial transcriptomic cell-type atlas in the preoptic region 29 . Using in situ hybridization, we examined the overlap between Fos To assess the activity of MPN Isolation neurons in a cell-type specific manner, we performed microendoscopy calcium imaging of MPN Mc4r+ neurons in animals exposed to different behavioral regimens ( Fig. 2i-q). The majority of MPN Mc4r+ neurons were activated by social isolation and inhibited upon social reunion (67 ± 8% of responsive neurons, ~2.5-fold enrichment compared to pan-neuronal recording) (Fig. 2k-n and Extended Data Fig. 2d, e), and did not show significant . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint (which this version posted May 19, 2023. ; https://doi.org/10.1101/2023.05. 19.540391 doi: bioRxiv preprint activity in group housed animals (Fig. 2o), thus confirming their identity as the MPN Isolation population. Neither tail suspension nor eating significantly modulated the activity of the MPN Isolation population (Fig. 2p, q), suggesting lack of activation by general stress, salient stimuli or other physiological need. When monitoring the neural activity of MPN Isolation neurons, we noticed a gradual increase of activity over minutes in the initial phase of isolation, suggesting an integration of social context (Extended Fig. 2e).

Functional characterization of MPN Isolation neurons
To examine the functional contribution of MPN Isolation neurons in the emergence of social need leading to social rebound, we used optogenetic approaches to manipulate their activity and monitored corresponding behavioral changes. To specifically target MPN Isolation neurons, we expressed Cre-and Flp-dependent ChR2 (Con/Fon-ChR2) in TRAP2/Vglut2-Flp mice in which the expression of Cre recombinase is induced by injection of 4-hydroxytamoxifen (4-OHT) during social isolation (Fig. 3a-c). Optogenetic activation of MPN Isolation neurons in group housed mice whose social need is satiated induced significant social interaction (Fig. 3d), as well as enhanced social preference in a three-chamber sociability assay (Fig. 3e). Interestingly, optogenetic activation applied before the reunion step also led to a subsequent rebound in social contact ( Fig.   3f), suggesting that a sustained motivational state can be triggered by transient activation of MPN Isolation neurons. Place preference assays showed that mice avoided the chamber coupled with optogenetic activation (Fig. 3g), indicating that activity of MPN Isolation neurons conveys negative valence, and thus may encode the aversive emotional state associated with isolation.
We used a similar intersectional approach to inhibit MPN Isolation neurons via expression of a lightactivated chloride channel (iC++). MPN Isolation neuronal inactivation significantly reduced social rebound and social preference after isolation (Fig. 3h, i). Similar results were obtained by optogenetic manipulation of MPN Mc4r+ neurons (Extended Data Fig. 5).
. CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint (which this version posted May 19, 2023. ; https://doi.org/10.1101/2023.05. 19.540391 doi: bioRxiv preprint From these experiments, the activity of MPN Isolation neurons appears essential to the expression of a social isolation state and is sufficient to trigger social interaction in socially satiated mice.

MPN Isolation neurons and associated neural circuits
Social isolation modulates a wide range of emotional states and behaviors 5,6 . For instance, mice find the context associated with social isolation aversive 23 (Fig. 3g), and isolation leads to significant modulation of body weight 30 and an increase in social seeking 3,22  was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint (which this version posted May 19, 2023. ; https://doi.org/10.1101/2023.05.19.540391 doi: bioRxiv preprint 3p) and found that light stimulation promoted real-time avoidance (Fig. 3r) but did not affect eating or social behaviors (Fig. 3q, s). We also found that POMC+ and Cartpt+ appetite-suppressing neuronal populations in Arc were activated during social isolation (Fig. 3m), consistent with the observed body weight loss (Fig. 3y). Optogenetic activation of MPN Isolation -to-Arc projections inhibited food intake ( Fig. 3u) but did not induce negative valence or affect social interaction (Fig.   3v, w), suggesting a direct inhibition of eating drive by social need. The distinct behavioral effects elicited by stimulation of MPN Isolation -to-Hb and MPN Isolation to-Arc projections rule out possible cross-talks between MPN Isolation projections via backpropagated action potentials induced by terminal activation. We also found that social isolation activated Oxt+, Avp+ neurons in PVN and

MPN Reunion neurons and the modulation of social satiety
MPN Isolation neurons showed a quick suppression of activity upon reunion (Fig. 2c, d, k-m), thus signaling the end of social isolation. To better understand the circuit mechanisms underlying the observed inhibition of MPN Isolation neurons upon social contact, we performed monosynaptic retrograde tracing 35 from MPN Isolation neurons. The TVA receptor and optimized G protein were expressed in MPN Isolation neurons using the intersectional strategy described earlier (Fig. 4a). Two weeks later, G-deleted rabies virus was injected into the MPN and brain-wide retrograde rabies signals were measured (Fig. 4a-d). This approach identified 12 input areas for MPN Isolation neurons ( Fig. 4d and Extended Data Fig. 6d), many overlapping with MPN Isolation projection areas, thus revealing extensive recurrent connectivity within the isolation circuit. Among MPN Isolation input areas we noticed a strong local signal within the preoptic area. This observation prompted us to examine the identity of local input neurons and assess whether MPN Reunion neurons are a direct . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made Next, we targeted MPN Reunion neurons by expressing Con/Fon-ChR2 in TRAP2/Vgat-Flp mice and inducing the expression of Cre recombinase by injection of 4-hydroxytamoxifen (4-OHT) during social reunion (Fig. 4f, g). Optogenetic activation of MPN Reunion neurons did not affect social interaction in group housed animals (Fig. 4h). However, activation of these neurons during social reunion after a period of isolation led to a decreased social rebound (Fig. 4j). These results support the hypothesis that activity of MPN Reunion neurons provides a social satiety signal when isolated animals are reunited. Importantly, in a real-time place preference assay, mice preferred to stay in the chamber associated with optical stimulation implying a positive valence conveyed by the activity of MPN Reunion neurons (Fig. 4i). Inhibition of MPN Reunion neurons during reunion did not further increase the rebound, perhaps due to the incomplete capture of MPN Reunion neurons by the TRAP approach or the existence of other social satiation mechanisms (Fig. 4k).
To gain a broader understanding of the neural circuitry underlying social homeostasis, we further mapped the input and output of MPN Reunion neurons and identified brain regions, such as LS, NAc, BNST, PVN and Arc that overlap with circuits associated with MPN Isolation neurons (Extended Data Fig. 7), suggesting a shared neural network in the regulation of social need and social satiety. MPN Reunion neurons showed dense projections to the ventral tegmental area (VTA), which has robust dopaminergic projections to NAc shown to be essential in the control of social reward 21 . We virally expressed the dopamine sensor GRAB DA2m 36 in NAc, measured fluorescence changes with fiber photometry, and observed significant dopamine release in NAc upon social reunion ( Fig. 4l-n). Since both MPN Isolation and MPN Reunion neurons receive inputs from NAc, we . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made These data identify a brain-wide neural circuitry underlying social need regulation. Social stimuli activate MPN Reunion neurons, which further recruit downstream social reward circuits and inhibit MPN Isolation neurons. Conversely, during social isolation, absence of sensory input silences MPN Reunion neurons and in turn dis-inhibits MPN Isolation neurons, which further triggers negative valence, social motivation and other physiological changes associated with social isolation.

Sensory basis of social need and social satiety
How do animals assess their social environment and discern if they are alone or together?
To explore this issue, we investigated the contribution of various senses to the emergence and satiation of social need. In an initial experiment, mice were separated from siblings in their home cage by a perforated divider such that auditory and olfactory cues could be sensed by animals across the divider (Fig. 5a). Since FVB mice become blind by weaning age, the role of visual cues was not addressed. Surprisingly, a significant social rebound, comparable to the rebound induced in single housed mice, was observed in the reunion period following 3 days of separation (Fig.   5b). This suggests that signals crossing the divider -auditory, and olfactory cues -are not sufficient to fulfill the social need of the separated mice. We therefore tested two of the remaining sensory modalities that require direct contact, namely pheromone sensing and touch, as candidate cues enabling mice to perceive social context. The potential contribution of pheromone sensing was assessed by measuring the behavior of Trpc2-/-mice, which are genetically impaired in vomeronasal pheromone sensing 39 . Trpc2-/-mice displayed normal social rebound after . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made isolation and satiation during reunion (Fig. 5c), suggesting that, instead, somatosensation may represent the essential sensory modality for mice to assess the presence or absence of others, and thus either lead to social satiety or social need, respectively.
To assess the contribution of touch to social need and social satiation more directly, we first examined the effect of acute tactile inhibition by intraperitoneal injection of isoguvacine, a peripherally restricted GABA A receptor agonist that attenuates peripheral mechanosensory neuron firing 40 , just before social reunion. Mice treated with isoguvacine showed prolonged social rebound (Fig. 5d), suggesting that attenuated mechanosensory neuron signaling may delay the satiation of social need. In parallel, we examined the neuronal activity induced by social rebound in the lateral parabrachial nucleus (PBN L ), a brain region densely innervated by the axons from spinoparabrachial (SPB) neurons that convey touch information from the spinal cord to the brain 41 .
Interestingly, we found that social rebound robustly activates the external lateral subnucleus of PBN (PBN EL ) ( Fig. 5e and Extended Data Fig. 8a) which was previously implicated in affective touch 41 . PBN EL -activating SPB neurons receive direct synaptic input from Mrgprb4+ mechanosensory neurons 41 , and Mrgprb4+ neurons are implicated in mediating pleasant and social touch in mice 42,43 , prompting us to examine whether lack of Mrgprb4+ neurons influences social rebound. After crossing Mrgprb4-Cre mice to a Cre-dependent diphtheria toxin subunit A (DTA) line, we found that mice with ablated Mrgprb4+ neurons (B4/DTA) showed a slight but significant reduction in social rebound compared to wildtype controls (Fig. 5f). This result suggests that constitutive loss of at least one neuronal population previously implicated in affective touch leads to reduced sensitivity to social environment and thus hampers the generation of social drive during isolation. The reduced but significant rebound still observed in B4/DTA mice (Fig. 5f) suggests that other types of somatosensory fibers are also involved in the sensation of social context.
Inspired by Harlow's pioneering work 44 , in which separated infant rhesus monkeys strongly preferred and attached to a soft cloth mother rather than a rigid wire surrogate, we designed a . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint (which this version posted May 19, 2023. ; https://doi.org/10.1101/2023.05.19.540391 doi: bioRxiv preprint mouse version of a comfort-touch preference assay. In this assay, mice were exposed to two types of plastic tunnels, one internally coated with soft cloth material (cloth tunnel) and the other left naked (naked tunnel) to serve as a control (Supplementary Video 3). After isolation, but not when group housed, FVB mice showed a significant preference for crossing the cloth versus naked tunnel as quantified by the relative number of crossings of each tunnel (Fig. 5g, left graph).
The relative duration of crossing the cloth vs naked tunnel remained unchanged between group housing and isolation conditions (Fig. 5g, right graph), suggesting that the preference of the cloth tunnel results from dynamic gentle touch stimulation by the cloth lining rather than shelter or warmth seeking. Interestingly, strains that show low rebound behaviors, such as C57 mice, did not display such touch preference (Extended Data Fig. 8b). To further investigate whether comfort touch could at least partially fulfill social need, we let isolated mice cross through either cloth or naked tunnels 30 times and measured the rebound intensity before and after tunnel crossing.
Remarkably, soft-touch-stimulated mice displayed significantly lower rebound after tunnel crossing, while mice running through naked tunnels had similar rebound as prior to the tunnel crossing (Fig. 5h). Similarly, co-housing with the cloth tunnel, but not with the naked tunnel, during isolation reduced social rebound (Extended Data Fig 8c).
How does soft touch affect hypothalamic circuits underlying social need and social satiety and does it directly modulate the activity of MPN Reunion and MPN Isolation neurons? To answer these questions, we modified the cloth tunnel by adding an opening on top such that mice can run through such tunnel with a head implant and attached wire during microendoscopy calcium imaging. After three days of isolation, the implanted mice were allowed to freely access the cloth tunnel for 15 minutes (10-20 crossings) while the MPN neuronal activity was recorded. Then the tunnel was removed for 30 minutes, and a 5-minute reunion assay was applied, enabling us to identify MPN Reunion or MPN Isolation neurons based on their activation or inhibition during social reunion. We then examined the activity of these two populations during the previous occurrences of cloth tunnel crossing. Strikingly, over 90% of MPN Isolation neurons were inhibited and ~35% of . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made MPN Reunion neurons were excited during cloth tunnel crossing ( Fig. 5i-k). These results indicate that gentle touch is effective in quenching MPN Isolation and eliciting MPN Reunion neuronal activity, thus mimicking signals underlying social satiation. Overall, these results suggest that physical touch is a key sensory channel for the perception of social environment such that a lack of touch sensation leads to the emergence of social need, while its presence provides social satiety.

Discussion
In this study, we have uncovered two molecularly defined and interconnected neuronal populations in the medial preoptic nucleus of the hypothalamus that form a key regulatory node underlying social homeostasis ( was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made  13,14 , and similar organization for thirst [15][16][17] and sleep 18 . Intriguingly, unlike that of food and water, social need is typically not considered as a survival need. Thus, the similar neural architectures identified in the control of social and physiological needs may highlight the significance of social drive for survival as well as reflect a common strategy for evolutionarily conserved behavioral drives.
Physiological needs are monitored through the detection of peripheral signals, such as metabolite concentration for appetite 13,14 and osmolality for thirst [15][16][17] . Our data suggest that touch is a key signal conveying the social environment (Fig. 5). This observation is in line with recent studies showing that gentle tactile stimulation in rodents significantly modulates the motivation of social behaviors 45-47 , and that zebrafish sense the presence of conspecifics via mechanoreceptors in the lateral line organ 48 . In our study, inhibition of touch sensation during social reunion impaired the satiation of social drive and led to prolonged social rebounds. Constitutive ablation of sensory neurons expressing Mrgprb4, a population shown to contribute to social touch 42,43 , led to reduced social rebound. The effect of ablating Mrgprb4 neurons was significant but relatively modest, thus implicating other peripheral mechanosensory neuron populations in social touch. Social isolation effectively promotes touch seeking behaviors, which in turn inhibits MPN Isolation neurons and reduces social need. Social touch has been shown to play an essential role in brain development, stress alleviation, attention improvement and pain relief, while social touch avoidance is a hallmark of neurodevelopmental disorders such as autism spectrum disorder (ASD) 40 . Recent findings have identified sensory neuron types and associated neural circuits mediating social touch 42,43,49 . Our work further emphasizes how social touch is an essential contributor to social homeostasis.
Social touch is rewarding and triggers dopamine release in the nucleus accumbens (NAc) 43 , thus contributing to the rewarding nature of social interactions [19][20][21] . Similarly, we observed significant dopamine release in NAc upon social reunion. We also found that activation of . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made How does the brain track the duration of social isolation and trigger a scalable social rebound after increasing lengths of isolation? The duration of social isolation may be directly encoded by changes in the firing rate or population activity patterns of MPN Isolation neurons.
Alternatively, the activity of MPN Isolation neurons may be further integrated in downstream effectors across days of isolation, and, for example, may lead to the release of neuropeptides or other signaling molecules whose concentration accumulates during isolation. It is also possible that the activity of MPN Isolation neurons facilitates synaptic plasticity of local or global neural circuits, that magnify social stimuli and trigger social rebound during reunion. These hypotheses can be tested in future experiments through long-term recordings that can track ensembles of neurons across days.
Altogether, we have uncovered a brain-wide circuit centered around two hypothalamic nodes, MPN Isolation and MPN Reunion neurons, that monitor touch signals to provide animals with a dynamic neural representation of the social environment and underlie the behavioral and emotional control of social homeostasis. These insights into the nature and identity of circuits . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made  . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint (which this version posted May 19, 2023. . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made    was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made     Conversely, absence of social touch input during isolation inactivates MPN Reunion neurons and in . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made   was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made

Supplementary Video 1. Social interaction before and after social isolation, and examples of behavior modules in FVB/NJ mice
Isolated mice display rebound social interaction upon reunion, while group housed mice show sated social motivation. These video clips illustrate typical behavior modules during social reunion, i.e. approaching, sniffing, crawling under, head-to-head contact and allogrooming.

Supplementary Video 2. Microendoscopy calcium imaging of MPN neurons in FVB/NJ mice during social reunion.
Examples of simultaneously imaged MPN neurons (right) showing distinct activity patterns during social reunion (left). The same color scheme was used as in Fig. 2d to indicate three unique neuronal clusters responding to social reunion.

Supplementary Video 3. Comfort touch preference assay.
Isolated but not group housed FVB/NJ mice show increased preference to cross a cloth-lined tunnel, rather than a naked tunnel.
. CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made

Animals
Mice were maintained on a 12h:12h dark-light cycle with access to food and water ad libitum. The

Behavioral assays
All behavioral experiments were performed during the dark cycle of the animals in a room illuminated by infrared or red light. Mice were habituated in the room for 10-20 minutes before experiments. For stress tests, mice were acclimated to the testing environment for 1h before testing to reduce basal stress level.
Social isolation/reunion assay. Female sibling mice were group housed (≥3 mice) after weaning for at least one week before social isolation experiments. Before isolation, two group-housed cagemates were put together in a new cage with fresh bedding for 10 minutes to measure the baseline social interaction. One mouse was then isolated in their home cage or in a new cage for 5 days while the other mouse was kept in group. On the first, third and fifth day from the onset of isolation, the isolated mice were transiently reunited with the same group-housed cagemate in a . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made new cage for 10 minutes. In each reunion session, the isolated mice were first put in the cage, and then its group-housed cagemate was introduced. All behaviors occurring during the reunion period were recorded using a multi-camera surveillance system (GeoVision GV-VMS software and GV-BX4700-3V cameras). Behavior videos were manually scored using the Observer XT 11 software (Noldus Information Technology) to identify typical social behavioral modules, including approaching (one mouse moves towards another), sniffing (the nose of one mouse comes close to or makes contact with another mouse's body, usually the anogenital region), crawling under (one mouse crouches down, crawls underneath another mouse's body and sometimes passes through), head-to-head contact (two mice approach each other and contact each other's noses) and allogrooming (one mouse grooms another mouse, usually on the head, neck and back regions) (Fig. 1f and Extended Data Fig. 1e). Every single event of these behavioral modules was considered as a social interaction bout (Extended Data Fig. 1b, c), and the interval between the introduction of the second mouse and the initial social interaction bout was measured as behavioral latency (Extended Data Fig. 1a). The transition probability of one behavioral module occurring after a different module was calculated across all reunion sessions to quantify the specific motor sequences of social interaction during reunion (Extended Fig. 1d, transition matrix).
The total duration of all the modules within one reunion session was summed up and referred to as social interaction (Fig. 1c, d). In order to demonstrate the satiation process during social rebound, we measured social interaction in separate time bins (2 minutes/bin) during reunion (Fig.   1j). Social interactions were also measured after 1, 3, 6 and 12 hours of isolation to reveal the emergence of social rebound after short periods of social isolation (Fig. 1i). Custom-made MATLAB codes and DeepLabCut software package were used to track frame-by-frame positions of two mice during social reunion and the social distances between two mice were calculated and averaged across frames during one reunion session (Fig. 1e). Because 1 and 3 days of social isolation are sufficient to trigger significant social rebound in FVB/NJ mice, we used these two time points in our typical isolation protocols in order to minimize increased stress induced by prolonged isolation. was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made was used to identify USV syllables, and the detected syllables were manually reviewed to correct false labeling (see example syllables in Extended Data Fig. 1f). The corrected detection files were then exported as .mat files and analyzed with MATLAB. Custom code was used to extract the timing and duration of each syllable. The number of syllables were plotted as a function of different time courses (Fig. 1g and Extended Data Fig. 1g) to reveal the dynamic changes within and across reunions. As only one microphone was used for recording, we were not able to determine the source of USVs; however, since group-housed female mice emit few USVs and we detected USVs from isolated mice before cagemates were introduced, thus most of the recorded USVs during reunion were likely generated by the isolated mice. Correlation between USVs and social interaction initiated by the isolated mice were assessed over time ( Fig. 1h and Extended Data Fig.   1h).

Non-social object interaction test. To test whether social isolation increases the motivation for
general investigation behaviors, we tested behavior towards a non-social object in group housed or isolated conditions. Before isolation, single group-housed mice were presented with a 15ml centrifuge tube or a rubber toy mouse in a new cage for 10 minutes to measure baseline behavior.
Mice were then isolated in their home cage or in a new cage for 3 days before a second test with the object. Behavior during tests was recorded and analyzed. Any contact or climbing behavior with the object was scored and added up as the time spent interacting with object (Fig. 1l).

Social interaction in different phases of estrous cycle.
To test whether social rebound in female mice after social isolation is influenced by the estrous stage of the animal, we performed reunion assays after 3 days of social isolation and identified the estrous phase of each tested mouse. Time spent in social interaction was compared between mice in either estrus or diestrus phases (Fig. 1k). Vaginal smears were examined under the microscope, and specific estrous stages were characterized based on the morphology of vaginal epithelial cells as described previously 52 . In brief, we collected vaginal cells from female mice with 10µl of phosphate-buffered saline (PBS) and observed these samples under a light microscope with a 40x objective to characterize the morphology of cells. During the estrus phase, vaginal epithelial cells are cornified and appear large and flat, while during the diestrus phase, these cells are smaller with round shape 52 .

Stress tests.
Mice's stress levels were measured after different durations of social isolation using elevated plus maze (Fig. 1m) and open field (Fig. 1n) tests, and induced stress was performed by physical restraint (Fig. 1o). The elevated plus maze was on a pedestal 1m above the ground and consisted of two closed arms (30 x 5cm with 15-cm-high wall) and two open arms (30 x 5cm) . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made Mice were placed on the central platform and allowed to freely explore the maze for 5 minutes while the behavior was recorded. All behavior videos were manually scored with Noldus Observer software to measure the total time spent in open and closed arms. In the open field test, individual mice were placed in a 42 x 42 x 42cm arena composed of black acrylic board and allowed free exploration for 10 minutes. The behavior was recorded and analyzed to measure the total time spent in center (24 x 24cm) and peripheral zones. To induce physical restraint stress, individual mice were placed into 50ml conical tubes with ventilation holes for 1h and then reunited with one of their cagemates in a new cage to monitor the behaviors with the same settings as described for social reunion assays.

Social preference tests.
To examine the preference of test mice for a group of mice versus a single mouse, we built a novel arena with three cubic chambers (25 x 25 x 25 cm) joined via a triangular central zone to allow for unbiased entry into either chamber (Fig. 1p). Each chamber contained an inverted wire cup. The cup was empty in the C0 chamber, contained one cagemate in the C1 chamber, and contained three cagemates in C3 chamber. The locations of the three types of chambers were assigned randomly across animals. Group-housed or isolated mice were first introduced into the central zone at the beginning of the test and allowed to freely explore the arena for 10 minutes. Behaviors were recorded and time spent in each chamber was scored manually. In the preference test between stranger versus familiar mice (Extended Data Fig. 1j), a standard three-chamber task was used in which the arena consisted of two choice chambers on two sides and a central zone that allowed for unbiased entry into either chamber. Each of the two choice chambers contained an inverted wire cup with either a familiar mouse (cagemate) or a stranger from the same strain. The tested mice (group-housed or isolated) were first introduced into the central zone at the beginning of the test and allowed to freely explore the arena for 10 minutes. Behavior was recorded and time spent in each chamber was scored. The same arena and experimental procedure were used in the strain preference test (Extended Data Fig. 1k), in which the two choice chambers contained mice from either the same or different strains.
Oxytocin receptor antagonist experiment. To examine the contribution of oxytocin to the regulation of social need during isolation, mice received i.p. injections of either saline or the oxytocin receptor antagonist (OTR-A), L-368,899 hydrochloride (5 mg/kg), twice during a 24h isolation as previously described 19 . The first injection was performed at the onset of isolation and the second injection 9h before the reunion assay (Fig. 3x). Behaviors during the reunion period were recorded and analyzed as described above.
. CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made Sensory modality screening. To investigate the contribution of different sensory modality to the emergence of social rebound after isolation, we designed a home-cage divider experiment in which a plastic divider with laser-cut thin slots/openings was placed in the diagonal of home cage to subdivide a group of 3 mice, such that one mouse was placed into one side and the other two together on the other side. Food, water and nesting materials were equally provided on both sides.
The divider prevented mice from either side from physically interacting with each other but allowed exchange of auditory and olfactory information. After 3 days of separation, the singly divided mouse was reunited with one of the mice from the other side in a new cage for 10 minutes. The occurring behaviors were recorded and manually scored. The time spent in social interaction was compared to the social rebound after 3 days of isolation in the singly housed condition (Fig. 5a,   b). To examine the potential contribution of pheromone sensing to social rebound, we assessed the behavior of Trpc2-/-mice that are genetically impaired in vomeronasal pheromone sensing.
Trpc2-/-mice were first crossed to FVB/NJ strain for one generation, and the resulting Trpc2+/mice were used to cross to each other in order to generate wildtype (Trpc2+/+) and mutant (Trpc2-/-) mice for isolation experiments. We measured the rebound social interaction after 3 days of isolation and analyzed the satiation process in wildtype and mutant mice (Fig. 5c) with the same methods described in Social isolation/reunion assay.
Gentle touch preference test. To test the preference of gentle touch before and after social isolation, we designed a free choice task for mice interact with either a naked plastic tunnel (10cm long, provided by Harvard Biological Research Infrastructure) or a tunnel lined inside with a single layer of soft plush towel (bought from Amazon) (referred to as cloth tunnel). All materials were autoclaved before use and replaced between animals to avoid odor contamination. Grouphoused or 1-day isolated mice were placed in a new cage with one naked tunnel and one cloth tunnel. During the test, mice were allowed to freely explore and go through either tunnel for 15 minutes. Behaviors were recorded, and the crossing events were scored. The touch preference index was measured as the number of crossings though the cloth tunnel divided by the total number of crossings through both naked and cloth tunnels ( Fig. 5g and Extended Data Fig. 8b).

Touch manipulation assays.
To acutely reduce tactile sensitivity during social reunion, isolated mice received an i.p. injection of isoguvacine 40 (20 mg/kg), a peripherally restricted GABA A R agonist, 60 minutes before social reunion. Phosphate-buffered saline (PBS) was injected in a different batch of isolated mice, which served as a control group. The injected mice were subjected to a social reunion assay 1 hour after injection, and the behaviors were recorded and manually scored (Fig. 5d). To examine the contribution of tactile sensation to the emergence of . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made  42,43 . We first separately crossed Mrgprb4-Cre (B4-Cre) and Cre-dependent diphtheria toxin subunit A (DTA) mouse lines (in C57BL/6J background) to FVB/NJ strain for one generation and then crossed the resulting F1s (i.e. F1(B4/FVB) and F1(DTA/FVB)) to each other to have B4-neuron-lesioned mice (B4/DTA).
We measured the social interaction of B4/DTA mice towards a wildtype cagemate after 1 or 3 days of isolation and compared these results to the social rebound measured in wildtype mice from FVB/NJ x C57BL/6J cross (Fig. 5f). In the acute touch rescue experiments (Fig. 5h), fauxfur-lined tunnels were used to provide comfort touch stimulation as an enhanced version of cloth tunnel described in Gentle touch preference test. Mice were habituated to the faux-fur-lined tunnels by continuously going through two of these tunnels that were alternatingly connected by experimenter before social isolation. Mice were then isolated for 24 hours and reunited with one cagemate both before and after gentle touch stimulation. Specifically, a 5-minute reunion assay was first performed to measure the baseline social interaction, and then the mice went across faux-fur-lined tunnels 30 times the same way as in habituation. 30 times of tunnel crossings typically took ~10 minutes for both cloth tunnel and naked control tunnel. A second reunion assay was then conducted to measure the change of social motivation compared to the first reunion ( Fig. 5h). Naked plastic tunnels were used in another batch of animals as a negative control. In the chronic touch rescue experiment (Extended Data Fig. 8c), isolated mice were co-housed with either a cloth tunnel or a naked tunnel described in Gentle touch preference test for 24 hours.
Then a social reunion assay was carried out to measure and compare social interaction after different co-housing conditions.

Microendoscopy calcium imaging
To examine real-time neuronal activity with single cell resolution in the medial preoptic nucleus was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made Mc4r-Cre/FVB mice using the same coordinates. Since the brain anatomy of FVB/NJ strain slightly differs from the Paxinos and Franklin brain atlas, we adjusted the AP coordinate 0.4-0.5mm towards the rostral side to target the MPN in FVB/NJ mice. 30 minutes after viral injection, a 25-gauge blunt needle (SAI infusion technologies, VWR # 89134-146) was slowly inserted (1mm/5min) into the brain targeting (AP 0, ML 0.3 and DV −4.7, Paxinos and Franklin atlas) to create a tract. The needle then was slowly withdrawn, and a GRIN lens (Inscopix, 0.6 x 7.3 mm) was slowly inserted (1mm/10min) into the tract formed by the needle and targeted at 50µm below the end of the needle tract. The lens assembly was secured on the skull with dental cement We used inbuilt acquisition software from Inscopix to acquire images at 10Hz. Before formal data acquisition, mice were habituated to the recording setup and environment 2-3 times, and for each recording session, mice were habituated for 10-15 minutes with microendoscope before starting the behavioral assays. An Arduino microcontroller is programmed to send TTL signals to synchronize the data acquisition of calcium signals (DAQ, Inscopix), animal behavior (BFS-U3-31S4M-C, FLIR Blackfly S camera) and ultrasonic vocalization (Avisoft Bioacoustics). In the social reunion assay (Fig. 2b, c, k, l, m, n and Extended Data Fig. 2a, b, d), implanted mice were isolated for 3 days before imaging session. On the day of imaging, the mouse was first habituated in a new cage with fresh bedding for 10-15 minutes. Then the imaging session started and continued for 15 minutes. Initially, there was a 5-minute baseline period during which the mouse was kept . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made alone. Following this, a cagemate was introduced into the cage, and social interaction between the mice was allowed for 5 minutes. Subsequently, the cagemate was removed, and the mouse was kept alone again for another 5 minutes. In the group housed condition (Fig. 2o), implanted mouse stayed with cagemates before imaging for at least 48 hours and during the imaging session, there was a 5-minute baseline during which the mouse was kept alone, followed by a 5-minute reunion with one cagemate, and then this cagemate was removed for another 5 minutes. Imaging during tail suspension (Fig. 2p) was conducted when the mouse was manually suspended by its tail for up to 2 minutes in order to induce a state of stress. Imaging during eating behavior (Fig.   2q) was performed when the mouse was fasted for 12h in group housing, and it was allowed for freely eating of food pellets in a new cage for 10 minutes during which the imaging was performed.
To monitor the neuronal activity during the initial phase of social isolation, we performed imaging when the mouse was initially isolated from its social group for 20 minutes in a new cage (Extended Data Fig. 2e). We provided food and hydrogel in the cage and kept the mouse isolated for another 6 hours with the microendoscope connected. Next, we performed a 10-minute imaging with 5 minutes of baseline and 5 minutes of reunion. In the tunnel crossing session (Fig. 5i), the implanted mouse was isolated for 3 days before imaging. During the imaging session, there was a 5-minute baseline followed by 15 minutes of free tunnel crossing during which two faux-fur-lined tunnels (10cm long, 7.5cm in diameter, the fur ~1.5 cm long) were introduced into the cage to maximize crossing behaviors. The top of the tunnel was removed creating a slot (4cm) to allow the implanted mice to run through with the attached wire. The tunnels were subsequently removed from the cage and the mouse was kept alone for 30 minutes. Finally, we performed a 10-minute imaging with 5 minutes of baseline and 5 minutes of reunion.
Image processing and calcium signal extraction. The images acquired were processed in two steps. In the first step, we processed the raw image data using the Inscopix data processing software (IDPS 1.8.0.3519). The images were imported in the proprietary Inscopix format on to IDPS. The images were spatially down sampled by a factor of 4 in order to reduce the file sizes for subsequent steps without losing quality, followed by a spatial bandpass filter in the frequency band of 0.005 to 0.5/pixel. The images were next subjected to motion correction using IDPS and the resulting images were saved as a tiff image stack. The second step was performed using standard MATLAB scripts from the CNMFe 53 database (https://github.com/zhoupc/CNMF_E).
Calcium traces were extracted and deconvolved using CNMFe pipeline with the following parameters: patch_par= [2,2], gSig = 3, gSiz = 13, ring_radius = 9, min_corr = 0.8, min_pnr = 8, deconvolution: foopsi with the ar1 model 53 . The spatial and temporal components of every extracted unit were carefully inspected manually (SNR, PNR, size, motion artifacts, decay kinetics, . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made etc.) and outliers (obvious deviations from the normal distribution) were discarded. Cells with elongated and thin shape were removed based on their shape.

Single neuron and population activity analysis. All analysis based on extracted calcium traces
were performed using custom made MATLAB scripts. To visualize and categorize the panneuronal calcium activity patterns during social reunion assay (Fig. 2c, d and Extended Data Fig.   2a, b), the extracted calcium traces were z-scored across the whole imaging session, and the neurons with enhanced or inhibited activity during social reunion period were separated by comparing the mean activity during 5min baseline and 5min reunion. The reunion-activated neurons were then further divided into two clusters with distinctive activation patterns (one cluster with transient activation at the onset of reunion and the other cluster with persistent activation during reunion period) using k-mean clustering (k=2). We visualized the resulting 3 clusters (i.e. The same procedure was repeated 100 times by randomly selecting 50% of the neurons to calculate the standard deviation (Fig. 2f).

reunion-inhibited, reunion-activated-transient and reunion-activated-persistent) in heatmaps in
In the activity analysis of MPN Mc4r+ neurons, significantly modulated neurons were identified based on their responses during reunion. Reunion-activated neurons are defined as activated at least two standard deviations above the mean of baseline (300s before reunion). Reunion-inhibited neurons are identified as significantly reduced activity during reunion period (300s after reunion) compared to baseline (300s before reunion, Mann-Whitney U test, bin size=1s). We visualized the activity of all significantly activated or inhibited Mc4r+ neurons from three mice (Fig. 2k, l and Extended Data Fig. 2d) aligned at reunion time and plotted their corresponding activity during reisolation period aligned at the time point when the partner mouse was removed from the cage. Calcium traces from 10 example neurons (2 reunion-activated, 7 reunion-inhibited and 1 not significantly modulated) were selected and plotted in Fig. 3l. We plotted the averaged activity of the reunion-inhibited neurons during reunion (Fig. 2m) and re-isolation (Fig. 2n). We identified these reunion-inhibited neurons in other behavioral conditions by alignment of fields of view in . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint (which this version posted May 19, 2023. ; https://doi.org/10.1101/2023.05.19.540391 doi: bioRxiv preprint different recording sessions. The spatial location of each neuron is binarized and a proportion of overlap is calculated for every pair of neurons across the sessions. If the proportion of overlap is higher than a set threshold (>70%), the neurons were considered to be the same. We plotted the averaged activity of reunion-inhibited neurons during social interaction in group housed animals ( Fig. 2o), tail suspension (Fig. 2p) and eating (Fig. 2q). The significance of modulation was determined by testing whether the activity of neurons was above or below 95% confidence interval of baseline (time bin = 1s). To examine the activity of reunion-inhibited neurons during the initial phase of social isolation (Extended Data Fig. 2e) and soft cloth tunnel crossing (Fig. 5i), the raw image data were concatenated with later recordings during social reunion, and calcium traces were extracted from the concatenated video using CNMFe as described above. Reunion modulated neurons were identified and their activity during the early recording period was plotted.
In the activity heatmap of the initial phase of isolation (Extended Data Fig. 2e), neurons were arranged according to their onset of activation after isolation (from early to late responses). The curve below represents the average activity across neurons in each time bin (30s). In the analysis of cloth-tunnel crossing experiments, two touch-activated and two touch-inhibited neurons were selected, and the average activity of multiple crossings were plotted that is aligned at the onset of each tunnel crossing (Fig. 5j). To assess the co-modulation of neuronal activity between tunnel crossing and social reunion, the activity changes during tunnel crossing (mean(crossing, 30s)mean(baseline,10s)) and social reunion (mean(reunion, 300s -mean(baseline, 300s)) were plotted for each neuron in Fig. 5k.

Cell type identification
TRAP induction and activity labelling. To specifically label neurons activated during social isolation, we took the advantage of the TRAP2/Ai9 mouse line 17 that enables the labeling of activated neurons over a long time window (3-6 hours), which better integrates neuronal activity representing a persistent state compared to Fos in situ hybridization. The TRAP2/Ai9 line was backcrossed to FVB/NJ strain for over 9 generations before use. The isolation-activated neurons were 'TRAPed' in the following steps. 10mg of 4-hydroxytamoxifen (4-OHT, Sigma Aldrich #H6278-10mg) was added with 500μl ethanol and shaken at room temperature until the powder was completely dissolved (20mg/ml). This solution could be frozen at -20°C for future use within was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made OHT solution was intraperitoneally injected into mice immediately after preparation at a dose of 50mg/kg. To label ('TRAP') the cells activated during social isolation, mice were isolated for 3 days and injected with the 4-OHT solution in the dark phase of the third day and immediately returned to the same isolation cage for at least 24 hours to allow tamoxifen fully metabolized.
After at least 7 days, the mice were sacrificed for in situ hybridization experiments. To assess the activity of PBN during isolation, we performed TRAP inductions after 1 or 3 days of isolation in different cohorts of animals. To label the neurons that are activated during social reunion, FVB/NJ mice were isolated for 3 days and reunited with one of its cagemate. 30-40 minutes after the onset of the reunion, mice were sacrificed for in situ hybridization experiments. The reunited mice were kept with cagemate from reunion assay until sacrifice to prevent the activation of isolation-related neurons. To assess the activity of PBN during reunion, 4-OHT was injected 1h after reunion and the reunited mice were kept in group for at least 24 hours to allow tamoxifen fully metabolized.
In situ hybridization. RNAscope V2 kit (Advanced Cell Diagnostics, ACD) was used to perform double-label and triple-label fluorescence in situ hybridization (FISH) according to the manufacturer's instructions. Probes for tdTomato and Fos were used to visualize activated neurons labelled with TRAP method or acute behavioral assays, respectively. Probes for marker genes of specific cell types were selected from previous single-cell RNA sequencing and functional studies. All probes were made by ACD. Animals were sacrificed after specific behavioral assays and the brains were dissected. Freshly frozen brains were sectioned using a cryostat at 16 μm and stored at −80 °C. On the day of FISH experiment, slides were thawed and fixed in 4% paraformaldehyde (PFA) for 15 min followed by dehydration in 50%, 75% and 100% ethanol at room temperature. Tissue samples were processed using 3% hydrogen peroxide (VWR) for 10 minutes and permeabilized for 25 minutes using Protease IV (ACD). For each RNAscope experiment, C2 and C3 probes were diluted in C1 probe solution (1:50), heated to 40°C for 10 minutes and applied to slides which were placed in ACD HybEZ II oven at 40°C for 2 hours. Tissue samples were then processed as suggested by the RNAscope V2 protocol (ACD). Slides were imaged at 10x on an Axioscan 7 using Zen Blue 3.5 software (Zeiss). The number of cells marked by specific and overlapping genes was measured using QuPath 0.3.2. towards the rostral side to match the anatomy of FVB/NJ brain. After surgery, injected mice were singly housed to recover for 1 week and then put together with former cagemates for another week before TRAP induction (see details in TRAP induction and activity labelling). To visualize the projections of MPN Isolation neurons, TRAP2/Vglut2-Flp/FVB mice were isolated for 3 days and injected with 4-OHT (Fig. 3j,k). To visualize the projections of MPN Reunion neurons, TRAP2/Vglut2-Flp/FVB mice were isolated for 3 days and injected with 4-OHT one hour after reunion (Extended Fig. 7a, b). After 2 weeks of viral fluorophore expression, animals were perfused transcardially with phosphate-buffered saline (PBS) followed by 4% paraformaldehyde (PFA) in PBS. Brains were dissected and post-fixed in 4% PFA overnight. After embedding in 4% low-melting point agarose (Promega, #V2111) in PBS, 50-μm coronal sections were cut through the whole brain on a vibratome (Leica) and mounted on slides (VWR, 48311-703) with DAPI-containing mounting medium (Vector Laboratories, H-1200). The brain sections were imaged at 10x magnification using AxioScan 7 and Zen Blue 3.5 software (Zeiss). For quantification of projection density, the average pixel intensity in a target region containing EYFP signals was calculated, and the background was subtracted (Zen Blue software, Zeiss). Because injections were unilateral and no labelling was observed in most cases contralaterally, the equivalent region on the contralateral hemisphere was chosen for background subtraction; in cases where contralateral EYFP were present, an adjacent unlabeled region was chosen. The relative density value for each projection region was calculated as the ratio between background-corrected intensities in each region divided by the sum across all the target regions ( Fig. 3l and Extended Data Fig. 7e). was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint (which this version posted May 19, 2023. ; https://doi.org/10.1101/2023.05.19.540391 doi: bioRxiv preprint induction and activity labelling). TRAP2/Vglut2-Flp/FVB mice were isolated for 3 days and injected with 4-OHT to allow virus expression in MPN Isolation neurons (Fig. 4a, b); TRAP2/Vgat-Flp/FVB mice were isolated for 3 days and injected with 4-OHT one hour after reunion to enable virus expression in MPN Reunion neurons (Extended Data Fig. 7f,g). Two weeks later, 200nl of G-deleted rabies virus (EnvA-ΔG-rabies-eGFP, Janelia Viral Tools Facility) was injected into the MPN.
Seven days later, mice were euthanized, and the brains were dissected, sectioned and imaged with the same procedure in Anterograde tracing. Relative input strength was quantified as follows.
First the representative sections of input regions were selected and GFP+ cells (presynaptic cells) were counted. The local presynaptic cells within the MPN were estimated by counting GFP+ and mCherry-neurons. The relative input density was calculated as the ratio between number of presynaptic cells in each input region divided by the sum across all calculated regions in each brain ( Fig. 4d and Extended Data Fig. 7j). To identify the input cell types of MPN Isolation neurons, a different cohort of mice were processed for in situ hybridization (see details in In situ hybridization).
Probes for GFP, marker genes or immediate early genes were used to examine the presynaptic cell types (Fig. 4e). was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made

Optogenetics
The copyright holder for this preprint (which this version posted May 19, 2023. ; https://doi.org/10.1101/2023.05.19.540391 doi: bioRxiv preprint activation or inhibition. An Arduino microcontroller is programmed to send TTL signals to LED module to control the stimulation patterns. Pilot experiments were conducted to test and determine the proper ranges of LED power in different manipulation experiments. After connected to the patch cord, mice were transferred to a new cage with the same setup in social reunion assay and allowed to habituate for 5-10 minutes. To activate Vglut2+/Isolation-TRAPed neurons ( Fig. 3d-f) or Mc4r+ neurons (Extended Data Fig. 5b), LED was on for 1s (20Hz, 10ms pulses, 6-8mW at patch cord tip) and off for 3s, repeatedly; To activate Vgat+/Reunion-TRAPed neurons (Fig. 4h,j), LED was on for 40s (20Hz, 20ms pulses, 6-8mW) and off for 20s, repeatedly; In the real-time place preference/avoidance tests (Fig. 3g, 4i and Extended Data Fig. 5c), LED was turned on (20Hz, 6-8mW) during the period when mice entered the LED-on chamber that is randomly assigned in each session. To inhibit Vglut2+/Isolation-TRAPed neurons (Fig. 3h,i), Fig. 5d) or Vgat+/Reunion-TRAPed neurons (Fig. 4k), LED was on for 3 minute (constant on, 3-4mW) and off for 20s, repeatedly. In the social interaction/reunion tests and three-chamber social preference tests (Fig. 3d, e, h, i; Fig. 4h, j, k and Extended Data Fig. 5b, d), patterned LED was applied for 10 minutes and the behaviors during the entire period were recorded and analyzed as LED-on session performance. In LED-off sessions, the same cohorts of animals were tested without LED stimulation. LED-off sessions were usually conducted before LED-on sessions to avoid possible conditioning effects after stimulation. In the prestimulation experiment (Fig. 3f), patterned LED was applied for 10 minutes when the animal was kept alone before a 10-minute reunion with LED off. The behaviors during the reunion period were recorded and analyzed. The real-time place preference/avoidance tests lasted for 10 minutes, and the patterned LED was applied when mice entered the LED-on chamber. For axon terminal manipulation experiments (Fig. 3p-w), we used the same protocols as in soma stimulation experiments described above. When testing the stimulation effects on food intake, mice were fasted for 24 hours before experiments. Two food pellets were placed on the two sides of the cage and animal contact with one pellet triggered LED on for 10s while contact with the other pellet did not trigger stimulation treated as off controls. Weight reduction of each pellet at the end of a 10-minute test was measured as the amount of food intake (Fig. 3q,u).

Fiber photometry
Virus injection and fiber implantation. All surgeries were performed under aseptic conditions with animals anesthetized with isoflurane (1-2% at 0.5-1.0 L/min). Analgesia was administered pre-(buprenorphine, 0.1 mg/kg, i.p.) and post-operatively (ketoprofen, 5 mg/kg, i.p.). We used . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made Virus injection lasted around 10 minutes, after which the injection pipette was slowly removed over the course of several minutes to prevent damage to the tissue. We then implanted an optic fiber (400 µm diameter, SMA-SMC, Doric Lenses) into the virus injection site. We first slowly lowered an optical fiber into the NAc, attached it to the skull with UV-curing epoxy (NOA81, Thorlabs), and then a layer of rapid-curing epoxy to attach the optical fiber more firmly to the underlying glue. After 15 minutes, we applied a black dental adhesive (Ortho-Jet, Lang Dental) and waited for another 15 minutes for it to dry. The implanted mice were singly housed for 1 week to recover and co-housed with previous cagemates for another week before photometry recording.
Fiber photometry recording. Photometry recording was performed as previously reported 54,55 .
Before recording, we connected a magnetic patch cord (400µm diameter, NA 0.48, 3m long, SMA-SMC, Doric Lenses) to the optical fiber implanted on the head of the animal and the animal was allowed to habituate in a new cage for 10-15 minutes. Once the recording started, the patch cord simultaneously delivered excitation light at different wavelength (473nm, Laserglow Technologies; 561 nm, Opto Engine LLC) and collected fluorescence emissions from dopamine sensor and tdTomato (used for motion correction). The emitted light was then filtered using a 493/574nm beam splitter (Semrock), followed by a 500 ± 20nm (Chroma) and 661 ± 20nm (Semrock) bandpass filter, and collected by a photodetector (FDS10 X 10 silicone photodiode, Thorlabs) connected to a current preamplifier (SR570, Stanford Research Systems). This preamplifier outputs a voltage signal which was collected by a data acquisition board (NIDAQ, National Instruments) and custom software written in Labview (National Instruments). Lasers were turned on at least 30 minutes prior to recording to allow them to stabilize. Before each recording session, laser power and amplifier settings were individually adjusted for each mouse. The photometry recording and behavior video acquisition were synchronized using a common TTL input to trigger infrared light pulses (once every 10 seconds) that were recorded in the behavior videos. The implanted mice were isolated for 3 days before recording. The recording session lasted for 10 minutes, including a 5-minute baseline period where the animal was kept alone, followed by a 5minute social reunion period where a previous cagemate was introduced.
Fiber photometry data analysis. The tdTomato signal (red) was subtracted from dopamine sensor signal (green) to correct the motion artifacts. The corrected signal was then z-scored using . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint (which this version posted May 19, 2023. ; https://doi.org/10.1101/2023.05.19.540391 doi: bioRxiv preprint the mean and standard deviation from a 30-second 'baseline period' before reunion (Fig. 4n, upper: example mouse). Individual traces from different mice were aligned at the reunion time point and averaged across animals (Fig. 4n, lower). The behaviors during recording sessions were manually scored and synchronized with photometry signals by common TTL pulses (see Fiber photometry recording above).

Statistics and reproducibility
Data were processed and analyzed using MATLAB and GraphPad Prism 9. The sample sizes were chosen based on common practices in animal behavior experiments. Individual data points were plotted wherever possible. Error bars and shaded areas in the graphs indicate the mean ± s.e.m. unless otherwise noted. All data were analyzed with two-tailed non-parametric tests unless otherwise noted. In the experiments with paired samples, we used the Wilcoxon matched-pairs signed-rank test or Friedman test. In the experiments with non-paired samples, we used the Mann-Whitney U test or Kruskal-Wallis test. P values were corrected for multiple comparisons when necessary. No statistical significance is indicted by n.s., and the significance was indicated by *P < 0.05, **P < 0.01, ***P < 0.001. Statistical details are given in the respective figure legends.
All behavioral, imaging, in situ hybridization, optogenetics and tracing experiments were replicated in multiple batches of animals independently with similar results. Experiments were randomized whenever possible. Experimenters were blind to the mouse identify in Mrgprb4+ neuron lesion experiments.

Data availability
All data that support the findings of this study are either present in figures and extended data or available from the Dulac lab GitHub database (https://github.com/DulacLabHarvard/SocialNeed) or from the corresponding author upon request.

Code availability
Custom codes written for behavioral and imaging data analysis are available at the Dulac Lab GitHub database (https://github.com/DulacLabHarvard/SocialNeed) or from the corresponding author upon request.

References (Methods)
. CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made    . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made  was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint (which this version posted May 19, 2023.   (s)   0  1  3  5  0  1  3  5  0  1  3  5  0  1  3  5  0  1  3  5  0  1  3  5   0  1  3  5  0  1  3  5  0  1  3  5  0  1  3  5  0  1  3  5  0  1   was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made The copyright holder for this preprint (which this version posted May 19, 2023.  was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made . CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made  CC-BY 4.0 International license available under a was not certified by peer review) is the author/funder, who has granted bioRxiv a license to display the preprint in perpetuity. It is made