Introduction

Research on animal social networks provides insight into the social organization of a variety of species (Pinter-Wollman et al. 2014; Krause et al. 2015). This can be studied at several levels: locally (at node level), at the meso-scale (e.g. network modules) and globally (at network level). One of the basic questions is how to link local to global, i.e. what is the role of individuals in group dynamics and how group structure can influence the behaviour (and success) of the individual. For this, network analysis offers tools to quantify the positional importance of individuals, possibly identifying keystone individuals (Robson and Traniello 1999; Mödlmeier et al. 2014). Methods for this have been developed and can be imported from community ecology, focusing on similar questions with respect to species and communities.

Social insects are of key importance to understand the evolution of sociality. Linking individual behaviour to division of labour and caste dynamics is a genuine problem also from a systems theory perspective, as the mutual relationship between parts and the whole needs to be addressed and quantified (Oster and Wilson 1978). Recent methods of data collection (Mersch et al. 2013) and network analysis (Wey et al. 2008) open new possibilities for studying sociality.

Beyond clarifying the link between sociality and evolution, there is a recently emerging interest also in the ecology of social structures (Verdolin et al. 2021). Activities of castes and individuals depend partly on environmental factors. For example, whether dominant and associated ant species develop positive or negative inter-specific interactions, may depend on the distance between the nest and the foraging area of the dominant species. If the food is closer, more energy can be devoted to defense, resulting in negative inter-specific interactions. If foraging requires more work, the trade-off allows for less defense and the interaction becomes positive (Zephirin et al. 2021).

However, individuals in social groups are connected to each other by several types of interactions (e.g. dominance, proximity, affiliative interactions) and it is always a key question which interaction type to focus on, which kind of interaction is the best predictor of social dynamics. Multiplex networks were recently suggested to best reveal the identity of reproductive heirs (post-Queens) in Ropalidia marginata colonies (Sharma et al. 2022). Also, groups of kune-kune pigs have shown distinctive networks for several interaction types (Koglmüller 2019).

Some aspects of social organization have already been studied in several ant genera, including size-caste relationship (Leptothorax, Herbers and Cunningham 1983), morphological traits related to sociality (Sphecomyrma, Wilson 1987a), the emergence of division of labour (Pogonomyrmex, Fewell and Page 1999), spatial location and polyethism (Camponotus, Mersch et al. 2013), dominance hierarchy (Pachycondyla, Ito and Higashi 1991) and pathogen-induced plasticity reducing disease-transmission (Lasius, Stroeymeyt et al. 2018). Novel databases make it possible to provide higher resolution analyses (clearly, at the price of comparability). While Herbers and Cunningham (1983) described the ethogram of Lepthotorax based on 1562 interactions, the Camponotus database re-analysed here is based on 9 million interactions (Mersch et al. 2013).

Based on the recent developments in network analysis, a research programme was dedicated to parallel research on social and ecological systems (McMahon et al. 2001) leading to novel results (e.g. similarity of roles, based on regular equivalence: Luczkovich et al. 2003). We think that an important component of inter-disciplinary research is the transfer of methods to other disciplines, in order to explore their relevance and possibly adapt them. We suggest to use a network centrality metric (topological importance, TI, Jordán et al. 2003) used earlier for food webs (Jordán 2009) and protein interaction networks (Nguyen et al. 2011) and show its applicability for animal social networks. This index quantifies direct and indirect interactions in networks up to a specified maximum length, establishing vertical links among organizational levels (species to communities, individuals to animal social groups), a common problem in community ecology and behavioural ecology (Jordán 2022).

Beyond using various species and methods, one can study an ant colony at the level of individual ants, of castes and of the whole colony. This means no change in the definition of graph links, only means different focus on the subsets of graph nodes. Clearly, the big challenge is how to link these levels (Fewell and Page 1999). Ant networks are quite big and dense at the level of individuals (Fewell 2003), so an intuitively understandable knowledge can be drawn from a macroscopic description of the colony (Oster and Wilson 1978), by analysing key individuals in distributed networks (cf. Fewell 2003) or by focusing only at a subset of interactions.

In this paper, we re-analyse a large social network database on Camponotus fellah ants (Mersch et al. 2013), (1) studying a few standard topological indices describing group structure, (2) calculating the topological importance of individuals by a method initially suggested for identifying keystone species in multi-species ecological communities (Jordán et al. 2003) and (3) we study time-dependent and time-independent properties of the networks.

Data and methods

Data

