Thursday, July 3, 2025
No menu items!
HomeNatureMapping the adaptive landscape of Batesian mimicry using 3D-printed stimuli

Mapping the adaptive landscape of Batesian mimicry using 3D-printed stimuli

Production of artificial stimuli

Overview

To explore predator responses to realistic, but in some cases hypothetical, stimuli, we produced 3D-printed plastic insect replicas. Some stimuli were based on real insect specimens and were matched as closely as possible in shape, colour, pattern and size to the assigned insect. Other stimuli were produced by interpolating along a smooth gradient or axis running between two real specimens.

Specimens

Experimental stimuli were based on real wasp (Hymenoptera) and fly (Diptera) taxa chosen to represent different levels of mimetic accuracy (Extended Data Table 1). To generate intraspecific variation, in the wild-bird experiments, we used three different individuals from each taxon to produce separate stimuli.

Insect specimens were collected between June 2020 and August 2021 from various locations in England using a hand net. Specimens were euthanized by freezing at −18 °C for approximately 30 min. They were then pinned through the thorax and positioned into a natural-looking posture before drying for 6–24 h.

Photogrammetry

3D digital images of the insect specimens were obtained by photogrammetry, using a protocol adapted from a previous study53. Specimens were suspended, with the anterior uppermost, on a motorized turntable (Genie Mini II; Manfrotto, Cassola, Italy), positioned against a white background and lit indirectly using two LED panel lights (22 W, 5600 K; Pixapro). They were photographed using a DSLR camera (Canon EOS 600D) and macro lens (Tamron SP 90 mm) with F20, 1/6 s exposure, ISO400. Each specimen was photographed from 36 different angles—three vertical camera positions at each of 12 equally spaced turntable orientations. Wings were removed and photographed separately (single photo at a perpendicular angle), because otherwise their positioning on the body prevented important details of the abdominal pattern and shape from being accurately reconstructed.

A 3D shape file (mesh) was built from the set of 36 photographs using the software 3DSOM54, which uses the outline of the specimen in each photograph to carve out a 3D shape. The colour information from the photographs was then projected onto this 3D shape to give the corresponding colour pattern.

3D image processing

Except where noted, 3D images were edited using Blender55. Using the images obtained from photogrammetry as starting points, we constructed axes of similarity between pairs of real insects through 3D morphological space. We defined axes of phenotypic variation along which the traits of shape, colour, pattern and size varied smoothly from one image to the other, and generated phenotypes by picking either intermediate or (in the multiple-models experiment) extrapolated points along those axes. The four traits were varied in parallel with each other, except in the trait salience experiment, in which they were varied independently. Details of the specimen images used as axis end points are given under each experiment heading below.

Owing to difficulties in both processing and printing of thin and elongated structures, legs and antennae were removed digitally from the meshes, to be added back at a later step in more simplified form. Wings were treated in a similar manner, having already been removed from specimens before photogrammetry.

Shape deformations were carried out using the software Deformetrica56, which uses control points based large deformation diffeomorphic metric mapping. A single simplified template was projected onto both end points, such that each retained its shape features but remapped onto new vertices that now had a direct one-to-one correspondence between the two meshes. We then calculated the deformation of 3D space required to transform one shape into the other and, using this, calculated intermediate shapes along the same axis.

Pattern manipulation was performed using custom scripts in R (v.4.3.0)57. Pattern data were mapped onto the reconstructed meshes for the two end points, and vertices were separated into two colour segments using k-means clustering (k = 2) of RGB colour values. A signed distance map was calculated for each end-point pattern, whereby all vertices were assigned a value being the shortest possible edge distance to a vertex of the opposing colour. We created new intermediate distance maps by taking weighted averages of the end-point distance maps, and then reverse-engineered them into binary colour patterns by assigning all positive vertices to one segment and negative vertices to the other.

Each segment was assigned a single RGB colour value calculated as the median of the original colour data from the vertices included in that segment. Colours for intermediate patterns were calculated as linear interpolations between the corresponding segments in the end points. Ultraviolet reflection was ignored because there is no evidence of such colour components in wasp or hoverfly patterns40.

