Introduction

Stability is a significant aspect of social structure (Hinde 1976), and allows animals to prevent conflicts and to optimise their social relationships with others, both of which play a crucial role in fitness (Silk 2007; Silk et al. 2010; Kulik et al. 2012; Majolo et al. 2012; McFarland and Majolo 2013; Kerhoas et al. 2014). To build stable relationships, social animals (including primates) must respond appropriately to various social situations. Dominance is thus an important social component that influences the daily interactions between group members in primate societies (Rowell 1974; Bernstein 1981).

Dominance hierarchy modulates numerous interindividual differences, such as physical characteristics (Baxter et al. 2018), health (Sapolsky 2005), reproductive success (Cowlishaw and Dunbar 1991), behavioural strategies (Seyfarth 1977) and position in an affiliative social network (Wooddell et al. 2020), but also cognitive performance (Drea and Wallen 1999). A higher rank position may offer substantial social advantages in many primates (Smuts et al. 1987), and is therefore essential for quantifying the dominance hierarchy when studying primate groups. Because of its implication in behaviour and cognition, knowledge of dominance relationships is particularly useful when working on cognitive or neuroscientific testing (Massen et al. 2010; Sallet et al. 2011; Ballesta and Duhamel 2015), and also when managing captive social groups of non-human primates (NHP).

Dominance rank is however not a fixed trait, and may vary across time depending on birth order among siblings (Lea et al. 2014), competitive ability (Appleby 1982; Archie et al. 2006) or coalition formation (Schülke et al. 2010; Gilby et al. 2013). Instability, defined as frequent rank reversals, can result from changes in the group composition (social mobility or death of group members, Neumann et al. 2011; Kaburu et al. 2013; Wooddell et al. 2016), but also from within group contest (van Schaik et al. 2004). Rank reversals can cause high rates of injury (McCowan et al. 2018) or stress (Engh et al. 2006), or can trigger emigration from the group (Schaik and Noordwijk 2001; Jack et al. 2012). Monitoring dominance hierarchies and their temporal stability is therefore an important aspect in the study of social dynamics and for captive group management purposes.

However, as the number of individuals in a social group increases, the number of interactions also increases exponentially, which makes determining dominance using direct observations of social behaviours challenging, and results in sparse data on dyadic relationships (de Vries 1995). In such environments, experimental methods which introduce a competitive context can be used to more easily assess dominance hierarchy in NHPs; however, for optimal results, such experiments often use water or food deprivation, or require a behavioural training of the subjects (Hamilton 1960; Boelkins 1967; Christopher 1972; Clark and Dillon 1973; Wrangham 1981; Canteloup et al. 2016). In NHPs, priority of access to enrichment devices can also be used to assess the social structure of the group (Chamove 1983; Ballesta et al. 2014). Although these methods are more time-efficient, they still require considerable human and time resources and may depend on the experimental context of competition (Brennan and Anderson 1988).

Recently, the fields of cognitive ethology and neuroscience have seen an increase in the development and use of machines for automated learning and testing (MALT), enabling the study of cognitive and social processes in NHPs (Fagot and Bonté 2010; Gazes et al. 2013, 2019; Claidière et al. 2017; Fizet et al. 2017; Gelardi et al. 2019). In these cases, subjects are no longer isolated from their social group, and perform cognitive tasks at their own pace, which improves animal welfare during data collection. These devices are a valuable refinement of the practices in cognitive ethology and may represent a change of paradigm in neuroscience that involves NHPs. Importantly, the behaviours and cognition of NHPs assessed by these devices are comparable to those expressed in a laboratory setting (Gazes et al. 2013), and therefore extend computer-based study of cognition to semi-free-ranging animals. It is worth noting that these testing devices also offer valuable environmental enrichment and contribute to increasing the welfare of captive or semi-free-ranging NHPs (Bennett et al. 2016, 2018; Kim-McCormack et al. 2016). Indeed, digital enrichment can offer an almost infinite number of tasks, adapted to each individual's abilities, while allowing a high engagement rate and reducing stress and boredom (Honess and Marin 2006; Clark 2011). So far, MALT have been used as a tool in cognition research, while the investigation of their potential for exploring social dynamics in groups of NHPs with access to MALT has only just begun (Claidière et al. 2017; Gelardi et al. 2019).

