A cortical-hypothalamic circuit decodes social rank and promotes dominance behavior


 How do we know our social rank? Most social species, from insects to humans, self-organize into social dominance hierarchies (1–4). The establishment of social ranks serves to decrease aggression, conserve energy, and maximize survival for the entire group (5–8). Despite dominance behaviors being critical for successful interactions and ultimately, survival, we have only begun to learn how the brain represents social rank (9–12) and guides behavior based on this representation. The medial prefrontal cortex (mPFC) has been implicated in the expression of social dominance in rodents (10,11), and in social rank learning in humans (13,14). Yet precisely how the mPFC encodes rank and which circuits mediate this computation is not known. We developed a trial-based social competition assay in which mice compete for rewards, as well as a computer vision tool to track multiple, unmarked animals. With the development of a deep learning computer vision tool (AlphaTracker) and wireless electrophysiology recording devices, we have established a novel platform to facilitate quantitative examination of how the brain gives rise to social behaviors. We describe nine behavioral states during social competition that were accurately decoded from mPFC ensemble activity using a hidden Markov model combined with generalized linear models (HMM-GLM). Population dynamics in the mPFC were predictive of social rank and competitive success. This population-level rank representation translated into differences in the individual cell responses to task-relevant events across ranks. Finally, we demonstrate that mPFC cells that project to the lateral hypothalamus contribute to the prediction of social rank and promote dominance behavior during the reward competition. Thus, we reveal a cortico-hypothalamic circuit by which mPFC exerts top-down modulation of social dominance.