Our research is based on a published database on social networks of the ant species Camponotus fellah (Mersch et al. 2013). This monogynous species is most typical in dry and warm habitats of North Africa and the Middle East, with polymorphic workers and the Queens inseminated singly. The three castes for workers are composed of nurses, cleaners and foragers. Caste identity strongly correlates with age (but not body size), as nurses are the youngest ones, cleaners are older and foragers are the oldest individuals (age polyethism). Isolated workers loose weight, change behaviour (become more mobile) and die earlier. This latter is caused by reduced food intake, so it is a consequence of the loss of social interactions, as trophallaxis is of crucial importance. It is one of the main interactions among individuals can be reciprocal and it very often serves communication, not feeding (short-time events). This maintains cohesion of the colony. We focus on the time window of the first 10 days before a manipulative experiment of 31 days started (Mersch et al. 2013), so in this time window there is a chance to observe some natural (or quasi-natural, considering lab conditions) community organization in the colonies.

Network construction

In the ant social networks, nodes represent ant individuals and edges represent interactions inferred by proximity: a link was recorded when two ants were in direct physical contact with heads and antennas (see Supplement in Mersch et al. 2013). Interactions are not directed and not signed but weighted by interaction frequency (data also exist for the duration of interactions, not used here).

There are interactions for size ant colonies (I–VI). We studied size social network types for each colony: the total network of all interactions (T), the subnetwork for nurses (N), the subnetwork for cleaners (C), the subnetwork for foragers (F), the subnetwork for the individuals linked to the Queen (Q) and the subnetwork of individuals not linked to the Queen (NQ). These subnetworks are composed of nodes only belonging to the particular set of invididuals and links linking only these nodes. For example, in the subnetwork of nurses, each node is a nurse and there is no other node, and each link connects two nurses. We considered weighted interactions as these are considered more realistic than binary effects (Farine 2014; Farine and Whitehead 2015). For each network representing each colony, we have a time-series of ten steps. We studied these temporal networks in order to follow group dynamics during a short time window. This means that, all in all, we studied 360 (=6 * 6 * 10) social networks.

Network analysis

We characterized the structure of the social networks (and their subnetworks) by the variability of a node-level measure and by four network-level measures.