Owing to limited resolution at the printing stage, legs and antennae for all meshes were given the same standardized shape and a uniform colour. The shape was based around a cylinder, with diameter 0.6 mm for legs and 0.8 mm for antennae (thinner antennae were found to be too fragile after printing). In the case of legs, articulations were added to separate the coxa, femur, tibia and tarsus, and, for antennae, the cylinder was bent into a gentle curve. Colour was taken from whichever of the two body colour segments most closely matched the majority leg colour of real specimens. Antennal length was matched against distances measured from the original 3D digital image, with intermediates calculated by linear interpolation.

Wings were created with a flat shape, 0.4 mm thickness, based on the outline taken from photographs, which corresponded to shapes as they are typically seen when the insect is at rest. In contrast to Diptera, V. vulgaris and A. mystaceus have two pairs of wings but, at rest, the hindwings are hidden owing to overlap with the larger forewings (the latter being folded in the case of V. vulgaris). Wing shapes for intermediate meshes were calculated using the same deformation method as for the bodies. As our printing method was unable to recreate transparent materials, all wings were assigned a uniform colour value of 50% grey. This colour matched that of the bases to which the insects were attached (see below).

The various components (body, legs, antennae and wings) were combined digitally to produce a mesh of the whole insect and finally scaled to match the body length of the relevant end point, or a value calculated by linear interpolation for intermediates. A base was added to provide an attachment point for the object as a whole, as well as improving the structural integrity of the legs. This base was circular as viewed from above, with a narrow post extending up into the ventral side of the thorax.

An example axis (M. meridiana to V. vulgaris), viewable in 3D, is provided in Supplementary Data 1.

Additive manufacturing

We printed physical 3D representations of these digital insects on a HP Jet Fusion 580 machine using polyamide 12 powder (CB PA12) and colour cosmetic settings. Stimuli were printed at Matsuura Machinery for the discrimination ability and invertebrate predators experiments, and at the University of Nottingham for the rest. Stimuli were then given VaporFuse Surfacing treatment in a DyeMansion Powerfuse S, which created a less grainy, slightly glossier finish.

Nomenclature

We refer to stimuli in the text according to the initial letter of the genus of the axis end points, and the percentages by which each was weighted when creating any intermediate form. For example, C100 indicates a stimulus based 100% on Chrysotoxum, and M25/V75 indicates an intermediate with M. meridiana weighted by 25% and V. vulgaris weighted by 75%. In the multiple-models experiment, some stimuli were created by extrapolating beyond the range of the two end points, using weighted averages greater than 100% or below 0%, for example, A150/V−50.

Ethical approval

The Trait Salience experiment was approved by Newcastle University AWERB committee (project ID 966). Wild-bird experiments (discrimination ability and multiple models) were approved by AWERB committees at University of Nottingham (project ID 260) and University of Cambridge (ref. NR2022/60).

Wild-bird experiments

Field site and study organisms

Fieldwork was conducted in Madingley Wood, Cambridgeshire, UK (52.217° N, 0.049° E), a deciduous woodland composed primarily of broadleaf hardwood trees. The wood has a resident population of great tits, some of which, as part of other projects, have been fitted with passive integrated transponder (PIT) tags. Tags of birds involved in this study were fitted between July 2018 and October 2022 under licence from the special methods of the BTO projects 1120 and 1121 held by HMR. Birds included both males and females and were a mix of ages from first-year juveniles upwards.

Feeding stations

Feeding stations were placed at intervals within the wood, positioned close to dense vegetation to provide cover for small birds, and separated from each other by at least 80 m. The feeding stations consisted of a 0.75 × 0.75 m wooden board on which a 7 × 7 array of 30 mm diameter Petri dishes was fixed. The board was placed on top of a 1.4 m wooden post and covered with a 0.75 × 0.75 × 0.75 m cage made from 7 mm square galvanized wire mesh. On one side of the cage, approximately 0.5 m above the bottom of the cage, a 30 mm entrance hole allowed small birds to enter past a data logger antenna. The antenna was linked to a data logger (Francis Scientific Instruments), which logged PIT tags of any tagged birds entering. A single horizontal perch ran across the cage at the level of the entrance, and a further six perches were placed approximately 100 mm above the surface of the board, running between rows of Petri dishes. A motion-sensitive camera trap (CY70, Ceyomur) was placed above the top of the cage pointing downwards, such that the cage entrance and all Petri dishes were in view.

An example video showing two great tit individuals interacting with a feeding station is provided in Supplementary Video 1.

Discrimination ability and multiple-model experiments

