# A Controlled Test of Risk-Dependent Immune Investment in a Clonal Ant

Zimai Li, Tze Hann Ng, Jean Keller, Florent Masson, Giselher Grabenweger, Bruno Lemaitre, Nathalie Stroeymeyt, Martin Kaltenpoth, Yuko Ulrich

► To cite this version:

Zimai Li, Tze Hann Ng, Jean Keller, Florent Masson, Giselher Grabenweger, et al.. A Controlled Test of Risk-Dependent Immune Investment in a Clonal Ant. 2025. hal-05360217

HAL Id: hal-05360217

https://hal.science/hal-05360217v1

Preprint submitted on 12 Nov 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
A Controlled Test of Risk-Dependent Immune Investment in a Clonal Ant

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

Zimai Li¹,², Tze Hann Ng¹, Jean Keller³,⁴, Florent Masson⁵,⁶, Giselher Grabenweger⁷, Bruno

Lemaitre⁸, Nathalie Stroeymeyt⁵, Martin Kaltenpoth⁴, Yuko Ulrich*¹

¹Lise Meitner Group Social Behaviour, Max Planck Institute for Chemical Ecology, Jena, Germany

²Faculty of Biological Sciences, Friedrich Schiller University Jena, Jena, Germany

³Research Laboratory in Plant Sciences (LRSV), Toulouse University, CNRS, INP, Toulouse, Castanet-Tolosan, France

⁴Department of Insect Symbiosis, Max Planck Institute for Chemical Ecology, Jena, Germany

⁵School of Biological Sciences, University of Bristol, Bristol, United Kingdom

⁶Micropolis, Saint-Léon, France

⁷Department for Plants and Plant Products, Research Group Extension Arable Crops, Agroscope, Zurich, Switzerland

⁸School of Life Science, École Polytechnique Fédérale de Lausanne, Lausanne, Switzerland

*Correspondence: yulrich@ice.mpg.de

19

20

Abstract

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

36

37

38

39

Biological systems can benefit from distributing defensive investment unevenly, concentrating protection in parts of the system that face higher risk or hold greater strategic value. In social groups, individuals often face asymmetric infection risks based on their behavioural roles, raising the possibility that immune defences are plastically adjusted according to risk. In social insects, this idea has led to the hypothesis that individuals performing high-risk tasks, such as foraging, should invest more in constitutive immune defences to reduce transmission within the colony.

However, testing this hypothesis has been hindered by confounding effects of genotype, age, and infection history. We use the clonal raider ant *Ooceraea biroi* to overcome these limitations.

In this system, spontaneous behavioural specialisation between genetically identical, age-matched individuals creates variation in infection risk, while controlling for other sources of variation. We first annotated the *O. biroi* immune gene repertoire and sequenced the transcriptomes of 77 individuals that showed considerable behavioural variation. We then combined fine-scale individual behavioural tracking with three complementary measures of immune investment: immune-related gene expression, antibacterial activity, and survival following infection. Despite behavioural specialisation, we find no evidence that individuals engaging in higher-risk behaviours invest more in constitutive immune defences. These results contradict a long-standing hypothesis in the field and suggest limits to plastic immune allocation based on infection risk in social insect colonies.
40 **Introduction**

41 All organisms must defend against biological threats such as predators and parasites. However, 42 deploying defensive mechanisms—whether immune, chemical, or behavioural—is typically costly 43 (1,2). Consequently, natural selection is expected to favour strategies that allocate defences 44 efficiently, using them sparingly and where they are most needed.

45 Across levels of biological organisation, theoretical frameworks predict that defensive investment 46 can be adaptively distributed across parts of a system to maximise protection of the whole (3,4). 47 These frameworks typically assume that optimal defence allocation reflects underlying 48 asymmetries in value or risk: some parts of a system are more valuable or vulnerable than others 49 and are therefore prioritised for protection. For example, at the organismal level, optimal 50 defence theory predicts that plants should concentrate chemical defences in organs of highest 51 fitness value, such as reproductive structures or young leaves, that are critical for survival and 52 reproduction (4). At the population level, epidemiological models predict that targeted 53 vaccination of high-transmission or high-risk individuals can effectively reduce disease spread or 54 severity (5). In both cases, systems benefit when defensive effort is distributed unequally, 55 according to differential threat exposure or strategic value.

56 Empirical support for this principle is robust at the organismal level (e.g., (6)), where variation in 57 defences across genetically identical structures, such as leaves, can be cleanly attributed to 58 differences in investment. However, testing similar ideas above the organismal level is more 59 difficult. In social groups composed of genetically diverse individuals, variation in immune 60 phenotypes can arise not only from plastic investment in immunity but also from innate genetic 61 differences, or even from social dynamics such as free-riding (7). This makes it challenging to 62 infer whether observed patterns of defence reflect strategic allocation or other factors.

63 Social insect colonies are promising systems in which to explore this question. They are 64 functionally analogous to multicellular organisms (8), with related individuals cooperating to 65 promote the fitness of the colony as a whole. If strategic immune allocation exists at the group 66 level, it is likely to be observable in social insects. Immune defences in social insects include both 67 individual-level physiological responses and colony-level strategies (9), raising the possibility that 68 immune investment may be plastically adjusted among individuals to optimise colony-level 69 protection, for instance, by reducing pathogen entry or transmission in the colony (10).

70 In social insects, asymmetries in infection risk are often linked to division of labour. Workers that 71 leave the nest to forage or perform other tasks are generally thought to experience higher 72 exposure to environmental pathogens and are therefore predicted to invest more in constitutive 73 immune defences. Indeed, several studies have reported elevated immune activity in foragers 74 relative to nurses (e.g., (11–14), but see (15) for the reverse pattern). However, these findings are 75 usually confounded by co-variation between behaviour and intrinsic factors such as age or 76 genotype (16), both of which independently affect immune function (17–19). In particular, 77 because foragers are typically older than nurses (20), these patterns are also consistent with 78 ‘inflammaging’, the age-related chronic activation of innate immune defences (21). Moreover, 79 studies based on wild-caught colonies face additional complications: unknown pathogen 80 histories make it difficult to distinguish constitutive immune differences from induced responses 81 to previous or ongoing infections.

82 To overcome these challenges, we use the clonal raider ant *Ooceraea biroi*, a social insect 83 uniquely suited for disentangling the effects of behaviour from genetic or environmental
confounds. Colonies of *O. biroi* naturally consist of genetically identical individuals that emerge in discrete cohorts, enabling the experimental elimination of the usual variation due to genotype and age. As a result, any observed variation in immune phenotype can be attributed to plasticity rather than genetic or age differences. Importantly, genetically identical workers of the same age still establish a stable division of labour in this system: in small experimental colonies, individuals show consistent differences in their tendency to perform tasks inside versus outside the nest (22). This behavioural specialisation in turn creates natural asymmetries in infection risk: previous work has shown that ants working outside the nest are more likely to become infected by parasites than those remaining inside (23).

*O. biroi* thus provides a powerful system to test whether immune investment is plastically allocated among individuals within a social group according to risk. Here, we ask whether individuals facing a greater risk of infection show elevated constitutive immune investment prior to pathogen exposure. Such prophylactic, risk-based variation would constitute a form of "immune division of labour" that could reduce disease transmission and enhance group-level protection. As a first step, we annotate the genomic immune repertoire of *O. biroi* by homology with *Drosophila melanogaster* (24) and compare it to the immune systems of other social insects. We then conduct a fine-scale analysis of individual behaviour in replicate colonies composed of genetically identical, age-matched workers. Finally, we assess three complementary measures of immune investment across individuals: 1) immune-related gene expression, 2) antibacterial activity and 3) survival following pathogen exposure. Contrary to theoretical expectations, we find no evidence for a risk-based prophylactic immune division of labour in *O. biroi* colonies. Individuals that spent more time outside the nests showed an immune investment that was indistinguishable or inferior to that of individuals that stayed in the nest.

## Results

