Chimpanzees organize their social relationships like humans

Human relationships are structured in a set of layers, ordered from higher (intimate relationships) to lower (acquaintances) emotional and cognitive intensity. This structure arises from the limits of our cognitive capacity and the different amounts of resources required by different relationships. However, it is unknown whether nonhuman primate species organize their affiliative relationships following the same pattern. We here show that the time chimpanzees devote to grooming other individuals is well described by the same model used for human relationships, supporting the existence of similar social signatures for both humans and chimpanzees. Furthermore, the relationship structure depends on group size as predicted by the model, the proportion of high-intensity connections being larger for smaller groups.

Social network analysis has been a very active field for about a century, revealing the complex set of relationships that connect individuals 1,2 . Among the main objects of interest of social network analysis are personal or egonetworks, which consist of the social networks surrounding selected actors 3 . A very general observation is that human egonetworks show a layered structure where each layer corresponds to relationships of different emotional closeness [4][5][6] . These layers have a definite emotional closeness: there is a layer of very close friends, a subsequent one of good friends, and so on. It is convenient to introduce the concept of nested circles, i.e., the sets of all the relationships up to a certain closeness. Typical circles established in the literature contain 5, 15, 50 and 150 individuals-with a scaling ∼ 3 between a circle and the next one. There is also evidence for a subsequent circle, formed by acquaintances, of about 500-600 people 7 .
Social networks have also been studied in a diverse array of species, including mammals, birds, fish, amphibians, reptiles and invertebrates [8][9][10][11][12][13] . In this context, the study of nonhuman primate social networks is of particular interest in light of the complexity of their societies, the variability between species, and their evolutionary proximity to humans 14 . Layered structures have been reported in both the distribution of primate social group sizes 15 and in groups of mammals living in multilevel social systems (mainly baboons, chimpanzees, elephants, and dolphins) 16,17 . These results suggest that human social networks (specifically, our ego networks) may be quantitatively different from those of other species, and that a similar structure in terms of layers or circles may be underlying the social networks of many species. However, the available data on non human animals do not allow substantiating this claim of similarity, because they are not about individual ego networks but about group-level social structures. In this paper we use a continuous analysis of nonhuman primate social interactions (specifically, of chimpanzees) to show that, even in ego networks, the corresponding underlying structure is consistent with that of humans, due to inherently limited resources of cognition and time applying to both species alike.
To fill this gap, in this paper we present strong evidence that chimpanzees organize their relationships very much like humans do by means of a continuous version 18 of the theory introduced in 19 , consisting of a resource allocation model based on two widely accepted assumptions: the capacity that an individual can invest in social relationships is finite, and relationships of a different intensity carry different costs. This mathematical approach allows us to advance our thinking beyond circles and assign a continuum value to a relationship, which is more reflective of real life and can include, for example, frequency of contact 20 , number of messages exchanged 21 , or duration of time spent together 21 . The formalism developed in 18 was applied to face-to-face contact time 22  www.nature.com/scientificreports/ arising when intensities are regarded as discrete categories. This implies that it is not necessary to arbitrarily categorize the data to unveil its structure. As a consequence, egonetworks turn out to be characterized by a new universal scale parameter η , which plays the role of (and is consistent with) the scale factor ∼ 3 typically found in the discrete setup. We here apply the same formalism to grooming data extracted from over four years of observations of four groups of chimpanzees living in the Chimfunshi Wildlife Orphanage in Zambia, taking grooming as a proxy of the effort devoted to pairwise relationships. Grooming behavior is characterized by one individual manually or orally manipulating the hair or skin of another individual. While this behavior does serve a hygienic function, grooming is well-known to facilitate and reflect social bonding between individual chimpanzees 24 . We used grooming instead of other relevant behaviors because grooming is one of the most essential social commodities in the lives of chimpanzees and also occurs sufficiently frequently for stable patterns to emerge within a reasonable time frame. Moreover, it is a clearly identifiable behavioral phenomenon with a well-defined direction-this is in contrast to e.g., social proximity, which can be instigated by either partner as well as a coincidental occurrence due to non-social factors like food presence or predation risk. This allows us to compare our results to those obtained when analyzing human ego networks, which are always directed, i.e., it is ego who indicates or shows their relation to the alteri, and not viceversa. As we will see below, our results confirm that the time chimpanzees devote to grooming other individuals is well described by the continuous probability distribution predicted by the model, supporting the existence of similar social signatures for both humans and chimpanzees.

