Direct and indirect benefits of cooperation in collective defense against predation

preprint OA: closed
📄 Open PDF Full text JSON View at publisher

Abstract

The evolution and maintenance of public goods cooperation, despite cheating, remains a key interest in social biology. Identifying how ecological factors determine the direct and indirect benefits that maintain cooperation has proven challenging, as these can vary significantly across species and environments. Here, we study this problem using the social pine sawfly Neodiprion sertifer (Hymenoptera) as a model system. During their larval stage, N. sertifer live in groups and collectively secrete a defensive fluid against predators. This behavior comprises a public good as it is costly to exhibit and beneficial to others, and individuals vary in their contribution to group defense. We experimentally manipulated individual contributions to defense to assess how these influence survival under natural insect predation. Our results indicate that defense has a group-level benefit as individuals were more likely to survive in cooperative groups with a higher proportion of defending larvae. Moreover, being able to deploy defensive fluid confers direct survival benefits. Genetic and phenotypic analyses of natural populations further show that kin selection promotes collective defense, as groups of larvae are often composed of full siblings. We also find that the contribution to defense is female-biased and diminishes in larger, more male-biased groups, and to some extent with decreased kinship, indicating that individuals adjust their contributions based on social context. Overall, we find that contribution to the collective defense provides both direct and indirect benefits and that individuals regulate their contributions mainly based on the social environment, resulting in variation within and among natural populations. Significance statement Individuals in groups can cooperate to achieve shared goals, but they face an evolutionary challenge: if the benefits of cooperation are shared equally, freeloaders receive the same benefits as others while contributing less. Although theoretical solutions to this problem are abundant, we still lack empirical evidence on how those mechanisms function in natural systems. We study this with pine sawfly larvae, which defend collectively against predators. We show that while cooperation increases the survival of individuals and their relatives, they adjust their contributions based on who and how many they are surrounded by, relying more on freeloading in larger and male-biased groups. This results in variation in cooperativeness but prevents freeloaders from taking over.
Full text 81,721 characters · extracted from preprint-html · click to expand
Direct and indirect benefits of cooperation in collective defense against predation | bioRxiv /* */ /* */ <!-- <!-- /*! * yepnope1.5.4 * (c) WTFPL, GPLv2 */ (function(a,b,c){function d(a){return"[object Function]"==o.call(a)}function e(a){return"string"==typeof a}function f(){}function g(a){return!a||"loaded"==a||"complete"==a||"uninitialized"==a}function h(){var a=p.shift();q=1,a?a.t?m(function(){("c"==a.t?B.injectCss:B.injectJs)(a.s,0,a.a,a.x,a.e,1)},0):(a(),h()):q=0}function i(a,c,d,e,f,i,j){function k(b){if(!o&&g(l.readyState)&&(u.r=o=1,!q&&h(),l.onload=l.onreadystatechange=null,b)){"img"!=a&&m(function(){t.removeChild(l)},50);for(var d in y[c])y[c].hasOwnProperty(d)&&y[c][d].onload()}}var j=j||B.errorTimeout,l=b.createElement(a),o=0,r=0,u={t:d,s:c,e:f,a:i,x:j};1===y[c]&&(r=1,y[c]=[]),"object"==a?l.data=c:(l.src=c,l.type=a),l.width=l.height="0",l.onerror=l.onload=l.onreadystatechange=function(){k.call(this,r)},p.splice(e,0,u),"img"!=a&&(r||2===y[c]?(t.insertBefore(l,s?null:n),m(k,j)):y[c].push(l))}function j(a,b,c,d,f){return q=0,b=b||"j",e(a)?i("c"==b?v:u,a,b,this.i++,c,d,f):(p.splice(this.i++,0,a),1==p.length&&h()),this}function k(){var a=B;return a.loader={load:j,i:0},a}var l=b.documentElement,m=a.setTimeout,n=b.getElementsByTagName("script")[0],o={}.toString,p=[],q=0,r="MozAppearance"in l.style,s=r&&!!b.createRange().compareNode,t=s?l:n.parentNode,l=a.opera&&"[object Opera]"==o.call(a.opera),l=!!b.attachEvent&&!l,u=r?"object":l?"script":"img",v=l?"script":u,w=Array.isArray||function(a){return"[object Array]"==o.call(a)},x=[],y={},z={timeout:function(a,b){return b.length&&(a.timeout=b[0]),a}},A,B;B=function(a){function b(a){var a=a.split("!"),b=x.length,c=a.pop(),d=a.length,c={url:c,origUrl:c,prefixes:a},e,f,g;for(f=0;f<d;f++)g=a[f].split("="),(e=z[g.shift()])&&(c=e(c,g));for(f=0;f<b;f++)c=x[f](c);return c}function g(a,e,f,g,h){var i=b(a),j=i.autoCallback;i.url.split(".").pop().split("?").shift(),i.bypass||(e&&(e=d(e)?e:e[a]||e[g]||e[a.split("/").pop().split("?")[0]]),i.instead?i.instead(a,e,f,g,h):(y[i.url]?i.noexec=!0:y[i.url]=1,f.load(i.url,i.forceCSS||!i.forceJS&&"css"==i.url.split(".").pop().split("?").shift()?"c":c,i.noexec,i.attrs,i.timeout),(d(e)||d(j))&&f.load(function(){k(),e&&e(i.origUrl,h,g),j&&j(i.origUrl,h,g),y[i.url]=2})))}function h(a,b){function c(a,c){if(a){if(e(a))c||(j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}),g(a,j,b,0,h);else if(Object(a)===a)for(n in m=function(){var b=0,c;for(c in a)a.hasOwnProperty(c)&&b++;return b}(),a)a.hasOwnProperty(n)&&(!c&&!--m&&(d(j)?j=function(){var a=[].slice.call(arguments);k.apply(this,a),l()}:j[n]=function(a){return function(){var b=[].slice.call(arguments);a&&a.apply(this,b),l()}}(k[n])),g(a[n],j,b,n,h))}else!c&&l()}var h=!!a.test,i=a.load||a.both,j=a.callback||f,k=j,l=a.complete||f,m,n;c(h?a.yep:a.nope,!!i),i&&c(i)}var i,j,l=this.yepnope.loader;if(e(a))g(a,0,l,0);else if(w(a))for(i=0;i (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0];var j=d.createElement(s);var dl=l!='dataLayer'?'&l='+l:'';j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;j.type='text/javascript';j.async=true;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-M677548'); Skip to main content Home About Submit ALERTS / RSS Search for this keyword Advanced Search New Results Direct and indirect benefits of cooperation in collective defense against predation View ORCID Profile Raphael Ritter , Heikki Helanterä , Riikka Tynkkynen , Saskia Wutke , Carita Lindstedt doi: https://doi.org/10.1101/2025.08.19.670848 Raphael Ritter a Department of Forest Sciences, University of Helsinki, University of Helsinki 00014 , Finland Find this author on Google Scholar Find this author on PubMed Search for this author on this site ORCID record for Raphael Ritter Heikki Helanterä b Ecology and Genetics research unit, University of Oulu , Oulu 90014, Finland Find this author on Google Scholar Find this author on PubMed Search for this author on this site Riikka Tynkkynen c Natural Resources Institute Finland (Luke) , Joensuu 80100, Finland Find this author on Google Scholar Find this author on PubMed Search for this author on this site Saskia Wutke b Ecology and Genetics research unit, University of Oulu , Oulu 90014, Finland d Department of Environmental and Biological Sciences, University of Eastern Finland , Joensuu 80101, Finland Find this author on Google Scholar Find this author on PubMed Search for this author on this site Carita Lindstedt a Department of Forest Sciences, University of Helsinki, University of Helsinki 00014 , Finland Find this author on Google Scholar Find this author on PubMed Search for this author on this site For correspondence: carita.lindstedt-kareksela{at}helsinki.fi Abstract Full Text Info/History Metrics Supplementary material Data/Code Preview PDF Abstract The evolution and maintenance of public goods cooperation, despite cheating, remains a key interest in social biology. Identifying how ecological factors determine the direct and indirect benefits that maintain cooperation has proven challenging, as these can vary significantly across species and environments. Here, we study this problem using the social pine sawfly Neodiprion sertifer (Hymenoptera) as a model system. During their larval stage, N. sertifer live in groups and collectively secrete a defensive fluid against predators. This behavior comprises a public good as it is costly to exhibit and beneficial to others, and individuals vary in their contribution to group defense. We experimentally manipulated individual contributions to defense to assess how these influence survival under natural insect predation. Our results indicate that defense has a group-level benefit as individuals were more likely to survive in cooperative groups with a higher proportion of defending larvae. Moreover, being able to deploy defensive fluid confers direct survival benefits. Genetic and phenotypic analyses of natural populations further show that kin selection promotes collective defense, as groups of larvae are often composed of full siblings. We also find that the contribution to defense is female-biased and diminishes in larger, more male-biased groups, and to some extent with decreased kinship, indicating that individuals adjust their contributions based on social context. Overall, we find that contribution to the collective defense provides both direct and indirect benefits and that individuals regulate their contributions mainly based on the social environment, resulting in variation within and among natural populations. Significance statement Individuals in groups can cooperate to achieve shared goals, but they face an evolutionary challenge: if the benefits of cooperation are shared equally, freeloaders receive the same benefits as others while contributing less. Although theoretical solutions to this problem are abundant, we still lack empirical evidence on how those mechanisms function in natural systems. We study this with pine sawfly larvae, which defend collectively against predators. We show that while cooperation increases the survival of individuals and their relatives, they adjust their contributions based on who and how many they are surrounded by, relying more on freeloading in larger and male-biased groups. This results in variation in cooperativeness but prevents freeloaders from taking over. Introduction Individuals can cooperate in public goods which are often costly to produce for an individual, but beneficial for all members of a local group or population ( 1 ). Public goods systems are abundant across species with examples including social immunity in burying beetles ( 2 ), parasitoid wasps with cooperative brood care ( 3 ), siderophores and biofilms in bacteria ( 4 , 5 ) and communal nesting in birds ( 6 ). The fundamental challenge of public goods systems is their vulnerability to exploitation or cheating, i.e., benefiting from the public good without contributing to the production of it ( 1 , 7 – 9 ). If contributing is costly, and benefits are shared, it is not a priori guaranteed that contributing to collective good leads to higher fitness than reaping the benefit without having contributed to its production ( 10 , 11 ). This raises the question of the evolutionary stability of such systems over time. Several mechanisms that select for cooperation have been identified ( 1 , 11 – 15 ), affecting both direct and indirect fitness components of inclusive fitness ( 16 , 17 ). For example, costs and benefits of exploitation can be limited through negative frequency-dependence ( 11 , 18 , 19 ). In this case, the fitness of cheats will decrease when their frequency increases limiting their spread. The frequency-dependence can become stronger when at least some group members are related ( 20 ). In this context, an increase in cheating within a group would increasingly harm the relatives as well. Finally, if more cooperative individuals have better access to the public goods they have contributed to (i.e., direct benefits of cooperation), it should limit the expression of cheating ( 21 – 24 ). While significant progress has been made using microbial systems to study these mechanisms empirically ( 10 , 18 , 25 – 28 ), these predictions still need to be experimentally validated in more complex study systems where cooperation is facultative, and which show a higher degree of plasticity. This will help us to better determine the sources of diversity in cooperation and its maintenance in nature. Here, we investigate solutions to the public goods dilemma within a chemical defense framework ( 29 ). Many organisms defend against predators using defensive secretions, which are costly to produce and maintain ( 30 – 36 ). Their expression is often facultative ( 29 – 31 , 36 ), giving individuals the option to choose whether or not to deploy the defensive fluid when approached by a predator. In general, deploying the fluid may deter the predator, or harm it, limiting its future attacks ( 29 , 37 ). Furthermore, chemically defended prey are also considered to contribute to public goods by educating predators to avoid prey with similar appearance in future encounters ( 38 , 29 , 39 ). These shared costs of predator education are then a collective production of benefits shared by local group members or the population, i.e., cooperation ( 29 , 40 , 41 ). They apply both to solitary and gregarious species and can also occur at an interspecific level in Müllerian mimicry, i.e., defended individuals belonging to different species share the same warning signal ( 42 ). Group living by the prey has been shown to enhance avoidance learning by predators ( 43 , 44 ). This is because, when attacking an individual that is part of a group, a predator encounters the chemically defended prey more frequently, making it easier for the predator to recognize and memorize the appearance of that prey type and avoid attacking such prey in future encounters ( 44 – 46 ). A higher potency of chemical defense ( 47 ), and a higher proportion of individuals participating in the defense within a group ( 48 , 49 ) are also expected to increase defense success. Finally, when multiple individuals release secretions simultaneously, the magnitude of these stimuli is likely to increase protection ( 44 , 50 , 51 ), for instance by forming a barrier of defensive fluid that makes it difficult for a predator to reach a single prey without being exposed to the harmful effects of the secretion. In addition to these public goods-type mechanisms, displaying defensive secretions can reduce the risks associated with predation for an individual directly (i.e., providing individual benefits). This is because a predator may assess the unpalatability or toxicity of an individual prey using visual, olfactory or gustatory cues of the defensive secretion, without actually killing the prey ( 52 ). Being able to secrete the defensive fluid will also help an individual in “fighting” against the attacking predator. To study empirically the mechanisms that maintain public goods cooperation in chemical defense, we used social haplodiploid European pine sawflies ( Neodiprion sertifer ) as a model system. They live solitarily during the adult stage, but feed and defend collectively during the larval stage in dense groups on pine branches ( 53 – 55 ) ( Fig. 1a ). When threatened by natural enemies, such as birds, ants or parasitoid wasps, the larvae perform a synchronous defensive display where they raise their head and tail (U-posture). U-posture is also required for larvae to be able to proceed to a secondary defense, where larvae release a defensive secretion and attempt to apply it directly onto the predator if it approaches close enough ( 56 ). If larvae do not lose the fluid during such encounters, they can reabsorb and reuse it during subsequent attacks ( 55 ). Previous studies have shown that sometimes this collective display alone is enough to prevent attacks by avian predators ( 57 ). Furthermore, upon the deployment of defensive fluid, volatile terpenes evaporate from the droplet, creating a repellent effect on arthropod predators such as ants and spiders ( 56 ). Additionally, the resin compounds serve as toxic irritants for arthropod predators and may cause physiological damage due to their “stickiness” ( 53 , 56 , 57 )). In N. sertifer , survival against bird predation has shown to be higher when larvae are in a group in comparison to solitary larvae ( 44 ). Furthermore, being able to deploy the defensive fluid has been shown to improve survival in gregarious pine sawfly larvae against invertebrate predators when compared to depleted larvae ( 51 , 58 ). Download figure Open in new tab Fig. 1. a) Group of mid-instar N. sertifer defending in the wild (photo by Raphael Ritter). b) Mean survival of individuals was higher in more cooperative groups (individuals in 20% depleted group: N = 70 (7 groups, 10 individuals per group), individuals in 70% depleted group: N = 100 (10 groups, 10 individuals per group). c) Depleted individuals (red) were less likely to survive than non-depleted individuals (blue) (depleted individuals in 20% depleted group: N = 14, non-depleted individuals in 20% depleted group: N = 56, depleted individuals in 70% depleted group: N = 70, non-depleted individuals in 70% depleted group: N = 30). d) Mean kinship among all group members, mean kinship of females to group members and mean kinship of males to group members of each population (in black) and larval group (in grey). Kaavi was excluded due to low sample size of males (N = 1 for mean kinship among all group members, N = 1 for mean kinship of males to other group members, and N = 2 for mean kinship of females to other group members). Error bars indicate ±1 SEM. Pine sawfly larvae show individual and sex-biased variation in the likelihood of deploying the fluid as well as its volume and contributing to the collective chemical defense is costly ( 36 ). For example, deploying and losing the fluid repetitively decreases the growth, immune defense and life-span of individuals during the larval stage, in addition to their capacity to defend in future encounters with the predator ( 35 , 36 , 58 ). Interestingly, some larvae do not produce the fluid when provoked, even though their defensive reservoirs are filled, and they benefit from this via enhanced growth ( 36 ). Such non-defending individuals can be considered cheats in this system ( 8 , 29 , 36 ). Due to these features, it is possible to (i) quantify how much individuals are contributing to the collective defense, i.e., whether an individual deploys the fluid and the volume of fluid it produces and if so(ii) manipulate the cooperativeness within a group by manually depleting defensive fluid reserves and thereby decreasing the level of defense that can be exhibited ( 36 ). However, even when not actively secreting the defensive fluid, pine sawfly larvae remain unprofitable prey for avian and invertebrate (wood ants) predators ( 59 – 61 ). We addressed five aims. First, we studied experimentally whether contribution to the collective defense provides benefits through defense against predators under natural conditions. This was done by comparing the mean survival of individuals against wood ant predation between groups containing a high proportion of defending individuals (20% of individuals depleted, 80% non-depleted) and groups containing a low proportion of defending individuals (70% of individuals depleted, 30% non-depleted). We hypothesized that individuals are more likely to survive in groups with higher proportion of defending individuals than in groups with lower proportion of defending individuals. Second, we identified potential direct benefits of contributing to the costly collective defense. This was done by color-marking depleted and non-depleted individuals within experimental groups, and thus identifying whether depleted individuals (i.e., those that do not deploy the fluid or only in smaller amounts) are more likely to be killed by predators compared to individuals that are not depleted. We hypothesized that contribution to the collective chemical defense will be promoted if predators are less likely to attack an individual secreting the defensive fluid and/or higher volumes of it (direct benefit) ( 52 ). Third, we investigated the importance of kin selection in maintaining defense behaviors in gregarious chemically defended prey. This was done by collecting phenotypic and genetic data from four natural populations of N. sertifer in Finland to quantify the kin structure and social characteristics of larval colonies and their defensive behavior. If individuals are more likely to occur in the same group with their siblings, we can expect that contribution to the costly collective defense provides indirect fitness benefits by increasing the survival of kin ( 16 , 17 ). Similarly, in kin groups the relative cost of cheating increases if it decreases the survival of the cheat’s relatives ( 11 ). Fourth, we used data gathered above to quantify the extent of variation in collective defense in natural populations. Fifth, we explored how such variation correlates with the social structure, i.e., group size, sex ratio, and kinship of groups. We hypothesized that if larval colonies vary in their relatedness structure, and if individuals were able to estimate relatedness within the group, they would be less inclined to defend (i.e., lower proportion of individuals participating in defensive U-display, deployment of fluid or its volumes) in groups with low levels of kinship. Furthermore, since females are more likely to contribute to collective defense in pine sawflies ( 36 ), we expected the mean contribution to defense to be lower when there was a higher proportion of males within a group. We also expected the individual contributions to decline with increasing group size if benefits gained by contributing to the collective defense decrease in larger groups simply due to dilution effects and individuals optimize their behavior accordingly ( 30 , 43 , 62 ). This local variation in the social conditions (e.g., group size ( 30 )) could provide one mechanism maintaining differences in collective defense among populations. Results Individuals are more likely to survive predation in cooperative groups and contribution to collective defense provides direct benefits in terms of survival The mean survival of individuals under predation by wood ants ( Formica s.str. ) was significantly higher in cooperative groups (20% depleted, i.e. non-defending individuals) compared to non-cooperative groups (70% depleted) (model 1: LRχ 2 1 = 5.508, estimate = -1.314, error = 0.560, p = 0.019, Fig. 1b ). When the individual’s defensive status (depleted or non-depleted) was included in the model we found that depleted individuals had significantly lower survival than non-depleted individuals (model 2: LRχ 2 1 = 6.04, estimate = 1.932, error = 0.786, p = 0.014, Fig. 1c ). However, the proportion of defending individuals within a group (model 2: LRχ 2 1 = 0.182, estimate = -0.331, error = 0.774, p = 0.669, Fig. 1c ) or its interaction with the defensive status of an individual (model 2: LRχ 2 1 = 0.463, estimate = -0.652, error = 0.958, p = 0.496, Fig. 1c ) did not affect survival of depleted individuals significantly ( Fig. 1c ). In general, the relative fitness ( v ) ( 11 , 63 ) of depleted individuals was higher than or equal to that of non-depleted individuals in 4 out of 7 cases within cooperative groups, while in non-cooperative groups, depleted individuals had relatively higher survival than non-depleted ones in only 1 out of 9 cases. However, this difference is not significant and thus aligns with the results from the initial analyses (Fisher’s exact test, p = 0.105). Altogether, this suggests that depleted individuals benefit from being in cooperative groups (model 1), but that the ability to defend also benefits individuals directly (model 2). Contribution to collective defense provides indirect benefits Kinship was calculated based on consanguinity values. Therefore, values for full siblings are expected to be 0.375 between sisters, 0.5 between brothers, 0.25 between sisters and brothers ( 64 ). Across all four populations, individuals show a mean kinship of 0.30 (±0.01 SEM) among females, 0.45 (±0.01 SEM) among males and 0.19 (±0.02 SEM) among females and males ( Fig. 1d ). When kinship estimates per group are weighted by sex ratio, mean kinship among all group members was 0.28 (±0.01 SEM), mean kinship of females to group members was 0.26 (±0.01 SEM), and mean kinship of males to all group members was 0.29 (±0.01 SEM) (Fig. S2). Social environment and collective chemical defense behavior vary locally To study if the defensive behavior of N. sertifer larvae varied among populations, we first measured the number of individuals participating in the defensive display (i.e., U-posture) and deployment of defensive fluid per group. This was measured by attacking one randomly chosen individual in the middle of the group by poking it on the dorsal side with the tip of a pair of tweezers and calculating the number of individuals per group who displayed the U-posture or deployed the fluid. Proportion of individuals displaying the U-posture varied significantly among populations (Table S1). This was mainly driven by the significant difference between the populations Pöntiö and Puumala as well as Pöntiö and Pieksämäki. All the other populations did not differ from each other in pairwise comparisons (Table S1, Fig. S3d). Similarly, the proportion of individuals deploying the fluid (the more costly stage of the defensive repertoire) varied significantly across populations (Table S1). Pairwise comparisons indicate that this variation was again driven by the Pöntiö population where the proportion of individuals deploying the fluid per group were lower compared to all other populations (Table S1, Fig. S3c). Next, we analyzed how defensive behavior (whether larvae deployed the fluid or not) and the volume of fluid secreted varied among individuals and populations when larvae were attacked individually (i.e., a larva was picked up from the group and poked with tweezers). Contribution to defense was sex-biased: males were less likely to deploy the fluid than females (model 14: estimate = -1.77, error = 0.54, low 95% CI = -2.88, high 95% CI = -0.77, R-hat = 1) and produced lower volumes of it (model 15: estimate = -0.73, error = 0.21, low 95% CI = -1.13, high 95% CI = -0.31, R-hat = 1). Due to these sex biases, we analyzed the responses of females and males separately in all subsequent analyses for individually measured defense traits. The individual’s likelihood of deploying the fluid did not vary significantly among populations, either among female or male larvae (Table S1). However, the volume of fluid individuals contributed varied significantly among populations for females (Table S1), but not for males (Table S1). In general, female larvae deployed the highest volumes in Kaavi and lowest in Pieksämäki populations (Fig. S7). Size of the individual did affect the volume deployed in males (smaller male larvae deployed higher volumes), but not in females (Table S1). In general, individuals not deploying the fluid (i.e., cheaters) were less frequent than individuals deploying the fluid (Fig. S4): across all populations, 92% of females deployed the fluid and 72% of males deployed the fluid when individually attacked. Populations also differed significantly in terms of sex ratios and sizes of larval groups. The Pöntiö population had both the most female-biased sex ratios and largest group sizes in comparison to other populations (see Table S1 for pairwise comparisons, Fig. S3a and S3b). However, the kinship of larval colonies did not differ significantly among populations for any of the kinship types, i.e., mean kinship among all group members, mean kinship of females to group members, mean kinship of males to group members) (Table S1, Fig. 1d ). We excluded Kaavi from the analyses because of low sample size due to the lack of males (N = 1 for mean kinship among all group members, N = 1 for mean kinship of males to other group members, and N = 2 for mean kinship of females to other group members). Similarly, the kinship of larval colonies did not differ significantly among populations for female-female, male-male or female-male kinship estimates which were not weighted by the sex ratio of the group. (Table S4). Individuals regulated their contribution to the collective chemical defense based on their social environment The mean kinship of females to group members was significantly positively correlated with the display of the U-posture. The other kinship types did not correlate significantly with the display of the U-posture ( Table 1 , Fig. 2c ). Neither sex ratio nor group size had a significant effect for the proportion of individuals which displayed U-posture synchronously when provoked (i.e., one individual per group attacked), ( Table 1 , Fig. S5a and S5b). View this table: View inline View popup Download powerpoint Table 1. Effect of sex ratio, group size and kinship on the proportion of individuals per group performing the U-posture or deploying the fluid. Significant values are in bold (p < 0.05). Download figure Open in new tab Fig. 2. Phenotypic association between the contribution to the collective defense (secretion of defensive fluid) and the a) sex ratio (proportion of males) (N = 74) and b) size of the larval group (N = 83). c) Phenotypic association between participation in the defensive display (U-posture) and the kinship level of larval groups (N = 27 for each kinship type). When the proportion of individuals per group deploying the fluid was analyzed, cooperativeness of the group decreased significantly with an increasing proportion of males. Similarly, proportion of individuals that deployed the fluid decreased with the increase in group size ( Table 1 , Fig. 2a and 2b ). However, none of the kinship types were correlated with the proportion of individuals deploying the fluid within a group ( Table 1 , Fig. S5c). Similar analyses were run for the individually measured defensive traits. Female larvae deployed significantly higher volumes of fluid with higher level of kinship within a group (mean kinship among all group members, mean kinship of females to group members, mean kinship of males to group members) ( Table 2 , Fig. S6). Group size and sex ratio did not influence the volume of fluid secreted ( Table 2 ). For males, neither sex ratio, group size nor any of the kinship types affected their probability of deploying defensive fluid or the amount of fluid secreted ( Table 2 ). This was also the case for females’ probability of deploying the defensive fluid. Larval length did not affect how much fluid was deployed in both females and males in these models. View this table: View inline View popup Table 2. Effect of sex ratio, group size, and kinship on individuals’ defensive traits. Variables whose 95% credible intervals do not include zero are in bold. When we analyzed how social characteristics of larval groups were correlated, we found that female-female and female-male kinship decreased in larger groups. (Table S3, Fig. S8c). That is, in larger groups, individuals were less related. The sex ratio of the group was not associated with group size or any of the kinship estimates (Table S3, Fig. S8a and S8b). Finally, populations were not genetically structured. First, we found that F ST values were close to zero for all pairwise population comparisons and all female combinations (Fig. S9a). Second, F IS values were slightly negative for most combinations of females (Fig. S9b). These results suggest panmixia, i.e., low differentiation across large distances and indicate lack of inbreeding within populations. Discussion Determining factors that drive cooperation and cheating in public goods is fundamental to predict variation in cooperative interactions within and between species ( 24 ). Based on Hamilton’s inclusive fitness theory, we can expect selection to favor cooperation when the direct and indirect fitness benefits to the actor outweigh the fitness cost. Here, we have demonstrated experimentally that collective chemical defense is beneficial through improving survival of individuals, and that this results in indirect benefits as most individuals within larval colonies are full siblings. We have also shown that such cooperation confers direct benefits, as individuals that had maintained their capacity to defend had a higher probability of survival than those that lost it. Our phenotypic data from wild groups reveal significant variation in collective defense behavior across groups and populations. This variation among larval groups is partly explained by social context, with individuals becoming less inclined to defend in larger, more male-biased groups, as well as when the level of kinship decreases. Contribution to collective chemical defense was also sex-biased, with females more likely to deploy the defensive fluid and to do so in greater volumes than males, especially when they are closely related to other group members. Together, these results suggest that while contributing to defense improves individual survival, individuals adjust their contributions to the collective good based on their social environment and sex. Variation in these factors leads to within- and among-population variation in cooperative behavior. Public goods systems are often vulnerable to cheating, but cheats might not outcompete cooperative phenotypes completely if cooperation has high direct benefits. Our data from natural populations indicates that cheating in N. sertifer populations is rare among females but not unusual among males (8% of females and 28% of male larvae do not defend when individually attacked and measured; Fig. S4). However, we did not find strong support for the frequency dependent benefits of cheating ( 11 ) (experimentally represented by depleted individuals). For example, while the relative fitness ( 11 , 63 ) of depleted individuals was more often lower when they were common (8/9 cases in 70% depleted) compared to when they were rare (3/7 cases in 20% depleted), this difference was not significant (see also Fig. 1b and 1c ). This suggests that at least under high predation intensity, contribution to collective defense is promoted via high direct benefits of defense. It remains possible that frequency-dependent costs and benefits could occur at more extreme frequencies not included into our experimental design. Additionally, our experiment included only one type of predator (wood ants). In nature, predator species vary in their sensitivity to defense mechanisms of prey (reviewed in ( 65 )) and in their responses to visual cues and signals of prey individual’s unprofitability ( 66 , 67 ). Therefore, the benefits of contributing to group defense can vary depending on the intensity of predation as well as predator community structure ( 65 – 68 ). While we used a natural predator in our experiments, how cooperation is selected under diverse predation pressures is clearly an interesting avenue for future research. The benefits of cooperation in public goods can also depend on group size ( 30 ). For example, studies on public goods systems in microbes have shown that the fitness of cheats increases at high population densities ( 62 ). Accordingly, our phenotypic data from natural populations suggest that the proportion of individuals contributing to collective defense decreases as group size increases. At larger aggregations, it might be more beneficial for a gregarious prey to rely on the dilution effect and allocate energy and resources to growth instead ( 32 , 33 , 43 , 69 ). Group sizes also varied quite extensively within and among populations (Fig. S3b). Part of this variation can be a result of merging of offspring from several females ( 51 , 70 ). This is supported by our observation that the within-group kinship decreases in larger group sizes. In addition, the quality of the host plant can affect both oviposition decision of females ( 71 , 72 ) as well as the hatching success of eggs ( 71 ) and mortality rates of larvae ( 73 ), further influencing larval group sizes. Our results show that similarly to Diprion pini ( 36 ), also N. sertifer females contribute to collective defense significantly more often and in greater quantities than males. In addition, both the sex ratios of populations and the larval colonies were female-biased (Fig. S3). The recent theoretical model focusing on the pine sawfly system ( 74 ) showed that when sex ratios are female-biased during the larval stage, female-biased helping in collective defence can evolve due to the rarer-sex effect, even when defensive costs would be higher for females than for males ( 74 ). It is also possible that pine sawfly females are pre-adapted to help, given that they grow larger than males in the larval stage and are thus able to contribute to defending more effectively. This is similar to termites, where size could be a pre-adaptation promoting the sex biased division of labor among females and males ( 75 ). More generally, maternal behaviors as pre-adaptations (rather than haplodiploidy per se ) explain the prominence of female helpers in social Hymenoptera ( 76 , 77 ). The evolution of sex-biased helping can also be linked to haplodiploidy and the easy sex ratio adjustments it allows, given that sex of the eggs is determined by fertilization ( 78 ). As mothers may be under selection to produce the more helpful sex (i.e., local resource enhancement), and the reproductive value is lower for the individuals of the more common sex (“the rarer sex effect”) ( 79 , 80 ) female-bias may drive a positive feedback loop between sex ratio bias and sex-biased helping ( 78 ). Given the female-bias in N. sertifer larval groups and populations (see also ( 81 – 83 ) for female-biases in other sawfly species), and that sex-biased allocation to the collective defense results in a higher level of chemical defense at the group level ( Fig. 2a ), this coevolutionary feedback loop seems a promising topic for future research. Kin selection plays an important role in promoting cooperation across many different species ( 84 – 86 ). Similarly, our results show that pine sawfly larvae occur in kin groups, providing indirect benefits to the defending individuals. Within-group kinship values suggest that single matriline groups where the mother is singly mated are the rule, but occasional all male groups from unmated females, multiple mating or multiple matriline groups may occur ( 82 ). Facultative adjustment of cooperativeness based on the variation in kinship was observed in females, further highlighting the importance of indirect benefits. Thus, while the clear direct benefits of defense may imply that the benefit to kin is not the main driver of defending behavior, the existence of an indirect fitness benefit suggests that the trait is cooperative in nature, as it evolves at least partially due to the benefits it provides to others ( 87 ). Nevertheless, to better understand the cause-and-effect relationships between kinship, group size, and sex ratio on the contribution to collective chemical defense, controlled experiments are required in which their effects are manipulated and measured independently of each other. Finally, our results also provide new insights into the evolution of costly chemical defenses. Although R. A. Fisher suggested already in 1930 ( 79 ) that kin aggregations could promote the evolution of prey distastefulness, the importance of kin selection in favoring the evolution of costly chemical defenses has received much less attention ( 40 ) compared to the theoretical and empirical work on the direct benefits it provides ( 43 , 45 , 88 ). Our results here suggest that kin aggregations can play an important role and should be considered when examining the early evolution of costly antipredator defenses. However, in the model first proposed by Fisher ( 79 ) and later developed by Leimar et al. ( 88 ) and Best et al. ( 40 ) the chemical defenses were stored within the prey, and there were no cues or signals indicating their distastefulness to predators. This means that predators need to sample, taste and kill the prey to identify its defensive status before learning to avoid it. Our findings suggest that for gregarious prey that excrete defensive secretions externally, the direct benefits could be sufficient to promote the evolution of these traits, as defended prey do not necessarily all die before local predators learn to avoid them. More generally, we demonstrate that ecological drivers of cooperation can play an important role in its maintenance, and that the facultative expression of cooperativeness due to social conditions can significantly contribute to the maintenance of local variation in its expression. Material and methods Predation experiment with ants The predation experiment with ants was conducted in the summer 2023. The larval families used in this experiment originated from insect cultures established from the wild individuals originating from the larval colonies collected in different parts of Finland. Separate insect cultures per population were established with the following number of colonies collected from the wild: Alavus (50 colonies in 2020), Kaavi (10 colonies 2021 and 40 colonies 2022), Pieksämäki (40 colonies 2021 and 20 colonies 2022), Pöntiö (20 colonies 2021), Seinäjoki (10 colonies 2021). Experimental individuals originated from F1-F3 generations depending on the starting year of the insect culture. They were reared in a laboratory at the University of Helsinki, where they were kept at room temperature and fed fresh pine needles ad libitum . At approximately 10 days of age, larval groups were assigned to the depletion treatment or left to retain their defensive fluid. Depleted and non-depleted larvae were identified with fluorescent elastomer tags ( 89 , 90 ). These were injected subcutaneously and function well in pine sawfly larvae as they remain through instars. We used either fluorescent orange or blue dye (Visible Implant Elastomer Tags by Northwest Marine Technology, Inc.) and varied the colors for depleted and non-depleted treatment across groups to avoid the color markings to confound the effects of the experimental treatments. On the same day, we simulated an attack by gently pressing them with a cotton swab on the dorsal side. If they regurgitated defensive fluid, it was swiftly removed with the same cotton swab. Our supplementary data (Fig. S10) suggests that this procedure should be repeated multiple times to ensure that most of the depleted larvae can no longer deploy the defensive fluid. We therefore repeated this once more, two days later. Larvae were then placed in groups of 10 on a fresh pine twig, mixing depleted and non-depleted sibling individuals to create groups with 20% or 70% depleted individuals per group. The groups were then left undisturbed until the next morning. We did not mix individuals of different families, i.e., larvae were presented to ants in full-sib groups. In the field, we placed an approximately 40 cm long pine branch into the ground on a foraging trail in the vicinity of Formica s. str. mound and attached the twig bearing the group of larvae to it using green coated metal wire. Such replicates were carried out at 8 different ant nests. Altogether, we had 7 replicates for the 20% treatment and 10 replicates for the 70% treatment. We always had all the treatment combinations within the same nest, except for two nests where we only had one of the two treatment groups. We recorded the survival of the larvae over a seven-hour period. Collection of N. sertifer specimen for measurements of defense behaviors and social environmental factors We collected larvae in summer 2021 from different parts of Finland (Pöntiö, Pieksämäki, Puumala, and Kaavi) with only one group taken from each tree per study site. Each group consisted of larvae found in close proximity to one another on the same branch of the tree, clearly forming a single group. These groups were subsequently reared in a greenhouse at the University of Jyväskylä, where the temperature matched natural outdoor conditions. Larvae were fed fresh pine branches ad libitum. Lighting conditions always included both natural sunlight and some level of electric light. To measure the defensive behavior of each group, we simply randomly selected one individual per group, poked it gently (non-injuriously) on its dorsal side with the tip of a pair tweezers, and counted the number of larvae that responded by regurgitating defensive fluid and/or raising their heads in response to the simulated attack. When larvae formed subgroups within each aggregation, we simulated an attack on one individual randomly within each subgroup. We measured a total of 84 groups (Kaavi: N = 8, Pöntiö: N = 20, Puumala: N = 18, Pieksämäki: N = 38). We determined the size of each larval group immediately after these measurements. We sexed the individual larvae based on the adults that eventually emerged and when an individual pupated but failed to eclose, we used cocoon size as an estimator for sex (females being larger than males ( 36 , 55 )). The sex of 70 individuals were unknown as they died before pupation. For the individual defense measurements, we simply randomly chose 5 individuals from each group and simulated an attack on each one. We also sucked any fluid secreted into a glass capillary and measured the length of the tube occupied by the liquid (using calipers accurate to 0.1 mm) and converted the measure to a volume (mm 3 ). In total, we measured the defense behavior of 345 individuals from 69 different groups (Kaavi: 10 groups, 50 individuals, Pöntiö: 20 groups, 100 individuals, Puumala: 19 groups, 95 individuals, Pieksämäki: 20 groups, 100 individuals). DNA extraction s preparations for sequencing The majority of groups had at least 10 females and males, but due to mortality and variation in original larval group sizes and sex-ratios, some contained only of 5 females or 1 male per larval group. We included only groups that contained both females and males. We followed the Ǫiagen kit instruction with minor modifications. After extraction, we normalized the DNA concentration to approximately 20ng/µL and double-digested it with the enzymes Mspl and MluCl. To associate each sequence with a specific 96-well plate, we ligated double-stranded adapters to each DNA strand. We then conducted a test-PCR, followed by gel electrophoresis to confirm successful DNA digestion and adapter ligation, which led to the exclusion of 14 samples. The remaining samples were pooled into a single 96-well plate and cleaned using an AMPure substitute. Next, we attached index primers with unique dual indices (UDI) to associate each sequence with a specific position on the 96-well plate. All samples were then pooled into a single Eppendorf tube and run on a 1.5% agarose gel for size selection (320-500 kb). We excised the DNA region from the agarose gel and purified it with the Monarch DNA Gel Extraction Kit (New England Biolabs). The cleaned library was quantified via qPCR using the NEBNext Library Ǫuant Kit (New England Biolabs) and sequenced on the Illumina NovaSeq platform at the Institute for Molecular Medicine Finland (FIMM) of the University of Helsinki. Altogether, after the filtering steps described below, we sampled from Pöntiö 10 groups and 189 individuals, from Pieksämäki 10 groups and 186 individuals, from Puumala 9 groups and 166 individuals, and from Kaavi 8 groups and 69 individuals. Bioinformatics (kinship analysis) We trimmed the 4bpIMI off the raw sequencing data from the left of each forward read and then demultiplexed them based on the 5bp index allowing us to identify the sample name for each read. Following this, we used the ipyrad pipeline to assemble RAD loci for each individual. For the parameter settings, we deviated from the default settings as follows: Assembly method: pairddrad, restriction overhang: AATT, GC, filter_adapters: 2. We then filtered the vcf file using vcftools ( 91 ) with the following arguments: --maf 0.01, --remove-indels, --max-alleles 2, --max-missing 0.5. We further retained only one random SNP per locus using the python script vcf_parser.py ( https://github.com/CoBiG2/RAD_Tools/blob/master/vcf_parser.py ). Pairwise kinship, i.e., consanguinity, was calculated using the R package HapDipKinship ( 64 ). We encoded male haploid genotypes as 0 (reference allele) or 1 (alternative allele). Any heterozygous genotype calls in haploids were treated as errors and set to missing (NA). Female diploid genotypes were encoded as 0 (homozygous reference), 1 (heterozygous), and 2 (homozygous alternative). Bioinformatics (population genetic data) For the population genetics, we randomly chose one female per group from each population, resulting in a sample size of 37 individuals, and ran the analysis for 20 different combinations of females. To infer the population structure, we performed a clustering analysis with ADMIXTURE ( 92 ), testing for different number of clusters/populations ( K ) ranging from 1 to 10. We determined the most suitable value for K by using ADMIXTURE’s cross-validation (CV) procedure, comparing the CV error values for each K . We further checked for population differentiation and inbreeding by calculating F ST and F IS values using the R packages adegenet ( 93 , 94 ) and hierfstat ( 95 ), respectively. Statistical analysis We performed all statistical analyzes using R version 4.2.2 (R Core Team, 2024). We used glmmTMB v1.1.10 ( 96 ) to run all Frequentist models and the DHARMa package v0.4.7 ( 97 ) with the simulateResiduals function to test and confirm the model assumptions. When we could not confirm Frequentist model assumptions we constructed Bayesian models using the brm function of the brms package, v.2.22.0 ( 98 – 100 ). For all models, we used the default priors provided by the brm function, i.e., flat or weakly informative priors for the intercept, fixed and random effects. We checked for convergence and autocorrelation using the R-hat values as well as assessed visually trace and autocorrelation plots. All R-hat values were at 1, autocorrelation plots showed rapid decay, and trace plots indicated stable patterns. There were divergent transitions for the following modes: model 33 (13 transitions), 35 (3 transitions), 37 (1 transition), 40 (2 transitions), 41 (1 transition), 42 (14 transitions). We checked model fits using pareto k diagnostics with the loo package 2.8.0 ( 101 – 103 ). Influential points (k > 0.7) were detected for model S3*(1count), 15 (1 count), 26 (2 counts), 29 (2 counts), 30 (2 counts), 31 (2 counts), 36 (2 counts), 37 (1 count), 38 (1 count), 39 (2 counts), S3 (1 count), S11 (1 count), S12 (2 counts), S13 (2 counts), S15 (1 count), S16 (1 count), S17 (2 counts). Model specifications of each model are listed in Table S8. We obtained beta coefficients and their standard errors from the model summary, and chi-squared values and p-values from the Anova function of the car package, v3.1-3 ( 104 ). We centered all numeric explanatory variables (i.e., predictors have a mean of zero) to improve interpretability of the results. For those models that included one of the kinship types and/or male individual traits (model 6, 8, S2, S3, S3*, 9, 9*, 10, 10*, 14, 15, S5, S6, 17, 17*, 18, 19, S8, S9, 21, 22, 23, S11, 25, 26, 27, 28, S12, S13, 29, 30, 31, S15, 33, 34, 35, 36, S16, S17, 37, 38, 39, 42, 43), we excluded the Kaavi population because of low sample size (N = 2 for female-male comparisons and N = 1 for male-male comparisons, N = 2 for individual-level traits). Sex ratio was calculated of groups that consisted of at least 10 larvae of known sex. We excluded 25 pairwise kinship estimates with large negative values ranging from -8 to -Inf. All data wrangling and visualizations were done with the tidyverse v2.2.0 ( 105 ) and ggpubr v0.6.0 package ( 106 ). We calculated the mean kinship of females and males to their group members as well as overall kinship of all group members as follows: K all : mean kinship among all group members K f_to_all : mean kinship of females to group members K m_to_all : mean kinship of males to group members K ff : mean kinship among females within a group K mm : mean kinship among males within a group K mm : mean kinship among females and males within a group p f : proportion of females within a group p m : proportion of males within a group We constructed separate models for each of these kinship types (i.e., mean kinship among all group members, mean kinship of females to other members, mean kinship of males to group members). As glmmTMB and brm are only able to make use of those lines that have data for all variables included in the model, using all 5 variables in the same model would have led to loss of the majority of sex ratio and group size data. Predation experiment with ants We constructed generalized linear mixed models with a binomial distribution and a logit link function. In the first model, we examined whether survival differs between groups with lower (20%) and higher (70%) proportions of depleted individuals. We used individual survival at the end of the experiment as the binary response variable and included the proportion of depleted individuals as a fixed factor. To account for variation between ant nests (e.g., in number of individuals, activity and behavior), we included Ant nest ID as a random factor. To account for potential effects of shared environment (i.e., larval group and/or location of larvae on the ant trail) on survival, we additionally included Group ID as random factor. In the second model, testing for individual benefits of contributing to the defense, we included an interaction term between depletion treatment and the proportion of depleted individuals as fixed factor. We also included Ant nest ID and Group ID as a random effect. The relative fitness v of depleted individuals for each group was calculated based on ( 63 ): where x 1 is the initial proportion of cheats (i.e., depleted individuals) within a group (0.7 in 70% treatment and 0.2 in 20% treatment) and x 2 is their final proportion (number of depleted individuals survived/group size at the end of the experiment). Groups were then divided into two categories based on the v -value: groups where v 1 (i.e., relative fitness of depleted individuals was equal or higher to non-depleted ones) belonged to category 1. One of the groups where only one individual survived was excluded from these analyses due to issues with “nullity” (i.e., not possible to divide values by zero). We used Fisher’s exact test to analyze if there is a significant association between the 20% and 70% treatment and relative fitness of cheats. Phenotypic and kinship data U-posture display within a group To test how displaying the U-posture in response to a simulated attack varies with the social environment, we used generalized linear mixed models. We modeled the response variable as binomial data. We constructed separate models for each kinship type (mean kinship among all group members, mean kinship of females to group members, mean kinship of males to group members) as well as group size and sex ratio to analyze how each of them impacts whether individual larvae display the U-posture. In all four models, we included Population ID as a random effect to account for variation among populations in the display of the U-posture. As our data was overdispersed, we used a beta-binomial distribution with a logit link function. Deployment of defensive fluid within a group To test how cooperative behavior (deploying the fluid) varies with the social environment, we used the same approach as when analyzing the U-posture with the difference that we used a binomial distribution as data was not overdispersed. Differences between sexes To analyze whether females and males differ in their defense behavior, we used Bayesian modelling. One model for the measure of fluid secreted or not, and one for the measure of the volume of fluid secreted. In both cases, we used sex as a fixed factor, and Group ID was nested under Population ID as a random factor to account for potential genetic and phenotypic variation among groups and populations in cooperativeness. For the binary data (fluid deployed or not), we used a binomial distribution with logit link function. For the volume data, we used a gamma distribution because of the strongly right skewed distribution of the response variable with a log link function. Because gamma distributions do not allow for zero values, two decimals more than the precision of the data (i.e., 0.001) was added to the values of the defensive fluid in all the analyses for the volume of defensive fluid (see also below). We included also those individuals that did not regurgitate any fluid in this analysis to take into account the whole extent of the observed variation. Individual defense and social environment We used Bayesian modelling to analyze whether the social environment of the larvae affects the defense behavior (deployment of fluid and its volume) when individually attacked. Due to the sex-biased defense behavior ( 36 ), we analyzed females and males separately. We constructed separate models for each kinship type (i.e., mean kinship among all group members, mean kinship of females to group members, mean kinship of males to group members) to test whether group size, sex ratio and kinship impacts the individual defense. In all 16 models, we included Population ID and Group ID as a random effect to account for potential differences among populations and groups. In the 8 models analyzing whether individuals secreted the fluid or not, we used a binomial distribution with a logit link function. In the other 8 models analyzing the amount of fluid that individuals regurgitated, we used a gamma distribution because of the strong right skewed distribution of the response variable with a log link function. To account for allometric effects, we additionally included larval length as a fixed factor. We included also those individuals that did not regurgitate any fluid in this analysis. Local variation of social environment and collective chemical defense behavior To analyze whether populations differ in cooperativeness and social environmental factors, we constructed 11 models, one for each trait: proportion of individuals deploying the fluid, proportion of individuals displaying the U-posture, individual defense (fluid deployed or not) of females, individual defense (fluid deployed or not) of males, individual defense (defensive fluid volume) of females, individual defense (defensive fluid volume) of males, group size, sex ratio, mean kinship among all group members, mean kinship of females to group members, mean kinship of males to group members. For traits that were measured on the individual level (i.e., fluid deployment of females and males, volume of fluid produced by females and males), Group ID was added to the models as a random effect. Larval length was additionally included when modelling the amount of defensive fluid deployed. For the binary data (deployed the fluid or not), we used a binomial distribution with a logit link function. Sex ratio, group size, and the kinship data were approximately normally distributed and we therefore modelled it with a gaussian distribution and identity link function. Secreted defense volume was strongly right skewed and contained zeros. We therefore used a tweedie distribution with a log link function. As we failed to confirm the model assumptions of model 9 (mean kinship among all group members) and model 10 (mean kinship of females to group members), we re-ran them results with a Bayesian approach which confirmed the results we received from the Frequentist approach. Correlations between traits To test correlations between the social characteristics of groups, we applied a Bayesian modelling approach. To test how group size changes with the sex ratio of the group, we used the proportion of males as the fixed factor and Population ID as a random factor, accounting for potential within-population similarities. To test how kinship is affected by group size and sex ratio, we constructed a model for each kinship type with Population ID as the random factor. We used a gaussian distribution with identity link function. Here, we used kinship estimates unweighted by sex ratio as we included sex ratio as a fixed factor. We therefore ran three separate models with female-female kinship, male-male kinship and female-male kinship. AUTHOR CONTRIBUTION STATEMENT CL conceived the ideas and CL, RR, RT, HH and SW designed methodology; RR and RT collected the data; RR, RT and SW conducted genetic and phenotypic analyses of the data; RR led the writing of the manuscript, with input from CL, HH, and SW. All authors contributed critically to the drafts and writing and gave final approval for publication. DATA AVAILABILITY STATEMENT All data sets and scripts used in these analyses are archived in the open access database Dryad ( https://doi.org/10.5061/dryad.ngf1vhj85 ). ACKNOWLEDGEMENTS This study was funded by the Research Council of Finland via the project no 330578 (CL) and 333482 (SW). We are grateful to Nina Immonen, Liina-Lyydia Jämsä, Venla Korhonen, and Jenni Sohlman for helping with the maintenance of lab population and collecting field data as well as local Forest Centers in Central Finland for providing information about the potential outbreak areas. Authors declare no conflict of interests. Funder Information Declared Research Council of Finland , 330578 , 333482 Footnotes Based on comments from reviewers, we clarified how our study provides support for both direct and indirect benefits and added an additional analysis calculating the relative fitness of depleted and non‑depleted individuals. Furthermore, we updated the kinship analyses by also taking into account the sex ratio of each group. https://doi.org/10.5061/dryad.ngf1vhj85 References 1. ↵ S. A. West , A. S. Griffin , A. Gardner , Evolutionary Explanations for Cooperation . Current Biology 17 , R661 – R672 ( 2007 ). OpenUrl CrossRef PubMed Web of Science 2. ↵ A. Duarte , et al. , Social immunity of the family: parental contributions to a public good modulated by brood size . Evol Ecol 30 , 123 – 135 ( 2016 ). OpenUrl PubMed 3. ↵ M. K. Abdi , D. Lupi , C. Jucker , I. C. W. Hardy , Kinship effects in quasi-social parasitoids I: co-foundress number and relatedness affect suppression of dangerous hosts . Biological Journal of the Linnean Society 130 , 627 – 641 ( 2020 ). OpenUrl 4. ↵ M. A. Brockhurst , A. Buckling , D. Racey , A. Gardner , Resource supply and the evolution of public-goods cooperation in bacteria . BMC Biol 6 , 20 ( 2008 ). 5. ↵ K. Drescher , C. D. Nadell , H. A. Stone , N. S. Wingreen , B. L. Bassler , Solutions to the Public Goods Dilemma in Bacterial Biofilms . Current Biology 24 , 50 – 55 ( 2014 ). OpenUrl CrossRef PubMed 6. ↵ R. E. Van Dijk , et al. , Cooperative investment in public goods is kin directed in communal nests of social birds . Ecology Letters 17 , 1141 – 1148 ( 2014 ). OpenUrl CrossRef PubMed 7. ↵ S. A. Frank , A general model of the public goods dilemma . J of Evolutionary Biology 23 , 1245 – 1250 ( 2010 ). OpenUrl 8. ↵ M. Ghoul , A. S. Griffin , S. A. West , Toward an evolutionary definition of cheating . Evolution 68 , 318 – 331 ( 2014 ). OpenUrl CrossRef PubMed 9. ↵ S. A. Levin , Public goods in relation to competition, cooperation, and spite . Proc. Natl. Acad. Sci. U.S.A. 111 , 10838 – 10845 ( 2014 ). OpenUrl Abstract / FREE Full Text 10. ↵ A. S. Griffin , S. A. West , A. Buckling , Cooperation and competition in pathogenic bacteria . Nature 430 , 1024 – 1027 ( 2004 ). OpenUrl CrossRef PubMed Web of Science 11. ↵ A. Ross-Gillespie , A. Gardner , S. A. West , A. S. Griffin , Frequency Dependence and Cooperation: Theory and a Test with Bacteria . The American Naturalist 170 , 331 – 342 ( 2007 ). OpenUrl CrossRef PubMed Web of Science 12. J. L. Sachs , U. G. Mueller , T. P. Wilcox , J. J. Bull , The Evolution of Cooperation . The Ǫuarterly Review of Biology 79 , 135 – 160 ( 2004 ). OpenUrl 13. M. A. Brockhurst , A. Buckling , A. Gardner , Cooperation peaks at intermediate disturbance . Current Biology 17 , 761 – 765 ( 2007 ). OpenUrl CrossRef PubMed Web of Science 14. L. Lehmann , L. Keller , The evolution of cooperation and altruism – a general framework and a classification of models . J Evolution Biol 19 , 1365 – 1376 ( 2006 ). OpenUrl 15. ↵ O. Leimar , P. Hammerstein , Cooperation for direct fitness benefits . Phil. Trans. R. Soc. B 365 , 2619 – 2626 ( 2010 ). OpenUrl CrossRef PubMed 16. ↵ W. D. Hamilton , The genetical evolution of social behaviour. I . Journal of Theoretical Biology 7 , 1 – 16 ( 1964 ). OpenUrl CrossRef PubMed Web of Science 17. ↵ W. D. Hamilton , The genetical evolution of social behaviour. II . Journal of Theoretical Biology 7 , 17 – 52 ( 1964 ). OpenUrl CrossRef PubMed Web of Science 18. ↵ S. P. Diggle , A. S. Griffin , G. S. Campbell , S. A. West , Cooperation and conflict in quorum-sensing bacterial populations . Nature 450 , 411 – 414 ( 2007 ). OpenUrl CrossRef PubMed Web of Science 19. ↵ A. Jousset , et al. , Predators promote defence of rhizosphere bacterial populations by selective feeding on non-toxic cheaters . The ISME Journal 3 , 666 – 674 ( 2009 ). OpenUrl PubMed 20. ↵ O. M. Gilbert , K. R. Foster , N. J. Mehdiabadi , J. E. Strassmann , D. C. Ǫueller , High relatedness maintains multicellular cooperation in a social amoeba by controlling cheater mutants . Proc. Natl. Acad. Sci. U.S.A. 104 , 8913 – 8917 ( 2007 ). OpenUrl Abstract / FREE Full Text 21. ↵ J. Field , E. Leadbeater , Cooperation between non-relatives in a primitively eusocial paper wasp , Polistes dominula. Phil. Trans. R. Soc. B 371 , 20150093 ( 2016 ). 22. P. Hammerstein , O. Leimar , Cooperating for direct fitness benefits . Journal of Evolutionary Biology 19 , 1400 – 1402 ( 2006 ). OpenUrl CrossRef PubMed Web of Science 23. N. Teunissen , S. A. Kingma , M. Fan , M. J. Roast , A. Peters , Context-dependent social benefits drive cooperative predator defense in a bird . Current Biology 31 , 4120 – 4126 ( 2021 ). OpenUrl PubMed 24. ↵ S. A. West , G. A. Cooper , M. B. Ghoul , A. S. Griffin , Ten recent insights for our understanding of cooperation . Nat Ecol Evol 5 , 419 – 430 ( 2021 ). OpenUrl PubMed 25. ↵ J. M. Biernaskie , S. A. West , Cooperation, clumping and the evolution of multicellularity . Proc. R. Soc. B . 282 , 20151075 ( 2015 ). 26. B. D. Connelly , E. L. Bruger , P. K. McKinley , C. M. Waters , Resource abundance and the critical transition to cooperation . J of Evolutionary Biology 30 , 750 – 761 ( 2017 ). OpenUrl 27. S. E. Kapsetaki , S. A. West , The costs and benefits of multicellular group formation in algae* . Evolution 73 , 1296 – 1308 ( 2019 ). OpenUrl CrossRef PubMed 28. ↵ D. J. Sexton , M. Schuster , Nutrient limitation determines the fitness of cheaters in bacterial siderophore cooperation . Nat Commun 8 , 230 ( 2017 ). 29. ↵ M. P. Speed , G. D. Ruxton , J. Mappes , T. N. Sherratt , Why are defensive toxins so variable? An evolutionary perspective. Biological Reviews 87 , 874 – 884 ( 2012 ). OpenUrl PubMed 30. ↵ D. Daly , A. D. Higginson , D. Chen , G. D. Ruxton , M. P. Speed , Density-dependent investment in costly anti-predator defences: an explanation for the weak survival benefit of group living: Density-dependent defence . Ecology Letters 15 , 576 – 583 ( 2012 ). OpenUrl CrossRef PubMed 31. ↵ A. D. Higginson , J. Delf , G. D. Ruxton , M. P. Speed , Growth and reproductive costs of larval defence in the aposematic lepidopteran Pieris brassicae: Costs of larval defence . Journal of Animal Ecology 80 , 384 – 392 ( 2011 ). OpenUrl PubMed 32. ↵ A. D. Higginson , G. D. Ruxton , Dynamic models allowing for flexibility in complex life histories accurately predict timing of metamorphosis and antipredator strategies of prey . Functional Ecology 23 , 1103 – 1113 ( 2009 ). OpenUrl 33. ↵ A. D. Higginson , G. D. Ruxton , Dynamic state-dependent modelling predicts optimal usage patterns of responsive defences . Oecologia 160 , 399 – 410 ( 2009 ). OpenUrl PubMed 34. M. Knapp , M. Řeřicha , D. Židlická , Physiological costs of chemical defence: repeated reflex bleeding weakens the immune system and postpones reproduction in a ladybird beetle . Sci Rep 10 , 9266 ( 2020 ). OpenUrl PubMed 35. ↵ C. Lindstedt , K. Suisto , J. Mappes , Appearance before performance? Nutritional constraints on life-history traits, but not warning signal expression in aposematic moths . J Anim Ecol 89 , 494 – 505 ( 2020 ). OpenUrl PubMed 36. ↵ C. Lindstedt , et al. , Ecological conditions alter cooperative behaviour and its costs in a chemically defended sawfly . Proc. R. Soc. B . 285 , 20180466 ( 2018 ). 37. ↵ R. S. Jones , M. P. Speed , J. Mappes , Parameterising a public good: how experiments on predation can be used to predict cheat frequencies . Evol Ecol 30 , 825 – 840 ( 2016 ). OpenUrl 38. ↵ L. Lindström , R. V. Alatalo , J. Mappes , Imperfect Batesian mimicry—the effects of the frequency and the distastefulness of the model . Proc. R. Soc. Lond. B 264 , 149 – 153 ( 1997 ). OpenUrl CrossRef PubMed Web of Science 39. ↵ M. Chouteau , M. Arias , M. Joron , Warning signals are under positive frequency-dependent selection in nature . Proc. Natl. Acad. Sci. U.S.A. 113 , 2164 – 2169 ( 2016 ). OpenUrl Abstract / FREE Full Text 40. ↵ R. Best , G. D. Ruxton , A. Gardner , Intragroup and intragenomic conflict over chemical defense against predators . Ecology and Evolution 8 , 3322 – 3329 ( 2018 ). OpenUrl 41. ↵ M. P. Speed , G. D. Ruxton , M. Broom , Automimicry and the evolution of discrete prey defences . Biological Journal of the Linnean Society 87 , 393 – 402 ( 2006 ). OpenUrl CrossRef Web of Science 42. ↵ F. Müller , Ituna and Thyridia: a remarkable case of mimicry in butterflies . Trans. Entomol. Soc. Lond 1879 , 20 – 29 ( 1879 ). OpenUrl 43. ↵ M. Riipi , R. V. Alatalo , L. Lindström , J. Mappes , Multiple benefits of gregariousness cover detectability costs in aposematic aggregations . Nature 413 , 512 – 514 ( 2001 ). OpenUrl CrossRef PubMed 44. ↵ B. Sillén-Tullberg , Do predators avoid groups of aposematic prey? An experimental test . Animal Behaviour 40 , 856 – 860 ( 1990 ). OpenUrl CrossRef Web of Science 45. ↵ R. V. Alatalo , J. Mappes , Tracking the evolution of warning signals . Nature 382 , 708 – 710 ( 1996 ). OpenUrl CrossRef Web of Science 46. ↵ J. Mappes , R. V. Alatalo , Effects of novelty and gregariousness in survival of aposematic prey . Behavioral Ecology 8 , 174 – 177 ( 1997 ). OpenUrl CrossRef Web of Science 47. ↵ J. Skelhorn , C. Rowe , Prey palatability influences predator learning and memory . Animal Behaviour 71 , 1111 – 1118 ( 2006 ). OpenUrl CrossRef Web of Science 48. ↵ R. S. Jones , S. Davis , M. P. Speed , Defence Cheats Can Degrade Protection of Chemically Defended Prey . Ethology 119 , 52 – 57 ( 2013 ). OpenUrl CrossRef 49. ↵ J. Mappes , J. Tuomi , R. V. Alatalo , Do palatable prey benefit from aposematic neighbors? Écoscience 6 , 159 – 162 ( 1999 ). OpenUrl 50. ↵ D. F. Howard , M. S. Blum , H. M. Fales , Defense in Thrips: Forbidding Fruitiness of a Lactone . Science 220 , 335 – 336 ( 1983 ). OpenUrl Abstract / FREE Full Text 51. ↵ W. Tostowaryk , The effect of prey defense on the functional response of podisus modestus (hemiptera: pentatomidae) to densities of the sawflies neodiprion swainei and n. Pratti banksianae (hymenoptera: neodiprionidae) . The Canadian Entomologist 104 , 61 – 69 ( 1972 ). OpenUrl 52. ↵ J. Skelhorn , C. Rowe , Predator avoidance learning of prey with secreted or stored defences and the evolution of insect defences . Animal Behaviour 72 , 827 – 834 ( 2006 ). OpenUrl CrossRef Web of Science 53. ↵ S. G. Codella , K. F. Raffa , “Defense Strategies of Folivorous Sawflies” in Sawffy Adaptations to Woody Plants , M. R. Wagner , K. F. Raffa , Eds. ( Academic Press , 1993), Pp. 261 – 294 , ( 1993 ). 54. R. A. Haack , W. J. Mattson , Life history patters among North American tree-feeding sawflies . In: Wagner , MR ; Raffa , KF , eds. Sawffy Adaptations to Woody Plants . Academic Press , San Diego, CA : 503-545 . 503 – 545 ( 1993 ). 55. ↵ C. Lindstedt , K. Koskenpato , S. Van Meyel , Gregarious, chemically defended pine sawflies as a new model to study cooperative interactions in an ecological context . Insect. Soc . 72 , 141 – 153 ( 2024 ). OpenUrl 56. ↵ T. Eisner , J. S. Johnessee , J. Carrel , L. B. Hendry , J. Meinwald , Defensive Use by an Insect of a Plant Resin . Science 184 , 996 – 999 ( 1974 ). OpenUrl Abstract / FREE Full Text 57. ↵ N. Prop , Protection against birds and parasites in some species of tenthredinid larvae . Arch. Neerl. Zool . 13 , 380 – 447 ( 1960 ). OpenUrl 58. ↵ S. G. Codella , K. F. Raffa , Individual and social components of wood ant response to conifer sawfly defence (Hymenoptera: Formicidae, Diprionidae) . Animal Behaviour 52 , 801 – 811 ( 1996 ). OpenUrl 59. ↵ C. Lindstedt , R. K. Bagley , S. Calhim , M. Jones , C. R. Linnen , The impact of life stage and pigment source on the evolution of novel warning signal traits . Evolution 76 , 554 – 572 ( 2022 ). OpenUrl PubMed 60. C. Lindstedt , H. Huttunen , M. Kakko , J. Mappes , Disengtangling the evolution of weak warning signals: high detection risk and low production costs of chemical defences in gregarious pine sawfly larvae . Evol Ecol 25 , 1029 – 1046 ( 2011 ). OpenUrl 61. ↵ J. Mappes , M. Varama , Effects of group size and pine defence chemicals on Diprionid sawfly survival against ant predation . Oecologia 150 , 519 – 526 ( 2006 ). OpenUrl CrossRef PubMed 62. ↵ A. Ross-Gillespie , A. Gardner , A. Buckling , S. A. West , A. S. Griffin , Density dependence and cooperation: theory and a test with bacteria . Evolution 63 , 2315 – 2325 ( 2009 ). OpenUrl CrossRef PubMed Web of Science 63. ↵ N. Jiricny , et al. , Fitness correlates with the extent of cheating in a bacterium . J of Evolutionary Biology 23 , 738 – 747 ( 2010 ). OpenUrl 64. ↵ Y.-W. Wang , C. Ané , KIMGENS: a novel method to estimate kinship in organisms with mixed haploid diploid genetic systems robust to population structure . Bioinformatics 38 , 3044 – 3050 ( 2022 ). OpenUrl PubMed 65. ↵ J. A. Endler , J. Mappes , Predator Mixes and the Conspicuousness of Aposematic Signals . The American Naturalist 163 , 532 – 547 ( 2004 ). OpenUrl CrossRef PubMed Web of Science 66. ↵ O. Nokelainen , J. Valkonen , C. Lindstedt , J. Mappes , Changes in predator community structure shifts the efficacy of two warning signals in A rctiid moths . Journal of Animal Ecology 83 , 598 – 605 ( 2014 ). OpenUrl PubMed 67. ↵ B. Rojas , J. Mappes , E. Burdfield-Steel , Multiple modalities in insect warning displays have additive effects against wild avian predators . Behav Ecol Sociobiol 73 , 37 ( 2019 ). 68. ↵ I. Medina , et al. , Global selection on insect antipredator coloration . Science 389 , 1336 – 1341 ( 2025 ). OpenUrl PubMed 69. ↵ D. Daly , A. Higginson , D. Chen , G. Ruxton , M. Speed , Density-dependent investment in costly anti-predator defences: an explanation for the weak survival benefit of group living . Ecology Letters 15 , 576 – 583 ( 2012 ). OpenUrl CrossRef PubMed 70. ↵ S. G. Codella , K. F. Raffa , Contributions of female oviposition patterns and larval behavior to group defense in conifer sawflies (hymenoptera: diprionidae) . Oecologia 103 , 24 – 33 ( 1995 ). OpenUrl CrossRef PubMed Web of Science 71. ↵ C. Björkman , S. Larsson , R. Bommarco , Oviposition Preferences in Pine Sawflies: A Trade-Off between Larval Growth and Defence against Natural Enemies . Oikos 79 , 45 ( 1997 ). OpenUrl CrossRef 72. ↵ H. H. Hattemer , W. R. Henson , F. Mergen , Some factors in the distribution of European pine sawfly egg clusters in an experimental plantation of hard pines . Theoret. Appl. Genetics 39 , 280 – 289 ( 1969 ). OpenUrl 73. ↵ S. Larsson , C. Björkman , R. Gref , Responses of Neodiprion sertifer (Hym., Diprionidae) larvae to variation in needle resin acid concentration in Scots pine . Oecologia 70 , 77 – 84 ( 1986 ). OpenUrl CrossRef PubMed Web of Science 74. ↵ A. Gupta , C. Lindstedt , N. Gerber , R. Ritter , H. Kokko , Sex-biased cooperation among immature peers: it matters who helps whom . Proc. R. Soc. B . ( 2025 ). 75. ↵ K. Matsuura , A novel hypothesis for the origin of the sexual division of labor in termites: which sex should be soldiers? Evol Ecol 20 , 565 – 574 ( 2006 ). OpenUrl 76. ↵ N. G. Davies , L. Ross , A. Gardner , The ecology of sex explains patterns of helping in arthropod societies . Ecol Lett 19 , 862 – 872 ( 2016 ). OpenUrl CrossRef PubMed 77. ↵ L. Ross , A. Gardner , N. Hardy , S. A. West , Ecology, Not the Genetics of Sex Determination, Determines Who Helps in Eusocial Populations . Current Biology 23 , 2383 – 2387 ( 2013 ). OpenUrl CrossRef PubMed 78. ↵ A. Gardner , L. Ross , Haplodiploidy, Sex-Ratio Adjustment, and Eusociality . The American Naturalist 181 , E60 – E67 ( 2013 ). OpenUrl CrossRef PubMed Web of Science 79. ↵ R. A. Fisher , The genetical theory of natural selection . ( Clarendon Press , 1930 ). 80. ↵ A. Gardner , The rarer-sex effect . Phil. Trans. R. Soc. B 378 , 20210500 ( 2023 ). OpenUrl CrossRef PubMed 81. ↵ H. C. Coppel , D. M. Benjamin , Bionomics of the Nearctic Pine-Feeding Diprionids . Annu. Rev. Entomol . 10 , 69 – 96 ( 1965 ). OpenUrl CrossRef Web of Science 82. ↵ T. P. Craig , S. Mopper , “Sex ratio variation in sawflies” in Sawffy Adaptations to Woody Plants , M. R. Wagner , K. F. Raffa , Eds. ( Academic Press ), Pp. 61 – 62 , ( 1993 ). 83. ↵ W. R. Henson , L. C. O’Neil , F. Mergen , Natural Variation in Susceptibility of Pinus to Neodiprion Sawflies as a Basis for the Development of a Breeding Scheme for Resistant Trees . Yale School of the Environment Bulletin Series 78 , 1 – 71 ( 1970 ). OpenUrl 84. ↵ L. J. Belcher , A. E. Dewar , M. Ghoul , S. A. West , Kin selection for cooperation in natural bacterial populations . Proc. Natl. Acad. Sci. U.S.A. 119 , e2119070119 ( 2022 ). OpenUrl Abstract / FREE Full Text 85. A. S. Griffin , S. A. West , Kin Discrimination and the Benefit of Helping in Cooperatively Breeding Vertebrates . Science 302 , 634 – 636 ( 2003 ). OpenUrl Abstract / FREE Full Text 86. ↵ T. Kay , L. Lehmann , L. Keller , Kin selection and altruism . Current Biology 29 , R438 – R442 ( 2019 ). OpenUrl PubMed 87. ↵ S. A. West , A. S. Griffin , A. Gardner , Social semantics: altruism, cooperation, mutualism, strong reciprocity and group selection . J Evolution Biol 20 , 415 – 432 ( 2007 ). OpenUrl 88. ↵ O. Leimar , M. Enquist , B. Sillen-Tullberg , Evolutionary Stability of Aposematic Coloration and Prey Unprofitability: A Theoretical Analysis . The American Naturalist 128 , 469 – 490 ( 1986 ). OpenUrl CrossRef Web of Science 89. ↵ T. da Silva Melo , G. F. de Carvalho-Souza , M. C. L. Peres , H. C. B. Ribeiro , M. A. Dias , The utilization of visible implant fluorescent elastomers in spiders (Araneae: Theraphosidae) . Revista ibérica de aracnología 23 , 99 – 101 ( 2013 ). OpenUrl 90. ↵ C. Moffatt , Using Visible Implant Elastomer to tag insects across life stages: a preliminary investigation with blow flies (Diptera: Calliphoridae) . Can Entomol 145 , 466 – 470 ( 2013 ). OpenUrl 91. ↵ P. Danecek , et al. , The variant call format and VCFtools . Bioinformatics 27 , 2156 – 2158 ( 2011 ). OpenUrl CrossRef PubMed Web of Science 92. ↵ D. H. Alexander , J. Novembre , K. Lange , Fast model-based estimation of ancestry in unrelated individuals . Genome Res . 19 , 1655 – 1664 ( 2009 ). OpenUrl Abstract / FREE Full Text 93. ↵ T. Jombart , adegenet: a R package for the multivariate analysis of genetic markers . Bioinformatics 24 , 1403 – 1405 ( 2008 ). OpenUrl CrossRef PubMed Web of Science 94. ↵ T. Jombart , I. Ahmed , adegenet 1.3-1: new tools for the analysis of genome-wide SNP data . Bioinformatics ( 2011 ). 95. ↵ J. Goudet , Hierfstat, a package for R to compute and test hierarchical F-statistics . Molecular ecology notes 5 , 184 – 186 ( 2005 ). OpenUrl CrossRef PubMed Web of Science 96. ↵ M. E. Brooks , et al. , glmmTMB Balances Speed and Flexibility Among Packages for Zero-inflated Generalized Linear Mixed Modeling . The R Journal 9 , 378 ( 2017 ). OpenUrl 97. ↵ F. Hartig , DHARMa: Residual Diagnostics for Hierarchical (Multi-Level / Mixed) Regression Models . R package version 0.4.7. ( 2024 ). doi: 10.32614/CRAN.package.DHARMa . Deposited 19 October 2024. OpenUrl CrossRef 98. ↵ P.-C. Bürkner , brms: An R Package for Bayesian Multilevel Models Using Stan . Journal of Statistical Software 80 , 1 – 28 ( 2017 ). OpenUrl 99. P.-C. Bürkner , Advanced Bayesian Multilevel Modeling with the R Package brms . The R Journal 10 , 395 – 411 ( 2018 ). OpenUrl 100. ↵ P.-C. Bürkner , Bayesian item response modeling in R with brms and Stan . Journal of statistical software 100 , 1 – 54 ( 2021 ). OpenUrl 101. ↵ A. Vehtari , et al. , loo: Efficient leave-one-out cross-validation and WAIC for Bayesian models . R package version 2.8.0 ( 2024 ). https://mc-stan.org/loo/ . Deposited 3 July 2024. 102. A. Vehtari , A. Gelman , J. Gabry , Practical Bayesian model evaluation using leave-one-out cross-validation and WAIC . Stat Comput 27 , 1413 – 1432 ( 2017 ). OpenUrl CrossRef 103. ↵ Y. Yao , A. Vehtari , D. Simpson , A. Gelman , Using Stacking to Average Bayesian Predictive Distributions (with Discussion) . Bayesian Anal . 13 , 997 – 1007 ( 2018 ). OpenUrl 104. ↵ J. Fox , S. Weisberg , An R companion to applied regression ( Sage publications , 2018 ). 105. ↵ H. Wickham , et al. , Welcome to the Tidyverse . JOSS 4 , 1686 ( 2019 ). OpenUrl CrossRef 106. ↵ A. Kassambara , ggpubr: ’ggplot2’ based publication ready plots . R package version 0.6.0 ( 2023 ). https://rpkgs.datanovia.com/ggpubr/ . Deposited 13 February 2023. View the discussion thread. Back to top Previous Next Posted February 19, 2026. Download PDF Supplementary Material Data/Code Email Thank you for your interest in spreading the word about bioRxiv. NOTE: Your email address is requested solely to identify you as the sender of this article. Your Email * Your Name * Send To * Enter multiple addresses on separate lines or separate them with commas. You are going to email the following Direct and indirect benefits of cooperation in collective defense against predation Message Subject (Your Name) has forwarded a page to you from bioRxiv Message Body (Your Name) thought you would like to see this page from the bioRxiv website. Your Personal Message CAPTCHA This question is for testing whether or not you are a human visitor and to prevent automated spam submissions. Share Direct and indirect benefits of cooperation in collective defense against predation Raphael Ritter , Heikki Helanterä , Riikka Tynkkynen , Saskia Wutke , Carita Lindstedt bioRxiv 2025.08.19.670848; doi: https://doi.org/10.1101/2025.08.19.670848 Share This Article: Copy Citation Tools Direct and indirect benefits of cooperation in collective defense against predation Raphael Ritter , Heikki Helanterä , Riikka Tynkkynen , Saskia Wutke , Carita Lindstedt bioRxiv 2025.08.19.670848; doi: https://doi.org/10.1101/2025.08.19.670848 Citation Manager Formats BibTeX Bookends EasyBib EndNote (tagged) EndNote 8 (xml) Medlars Mendeley Papers RefWorks Tagged Ref Manager RIS Zotero Tweet Widget Facebook Like Google Plus One Subject Area Evolutionary Biology Subject Areas All Articles Animal Behavior and Cognition (7636) Biochemistry (17703) Bioengineering (13897) Bioinformatics (41960) Biophysics (21458) Cancer Biology (18597) Cell Biology (25524) Clinical Trials (138) Developmental Biology (13381) Ecology (19905) Epidemiology (2067) Evolutionary Biology (24325) Genetics (15612) Genomics (22512) Immunology (17738) Microbiology (40421) Molecular Biology (17187) Neuroscience (88627) Paleontology (667) Pathology (2834) Pharmacology and Toxicology (4825) Physiology (7645) Plant Biology (15158) Scientific Communication and Education (2046) Synthetic Biology (4302) Systems Biology (9825) Zoology (2271)

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2025) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00