In line with previous studies, *O. biroi* workers in experimental colonies exhibited pronounced behavioural variation despite having identical genotype and age. Our behavioural analysis of eight colonies with ten workers each uncovered individual variation in spatial, temporal and social behaviour. Variation in spatial behaviour, the best-described aspect of division of labour, was evident in extranidal activity (range: 0.004–56.89% of time spent outside the nest; mean ± SD = 10.31 ± 13.44%; Fig. 1A–B; see Methods for definition of behavioural metrics), path length (0.01–271.36 m; 22.95 ± 46.15 m), spatial coverage (2.67–67.33% of grid cells, corresponding to 4–100% of the cells accessible to the ants; 38.18 ± 21.51%), spatial entropy (1.14–6.33; 2.84 ± 1.33) and tortuosity (4.16–38.38; 11.62 ± 5.53). Individuals also varied in their temporal behaviour: some ants moved faster than others (mean velocity: range:1.46–6.84 mm/s; mean ± SD: 2.42 ± 0.91 mm/s), spent a higher proportion of time in movement (locomotor activity: range: 0.004–37.6%; mean ± SD: 3.95 ± 7.37%), or showed more consistent speed than others (velocity variation: range: 0.77–4.12; mean ± SD: 1.49 ± 0.60); similarly, some ants exhibited bursty nest exits, while others maintained regular intervals (burstiness: −0.11 to 0.79; 0.45 ± 0.15). Finally, some ants had relatively few social contacts on average, while others were nearly always in contact with every other colony member, likely because they stayed in the nest (mean network degree centrality: range: 3.11–8.81; mean ± SD: 7.27 ± 1.43).

PCA revealed no clear clustering of individuals in behavioural space (Fig. 1C), indicating a continuous spectrum of behavioural phenotypes rather than discrete behavioural roles. The first three principal components (PC1–PC3) collectively explained over 80.31% of the total behavioural variance (Supplementary Table S1). PC1 (54.87% of variance) captured spatial exploration (high (>0.3) positive loadings for entropy, extranidal activity, path length, spatial
coverage) and general activity level (locomotor activity, mean velocity) while reflecting reduced social interactions (strong (<-0.3) negative loading for degree centrality) (Fig. 1D). Therefore, individuals with high PC1 scores exhibited behavioural profiles classically associated with foragers, with high motility and extranidal activity, and fewer social contacts compared to nurses. PC2 (14.52% variance) predominantly captured temporal consistency (high negative loading for velocity variation), with high scores reflecting stable movement velocity (Supplementary Fig. S1A). PC3 (10.92% variance) captured both spatial behaviour (high positive loadings for tortuosity) and temporal behaviour (high positive loadings for burstiness of nest exits) (Supplementary Fig. S1B).

<figure><img src="image_2.png" /><figcaption>**Figure 1.** Behavioural variation among genetically identical workers. (A) Schematic representation of behavioural experiment setup and behavioural metric calculation. The blue line represents the trajectory of one ant. The total length of the blue line between points a and b represents path length; the trajectory length (blue line between points c and d) divided by the Euclidean distance (orange line between points c and d) represents tortuosity; the red shaded area in the nest chamber represents the nest; the yellow shaded bins are used to calculate spatial coverage and entropy. (B) Density map of the spatial distribution of 10 genotype- and age-matched ants from one colony. Each subpanel represents one ant. The X and Y axes represent spatial coordinates, and the Z axis indicates the time (in minutes) spent in each grid cell. (C) PC1 and PC2 from the PCA on all behavioural metrics. Each point represents one individual; colours represent colonies (n = 77 ants from 8 colonies). (D) Loadings of individual behavioural metrics on PC1.</figcaption></figure>

To investigate the association between individual behaviour and immune-related gene expressions, we first identified 256 immune-related genes in the genome of *O. biroi* (Fig. 2A and Supplementary Tables S2-4). The *O. biroi* genome encodes nearly all key components of the NF-κB pathways IMD, which responds to peptidoglycans (PGN) found in Gram-negative bacteria and some Gram-positive bacilli (Supplementary Table S2), and Toll, which responds to PGN from
157 Gram-positive bacteria and β-glucans from fungi (Supplementary Table S3) (25). In contrast to the black garden ant *L. niger*, which exhibits a reduced number of pattern recognition receptors in the Toll pathway (26), *O. biroi* possesses all major receptors, including GNBP3 for fungal β-glucans and GNBP1 and PGRP-SA for bacterial peptidoglycan. Therefore, the systemic NF-κB immune pathways in *O. biroi* are structurally complete.

162 We detected a small set of genes encoding antimicrobial peptides (AMPs) that consists of one
163 *hymenoptaecin*, one *defensin*, and one *crustin* (Fig. 2A and Supplementary Table S4).
164 Additionally, two sequences encoding Waprin, an AMP closely related to Crustins and often
165 associated with venom, were identified. Other potential immune- or venom-related peptides,
166 such as SjAPI-like peptidase inhibitors, cuticle structure proteins with putative antimicrobial
167 activity, and ICK-peptides, were also identified (Supplementary Table S4). Similar to *L. niger*, the
168 number of identified AMP in *O. biroi* is low compared to other ants (27) and much smaller than in
169 *D. melanogaster* and the solitary Hymenopteran *Nasonia vitripennis* (28), suggesting that *O. biroi*
170 individual immunity relies on a reduced set of antimicrobial effectors.

171 Basal expression of immune-related genes across all 77 surviving workers from eight colonies
172 showed only subtle associations with behavioural variation. Among the 256 annotated immune-
173 related genes, the expression levels of eight genes correlated with PC1 scores (Fig. 2B), which
174 captured division of labour between forager-like and nurse-like individuals (Fig. 1D). Six of these
175 eight genes showed reduced expression levels in ants with higher PC1 scores, i.e., exhibiting
176 more forager-like behaviour. These genes included auxiliary immune regulators *Linear Ubiquitin
177 E3 Ligase* (*LUBEL*, log2FC: -2.05, corresponding to a ca. 4.14-fold decrease between individuals
178 with the highest and lowest PC1 scores) from the IMD pathway, and *Bromodomain and WD
179 Repeat Domain Containing 3* (*BRWD3*, -1.36, ca. 2.6-fold decrease) from the JAK-STAT
180 pathway, an AMP linked to venom (*waprin2*, -2.62, ca. 6.1-fold decrease), and a serine protease
181 (*ObirSP60*, -1.13, ca. 2.2-fold decrease). We also observed small reductions in *longitudinals
182 lacking* (*lola*, -1.00, ca. 2-fold decrease; IMD pathway) and *G protein-coupled receptor kinase 2
183* (*Gprk2*, -0.66, ca. 1.6-fold decrease; Toll pathway). In contrast, two serine proteases were
184 upregulated in ants with higher score on PC1: *ObirSP8/trypsin1* showed a strong increase
185 (+4.44, ca. 21.7-fold increase), and *ObirSP20* a moderate one (+2.35, ca. 5.1-fold increase) in
186 forager-like ants. We observed no differential expression of genes that are generally considered
187 key markers for systemic immunity in insects. For example, key transcription factors (e.g., *relish*,
188 *dorsal*), pathogen receptors (e.g., *PGRP*S, Toll receptors), enzymatic effectors such as lysozymes
189 and prophenoloxidases, and classic AMPs (e.g., *defensin*, *hymenoptaecin*) were stably expressed
190 across behavioural phenotypes. We also found no differential expression of immune-related
191 genes associated with the scores on behavioural PC2 and PC3. In summary, we found modest
192 shifts in the expression levels of a small fraction of immune genes to be associated with variation
193 in forager-like behaviour, but no major, systematic differences in constitutive immune
194 investment. Rather, *O. biroi* appeared to maintain relatively uniform immune-related gene
195 expression across individuals with different behavioural roles in the absence of infection.
<figure><img src="image_3.png" /><figcaption>**Figure 2.** Immune-related gene annotation and differential expression (A) Repertoire of immune-related genes in *O. biroi*. (B) Eight differentially expressed immune-related genes associated with behavioural PC1. Red indicates upregulation, blue indicates downregulation in more forager-like individuals. The dendrogram represents hierarchical clustering of genes based on expression similarity, using Ward's D2 method with Euclidean distance. Symbols represent gene categories: ▲ Toll, △ IMD, ■ JAK-STAT, □ AMPs, and * serine proteases.</figcaption></figure>

