Anti-predator behavior in two brown frogs: differences in the mean behaviors and in the structure of animal personality variation

Predation is a major source of selection and prey are known to modify their behavior depending on their past experiences and the current perceived risk. Within a species, variation in experience and in the response to perceived risk combine to explain variation in personality and individual plasticity. Between species, variation in personality and plasticity might also be the evolutionary consequence of different selective regimes. In this study, we describe the anti-predator behavior of two closely related brown frogs, Rana dalmatina and Rana latastei, and compare their structures of personality variation. We raised tadpoles in a common garden experiment with either fish, dragonfly larvae, or no predators. Tadpoles were then repeatedly tested in the presence of the three acute stimuli and their behavioral variation was described in terms of quantity and quality of movements and of path sinuosity. In these tests, tadpoles of both species and ontogenetic treatments responded flexibly to predators by moving less, faster, and with more tortuous movements, and tadpoles raised with predators tended to move even faster. Independent of the acute treatment, R. dalmatina moved more and faster than R. latastei and the differences were larger without than with predators, demonstrating its higher plasticity. At the individual level, the two species showed qualitatively similar but quantitatively different structures of personality variation. R. dalmatina, more active, faster, and more plastic than R. latastei, showed also higher repeatability and a larger behavioral variation both among and within individuals. Predators are a major source of selection and preys have evolved the ability to flexibly respond to them. These responses often vary among species, because of their different evolutionary histories, and among individuals, because of their different experiences. We analyzed both these sources of behavioral variation in two closely related brown frogs, Rana dalmatina and R. latastei. We raised tadpoles either with or without predators and tested them in open field trials both with and without predators. The effects of the raising environment were similar in the two species, whereas the effects of the testing arena differed. Both species decreased activity and increased speed and sinuosity with predators, but R. dalmatina moved always more and faster than R. latastei and it showed higher plasticity, larger variation among and within individuals, and relatively higher values in repeatability.