Two main experiments were conducted at this field site using similar methodologies, along with a third generalization test: the discrimination ability experiment ran from December 2021 to May 2022, multiple models from October 2022 to April 2023 and the generalization test from October to December 2023. These experiments differed in timings and the stimuli used as explained in the relevant sections below, and a few details relating to sample sizes as follows.

In the discrimination ability experiment, five feeding stations were used; two of those did not receive enough successful feeding events and were dropped from the study before the testing phase, leaving three feeders. In the multiple-models experiment, a sixth feeder was added and all were in use throughout the experiment. In the generalization test, four feeders were used, three of which had been used previously and one placed in a new location within the wood.

Ten tagged individual great tits during the testing phase of the discrimination ability experiment, and eight tagged individuals in the multiple-models experiment, made more than 80 visits each, including five individuals present in both experiments. An unknown number of untagged individuals also visited in both cases; trapping records indicate that approximately 71% of the population were tagged in November 2021 and 51% in January 2023. In the discrimination ability experiment, tagged birds directed most of their visits to a single feeder (median 90%, lower quartile 78%, upper quartile 95%). During the multiple-models experiment, fidelity to feeder was weaker (median 51%, lower quartile 42%, upper quartile 64%) but fidelity to treatment was high (median 81%, lower quartile 66%, upper quartile 92%). In the generalization test, only one tagged individual visited the feeders, with 68% of its visits to a single feeder. No tagging had been conducted that year, so many tagged birds had probably died or dispersed.

Stimuli: discrimination ability experiment

Stimuli were drawn from three axes, all ending at V. vulgaris and starting from fly taxa with varying levels of mimetic accuracy: M. meridiana, S. ribesii and Chrysotoxum (Extended Data Table 1). Each axis consisted of the two end points and three intermediates at 25%, 50% and 75% similarity to V. vulgaris.

In the training phase, we used 15 rewarding fly (M100) and 15 unrewarding wasp (V100) stimuli (with 19 dishes left unused). In the testing phase, we used 17 unrewarding V100 stimuli and 32 rewarding stimuli, the latter including 10 M100 stimuli as experienced in the training phase, as well as two of each of 11 new phenotypes. New phenotypes were three intermediates from the M. meridiana axis (M75/V25, M50/V50, M25/V75), S. ribesii (S100) and its three intermediates (S75/V25, S50/V50, S25/V75), and Chrysotoxum (C100) and its three intermediates (C75/V25, C50/V50, C25/V25).

Stimuli: multiple-models experiment

Stimuli were drawn from an axis running from A. mystaceus to V. vulgaris, representing two model species and related phenotypes. In addition to the end points, each axis included three intermediates (25%, 50% and 75%) and four extrapolations, two beyond each end point at distances equivalent to the 25% and 50% intermediates. A separate non-mimetic stimulus of M. meridiana M100 was used, with no intermediates.

Feeders were assigned to either one model (1M) or two model (2M) treatments, with treatments spatially grouped within the study site to reduce the chances of an individual bird that visited multiple feeders experiencing both treatments. In the training phase, we used 25 rewarding fly (M100) and 24 unrewarding wasp stimuli, the latter being either exclusively V100 (1M treatment) or 12 × V100 and 12 × A100 (2M treatment; Fig. 3a).

In the testing phase, we used 20 unrewarding wasp stimuli, either exclusively V100 (1M) or 10 × V100 and 10 × A100 (2M), and 29 rewarding stimuli of which 10 were M100 and the remaining 19 were drawn in equal numbers (with rounding) from the intermediate and extrapolated phenotypes of the A. mystaceus—V. vulgaris axis A150/V−50, A125/V−25, A75/V25, A50/V50, A25/V75, A−25/V125, A−50/V150 (Fig. 3c).

Stimuli: generalization test

Here we tested whether the birds would generalize their preference for flies over wasps, learned from the printed stimuli, to the real insects. In the training phase, we used 12 rewarding fly (M100) and 12 unrewarding wasp (V100) stimuli (with 25 dishes left unused). In the testing phase, we swapped half of the printed stimuli for dead, real specimens of the same fly and wasp species, glued to circular bases identical to those used for the printed stimuli. The testing phase was limited to 5 days to focus on the birds’ initial responses to the real specimens and minimize their opportunity to refine their learning. The short duration also minimized damage and decay of the specimens.