As two complementary approaches to quantify immune investment, we conducted antibacterial assays with ant lysates and assessed the survival of ants following exposure to fungal pathogens. For antibacterial assays, we generated two samples per colony (for nine colonies): the half of individuals with the most forager-like behaviour and the half with the most nurse-like behaviour, based on their individual behaviour (i.e., loadings on behavioural PC1). We found no association between behaviour and antibacterial activity: lysates of forager-like and nurse-like ants did not differ in their ability to reduce bacterial growth (paired t-test, t = -1.765, p = 0.1156; Fig. 3A) and bacterial viability (paired t-test, t = -1.0785, p = 0.3123; Fig. 3B). Similarly, we found no association between behaviour and survival following fungal exposure. 93.16% (109 out of 117) of ants died within 12 days following exposure to *Beauveria bassiana*, with time to death ranging from 95.17 to over 300 hours (mean ± SD: 181.36 ± 60.91 hours), consistent with previous work (29). However, none of the PC scores summarising behavioural metrics (PC1, PC2, and PC3) correlated with survival (n = 117 ants from 12 colonies; Cox proportional hazards model, PC1: χ² = 0.42, df = 1, p = 0.52; PC2: χ² = 0.18, df = 1, p = 0.67; PC3: χ² = 0.78, df = 1, p = 0.38), indicating that individual behavioural roles do not predict fungal resistance in *O. biroi* workers.

196

197

198

199

200

201

202

203

204

205

206

207

208

209

210

211

212

213

214

215

216

217

218
<figure><img src="image_4.png" /><figcaption>Figure 3: Antibacterial activity of lysates from forager-like and nurse-like ants, measured by (A) bacterial growth (OD<sub>600</sub>) and (B) bacterial viability (CFU), relative to negative control. "n.s.": non-significant.</figcaption></figure>

Discussion

The unique biology of the clonal raider ant allowed us to investigate associations between division of labour and immune investment in the absence of confounds linked to age, genetics or prior pathogen exposure. Using three measures of immune investment (transcriptomics, antibacterial assays, and survival assays), we found no empirical support for higher immune investment in colony members facing higher infection risk (foragers).

Transcriptomic analyses showed that the basal expression of markers of systemic immune activity in insects, such as pathogen pattern recognition receptors (e.g., PGRPs, Toll receptors), key regulators of canonical NF-κB immune pathways (e.g. *relish*, *dorsal*, *spaetzle*), enzymatic effectors (e.g., lysozymes, prophenoloxidase), and classic AMPs (e.g. *defensin*, *hymenoptaecin*), did not vary across individuals with different behavioural profiles. This contrasts with past work in other social insects, where the expression of some of these genes has been linked to behavioural roles. For example, key immune regulators, including *Toll*, *Dorsal* and *Imd*, were expressed 10- to 100-fold more strongly in guards and foragers than in nurses in a stingless bee (14), though this study did not control for age.

Despite extensive inter-individual behavioural variation and large sample sizes, our transcriptomic analysis did not strongly support "immune division of labour". Among the few (8 out of 256) immune-related genes differentially expressed with respect to individual behaviour, effect sizes and directions varied. In forager-like ants, we observed upregulation of two serine proteases (*ObirSP8/trypsin1* and *ObirSP20*) and downregulation of four secondary immune regulators (*lola*, *LUBEL*, *BRWD3*, and *Gprk2*), one serine protease (*ObirSP60*), and one AMP (*waprin*). Serine proteases play roles in prophenoloxidase activation (30) and extracellular Toll signaling activation (31,32). *Gprk2* mediates Toll pathway-driven haemocyte activation (33), *lola* is a non-canonical IMD pathway component (34), *BRWD3* is a positive regulator of the JAK-STAT pathway (35), and *waprin* is a venom AMP with antimicrobial activity (36). As many of these genes have additional non-immune functions (e.g. serine proteases in digestion (37), tissue remodelling (38) and fertilisation (39); *lola* in axon guidance (40)), their expression patterns might be linked to these non-immune functions.
We found no differences in antibacterial activity or in survival upon exposure to pathogenic fungal spores across individuals with different behavioural profiles, so that individual behavioural roles did not predict individual pathogen resistance. Taken together, the absence of modulation in key systemic immune markers, the mixed direction and modest magnitude of effects in a small number of differentially expressed immune-related genes, as well as the lack of association between behaviour and antibacterial activity or pathogen resistance, suggest that immune investment is robust among *O. biroi* individuals that differ in behavioural phenotypes. This contrasts with the majority of previous reports in other social insects, where foragers often showed higher immune activity (e.g., (11–14)). Since pathogen exposure and age were not always controlled in these studies, however, the reported effects could reflect age-related changes in immune function that accompany age polyethism (19,41,42), or differences in past or ongoing infections (43), rather than a prophylactic adjustment of constitutive immune investment to infection risk.

While constitutive defences minimise vulnerability by providing continuous protection, theory predicts that they are not universally favoured by selection (4). This is because mounting and maintaining defences can impose significant fitness costs (44,45). For example, immune investment can reduce resources available for growth or reproduction, generate trade-offs when protection against one pathogen reduces protection against others, or harm the host through immunopathological damage. Therefore, theory predicts that the benefits of constitutive defence will outweigh its costs only when exposure frequency is high, while inducible defences are more advantageous at low exposure frequency (46). Thus, a relatively low exposure frequency, a high cost of maintaining immune defences, or fast and effective induced defences may all contribute to the lack of differences in constitutive immune investment observed here.

Genome annotation revealed that *O. biroi* possesses structurally complete systemic immune pathways, suggesting that it maintains intact individual immune capacity, unlike other ants (26). However, like other social insects, *O. biroi* has a markedly reduced immune gene repertoire compared to solitary insects. For example, we identified only 4 PGRP genes and 5 AMP genes in the *O. biroi* genome, similar to the honeybee *A. mellifera* (4 PGRPs, 7 AMPs), but fewer than in solitary insects like *D. melanogaster* (22 PGRPs, 13 AMPs), *N. vitripennis* (11 PGRPs, 44 AMPs), and *Anopheles gambiae* (7 PGRPs, 11 AMPs) (47–49). Reductions in immune gene repertoires are phylogenetically associated with the evolution of sociality in some (50), but not all (41), social insect lineages, and have been hypothesised to stem from collective immune defences (“social immunity”) reducing the selection pressure on individual immunity (51).

The findings show no consistent evidence that individuals performing higher-risk tasks invest more heavily in constitutive immune defences, with molecular, functional, and survival measures all indicating robust immune investment across colony members. This suggests that immune function may not always be partitioned by task, challenging assumptions in social insect biology and highlighting the potential importance of trade-offs and the buffering effects of social immunity in shaping defence strategies.

## Material and Methods

Three experiments were performed to investigate whether individual behaviour is associated with 1) immune-related gene expression and 2) survival upon pathogen exposure, and 3) antibacterial activity. All colonies within one experiment were processed in parallel, but the different experiments were performed separately.
295 **Colony setup and behavioural recording**

296 All individuals used in the experiment were reared at 28 °C. To control individual genotypes and age, clonally related workers were sourced from a single age cohort of the same stock colony (genetic lineage A, (52)) on the day they eclosed. The stock colony was free of *Diploscapter* nematodes (23) and any other known ant pathogen. Workers were first housed as a group in an airtight plastic box with a water-saturated plaster of Paris floor for 48 h. Workers were then surface-sterilised following Lacey & Brooks (53) by immersing them in a solution of 70% ethanol for 3 seconds and 1% sodium hypochlorite for 30 seconds, rinsed in autoclaved distilled water, and subsequently housed in sterilised nests, thereby minimising exposure to environmental microorganisms that could induce immune responses. On the day following surface sterilisation, workers were randomly assigned to experimental colonies of 10 individuals housed in air-tight plastic cups (diameter 3 cm) with a floor of autoclaved plaster of Paris saturated with sterilised water. Ants were tagged with unique pairs of paint marks on the thorax and gaster (Uni Paint markers PX-20 and PX-21) for automated tracking. For three weeks, three days per week, plaster floors were cleaned and resaturated with sterilised water, eggs were removed, and colonies were fed with two surface-sterilised brood items of *Messor* minor workers.

