Abstract
The social structure of an animal group controls how members interact, and affects nearly every aspect of an individual’s behavior with others. Rodents are a model system for studying both individual and social behavior, and social status such as dominance affects access to mating opportunities and food resources. However, it is not known how individual behavioral patterns interact to generate the overall social structure of a group, and how individual social positions within a group change over time. In this study, we employ long-term tracking to demonstrate that individual social status and group social structure are emergent outcomes of interactions among group members, which are not simply predicted by individual traits or previous behavioral patterns. Using quantitative measures to describe individual behavior and group social structure, we demonstrate that although individuals maintain established behavioral patterns and social positions within a given group, behavioral routines shift when group composition is changed. A comparison demonstrates that traditional individual and pairwise tests for boldness, and social interest are inadequate for describing or predicting actual behavioral outcomes in a group setting.These results emphasize the context-dependence of social behavior as an emergent property of interactions within a group, and highlight the need to measure and quantify social behavior in naturalistic settings.
Introduction
Collective behavior emerges based on interactions between individuals in a group. This is observed at many different scales, from wound healing at the cellular level [1], to task allocation in social insects [2], group search behavior [3], and information exchange on human social networks [4]. Animal groups differ in their social structure. For example, baboons and capuchins have a hierarchical structure [5, 6], while spider monkeys have a more egalitarian structure [7]. Social network structure influences decision-making [8, 9], and dominance position within a network can influence an individual’s fitness [6].
The study of social behavior is particularly important in animal models utilized for the understanding and treatment of social-related neuropsychiatric disorder symptoms. Rodents such as mice and rats have been indispensable as model biological organisms [10, 11, 12], with particular relevance to clinical research due to their short life span and tolerance to laboratory environments. However, the laboratory environment typically restricts the development of complex social behaviors. Under ideal circumstances, laboratory rats would be housed in complex environments in large groups that mimic the conditions experienced by their wild ancestor, the Norway rat (Rattus norvegicus) [13, 14]. During experiments, however, rats are often kept in small cages, and then transferred to separate environments in order to examine social interactions in the form of pairwise encounters. It is therefore not surprising that the translational relevance of these tests is limited [15, 16]. Incorporating environmental and social complexity into experiments can increase the generalizability of conclusions drawn from laboratory studies [17, 18]. With rats, previous work has shown that individuals within a group have a social status related to dominance and that aggression and avoidance behavior are key elements of social interactions [13, 19, 20]. However, it is not known how individual interactions lead to the overall social structure of the group [21], and how social structures change over time. Fortunately, new automated tracking methods enable long-term tracking of individuals within social groups, providing a quantitative description of behavior and interactions [22]. For example, recent work has analyzed the ontogeny of collective behavior in zebrafish [23], lifetime behavioral differences in honeybees [24], and how genetic relatedness corresponds to group social structure in mice [25].
In this work we utilize a vision-based automated tracking and behavioral characterization system designed to analyze the social behavior of small animals like rats. As the tagging of individuals is nonintrusive and the monitoring is video-based, there are few technology requirements, including just a single camera and hair dye. For an extended 36-week period, we use this method to track the social behavior of 28 rats divided into several groups, and calculate behavioral metrics and interactions to analyze both individual and group behavior. At first, the rats were divided into 4 groups of 7. Following this, we merged groups, then created 4 new groups of 7. We examine how individual behavioral differences persist and combine to form new social structures when the composition of the group is altered. Following the completion of the group experiments, we ran individual behavioral assays on each rat and compared the results to those of the group experiments. These methods and experiments enabled us to (1) identify a wide range of locomotion and social behaviors, (2) investigate the formation and details of dominance hierarchies, and (3) investigate the effect of environmental and social stress on the behavior of rats living in groups in semi-natural environments. The results demonstrate how the social structure of the group emerges through interactions and underscores the need for quantitative behavioral measurements of group social structure and interactions.
Results
Long-term tracking and quantifying individual behavior
We tagged individuals with color markers and employed automated tracking to determine each rat’s movement over time (Figure 1A-D). Over the course of the experiment, we performed manipulations in order to alter the group composition and the living area available for the group to use. We used two different strains of laboratory rats, denoted A and B (see Methods for details). We initially divided the rats into four groups of seven, with A rats in groups A1 and A2 and B rats in groups B1 and B2. The rats remained in these groups for the first observation period which lasted a total of 21 weeks - we denote this time as Period 1. Following this, in Period 2, we merged groups A1-A2 and B1-B2 for three weeks, and then merged all for three weeks by opening portals between their compartments. Period 3 featured the formation of four new groups, where rats from all original groups were mixed together. Figure 1E shows the experimental structure and the associated measurement periods.
(A) Photo of the rats with color-codes for individual identification and tracking. (B) Still image from the video that was used for tracking (from group G1, during Exp. 10) taken by a light sensitive camera at low lighting conditions. Image overlaid with labels indicating the important objects (water, nestbox, etc.). (C) Continuous tracking allowed for the reconstruction of each individual’s space use. The heatmap shows the space use of two rats during a 3-week period at the beginning of Period 3. Areas used only by a7 are shown with red, only by b13 with green, and areas visited by both (e.g. at the water and the feeder) are shown with yellow. (D) Trajectories were used to identify dominance interactions in the form of approach-avoidance events, where one individual approaches another, but the other moves away (by backing up or fleeing). Shown is an example of trajectories from group G3 in Exp. 10. Lines show locations during 1500 total frames, and the semitransparent circles of increasing size show the last 600 positions. (E) Overview of experimental manipulations. We refer to each 3-week period as an “Experiment”, and calculate behavioral metrics over these periods. Period 1 had rats in original strain-sorted groups A1-A2 (strain A), B1-B2 (strain B), for a total of 21 weeks, or 7 experiments. In Period 2, the groups were mixed together by strain during Exp. 8, and then all together for Exp. 9. At the beginning of Period 3 (Exp. 10), new groups were formed (G1-4). During Exps. 11 and 12 in Period 3, the compartment area sizes were changed (see Methods). At the end of the experiments, individual behavior was assessed by traditional individual and pairwise assays. (F) Summary of the behavioral metrics measured for each individual in each experiment, as well as those from the individual and pairwise behavioral assays.
We measured body mass, counted wounds, and calculated automated trajectory-based behavioral metrics to quantify behavior over the duration of the experiment (Figure 1F). In addition to the individual metrics, we used pairwise approach-avoidance contests [26] to quantify social dominance interactions, and calculated mean number of pairwise contests, fraction of contests won, and local reaching centrality [27] from the network of excess pairwise contest wins for each rat. We calculated and averaged each metric over successive time periods of 3 weeks and refer to each 3-week period as an “Experiment” (denoted as Exp.), with associated numbers 1-12. We use the summary metrics to ask how behavior changes over time, how individuals differ, how groups differ, and how previous individual and group behavior predicts changes when new groups are formed.
Period 1 strain differences and social structure
In Period 1, the four original groups were organized by strain, and we first examine general differences between the strains. The strain A rats in groups A1 and A2 have individual labels a1-a14, and the strain B rats in B1 and B2 are labeled as b1-b14 (see Figure 1E). At the beginning, the rats were juveniles and were growing rapidly, as shown by the large increases in body mass during this time period. The A rats were on average larger than the B rats. In addition, strain A rats tended to be farther from the wall, visited more parts of the living compartment (higher territory size), and spent less time on top of the nestbox in comparison with B rat groups (t-test, p<0.01 comparing per-rat averages of strain A versus B rats for distance from wall, territory size, and top of nestbox; Figure 2A).
(A) Metrics of time at feeder, distance from wall, territory size, and top of nestbox, showing the mean (solid line) and standard deviation (filled area) of each metric within each group. Note: territory size was not calculated for Exp. 1. (B) Bodymass and social behavioral metrics of num. contests (mean number of contests one rat had with another rat), fraction won, and reaching centrality for individuals in each group during Period 1. Individuals are shown with different colored lines, and labeled with lowercase letters a or b according to strain. Individual numbers within each group are sorted in ascending order according to body mass at the end of Period 1, i.e. a7/a1 were the largest/smallest in A1 during Exp. 7, a14/a8 were the largest/smallest in A2, etc. (C) Group-level metrics, including the overall mean number of pairwise contests, the fraction of contests that were with the most dominant rat, the Gini coefficient of within-group reaching centrality, and the symmetry coefficient.
We tabulated approach-avoidance contests between all pairs of rats in each group to assess dominance-related social interactions. This automated method defines “contests” as when a pair of rats came close to each other: the “winner” is the rat that subsequently stayed in place or continued moving forward while the other (the “loser”) moved away [26]. This type of approach-avoidance interaction can also be dynamic, such as when one individual chases another. In order to define the dominance structure of each group, we use the number of contests, the fraction of contests won, and the local reaching centrality of each individual.
Figure 2B shows that all rats had pairwise contests during Period 1, and that the fraction of contests won differed between individuals in each group. Individual differences in the fraction of contests won suggest the existence of distinct social structures in each group that persist over time. Individual reaching centrality is a measure that uses the directed network of excess pairwise contest wins (positive entries for rats in a pair that won more contests, and zero for the other rat - see Methods) in order to assign higher scores to individuals in higher positions within a group hierarchy [27]. The spread of values of reaching centrality with the groups also suggests the existence of distinct social structures.
Next, we use the pairwise network of won/lost contests to visualize the social structure of each group, using reaching centrality to place more dominant individuals higher up on the y-axis. Along with this visualization, we quantitatively describe the structure of each group as a whole using the mean number of contests, the fraction of contests that were with the most dominant rat, the Gini coefficient of within-group reaching centrality, and the symmetry coefficient. The Gini coefficient is a measure of inequality of values in a distribution, with higher values representing higher inequality [28]. The symmetry coefficient is a measure between 0 and 1 to quantify dominance balance in contests, with a value of 1 representing perfect symmetry (equal amount of wins) between each pair [26].
While individual tendencies of fraction contests won showed consistency (Figure 2A), each group’s overall dominance network structure varied over Period 1 (Figure 3). At the end of Period 1, groups A1 and A2 had the most hierarchical structures: This is demonstrated both by the higher values of global reaching centrality (Figure 2C), as well by the embeddings of these networks (Figure 3).
A visualization of group networks during Period 1 (Exp. 2-7), with columns corresponding to different groups, and rows to each experiment. The position of each individual on the y-axis is set according to their normalized local reaching centrality, which is normalized by the mean and standard deviation of each group for a certain experiment (see also non-normalized values in Figure 2B). The direction of each connection indicates which individual won more contests (e.g. a connection pointing from a4 to a6 indicates a4 won more pairwise contests with a6 during the specified experiment), the color indicates the fraction won, and the transparency is proportional to the total number of pairwise contests relative to the mean for that group and experiment. Exp. 1 is not shown because few contests were observed during this time when the rats were juveniles.
Behavior shows consistency over time, but changes when groups are mixed
To quantify consistency in each rats’s behavior over time, we calculated the correlation coefficient of each behavioral metric between measurement periods. The positive correlation coefficients during Period 1 indicate persistence in individual behavior (Figure 4A).
(A) Correlation with the previous experiment. For Exp. 10 at the beginning of Period 3, the correlation is calculated with Exp. 7 at the end of Period 1. Note: territory size was not calculated for Exp. 1. (B) Correlation with Exp. 7 (the last measurement in Period 1).
Following the Period 3 regrouping, there was a change in behavior, as demonstrated by the significant decrease in correlation coefficients for each metric. However, in subsequent experimental measurements in Period 3, the correlation of each metric subsequently increased and remained high, with the exception of time spent near the feeder and total contests. This suggests that individuals adopted new behavioral routines and groups developed new social structures that persisted for the remainder of Period 3. However, although subsequent experimental measurements in Period 3 showed a high correlation in individual metrics (Figure 4A), the correlation of Period 3 measurements with the last measurement in Period 1 remained low (Figure 4B). This indicates that the new behavioral routines of Period 3 differed from those of Period 1. Figure S2 shows that the per-group correlations for either Period 1 or Period 3 yield overall similar trends.
Taken at low-light condition (i.e. during active period).
Figure 4 shows correlations for all rats, and here shown is the correlation coefficient calculated specific to rats in each group. (A) Correlations per Period 1 groups, and (B) Correlations per Period 3 groups. For each the top row shows the correlation with the previous experiment (analogous to Figure 4A). For Exp. 10 at the beginning of Period 3, the correlation is calculated with Exp. 7 at the end of Period 1. The bottom row of each shows the correlation with Exp. 7 (the last measurement in Period 1 - analogous to Figure 4B). Note that territory size was not calculated for Exp. 1.
New group behavior in Period 3
Next we look in more detail at the behavior of rats following the regrouping in Period 3. The low correlation in the individual fraction of contests won and reaching centrality across periods indicates that the more dominant individuals during Period 1 were not always more dominant during Period 3. Moreover, Figure 5A shows that if individuals had continued their same behavioral tendencies of Period 1, then each new group would have been fairly similar. The observed differences between the new groups reflect new and distinct behavior and social structures, which are not just an extension of previous hierarchies, but rather an emergent result of the interactions between individuals in each group.
(A) Metrics of time at feeder, distance from wall, territory size, and top of nestbox, showing the mean (solid line) and standard deviation (filled area) of each metric within each group. The top row shows data from Period 3, and the bottom row shows predictions if individuals had continued with the same behavior they exhibited at the end of Period 1. (B) Bodymass and social behavioral metrics of num. contests, fraction won, and reaching centrality for individuals in each group during Period 1. Individuals are shown with colors corresponding to original groups during Period 1. In Group G1, we permanently excluded rat a10 (after Exp. 10) and temporally removed rat a12 (after Exp. 11) from the group due to poor health. a12 recovered and was reintroduced to its group and thus was subsequently tested in the individual and pairwise tests. (C) Group-level metrics for each group in period 3, including the same metrics shown in Figure 2C).
The social structures of the new groups during Period 3 varied. While there were many more contests in Period 3 in comparison to Period 1, the number of contests progressively decreased over time for groups G1&G3 (Figure 5C). Groups G2&G4 had a distribution of scores indicating differences among individuals and the lack of a single clearly dominant individual (with the exception of Exp. 10 for G2). In contrast, G1&G3 each had a distinct “dominant” individual with higher fraction contests won and reaching centrality than others in their respective groups. For G1, this was rat a7, and for G3, this was rat a5 (who was the dominant individual from Exp. 11 onwards) - both of these rats also were the largest in their respective groups during Period 3 (Figures 5B,6).
A visualization of group networks during all of Period 3, using the same style and embedding approach as Figure 3.
While the most dominant rats in G1&G3 were of the A strain, the opposite is seen for G2, where B rats tended to be more dominant. In addition, for all of Period 3, we note that the most dominant individuals at the end of Period 1 never became the most dominant in their new respective groups during Period 3.
The distribution of reaching centrality varied by group, as indicated by the higher Gini coefficient values for Groups G1&G3 compared to G2&G4 (from Exp. 11 onward). Although Groups G1&G3 both had hierarchical structures, these groups also differed from each other. The symmetry index, which represents either one individual in a pair dominating contests (low values) versus the exchanges of wins-losses between pairs of rats (high values), differed for these groups: G3 had a lower value than G1, indicating more lopsided win-loss balances. Furthermore, the fraction of contests with the dominant individual remained high for G3, while it decreased over time for G1 (Figure 5C). These measures suggest a possible weakening of the hierarchy in G1 but not in G3.
Although the total number of contests decreased over time for groups G1&G3, it was generally higher for groups G2&G4, suggesting an ongoing struggle for position within these groups. However, all groups had some degree of consistency in social structure from Exp. 10 to Exp. 11, as shown by the positive experiment-to-experiment correlation coefficients for fraction contests won and reaching centrality (Figures 4A, S2B). From Exp. 11 to 12, group G4 had the weakest continuity in social structure, as shown by the visualization in Figure 6 and by the low correlation of reaching centrality for G4 specifically from Exp. 11 to 12 (Figure S2B). To summarize, G1 and G3 had a single dominant individual and fewer contests over time, while G2 and G4 had social structures that evolved over time and overall more pairwise contests.
Body mass changes
Next we examine the changes in body mass in Period 3 in more detail. Although at the start of Period 1, all rats were juveniles and gaining weight, by the end of Period 1 the average weight gain from the previous experiment was small and not all rats were still gaining weight. When the groups were combined in Period 2, the average change in body mass (Δ body mass) continued to decrease, and was negative for the last experiment of Period 2 and the first of Period 3. In particular, in the new groups of Period 3, the spread in the distribution of Δ body mass greatly increased, with one rat (rat a10, who then was permanently excluded from the experiment) losing nearly 100g from the previous period (Figure 7A). Although the differences in body mass between strains remained during Period 3, each group was not the same: G1 had clear differences in body mass for A versus B rats, while other groups had less offset between strains (Figure 5B).
(A) Distribution of body mass (top), and body mass changes over time (bottom). The middle line is the mean, and top/bottom lines are the maximum/minimum across all individuals. For Exps. 1-9, all are plotted to-gether, but for Period 3 lines are shown separately for the groups with more hierarchical structures (G1 and G3), compared to the other groups (G2 and G4). (B) Average fraction contests won and average normalized reaching centrality compared to body mass change during Period 3 for each rat, showing correlations separately for the more hierarchical groups G1 and G3 compared to groups G2 and G4. Change in body mass during Period 3 is calculated as the body mass in Exp. 12 minus body mass in Exp. 10. Because absolute values of reaching centrality differed among groups and changed over time (see Figure 5), in order to compute averages reaching centrality is normalized by subtracting the mean and dividing by the standard deviation of values for a given group during each experiment.
To examine how social structure relates to body mass, we compare dominance-related social metrics to weight gain or loss during Period 3. Due to the different social structures observed in the different groups, we examine separately the groups with more hierarchical structures (G1 and G3) compared to the other groups (G2 and G4). For groups G1 and G3, we see that both the average fraction of contests won and the average normalized reaching centrality during Period 3 showed significant positive correlations with Δ body mass during Period 3; however, for the other groups (G2 and G4), there was no clear or significant correlation (Figure 7B). This demonstrates the complex interplay between dominance and body size [29, 30]. While dominance status within a hierarchical structure can lead to weight gain for more dominant individuals and weight loss (due to stress and less access to resources) for subordinate individuals, this trend generally does not extend to groups with evolving or less hierarchical structures. In addition, despite the fact that the two most dominant rats a7 and a5 were already relatively large prior to Period 3, we find that body mass prior to Period 3 is not a general predictor of social status in the newly formed groups (Figure S3).
Average fraction contests won and average normalized reaching centrality (x-axes) compared to body mass in Exp. 9 preceding Period 3 (y-axis) for each rat, showing correlations separately for the groups with more hierarchical structures (G1 and G3), compared to the other groups (G2 and G4). These plots are analogous to Figure 7, where change in body mass during Period 3 is plotted on the y-axis.
Individual metrics compared to behavioral assays
Following the conclusion of the group experiments, we tested each rat individually using standard individual and pairwise assays. We use the assays to define scores representing boldness, social interest, and self grooming tendencies, and compare these with the behavioral metrics calculated during the group experiments. The boldness score is derived from individual assays, and the social interest and self grooming scores are derived from pairwise tests with an unfamiliar rat (see Methods; Figure S6).
Number of wounds counted for each rat, during experiments in (A) Period 1, and (B) Period 3.
(A) black and white box, (B) canopy, (C) elevated plus-maze, and (D) test apparatus used for pairwise social tests.
(A) The black and white box, canopy, and elevated plus-maze test scores (Figure S5A-C) were used as input to principal component analysis (PCA). The first PCA component is used to define the composite “Boldness” score. (B) Embedding labeling each individual rat’s score values projected onto the first two PCA axes, with colors representing the different Period 3 groups. (C) Measures from the pairwise interaction tests with an unfamiliar individual (Figure S5D) were used as input to principal component analysis. Note that while the pairwise tests were also done with a familiar rat, and again with a different unfamiliar rat, the PCA components are determined and set from the first unfamiliar rat tests and these are shown here. Projections onto the first PCA component are used as a “Social interest” score, and onto the second component as a “Self grooming” score. (D) Embedding labeling each individual rat’s scores projected onto the PCA axes shown in (C), for pairwise tests with an unfamiliar individual, a familiar individual, and a second unfamiliar individual. Colors represent the different Period 3 groups.
In general, we find low and/or inconsistent relationships between behavior in groups and behavior in the assays. Strain and group membership do not consistently predict differences in individual test scores (Figure 8A).
Individual behavioral assays include multiple tests that are used to obtain measures of Boldness, and Social interest (see Methods). (A) Individual score distributions according to strain (left), and by Period 3 group membership (right). Scores are normalized by the mean and standard deviation of values measured for all rats. (B) Correlation of space use and social behavioral metrics from Exp. 12 with individual assay scores. The colors indicate correlation values.
Comparing behavioral metrics from the last experiment in Period 3 with individual test scores, we did not find any significant correlations. However, we see positive correlations for boldness scores compared to the related metrics of distance from wall and territory size. The social metrics measured in the group setting (num. contests, fraction won, and reaching centrality) do not show consistent or significant correlations with the pairwise social interest score.
The pairwise tests performed with an unfamiliar rat which were used to derived the social interest and self grooming scores shown in Figure 8, were repeated with a second unfamiliar rat, as well as with a familiar rat from the respective Period 3 groups; we note that these tests led to different individual results (Figure S7). These comparisons support the general conclusion that group behavior is context-dependent, behavioral patterns are influenced by social feedback, and that pairwise assays cannot provide a complete description of group behavior.
(A) Scatter plots with regression fit comparing scores derived from the individual and pairwise tests. The boldness score is defined using multiple tests (see Figure S6A), and here is also compared with results from each of these tests. The social interest and self grooming scores are defined using the pairwise tests (see Figure S6B). (B) Correlation of scores. The colors indicate correlation values, and bold outlines highlight significant correlations (p < 0.05).
Discussion
We analyzed how groups of rats develop and maintain a dynamic social structure over time, and how social structure changes when new groups are formed. Although individuals showed behavioral consistency within each experimental period, we observed behavioral shifts after the regrouping in Period 3. Individual rat positions in the social dominance hierarchies of the new groups were not simply an extension of their social status of the previous group, indicating that feedback from interactions within a group is crucial to the formation of social structure. Moreover, this demonstrates that an individual’s status is affected by feedback within their social network, rather than being a purely innate trait. The comparison of behavior in groups to that measured by common assays showed inconsistency, without strong association patterns. This highlights the need to consider the group setting to understand social behavior in context.
At the beginning of Period 1 the rats were still juveniles. Social interactions, particularly those related to aggression and dominance, are known to develop over time [13, 14, 31]. Our observations are consistent with this, in particular because we observed an increase in the number of wounds from fighting at the end of Period 1 (Figure S4). It is likely that in addition to group composition and interactions, development stage also influenced the differences in number of wounds and number of contests from Period 1 to Period 3. In a natural population, groups consist of individuals of different ages [14]. Targeted group mixing experiments – for example with both juveniles and adults in the same group – could be used to ask how these effects interplay to generate overall emergent group social structures.
We observed distinct social structures for each rat group, with particularly hierarchical structures for groups G1 and G3 in Period 3. Hierarchical structures are common in animal groups, for example in grooming relationships of chimpanzees [32], leadership and movement of pigeons [26], and reproduction in cichlid fish [33], as well as in the structure of human organizations [34] such as businesses [35] or city services [36]. Such groups differ in whether membership is fixed or changes over time (i.e. fission-fusion dynamics [37, 38]). While animal groups such as rats have selection pressure on individual animals, human organizations, such as corporations, are often evaluated based on overall collective performance criteria. By analyzing collective mechanisms for constructing and sustaining social structures, as well as how these structures are connected to individual and group behavioral outcomes, we can compare diverse collective systems and inquire about general patterns and organizational principles [39].
Behavioral assays are often used to quantify the behavior of rodents, and many new tools are being developed for both individual and social tracking and behavioral scoring [40, 41, 42, 43, 44, 45]. Tests that have been used to quantify social behavior in rodents include reciprocal social interaction, social approach partition, social preference, and social transmission of food preference [46]. Most of these tests rely on creating artificial situations in order to measure the corresponding behavioral outcome. It is an open question as to whether the social behavior measured in such tests can predict the social behavior under more natural conditions that includes complex social interactions [47]. Our comparison with the results of pairwise social interest tests highlights the need for further work in this area. Long-term studies to examine group behavior may be an essential component to include in translational research applications, for example in the testing of psychotherapeutic drugs to treat social anxiety [15, 16]. In particular, an important topic for future work is to establish standardized and reproducible tests and measures that are properly representative of a full range of social behavior [48, 18].
Another important application is understanding the neural basis of social interactions. The great majority of our neuroscientific understanding of social behavior comes from dyadic interactions and reduced forms of social interactions [17, 49, 50, 51]. In light of the expanding interest in the neuroscience of natural social behavior [47], going beyond basic social testing paradigms and static characterizations of social hierarchy lends the opportunity to unravel a richer repertoire of neural mechanisms.
We note that while our social behavior analysis was used with video tracking data, it could be applied to other types of data, for example, data derived from markerless tracking methods, motion capture or QR-code tracking. Future work can build on methods in this area, for example including more detailed posture data, which can be used to describe social interactions in more detail [52, 53, 54, 55]. Systems in this direction have already been developed for use with mice [42]. Another area for future work is testing the functional consequences of group composition and social structure on individual or group performance, for example with respect to search [3].
In summary, we identified and described the social structure of groups of rats using automated tracking over a period of nine months, and showed how social structure changes following a regrouping. The results demonstrate the importance of observing social dynamics over long time scales in order to fully comprehend the non-stationary dynamics at play. In addition, our study shows that overall group social structure is not simply a consequence of individuals with different characteristics, but instead is governed by feedback processes where individual characteristics and social structure interact to produce emergent group dynamics.
Author contributions
T.V. and M.N. conceived the idea and designed the project. M.N., G.V., D.Á., and E.K. conducted the experiments and collected the data. E.K. performed the analysis of the individual assays. G.V. designed and wrote the software framework for tracking the individuals. M.N., G.V., and V.T. designed and performed the analysis of the behavior within the groups. J.D.D., M.N., and A.E.H designed the analysis of the group-level data. J.D.D. performed the analysis of the group level data. J.D.D., M.N., and A.E.H wrote the initial draft of the manuscript, and all authors revised the manuscript.
STAR Methods
Resource availability
Lead contact
Further information and requests for resources and reagents should be directed to and will be fulfilled by the Lead Contact, Mate Nagy (nagymate{at}hal.elte.hu).
Materials availability
The study did not generate new unique reagents
Data and code availability
Trajectory and behavioral metrics data are available through Zenodo at doi.org/10.5281/zenodo.7615468. Recorded video sequences were analyzed offline with a custom-written software to obtain individual positions and orientations, as well as metrics (for details see SI Methods of [3] or download the latest source code from github.com/vasarhelyi). The scripts to run analyses included in this paper are available at github.com/jacobdavidson/ratsocialgroups.
Experimental model and subject details
Subjects
We used 28 Wistar male rats from 2 inbred strains (14 Crl:WI BR and 14 HsdBrlHan:WIST, 7 litters/strain, 2 individuals/litter; ordered from Toxi-Coop Zrt, Hungary) in this study. The rats arrived on 24 May 2011 at an age of 6 weeks. Rats were separated into 4 same-strain groups (i.e. the Period 1 groups), each containing 7 rats from different litters, and were housed and tested together.
Each rat was marked with a unique 3-color barcode on its back using nontoxic “Special Effects” hair dye in 5 distinctive colors (Red: Nuclear Red, Orange: Napalm, Green: Sonic Green, Blue: Londa color 0/88, Purple: 4 units Atomic Pink and 1 unit Wild Flower). These codes were applied/renewed every 3 weeks.
Ethical guidelines
The procedures comply with national and EU legislation and institutional guidelines. The experiments were performed in the animal facilities of the Eotvos University, Hungary, and in accordance with Hungarian legislation and the corresponding definition by law (1998. évi XXVIII. Törvény 3. §/9. — the Animal Protection Act), which states that noninvasive studies on animals bred for research are allowed to be performed without the requirement of any special permission (PE/EA/1360-5/2018).
Method details
Experimental conditions and monitoring
Animals were housed in 4 compartments (sized 100 x 125 x 100 cm3) with polypropylene covered wooden walls and sawdust changed weekly on a tiled floor. Their room was kept at a controlled temperature of 21 ± 2°C, and with controlled light conditions featuring a daily cycle with 13h/11h dark/light. The dark (active) period was from 6am to 7pm with illumination at floor level ∼3-4 lux; the light period followed from 7pm to 6am of the following day with illumination of 300 lux. We video recorded the compartment 24/7 using a low-light sensitive camera fixed to the ceiling (Sony HDR-AX2000, 2.9 × 1.8 m2 field of view, 1920 × 1080 resolution, 25 fps de-interlaced). Rats had ad libitum access to water and a shelter (nestbox), and access to food based on a fixed schedule for automated feeding. The feeding schedule followed a weekly cycle: 3 days (Sat, Sun, Mon) access to food 3 times for 1 hour (at 6am, noon, and 6pm); 3 days (Tue, Wed, Thu) access to food 2 times for 1 hour (at 6am and 6pm); and 1 day (Fri) access to food ad libitum between 6am and 7pm). The housing compartments were cleaned once a week.
We measured the weight of each individual three times a week (Mon, Thu, Fri; between 5pm and 6pm) and counted fresh wounds. Classification of wounds followed a predefined but arbitrary scale ranging from 0 to 6, which used the following conventions: 0 → no wounds received in the last 3 days, 1 → 1 fresh wound, 2 → 2 fresh wounds, 3 → few (3-4) fresh wounds, 4 → more than few (5-7) wounds, 5 → many (8-12) wounds, and 6 → even more wounds (13 or more). When a rat was seriously injured, we temporarily removed it until it was recovered. This happened on one occasion: a12 was taken out from 5 to 27 Jan. 2012. One rat (a10) was permanently removed due to injuries and weight loss at week 31 (19 Dec 2011) at the age of 37 weeks.
Individual and social interaction tests
These tests were performed at the end of the group measurement period, and included a total of 27 male rats at the age of 44 weeks. Subjects participated a test battery consisting of seven subtests examining fear-related and social behaviors in the following order (see descriptions below): black and white box, canopy, elevated plus-maze, social interaction test with outgroup conspecific, and social interaction test with in-group conspecific. The illumination during these tests was set according to the dark period mentioned above. Body weights were 480±70g (mean±SD) at the time of these tests. The behavioral tests were conducted on three consecutive days between 10 a.m. and 6 p.m. (26 to 28 Feb 2012). The apparatuses were constructed from plastic sheets and cleaned between tests. Depending on the test, either automated analysis was used to obtain trajectories or the behavior was coded by observers using the Solomon Coder software (beta 19.08.02). To ensure inter-observer reliability, pairs of observers overlapped in 20% of the behavioral tests they scored. Using this overlap, the inter-observer reliability was calculated using the intraclass correlation coefficient (ICC) for all variables except the video frame variables, and we found all observations to be reliable (ICC > 0.9).
1. Black and white box. As described in Ramos et al. [56], the apparatus had a black and a white compartment (each sized 27x27x27). The white compartment was strongly illuminated by a white bulb (∼825 lux), while the black compartment was illuminated with a red bulb (∼90 lux; Figure S5A). The bulbs were positioned 37 cm above the apparatus floor. Each rat was initially placed in the center of the white compartment in a direction facing the opposing black compartment, and behavior was then recorded for 5 minutes. We tallied the number of video frames when the animal was in the 1) white compartment, 2) black compartment, or 3) at the border of the two areas and thus could not be clearly assigned (labeled as “both” in the data).
2. Canopy. The apparatus consisted of a circular platform (104 cm in diameter) and a canopy (semitransparent red Plexiglas of 70 cm diameter) 10 cm above the platform (Figure S5B). The mean illumination was 90 lux under the canopy and 400 lux outside of the canopy. At the beginning of the test, the animal was placed under the canopy. The test lasted for 5 minutes. We counted the number of video frames when the animal was 1) under the canopy, 2) in the exposed zone.
3. Elevated plus-maze. Based on Ramos et al. [56], the apparatus had four elevated arms (66 cm from the floor), 45 cm long and 10 cm wide (Figure S5C). Two closed arms enclosed by a 50 cm high wall were located on opposing sides, and two open arms on the other two sides; the wall structure led to different illumination, with 25 lux for the closed arms and 65 lux for the open arms. The central platform (10× 10 cm) connected the four arms to allow access to any. Each rat was first placed in the central platform facing an open arm and subsequently behavior was recorded for 5 minutes. To describe behavior, we counted the number of videoframes in which the animal was in the 1) closed arms, 2) open arms, and 3) central platform (labeled as “both” in the data).
4. Social interaction test with an unfamiliar (out-group) conspecific. In an open field arena, we placed an unfamiliar adult male next to a focal rat that had been part of the long-term experiment. Two different unfamiliar rats were used for each Period 3 group (i.e. G1 rats were tested with unfamiliar rats 1 and 2, G2 rats with unfamiliar rats 3 and 4, etc.). The test apparatus was made out of glass, with a green floor of 74 × 74 cm and transparent walls (∼40 cm high; Figure S5D). The unfamiliar rats were significantly younger and smaller than the focals (12-weeks-old and 360±20g (mean±SD)). We recorded the behavior for 10 minutes. The test was repeated with other rats (unfamiliar and familiar) after a break that lasted for on average 75±42 min. but a minimum of 35 min. The coded behavior included the following: duration of bipedal orienting stance (%), duration of self-grooming (%), duration of exploration, duration of sniffing non-genital body parts (%), duration of sniffing the genitals of the partner (%), number of steps on the partner, number of fights. The coded parameters were stored separately from the trials with unfamiliar rat 1 and 2 for each focal rat.
5. Social interaction test with a familiar (in-group) conspecific. The social interaction was also performed with a familiar conspecific, chosen as a random groupmate from their Period 3 group. Each individual was measured with four randomly selected members from their group. The coded variables were the same as above, but they were averaged over the trials for each focal rat.
Quantification and statistical analysis
Data processing and behavioral metrics
We calculated metrics of space use from the individual trajectory data for each rat. Time at feeder is the fraction of total time spent at the feeder during nightlight (active period). Distance from wall is the average distance from the walls during nightlight. Territory size is the area of an individual’s space-use heatmap during all times (number of bins where it was detected more than 10 frames per day, calculated using bins with a linear size of ∼ 2 mm; see Figure 1C), normalized by total number of bins and frames counted. Top of nestbox is the fraction of total time spent on top of the nestbox/shelter area during nightlight.
An approach-avoidance (AA) contest event was defined for a given pair of individuals (i ≠ j) if for a 0.4s long time window the time-averaged dot product of i’s velocity (vi(t)) and the normalized relative direction vector pointing from i to j – a unit vector d^ij (t) = dij(t)/|dij(t)|, where dij(t) = xj(t) − xi(t) is the relative position – were within predetermined thresholds for both individuals. The thresholds used were for the approacher, and AAji < −0.5 for the avoider. In addition, we used the requirement that i and j were within 40 cm of each other (|dij(t)| ≤ dmax = 40 cm) and both i and j were moving at speeds of at least 0.25 m/sec (|v(t)| ≥ vmin = 0.25 m/sec).
We use the approach-avoidance contest network to quantify the social interaction structure in each group. The values Aij are the number of times rat i won approach-avoidance contests with rat j. Using this, the number of contests rat i won is , and the number of contests lost is
. The fraction of contests for rat i is then