Introduction
Behaviors are labile phenotypic traits that individuals can flexibly vary, often over short temporal scales. Historically, in the attempt to unravel the causes of behavioral evolution, behavioral ecologists have focused on individual means, considering among-individual variation as the raw material for natural selection, and within-individual variation as a noising factor to be controlled either experimentally or statistically (Wilson 1998). In the last two decades, however, behavioral ecology has been witnessing a shift, with an explosion of studies that take directly in account within-individual variation (Stamps and Groothuis 2010;Wolf and Weissing 2012). These studies measure the behaviors of several individuals, multiple times under different environmental conditions, and, with statistical methods derived from quantitative genetics (Roff 1997;Brommer 2013), they decompose the total behavioral variation in its three main components: variation among individuals ( V I ), variation among environments ( V E ), and variation due to the interaction between individuals and environments ( V I×E ). The first component is called "animal personality" (Réale et al. 2007;Dingemanse et al. 2010) and is mathematically defined in terms of repeatability (Nakagawa and Schielzeth 2010). The second and third components describe individual plasticity (or "contextual plasticity," Stamps 2016), considering, respectively, variation in the average behavior of an individual in different contexts (i.e., "individual plasticity" sensu stricto), and among-individual variation in their plastic response (Dingemanse and Dochtermann 2013;Stamps 2016;Houslay et al. 2018).
All three components of behavioral variation are important to understand the ecology and the evolution of a species (Roche et al. 2016). From the one hand, plasticity allows individuals to respond to changes in the external conditions on short timescales and it may influence the ecological success of a species (Réale et al. 2007Wolf and Weissing 2012). From the other hand, variation in personality and in individual plasticity influences the strength of selection and the evolution of a species (Réale et al. 2007Wolf and Weissing 2012). In this case, however, the effects depend on the heritability of flexible behavior, because genetically identical individuals might develop a different personality and a different plasticity if they have experienced different environments (Urszan et al. 2018;. For example, in many anurans, tadpoles' feeding activity tends to decrease in the presence of predators (Relyea 2001;Van Buskirk 2001;, although this does not necessarily result in a decrease in the amount of food ingested (Steiner 2007). This flexible response is adaptive, because, as predation risk increases, the costs of moving may increase much more than its benefits (Van Buskirk and McCollum 2000); and it is largely innate, because the decrease in activity is shown to be independent of tadpoles' experiences with predators. The response to predators, however, is not fully immune to experience. In the Italian tree frog, Hyla intermedia, for example, tadpoles raised with predators were always less active (shier) and less plastic than their siblings raised without predators, providing evidence for environmental effects on the development of tadpole personality ). In the wood frog, Lithobates sylvaticus, tadpoles raised with predators were able to learn new predator cues more effectively and retain their memory for longer than their conspecifics raised free of predators (Ferrari 2014).
If variation in personality and individual plasticity affected the adaptive evolution of a species, then differences in personality and plasticity between closely related species might provide important insights into their adaptive meaning. This comparative approach has been rarely adopted in studies of animal personality (Michelangeli et al. 2020;White et al. 2020) and most comparative studies on behavioral plasticity were conducted at the individual-mean level. For example, in a seminal work on predator-induced behavioral plasticity in tadpoles of two North-American frogs, Relyea (2000) showed that, in both species, the proportion of active tadpoles decreased with predators and that the decrease differed between species. In this way, he provided convincing evidence for adaptive plasticity within species and for adaptive differences in plasticity between species. However, since this study described plasticity at the population level only, it could not explain whether these differences arose as the effect of variation in either personality, plasticity, or both.
In this paper, we compare, from an individual perspective, the anti-predator behavior of tadpoles of two closely related brown frogs, Rana dalmatina and Rana latastei. Several aspects of the ecology and the evolutionary history of these species make them a suitable model for this type of studies. R. dalmatina and R. latastei are sister species (Veith et al. 2003;Yuan et al. 2016). They show low genetic variation, which suggests that they survived the Pleistocene glaciations in single refugia in southern Europe (Ficetola et al. 2007;Vences et al. 2013). Post-Pleistocene expansions, however, has had markedly different effects on the two species. Despite their similar ecology, R. dalmatina has succeeded in colonizing the low-plain territories of much of Central and Western Europe, whereas R. latastei has survived only in a restricted area in Northern Italy (Sillero et al. 2014). In a previous study (Castellano et al. 2022), we provided evidence that these differences in the distribution range might explain differences in the plastic behavioral response to heterospecific presence or cues. In fact, R. latastei, which is sympatric to R. dalmatina in most of its range, sensibly increased activity in the presence of the other species, whereas R. dalmatina, which is sympatric to R. latastei only in the periphery of its range, did not. We suggested as a plausible explanation the source-sink hypothesis (Kirkpatrick and Barton 1997;Galipaud and Kokko 2020), according to which local adaptations in the periphery is prevented by gene flow from central regions of the species' range. In both species, we found evidence for animal personality, but no evidence that the plastic responses differed among individuals (i.e., no evidence for a significant V I×E ). Indeed, we found a good correspondence between the patterns of behavioral variation at the individual and species levels.
In the present study, we continue this line of research and show results of an experiment on anti-predator behavior, in which tadpoles of the two species have been raised either with or without predators (fish or dragonfly larvae) and repeatedly tested in open-field trials in the presence of a fish lure, a caged dragonfly larva, or an empty cage. We analyze their behavior at both the species and the individual levels. At the species level, we look for differences that are either consistent or variable across time and contexts (type of predators). At the individual level, we analyze how predators affect tadpoles' personality and individual plasticity. Specifically, we ask four main questions and make the following predictions: (i) How do tadpoles flexibly change their behavior with predators? Our adaptive hypothesis predicts tadpoles to plastically adjust their behavior to reduce predation risk. (ii) Do these changes depend on experience, that is, on the environment where tadpoles are raised? Our hypothesis predicts tadpoles raised with predators to behave more cautiously than those raised without predators, independent of the context. (iii) Do these changes differ between species? As mentioned above, our previous experiment showed that R. latastei did respond plastically to the presence of heterospecific competitors, whereas R. dalmatina did not. If we observe a similar pattern in response to predators then we should conclude that R. dalmatina is less plastic than R. latastei, in general, and not only in response to R. latastei tadpoles. This result would weaken the source-sink hypothesis and support alternative explanations, such as the "pace-of-life" hypothesis (Castellano et al. 2022). In contrast, we predict that the antipredator plastic responses of the two species do not differ or, if they do, that R. dalmatina responds more plastically than R. latastei. (iv) Since behavioral differences between species ultimately depend on differences among individuals, are there differences in the structure of animal personality? If the two species show different developmental plasticities (see question ii), then we predict a large variation in personality and/or in individual plasticity in the more plastic species. However, we acknowledge that the raising environment is just one of many factors responsible for behavioral variation and thus, we consider this question largely explorative.