311 To produce larvae for the experiment, a colony was established by separating approximately 312 1,200 workers from the same stock colony as the experimental colonies. Workers were surface-313 sterilised and housed in a sterilised nest box, and were maintained as above. Eggs were laid by 314 workers after three days and hatched into larvae after 10 additional days.

315 When the larvae were five days old, 10 larvae and one experimental group of 10 workers (by then 316 27-day-old) were placed in recording arenas made of laser-cut acrylic. Each arena had a nest 317 chamber (diameter of 15 mm) with autoclaved plaster of Paris floor saturated with sterilised 318 water and a foraging chamber (diameter of 40 mm) of plastic covered with Tyvek® (to make it 319 unattractive as a nesting site), connected by a corridor (2 mm wide and 10 mm long) (Fig. 1A). 320 Workers and larvae were housed in the nest chamber with the corridor closed for 48 h for 321 acclimation and fed once with 2 surface-sterilised brood items of *Messor minor* workers before 322 the start of recording. After acclimation, all food residuals were removed, the corridors were 323 opened, and colonies were filmed continuously for 48 h at 10 Hz and 2,592 × 1,944-pixel 324 resolution, using webcam s (Logitech C910).

325 No food was provided during the experiment. Individuals that died during the observation 326 period were excluded from subsequent analyses.

327 **Behavioural Data Analysis**

328 The software anTraX (54) was used to extract the raw trajectories of individual ants, i.e., a series of 329 spatial coordinates representing each ant's position at time intervals of 0.1 s. Raw trajectories 330 underwent preprocessing to identify the brood pile (i.e. the actual nest area within the nest 331 chamber) and missing or aberrant data points, which were then interpolated or removed, 332 respectively, following (55).

333 Nine behavioural metrics were computed in MATLAB (R2024b) to capture variation in spatial 334 behaviour (extranidal activity, path length, spatial coverage, spatial entropy, tortuosity), temporal 335 behaviour (mean velocity, locomotor activity, velocity variation, burstiness of nest exits) and social 336 behaviour (degree centrality in contact network). These metrics served as proxies for infection risk 337 (56): spatial and social behaviour can affect encounter rates with parasites from the environment or
338 infected social partners, respectively (56–62), while the temporal pattern of movement and
339 contacts can modulate the timing and magnitude of exposure and transmission (63).

340 Extranidal activity quantified the proportion of time an ant spent outside the nest, and was computed
341 as the amount of time (in video frames) the ant was detected outside the nest (estimated
342 following Jud, Knebel & Ulrich (55)) (Fig. 1A), divided by the total amount of time it was
343 detected. AnTraX assigns the same position to all individuals in the nest, making measures of
344 individual displacement in the nest approximative. Therefore, we only used measures of
345 displacement outside the nest for the calculation of path length, tortuosity, mean velocity,
346 locomotor activity and velocity variation. Path length represented the total distance an ant travelled
347 outside the nest and was computed as the sum of Euclidean distances between consecutive
348 positions at 0.1 s intervals. Displacement exceeding 2 cm s⁻¹ were excluded, as such values are
349 biologically implausible and likely reflect tracking errors. To calculate spatial coverage and
350 entropy, a rectangular area encompassing the recording arena (including the foraging arena, the
351 corridor and the nest chamber) was binned into 600 (30 × 20) grid cells, each measuring 2 mm ×
352 2 mm (2mm represents ca. 1 ant body length, Fig. 1A). For each ant, spatial coverage was
353 calculated as the fraction of all grid cells that were visited over the course of the experiment. For
354 each ant, we computed a density map representing the time spent in each cell. Spatial entropy (H)
355 was computed from the density map as: H = -∑p(x)log p(x), where p(x) is the proportion of
356 time (in frames) the ant spent in cell x. Higher entropy indicates a more even spatial distribution,
357 while lower entropy indicates that the spatial distribution is concentrated in some regions of the
358 arena.

359 Tortuosity captured the deviation of an ant's path from the shortest possible route. For each 1-
360 second trajectory segment in which the ant was continuously outside the nest and in movement,
361 tortuosity was defined as the ratio of the actual path length to the net displacement (the
362 Euclidean distance between the start and end points, Fig. 1A). For each ant, overall tortuosity
363 was calculated as the average tortuosity across all trajectory segments. Mean velocity (V) was
364 calculated as the average Euclidean distance an ant travelled every second while outside the
365 nest, after excluding values exceeding 2 cm s⁻¹, which are biologically implausible and likely reflect
366 tracking errors. Locomotor activity was defined as the proportion of time each ant was moving outside
367 the nest at a velocity exceeding 1 mm s⁻¹, after excluding values exceeding 2 cm s⁻¹. Workers with
368 high extranidal activity, path length, spatial coverage, spatial entropy, tortuosity, velocity and
369 locomotor activity have a more extensive spatial movement (reflecting forager-like behavioural
370 phenotype), and therefore a higher infection risk (57,58,60) based on past work in O. biroi,
371 where foragers had a higher probability of becoming infected by parasitic nematodes compared
372 to nurses (23).

373 To quantify the temporal variability of each ant's behaviour, Velocity variation (VV) was calculated
374 as the coefficient of variation of the ant's velocity when outside the nest: VV = σV/V, where σV is
375 the standard deviation of velocity calculated every second as above, and V is the mean velocity.
376 Burstiness of nest exits (B) (from the nest chamber to the foraging arena) was calculated as B =
377 σ-m/σ+m where σ represents the standard deviation and m the mean of time intervals between
378 consecutive nest exits. A burstiness value of -1 indicates a regular pattern of nest exits, a value of
379 1 indicates clustered (bursty) exits, and a value of 0 indicates that the nest exit followed a
380 Poisson distribution. High velocity variation and burstiness of nest exits indicate irregular activity,
381 which can affect how and when individuals are exposed to environmental pathogens (64). Degree
382 Centrality quantified the average number of contacts each ant had with other ants per frame. It
383 was computed as the total number of contacts across all frames divided by the total number of
384 frames in which the ant was detected. A contact was defined as an event when two ants'
385 positions were within 2 mm (ca. 1 body length) of each other outside the nest, or when they
386 were both in the nest at the same time. Degree centrality reflects an ant's risk of becoming
387 infected or transmitting an infection through contact (61,62).

388 To obtain summary metrics for behavioural profiles accounting for the fact that some behavioural
389 metrics (e.g., extranidal activity and spatial entropy) are expected to covary, we reduced the
390 dimensionality of the behavioural data using Principal Component Analysis (PCA) using the
391 function *prcomp* in R 4.4.2 (65). Missing data (0.65 %) were imputed using the function *imputePCA*
392 from package *missMDA* (66). This method estimates missing values based on the PCA structure of
393 the complete data, ensuring that the overall variance is preserved. Following the Kaiser-Guttman
394 criterion (67), which retains only principal components with eigenvalues greater than 1 (an
395 eigenvalue of 1 indicates that a principal component explains as much variance as an original
396 variable), the first three principal components (henceforth PC1, PC2, and PC3) were retained.
397 These components cumulatively accounted for 80.31% of the total inter-individual behavioural
398 variation (Supplementary Table S1) and were used in subsequent differential gene expression
399 analysis. The behavioural metric loadings on PC1 were qualitatively similar across experiments,
400 whereas those on PC2 and PC3 differed (Fig. 1D, Supplementary Fig. S1 and S2).

401 RNA extraction, library preparation and sequencing