Results
Generally speaking, the amount of grooming between primates is considered to be an indicator of their relationship quality 25 . Therefore, we apply the formalism summarized above to grooming data of chimpanzees living in the Chimfunshi Wildlife Orphanage in Zambia between 2015 and 2019. At this sanctuary, chimpanzees live in four different populations without any interaction between individuals from different groups. The number of chimpanzees living in each group differs considerably (groups 1-4, n = 26, 60, 11, 14 , respectively), and after preparing the data the number of individuals considered in each group for the analysis is reduced (groups 1-4, n = 21, 32, 10, 10 , respectively). Full information about the chimpanzee population studied is provided in Methods and in the Supplementary Information (SI).
To analyze the data, we resort to the theoretical approach in 18 , where the results for the discrete case 19 were extended to relationships characterized by continuous values. Briefly, the discrete approach assumes that L is the total number of relationships in an ego-network and σ is the average cognitive cost of a relationship. Relationships belong to r different categories, each of them bearing a different cost s max = s 1 > s 2 > · · · > s r = s min . As described in detail in 19 (see also Methods below), using a maximum entropy approach it is possible to show that the number of relationships in one circle divided by the previous, smaller one, behaves approximately as where µ ≡μ(s max − s min )/(r − 1) , with μ a Lagrange multiplier connected to the cognitive capacity constraint σ . Therefore, the circles satisfy an approximate scaling relation; in particular, for µ ≈ 1 the usual value of 3 found on empirical data is recovered. On the other hand, the theory also predicts a so-called "inverse" regime, when µ < 0 , in which most of the relationships are in the closest circle. This second behavior had not been described prior to the publication of 19 , when it was checked against empirical data of small migrant communities, confirming its existence.
In the continuum case 18 , circles are defined as the fraction of links χ(t) whose "distance" to the individual is not larger than a specified value t ( 0 ≤ t ≤ 1 ). Their scaling ratio turns out to be controlled by a new parameter, η , the equivalent of µ (in fact, it can be shown that η ≈ (r − 1)(e µ − 1) ). In this continuous approach, the separation between the two regimes, the normal and the inverted ones, also takes place at η = 0 . On the other hand, setting the number of circles to the usual value r = 4 and assuming, as empirically observed, that e µ ≈ 3 5 , we then find η ≈ 6 . More details can be found in Methods below, and in the original references 18,19 .
With the above approach in mind, given a dataset of relationships with continuous weights, the scaling parameter η can be estimated using the maximum-likelihood method. The basic idea of the fitting procedure is as follows: for every individual chimpanzee, we have the list of other individuals that chimpanzee groomed and how often that chimpanzee was observed to groom each one of them. From these data, we can obtain the range of grooming investment allocated across grooming partners, and also the number of observations devoted to grooming activities. We are then able to obtain the corresponding η parameter characterizing the chimpanzee's distribution of grooming times, and by inserting the value of η in our analytical expression we have the function describing the whole distribution χ(t) (see Parameter estimation in Methods for full details). We note that this is very different from the common approach in primatology to regress the response (e.g., grooming times) onto socio-demographic factors like age, sex, and kinship. Instead of regressions to which factors could be added, we fit an analytical expression that yields the distribution of grooming observed in the chimpanzees. In this respect, it is important to note that the model does not depend explicitly on any individual socio-demographics, that would enter the picture only indirectly through the total capability to maintain relationships (i.e., the total amount of time devoted to grooming) and, as a consequence, it provides a different kind of information. Finally, a limitation of our approach is that chimpanzees with very few relationships (despite good sampling effort) can not be included, due to the inaccuracies in the corresponding fits to our analytical expression (see Data curation in Methods for a discussion of how this leads to excluding some individuals from the analysis).
The type of fits of the function χ(t) , giving the size of the continuous circles, to the data on individual chimpanzees is exemplified in Fig. 1 (plots of the fits for all the individuals considered in the study are provided  Supplementary Information). The plots clearly show that the fits are not perfect, but on the other hand most points lie within the 95% confidence interval for the fitted distribution, and those that do not are not far from it. As the Supplementary Information shows, there are examples of better and worse fits than those shown here-which have been selected because they had more data for the fitting. One should bear in mind that the chimpanzee data are quite noisy because they have been obtained from chimpanzees living in large, naturalistic enclosures that lead to varying levels of animal visibility, and data have been collected by many different observers over the four-year period (see Methods). Under those circumstances, the fits can be actually considered to be very good, and in fact if we compare them to those reported in 18 , they are of a similar quality. Therefore, we can conclude that the continuum theory is a good description of how a chimpanzee distributes the time it devotes to grooming other individuals. Our analysis of the results for the parameters characterizing all the individuals studied is summarized in Fig. 2. The values for the parameter η obtained from the fits have a mode of approximately η = 4 , while the mean value is close to the mode except for Group 2 where it is closer to 6. The range of obtained values for η falls within the range of expected values, and the mode indicates that typically the scaling ratio of the circles for chimpanzees would be somewhat smaller than for humans, except in Group 2. We believe that the reason for the difference of this group with respect to the others arises from the fact that it is distinctly larger than the rest, both pre-and post-filtering, and that this allows group members to develop a richer social life as far as grooming is concernedi.e., it allows individuals to devote small intervals of time to grooming many others, leading to higher values of η and more low intensity relationships.
The histograms presented show that there are no fits yielding negative values of η , which would indicate the existence of chimpanzees with an inverted structure of relationships, like those observed in humans 19 . However, the values of η close to zero are on the border between regimes, so they should give rise to a larger fraction of individuals in the inner part of the distribution χ(t) . Figure 3 confirms that this is indeed the case by showing the relationship structure and the χ(t) fitted function for two very different examples. On one side of the η scale we have the distribution of grooming times by Kit, whose η = 0.14 is rather typical of a structure that is intermediate between regimes. Kit devotes quite some time to grooming Kambo, Commander, Bobby and Val, and also a noticeable amount of time to other chimpanzees. Interestingly, this agrees with the fact that Kit is in group 4, the smallest one, in agreement with the situation in which the inverted regime is expected to arise: not so many possible individuals available to groom. On the opposite extreme of the η scale, Fig. 3 shows the results for Genny, in Group 1, with η = 10.3 . In this case, we have a situation which is typical of the normal regime, with a lot of grooming devoted to her baby, some amount to her daughter Gonzaga, and very small amounts to many other individuals. Once again, this is to be expected in so far as Genny lives in Group 1, where there are many chimpanzees she can relate with. Therefore, the results corresponding to different values of η are also quite similar to those found for humans 18 . Figure 1. Examples of fittings for an individual of each group. Selected individuals are those for which there were more available data points. From left to right, individuals belong to groups 1, 2, 3, and 4. Shown in each case is χ(t) , the fraction of links whose "distance" to the individual is not larger than t. Red dots are actual data, representing the number of individuals who receive no more grooming than a fraction t of the maximum. The blue dashed line is the fitted function χ(t) , and the blue-shadowed region is the interval of confidence.