Habituation phase (wild birds)

Feeders were first provided with open Petri dishes which contained a single mealworm per dish, as well as peanuts placed on the board in between dishes (only provided during initial stages and when visitation rates were low, to encourage birds to visit). Food was refilled every 2–3 days, and the whole feeding apparatus was sterilized using 70% ethanol spray every 2 weeks. After 3 days, transparent lids were placed onto the Petri dishes so that mealworms were visible, but only accessible if the lids were opened. Over the course of four weeks, visiting great tits learned to open the lids by flipping them off using their beaks. Petri dishes and lids were then painted so that the contents were not visible until the lids were flipped. Great tits continued to search for food by flipping off the lids to obtain the mealworms and, in most cases, all 49 mealworms had been consumed after 2 days. Other bird species and small mammals were seen visiting the feeding stations to feed on the peanuts, but rarely opened lids. In the multiple-models experiment, from 12,331 lids that were opened, 401 were by blue tits C. caeruleus, which were included in analysis, considering their close relatedness with great tits. Mice opened 59 lids which were excluded from analysis. Only great tits opened lids in the discrimination ability experiment and the generalization test.

Training phase (wild birds)

After the habituation phase, a 3D-printed stimulus was attached to the lid of each Petri dish. To train the birds to avoid the wasp stimuli (V100 and, for multiple models 2M treatment, A100), no food was provided in the corresponding dishes, and mealworms were placed only in the fly dishes (M100). Every 1–2 days we began a new session by replacing all of the lids in a new configuration, randomized with respect to board position, and restocking the relevant dishes with mealworms. The training phase continued for 3 weeks for the discrimination ability experiment, and 4 weeks for the generalization test. The training phase of the multiple-models experiment continued for 6 weeks, which included a gap of 1 week (Extended Data Fig. 3a) when cold weather forced a pause in the experiment because heavy frost made the dishes unopenable.

Testing phase (wild birds)

The testing phase followed the same methodology as the training phase, but introducing a wider range of stimuli in addition to those on which the birds had been trained (see the ‘Stimuli: discrimination ability experiment’ and ‘Stimuli: multiple-models experiment’ sections). All of the newly introduced stimuli were rewarded, representing mimics with varying levels of accuracy. This phase lasted 5 weeks (10 weeks for the multiple-models experiment).

Trait salience experiment

Study organisms and housing (chicks)

Domestic chicks (G. g. domesticus; P.D. Hook Hatcheries) were acquired immediately after hatching and housed in a laboratory at Newcastle University. Chicks (not sexed) were housed communally in two non-concurrent batches of 36 in a floor pen measuring approximately 2 m2 with access to food (HPS Starter Crumb, Special Diets Services) and water ad libitum. The room was kept at 25 °C and under a 14 h–10 h light–dark cycle. The number of chicks was chosen with the aim of a sample size of 10–20 presentations per stimulus type, allowing for some exclusions due to failure to meet training criteria (see below).

Experimental arena (chicks)

The experiments took place in an arena measuring 140 × 70 × 40 cm and divided into three sections of lengths 25, 90 and 25 cm, separated by mesh barriers such that each section was visible from the others. The first section formed a buddy area to house two buddy chicks (from a stock of eight, rotated every hour) during all sessions. Buddy chicks were never used for experimental testing, but instead ensured that experimental chicks were always able to see and hear conspecifics, to reduce stress. The largest section of the arena was the experimental area, which included a removable board on which grey opaque food dishes, with removable lids, were mounted. The final section was a holding area in which chicks were placed during 30 s gaps between presentations.

An example video showing a chick approaching stimuli in the experimental arena is provided in Supplementary Video 2.

Stimuli (trait salience)

Stimuli were based on the non-mimic T. fera and the model V. vulgaris. Each of four traits—shape, colour, pattern and size—was varied independently to different levels of mimicry, being poor (matching T. fera), good (50% intermediate) or perfect (matching V. vulgaris). Stimuli were created in all possible combinations of poor and perfect traits, or good with perfect traits (but never poor and good traits in the same stimulus), resulting in 31 different trait combinations (Extended Data Table 4).

Habituation phase (trait salience)

On the first day after arrival in the laboratory, chicks received six 2 min trials in the experimental area, foraging from eight open dishes containing mealworms T. molitor. Chicks were first grouped in threes, then pairs, then individually (two trials each). Before the last three sessions on day one, and all of the following sessions, chicks were food-deprived for 60 min to ensure motivation to forage.