402 Immediately after the end of recording, 78 surviving workers (out of 80) from eight colonies were
403 flash-frozen in liquid nitrogen and stored individually at -80 °C. RNA from each individual (whole-
404 body samples) was extracted and sequenced by Novogene Co., Ltd (Cambridge, UK). For RNA
405 extraction, individual ants were homogenised in TRIzol and incubated at room temperature (RT)
406 for 5 min, followed by the addition of 0.2 mL of chloroform per 1 mL of TRIzol. Samples were
407 shaken vigorously for 15 s, incubated for another 3 min at RT, and then centrifuged at 12,000
408 rpm and 4 °C for 15 min. The upper aqueous layer (approximately 0.6 mL) was transferred to a
409 new tube, and RNA was precipitated by adding 0.5 mL of isopropyl alcohol. Samples were
410 incubated at RT for 10 min and centrifuged at 12,000 rpm and 4 °C for 10 min. The RNA pellet
411 was washed once with 75% ethanol (1 mL per mL of TRIzol), vortexed, and centrifuged at 7,500
412 rpm and 4 °C for 5 min. After removing the supernatant, the pellet was air-dried for 5-10 min at
413 RT and then resuspended in RNase-free water. Dissolved RNA was incubated for 10 min at 55-60
414 °C to ensure complete solubilisation.

415 Messenger RNA (mRNA) was purified from the total RNA using poly-T oligo-attached magnetic
416 beads for library preparation. The mRNA was then fragmented, and first-strand cDNA synthesis
417 was performed using random hexamer primers, followed by second-strand cDNA synthesis. The
418 library was constructed through a series of steps, including end repair, A-tailing, adapter ligation,
419 size selection, amplification, and purification. Library quality was assessed using a Qubit
420 fluorometer and real-time PCR for quantification, as well as a Bioanalyzer for size distribution.
421 One sample was discarded due to low quality so that 77 samples were sequenced (150 bp,
422 paired-end) on an Illumina NovaSeq 6000 platform, yielding 44.95 ± 3.86 million reads per
423 sample.

424 Bioinformatics

425 Immune-related gene annotation