Reaching centrality is calculated using the network of excess wins, Wij. This network has positive entries for rats in a pair that won more contests and zero for the other rats, and is determined as

This network is then provided as input to the networkx function local_reaching_centrality, to calculate the reaching centrality for each individual.
The symmetry coefficient is calculated following [26], and represents symmetry/asymmetry in contests won/lost, with 1 being perfect symmetry and 0 perfect asymmetry. This is calculated by first constructing a symmetric “common” network, Cij, of the minimum number of contests won by either pair:

The symmetry coefficient is then the ratio of the sum of this common part to the total number of contests:

Individual and social interaction assays
We used principal component analysis (PCA) to define the boldness, social interest, and self grooming scores for each rat from the individual and pairwise assays.
Boldness score
The 8 videoframe variables calculated from the individual tests (black-and-white box, elevated plus-maze, and canopy test) were used to define the boldness score, which reflects the time spent in exposed portions of an unfamiliar environment. We converted each frame count to fraction of test time and normalized the input variables before applying PCA. The first component explains 44.7% of the variance, and postive projections onto this component represent more time in open areas (Figure S6A). We used the projection of each rat onto the first component as the “boldness” score. For comparison, we also calculated fractions of open-area time for each test: fraction in the white area during black and white black box test (BWB-whitefrac = BWB-White/(BWB-White + BWB-Black)), fraction of time in open during the elevated cross test (ElevX-openfrac = ElevX-Open/(ElevX-Open + ElevX-Closed)), and fraction of time out during the canopy test (Canopy-outfrac = Canopy-OUT/(Canopy-Out + Canopy-Under)).
Social interest and self grooming scores
We applied PCA to measures from the the pairwise social interaction tests and used results to define composite scores related to social interest and self grooming. The variables included are duration of sniffing genitals (%), duration of sniffing nongenital body parts (%), duration of bipedal orienting stance (standing up) (%), number of steps on the partner, number of mating attempts, number of fights, duration of exploration (%), and duration of self-grooming (%). The components shown in Figure S6B were determined using data from the first test with an unfamiliar rat; the scores for the other tests with a familiar rat and a second unfamiliar rat were calculated by projecting the associated variables onto these components. The first PCA component represents interaction with the other rat, with positive projections indicating more interactions. We use this component as the “social interest” score. The second PCA component is weighted most strongly by self grooming (positive) and exploration (negative) – we use this component as the “self grooming” score.
Figure S7 shows a comparison of the scores, including the boldness score and measures from the individual tests, and the social interest and self grooming scores from the the first test with an unfamiliar rat as well as tests with a familiar rat and a second unfamiliar rat.
Acknowledgments
We thank all the people who helped during the experimental work, especially Vaĺeria Ńemeth, Gergő Somorjai, Zsuzsa Ákos, Katalin Schlett, Péter Urtz, and Andŕas Péter (for Solomon coder). We acknowledge funding from Eötvös Loránd University and Max Planck Institute of Animal Behavior. This research was partially supported by a grant to T.V. establishing the MTA-ELTE Statistical and Biological Research Group, the DFG Centre of Excellence 2117 “Centre for the Advanced Study of Collective Behaviour” (ID: 422037984), and the Hungarian Academy of Sciences (a grant to the MTA-ELTE ‘Lendület’ Collective Behaviour Research Group, grant number 95152).
Footnotes
Updated author affiliations list
References
- [1].↵
- [2].↵
- [3].↵
- [4].↵
- [5].↵
- [6].↵
- [7].↵
- [8].↵
- [9].↵
- [10].↵
- [11].↵
- [12].↵
- [13].↵
- [14].↵
- [15].↵
- [16].↵
- [17].↵
- [18].↵
- [19].↵
- [20].↵
- [21].↵
- [22].↵
- [23].↵
- [24].↵
- [25].↵
- [26].↵
- [27].↵
- [28].↵
- [29].↵
- [30].↵
- [31].↵
- [32].↵
- [33].↵
- [34].↵
- [35].↵
- [36].↵
- [37].↵
- [38].↵
- [39].↵
- [40].↵
- [41].↵
- [42].↵
- [43].↵
- [44].↵
- [45].↵
- [46].↵
- [47].↵
- [48].↵
- [49].↵
- [50].↵
- [51].↵
- [52].↵
- [53].↵
- [54].↵
- [55].↵
- [56].↵