These conceptual frameworks, led us to hypothesize that mPFC neurons encode social rank and are part of top-down circuits to guide behavior based on social rank.
To determine if mPFC encodes social rank we needed to measure social dominance in an assay to facilitate statistical comparison. However, existing dominance assays, such as the tube test or the urine marking assay, lack the trial structure and have sensorimotor confounds 11,12,29,30 . To overcome these challenges, we considered that dominant animals often have priority access to resources. We designed an ethologically-relevant competition assay wherein mice that were linearly-ranked among their cage mates using the tube test 11 (Fig. 1a) competed for a palatable liquid reward (Ensure) delivered two seconds after the onset of a tone. Throughout our analyses we considered social rank differences in each competing pair and thus refer to "dominant" and "subordinate" based on relative social ranks. After individually learning the tone-reward association (Fig. 1b), mice competed for the rewards with a cage mate (Fig. 1a). Dominant animals, as de ned by the tube test, obtained more rewards, spent more time at the reward port, and were more successful at displacing the competitor from the port (Fig. 1c). Importantly, differences in winning were not driven by overall location in the arena or distance to port prior to tone onset (Extended Data Fig. 1). Therefore, this reward competition provides a trial-based behavioral paradigm for measuring dominance behavior facilitating statistical comparisons of neuronal ring rate.
To automatically track the behavior of multiple, unmarked mice we developed AlphaTracker, a deep learning tool based on AlphaPose 31 . AlphaTracker combines two neural networks, one to create a bounding box for each subject, another for pose estimation to detect multiple indistinguishable animals ( Fig. 1d). AlphaTracker also applies an additional algorithm to track animal identity across frames by taking into consideration animal positions from the previous frame ( Fig. 1d; see methods). The performance of AlphaTracker surpasses human accuracy and precision when using more than 100 frames for training (  32 . Furthermore, AlphaTracker performs well with low resolution videos and varying angles. Importantly, AlphaTracker can generalize to more animals even when training data sets included only two mice (Supplementary Movie 1). To correct potential identity tracking errors and review the behavioral clustering output, we created a graphical user interface (Extended Data Fig. 2b and Supplementary Movie 1). The development and application of AlphaTracker represents a new platform for the emerging eld of computational neuroethology of social behaviors 33,34 . mPFC neural activity can be decoded to predict precise behavioral state We sought to investigate whether the mPFC encodes the behavioral states observed during social competition. The use of wireless head-mounted devices, as opposed to tethering, minimizes the impact on social behavior 35 . We recorded cellular resolution activity from the mPFC using a wireless headmounted electrophysiological recording device ( Fig. 2a and Extended Data Fig. 4). When recording during the reward competition task, we did not detect a statistically signi cant difference in the number of rewards earned by dominant and subordinate mice, allowing us to make comparisons about dominance behavior and competitive success without being confounded by the volume of reward consumption. Importantly, dominant mice had higher pushing success while subordinates collected rewards with a longer latency (Extended Data Fig. 5a-d). AlphaTracker enabled quanti cation of a variety of behavioral states that mice expressed during the reward competition (Extended Data Fig. 5e-f). We trained a multinomial support vector machine (SVM) classi er to decode these behavioral states using mPFC multi-unit activity (Fig. 2d). However, we considered that the static nature of an SVM may not fully capture the relationship between mPFC neural activity and behavior.
We posited that mPFC neural activity could be dynamic and may be in uenced by internal hidden states. Therefore, we turned to a recently-developed unsupervised method to identify hidden states by combining a hidden Markov model (HMM) with generalized linear models (GLMs) 36,37 and adapted it to use mPFC neural activity to predict each of nine behavioral states. We trained a set of multinomial GLMs to predict the transition probabilities between hidden states. In addition, each hidden state is paired with another multinomial GLM that describes the relationship between neural activity and the behavior of that particular hidden state ( Fig. 2a-b).
To create a model of the temporal relationship between neural activity and behavior with performance superior to that of static models, each component of our dynamic model followed the rst-order Markovian property, to help preserve information about past events when predicting the future (Fig. 2d).
An HMM-GLM model with 6 hidden states decoded behavioral state from neural activity with the superior performance to static models ( Fig. 2c-e, Extended Data Fig. 6a-b and Supplementary Movie 2). However, the proportion of time spent in each hidden state did not differ by competitive success or by social rank, and the model performed equally well across ranks (Extended Data Fig. 6c-e), suggesting that mPFC encoding of social competition behavioral states is common across ranks. mPFC neural activity stably represents rank and predicts future competitive success We then wondered whether mPFC neural activity could be used to decode social rank, and if the neural representation of social rank is triggered by discrete events (such as cued competition trials) or stable throughout the task. To visualize population activity, we plotted the population activity vector for taskrelevant events (Extended Data Fig. 7a; Supplementary Movie 3) in a lower dimensional state-space using principal component analysis (PCA) [38][39][40][41] . To compare the population dynamics across ranks, we found a common two-dimensional PCA for all animals pooled, and subsequently plotted the evolving lowerdimensional population ring rates (i.e. neural trajectories) for dominants and subordinates in this subspace. Neural trajectories during winning and losing occupied segregated PCA subspaces -even before the cue onset ( Fig. 3a; Extended Data Fig. 7b). To reveal differences in population dynamics across rank, we quanti ed the length of the neural trajectories 42 for win and lose trials and found that subordinates had longer neural trajectories, suggesting either higher or faster ring rate changes in the mPFC population activity (Fig. 3b). Interestingly, when we analyzed the win and lose subspaces separately by performing the PCA for each event, we observed that the win and lose neural trajectories were less aligned in dominant mice, suggesting that the ensemble activity differences between winning and losing are larger in dominants than in subordinates (Extended Data Fig. 7c). Similar to win and lose trials, the mPFC population dynamics for reward port entries of self and other during the tone (Fig. 3c-d) and during the inter-trial intervals (Extended Data Fig. 7d-f) were non-overlapping in the state-space, and the subordinate neural trajectories were longer (Fig. 3d, Extended Data Fig. 7f). Overall, there was segregation of the ensemble representation of actions of self vs other and rank in mPFC population dynamics across the subspaces (Fig. 3e).
To rule out the possibility that any rank-related differences in win and lose neural trajectories could be explained by differences in spatial location or distance to the reward port ( Fig. 3f-g), we calculated the trajectory lengths for trials when mice were close to, or far from, the reward port, separately. In both cases, we found that subordinate trajectories were longer (Extended Data Fig. 7g-h), consistent with more dynamic mPFC activity regardless of distance to port. In addition, we identi ed single units that were correlated with distance to the reward port (Fig. 3h) and when we excluded them from the port entry neural trajectories, subordinates still had longer population trajectories (Extended Data Fig. 7i-j). Splitting the data into two subsets of random animals did not yield detectable differences in the neural trajectories across the two groups (Extended Data Fig. 7k-n), suggesting that the population dynamics observed across ranks are not due to differences in social identity.
To directly test the hypothesis that mPFC encodes rank and competitive success at the population level, we trained a support vector machine (SVM) classi er to decode competitive success as well as relative social rank from single-trial data (Fig. 3i). Consistent with the linear separation seen in the rst 2 PCs (Fig.   3e), a linear SVM was able to decode rank and competitive success, however, an SVM with a kernel (which increases dimensionality) performed signi cantly better (Fig. 3j, Extended Data Fig. 8a). Altogether, these data demonstrate that the mPFC has a stable representation of social rank and competitive success despite having multiple, rank-independent hidden states for encoding behavioral states during social competition.
Interestingly, social rank and competitive success could be decoded accurately prior to cue onset (Extended Data Fig. 8b; Fig. 3) consistent with the notion that state differences in mPFC correlate with future winning 10 . Social rank was more accurately decoded than competition outcome from mPFC neural activity (Fig. 3k), which may re ect the relative stability of rank versus competitive success. While the idea of a "winning effect" or a "losing streak" is not novel, 10,43-45 we were surprised that the decoding accuracy was stable across the trial, with the mPFC representing future competitive success with the same accuracy as during the actual competition (Fig. 3j). Remarkably, we could accurately predict whether the next trial would be a win or a loss more than 30 seconds before the competition trial began, providing empirical evidence at the cellular level supporting the psychological concept of "a winning mindset." While mPFC activity of dominant mice predicted competitive success with the same accuracy before and during the trial (Extended Data Fig. 8c), subordinate mice showed a signi cant increase in decoder performance of competition outcome once the trial was initiated (Extended Data Fig. 8d).

mPFC single units show rank-dependent responses to task-relevant events during social competition
To determine if the mPFC representation of rank was also present at the single-cell level, we analyzed the ring rate of mPFC single units during task-relevant events of the reward competition. mPFC single units showed responses to the tone for win or lose trials and to port entries performed by self or the other (i.e. competitor) that differed by social rank (Fig. 4a). To identify potential activity patterns linked to dominance, we performed unsupervised clustering using the single unit ring rate during the task-relevant events for all animals pooled ( Fig. 4b; Extended Data Fig. 9a-b) and separated the data by relative social rank post-clustering. Next, we quanti ed the distribution of dominant vs subordinate mPFC cells across functional clusters and identi ed several clusters that were enriched in a rank-dependent manner (Fig. 4ce). Subordinate mPFC cells showed strong excitation to win trials and port entries of the other (clusters 3 & 5), whereas dominant mPFC cells were more likely to respond to win trials and port entries of the self (clusters 4 & 8). As suggested by these differences in the functional clusters, the dominant and subordinate mPFC cells responded differently to competition outcome and reward port entries. Dominant mice had more cells that were responsive to self port entries while subordinate mice had larger responses to win trials and port entries of the other (Fig. 4f-i; Extended Data Fig. 9c-f). Surprisingly, subordinates had phasic responses of greater amplitude in response to events, which is consistent with subordinates having longer neural trajectories. Given the functional diversity of neural responses from individual mPFC neurons, we next wanted to investigate how information was routed out of the mPFC during social competition.
mPFC-LH neurons encode social rank and modulate dominance behavior Next, we sought to investigate which subcortical-projecting mPFC subpopulations contributed to the encoding of social rank during social competition. Several mPFC subcortical pathways have been implicated in social behaviors 46 . Among these, we investigated the downstream projection to the lateral hypothalamus (LH), as it is the most prominent prefrontal top-down circuit to the hypothalamus and modulates social exploration 47 , defensive behaviors 48,49 , and reward and aversion 47,[50][51][52] . We also investigated the mPFC projection to the basolateral amygdala (BLA), because recent evidence suggests that BLA ring rates correlate with the social rank of conspeci c faces in non-human primates 53  To selectively activate mPFC cells that project monosynaptically to the LH or BLA, we used an intersectional viral strategy to express ChrimsonR 57 in each projection ( Fig. 5a-b, Extended Data Fig. 10ab). Ex vivo, mPFC-LH and mPFC-BLA cells red action potentials with photo-response latencies of less than 8 ms to red light, while non-expressing neighbors only had subthreshold activations that were slower, allowing us to use this photo-response latency threshold for photoidenti cation 58 . Therefore in vivo phototagging of these subpopulations is permissible with an appropriate photo-response latency threshold (Fig 5a-b). We then recorded mPFC single units wirelessly during the reward competition and delivered red light pulses at the end of the competition to photo-identify mPFC-LH or mPFC-BLA neurons (Fig. 5c-d). We found that more mPFC-LH neurons were responsive to port entries done by the self compared to non-phototagged units, while there was no difference between mPFC-BLA neurons and nonphototagged units (Fig. 5e).
To determine whether these mPFC subpopulations contributed to the encoding of social rank or competitive success, we used an SVM classi er and removed a subpopulation prior to training the classi er or removed a matched number of non-phototagged cells. Removing mPFC-LH neurons, but not mPFC-BLA neurons, signi cantly decreased the performance of decoding social rank (Fig. 5f). Conversely, decoding of competitive success was unaffected by the removal of mPFC-LH neurons from the training data set, but was improved when removing the mPFC-BLA neurons (Fig. 5g). Importantly, mPFC-LH neurons did not contribute to the encoding of competitive success, suggesting that reward prediction and social rank could be encoded by different subpopulations in the mPFC. Altogether, these data suggest that mPFC-LH, but not mPFC-BLA, neurons contribute to the encoding of social rank in the mPFC.
To directly test the hypothesis that mPFC-LH neurons modulate social dominance-related behavior, we expressed either ChR2 or eYFP in mPFC-LH neurons and implanted an optic ber in the mPFC ( Fig. 5h; Extended Data Fig. 10b-c). After mice learned the tone-reward association, we performed the reward competition assay two days in a row: one day with no light and the other day with light delivery to the relative subordinate mouse in the pair during 5 minute on/off epochs consisting of 5 ms pulses at 100 Hz every 200 ms (Fig. 5i). ChR2-expressing mice won more rewards during the entire competition, had higher reward port occupation, and spent less time being displaced from the reward port when they received optical stimulation (Fig. 5j-m). Importantly, stimulating mPFC-LH neurons did not affect behavior while performing the reward competition assay alone (Extended Data Fig. 10d). In addition, mPFC-LH stimulation did not affect food consumption, sociability, anxiety-like behavior, or conditioned place preference (Extended Data Fig. 10e-h). Altogether these data suggest that mPFC-LH stimulation increases social dominance behavior rather than affecting hunger or other motivated behaviors. An alternative interpretation of these results is that mPFC-LH neurons are increasing effort behavior, resulting in more won trials during the competition. Indeed, there is literature suggesting that the mPFC is necessary for effort-based decision making 59 . To test this hypothesis we used an effort-choice based T-maze paradigm [59][60][61] in which mice choose between a low-effort low-reward arm or a high-effort high-reward arm in which they have to climb a wall to obtain the bigger reward (Extended Data Fig. 10i). Stimulation of mPFC-LH neurons did not increase effort as measured by the number of high effort choices (Extended Data Fig. 10j), indicating that a general increase in effort does not explain the increase in winning observed with stimulation of mPFC-LH neurons during the social competition.
Taken together, these data demonstrate that the mPFC neural activity predicts future competitive success, can be decoded to predict social rank and uses top-down circuits to exibly guide social behaviors. Interestingly, although mPFC neurons encode social rank, the way they predicted behavioral states was independent of rank, suggesting that a common coding rule guides social behaviors during competition. Importantly, the way that mPFC ensembles encode behavior is dynamic, which suggests a model in which internal states in uence how mPFC modulates behavior, consistent with a role in exibly guiding behavior. Our data demonstrate that cortico-hypothalamic circuits carry social rank information which could potentially modulate the many different neuropeptide and hormone expressing subpopulations in the hypothalamus to achieve behavioral modulation based on social rank.
Considering the critical role for rank identi cation in interpreting the quality/quantity of social contact from a given social gesture, these data help to complete and synthesize previous ndings. Here, we nd that the mPFC plays a critical role in representing dominance, and con dence in future competitive success. We previously reported that anterior cingulate cortex (ACC) circuits play a critical role in observational learning 23,54,62,63 . These related circuits show complementary, but distinct functions, as the ACC-BLA circuit is critical for observational learning 54 , and the mPFC-BLA projection is involved in anxiety 64 , the mPFC-BLA projection is not critically involved in the representation of social rank (Fig. 5f) nor competitive success (Fig. 5g). We speculate both the ACC and mPFC contribute heavily to the detection of social contact and the evaluation of social rank through reciprocal loops between ACC and mPFC. Based on the known connectivity of the mPFC to dorsal raphe nucleus (DRN) dopamine neurons through both direct, reciprocal connections, and through indirect connection via the lateral hypothalamus 65 (mPFC-LH-DRN), we speculate that mPFC circuits contribute heavily to the "social rank" node within a social homeostatic system 66,67 . Further, with the LH upstream of dopamine neurons that represent the cellular substrate for social reward (VTA) 68 and a loneliness-like state (DRN) 66 , we speculate that the LH may represent a control center that can access these different downstream effector systems when either a surplus or de cit in social contact is detected.
This study not only unveils a number of technological advances that together provide a platform for the investigation of social hierarchies, but also connects a number of disparate pieces of information that support the notion that there is a neural circuit for social homeostasis.

Methods
Due to technical di culties, the Methods section for this manuscript can only be viewed as a donwload in the Supplemental Files section.