426 We annotated immune-related genes in *O. biroi* by drawing on several established gene sets from
427 *D. melanogaster*, the honeybee (*Apis mellifera*) and pertinent literature sources. First, we
constructed a query database of 142 predicted polypeptides from *D. melanogaster* genes associated with the NF-κB pathways IMD and Toll, and JAK-STAT and JNK pathways, following the approach of Masson et al. (26). We performed BLASTp (68) searches in Geneious 2021.2.2 (https://www.geneious.com) (BLOSUM62, word size = 3, gap open penalty = 11 and extension = 1) using the *O. biroi* proteome predicted from the Obir_v5.4 reference genome (Accession number GCF_003672135.1; BioProject PRJNA420369). A homologue was accepted upon reciprocal best BLASTp hits (e-value < 10⁻²⁰).

We took additional steps to ensure the accurate identification of homologues of genes belonging to large, highly homologous families: TLRs, PGRPs, TEPs, serine proteases, and C-type lectins. For TLRs and TEPs, candidate sequences identified by reciprocal BLASTp with *D. melanogaster* sequences were blasted a second time against the *O. biroi* predicted proteome to identify distant homologues that may have not been identified by direct alignment with *D. melanogaster* queries. For PGRPs, all known isoforms of *D. melanogaster* PGRPs were queries and *O. biroi* hits were directly validated only if a single reciprocal best match was found. PGRP sequences that failed to show clear reciprocal hits or mapped ambiguously to multiple IDs were subsequently validated using orthology inference with SHOOT. To identify serine proteases, we employed a multi-step process due to high sequence similarity. After an initial BLASTp search using *D. melanogaster* queries, we blasted all hits against the *O. biroi* proteome to identify more distant homologues that may have not been identified by direct alignment with *D. melanogaster* queries. Duplicates were manually removed, and the remaining candidates were scanned on InterProScan to confirm the presence of a peptidase domain. BLASTp candidates with no functional peptidase domain were manually removed, yielding a definitive list of 65 unique serine protease candidates. C-type lectin candidates, drawn from *A. mellifera* annotations (47), were identified using the same reciprocal BLAST method and further annotated based on alignments with *A. mellifera* proteins using MAFFT L-INS-I (69) and phylogenetic analysis (Neighbour-Joining, Jukes-Cantor).

In addition to the systemic immune pathways, we also screened stimulator of interferon genes (STING), Nimrod family proteins (EGF-domain-containing), scavenger receptors, Down syndrome cell adhesion molecule (Dscam; although the role of this gene in phagocytosis has been questioned by recent studies (24)), and Immunoglobulin (Ig) superfamily genes. STING candidates were obtained from Flybase Pathway Reports (70) and validated by best reciprocal BLASTp between *D. melanogaster* and *O. biroi* proteins. Nimrod genes were identified by querying *D. melanogaster* Nimrod polypeptides, pooling hits, and verifying them reciprocally. Based on Melcarne (71), only 4 were identified to be involved in immunity in Drosophila. Scavenger receptors were obtained from an initial *D. melanogaster* list and blasted against *O. biroi* proteome. After removal of duplicates and manual curation, 10 were confirmed as scavenger receptors, with two showing direct functional links to immunity based on known literature and domain analyses. For Dscam, *D. melanogaster* Dscam1 yielded multiple hits, which were filtered by reciprocal matching and domain checks. Because Ig superfamily annotations are limited in *D. melanogaster*, we referred to *A. mellifera* genome annotation (72) and performed BLASTp plus domain validation in InterProScan (73) to confirm Ig family domains in *O. biroi*, yielding 40 sequences.

Last, we searched for AMPs by appending 3,167 AMP sequences from the APD3 database (2020 release) (74) to our existing query set. BLASTp searches with an e-value <10⁻⁵ produced candidate AMPs, which we then blasted against the nr database to eliminate false positives, and scanned on InterProScan (73) to verify the presence of AMP-specific domains. We also searched for other potential immune-related genes, such as prophenoloxidase, galectins, and various
475 cellular immunity markers, using *D. melanogaster* references and reciprocal BLASTp. All identified

476 sequences were compiled and gene IDs were sourced to produce a comprehensive list of 256

477 candidate immune-related genes in *O. biroi* (Supplementary Tables S2-4).

478 Differential gene expression (DGE) analysis

479 The transcriptome reads were mapped to the *O. biroi* reference genome (v5.4, BioProject:

480 PRJNA420369) using the nf-core/rnaseq pipeline (75). Raw reads from all samples were trimmed

481 using TrimGalore (76) using a minimum read length of 20 base pairs and a minimum quality score

482 of 30 (an enhancement from the default score of 10). Afterwards, SortMeRNA (77) was

483 implemented to filter and remove ribosomal RNA (rRNA) sequences from the data, ensuring that

484 only mRNA reads were considered in subsequent steps. The filtered reads were then aligned to

485 the reference genome using STAR (default parameters). Afterwards, read counts for each gene

486 were obtained using Salmon (78).

487 We tested for immune division of labour with a DGE analysis on annotated immune-related genes

488 using the *limma* package (79) in R 4.4.2 (65). The absence of clear clustering in the PCA on

489 behavioural metrics suggested a continuous spectrum of behavioural variation rather than

490 discrete behavioural roles. We therefore used the summary metrics (PC1, PC2, and PC3 scores)

491 as continuous variables in the DGE analysis. Genes with counts per million < 1 in more than half

492 of the samples were excluded prior to normalisation. Trimmed Mean of M-values normalisation

493 was applied, followed by voom transformation. We modelled each gene's expression as a function of

494 PC1, PC2, and PC3, while accounting for the random effect of colony using the function

495 *duplicateCorrelation* in *limma* (80). Significance was determined at a False Discovery Rate (FDR) ≤ 0.05

496 using Benjamini-Hochberg-adjusted p-values to correct for multiple testing in each DGE

497 analysis.

498 Because behavioural data were collected continuously over a 48-hour period, but RNA was

499 sampled at a single time point at the end of this period, there was a temporal mismatch between

500 the behavioural and the transcriptomic data. To assess whether this mismatch influenced our

501 DGE results, we repeated the analysis using behavioural metrics calculated only from the final 12

502 hours of the tracking period. 84.55% of behaviour-associated DEGs in the final 12 hours of

503 tracking were also associated with behaviour in the entire 48-hour period of tracking

504 (Supplementary Fig. S3), suggesting the association between behaviour and gene expression was

505 robust over the duration of the experiment. We present the results of the DGE analysis based on

506 the full experiment (48-hour) here.

507 We performed gene set enrichment analysis using Gene Ontology (GO) annotations following Li

508 et al. (23). Enrichment was tested with the R package *topGO* (81), applying the *elim* algorithm to

509 account for GO topology. GO terms with p-values < 0.05 were considered significantly enriched.

510 To aid interpretation, enriched terms were semantically clustered using the package *rrvgo*.

511 Fungal exposure assay

512 Following behavioural recording, we measured the survival of ants from 12 experimental

513 colonies after exposure to the generalist entomopathogenic fungus *Beauveria bassiana* isolate

514 ART2850 (isolated from a *Technomyrmex vitiensis* ant in Zurich, Switzerland, and stored in the

515 stock collection of Agroscope, Zurich, Switzerland). A suspension of 10⁸ conidiospores mL⁻¹ in

516 sterile 0.05% Triton X-100 was prepared, and its germination rate was verified to exceed 95% on

517 Sabouraud dextrose agar at 23 °C for 20 h. Ants were individually immersed in a separate 100 µL
518 of the suspension for 5 seconds, placed on filter paper for 10 min to dry, and then transferred
519 into an air-tight plastic cup with an autoclaved plaster of Paris floor saturated with autoclaved
520 water. In addition to the ants from experimental colonies, 10 workers from the stock colony
521 underwent the same procedure but with sterile 0.05% Triton X-100 lacking conidiospores as
522 controls. Survival was monitored daily for 13 days post-exposure. On the day of death, each
523 cadaver was surface-sterilised using the same method as for live ants, placed in a Petri dish with
524 damp filter paper, and observed for 14 additional days to track any fungal outgrowth. Only ants
525 with confirmed fungal outgrowth on their cadavers were included in survival analyses.

526 To test the relationship between behaviour and resistance to a fungal pathogen, we conducted a
527 survival analysis using a Cox Proportional Hazards Model (implemented using the coxph function
528 from the R package survival). The model included individual scores on the first three behavioural
529 principal components (PC1, PC2, and PC3) as continuous predictors and colony identity as a
530 random factor to account for colony-level variation. We initially fit a model that included all two-
531 way interactions among the three principal components, none of which were statistically
532 significant. The final model therefore included only the three principal components as predictors.
533 The proportional hazards assumption was verified using standard diagnostic plots and Schoenfeld
534 residual tests (cox.zph function in the survival package). Statistical significance was assessed using
535 likelihood ratio tests (LRT).

536 Antibacterial activity

537 Following behavioural recording, 84 workers from nine colonies were used in an in vitro
538 antibacterial assay modified from (82). Ants were flash-frozen in liquid nitrogen and stored
539 individually in 1.5 mL Eppendorf tubes at -80 °C. Total protein was extracted from individual
540 frozen whole-body samples homogenised in 100 µL ice-cold phosphate-buffered saline (PBS;
541 Sigma) with 1 mM Phenylthiourea (PTU; Sigma). The lysate was immediately centrifuged at
542 maximum speed for 10 min at 4 °C, and the supernatant was transferred to a new tube. The
543 supernatant was centrifuged again to remove any debris, and the supernatant was transferred to
544 a new tube. Because antibacterial activity could not be measured from single ants, we pooled
545 supernatant from the most forager-like ants and the most nurse-like ants in each colony (3 to 5
546 individuals per sample, depending on ant survival during recording), based on loadings on
547 behavioural PC1, for a total of 9 samples per behavioural group. The protein concentration of
548 each sample was determined using the Bradford assay and samples were frozen at -80 °C for
549 further use.

550 Escherichia coli TOP10 (pUC18) was cultured in Luria-Bouillon (LB; Sigma) broth with carbenicillin
551 (200 µg/mL; Carl Roth) at 37 °C overnight. The overnight E. coli culture was pelleted at 3000 rpm
552 for 10 min and prepared in sterile PBS at OD₆₀₀ = 1. Samples (1 µg of total protein) were mixed
553 with 25 µL of bacteria suspension adjusted to 5 x 10⁶ CFU/mL in LB with carbenicillin. Reactions
554 in 1.5 mL tubes were incubated for 3 h at 37 °C, then each reaction was diluted with 190 µL LB
555 with carbenicillin and 100 µL were immediately transferred to 96-well plate in duplicates for
556 bacterial growth determination by OD₆₀₀ reading. The remaining 10 µL were further diluted and
557 plated on LB plates with carbenicillin in duplicates and incubated overnight at 37 °C for bacterial
558 viability determination by colony-forming units (CFU) count. OD₆₀₀ readings and CFU counts for
559 each behavioural group were normalised to the negative control (PBS without lysate) to calculate
560 relative bacterial growth and viability. Values were averaged across technical duplicates and
561 compared between forager-like and nurse-like samples using paired t-tests.
562 **Acknowledgements:** The authors thank Fionna Knecht for training, Daniel Veit for help building
563 the experimental setup, Daniel Knebel for help setting up experiments, Martin Niebergall for
564 help establishing the computational environment, and Heiko Vogel for early advice on
565 bioinformatics. This work was supported by the Max Planck Society and the European Research
566 Council (ERC) under the European Union's Horizon 2020 research and innovation programme
567 (grant agreement no. 851523) to Y.U.; NS and FM acknowledge funding by the European
568 Research Council (ERC Starting Grant 'DISEASE', no. 802628, to NS). This is Clonal Raider Ant
569 Paper # 41.

570 **Author contributions:** Z. L.: conceptualization, data curation, formal analysis, investigation,  
571 methodology, validation, visualization, writing—original draft, writing—review and editing; TH.  
572 N.: investigation, methodology, visualization, writing—original draft, review and editing; J. K.:  
573 methodology, writing—review and editing; F. M.: formal analysis, writing—review and editing;  
574 G. G.: resources, writing—review and editing; B. L.: resources, writing—review and editing; N.  
575 S.: resources, writing—review and editing; M. K.: resources, writing—review and editing; Y.U.:  
576 conceptualization, funding acquisition, methodology, project administration, resources,  
577 supervision, writing—review and editing.
578
579 **References**

580 1. Blennerhassett RA, Bell-Anderson K, Shine R, Brown GP. The cost of chemical defence: the impact of toxin depletion on growth and behaviour of cane toads (Rhinella marina). Proc R Soc B Biol Sci. 2019 May 15;286(1902):20190867.

583 2. Moret Y, Schmid-Hempel P. Survival for immunity: the price of immune system activation for bumblebee workers. Science. 2000;290(5494):1166-8.

585 3. Anderson RM, May RM. Infectious Diseases of Humans: Dynamics and Control. OUP Oxford; 1992.

587 4. Rhoades DF. Evolution of plant chemical defenses against herbivores. In: Herbivores - Their Interaction with Secondary Plant Metabolites. Academic Press; 1979. p. 3-48.

589 5. Hladish TJ, Pillai AN, Pearson CAB, Toh KB, Tamayo AC, Stoltzfus A, et al. Evaluating targeted COVID-19 vaccination strategies with agent-based modeling. PLoS Comput Biol. 2024 May;20(5):e1012128.

592 6. Hunziker P, Lambertz SK, Weber K, Crocoll C, Halkier BA, Schulz A. Herbivore feeding preference corroborates optimal defense theory for specialized metabolites within plants. Proc Natl Acad Sci U S A. 2021 Nov 23;118(47).

595 7. Lau K, Miraldo M, Galizzi MM, Hauck K. Social norms and free-riding in influenza vaccine decisions in the UK: an online experiment. The Lancet. 2019 Nov 1;394:S65.

597 8. Wheeler WM. The ant-colony as an organism. J Morphol. 1911;22(2):307-25.

598 9. Cremer S, Armitage SAO, Schmid-Hempel P. Social Immunity. Curr Biol. 2007 Aug 21;17(16):R693-702.

600 10. Schmid-Hempel P. Parasites in Social Insects. Princeton, New Jersey: Princeton University Press; 1998.

602 11. Bocher A, Tirard C. Phenotypic plasticity of immune defence linked with foraging activity in the ant *Cataglyphis velox*. J Evol Biol. 2007;20(2228-2234).

604 12. Bull JC, Ryabov EV, Prince G, Mead A, Zhang C, Baxter LA, et al. A strong immune response in young adult honeybees masks their increased susceptibility to infection compared to older bees. PLoS Pathog. 2012 Dec;8(12):e1003083.

607 13. Vannette RL, Mohamed A, Johnson BR. Forager bees (Apis mellifera) highly express immune and detoxification genes in tissues associated with nectar processing. Sci Rep. 2015 Nov 9;5(1):16224.

610 14. Campana L, Júnior CAMC, Lourenço AP, Hartfelder K. Social task and aggressiveness shape immunity gene expression levels in the head of highly eusocial bees. bioRxiv; 2025. p. 2024.12.17.628725.

613 15. Helft F, Tirard C, Doums C. Effects of division of labour on immunity in workers of the ant *Cataglyphis cursor*. Insectes Sociaux. 2012 Aug 1;59(3):333-40.
615 16. Jeanson R, Weidenmuller A. Interindividual variability in social insects - proximate causes and ultimate consequences. Biol Rev Camb Philos Soc. 2014 Aug;89(3):671-87.

617 17. Invernizzi C, Peñagaricano F, Tomasco IH. Intracolonial genetic variability in honeybee larval resistance to the chalkbrood and American foulbrood parasites. Insectes Sociaux. 2009 Aug 1;56(3):233-40.

620 18. Korb J, Meusemann K, Aumer D, Bernadou A, Elsner D, Feldmeyer B, et al. Comparative transcriptomic analysis of the mechanisms underpinning ageing and fecundity in social insects. Philos Trans R Soc B Biol Sci. 2021 Mar 8;376(1823):20190728.

623 19. The effects of age and social interactions on innate immunity in a leaf-cutting ant. J Insect Physiol. 2010 July 1;56(7):780-7.

625 20. Hölldobler B, Wilson EO. The Ants. Cambridge, Mass.: Belknap Press of Harvard University Press; 1990.

627 21. Perna S, Tang W, Blimbaum S, Li A, Zhou L. Shared Transcriptomic Signatures of Inflammaging Among Diverse Strains of *Drosophila melanogaster*. Res Sq. 2024 Apr 3;rs.3.rs-4146509.

629 22. Ulrich Y, Saragosti J, Tokita CK, Tarnita CE, Kronauer DJC. Fitness benefits and emergent division of labour at the onset of group living. Nature. 2018 Aug;560(7720):635-8.

631 23. Li Z, Bhat B, Frank ET, Oliveira-Honorato T, Azuma F, Bachmann V, et al. Behavioural individuality determines infection risk in clonal ant colonies. Nat Commun. 2023 Aug 26;14(1):5233.

634 24. Westlake H, Hanson MA, Lemaître B. The *Drosophila* immunity handbook. EPFL Press; 2024.

635 25. Buchon N, Silverman N, Cherry S. Immunity in *Drosophila melanogaster* — from microbial recognition to whole-organism physiology. Nat Rev Immunol. 2014 Dec;14(12):796-810.

637 26. Masson F, Brown RL, Vizueta J, Irvine T, Xiong Z, Romiguier J, et al. Pathogen-specific social immunity is associated with erosion of individual immune function in an ant. Nat Commun. 2024 Oct 26;15(1):9260.

640 27. Zhang Z, Zhu S. Comparative genomics analysis of five families of antimicrobial peptide-like genes in seven ant species. Dev Comp Immunol. 2012 Oct 1;38(2):262-74.

642 28. Viljakainen L, Evans JD, Hasselmann M, Rueppell O, Tingek S, Pamilo P. Rapid evolution of immune proteins in social insects. Mol Biol Evol. 2009;26(8):1791-801.

644 29. Alciatore G, Ugelvig LV, Frank E, Bidaux J, Gal A, Schmitt T, et al. Immune challenges increase network centrality in a queenless ant. Proc R Soc B-Biol Sci. 2021 Sept 8;288(1958).

646 30. Kim MS, Baek MJ, Lee MH, Park JW, Lee SY, Söderhäll K, et al. A New Easter-type Serine Protease Cleaves a Masquerade-like Protein during Prophenoloxidase Activation in *Holotrichia diomphalia* Larvae*. J Biol Chem. 2002 Oct 18;277(42):39999-40004.

649 31. Shan T, Wang Y, Bhattarai K, Jiang H. An evolutionarily conserved serine protease network mediates melanization and Toll activation in *Drosophila*. Sci Adv. 2023 Dec 22;9(51):eadk2756.
651 32. Takahashi D, Garcia BL, Kanost MR. Initiating protease with modular domains interacts with β-glucan recognition protein to trigger innate immune response in insects. Proc Natl Acad Sci. 652 2015 Nov 10;112(45):13856-61. 653

654 33. Valanne S, Myllymäki H, Kallio J, Schmid MR, Kleino A, Murumägi A, et al. Genome-wide RNA interference in *Drosophila* cells identifies G protein-coupled receptor kinase 2 as a conserved regulator of NF-kappaB signaling. J Immunol Baltim Md 1950. 2010 June 1;184(11):6188-98. 655 656

657 34. Kleino A, Valanne S, Ulvila J, Kallio J, Myllymäki H, Enwald H, et al. Inhibitor of apoptosis 2 and TAK1-binding protein are components of the *Drosophila* Imd pathway. EMBO J. 2005 658 659 Oct 5;24(19):3423-34.

660 35. Trivedi S, Starz-Gaiano M. *Drosophila* Jak/STAT Signaling: Regulation and Relevance in Human Cancer and Metastasis. Int J Mol Sci. 2018 Dec 14;19(12):4056. 661

662 36. Lee KS, Kim BY, Kim YH, Choi YS, Jin BR. Identification of waprin and its microbicidal activity: A novel protein component of honeybee (*Apis mellifera*) venom. Comp Biochem Physiol Part C Toxicol Pharmacol. 2023 Apr 1;266:109561. 663 664

665 37. Lazarević J, Janković-Tomanić M. Dietary and phylogenetic correlates of digestive trypsin activity in insect pests. Entomol Exp Appl. 2015;157(2):123-51. 666

667 38. Liu Y, Sui YP, Wang JX, Zhao XF. Characterization of the trypsin-like protease (Ha-TLP2) constitutively expressed in the integument of the cotton bollworm, *Helicoverpa armigera*. Arch Insect Biochem Physiol. 2009 Oct;72(2):74-87. 668 669

670 39. Friedländer M, Jeshtadi A, Reynolds SE. The structural mechanism of trypsin-induced intrinsic motility in *Manduca sexta* spermatozoa in vitro. J Insect Physiol. 2001 Mar 1;47(3):245-55. 671

672 40. Madden K, Crowner D, Giniger E. LOLA has the properties of a master regulator of axon-target interaction for SNb motor axons of *Drosophila*. Dev Biol. 1999 Sept 15;213(2):301-13. 673

674 41. Doums C, Moret Y, Benelli E, Schmid-Hempel P. Senescence of immune defence in *Bombus* workers. Ecol Entomol. 2002;27(2):138-44. 675

676 42. Moret Y, Schmid-Hempel P. Immune responses of bumblebee workers as a function of individual and colony age: senescence versus plastic adjustment of the immune function. Oikos. 2009;118(3):371-8. 677 678

679 43. Milutinović B, Kurtz J. Immune memory in invertebrates. Semin Immunol. 2016 Aug 680 1;28(4):328-42.

681 44. Schmid-Hempel P, Ebert D. On the evolutionary ecology of specific immune defence. Trends Ecol Evol. 2003;18(1):27-32. 682

683 45. Sheldon BC, Verhulst S. Ecological immunology: costly parasite defences and trade-offs in evolutionary ecology. Trends Ecol Evol. 1996 Aug 1;11(8):317-21. 684

685 46. Ito K, Sakai S. Optimal defense strategy against herbivory in plants: Conditions selecting for induced defense, constitutive defense, and no-defense. J Theor Biol. 2009 Oct 7;260(3):453-687 9.
688 47. Barribeau SM, Sadd BM, du Plessis L, Brown MJF, Buechel SD, Cappelle K, et al. A depauperate immune repertoire precedes evolution of sociality in bees. Genome Biol. 2015
689 Apr 24;16.
690

691 48. Christophides GK, Zdobnov E, Barillas-Mury C, Birney E, Blandin S, Blass C, et al. Immunity-Related Genes and Gene Families in *Anopheles gambiae*. Science. 2002 Oct 4;298(5591):159–65.
692
693

694 49. Evans JD, Aronstein K, Chen YP, Hetru C, Imler JL, Jiang H, et al. Immune pathways and
defence mechanisms in honey bees *Apis mellifera*. Insect Mol Biol. 2006;15(5):645.
695

696 50. He S, Sieksmeyer T, Che Y, Mora MAE, Stiblik P, Banasiak R, et al. Evidence for reduced immune gene diversity and activity during the evolution of termites. Proc R Soc B Biol Sci. 2021 Feb 17;288(1945):20203168.
697
698

699 51. Cotter S. Personal immunity versus social immunity. Behav Ecol. 2010;

700 52. Trible W, McKenzie SK, Kronauer DJC. Globally invasive populations of the clonal raider ant are derived from Bangladesh. Biol Lett. 2020 June;16(6):20200105.
701

702 53. Lacey LA, Brooks WM. Chapter I - Initial handling and diagnosis of diseased insects. In: Lacey LA, editor. Manual of Techniques in Insect Pathology. London: Academic Press; 1997. p. 1–VIII.
703
704

705 54. Gal A, Saragosti J, Kronauer DJC. anTraX, a software package for high-throughput video tracking of color-tagged insects. Elife. 2020 Nov 19;9.

707 55. Jud SL, Knebel D, Ulrich Y. Intergenerational genotypic interactions drive collective behavioural cycles in a social insect. Proc Biol Sci. 2022 Nov 9;289(1986):20221273.
708

709 56. Hoverman JT, Searle CL. Behavioural influences on disease risk: implications for conservation and management. Anim Behav. 2016 Oct 1;120:263–71.
710

711 57. Bordes F, Morand S, Kelt DA, Van Vuren DH. Home range and parasite diversity in mammals. Am Nat. 2009 Apr;173(4):467–74.
712

713 58. Heine C, O’Keeffe KP, Santi P, Yan L, Ratti C. Travel distance, frequency of return, and the spread of disease. Sci Rep. 2023 Aug 28;13(1):14064.
714

715 59. Ohsawa Y, Sun Y, Sekiguchi K, Kondo S, Maekawa T, Takita M, et al. Risk Index of Regional Infection Expansion of COVID-19: Moving Direction Entropy Study Using Mobility Data and Its Application to Tokyo. JMIR Public Health Surveill. 2024 Aug 21;10:e57742.
716
717

718 60. Peacock SJ, Krkošek M, Lewis MA, Molnár PK. A unifying framework for the transient parasite dynamics of migratory hosts. Proc Natl Acad Sci. 2020 May 19;117(20):10897–903.
719

720 61. Silk MJ, Croft DP, Delahay RJ, Hodgson DJ, Boots M, Weber N, et al. Using Social Network Measures in Wildlife Disease Ecology, Epidemiology, and Management. Bioscience. 2017 Mar 1;67(3):245–57.
721
722

723 62. Stroeymeyt N, Grasse AV, Crespi A, Mersch DP, Cremer S, Keller L. Social network plasticity decreases disease transmission in a eusocial insect. Science. 2018;362(6417):941.
724
725 63. Gernat T, Rao VD, Middendorf M, Dankowicz H, Goldenfeld N, Robinson GE. Automated monitoring of behavior reveals bursty interaction patterns and rapid spreading dynamics in honeybee social networks. Proc Natl Acad Sci U A. 2018 Jan 29;

728 64. Soto JSV, Kosiewska J, Muller LI, Grove D, Metts D, Wilber MQ. Correlated host movements can reshape spatio-temporal disease dynamics: modeling the contributions of space use to transmission risk using movement data. bioRxiv; 2024. p. 2024.04.16.589740.

731 65. R Development Core Team. R: A Language and Environment for Statistical Computing. Vienna, Austria: R Foundation for Statistical Computing; 2008.

733 66. Josse J, Husson F. missMDA: A Package for Handling Missing Values in Multivariate Data Analysis. J Stat Softw. 2016 Apr 4;70:1–31.

735 67. Jolliffe IT. Principal Component Analysis. Springer Science & Business Media; 2002. 513 p.

736 68. Camacho C, Coulouris G, Avagyan V, Ma N, Papadopoulos J, Bealer K, et al. BLAST+: architecture and applications. BMC Bioinformatics. 2009 Dec 15;10(1):421.

738 69. Katoh K, Standley DM. MAFFT Multiple Sequence Alignment Software Version 7: Improvements in Performance and Usability. Mol Biol Evol. 2013 Apr 1;30(4):772–80.

740 70. Gramates LS, Agapite J, Attrill H, Calvi BR, Crosby MA, Dos Santos G, et al. FlyBase: a guided tour of highlighted features. Genetics. 2022 Apr 4;220(4):iyac035.

742 71. Melcarne C. Role of Nimrod receptors in the *Drosophila melanogaster* cellular immune response. EPFL; 2020.

744 72. Brutscher LM, Flenniken ML. RNAi and Antiviral Defense in the Honey Bee. J Immunol Res. 2015;2015:941897.

746 73. Jones P, Binns D, Chang HY, Fraser M, Li W, McAnulla C, et al. InterProScan 5: genome-scale protein function classification. Bioinformatics. 2014 May 1;30(9):1236–40.

748 74. Wang G, Li X, Wang Z. APD3: the antimicrobial peptide database as a tool for research and education. Nucleic Acids Res. 2016 Jan 4;44(D1):D1087-1093.

750 75. Ewels PA, Peltzer A, Fillinger S, Patel H, Alneberg J, Wilm A, et al. The nf-core framework for community-curated bioinformatics pipelines. Nat Biotechnol. 2020 Mar;38(3):276–8.

752 76. Babraham Bioinformatics - Trim Galore! [Internet]. [cited 2025 Aug 4]. Available from: https://www.bioinformatics.babraham.ac.uk/projects/trim_galore/

754 77. Kopylova E, Noé L, Touzet H. SortMeRNA: fast and accurate filtering of ribosomal RNAs in metatranscriptomic data. Bioinformatics. 2012 Dec 1;28(24):3211–7.

756 78. Patro R, Duggal G, Love MI, Irizarry RA, Kingsford C. Salmon provides fast and bias-aware quantification of transcript expression. Nat Methods. 2017 Apr;14(4):417–9.

758 79. Ritchie ME, Phipson B, Wu D, Hu Y, Law CW, Shi W, et al. limma powers differential expression analyses for RNA-sequencing and microarray studies. Nucleic Acids Res. 2015 Apr 20;43(7):e47.
761 80. Pimsler ML, Oyen KJ, Herndon JD, Jackson JM, Strange JP, Dillon ME, et al. Biogeographic parallels in thermal tolerance and gene expression variation under temperature stress in a widespread bumble bee. Sci Rep. 2020 Oct 13;10(1):17063.

764 81. Alexa A, Rahnenfuhrer J, Lengauer T. Improved scoring of functional groups from gene expression data by decorrelating GO graph structure. Bioinformatics. 2006 July 1;22(13):1600-7.

767 82. Casciaro B, Cappiello F, Loffredo MR, Mangoni ML. Methods for the In Vitro Examination of the Antibacterial and Cytotoxic Activities of Antimicrobial Peptides. In: Sandrelli F, Tettamanti G, editors. Immunity in Insects. New York, NY: Springer US; 2020. p. 147-62.

770