Dominance in groups of NHPs has typically been studied using direct observation methods described by Altmann (1974). These standard methods provide unbiased behavioural data and have provided us with the vast majority of information we currently have on NHP sociality. However, in spite of their undeniable usefulness, these methods are time-consuming, costly in terms of human resources, and limited regarding the quantity of data we can collect in a day. To overcome these limitations and explore a new potential of MALT, we propose that such automated devices could be used to investigate social relationships, and thus, group structure. To evaluate the reliability of this method, we compare social information gathered through standard observation techniques with social information collected on the same social group automatically through MALT. We analysed 103,655 working sessions by 26 Tonkean macaques (Macaca tonkeana) on four MALT at the Primate Center of the University of Strasbourg (Fizet et al. 2017). We observed that macaques could compete for access to the MALT by displacing other animals currently working on it. We therefore hypothesised that the outcome of these competitive interactions would reflect the dominance hierarchy of the group, which was measured in parallel through direct observations in the macaque living environment. In addition, as a proof of concept, we applied this method to depict the dynamic of the dominance hierarchy of the study group during a 3-year period. We assessed the consequences of male removals on group stability and highlighted the usefulness of our method for group management of primates in captivity.

Materials and methods

Subjects

We collected data on one social group of Tonkean macaques (Macaca tonkeana), all captive-born and housed at the Primate Center of the University of Strasbourg, France. Animals lived in semi-free-ranging conditions in a wooded park of 3788 m2 with permanent access to an indoor-outdoor shelter (2.5 × 7.5–2 × 4 m). The group included 28 individuals an with even sex ratio between adults (Table1), which is comparable to the composition of wild groups (Riley 2005, 2007). Individuals younger than 3 years were considered juveniles. Monkeys were fed commercial primate pellets twice a day inside the indoor shelter and received fresh fruit and vegetables once a week outside observation hours. Water was provided ad libitum in the indoor shelter. Four females had contraceptive implants according to the Primate Center breeding program, and one female gave birth in February 2018. Out of the 28 individuals from the group, we collected data at the MALT (see detailed description of our MALT below and in Fizet et al. 2017) from 26 individuals and data from direct observations on 23 individuals.

Table 1 Demographics of the group and subject presence (+), absence (Ø) or exclusion (−) in each data set

The alpha male (determined by direct observations) of the group, ‘Uly’, had never significantly engaged with the MALT during the past 4 years and therefore could not be included in our automated data collection. More data are needed in order to know whether this was a personal preference of this animal, or a consequence of being the alpha male in a Tonkean macaque society (as this has not been observed in other species of monkeys; Claidière et al. 2017; Gazes et al. 2019; Gelardi et al. 2019)). The second individual that never used the MALT in the data set considered for Fig. 2 was born in February 2018 (‘Fic’). This subject was considered too young to have a radio-frequency identification (RFID) chip implanted in her forearms. We did not record a sufficient number of events for the subject ‘Wat’ over the periods of direct observations and thus excluded him from this analysis. During direct observations, five subjects (‘Bar’, ‘Ber’, ‘Ces’, ‘Dor’ and ‘Eri’) were too young to be reliably identified in direct observations of social conflicts but were using the MALT at that time. Only after January 2019 were ‘Bar’ and ‘Ber’ old enough to be reliably identified during direct observations. Hence, the comparison of the dominance hierarchy obtained by automatic and observational data includes 22 out of the 28 individuals (see Table1). We considered three key events which could represent a significant disruption in the stability of the hierarchy: on the 23rd of May 2018, one adult male (‘Wot’), the 22nd of January 2019, four adult males (‘Yan’, ‘Yak’, ‘Wal’, ‘Wat’), and the 26th of February 2020, one adult male, (‘Oli’), were removed for group-management purposes (Wooddell et al. 2017).

Collection of direct behavioural observations by human observers