Over the course of the following 6 days, chicks received one trial each day during which they received 16 presentations of two dishes, each containing a mealworm. During a presentation, chicks were placed in the main arena and had up to 30 s to obtain a mealworm. Chicks were removed before being able to consume the second mealworm and placed in the holding area for 30 s in preparation for the next presentation. Each day, opaque lids were placed increasingly covering the dishes until the lids were fully on and the mealworm completely hidden, teaching chicks to lift off a lid to obtain a mealworm.

Training phase (trait salience)

Chicks were each given a further series of trials during which they learned to discriminate fly from wasp stimuli through paired choices. Chicks were presented with the same two dishes as in habituation, but with one bearing a 3D-printed model of T. fera (fly, poor in every trait) and a mealworm inside, and the other with a model of V. vulgaris (wasp, perfect in every trait) and no reward. After the chick opened one of the two lids (or 30 s elapsed, whichever happened first), it was moved back into the holding area to prevent it accessing the other dish. The chicks then remained in the holding area for 30 s before the next presentation. Each day, the chicks received 1 trial of 16 presentations.

After 5 days of training the first batch of chicks, it was noted that some individuals showed a bias towards one of the two dish positions (left or right, not consistent across chicks), regardless of the stimulus. To reduce this stereotyped behaviour and encourage learning, we subsequently varied dish positions among presentations, placing dishes in two out of four possible positions along a line perpendicular to the chicks’ starting position.

Trials continued until chicks chose the fly dish on at least 13 of the 16 presentations, which took 7–11 days. We excluded 12 chicks that did not reach this learning threshold from further testing and analysis. We note that, as a result, our conclusions apply only to the subset of the chicks involved in the testing phase. The presence of some individual predators which are less selective does not prevent the majority, which do discriminate among prey types, from exerting selective pressure on mimetic phenotypes.

Testing phase (trait salience)

Chicks then received up to four further daily trials (some chicks that took longer to complete the training phase spent less time in the testing phase) testing their response to intermediate stimuli. The structure of trials was identical to the training phase, except that birds were given only one stimulus in each presentation. In each trial, chicks received six presentations of a Petri dish containing a mealworm and topped with the same fly stimuli used in training, six with no reward and topped with the wasp stimuli used in training and four further probe presentations. The probe stimuli were dishes containing a mealworm and topped with a novel insect, drawn at random from 31 possible trait combinations (Extended Data Table 4). Note that possible probe stimuli included one identical to the unrewarding wasp stimulus (perfect in all traits) but associated with a mealworm reward, so acting as a perfect Batesian mimic.

Chicks opened all dishes in the testing phase, without exception. The latency to attack was measured from the moment the chick was released into the arena to its first peck of the dish or lids. Given the speed at which chicks approached the dish (median, 1.1 s), timings were taken from video recordings slowed to 0.3× speed using the BORIS software package58 to improve accuracy. Experimenters were not blind to stimulus type during this process.

Invertebrate predators experiment

Study organisms and housing (invertebrates)

Praying mantises of three species (Rhombodera kirbyi (n = 5, fourth instar to adult), Polyspilota aeruginosa (n = 1, subadult) and Pseudoxyops perpulchra (n = 2, third instar), all unsexed; BugzUK and LDW bugs) and jumping spiders (adult male and female P. audax obtained from Jumping Spiders Web) were housed individually in transparent plastic boxes (19 × 13 × 8 cm) in a laboratory at University of Nottingham. The room was kept at 26 °C and under a 12 h–12 h light–dark cycle. They were fed crickets or mealworms twice weekly, with all trials conducted 30 h after feeding.

We collected crab spiders (S. globosum, adult male and female) that were sitting in wait for prey on flowers (where they hunt for pollinating insects) around the Quinta de São Pedro field research station (38.568° N, 9.193° W) and surrounding areas of Sobreda, Portugal. Individuals found with recently killed prey were not included. Spiders were kept at the Quinta de São Pedro research station, and individually housed in transparent plastic universal tubes. Spiders were kept, unfed, for 48 h until use, but note that the median time since the last meal will have been longer. The room was kept at 22 °C, with no artificial light–dark cycle.

Experimental arena (invertebrates)