In communication networks, the number of neighbours (node degree) provides only a local measurement of direct effects on other individuals. To quantify the indirect effects on others reachable only in two or more steps, the topological importance (TI) measure can be used. This was introduced in community ecology in order to quantify indirect inter-specific interactions (Müller et al. 1999; Jordán et al. 2003; Jordán 2009). The binary (unweighted) version of the topological importance index measures the non-local (indirect up to n steps) position of graph nodes and uses undirected data (communication in both directions is possible). When node j can be reached from node i in m steps, the effect is TImij. In case of a direct effect (m = 1, Fig. 1a), topological importance is expressed as the reciprocal of degree (TI1ij = 1/Dj). The more neighbours node j has, the less important the contribution of node i is. Indirect effects are multiplicative and additive. Multiplicativity means that if node j can be affected by node i only through node k (indirectly: i → k → j, Fig. 1b), then this indirect two-step effect (m = 2) of node i and node j is measured as the product of the direct effects (TI2ij = TI1ik, …, TI1kj). Additivity means that if two alternative pathways (of length 2, m = 2) exist from node i to node j (through nodes k and h: i → k → j and i → h → j, Fig. 1c), then the effects of these pathways are summed (TI2ij = TI1ik, …, TI1kj + TI1ih, …, TI1hj). When all pathways are quantified up to m steps (each TImij is known), one can quantify the sum of TImi* interactions for node i, providing a measurement of its centrality (as a funtion of m). TI quantifies centrality in multi-node communication networks, based on both direct and indirect interactions, and it has been shown to perform quite well among centrality indices (Pocock et al. 2011. We were interested in the temporal changes in the coefficient of variation (CV) of TI3i values of the nodes (CVTI), a high coefficient meaning a more “hubbish” network.

Fig. 1
figure 1

A toy example showing the calculation of the TI-index

We quantified the macroscopic topology of each network also by 4 global (i.e. network-level) network measures. Average Path Length (APL) quantifies the average number of steps between a pair of randomly selected individuals in the network. Network Centralization Index (NCI) quantifies the overall shape of the network. Clustering Coefficient (CC) gives the chance that two neighbours of a particular node are also neighbors of each other. Small-Worldness (SW) is derived from APL and CC (Bhadra et al. 2009, note that SW can be calculated also in alternative ways).

The distance between two nodes i and j in a network (dij) is the minimal number of links connecting them (i.e. the length of the shortest path length between i and j). The whole network can be characterized by the average distance, i.e. the average of shortest path lengths (APL)

$${\text{APL}}=\frac{\sum_{i}\sum_{j}{d}_{ij}}{2N}$$

This quantifies how many interactions is needed for the spread of information between any pair of individuals in the network. It is averaged for all of the path lengths between each pair of nodes, and the path length for nodes i and j is the minimum number of steps connecting them in the network (it equals 1 for directly linked neighbours; Wassermann and Faust 1994). This can be an indication of the general speed of communication between individuals.

The network centralization index (NCI) quantified the overall shape of the network. If the degree for node i is denoted by Di and the largest degree is Dmax, then the value of NCI is

$${\text{NCI}}=\frac{\sum_{i}^{N}{D}_{{\text{max}}}-{D}_{i}}{\left(N-1\right)*(N-2)}$$

The minimal value (NCI = 0%) describes a regular graph, where each node has the same degree (every individual has the same number of neighbors). The maximal value (NCI = 100%) describes a perfect star, where a single individual is directly connected to every other individual and there is no link between these latter. While rare, this very unique structure does exist in nature, see Bhadra et al. (2009) for an example. High centralization indicates the presence of one or a few individuals that dominate the network in a structural sense, while low centralization indicates a more homogeneous, or “democratic” network architecture.

The clustering coefficient (CC) provides information on how localized information is spread in the network: high clustering means more intense local circulation, where species are tightly linked to small subgroups and these cliquish subgroups are relatively poorly connected to each other. Low clustering means, on the contrary, a larger diversity of neighbors for a species, less cliquish structure and information potentially spreading more freely in the network. If interactions are transitive (AB and BC generates AC), the network will be more clustered. The clustering coefficient of node i (CCi) equals the density of the subnetwork composed by the neighbors of node i. This is the probability that its two neighbors j and k will be directly linked to each other. It can be defined as

$${{\text{CC}}}_{i}=\frac{2*|E({G}_{i})|}{{D}_{i}*{(D}_{i}-1)}$$

where Gi is the subgraph composed of the nodes that are directly linked to node i, |E(Gi)| is the number of edges in this subgraph and Di is the degree of node i. The whole network can be characterized by the average clustering coefficient calculated for all nodes. We calculated the weighted clustering coefficient that considers the size of the subgraphs and gives larger weight to a larger subgroup of neighbors. We note that positive co-occurrences may well be transitive, causing higher clustering: if A and B are strongly associated and so are B and C, then there is a high chance that A and C will be positively associated too. However, negative co-occurrences will generally not be transitive: if A and B avoid each other and similarly B and C, then A and C will be probably positively associated, resulting in no AC link in the negative co-occurence network (and no transitivity).

Finally, the small world index (SWI) is measured as

$${\text{SWI}} =\frac{{\text{ln}}N}{{\text{ln}}{D}_{av}}$$

where N is the number of nodes and Dav is average degree. Small world networks may facilitate rapid dissemination of information or any kind of effect within a network.

Statistical analysis

We compared the topology of different types (T, C, F, N, Q, NQ) of the weighted networks (see data in Electronic Supplementary Material). We used linear mixed-effect models (McCulloch and Searle 2004) for determining whether the network properties of casts (N, F, C) and subnetworks (Q, NQ) statistically differ from each other. Fixed effects are set for cast and subnetwork and the random effect is set for colony. We run each of the statistical analyses in R studio software version 2023.09.0 of Windows 11 (RStudio Team 2020).

Results

Network analyses

Figure 2 shows the total (T) social network for colony 1 (C1) on day 1 (D1). For better visualisation, we show only the link stronger than an arbitrary cutoff level (20 interactions). Some ants are isolated at this cutoff level, these are show on the top left corner. Nurses, by definition, mostly interact with the Queen, foragers form a strong clique and cleaners are quite dispersed in the network.

Fig. 2
figure 2

The ant social network of all weighted interactions for colony 1 on day 1. For better visualization, we do not show the weights on the links but only the strongest links are shown (at cutoff-level of 20). The Queen is larger and black, nurses are blue, cleaners are green, foragers are red and a few unidentifed ants are in white. Isolated individuals are shown in the top-left corner (note that these are isolated because of the threhold for interaction strength: in the whole network they all belong to the same giant component) (color figure online)

Widespread global network-level indices (APL, CC, NCI, SWI) do not show any consistent behaviour in time for all colonies. The time-independent comparison of index values (mean and standard deviation) is shown in Fig. 3 (networks for cleaners, nurses and foragers) and Fig. 4 (Queen-related and Queen-independent subnetworks).

Fig. 3
figure 3

Four topological properties (NCI, CC, APL, SW) for the networks of the three castes (cleaners: C, foragers: F, nurses: N). The mean lines in the boxes represent the mean values of the network indices over 10 days

Fig. 4
figure 4

Four topological properties (NCI, CC, APL, SW) for the subnetworks of individuals either linked or not linked to the Queen (Q, NQ). The mean lines in the boxes represent the mean values of the network indices over 10 days

Comparison of castes

We employed linear mixed-effects models to investigate the relationship between global network index values (NCI, CC, APL, and SWI) and three castes (F, N, C). We used colonies as random effects. Our analysis revealed significant differences in the NCI and CC values among castes when compared to the reference category (C values): networks of F and N castes have significantly higher NCI and CC values (see Table 1). For APL, the networks of C castes show higher values compared to those of F and N castes. We found no significant effects for SWI values.

Table 1 Statistical results of linear mixed-effects models for estimating caste and subnetwork effects on global network metrics (for the level of significance, ***: p < 0.01, **: 0.01 < p < 0.05, *: 0.05 < p < 0.1, -: no significant effect)

Comparison of Queen-related and Queen-independent subnetworks

We employed linear mixed-effects models to investigate the relationship between global network index values (NCI, CC, APL, and SWI) and the two subnetworks (NQ, Q). We used colonies as random effects. Our analysis revealed significant differences only for the APL index (NQ having higher values) but not for the three other indices (Table 2).

Table 2 Statistical results of linear mixed-effects models for the pairwise comparisons of networks for different castes and subnetworks (for the level of significance, ***: p < 0.01, **: 0.01 < p < 0.05, *: 0.05 < p < 0.1, -: no significant effect)

Temporal trends

The variability of TI indices (coefficient of variation: CV) shows quite consistent trends over the colonies (Fig. 5): all colonies become more and more hubbish during these 10 days. This shows that the variability of positional importance of individuals in the networks increases, i.e. the emergence of keystone individuals (Mödlmeier et al. 2014).

Fig. 5
figure 5

The variability of node centralities (coefficient of variation for the TI-index, CVTI), over time, for each colony

Conclusions

The caste of cleaners has less centralized networks than foragers of nurses, possibly suggesting either that cleaning as a function needs less central control in communication or that individual-level variability in terms of connections is lower for some reason. Foragers are more clustered, possibly reflecting the need to share information. This is reflected also in the higher value for average path length in the networks of cleaners. Connections to the Queen do not cause large effects in the organization of subnetworks of individuals, only the average path length differs, as the individuals connected tot he Queen are clearly closer to each other as well.

When time is also considered, we see no clear trends for any of the indices in any network types, but the coefficient of variation of the node-level index of topological importance increases in each colony. This is a global, network-level index derived from a local, node-level one. This means that, while the large-scale topology of the networks is not changing fundamentally, keystone individuals emerge in the networks of each colony. This might be related to increasing task specialization among individuals, observed also in paper wasps (Premnath et al. 1996; Gadagkar 2001; Deshpande et al. 2006). With time, a smaller number of individuals can be responsible for communication and control over activities, the colony working in a more efficient way. This seems to be a small-scale dynamics analogous to caste differentiation at the larger scale.

In the future, it would be useful to explore other time windows of colony dynamics, as well as time windows of different width (these issues are often neglected but possibly important in animal social network studies, see Blonder et al. 2012). There might be proximate causes of changes related to body size, network position and caste identity not yet explored. For changing caste, probably longer time-series are needed. Body size and spatial location were shown to be important factors, not studied here, but these could be better explored also in the context of what traits keystone individuals may share. For example, it is a question whether the body size of nurses linked to the Queen and the those not linked to the Queen differ. As a major direction to go, social network analysis makes it possible to study social insects not only at caste level but also at the level of individuals. This might bring novel kinds of results and help better understanding self-organization and multi-scale task division in colonies (also within castes). Here we focused on colony-level network properties but topological heterogenities indicate the presence of keystone individuals: future, node-level analyses can help separate catalysts and organizers (Robson and Traniello 1999) and the plasticity of skewed activity distributions (Pinter-Wollman et al. 2012). The temporal and spatial (also for mammals: de Silva et al. 2011) dimensions are essential to better describe social group dynamics at various scales of social organization.

Defining interactions biologically, instead of inferring by proximity, would make it possible to have information on affiliative and antagonistic relationships. This could be used for building signed social networks and perform analyses, for example, on loop sign and social balance (Wey et al. 2019). Higher level quantifications of group structure may help to reveal ecological (Verdolin et al. 2021) and epidemiological (Nunn et al. 2015; Stroeymeyt et al. 2018) aspects of sociality. Quantitative descriptions, in turn, may help construct simulation models (Grimm et al. 2003; Fischer et al. 2017) for the mechanistic understanding of local rules and emergent patterns (Fewell 2003; Bhadra and Jordán 2013).

It is hoped that better understanding of social organization in insects, and especially its ecological aspects, could help to generate deeper insight into the community ecology and conservation biology of invertebrates, the little things that run the world (Wilson 1987b).