Materials and methods
On March 2, 2021, we collected eight freshly laid clutches (Gosner stages 1-3) in two breeding sites located in Special Areas of Conservation of the Po-river basin, in Northwestern Italy: Four clutches were of R. dalmatina and were collected in the site "Po morto di Carignano" (IT1110025 SAC). The other four were of R. latastei and were collected in the site "Confluenza Po-Varaita" (IT1160013 SAC). The clutches were transported to our field research station and placed outdoor, in separate 60-l tanks until hatching. Ten days after all clutches have hatched, on April 2, 2021, from each clutch, we haphazardly collected with a dip net 30 tadpoles and placed them, in group of 10, into plastic tanks ( 40 × 34 × 17 cm) in about 12 l of water. The 24 tanks were placed, in groups of four (two of R. dalmatina and two of R. latastei), into 6 fiberglass troughs (217 × 40 × 15 cm) (Lamar, Udine s.r.l.). All troughs were in a lawn under a shelter of 50% knitted shade cloth material, to avoid full-sun exposition.
To allow homogeneous water flow through the containers within a trough, we cut two windows (25 × 10 cm) into the large sides of the containers and sealed them with 1-mm plastic mesh. The 6 troughs were arranged in two blocks and each trough within a block replicated one of three ontogenetic treatments. One trough contained four dragonfly larvae (genus Aeshna); one contained two young specimens of the common rutt (Scardinius erythrophthalmus); and one was used as control. Each dragonfly larva was kept into a perforated plastic cage (base diameter = 15 cm), placed in the trough outside the containers but close to their windows, so that tadpoles could sense the predator presence. Dragonfly larvae were fed twice a week with small tadpoles, to produce digestionreleased alarm cues (Hettyey et al. 2015;. In the fish treatment, predators were free to swim within the trough, but without physical contact with tadpoles. Since in this treatment, predators were not fed with tadpoles, but with dried chironomids, we exposed tadpoles of this treatment to artificial alarm cues. Previously euthanized tadpoles were placed in a mortar and their body grinded to a paste, which was suspended in water. Small (0.5 cm 3 ) pieces of synthetic sponge, soaked with this suspension, were placed in the tadpole tanks and replaced twice a week. On April 28, when tadpoles reached Gosner stages 26-27, from each tank, we haphazardly chose four tadpoles, which were transferred into separate, smaller containers ( 33.5 × 19 × 12 cm) in 5.5 l of water, and raised individually to keep track of their identity. The 96 containers were arranged into four blocks, each with three troughs, one used as a control and two assigned to the predator treatments, as described above; and each container within a trough hosted a single tadpole of one of the eight families. To allow homogeneous water flow, the containers were provided with two windows ( 25 × 10 cm) cut into their larger side and sealed with 1-mm plastic mesh. All tadpoles were fed fish vegetable flakes ad libitum until the end of the experiment, when they were returned to their native ponds.
On May 4, we started the video-recording trials, which terminated on May 15, for a total of 9 daily recording sessions. In a daily session, we carried out six trials, and in a trial we simultaneously recorded the activity of 16 tadpoles, so that all 96 tadpoles were tested once in a daily session. We used 16 arena tanks ( 60 × 40 × 15 cm), half filled with well water. Eighty centimeters above each tank, we placed a Raspberry 3 single board B3 + computer with a Raspberry Pi v2.1 8 MP camera. The Raspberries were connected via internet to a laptop computer, which used a custom-designed software written in Python 3 (https:// github. com/ olivi erfri ard/ raspb erry_ video-recor ding_ coord inator) to control for the recording activity of the 16 cameras. Tadpoles were tested under three acute treatments: (i) the empty-cage treatment (C, control treatment); (ii) the caged-dragonfly treatment (D acute treatment), and (iii) the caged-fish treatment (F acute treatment). In the predator acute treatments, tadpoles were exposed to three types of cues. The predator chemical cues were obtained by letting predators free to move inside the experimental tanks during the night before the recording session. The visual cues are known to play a role in tadpoles' anti-predator response (Hettyey et al. 2012) and were obtained by placing either a living dragonfly larva or a fish lure (i.e., a realistic ribbon perched lure used for fishing trout) inside the cage into the experimental arenas. The conspecific alarm cues were released by a small piece of synthetic sponge soaked with a suspension of smashed conspecifics (see above) placed inside the predator's cage. In both predator treatments, tadpoles were not exposed to digestion-derived cues but only to conspecific alarm cues. Water was not changed during a daily session.
In a recording trial, tadpoles were first let to acclimatize inside a plastic cage for about 5 min; then the cage was lifted and tadpoles were free to move. Recordings were carried out at a 1280 × 720 resolution and a 10-Hz frame rate and lasted for 40 min. The recording sessions were divided into three rounds. In the first round, at day 1, all 96 tadpoles were recorded in the C control acute treatment; at day 2, 48 tadpoles were recorded in the dragonfly acute treatment (D) and 48 in the fish acute treatment (F); at day 3, those previously tested in D were tested in F and vice versa. The same procedure was followed in the second and third rounds.
We analyzed the recorded videos with the semi-automatic tracking software DORIS v.0.0.19 (https:// github.com/ olivierfriard/DORIS), an open-source program in Python, which uses the OpenCV library for image processing and a user-friendly graphical interface (GUI) to set the input parameters of the analysis. To minimize observer bias, blinded methods were adopted during video analyses.
The DORIS program saves, for each video, a table with frame-by-frame Cartesian coordinates of the tracked objects. From the entire set of coordinates, we computed two new variables: the inter-frame speed, which is the Euclidean distance between the tadpole positions in frames f and frame f + 1, multiplied by the video frame rate; and the activity state, a binary variable that scores "1" ("moving state") if the inter-frame speed is greater than or equal to 2 cm/s and "0" ("resting state") otherwise. We used this binary variable to compute movement-bout durations. In this case, we considered a bout of movement only when the tadpole was in a moving state in at least five consecutive frames (i.e., we considered only bouts longer than 0.5 s). From these variables, we derived the eight descriptors of tadpole activity. The first three descriptors were computed on the entire sample of frames and were (i) the mean speed (mSPEED), (ii) its standard deviation (sdSPEED), and (iii) the activity index (IND), defined as the proportion of frames with tadpoles in a "moving state." The remaining five descriptors were computed on the subsample of frames that described the bouts of movements and included (iv) the number of bouts (nBOUTS), (v) their mean duration (mD_BOUT), (vi) the mean speed within a bout (mS_BOUT), (vii) the mean acceleration (mA_BOUT), and (viii) the mean change in direction (MCD_BOUT). To calculate MCD_BOUT, for each frame (with coordinates x and y), we first computed the angular direction as where i indicates the bout and f the frame within that bout. We then computed the absolute values of the differences in direction between successive frames and defined SINUOS-ITY as the mean of these differences.
where B is the total number of bouts and N i is the total number of frames within the bout i.

Statistical analyses
We used Pearson's bivariate correlation analyses to describe the pattern of associations between the eight descriptors of tadpole movements, separately in R. dalmatina and in R. latastei. Since the parameters were often highly inter-correlated, we performed a principal component analysis on the sample that included both species and used the first three components as the dependent behavioral variables in successive analyses. We carried out two series of general linear mixed effect models (Castellano et al. , 2022. In the first, we wanted to investigate the effects of the species and of both the acute and the ontogenetic treatments (first three questions, see the "Introduction" section). We thus used, as fixed factors, the predictors responsible for both inter-individual variation (the species identity and the ontogenetic treatment) and intraindividual variation (the acute treatment and trial order), whereas we included, in the random part of these models, the tadpole identity, the family, and the troughs (to account for uncontrolled differences between the experimental units). Because the "family" factor had too few replicates within species (N = 4), its effects could have not been accurately assessed for each species and/or treatment. We thus introduced this factor in the models to statistically control for it, rather than to accurately estimate its effects. In these analyses, we run the full models with all the two-and three-way interactions. Successively, we run the reduced model with all the fixed and random factors, but with only the statistically significant interactions. Visual inspection of the residuals from all models was conformed to the assumption of residual normality.
The second series of analyses was planned to answer to our fourth question (see the "Introduction" section), which focused on the structure of animal personality. To this purpose, for each behavioral variable, we performed two multivariate mixed models, separately for the two species. By adopting the trial order as a pairing criterion, we split each behavioral variable in three (one for each acute treatment) and used the resulting matrix as the set of dependent variables (Houslay et al. 2018). These models used trial order as a covariate and tadpole identity as a random factor. The ontogenetic treatment and the family factors were excluded, because of their potential effects on among-individual variation and, thus, on personality. In this second series of tests, we adopted a "character state" approach (Houslay et al. 2018), because the three acute treatments could not have been a priori aligned along an ordinal axis (Castellano et al. 2022). From these models, we measured among-individual variances and all cross-treatment correlations. Variances were used to compute behavioral repeatability, as a proxy of animal personality (Nakagawa and Schielzeth 2010). Correlations were used to test for variation in behavioral plasticity ( I × E ). Under the "character-state" approach, the null hypothesis of no variation in individual plasticity is rejected if across-treatment correlations are statistically lower than 1 and/or among-individual variances are statistically different between treatments (Mitchell and Houslay 2021).
To test for between-species differences in the amount and structure of variance, we adopted three approaches. First, for each behavioral trait and statistical parameter, we compared the posterior distributions in the two species and rejected the null hypothesis of no differences if their credible intervals (95% CI, see below) did not overlap. We adopted this over-conservative criterion to minimize the risk of a type I error, which was inevitably high due to the large number of comparisons. The other approaches aimed at testing for more general differences in the patterns of trait (co)variation. To test for between-species differences in repeatability, we carried out a paired t-test, between the posterior modes of the three behavioral traits in the three acute treatments. Finally, to test for between-species differences in the structure of the correlation matrices, we followed White et al. (2020) and calculated the main eigenvector from each correlation matrix and the amount of total variance it explained. As mentioned above, under the null hypothesis of no variation in individual plasticity, all correlations are expected to be close to 1. This means that the main eigenvector is expected to show positive coefficients and the percentage of variance to be close to 100%. Low values of variance indicate high variation in individual plasticity. Moreover, for each behavioral trait, we measured the angles between the main eigenvectors of the two correlation matrices. Angles may vary from 0 to 90°; the more similar the patterns of correlations, the lower the angles.
All mixed models were fitted using the brms package in R (Burkner 2017(Burkner , 2018, which adopts a Bayesian inference based on STAN. In all models, we used the default noninformative priors, and we run 4 chains of 4000 iterations each, with warmups of 1000 iterations. Trace and distribution of all models were checked visually for autocorrelation and sampling stationary (Faraway 2016). Rhat values were used to check for chain convergence (Burkner 2017). The posterior distributions of both fixed and random factors were used to estimate their expected values, with their 95% credible interval (CI). A fixed factor was assumed to have a statistically significant effect on the dependent variable if its credible interval did not include 0.

Results
In Table S1, we show the descriptive statistics of the eight behavioral variables in R. dalmatina and R. latastei tadpoles in the control, fish, and dragonfly acute treatments. In both species, variables are highly inter-correlated (Table S2) and the correlation coefficients of R. dalmatina regress positively against those of R. latastei (b = 0.949; SE = 0.073; P < 0.001), suggesting a similar pattern of multivariate associations among the behavioral variables in the two species. The first three principal components of the correlation matrix explained 83.7% of the total variance (Table 1). The first component is largely a size factor that describes the amount of movements (ACTIVITY): tadpoles that 98 Page 6 of 15 move more score higher on it. The second component is a shape factor that describes variation in speed and acceleration within bouts of movement (SWIFTNESS): tadpoles that swim faster score higher on it. The third component is mainly affected by MCD (SINUOSITY): tadpoles with highly twisted movement score higher on it. These components are used as dependent variables in the successive analyses with general mixed-effect models.

Factors affecting tadpoles' behavior
All three behavioral variables were affected by the acute treatments. In the presence of a caged dragonfly or a fish lure, tadpoles decreased their overall activity (Table 2 and Fig. 1) and moved faster (Table 3 and Fig. 2) with more tortuous movements (Table 4 and Fig. 3) than under the emptycage control condition.
The ontogenetic treatment showed no significant effects on sinuosity (Table 4), but it did affect swiftness (Table 3 and Fig. 2) and, marginally, activity. Independent of the acute treatment, tadpoles raised with dragonfly larvae moved faster than those raised with no predators, whereas tadpoles raised with fish moved slower, but only in the presence of a fish lure (Table 3). Tadpoles raised with fish showed a slightly higher activity than tadpoles raised either with dragonflies or without predators.
Tadpoles of the two species showed significant differences in activity and swiftness, but not in sinuosity. Independent of the acute and ontogenetic treatments, R. dalmatina tadpoles moved more (Table 2 and Fig. 1) and faster (Table 3 and Fig. 2) than R. latastei tadpoles. Moreover, these between-species differences were often context dependent. In the presence of dragonfly larvae, R. dalmatina tadpoles decreased activity and increased swiftness more than R. latastei tadpoles. In contrast, in the presence of a lure fish, the increase in swiftness was higher in R. latastei than in R. dalmatina.
All models included the recording day as a covariate and the family as a random factor. Tadpoles increased the amount (Table 2) and the sinuosity (Table 4) of their movements with time, but not their swiftness (Table 3). The family explained a not-significant portion of variation in swiftness (SD = 0.07, CI = 0.00-0.23), and a low, but significant portion of variation in both activity (SD = 0.17, CI = 0.02-0.41) and sinuosity (SD = 0.27, CI = 0.05-0.65).

Among-individual variation
To analyze individual behavioral differences, we used mixed models, separately for the two species (see the "Methods" section). In Table 5, we show the among-individual standard deviations, the residual standard deviations, and the between-treatment correlation coefficients of the three behavioral variables in the three acute treatments. The (co)variance matrices provide evidence for a significant, though weak, variation in individual plasticity. In fact, the credibility intervals of the correlation coefficients, though positive, do not include 1, and the standard deviations differ between acute treatments in at least some comparisons. Specifically, in the fish acute treatment, tadpoles of R. dalmatina showed a larger among-individual variation in activity than in the control, possibly because tadpoles raised with fish decreased their activity less than those raised without fish (see Table 4). Similarly, tadpoles of R. latastei in the presence of dragonfly predators showed larger variation in sinuosity than in the control, possibly because tadpoles raised with dragonflies tended to increase sinuosity less than those raised without dragonflies. In both cases, differences in among-individual variation and, thus, variation in individual plasticity ( V I×E ) could be interpreted as the effect of developmental plasticity.
In R. dalmatina, the residual variation in activity was significantly higher in the control than in both the fish and dragonfly acute treatments. In R. latastei, the pattern was similar, but the differences were not statistically significant. Unlike activity, in both species, residual variation in swiftness increased in the presence of predators (in particular, with dragonfly larvae), and in R. latastei, differences were statistically significant. Residual variation in swiftness was similar in the three acute treatments.
These results clearly show that the acute treatments affect both among-and within-individual behavioral variations. In Table 6, we show how they affect behavioral repeatability. In general, repeatability was low, but statistically significant in 8 out of the 9 estimates in R. dalmatina, and in 5 out of 9 estimates in R. latastei. With only one exception Fig. 1 Individual variation in the amount of movements (ACTIVITY) as a function of the three acute stimuli (C, control; F, fish; D, dragonfly larvae). In each panel, small solid circles connected by thin transparent lines indicate context-dependent individual means. Large solid circles, connected by the thick colored lines, are the sample means within species (Rana dalmatina and Rana latastei) and ontogenetic treatment (raised without predators, raised with fish, raised with dragonfly larvae). To facilitate comparisons between the control and the two predator ontogenetic treatments, the control mean values (green solid lines) are shown in all panels (activity in the control treatment), the repeatability values of R. dalmatina were higher than those of R. latastei and a paired t-test suggests that, overall, the effect of personality was stronger in R. dalmatina than in R. latastei (t = 2.597; df = 8; P = 0.032).
In Table 7, we show the leading eigenvectors of the between-treatment correlation matrices. These components explain a large portion of the total among-individual variation (range: 45.38%, 76.09%) and the estimates of their angles suggest that the correlation structure of the three behavioral traits (in particular, swiftness and sinuosity) was similar in the two species.

Discussion
In this study, we ask four main questions about the flexible anti-predator behavior of tadpoles. The first is how tadpoles plastically adjust their behavior in the presence of predator cues. In the open field tests, tadpoles of both species move less, faster, and with more tortuous movements when the arenas contained cues of predators than when it did not. Although we did not evaluate the effects of these flexible responses on predation risk, they are likely to decrease both detection and encounter rates with predators (Werner and Anholt 1993). The second question is about the effects of the rearing environment on tadpole behavior. Our hypothesis was that predators in the raising environment increased behavioral flexibility in the direction that reduces predation risk. Results support this hypothesis only in part. In fact, the rearing environment shows weak effects on tadpole activity and no effects on sinuosity, but a stronger effect on swiftness in the predicted direction. The third question is about differences between species. It is at this level of analysis that behavioral differences become more evident. Independent of the acute and ontogenetic treatments, R. dalmatina moves more and faster than R. latastei, and differences are greater when there are no predators in the recording arena than when there is a fish lure or a caged dragonfly larva. From a population point of view, our results thus suggest that R. dalmatina is behaviorally more plastic than R. latastei, with interesting evolutionary consequences that we will discuss below. Finally, the fourth question focuses on between-species differences in the pattern of individual behavioral (co) variation. Results support the expectation that the amongindividual (co)variance structure differs between species, and they provide evidence that behavioral repeatability is higher in the more plastic species, R. dalmatina, than in R. latastei. Below, we discuss in more details these results.
The observed behavioral responses to chemical and visual cues of predators are those predicted by natural selection. A reduction of activity increases survival by reducing detection probability. The effect has been observed in tadpoles of many species (Relyea 2000(Relyea , 2001Benard 2004;Gazzola et al. 2021), and it is stronger when predator cues are associated with prey-borne and/or digestion-released cues (Hettyey et al. 2015). Tadpoles are known to be able to modulate their response to different types of predators (Relyea 2001), and we found that, in both species, they responded more strongly to the presence of dragonfly larvae than of fish lures. These differences might be biologically relevant and reflect the longer co-evolutionary history shared by tadpoles and dragonfly larvae (Polo-Cavia et al. 2020) or they might be an experimental artifact. In fact, both treatments used preyalarm cues, but in the dragonfly acute treatments, they were   associated with living predators, whereas in the fish acute treatments they were with predator lures, which might have been less effective in eliciting anti-predator behaviors (Hettyey et al. 2015). Independent of the amount of movements, tadpoles of both species swam faster in the presence of predators. A similar response (an increase in the number of rapid burst) was also observed in these species in response to the invasive crawfish Procambarus clarkii (Melotto et al. 2021), suggesting that it might be a general reaction to a perceived increase in predation risk rather than the response to specific predator strategies. Tadpoles, once detected, might increase their survival by fleeing not only fast, but also unpredictably, that is, by performing what is called a "protean behavior," which prevents predators to anticipate the future position (or action) of their pursuing prey (Richardson et al. 2018). A recent study on tadpoles of R. latastei (Gazzola et al. 2021) shows that path complexity increases with predators, proportionally to the intensity of perceived risk: the increase is weak if tadpoles are exposed to chemical cues of an alien predator (P. clarkii), but stronger if they are exposed to cues of dragonfly larvae. Our study confirms and extends these results to R. dalmatina. Unexpectedly, however, we find that path sinuosity increases in a similar way in the two predator treatments, although the strategy is expected to be more effective against fish, which pursue their prey, than against dragonfly larvae, which wait in ambush. As for the increase in swiftness, also the increase in path sinuosity appears to serve as a general defense against both types of predators, and we find no evidence for predator specificity responses (but see (Relyea 2001). These anti-predator responses are a form of flexible behaviors, which tadpoles perform independent of the type of the environment they previously experienced. As observed in many anurans, however, the raising environment does affect tadpoles' behaviors by modulating their flexibility. For example, in the Italian tree frog, tadpoles raised with dragonfly larvae were less active than those raised without predators, independent of the type of acute stimulus they were exposed to (control vs. caged dragonfly larvae) ). In the Neotropical tree frog Dendropsophus ebraccatus, tadpoles raised with dragonfly larvae moved consistently less than those raised without predators, but those raised with fish showed the opposite trend. In both cases, the induced changes were similar in chronic and acute treatments (Reuben and Touchon 2021). Our study provides no evidence for an effect of the ontogenetic treatment on either tadpoles' activity or sinuosity, but it shows evidence for an effect on swiftness. In fact, tadpoles raised with dragonfly larvae and, to a lesser extent, those raised with fish swim, on average, faster than tadpoles raised without predators. Since the chronic exposure to predators is known to elicit morphological changes with consequences on tadpole swimming performance (Van Buskirk and McCollum 2000;Benard 2004;Fraker et al. 2021), we cannot exclude that the increase in swiftness might be related to predator-induced changes in tadpoles' morphology rather than in the neuronal circuits controlling motor responses. However, if morphological changes are the only cause, we should expect to observe consistent changes across acute treatments. In contrast, we find that the increase in swiftness in predator-raised tadpoles is context dependent: it is high when in the arena there are no predator cues and it decreases with fish cues.
Although qualitatively similar, anti-predator behavioral responses differ quantitatively between species. Independent of the context, R. dalmatina tadpoles are more active and swim faster than R. latastei tadpoles. Similar differences were also observed in a previous study on the behavioral responses to inter-and intra-specific competitors (Castellano et al. 2022). In that study, tadpoles of R. latastei were found to stay longer at the bottom of the tank and to make shorter, more intermittent movements than R. dalmatina tadpoles, which, in contrast, tended to spend more time swimming through the water column. Since, in both experiments, tadpoles are raised in a common environment, differences are likely to be genetically based and, thus, they might reflect some fine-scale differences in the ecology and life history of the two species (Castellano et al. 2022). We suggest that the low activity and swiftness of R. latastei might be an adaptation to benthic habitats of shallow water, where insect predators are more abundant. Stronger and more predictable selection by predators might have favored the evolution of cautious, less plastic behaviors. In contrast, the higher activity and swiftness of R. dalmatina might be an adaptation to open water. In this micro-habitat, the presence of predators might be more unpredictable and selection might have favored bolder, more plastic individuals that escape predators by rapid flees rather than effective hiding places. Interestingly, similar results were found in a study by Semlitsch and Reyer (1992), which compared the anti-predator responses of tadpoles of two closely related pool frogs (Pelophylax lessonae and P. esculentus). Due to their hybridogenetic mating system (Berger 1977), the two species are forced to syntopy, but they show different genetically based anti-predator behaviors, which were interpreted as adaptations to different ecological niches within natural ponds. It is intriguing to notice that the high plasticity that characterizes the behavior, the morphology, and the life history of tadpoles seems to have had no limiting effects on natural selection to promote fine-scale adaptations to different aquatic micro-habitats.
Behavioral differences between species are context dependent. Differences in activity are larger when the arena contains no predators and decrease in the presence of fish and, even more, in the presence of caged dragonfly larvae, providing evidence that tadpoles of R. dalmatina adjust their activity more flexibly than those of R. latastei. These results contrast with those from a previous study on the plastic response to intra-and inter-specific competitors, which showed flexibility in R. latastei, but not in R. dalmatina (Castellano et al. 2022). In that study, we formulated two alternative hypotheses that interpreted differences in flexibility as either adaptive or non-adaptive. According to the adaptive hypothesis (the pace-of-life hypothesis (Wright et al. 2019)), the low sensitivity of R. dalmatina to interspecific competitors reflects a general low plasticity of the species, and it is the effect of natural selection favoring a fast life strategy which combines high metabolic rates and high activity levels with risk-prone behaviors and a general low sensitivity to environmental cues (Wright et al. 2019). According to the non-adaptive hypothesis (the source-sink hypothesis (Kirkpatrick and Barton 1997)), in contrast, the low sensitivity is evidence that natural selection failed to promote adaptive flexibility in the most peripheral populations of R. dalmatina. In fact, while most of the populations of R. latastei are sympatric to R. dalmatina, only the most peripheral populations of R. dalmatina are sympatric to R. latastei (Ficetola et al. 2007). In these peripheral populations, gene flow from the most central populations of the range might have reduced the effects of natural selection in promoting sensitivity to R. latastei competitors. The present

Declarations
Ethics approval The experiment followed ASAB (2020) guidelines for the ethical treatment of animals in behavioral research and complied with Italian national and Piedmont regional laws. Approval by ethics committee was not required. The permit to collect eggs was given by the Italian Ministry of Environment, Land and Sea (U.0031391-15.11.2019-PNM). During the experiment, 50% of water was changed twice a week, and food in excess was removed to optimize rearing conditions. Before video recording and measurement sessions, tadpoles were captured using hand nets and moved using water filled containers.
To produce alarm cues, we adopted two procedures depending on the type of predators. In the dragonfly treatment, alarm cues were produced by feeding dragonfly larvae with small tadpoles (Gosner stage 26-30) twice a week. At this feeding rate, predation occurred shortly after prey introduction, so that prey suffering was minimized. In the fish treatment, alarm cues were produced by euthanizing small tadpoles and grinding their body to a paste (see "Methods" section). For each trough, we used two tadpoles for each species twice a week. At the end of the experiment, all tadpoles were returned to the ponds where eggs had been collected.

Conflict of interest
The authors declare no competing interests.
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http:// creat iveco mmons. org/ licen ses/ by/4. 0/.