Mantis and jumping spider trials were performed inside an opaque plastic box (19 × 13 × 8 cm). A fishing line was fed through two small holes at either side of the box, with one end attached to a counterweight maintaining tension and the other end attached to a bobbin. The bobbin was spun by a motor, programmed with a microcontroller board (Arduino) to rotate in a randomized pattern (1–2 s clockwise or anticlockwise, 0–1 s pause, then repeated in the opposite direction). This moved stimuli left and right in rapid, jerky motions and encouraged striking59. Stimuli were suspended by a fine steel wire loop from the fishing line, allowing them to dangle and move in three dimensions.

Crab spider trials used a similar arrangement of equipment but with an arena that was larger (69 × 38 × 41 cm) and included the addition of a single purple milk thistle (Galactites tomentosus) to provide a perch for the spiders. The fishing line to which stimuli were attached entered through a hole in the lid of the arena as opposed to the side, causing stimuli to move vertically towards and away from the flower, as opposed to left and right.

Example video clips showing the different predators being presented with stimuli in their respective arenas are provided in Supplementary Video 3.

Stimuli (invertebrates)

Stimuli were drawn from an axis running from M. meridiana (fly; M100) to V. vulgaris (wasp; V100) with three intermediates: M75/V25, M50/V50 and M25/V75. This axis matches one of the three axes used in the discrimination ability experiment. Stimuli were removed from their bases as the presentation method involved hanging down on a wire rather than resting on top of a lid.

Training phase (invertebrates)

Praying mantises (n = 8) and jumping spiders (n = 8) each underwent six aversive conditioning trials on separate days. In the first trial, the stimulus was randomly allocated (M100 or V100) for each individual then, in subsequent trials, the stimulus was alternated. After being placed into the arena, animals were given 1 min to acclimatize before the stimulus was introduced. All mantises attacked the stimuli within 10 min, and were immediately punished after attacking wasp stimuli (V100) by being prodded firmly on the thorax with a separate wasp stimulus attached to the end of a thin metal rod. Subjects appeared to be appropriately threatened by this punishment, responding by moving away from the rod. Jumping spiders did not always attack, and were punished (in the same way as the mantises) at the end of trials involving a wasp stimulus, regardless of whether the spider had attacked the stimulus or not. Fly stimuli (M100) were associated with no reward or cost.

Training for crab spiders was performed using a condensed protocol as it was not possible to maintain the wild-caught spiders in the laboratory for long periods. The spiders (n = 150) did not undergo trials with presentations of wasp or fly stimuli, but simply received the punishment without any previous associated stimulus or behaviour. However, this still provided an opportunity to associate the negative experience with the wasp stimulus owing to its use in the ‘punishment’ process itself.

Testing phase (invertebrates)

Praying mantises and jumping spiders received a further nine trials using the same procedures as the training phase. Five probe stimuli were presented consisting of each of the five points along the axis in random order, alternating with four reinforcement trials (two M100 and two V100). All attacks on (mantises) or encounters with (spiders) wasp stimuli were punished as before. Owing to restricted time in captivity, each crab spider was presented once with a single stimulus, selected from the five axis points at random.

As in the training, mantises attacked all stimuli, and the latency to attack was measured from when the motor was switched on to the mantis first striking the stimulus. Spiders rarely attacked the stimulus (P. audax 11% of trials, S. globosum 17% of trials); thus, using latency to attack as the primary measure of behaviour would provide poor resolution. They did, however, display a range of positive (such as orientation towards the stimulus, approach) and negative (for example, retreat, hide) behaviours in response to stimuli; a full list of the observed behaviours is shown in Extended Data Table 6. Instances of these behaviours were recorded over the full trial period (P. audax, 5 min; S. globosum, 3 min). Experimenters were not blinded to the stimulus type during the laboratory trial.

Statistical analysis

All analysis was carried out in R (v.4.3.0)57. We used generalized linear models and generalized linear mixed models implemented in the package lme4 (ref. 60). In all cases, model fit was assessed visually for normality of residuals and homoscedasticity using residual plots. From a defined set of candidate models, the most parsimonious was selected based on lowest AICc values, with ties (a difference in AICc of less than two) broken by choosing the model with the fewest degrees of freedom61.

Wild-bird experiments