Discussion and conclusions
The results reported in this study show that chimpanzees appear to organize their grooming time in very good agreement with the prediction of the continuum resource allocation theory applied to humans in 18 . In other words, chimpanzees distribute the time they devote to grooming other individuals in their group very much like humans organize their relationships when the relationship intensity is treated as a continuous value. These findings are in line with previous accounts that grooming can be considered a resource allocation problem [26][27][28][29][30] .
As we see in humans, some chimpanzees solve this allocation problem by investing large amounts of grooming in a few other individuals (more so when the group is small), while others invest small amounts of grooming in many other individuals. In other words, they show the same two allocation strategies observed in human relationships and in the same situations, with inverted structures being more likely in small groups. We note that these findings corroborate grooming as an expression of friendship in non-human primates 31 , yet more importantly indicate that different social strategies might be at play among chimpanzees, dependent on their immediate group structure. Our results show that chimpanzees living in larger groups employ their social capital differently than chimpanzees in smaller groups, like in humans 19,32 . This suggests that chimpanzees navigate their social environment flexibly, distributing their social resources across many group members when needed, yet investing more intensely in a few others when possible. In this light, any social forces that affect levels of group cohesiveness (e.g., to what extent a group forms a whole versus a modular, sub-grouping structure) indirectly shape a primate's resource allocation strategy, a link we only know from the science of human sociology 1 . The novel finding here is that a nonhuman primate species, chimpanzees, appears to organize their affiliative relationships, or friendships, following the same pattern that we previously characterized for humans. Indeed, it appears that the mean group sizes of all primate species follow the same pattern as we see in the circles of human Arrows connect the focal individual with those it grooms, while the width of the arrows represents the total amount of time devoted to grooming a specific chimpanzee. Orange ovals represent females, blue ones represent males.  16,17,33 . By means of our continuum analysis of grooming data, we show that egonetworks in chimpanzees also exhibit a specific organization in terms of (the continuous equivalent of) circles. Our results thus establish that social networks in humans and chimpanzees show similar relationship structure. Further research could leverage the behavioral data of other primate species to determine whether the continuum analysis of egonetworks reveals a consistent pattern in other species living in large social groups.

