Ant nest architecture is shaped by local adaptation and plastic response to temperature

Social insects are among the most abundant arthropods in terrestrial ecosystems, where they provide ecosystem services. The effect of subterranean activity of ants on soil is well-studied, yet little is known about nest architecture due to the difficulty of observing belowground patterns. Furthermore, many species’ ranges span environmental gradients, and their nest architecture is likely shaped by the climatic and landscape features of their specific habitats. We investigated the effects of two temperature treatments on the shape and size of nests built by Formica podzolica ants collected from high and low elevations in the Colorado Rocky Mountains in a full factorial experiment. Ants nested in experimental chambers with soil surface temperatures matching the local temperatures of sample sites. We observed a plastic response of nest architecture to conditions experienced during excavation; workers experiencing a high temperature excavated deeper nests than those experiencing a cooler temperature. Further, we found evidence of local adaptation to temperature, with a significant interaction effect of natal elevation and temperature treatment on nest size and complexity. Specifically, workers from high elevation sites built larger nests with more tunnels when placed in the cool surface temperature treatment, and workers from low elevation sites exhibited the opposite pattern. Our results suggest that subterranean ant nest architecture is shaped by a combination of plastic and locally adapted building behaviors; we suggest that the flexibility of this ‘extended phenotype’ likely contributes to the widespread success of ants.

In addition to providing environmental stability, ant nest architecture shapes and, in turn, is shaped by collective behavior and therefore provides an opportunity to study individual-and colony-level behaviors in a shared, dynamic environment 8 . Physiology and individual-level behavioral variation can have colony-level effects reflected in nest architecture; for example, a building pheromone added by individual workers to the nest material has been shown to be a critical factor that controls the growth and form of nest architecture 19 . Similarly, in yellow meadow ant colonies, the angular distribution of tunnels is probably a result of local competition among workers 1 . Likewise, nest architecture can influence colony-level behavior; as harvester ant nest chamber connectivity and redundancy of connections among chambers increase, so does a colony's speed of recruitment to food 8 .
Most previous studies on subterranean nest architecture have been conducted in a single habitat, yet many ant species ranges span distinct habitats and climates, some of which are rapidly changing with climate and other anthropogenic disturbances 20 . Global warming has stimulated worldwide studies aiming to assess or predict the impact of rising environmental temperatures on organisms [21][22][23] . Many of these studies have focused on thermal tolerances of terrestrial ectotherms [24][25][26] because they represent the vast majority of terrestrial biodiversity 27 and are especially likely to be vulnerable to climate warming due to the strong influence of environmental temperature on their physiological and behavioral functions 28 . Social insects, including ants, provide a unique opportunity to study how behaviors could mitigate the impact of warming, as temperature affects the performance of both individuals and the colony as a whole. Since nest architecture affects and reflects the thermoregulation ability of a colony, it likely plays a vital role in the ability of these insects to respond to changing climate conditions.
Formica podzolica (Francoeur, 1973) is a montane ant with colonies ranging from 5000 to 100,000 workers. They construct conspicuous soil mound nests, which can exceed 2 m in diameter 29 . Nests occur in pine and aspen stands from Alaska to New Mexico, at altitudes up to approximately 3000 m, so this species is ideal for studying how local adaptation and extrinsic conditions shape nest architecture. Although no published descriptions of complete nests exist to our knowledge, alteration of nest architecture may be a key to these ants' survival in a wide range of environments. In this study, we investigate the extent to which the extended phenotype of nest architecture is either (i) plastic and varies with soil surface temperature or (ii) locally adapted to the population's native climate. Using custom-built nest boxes and temperature chambers, we carried out a laboratory transplant experiment with populations of F. podzolica from two different elevations separated by ~ 1000 m. We measured nest size (depth and area) and complexity (number of tunnels) daily during week-long trials.