Within each session and feeder, we determined the order of dishes being opened on the basis of video data, with any left unopened placed at the end of the sequence. Those coding the videos were not blinded to the stimulus identity during this process. We converted this sequence to a set of protection values from 0 to 1, corresponding to the first and last dishes of the sequence respectively. Thus, 0 can be considered to be the least protected as it is attacked first, and 1 the most protected as it is attacked last or not at all. These values were then logit-transformed using the formula log[(x + 0.01)/(1 − x + 0.01)] to occupy an unbounded scale, which improved normality of residuals. The 0.01 adjustment in this formula is to ensure that 0 and 1 transform to finite values62.

For the discrimination ability experiment, initial preferences were assessed on the basis of bird behaviour in the first session of the training phase only. These preferences would have depended mostly or entirely on the subjects’ innate sensory biases and learning from their experience in the wild and not on their experience with the experimental stimuli (although some learning may have taken place from the very first dish onwards). We used the explanatory variables reward (binary variable: mealworm or no mealworm, here corresponding to fly or wasp stimuli respectively) and feeder (categorical variable identifying the feeding station, here treated as fixed due to only having three levels). We fitted the linear model preference ~ reward × feeder and compared it to all four nested submodels.

To highlight trends of stimulus selection as time progressed in the training phase, we fitted a nonlinear least squares (NLS) model to the levels of protection for the wasp stimulus (as there were only two stimulus types, the pattern for fly stimuli is simply an inversion of this). We used a sigmoid learning curve defined by the formula \(\fraca1+\rme^-b\times (t-c)\) based on time t measured as the number of sessions. This formula assumes that zero protection is received at time zero.

In the testing phase, we fitted separate curves to each phenotype, using an asymptotic curve with the formula \(a+(b-a)\times \rme^-\rme^c\times t\) as, in contrast to in the training phase, there did not appear to be any initial warm-up period to the rate of learning. This approach enabled us empirically to parameterize the learning period according to the starting level of discrimination, rate of change and final level of discrimination, and therefore to identify a period of learning after which bird preferences were relatively stable. As a result, for our main analysis of the testing phase, we excluded the first 9 days of the testing phase while birds adapted to the new set of stimuli; from day 10 onwards, behavioural responses had reached within 10% of the asymptotic value according to the fitted learning curves. We used the explanatory variables feeder (as for training phase), plus axis (categorical variable for whether the stimuli were based on Mesembrina, Syrphus or Chrysotoxum), phenotype (the degree of similarity to the wasp, categorical to allow for a wide range of non-linear relationships) and edge (binary variable to indicate whether a dish was on the outer perimeter of the 49-dish array, included to improve the fit as we observed that birds preferred to open dishes along the perimeter of the cage; it was not tested for significance). We fitted the Gaussian linear model preference ~ (axis × phenotype + edge) × feeder and compared it to 32 nested submodels. This approach allowed the comparison of models with or without (1) an effect of phenotype, that is the degree of similarity to the wasp; (2) an effect of axis (M. meridiana, S. ribesii or Chrysotoxum), potentially interacting with phenotype; and (3) individual variation in behaviour, according to the interactions with the feeder term, since feeders represent largely separate sets of individual great tits. Tukey’s post hoc comparisons were used to test for differences among different levels of the phenotype and axis variables.

For the multiple-models experiment, again we fitted learning curves using NLS, but found that patterns in the data conformed less closely to simple curve definitions. In the training phase, discrimination initially improved and then appeared to regress after a spell of cold weather (see the ‘Training phase (wild birds)’ section above), possibly owing to turnover of individuals. Asymptotic curves fitted to the whole training phase (formula as described for the discrimination ability experiment) did not converge but, when fitted just to the sessions after the experimental pause, converged for two of the three stimulus types. In the testing phase, asymptotic curves fitted using NLS did not converge on a solution for any stimuli. This is probably because most stimuli showed no clear trends with time, except for M100, which showed an increase in the levels of protection during the first 10 days. In the absence of fitted curves, we used the same cut-off as in the discrimination ability experiment, which matched our subjective assessment of the data trends, removing data from days 1–9 when modelling learned preferences.