Methods
Environment description. At the Chimfunshi Wildlife Orphanage, chimpanzees live in large, forested enclosures ranging from 47 to 190 acres that consist of miombo grasslands and forests, a natural habitat for wild chimpanzee populations 34 . In their enclosures, the chimpanzees have ample space to roam and exhibit speciestypical behaviors, including engaging in natural fission-fusion dynamics 35 . The four study populations at Chimfunshi live in separate enclosures which precludes the possibility for inter-group encounters. Apart from a small section between Groups 3 and 4, the chimpanzees from the different groups cannot see each other, yet live within hearing-distance from each other (i.e., the groups are stretched out over a crow-fly distance of 3 km). Each of the four groups is composed of a mixture of wild-born chimpanzees and chimpanzees born at Chimfunshi. Wildborn chimpanzees come from various phylogenetic and geographic backgrounds, with a mixture of subspecies. The chimpanzees at Chimfunshi engage in natural foraging behavior on mostly fruiting trees, but also insects and small mammals present in their enclosures. Additionally, they are fed two times a day with a variety of fruits and vegetables to supplement their diets. At nights, the chimpanzees sleep in their woodland enclosures in selfconstructed nests (for details see 36 ).

Data collection.
The grooming data were collected as part of a larger, ongoing data-collection effort at Chimfunshi aimed at assessing chimpanzee sociality over time 36 . Trained staff members conduct focal follows daily with an every-minute scan sampling technique in the ZooMonitor (ZM) application 37 , a protocol which has been implemented and maintained by the authors (KAC, DBMH, EJCvL) since 2015. The protocol comprises 10min focal follows in which 10 scan points are scored. On each scan, all instances of proximity (<1 m), grooming, social play, and aggression by the focal individual are scored, including the identities of the interaction partners. Data were semi-randomly collected from the fence line, restricted by visibility. We work in a sanctuary setting in which the chimpanzees have ample space to retreat into the forest. As per sanctuary stipulations, we do not enter their enclosures ever, which prevents us from following the chimpanzees into the forest. Hence, the next best thing is to divide the fence line into different sections and start the observations randomly from these different sections, also randomizing the direction (clockwise VS counter-clockwise) in which the search for chimpanzees commences 38,39 . Upon encountering a chimpanzee within eye-sight, we start behavioral observations on the respective individual using established focal follow protocols (see our main text). After finishing the respective focal follow, we search for the nearest chimpanzee to start the next focal follow. Overall, if the focal follow lasted 5 minutes or less (i.e., due to visibility challenges), we discarded the focal follow. The observation efforts start at a different location each day upon which the first-seen chimpanzee is chosen as the focal. The observation efforts were distributed across the day: typically, per group, one hour was collected between 7am-11am and one hour was collected between 2:30pm and 5pm, after which the chimpanzees retreat into the forest to spend their nights there. All individuals were sampled except for dependent offspring clinging to their mothers. This study was approved by the ethical committee of the Max Planck Institute for Evolutionary Anthropology and the data collection protocol was approved by the Chimfunshi Research Advisory Board, ref -2014C014). Animal husbandry and research protocols also complied with international standards 40 and local guidelines on the husbandry and care for sanctuary-living animals as stipulated by the Zambia Wildlife Association (ZAWA). The study was purely observational in nature and thus did not require specific ethical approval for any changes to the daily husbandry protocols as adhered to by Chimfunshi. Data curation. We chose to focus on grooming behavior because of the established relationship between grooming behavior and dyadic relationship quality 24 , and because we judged the grooming data to be most reliably and consistently collected over the four year period. For our analysis we consider a grooming interaction when an individual has been observed grooming another in the 10 minutes interval it acts as a focal subject, regardless of whether this action takes place during the whole of this period or only during a fraction of it. In this way, we can unify the criteria for considering a grooming action and reduce uncertainty in the data, as in many cases it starts or ends outside the focal observation period. As an alternative, we have assigned a weight to each grooming bout given by the number of minutes it lasted within the observation window. Data analysis using this criterion yields results in very good agreement with those presented here, so we retained the first procedure as is standard in the field.
Prior to constructing networks, we filtered chimpanzees that have groomed less than five individuals in the study period, although we still consider the grooming actions performed on them. This condition does not influence the conclusions, since the calculus of the parameter η is performed individually for each chimpanzee, and is based on the fact that five is the size of the core of grooming ego networks in primates 15 . Having less than five other individuals would lead to very large errors in the fitting procedure, turning the results of the analysis meaningless for that specific chimpanzee. Most of the individuals filtered out as a result of this criterion have been observed less than 20% of the mean number of observations of the population ( ∼ 300 times). A few others that had more observations were also excluded by this criterion; those were typically immature individuals who groom very little and are still very dependent on their mothers' actions. With this procedure, we basically www.nature.com/scientificreports/ selected for the analysis of the egonetwork the chimpanzees older than nine years old, while the infants and the chimpanzees who died between 2015 and 2019 are not considered. Therefore, the restriction allows us to homogenize the population of chimpanzees studied and to extrapolate the results obtained to the case of adults.
Theoretical background. For the sake of clarity in what follows, let us briefly summarize the main results from theoretical approaches to the circle structure. In the discrete case 19 , it is assumed that L is the total number of relationships in an ego-network and σ is the average cognitive cost of a relationship. Relationships belong to r different categories, each of them bearing a different cost s max = s 1 > s 2 > · · · > s r = s min . As described in detail in 19 , using a maximum entropy approach it is possible to obtain the probability that a given relationship of the ego-network belongs to category k as where μ is fixed by letting σ be the expected cost σ = E(s k ) . Using this probability distribution we can calculate χ k , the expected number of relationships with costs larger than or equal to that of category k (i.e., the size of the social circles, with k = 1 corresponding to the innermost one), as where µ ≡μ(s max − s min )/(r − 1) . As mentioned in the main text, it can subsequently be shown that, for large values of µ , the scaling ratio, i.e., the size of one circle divided by the previous one, behaves approximately as As discussed in 19 , this result predicts the known regime for values of µ > 0 , in which the circles satisfy an approximate scaling relation; in particular, for µ ≈ 1 the usual value of 3 found on empirical data is recovered. On the other hand, it also predicts a so-called "inverse" regime, when µ < 0 , in which most of the relationships are in the closest circle. This second behavior had not been described prior to the publication of 19 , when it was checked against empirical data of small migrant communities, confirming its existence.
In the continuum approach (18) the key parameter is called η , and it is related to the average cost σ by the implicit equation and thus η is actually a function η(t) , with t defined in the equation above representing a normalized measure of the cost of a relationship ( t = 0 corresponding to the highest cost and t = 1 to the lowest one). Once η is determined, the fraction of relationships with a normalized cost not larger than t is given by This is the curve that should fit the data. Notice that each individual will be characterized by its own value of η. The scaling ratio of the circles can be obtained from the asymptotic behavior, for large η , of the logarithmic derivative of χ(t) , the fraction of links whose "distance" to the individual is not larger than t, which turns out to be In this approach, the separation between the two regimes, the normal and the inverted ones, also takes places at η = 0.
Finally, to connect the two formalisms, we can use the fact that the discrete version of the left-hand side is (χ k+1 − χ k )/χ k �t ; then, a comparison between (4) and (7) in the ordinary regime leads to η�t ≈ e µ − 1 . Since �t ≈ (r − 1) −1 , we obtain the equivalence Interestingly, this result shows that the value of µ in the discrete model depends on the total number of layers, r. This fact had not been noticed in previous research because of the implicit assumption of the existence of r = 4 layers in the structure of egonetworks (5). Setting r = 4 in (8) and assuming, as empirically observed, that e µ ≈ 3 5 , we then find η ≈ 6.
Parameter estimation. With the above approach in mind, given a dataset of relationships with continuous weights, the scaling parameter η can be estimated using the maximum-likelihood method. As described in 18 , such an analysis leads to an expression equivalent to (5) to connect the range of data weights to the theoretical parameters, η and σ . Thus, for an empirical dataset we can find the values of s max and s min , which are the largest/ smallest possible costs an individual can invest in a relationship, respectively. Then, the value of σ , the total cost per item, is determined by (2) p k = Z −1 r e −μs k , Z r = r k=1 e −μs k , (3) χ k = e kµ − 1 e rµ − 1 , χ(t) = e ηt − 1 e η − 1 .