Materials and methods
We compared nests excavated by F. podzolica workers (collected from a total of 60 mature colonies) from sites within two elevational ranges under two temperature treatments (Fig. 1 During each of three 1-week trials, we collected 100 workers directly from the nest entrance of each of 20 colonies (10 from low elevation sites and 10 from high elevation sites each time) using forceps. Overall, we collected 20 colonies per trial, for a total of 60 colonies. We sampled nests across all sites for each trial, and colonies were not re-sampled during the experiment. We housed the workers in 20 transparent nest boxes (45.72 × 50.8 × 13.81 cm) in a laboratory setting and allowed them one week to excavate nests. Boxes contained a mixture of soil in equal parts from each site that we sieved (0.635 cm), mixed thoroughly, and compacted at a constant rate across boxes. The wood boxes had glass walls and were kept dark with black fabric to mimic a subterranean habitat. Four temperature chambers (also constructed of wood) encapsulated five boxes each from the soil surface up, with the majority of each nest box extending below the chambers and in contact with the ambient air temperature of the room. This setup mimics the expected natural temperature gradient, with the soil surface warm during the day and the deeper parts of the nest cooler. Temperature chambers were heated via a thermal mass consisting of a concrete mortar mix surrounding radiant heating tubing connected to a temperature-controlling outlet. We monitored the soil temperature of one box per chamber per trial using iButton temperature sensors at the surface, halfway deep, and bottom of the boxes (Fig. S1).
We offered ants plain water and sugar water in cotton-plugged Olympus 1.7 ml Microtubes, placed at the soil surface inside each box. To test the effects of temperature on nest architecture, we applied a high-temperature treatment to 10 boxes (31.1 °C, the July high temperature averaged from 1981 to 2010 in Nederland, CO at ~ 2400 m; National Oceanic and Atmospheric Administration (NOAA) 2019) and a cooler temperature treatment to the other 10 boxes (19.4 °C, the July high temperature averaged from 1981 to 2010 in Ward, CO at ~ 2850 m; NOAA 2019). These temperature treatments were taken from NOAA Weather Observation Stations near our low-and high-elevation sites. The ambient air temperature in the room that contained the boxes was kept at 15.5 °C. We exposed half of the low-elevation colony fragments to the high-temperature treatment at the soil surface and the other half to the low-temperature treatment at the soil surface, with the same treatments for the high-elevation colony fragments. We replicated the experiment three times for a total of 60 colonies.
Every day throughout each trial, we took photographs of both sides of every box to measure the following attributes of nest architecture: nest depth, area of soil excavated (measured as the combined tunnel area from both sides of the nest box), and number of tunnels. We defined a tunnel as one branch of uninterrupted excavated soil between nodes, connection points between two or more tunnels. We imported digital photographs into ImageJ, calibrated a 0.0121 cm/pixel scale, and took measurements by tracing the length of each nest, counting the number of pixels making up the tunnels in the photographs (using the high contrast area measurement tool),  30 . Nests varied greatly in their shape, ranging from one simple tunnel to complex networks of tunnels (Fig. 2). Nine colony fragments did not excavate nests during the experiment; these were spread out across the four different treatments and excluded from all analyses (Table S2).
To determine if the natal environment and temperature treatment influenced nest size and complexity, we compared nests excavated by colony fragments from two natal elevations. In our analysis we used two types of models. First, we used two-way analysis of variance (ANOVA) models with a random effect (R v. 5.3.5, package stats 31 ) to compare the nest architecture metrics between high-and low-elevation colony fragments tested in high and low temperatures after one week of building. Nest depth, area of soil excavated, and number of tunnels at the end of each one-week trial represented our response variables, colony natal elevation (low or high), temperature treatment, and their interaction were fixed effects, and colony collection site was a random effect. We confirmed the homogeneity of variance using a Levene's test from the car package 32 .
Second and in complement we used a repeated-measures ANOVA (stats package) to compare nest architecture measurements across all seven days of observation to assess whether excavation progressed at the same rate between treatments. We removed observations with a value of 0 (some colony fragments took a day or two to begin excavation). Nest depth, area of soil excavated, and number of tunnels on each day represented our response variables, colony natal elevation, temperature treatment, day, and their interaction were fixed effects, and colony collection site was a random effect. To determine at what day nest depth began to differ between temperature treatments, we compared estimated marginal means of depth per temperature treatment between each day (emmeans package) with a Bonferroni correction for multiple comparisons.

Results
Over the seven days of observation, groups of 100 workers produced nests ranging from 4.7 to 23.3 cm in total depth. Nest depth differed significantly between temperature treatments (Table 1, Fig. 3a). The nests excavated by workers experiencing the warmer soil surface temperature treatment (31.1 °C) were, on average, 1.5 times deeper (15.5 cm, s.e. 0.5) than those produced by workers experiencing the cooler temperature treatment (19.4 °C, 10.4 cm, s.e. 0.91).
The area of the soil excavated ranged between 2.6 and 74.6 cm 2 and did not differ significantly among temperature treatments or natal elevation (Table 1; Fig. 3b). However, there was a significant interaction effect between temperature treatment and natal elevation (Table 1). Workers from low elevations excavated tunnels with 2.1 times more area (33.7 cm 2 , s.e. 5.3) than those from high elevations (15.9 cm 2 , s.e. 2.2) while experiencing the warm temperature treatment. Conversely, workers from high elevations excavated tunnels with 1.5 times more Figure 1. Overview of experimental design. We collected 100 workers from each of 20 colonies per trial (10 from higher elevation sites and 10 from lower elevation sites). We allowed colonies to excavate nests in boxes attached to temperature chambers at the soil surface level. There were four chambers, each containing five nest boxes and a mixture of low-and high-elevation colonies. We repeated this experiment three times during one summer to obtain a total sample of 60 colonies. Created with BioRender.com.  Fig. 3c). However, there was a significant interaction effect (Table 1). On average, nests built by workers from low elevations had 3.1 times more tunnels (12.8 tunnels, s.e. 3.1) than those produced by workers from high elevations while experiencing the warm temperature treatment (4.2 tunnels, s.e. 1.0). Conversely, nests built by workers from high elevations had, on average, 1.3 times more tunnels (11 tunnels, s.e. 3.1) than those built by workers from low elevations while experiencing the cool temperature treatment (8.7 tunnels, s.e. 1.9). These results provide further evidence that colonies' response to soil surface air temperature is dependent on their natal environments. There was no standard branching pattern across treatments and depths; instead, tunnel arrangements and individual tunnel length and angle appeared highly variable across colonies.

