{'fraction_non_alphanumeric': 0.02856683583254874, 'fraction_numerical': 0.008519530622086482, 'mean_word_length': 5.0795755968169765, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Strategic heuristics underlie animal dominance hierarchies and provide evidence of group-level social knowledge

The information contained in social systems, and the part of it that animals actually possess, is a driver of the evolution of sociality, cognition, and animal culture. However, it is difficult to detect how much information individuals actually have about their social worlds. Even when information can be detected, differences in methodology make cross-species comparisons difficult. We present a new method for detecting social information in dominance hierarchies, that infers individual-level rules for aggression based on how aggression decisions are influenced by differences in social rank. We apply this method to 172 social groups across 85 species in 22 orders. By looking for heuristics that depend upon rank information, we can back-infer the types of information individuals possess about the macro-level properties of their group. Summary measures of these heuristics then place groups within a taxonomy, providing a biologically-relevant"social assay"to quantify the amount of social information and to identify consensus strategies at the group level. The majority of animal groups in our dataset (112 groups, 65%) follow a downward heuristic to structure their fights, spreading aggression relatively equally across lower-ranked opponents but 50 groups (29%) use strategies that are indicative of more detailed rank information. Strategies are not phylogenetically constrained and groups within the same species can use different strategies, indicating that the choice of heuristics may be contextual and that the structuring of aggression by social information should not be considered a fixed characteristic. Instead, individuals may be able to plastically respond to local conditions by increasing or decreasing the complexity of their strategies. Our approach provides new opportunities to study the use of social information across species and the evolution of social complexity and cognition.


Introduction
Biologists have long been interested in within-group conflict and dominance hierarchies [1][2][3][4][5][6][7]. These forms of structured aggression have attracted research attention because they are taxonomically widespread across the animal kingdom [5,8,9], biologically relevant to individuals within social groups [10,11], and strikingly similar in basic structure even across very different species [12]. This surface-level similarity makes the aggression networks underlying hierarchies one of the most promising kind of social network for comparative analyses across a wide range of species and social systems.
However, aggression does more than construct and maintain dominance hierarchies. It is also possible for the dominance hierarchy itself to play a critical role in conflict in a top-down fashion. Individuals gain and lose rank through the strategies they use to direct aggression, but those strategies may be critically informed by the ranks themselves. As we shall show, in many animal groups, summary statistics on the individual level reveal the predictive power of rank. In many species, relative rank can determine who individuals choose to aggress and how they allocate that aggression.
The connection between rank and behavior suggests the existence of a feedback loop between individual actions and social information about the group as a whole [13]. This feedback loop is closed when individual-level decisions can either modify or stabilize the very group-level information that guides them. These decisions can be informed by relevant social information, which may be encoded in the spatial patterning of individuals (e.g. [14]), observable signals or characteristics of individuals (e.g. [15]), information an individual has about its own abilities (e.g. [16]), or the relationships it has with others (e.g. [17]). Given the complexity of quantifying the full structure of the dominance hierarchy, we expect individuals to rely on simpler rules that require neither full information nor fully optimized strategies. In the literature on judgment and decision-making in humans, where these simpler rules are known as heuristics [18,19]. The use of heuristics is now understood to be a major factor that structures human social behavior and decision making. Characterization of these heuristics and the advantages and disadvantages of their use has allowed economists and psychologists to explain previously mystifying features of human behavior (e.g., [20,21]).
Here, we apply these two ideas-of feedback loops which create information about rank and of the heuristics which indicate how animals use this information-to empirical data on animal dominance hierarchies. We present a method to detect the presence and use of information in animal groups, and apply observations of fighting and dominance interactions within 172 independent social groups across 85 species in 22 orders using a large empirical dataset [12,17].
Previous research has shown that aggression networks underlying dominance hierarchies in species across the phylogenetic tree are remarkably similar when decomposed into basic network motifs [22]. Here, we take the opposite approach, focusing on ways in which an individual acts towards others that are contingent of larger-scale social information about rank. We present two measures to quantify the extent to which decision-making is guided by rank. Focus quantifies the extent to which individuals direct their aggression on the basis of differences in relative rank. Position quantifies the relative rank differences at which aggression is most focused, allows us to distinguish different rank-informed strategies individuals might be using when information about rank is used.
These two measures provide a social assay that can detect how much information the social system contains about relative rank differences and how individuals use this information about themselves and their potential opponents to structure their observed behavior, regardless of how that information is encoded. We use focus and position to delineate three conflict heuristics that are informed by different types of information about rank: (1) the downward heuristic, where individuals aggress equally against all lower-ranked individuals; (2) close competitors, where individuals aggress preferentially towards those just below themselves in rank; and (3) bullying, where individuals aggress preferentially towards those ranked far below themselves in rank. Each strategy allows individuals to preferentially engage with a certain subset of others based on different types of information about the relative rank difference between themselves and potential opponents. The use of a particular strategy allows us to back-infer the type of information individuals must have in order to use the strategies that they do.
Combined, our new quantitative methods, our model-fitting procedure, and our detection of social rules governing aggression decisions within hierarchies provides new insight into how animals structure their social relationships and how they make biologically-relevant social decisions.

Empirical data sources
We used a large empirical dataset of aggression and dominance hierarchies that is openly accessible ( [12], Dryad doi: https://doi.org/10.5061/dryad.f76f2). We excluded two groups due to apparent errors in the presentation of data in the original papers (Table 4, Nest 39 in [23] and Table 3 in [24]). We supplemented this dataset with data from aggression and rank in monk parakeets ( [17], Dryad doi: https://doi.org/10.5061/dryad.p56q7, data from study quarters 2-4 for groups 1 and 2).
These datasets contain the number of times each individual "won" against each other individual. These "wins" could be the outcome of aggressive contests, show the directionality of aggressive events, or indicate a submission display towards a dominant individual. They do not have information on which individual started a fight, only the outcome of the interaction. We use the general term "aggress" to describe the actions individuals take in these datasets, and focus here on the perspective of the winners as initiators of aggression, although all of our analyses apply equally well to cases where the initiator of the fight chooses to start a fight that it ultimately loses.

Rank and distribution of aggression
For each group, we find individual ranks using a modified version of eigenvector centrality (see SI). In particular, we compute the probability that each individual aggresses with each other individual, and then add a small regularization term, (see SI for a Bayesian calculation of the optimal value of this term); the eigenvector centrality of the resulting matrix allows us to extract the relative ranks of individuals that are implicit in the patterns of aggression [25].
Plotting the overall distribution of real aggression in each group by relative rank differences enables us to determine whether the distribution of aggression is structured by rank differences among individuals, whether individuals in the group focus their aggression on a subset of individuals based on relative rank differences, and where in relative rank distance space aggression is focused.
Our two measures are focus and position. We compare their values quantified from real-world data with those generated from a set of different agent-based models which allows us to determine minimal models for group-level aggression strategies used in a particular group.

Calculating focus
A group's focus is is high when individuals strongly concentrate their aggression towards opponents with a particular range of relative rank differences; it is low when aggression is spread across the entire group. Aggressive events in a group are summarized by the aggression matrix A, whose elements A ij count the number of times individual i aggressed against individual j.
To define focus we first construct the relative-aggression distribution, R(∆), which measures the level of aggression between individuals separated by ∆ steps in relative rank. If we define P ∆ as the set of all pairs {i, j} where i is ∆ ranks above j, then R is defined as where |P ∆ | is the total number of pairs in the set. R(∆) is the average amount of aggression directed ∆ rank-steps away. When ∆ is positive, R(∆) measures the average aggression directed 'down' the hierarchy, from a higher-ranked individual to a lower-ranked individual.
In other words, R(∆) is a measure of the fraction of events that are directed between individuals separated by ∆ steps in relative rank, given the total aggression in the system that could have been directed ∆ steps away. A plot of R(∆) as a function of ∆ tells us a great deal about the flows of aggression through the system. Fig. 1 provides an example; most aggression is directed "down" the hierarchy towards lower-ranked individuals (positive ∆), although in Fig. 1b and c, aggression is more widely distributed than Fig. 1a, indicating that in these systems, more aggressive events are directed "up" the hierarchy (negative ∆).
Focus, F , is defined as how "sharp" this distribution is: Figure 1: Distribution of aggression of real groups showing how patterns are consistent with (panel a) or diverge from (panels b and c) patterns of aggression artificially generated by the downward heuristic. Panels show data from (a) mule deer [26], where the real aggression followed the downward heuristic, (b) monk parakeet [17], where real aggression followed a close competitor pattern, and (c) vervet monkey [27], where real aggression followed a bullying pattern. Shading around lines indicates 95% confidence intervals. where Var(R) is the R(∆)-weighted variance of ∆, and∆ is the R(∆)-weighted mean of ∆, The normalization term (2N − 1)N/6 is chosen so that a uniform (flat) distribution of aggression, i.e., "rank ignorant", gives a focus of zero. If focusing is very strong-e.g., if all individuals direct their aggression towards the individual two ranks down from them in the hierarchy, F is 1. As aggression is more evenly distributed, F decreases. In the case that aggression is completely uniform across all ranks, then the normalization is chosen such that F will be precisely zero. (In rare cases, where the aggression is "overdispersed", it is possible to have negative focus.)

Position of focused aggression
If rank information is present and is used, and we can detect this via focus, then knowing the position of the peak of aggression gives us information about the specific relative rank-based strategy that individuals are using. For example, individuals with focused aggression could direct most of their aggression towards those that are ranked directly beneath themselves in the hierarchy. Alternatively, individuals could focus their aggression on the very lowest ranked individuals in the group. These two cases could result in similar levels of focus in aggression, but could be differentiated from each other by differences in their position values. In the first case, position would be closer to each individual's own rank (and closer to 0) while in the second case, position would move towards 1 as aggression is directed at individuals many ranks distant from an individual's own rank.
We define the position of focused aggression as the average of the distribution of normalized aggression for each social group; i.e., for each individual, we compute the probability that the individual's aggression is directed at an individual rank ∆ away, P i (∆), and then average these probabilities over all individuals, formally, where O(i) is the list of relative ranks available to individual i; higher-ranked individuals have more relative ranks available downward (positive ∆), while lower-ranked individuals have more available up.
The P measure accounts for the effects of both individual aggression levels and the number of potential aggressive targets as a function of rank, and allows us to capture the extent to which decision-making on the individual level is sensitive to relative rank position.

Modelling the structural rules of dominance hierarchies
The simplest rank-based rule governing aggression in a hierarchy is a rule we term the "downward heuristic". Here, individuals aggress only against those ranked below themselves, and lose against all those ranked above. This is the simplest rank-based rule because individuals follow a binary decision rule: aggress towards those of lower ranks and avoid those with higher ranks; in essence, individuals perfectly follow the most basic structure of the dominance hierarchy.
We use this simple rule to recreate aggression patterns for each group, and compare it with the real observed aggression patterns. We do this using an ensemble of agent-based model simulations to create a set of artificial aggression networks. These models preserve some of the real data structure while permuting other aspects. We used these artificial aggression networks to determine which values of focus and position we should expect to be generated if animals in the group were only using this basic downward heuristic.
We use each individual's rank, calculated from the real dataset, and then allow individuals to aggress as much as they do in the real data, but change who they fight against. In the pure downward heuristic case, individuals fight randomly but only with individuals ranked below themselves in the hierarchy. This process allowed us to remodel the real data at the event level. This process is consistent with recent best practice recommendations for network permutation, which supports event-level permutations of social interactions rather than relationship strengths [28].
Formally, given the aggression matrix A ij , and the ranks r i . The first-ranked individual, k, has r k equal to one, and r i > r j indicates that i is lower ranked than j. Then, for each individual i, the row A ij is then mapped to A ij where and δ r j >r i is equal to one when the subscript is true (i.e., when then j is lower ranked than i) and Due to mistakes by the individuals, real systems may be somewhat noisy and may not follow a pure downward heuristic. To account for this, we introduced the possibility of randomness in aggression direction; mathematically, we allow for an probability that the individual simply directs aggression at a random individual, We conducted a parameter sweep of the downward aggression heuristic in , gradually increasing the amount of randomly-directed aggression from equal to zero (perfect downward aggression) to unity (completely random behavior), then examined how increasing randomness affected focus and position values.

Assignment of Heuristics
Our artificial aggression networks generated by the downward heuristic serve as randomized reference models [29] to which we can compare the real observed datasets, and as a form of null model for the downward heuristic: we fail to reject the downward heuristic as a plausible generating rule of focus and position in the real datasets if the real focus and position values fall within the range that can be produced by our artificial data. For real groups that fall outside of the region that could be generated by the downward heuristic, we categorize these groups into strategies other than the basic downward heuristic.
We categorized groups into four aggression strategy types: downward heuristic, close competitors, bullying, and undefined. We ran agent-based models of aggression under the downward heuristic strategy, and scanned across values of from zero (perfect use of rank information) to one (completely random behavior). This then enabled us to delineate the focus and position parameter space in which these summary measures are consistent with those produced by the downward heuristic. We drew a polygon around the space traced out by different values of , using the extremes of error bars to set the edges of the polygon (Fig. 2). Real data that intersected this downward heuristic polygon were scored as consistent with that model if any of the error bars for the real data overlapped with the polygon (Fig. 2a). Fig. 2 provides an example of these assignments; the same value of focus and position may be categorized as "close competitors" in some groups and "downward heuristic" in others, because larger group sizes may provide additional signal-to-noise for null rejection.
We defined the close competitors strategy as having a lower position value than that produced by the downward heuristic model (i.e. aggression focused more towards near-ranked individuals, Fig. 2b) and bullying as having a higher position value than the modelled data (i.e. aggression focused more towards the bottom of the hierarchy, Fig. 2c). The undefined strategy groups had focus values lower than those expected in fully random systems. Real data that were fully contained within the polygon space of the close competitors, bullying, or undefined strategies were scored as "pure" for that strategy. Real data with 3 error bars falling within a single strategy were categorized as "mostly" close competitors, bullying, or undefined.
We also used the downward heuristic agent-based models to determine the likely level of hierarchical structuring in the real datasets. We determined the extent to which focus values were affected by increasing the amount of randomly directed events in the artificial downward heuristic data.

Phylogenetic analyses
We downloaded a time-calibrated phylogeny for all resolved species in our dataset from the Timetree of Life (www.timetree.org, [31,32]). This included 79 species of the 84 for which we had social data (in some cases, we made an isomorphic substitution when the original species was not found in the Timetree database). We used the R package geiger with our three types of discrete social strategies (downward heuristic, close competitor, and bullying) to fit a discrete trait with equal evolutionary rate. We tested for phylogenetic signal using Pagel's λ and a chi-squared likelihood test of significance for each social strategy. We visualized trait evolution using an ancestral state reconstruction for the presence or absence of each strategy.
Code to enable running the analyses will be released in an R package, on publication of the paper.

Structured aggression
Most of the animal social groups in the empirical dataset had well-structured dominance hierarchies. Groups generally had real focus values consistent with low levels of randomly-directed aggression: 39% of groups (N = 67) were most similar to modelled data with 10% or less randomly-directed events ( ≤ 0.1); 72% of groups (N = 124) were most similar to modelled data with 30% or less randomly-directed events ( ≤ 0.3). Only 20 groups (12%) had focus values most similar to modelled data with 80% or greater randomly-directed events ( ≥ 0.8); of these, none were categorized as a pure close competitor or pure bully strategy type. Only 12 groups (7%) had focus values closest to modelled data with totally random aggression, which corresponds roughly to previous results with this dataset which found over-representation of transitive configurations, an indication of structured hierarchies, in all but 3% of groups [12].

Focus and position
Simulated data generated with an agent-based model base on the downward heuristic had mean focus of 0.79 (range 0.67 to 0.93) and mean position of 0.42 (range 0.3 to 0.48). In these simulations, as expected, high focus was generated when randomness was low. Focus values in these artificiallygenerated datasets responded strongly to the amount of randomly-directed events included in the rule, with a strong negative relationship between the amount of randomly-directed aggression events in our modelled data and the resulting value of focus (mean correlation −0.98, range −1 to −0.82, all p-values < 10 −5 ).
Real focus and position values in our empirical dataset were much more varied than those in our agent-based models (Fig. 3). Mean focus in real groups was 0.53 (range −0.15 to 0.95) and mean position was 0.34 (range −0.04 to 0.65). These values were not strongly associated with phylogenetic relatedness. This divergence between expected focus and position values from simulated data and the real values from empirical datasets shows that the simple downward heuristic could only capture part of the decisions that animals make in the real world.

Group-level rules structuring aggression
The majority of animal social groups had clearly detectable strategies that structured aggression (Fig. 3). Almost all groups (94% of groups, N = 162) could be categorized without ambiguity to one of three main aggression strategies: downward heuristic (aggress against lower-ranked individuals indiscriminately, 65% of groups), close competitors (preferentially aggress against those ranked slightly below themselves, 16% of groups), or bullying (preferentially aggress against those ranked far below themselves, 13% of groups). Only 10 groups had less defined strategies, and of these, only 5 (3%) were classified as undefined.
We found no evidence that social group size affected which strategy a group followed. Median group size was similar across all three strategy types ( Fig. A2.2) and misclassification rates for predicting strategy type by social group size (via multinomial regression) were high (> 80%).
We also found no evidence that the conditions under which groups were sampled (whether the group was captive or wild) affected observed values of focus or position, or which strategy type the group followed. Focus and position values were similar in wild and captive groups, and both wild and captive groups had similar proportions of strategy types (Fig. A2.3). Misclassification rates for predicting strategy type by social group size and conditions (via multinomial regression) were high (85%). At the order level, not enough groups from the same orders were sampled in both wild and captivity to make any general conclusions about whether living conditions, and captivity in particular, affected the chances of a group using a particular strategy in combination with phylogenetic relatedness (Fig. A2.4).

Phylogenetic signal
All three well-defined strategies occurred in orders across the range in the dataset (Fig. 4). We found no evidence for phylogenetic signal for any of the three strategy types. Pagel's λ, which is a measure of the extent of phylogenetic signal [33,34], was < 0.000001 in all cases, indicating that essentially no phylogenetic signal was present and that use of strategies used evolved largely independent of the phylogeny. A chi-squared likelihood test of the λ transformed tree compared to the real phylogenetic tree found no statistical difference between the two (p = 1) for each of the three strategies, providing further evidence for a lack of phylogenetic signal. Finally, an ancestral state reconstruction of each strategy type showed no clear evolutionary pattern (Fig. 5, A2.5, A2.6).
Where a single species had multiple independent social groups in our dataset, we found that different groups of the same species often followed different strategies rather than a single consistent strategy. For the 32 species for which two or more groups had pure detectable strategies (either downward heuristic, pure close competitors, or pure bullying), 53% of species had groups that followed more than one strategy (Fig. 6). For example, yellow baboons were evenly split between 5 groups which used a basic downward heuristic and 5 groups that used the more complex close competitors strategy. Three species, African elephants, Harris's sparrows, and horses, had groups that followed all three pure strategies.

Discussion
The study of dominance hierarchies in animal groups is now nearly a century old. Recent research has found strikingly similar patterns in micro-structural elements of aggression networks across a wide range of species [22], but the reasons for this widespread similarity have remained unclear.
This paper has taken a complementary approach by addressing hierarchical structures from a macro-structural perspective. Instead of looking at the building blocks of hierarchies, we looked at the aggression rules that structure decisions behind them. These rules represent strategies based on feedback from group-level social facts, not just network structure, and are based on detecting the use of rank-based social information. Instead of looking for "local" patterns involving a small number of individuals, in other words, we look for the influence of the global pattern on interactions.
We developed new methods to detect and categorize the strategies that structure within-group aggression and conflict, detectable even in sparse data because they are followed by the majority of individuals in the group. Each strategy relies on different kinds of social information, and the existence and strength of the consensus strategies we detect indicates that the majority of the individuals in the social group have access to that information.
Our methods enable us to assay historical datasets to detect the rules that guide behavioral decisions within dominance structures and to develop a taxonomy of social systems using different types of information to structure aggression. Many groups have aggression structures consistent with the downward heuristic, the most basic dominance hierarchy rule, but some groups use multi-faceted strategies such as preferentially aggresing against close competitors or bullying bottom-ranked animals. We detected all three strategy types across most of the orders in our dataset and found that the strategies employed by specific social groups could vary even within species.

Social information and rank-based strategies
These results about the strategies animals use to structure their interactions provide insight into the types and extent of social information that underlie social decision-making. The presence of a rank-informed aggression strategy in a group is evidence that individuals in the group are capable of perceiving the information needed to use that strategy. However, the use of a strategy in a particular group is not necessarily an indication of whether that strategy is commonly used by other groups of the same species, nor is it indicative of a particular cognitive method individuals use to manage the information needed to achieve those strategies. Similarly, not finding evidence for a particular rank-informed strategy in any one group cannot be used to determine whether the rank information is present but not being used, or whether, conversely, the animals themselves are incapable of synthesizing the type of information necessary to use the strategy. As such, it is important to note that the absence of a rank-based strategy cannot be used as a positive confirmation that a species is unable or unwilling to use a particular rank-based strategy.
While models can make predictions about what types of information underlie sociality, in-depth understanding of the cognitive abilities of the species, including its memory, and recognition and perceptive abilities, are needed to fully understand how information is used, what information is present, how it is encoded, and what kinds of cognition underlie the entire process. For species that have more detailed information about rank and use a close competitors or bullying strategy, priorities for future research on these species will be to differentiate between cases where individuals can follow a more information-rich strategy via a simple underlying rule that allows easy detection of relative rank differences, or when the ability to use rank information is based instead on more cognitively demanding methods that require the recognition of particular individuals and memories of past outcomes. Manipulative experiments are needed in order to differentiate the types of processes that generate and store information in high-information social groups. Experiments are critical in distinguishing between social groups where information is contained in more or less cognitively-demanding ways, and will allow us to begin to identify those species that could have more complex social assessment and memory abilities than is commonly assumed.

Potential plasticity of social strategies
We have found that groups of the same species can exhibit different macro-level strategies. While certain kinds of conflict can be associated with phylogenetic relatedness (e.g. the occurrence of letal violence in mammals, [35]), it appears that the strategies that a species deploys have as much variance within clades as they do between them. The variability we find in strategy use within species shows that these social rules should be thought of as facts about particular groups, rather than rigid species-level characteristics. Factors such as resource availability and distribution, environmentallymediated constraints, and direct environmental influences on physiology can all result in changes to individual aggression and group dominance structure (reviewed in [36]). These changes may shift which aggression strategy is optimal under new social, environmental, or ecological conditions. A species that is able to respond to changes in conditions by altering its aggression strategy may be more successful than a more socially-rigid species. Temporal shifts in the behaviors underlying dominance interactions have been documented in human groups where dominance strategies and the behaviors used to mediate dominance interactions change with age [4]. Dominance strategies can even change over time within the same social group, as we previously documented in aggression in parakeets [17]. Our results support these earlier conclusions that sociality can vary within a single species. Combined, these results suggest that experimental work on the ontogeny of dominance hierarchies, social information, and aggression strategies is needed to fully understand the conditions under which an information-based strategy, like rank-focused aggression, would emerge and be used in social groups.
Variability in strategy use, or social plasticity, has a further implication. One way that aggression strategies could emerge is through adaptive responses to local conditions. Once established, these strategies could be learned by new individuals joining the group. If individuals learn these strategies from each other, and the strategies persist in groups due to social learning, aggression strategies could represent "cultures of aggression", where the type of aggression strategy in use in a group may be a somewhat arbitrary outcome of prior conditions frozen in by cultural learning. This kind of culturally-based inertia may lead to a divergence between actual and optimal behavior, and may indicate that the social system is susceptible to complex nonlinear dynamics and potentially to social tipping points [37].

Insight into social cognition and social complexity
A fundamental question in animal behavior is how much animals "know" about their social worlds, and how much and what type of social information they use as a basis in their decision-making processes. Just as intelligence appears to have evolved independently in different clades [38], social complexity appears to have multiple, independent evolutionary origins. Approaches to studying animal social complexity often attempt to indirectly quantify the extent of social information in social groups, usually through various summary measures such as group size (e.g., Ref. [39,40]), network size (e.g., Ref. [41]), or the number or diversity of different types of relationships (e.g., Ref. [42,43]). Many of these methods seek to understand how much animals know about their social worlds, and recent work has advocated explicitly quantifying social information when attempting to assess social complexity [42]. However, while we can quantify many aspects of social structure, without additional experimental manipulation (e.g. [44,45]) it has not previously been possible to determine the extent of information that individuals in groups have of their social worlds. In broader comparisons, it has also been difficult to find a way to quantify social information in a manner that is both feasible and generalizable enough to be used in a wide range of species, as social interactions may differ in their salience and biological meaningfulness across species. By taking a top-down rank-informed approach to social information in our work, we avoid some of these difficulties.
The evidence we found for social information and rank-focused aggressive behavior across the animal kingdom suggests that the question of what animals know about their social worlds should be thought of in two parts: first, "how much do they know?"; second, "how do they know it?" Our approach measures the extent and use of social information but cannot detect how that information is encoded. This is an important distinction because a broad range of mechanisms and processes may lead to the emergence of similar social structures that individuals can use to obtain and act on social information. Information can be encoded in social groups that rely on both cognitive mechanisms such as memory and pattern recognition as well as non-cognitive mechanisms such as physiological shifts or alterations in observable signals. Given the widespread nature of social information and its use in the animal kingdom, why don't all species use a simple cue or rule-of-thumb to infer their own rank and the rank of others in their group? Many species do, in fact, use these simpler methods, and have strongly size-based hierarchies which would allow rank differences to be visible if the individuals could discriminate among these signal differences. But some species do not seem to use these simple solutions to detecting rank differences among individuals. In previous work with monk parakeets for example, we have not found any easily-observable characteristic that is strongly correlated with rank. Instead, we have found indications that rank knowledge in these groups forms through memory and processing of social interactions, rather than a directly correlative signal [17]. In other systems, groups may dynamically alter the complexity of the social rule they follow. Recent evidence from experiments with sparrows shows that individuals only use simple rules when interacting with strangers but switch to rely on individual recognition and memory of past interactions when interacting with known individuals [15]. This kind of change represents a shift from what appears to be a simple rule to one that appears more cognitively demanding. The existence of high levels of within-species diversity in strategy usage also suggests that more flexible, cognitive schema are in play, rather than hard-coded mechanisms that depend on physical characteristics.
In our analyses, none of the social strategies we detected were phylogenetically restricted to particular orders. This provides evidence that similar levels of social knowledge could emerge through convergent evolution even if the underlying methods animals use to process or store social information and make aggression decisions differ. Without perception, recognition, inference, and knowledge, simpler rules based on cues or less cognitively demanding signals may be able to explain interaction patterns and hierarchical organization. Without inference to fill in missing information or create new summaries of social information, group social interactions and resulting social network structure may simply be complicated, rather than complex.

Conclusion
Our analysis has provided a social assay to back-infer how much information animals have about their social worlds, based on their decisions about how to interact with each other. Using these new tools, researchers now categorize groups into a taxonomy of social strategies, where the patterns of aggression in each strategy type are based on different types of social information.
The broad applicability of our quantitative tools allows provides new opportunities to quantify the evolution of social structure across divergent taxa. Our global approach to detecting and studying social knowledge can be used to gain insight into social complexity in groups across many different types of social structures. This is especially important in understanding the conditions under which complex sociality, based on social information, should emerge. Treating social complexity as an emergent property of the group provides a cleaner framework for comparing complexity both within and between species. The information contained in the interactions is complementary to the overall social network structure; our results show that species with different social systems and network structures can have similar levels of complexity.
The tractability and wide applicability of our approach enables comparative analyses that can provide a better understanding of the evolutionary patterns underlying the distribution of social processing skills and complex sociality across taxa. Previous analyses have often simplified many of the driving features of social complexity [39,40], or were restricted to closely related species, e.g. within primates [46]. Using our approach, we are now able to compare a broad range of species using a high-level summary of group behavior which enables us to more directly compare the presence and use of social knowledge, and the potential for social cognition, in these groups. Combined with recent results from empirical work and an understanding of the cognitive abilities of species, our approach provides new opportunities to investigate the extent of rank-based information encoded in societies across species, compare the evolution of the use of social information, and better understand the effect of social information on individual behavior in within-group conflict.

Appendix Appendix 1: the Regularization Term for the measurement of PageRank in Animal Conflict
A basic step in the calculation of focus and average peak position is the estimation of the transition matrix, T ij , a collection of probabilities, from the data. The "naive" way to estimate a probability of an event occurring from a finite number of observations is While attractive in its simplicity, this estimator has a number of problems (see Ref. [47]); a Bayesian analysis leads to the correctionp where m is the number of event types, and a regularization parameter (sometimes called a "teleportation term"). When is equal to unity, we have Laplace's rule; more generally, we can think of as parametrising a Dirichlet distribution that serves as the prior for the possible values of the underlying probabilities p [48,49].
In the case we have here, T ij is the estimate of the probability that i aggress against j; by stipulation, the individual i can not aggress against itself. We can then adapt equation 9 to the estimate of the probability distributions in the matrix T ij .
How do we choose ? A natural way to do so is to learn from the data itself; we do so here using k-fold cross validation, with k set to five. For each dataset, in other words, we compute the probabilities T ij , for some particular choice of , based on a randomly chosen sample of only 4/5 of the data. We then compute the log-probability per data-point of the remaining "held out" 1/5 of the data, n ij , using those estimated T ij s, where N h is the number of observations in the held-out set (i.e., 1/5 of the total number of observations). In words, L( ) is how well that particular choice of "predicts" the held-out data; the optimal choice of is that which best predicts.
We repeat this process many times, choosing a different hold-out set each time, to get an estimate of the average log-probability of the held-out data. We then choose to maximize this average of L( ). Fig. A1.1 shows an example of this process for the data of Ref. [50]. The peak of this function allows us to pick the optimal epsilon to be around 0.3 for this dataset, although values between 0.2 and 0.6 are largely indistinguishable. Fig. A1.2 shows a scatter plot of the L-maximizing for all 161 aggression matrices in our data, as a function of both total number of observations, and number of individuals.
We find that most matrices have optimal values of between 0.1 and 1.0, and that there is no strong correlation between optimal and system size or total number of observations. The average value of epsilon across all datasets is 0.694.
Little hinges on the exact value of ; indeed, using the average value in place of the optimal choice for any particular dataset leads to an average (absolute value) shift in the focus measure of only 0.027, and in the average peak position of only 0.017; over our data, the two choices have a Pearson correlation of 0.95 (Focus) and 0.97 (Average Peak Position). Since finding the optimal is computationally intensive, and since the final results are largely insensitive to this choice, we suggest the average value, 0.694, is appropriate for ordinary use, and (for simplicity) we present our analyses here using this choice. Figure A1.1: Determining optimal through k-fold cross validation; an example of equation 10 applied to the data of Ref. [50]. An value of approximately 0.3, in this case, best predicts held-out data, but a range of values between 0.1 and 1 perform similarly well.