Direct behavioural observations were collected using focal animal sampling and ad libitum sampling (Altmann 1974) between March 2018 and May 2019, first from 14 March to 29 May 2018 by one author (BS; data set 1), and then from 30 May to 13 December 2018 by another author (FM; data set 2). Inter-observer reliability was calculated during an entire week of behavioural observations (total of 89 focal follows). The outcome was Cohen’s κ = 0.89 for the recorded agonistic events and the identities of the observed individuals. Occurrences of agonistic and submissive behaviours were recorded ad libitum. Only data occurring in the park and the outside shelter, where the animals were clearly in view, were recorded. Behavioural observations lasted 10 min per focal individual and were evenly spread between mornings and afternoons, from 8:30 to 13:00, and from 13:00 to 18:00. Agonistic behaviours included threats (e.g., open mouth threat), displacements (i.e., a macaque approaches another who departs immediately, e.g. at a food source, around a consorted female), chases and physical conflict (e.g. bite, slaps). Submissive behaviours, in the context of agonistic interactions only, included facial expressions (e.g., silent-bared teeth), fleeing, crouch and screams (based on the social repertoire of Tonkean macaques described by Thierry et al. (2000). For each aggressive interaction, the actor and receiver were recorded, and also if the interaction involved retaliation. If A attacked B and B retaliated, (i) with no clear winner, we encoded A-B and B-A as two independent winner-loser entries in the conflict matrix, and (ii) if after the fight A won, we encoded A-B and B-A and A-B as three independent winner-loser entries in the conflict matrix. Behaviours were recorded using Animal Behaviour Pro software (Newton-Fischer, University of Kent 2012) on an iPod touch (Apple), or manually on paper. The last set of direct observations was performed by another author (JW; data set 3) using similar focal animal sampling procedure between 28 January and 27 May 2019. This third data set was already used in another study (Whitehouse and Meunier 2020).

Automated social data using MALT

Automated data were collected at four MALT, which the monkeys could access directly from their living environment. During the time of direct observations, several cognitive tasks were available to the macaques at the MALT. These tasks have already been described in detail (Fizet et al. 2017) and are not directly relevant for the present study. The MALT were designed and developed at the Primate Center of the University of Strasbourg, with their development being inspired by Fagot and Paleressompoulle's Automated Learning Device for Monkeys (Fagot and Paleressompoulle 2009). These modules were set up in a shelter that was placed alongside the macaque enclosure. Each MALT was freely accessible 24/7, except for 2-hour cleaning and refill sessions at least twice a week. The four MALT were placed in the same room, but were visually separated from each other by opaque Trespa® panels. Monkeys were rewarded at the device for a correct answer by receiving a sip of liquid reward (2 s of reward, corresponding to 1 mL of diluted syrup, 1/10). MALT allows automatic identification of each subject thanks to an RFID dual-detection system (Pebayle et al. 2016). For that purpose, subjects were all equipped with two RFID microchips (UNO Micro ID/12, ISO transponder 2.12*12 mm), injected into each forearm during the macaque veterinary health check under appropriate anesthesia. When the RFID chip of an animal is detected, it resumes its personal experimental sessions, which remains open for 30 s after the last screen touch or RFID detection. If another animal tries to engage with the cognitive tasks while another individual’s session is active (see Supplementary videos), a conflict (including which individual was replaced by whom) is recorded in our database (hereafter: MALT conflict).

We considered three data sets corresponding exactly to the direct observation periods: the first data set spanned from 14 March to 29 May 2018, which represents 10,257 working sessions and 995 MALT conflicts (see Fig. S1 and Fig. S2); the second data set spanned from 31 May to 13 December 2018, which represents 62 887 working sessions and 8146 MALT conflicts; and finally, the third data set spanned from 28 January to 27 May 2019, which represents 30,511 sessions and 4535 MALT conflicts. Data collected with classical direct observations show 948 agonistic interactions, whereas we collected a total of 13,676 social displacements using MALT during the same time period.

Assessing the reliability of the automated method using video scoring

Each MALT was equipped with video cameras (Microsoft LifeCam HD-3000). The video streams were cut into sections of 15 min each, and were automatically saved to a database if the recording contained at least one trial. We extracted and visually analysed these video streams around the time of session conflicts. A total of 703 randomly selected videos were manually scored using NOLDUS The Observer® XT 10.1.548 software as follows. We measured four different time points for each session conflict: (1) the contester enters the tunnel area leading to the MALT, (2) the contester takes control of the MALT, (3) the former player decides to leave the MALT (body facing away from the MALT touchscreen) and (4) the former player exits the tunnel area. These time points were used to ease and control the quality of the categorisation of different conflict situations (such as ‘Displacement < 1 m’ and ‘Displacement > 1 m’). Other social situations were scored based on the observed interactions between the player and the conflict monkey (e.g. ‘Pushing’, ‘Supplanting’, ‘Affiliative contact’). Supplantation implied that the contester displaced and took the place of the former player involving physical contact but no push with hand or body part between the two monkeys. We recorded affiliative contacts, as defined by Thierry et al. (2000). An optional filtering procedure, designed to exclude events that did not represent genuine social displacement from data sets, is described in the supplementary material (Fig. S1). Briefly, in order to filter chance-driven displacements or affiliative contacts, we considered, respectively, (1) the time between former player departure and contester session opening and (2) the time between consecutive MALT conflicts (Fig. S1 and Fig. S2). All the data reported in the main section of the manuscript are unfiltered (Figs. 2, 3).

Data analysis

Dominance hierarchy was assessed using David’s scores (de Vries et al. 2006) and Elo-rating (Neumann et al. 2011) using the package ‘EloRating’ in R (R Core Team 2014). The use of both David’s score and Elo-rating for the assessment of hierarchical structure is common in studies of animal behaviour (Neumann et al. 2011) and therefore we chose to consider both methods here. One of the main differences between these two approaches is that David’s score is calculated on a complete interaction matrix, where the temporality of interactions is not considered, whereas Elo-rating is calculated based on a sequence of events where the order of interactions is important and taken into account. This provides Elo-rating with the added benefits of being able to assess the dynamics of a hierarchy across time, and allows for the extraction of hierarchy data at specific time points. For all data sets, Elo-rating was used with a starting score of 1000, and the k factor (i.e., the maximal amount of ‘points’ an individual can get from an interaction, function: optimizek, package: EloRating) was optimised. In order to assess orderliness in dominance relations in animal groups, we used the triangle transitivity (ttri), which measures the proportion of transitive relations between all triads in a network (Shizuka and McDonald 2012). This measure is based on the proportion of established three-way relations that are transitive (if A beats B and B beats C, then it is expected that A also beats C). Triangle transitivity is scaled between 0 (the number of transitive triadic relations is not higher than random expectation) and 1 (all triadic relations are transitive). The significance of ttri was tested using 2000 generated random graphs (function: transitivity, package: EloRating). Steepness of hierarchy was measured using the function steepness in the EloRating package (de Vries et al. 2006) with 1000 generated randomisations.

We assessed the correlation between dominance hierarchy based on direct observations and our automated method using Spearman’s rho and Pearson correlation test for each data set separately. The non-parametric correlation method (Spearman) was used when considering ordinal ranks. Sample sizes were 20, 19, and 18 individuals for data sets 1, 2 and 3, respectively (Table 1). Analyses were performed using custom scripts in MATLAB (R2018a, The MathWorks), R scripts were called using MATLAB (Chen 2020), and the Gramm graphical toolbox was used in Fig. S1 (Morel 2018).

Application of automated data: a proof of concept

We calculated the Elo-rating of our group across all automated observation periods so far, resulting in 1137 consecutive days (01 February 2017 to 12 May 2020; 1039 days with recorded conflict used in Fig. 3). During this period, the MALT recorded 38,165 conflicts. Three key events could represent a disruption to the hierarchy—the removal of one mid-ranking adult male in the group (event 1, 23 May 2018), the removal of four high-ranking adult males in the group (event 2, 22 January 2019) and the removal of one high-ranking adult male (event 3, 26 February 2020). In this species, adult males often migrate to neighbouring groups. Here, the decision to remove these animals was in order to mimic this natural change in macaque group composition and to ultimately avoid the potential for inbreeding (Riley 2010; Wooddell et al. 2017). To assess the effect of these removal events on the hierarchy, we used the function stab_elo (S, from the EloRating package) which provides us with a score between 0 and 1 for each day (where 1 represents a stable hierarchy without any rank reversals). In order to remove days without recorded conflict from this calculation, the algorithm was reproduced in MATLAB using the following equation (Neumann et al. 2011; McDonald and Shizuka 2013):

$$S = 1 - \frac{{\mathop \sum \limits_{i = 1}^{d} \left( {C_{i } . w_{i} } \right)}}{{\mathop \sum \limits_{i = 1}^{d} (N_{i }^{2} /2)}}$$
(1)

where Ci is the sum of absolute differences between rankings of two consecutive days (d), wi is a weighting factor based on the standardised Elo-rating and Ni is the number of individuals present on both days. Using this data, we compared the stability of the hierarchy in the 50 days prior to an event and after an event with a Wilcoxon rank-sum test.

Results

According to the videos of MALT conflicts, we found that in 74% of the cases, the MALT conflicts represented a genuine social displacement, relevant to the study of dominance hierarchy (Fig. 1). These interactions included different active forms of social displacements such as supplanting or even pushing the former user of the MALT. We also observed ‘ambiguous displacement’ when more than two individuals were involved in the conflict, or the conflict had no clear outcome (e.g., the displaced individual did not leave the area). In 10% of the cases, no social interactions were detected at all, as the player left the area and, within the next 30 s, another individual came to use the MALT. These situations were arguably driven by chance even if we cannot exclude that auditory or visual cues, which cannot be detected here by the human observer, prompted the animal to leave the MALT (see ‘no observed interaction’ in Fig. 1). In 16% of the cases, MALT conflicts were related to affiliative interactions. These included situations such as young subjects playing around the MALT, accidentally detected within the same 30 s windows, which created a conflict on the MALT (see ‘using MALT = 0, tunnel > 1′ in Fig. 1). We also recorded co-presence inside the tunnel without any sign of agonistic interactions (see ‘using MALT > 1′ in Fig. 1). For instance, one individual was observed working while the other was drinking the juice reward. Such situations can be regarded as interesting co-working and/or co-feeding tolerance examples and may require further investigation (Carne et al. 2011; Dubuc et al. 2012).

Fig. 1
figure 1

a Results of the manual scoring of the behaviour of monkeys around the time of session conflicts at the MALT. The reddish portions of the pie (74% of the sample) indicate agonistic events where a social conflict corresponding to a displacement of one monkey by another was identified in the video recording. Dark-grey portions (10% of the sample) indicate situations where no clear social conflicts could be identified. The greenish portions of the pie (16% of the sample) represent affiliative events where monkeys tolerated each other and may have displayed affiliative behaviours. ‘Using MALT > 1 monkey’ means that more than one subject was using the device; ‘Using MALT = 0’ indicates that no subject was using the device. ‘In tunnel > 1’ means that the detection of the RFID chips of the subjects happened during social interactions (such as play behaviour) between animals in the tunnel linking the device to the wooded park

MALT conflicts that did not represent a genuine social displacement should be excluded from the data in order to compute the dominance hierarchy. We designed an optional filtering procedure (described in Fig. S1) in order to exclude these events. However, the unfiltered and filtered data gave very similar results when compared to the observation data (overall unfiltered data mean R = 0.81 and all p < 0.01, Fig. 2; filtered data mean R = 0.84 and all p < 0.001, Fig. S2). Thus all the data reported in the main section of the manuscript are unfiltered (Figs. 2, 3), and filtered data are presented only in the supplementary material (Fig. S2). Triangle transitivity scores indicated that the hierarchy was linear in all data sets considered (for data sets 1, 2, 3, respectively; observation ranking/automatic ranking; ttri = 0.94/0.71; ttri = 0.77/0.82; ttri = 0.97/0.71; all p < 0.001). In all cases the steepness of the hierarchy was fairly low, as expected for tolerant macaques (Balasubramaniam et al. 2012), and significant, with variations between observation periods and ranking methods (for data sets 1, 2, 3, respectively; observation ranking/automatic ranking; steepness value = 0.24/0.22; steepness value = 0.55/0.10; steepness value = 0.38/0.17; all p < 0.001).

Fig. 2
figure 2

Comparison of social hierarchies computed using direct observations of behaviours (observations ranking) and MALT conflicts (automatic ranking) in three data sets (rows) and using three different measures of social hierarchies (columns). For all panels, the grey line represents least squares regression and the dashed line the reference. Each row represents a given data set analysis and each column represents a different method of computing the social hierarchy. In panels (a, d, g), the social hierarchies were calculated using the ordinal ranks obtained with David’s score (DS); correlation coefficient R and p values correspond to Spearman rank correlations. In panels (b, e, h), DS values were used; correlation coefficient R and p values are from Pearson correlation. In panels (c, f, i), Elo-ratings were considered; correlation coefficient R and p values are from Pearson correlation. Sample sizes were 20, 19, and 18 individuals for data sets 1 (a, b, c), 2 (d, e, f) and 3 (g, h, i), respectively. For graphical purposes only, all data were z-scored

To rule out the possibility that a subject’s rank would influence its access to MALT and bias the measure of dominance, we correlated the residuals of the correlations between the hierarchies obtained using observation and automatic data (Fig. 2) with the rank of the animals and found no significant correlation (Fig. S3, all p > 0.05). Overall, these analyses demonstrate that conflicts occurring during the use of MALT represent a reliable proxy of social conflicts.

Finally, we used more than three years of MALT conflicts to compute the hierarchy dynamic of the group (Fig. 3a), and we considered the impact of male-removal events on the stability of the hierarchy (Fig. 3). These analyses showed a significant reduction in stability after the removal of a mid-ranking male (Fig. 3b, Wilcoxon rank-sum test, p < 0.001), but no significant changes after the removal of four or one high-ranking male (Fig. 3b, Wilcoxon rank-sum test, p = 0.74 and p = 0.60, respectively).

Fig. 3
figure 3

Proof of concept: automated Elo-rating across all observation periods and the effect of animal-removal events on the hierarchy. (a) Elo-plot across time; smoothing has been applied to each line for visibility, and key animals have been highlighted with bold lines. All the males (n = 5) that were removed during the three events (the timing of events are visualised with vertical lines) are highlighted, in addition to the animals that were calculated as the highest, lowest and most mid-ranking at the end of the observation period. (b) The stability of the hierarchy across time. Here, raw stability data are presented with points. For visualisation purposes, the data were smoothed using a moving average window of 50 days. The Elo-stability of the pre- and post-event periods of 50 days were compared using the Wilcoxon rank-sum test (** p < 0.001, # p > 0.05); days without recorded conflict were excluded from this analysis (see Methods)

Discussion

Social hierarchies can be measured based on the outcomes of dyadic conflicts over access to any resources (Hamilton 1960; Boelkins 1967; Christopher 1972; Clark and Dillon 1973; Chamove 1983; Ballesta et al. 2014). Very few solutions are currently available for measuring dominance interactions in animals automatically (Hrolenok et al. 2018; Evans et al. 2018; Gullstrand et al. 2021). In this study, we considered several months of daily use of MALT by up to 26 semi-free-ranging Tonkean macaques in order to assess the dominance hierarchy of this group.

Even if we demonstrate the relevance of this method in a single species of NHPs, it seems parsimonious to think that this can be safely generalised to other NHP species. In this tolerant species of macaque, we estimated that about 16% of the conflicts detected with the MALT may not represent a social conflict but an affiliative event. For instance, manual scoring of a subset of MALT conflict videos revealed unexpected situations when macaques appeared to ‘share’ a device (see Supplementary videos), i.e., one individual collecting the reward of the other one. Tonkean macaques are known to be more socially tolerant than other species of macaques (Thierry 2007), and these affiliative events are thus likely to be rarer in most of the other species of NHPs. The close affiliative interactions observed in the MALT are likely restricted to a few preferred social partners. Being able to also identify individuals that are around the MALT, but are not directly using it, could reveal social relationships, as already described in baboons (Claidière et al. 2017; Gelardi et al. 2019), which can be related to dynamic coalition formation (Berghänel et al. 2011). The use of face recognition may be considered to improve these measures (Krause et al. 2013; Witham 2018; Zhang et al. 2018; Schofield et al. 2019). Generally, further development is needed to reliably and automatically assess the multiple dimensions of the affiliative networks of NHPs, but this is beyond the scope of the present study.

Although the hierarchies which were quantified using both manual and automatic methods were highly comparable, some difference remains (Evans et al. 2018; Hrolenok et al. 2018). The presence of interactions that did not represent a genuine social displacement in the data sets may explain some of these differences, and it is unknown how group size, number of recorded dominance interactions or species identity may further affect the construction of hierarchy. Other points can be considered to explain these differences. Ranking methods (e.g., Elo-rating, David's score, I&SI) could be a source of uncertainty in inferring dominance hierarchies, as each may generate different rank orders based on the same data (Balasubramaniam et al. 2013; Vilette et al. 2020). In addition, ethological sampling cannot be assumed to be completely error-free. For instance, inter-rater reliability analysis achieving 80% congruence is usually considered as acceptably high agreement (McHugh 2012). Note that we found an overall mean correlation coefficient between automatic and ethological ranking of R = 0.81, which is about what would be expected when correlating the same two measurements that each contain 20% of independent noise. While some errors may come from ethological sampling, the presence of events that did not represent genuine social displacements in automatic sampling is likely to be the main source of noise in this analysis.

It could be that some of the discrepancies between manual and automatic measurements are due to the different social contexts where conflict arises (Brennan and Anderson 1988). For instance, MALT are preceded by a tunnel of approximately one meter that promotes dyadic face-to-face interaction that may impede coalition formation. In addition, the motivation of individuals to use the MALT (that integrates, at least, the value for diluted syrup rewards and the subjective cost of performing cognitive tasks) may also come into play in an animal’s decision of whether or not to compete with a conspecific. These variables may not influence other types of social conflicts that are used to measure social hierarchy during direct observations. The use of MALT to assess dominance hierarchies is therefore limited by the lack of fine-grained information about the context under which naturally occurring conflicts arise (e.g., for access to fertile females) and the possibility for bystanders to intervene (Petit and Thierry 1994). On the other hand, human observers can record a number of contextual elements that may be especially useful for some research questions (e.g., formation of rank-levelling coalitions). In addition, if some subjects are not interacting enough with the MALT, they cannot be included in this measurement of the dominance hierarchy (here n = 2/28 subjects), but we confirmed that animals’ ranks do not interfere with the automatic assessment (Fig. S3).

Although individuals may interact differently with digital devices depending on their sex and age (Kim-McCormack et al. 2016), the ratio of devices per individual is not fixed and should be adapted to the species dominance style to avoid contest competition for access to the device that would lead to adverse social conflicts (Honess and Marin 2006). This concern applies to all enrichments provided to captive groups (Clay et al. 2011; Ballesta et al. 2014), and MALT are no exception. Facilities welcoming the public (e.g., zoos) may also consider MALT for enrichment, and offer animals a zone to retreat from visitors, identified as a source of stress under certain situations (Whitehouse et al. 2013; Sherwen and Hemsworth 2019). The value of MALT as an enrichment is still putative and calls for further studies assessing the impact of the devices on group stability and physiological and psychological stress levels (Clay et al. 2011; Clark 2011; Whitehouse et al. 2013). However, this new method is more likely to be used in captive colonies, as installing autonomous cognitive testing devices in the wild is likely to be challenging.

Beyond these limitations, this automatic method allowed us to record information that was difficult to obtain using direct observations. In particular, we were able to gather dominance data from five juveniles that were not considered during direct observations, due to challenging subject identification. MALT can thus also be used to assess the hierarchy between juveniles which is often neglected in other studies (Fedurek and Lehmann 2017). MALT may thus also provide new information on the role of juveniles in a species social organisation, or allow for a detailed assessment of the development of the social rank of juveniles over time. Generally, refinement of MALT opens interesting opportunities to study dominance dynamics and investigate, for example, the representation primates have of their own hierarchy (Schino and Lasio 2019), or whether they make such a classification of group members at all (Bernstein 1981).

Zoos, breeding centers and some research facilities house NHPs in relatively large groups. This comes at a risk of social conflicts, which may lead to severe injuries, especially when dominance hierarchy becomes unstable (McCowan et al. 2018). In-depth knowledge of colonies’ dynamics may help to prevent such conflicts, but this knowledge can only be acquired through the accumulation of months of intensive observation of behaviours, which comes at financial costs, far too great for most of these institutions (McCowan et al. 2018). One of the strengths of our automated measure is the continuous recording, generating a much bigger data set than human observations. In a comparable number of days, MALT can record about 10 times more conflict events compared with direct sampling methods by human observers. As long as displacement is considered agonistic, no ethogram is required, and our automatic method could be theoretically used in any animal group and would require only one MALT. The minimal research labour needed to obtain daily measurement of dominance hierarchy opens new avenues for data-driven captive group management, such as the possibility to dynamically assess or even predict the stability level of the dominance hierarchy in a given group. In addition, continuous and automated recording of conflict data may be especially relevant in retrospective analysis of the causes and consequences of rare social events (e.g., intra-family aggression in matrilineal societies, Johnston et al. 2020; removal or introduction of high-ranking males for management purposes, McCowan et al. 2018; Rox et al. 2019).

As a proof of concept, we used this automated approach to assess the effect of three events of male removal on the hierarchical stability of the group. This analysis considered more than 1039 days of observations, which is, to the best of our knowledge, not the longest (Rhine et al. 1989; Rhine 1994; Goldman and Loy 1997; Robbins et al. 2005; Vilette et al. 2020) but is the most detailed assessment of social hierarchy in a group of NHPs that has ever been reported (here 38,165 recorded conflicts). Interestingly, removing a mid-ranking male (event 1 in Fig. 3) caused an immediate reduction in group stability, but removing four or one high-ranked male had no significant impact (events 2 and 3 in Fig. 3, respectively). This shows that the number of individuals removed (or migrating) from a group can be less influential than the positions they hold in the dominance hierarchy. Indeed, middle-ranking males represent key individuals in the organisation of the dominance hierarchy, as they can form coalitions with either the alpha to reaffirm its dominance, or participate in rank reversal coalitions against higher-ranking males (van Schaik et al. 2004). Consistent with our observations in Tonkean macaques, patterns of grooming associations in captive crested macaques remained unchanged after the removal of seven individuals, mainly adult males, whereas the introduction of a single new adult male triggered an increase in grooming activity among females (Cowl et al. 2020). These observations are based on three single cases in a unique group and should thus be treated with caution. In addition, the stability of the group did not fully recover from event 1 when events 2 and 3 happened, and this may represent a confounding factor in our analysis. More importantly, these data provide an example of the potential applications of continuous and automated conflict recording that could significantly ease captive group management and pave the way for a better understanding of NHP social dynamics.

Overall, we report that the presence of food rewards (here flavoured syrup diluted in water) accessible through the correct use of MALT creates competition over this resource, which induces dominance behaviours in the macaques. We show that the social hierarchy computed thanks to these social displacements was consistent with that computed using observation of spontaneous social conflicts in the monkeys’ living environment. Our analysis further suggests that the presence of affiliative or chance-driven events does not dramatically impair the relevance of these automatic measurements, likely thanks to the considerable volume of genuine social displacements that can be recorded with this method. Our study clearly supports the use of MALT to automatically, reliably and longitudinally assess the dominance hierarchy of captive NHPs at facilities where such technologies can be realistically used.