Scientific
Excavation did not progress at the same rate across all seven days of the experiment (Fig. 4). The ants almost universally followed a pattern of making much progress on nest depth at the beginning of the experiment and then decreasing the rate of depth change as they excavated with each subsequent day (Table S1). Conversely, nest  www.nature.com/scientificreports/ area and number of tunnels increased relatively steadily throughout the experiment, although at different rates depending on the colony's native elevation and temperature treatment. The repeated measures ANOVA revealed that, for nest depth, the interaction of day and temperature is significant, indicating that nests are getting deeper over time but at different rates depending on temperature treatment ( Table 2). Both nest area and the number of tunnels increased over time, but the rate did not differ significantly depending on natal elevation or treatment. Nest depth began to significantly differ between temperature treatments on Day 4, and this continued through Day 7 (Table 3).

Discussion
In this study, we observed both a plastic response of nest architecture to conditions experienced during nest construction and evidence of local adaptation to differing conditions in F. podzolica. Overall, workers experiencing a high soil surface temperature excavated deeper nests than those experiencing a cooler surface temperature. Neither natal elevation nor temperature treatment alone had a significant effect on the area of soil excavated or the number of tunnels. However, groups collected from lower elevation built larger nests with more tunnels when experiencing warm surface temperatures, while those collected from higher elevation built larger nests with more tunnels when experiencing cool surface temperatures, suggesting that they perform best in conditions more closely matching their natal habitat. www.nature.com/scientificreports/ These results add to a growing collection of evidence that abiotic factors such as weather, soil temperature, moisture 33 , and the presence of planes between layers of sediment (ants may excavate horizontal tunnels along such planes) 1 affect nest structure, an aspect of the extended phenotype of the colony that continually changes as the colony grows. Ant species ranges can span large elevational and latitudinal gradients, and many species are perennial. Owing to the landscape-scale climatic differences across a species' range, nests built in different localities may differ markedly in form. Although there is evidence of a correlation between soil surface temperature and ambient temperature, respiration, and metabolic rates, further study is needed to determine why soil surface temperature influences nest-building behaviors in F. podzolica [34][35][36] . However, one possibility is that nest depth is a response based on the colony's thermoregulatory needs. Inhabiting deeper nests may allow for the avoidance of higher temperatures at the surface 37 . This explanation aligns with our observation that the rate of nest depth www.nature.com/scientificreports/ excavation decreased over the week of the experiment. Ants appeared to eventually settle on a suitable nest depth and focus on excavating larger and more complex nests. Colony fragments experiencing the cool temperature treatment reached this equilibrium faster (around Day 4) than those experiencing the warm temperature treatment, which did not appear to reach an equilibrium. Reducing exposure to surface temperatures by excavating a deeper nest could increase colony longevity because brood development may be optimized at species-specific temperature preferences 38,39 , although the ideal temperature for brood development remains unknown for F. podzolica 37 . Conversely, for colonies in cool habitats, building shallow nests may increase the temperature inside the nest chambers toward the species optimum. Other variables such as soil moisture are also expected to influence the determination of nest depth. Nest depth in the leaf-cutter ant Acromyrmex landolti, as an example, has been shown to be negatively correlated with soil moisture 40 , and colonies are known to move fungus gardens vertically through the soil profile in search of more optimal soil moisture. However, soil temperature (both surface and subterranean) generally seems to be a more powerful predictor of nesting habits. For instance, Acromyrmex crassispinus colonies build deep subterranean nests in the hot soils of Paraguay, yet superficial ones in the colder thermic soils of central Argentina and southern Brazil 37,41 , although both regions present the same soil moisture regime. We are confident that soil moisture was not a factor driving our results because we standardized it in our experiment. Plasticity in nesting habits based on temperature-sensitive digging may have contributed to the colonization of different habitats worldwide 42 . The ability of ants to access different microclimates within the full vertical topsoil profile would reduce the constraints of unfavorable soil-surface conditions. Additionally, innovations in building behavior that give rise to the invasion of new habitats might subsequently facilitate adaptive radiation 42 .
The significant interaction effect of natal elevation and temperature treatment on nest size (area of soil excavated) and complexity (number of tunnels) suggests a level of local adaptation in this extended phenotypic trait. In other words, the elevation that workers originated from did not predict the size or complexity of their resulting nest, but ants excavated larger and more complex nests under conditions that were similar to their native habitat. While workers from high elevations created larger (greater area) and more complex (more tunnels) nests under the cooler temperature treatment, workers from low elevations created larger and more complex nests under the warmer temperature treatment. This result suggests that metabolic rate may be a locally adapted trait in F. podzolica that influences their elevational distribution. The metabolic cold adaptation hypothesis posits that cold environments (e.g. high elevations and latitudes) select for high metabolic rates, even after controlling for body size differences, and that this enables high activity levels when an organism is near its lower thermal limits 43 . Although we did not expose the ants in our experiment to temperatures near their thermal limits, a www.nature.com/scientificreports/ locally adapted metabolic rate may still be at play here, leading to higher excavation performance in temperatures more closely matching their original habitat.
Our results suggest that we need to consider extended phenotypes to predict how some ectothermic species respond to climate change. Organisms may be able to behaviorally modulate their exposure to extreme temperatures by creating appropriate thermal microenvironments. We hypothesize that F. podzolica workers produce nest architecture that helps them to buffer against thermal extremes. The apparent plasticity of nest depth raises intriguing questions about the extent to which colony life may relax selection on worker-level metabolic traits related to climate variability. Workers' thermal performance traits shape ant ecology and distributions at local [44][45][46] and biogeographic scales 25,47,48 . However, colony-level performance is also governed by a capacity for thermoregulation 49 since colonies can use nest architecture to thermally manipulate larval development rates 50 and shift colony growth rates 51 .
Behavioral plasticity may help some species mitigate the adverse impacts of climate change and thus should be an essential predictor of an organism's climate warming vulnerability and extinction risk 52 . At a small spatial scale, elevation is the dominant factor affecting differences in mean annual surface air temperature. We expect that this altitudinal variability in climatic conditions selects for more plastic phenotypes than less climatically variable environments (such as tropical regions at lower latitudes and altitudes) 53 . In this sense, species inhabiting large altitudinal and latitudinal gradients, like F. podzolica, should be excellent models for future studies on the plasticity for behavioral thermoregulation under different climate change scenarios. Further, our findings suggest that nest architecture may be a plastic extended phenotypic trait in other ant species.

Conclusions
Subterranean-nesting ants contribute to critical ecosystem services by building nests. These nests serve numerous essential functions for the colonies living within and alter soil ecosystems through aeration and the addition of nutrients. In this study, we used a laboratory approach to analyze how natal elevation and surface air temperature influence variation in nest architecture. Worker groups experiencing a warmer temperature produced deeper nests irrespective of their natal population, demonstrating that nest architecture can be a plastic response to the environment. Ants originally from high elevations excavated larger and more complex nests in a cooler temperature, while ants originally from low elevations excavated larger and more complex nests in a warmer temperature. This result suggests a level of local adaptation at play in nest architectural outcomes. Our findings suggest that a combination of plasticity and local adaptation of nest architecture contribute to the widespread intraspecific geographic success of F. podzolica and likely other ant species.

Data availability
Data available in the supplementary information (Sankovitz & Purcell 2021).