We compared models representing several specific hypotheses related to great tit behaviour in the testing phase. We used the explanatory variables edge (as in the discrimination ability experiment), feeder (now fitted as a random effect as there were six feeders), treatment (categorical, one model or two models), distance to model (continuous variable measuring distance to the nearest model along the Vespula–Argogorytes axis of similarity; in the two-model treatment, A150/V−50, A50/V50 and A−50/V150 would all have the same distance (50 percentage points) from a model and would be predicted to elicit similar responses from the predators), intermediate (categorical variable indicating whether a stimulus lies between the two models along the axis of similarity; that is A75/V25, A50/V50 and A25/V75 are intermediate) and stimulus (categorical variable treating each position along the axis of similarity separately). All models used the Gaussian family and included fixed effects of edge and treatment and a random effect of feeder. H0: no effect of stimulus on bird preferences preference ~ edge + treatment + (1|feeder); H1: stimuli receive protection in inverse proportion to their distance from a model preference ~ distance_to_model + edge + treatment + (1|feeder). H2: as for H1, but intermediate mimics receive extra protection preference ~ distance_to_model * intermediate + edge + treatment + (1|feeder). H3: certain stimuli elicit avoidance behaviour in unique and unpredictable ways preference ~ stimulus + edge + treatment + (1|feeder). Each of H1–3 were also tested with the addition of an interaction between treatment and the stimulus-related term (H1 + distance_to_model:treatment; H2 + intermediate:treatment; H3 + stimulus:treatment).

Trait salience experiment

To standardize for variation in speed of behavioural responses of chicks among individual trials, within each trial, we compared the response to probe stimuli against values for the six fly and six wasp presentations. Within a trial, latency to attack was linearly scaled such that values for the response to fly and wasp presentations matched the median values from across all trials (0.855 and 1.28 s respectively). In 14 out of 105 trials, there was little (<0.1 s) or no delay in the mean response towards the wasp stimuli; these trials were excluded from further analysis.

We compared models representing several sets of hypotheses about the relative importance of the four phenotypic traits in influencing chick behaviour. We used the explanatory variables day (categorical variable for the number of days through the testing phase, allowing for changes in behaviour depending how many trials the chick has already completed), batch (categorical variable for which of two groups the chick belonged to, run on different dates), first_pres (binary factor indicating whether or not it was the first presentation of a trial, as we observed chicks to be slower on their first attempt of the trial), chick (random effect for individual ID), shape, colour, pattern and size (each represented by a three level factor of poor (fly-like), good (intermediate between fly and wasp) or perfect (wasp-like)), and interactions to represent overshadowing, where the overshadowed trait is ignored unless another trait, termed the main trait, is above a certain level of accuracy. All models used the Gaussian family and included fixed effects of day, batch and first_pres, and a random effect of chick. H0: no effect of stimulus on chick behaviour latency_to_attack ~ day + batch + first_pres + (1|chick). H1: each trait has a separate, additive effect on behaviour latency_to_attack ~ day + batch + first_pres + shape + colour + pattern + size + (1|chick). Nested submodels were also fit that excluded different combinations of the four trait terms. H2: one trait is assigned as overshadowing others, so that other traits are ignored unless the main trait is perfect (for example, latency_to_attack ~ day + batch + first_pres + colour + colour_perfect:shape + colour_perfect:pattern + colour_perfect:size + (1|chick)). The model was repeated with each of the four traits as the main trait, and nested submodels that excluded different combinations of the overshadowed traits were also fitted. H3: one trait is assigned as partially overshadowing others, so that other traits are ignored unless the main trait is good or perfect (for example, latency_to_attack ~ day + batch + first_pres + colour + colour_good_perfect:shape + colour_good_perfect:pattern + colour_good_perfect:size + (1|chick)), with variations as described for H2. H4: all trait combinations have their own unique effects on chick behaviour latency_to_attack ~ day + batch + first_pres + shape × colour × pattern × size + (1|chick)).

Invertebrate predators experiment

The response variable for mantis behaviour was latency to attack, measured in seconds and modelled using a Gaussian family with log link. Jumping spiders and crab spiders rarely attacked the stimuli directly so instead, response was the number of observations of positive behaviour towards the stimulus: display, approach and attack, and for jumping spiders, alert and orientation. These responses were modelled using a Poisson family with log link. Models included a fixed effect of phenotype (categorical variable for similarity to the wasp, as for discrimination ability above) and random effect of individual (except for the crab spiders, which had only one data point per individual). Tukey’s post hoc comparisons were used to test for differences among different levels of the phenotype variable.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

RELATED ARTICLES

Most Popular

Recent Comments