Abstract
Avian brood parasitism offers an excellent system for studying coevolution. While more common than interspecific parasitism, conspecific brood parasitism (CBP) is less studied owing to the challenge of detecting parasitic eggs. Molecular genotyping accurately detects CBP, but its high cost has led researchers to explore egg appearance as a more accessible alternative. Barn swallows (Hirundo rustica) are suspected conspecific brood parasites, yet parasitic egg detection has largely relied on subjective human assessment. Here, we used UV–visible photographs of genetically confirmed non-parasitized barn swallow clutches and simulated parasitism to compare the accuracy of human assessment with supervised machine learning models. Participants and models completed two classification tasks, identifying parasitic eggs from either six or two options. Both humans and the ‘leave-one-clutch-out’ model performed better than chance, with accuracies of 72 and 87% (humans) and 76 and 92% (models). An improved ‘leave-one-egg-out’ model achieved 97% accuracy, greatly exceeding human performance, likely by integrating more visual information, with egg dimensions being the most important trait, followed by colour and spotting pattern. We present a complete and accessible pipeline for replicating our supervised models, offering a powerful tool to identify parasitic eggs in other species also, and advance research on the evolution of egg phenotypes.
Keywords: cognition, artificial intelligence, intraspecific nest parasitism, egg phenotype, colour, pattern
1. Introduction
Avian brood parasitism represents an alternative reproductive strategy wherein parasitic females lay some or all of their eggs in nests belonging to other females. This phenomenon has been documented in 365 species, with 109 species being interspecific obligate brood parasites that consistently lay their eggs in nests of different species [1]. The interactions between interspecific brood parasites and their hosts have become a major focus for investigating coevolutionary processes in nature [2].
Conspecific brood parasitism (CBP) accounts for the remaining 70% of brood parasites and involves individuals occasionally laying eggs in the nests of others within the same species [3]. Despite its prevalence, CBP remains relatively understudied, largely owing to the challenges of detecting it in the wild. Unlike the eggs of obligate brood parasites such as the common cuckoo (Cuculus canorus), which, even when highly mimetic, can usually be easily distinguished from host eggs [4], identifying conspecific parasitic eggs is more difficult because they typically resemble the host’s eggs very closely.
Early studies on CBP relied solely on field observations, such as detecting multiple eggs laid in a single day or noting differences in egg appearance [5–10]. However, later research introduced more precise methods, like protein and genetic fingerprinting, to confirm CBP [11–14]. While these genotyping techniques are highly accurate, they remain costly, time-consuming and technically demanding. Consequently, researchers have explored the potential of using egg phenotype and modern analytical methods to identify parasitized clutches and specific parasitic eggs. This non-invasive, low-cost approach also offers the advantage of increasing sample sizes, as genetic fingerprinting may not always be feasible, particularly when predation occurs before blood sampling or when unfertilized eggs without viable DNA are present.
The identification of CBP based on egg phenotype is theoretically possible only in species where individual females lay eggs that are more similar to each other than to those of other females. This pattern, characterized by low variation within clutches and high variation among clutches, appears to be widespread in birds [11,15,16]. Two groups in particular may benefit from this phenomenon: hosts of brood parasites, which can more easily recognize and eject parasitic eggs that differ from their own [17–19], and colonially nesting birds, which might otherwise mislay eggs or misdirect incubation and nest defence behaviours [20,21].
The reliability of using egg phenotype to identify parasitized clutches and specific parasitic eggs remains, however, a debated issue. Much of the research on this topic has focused on egg size parameters in waterfowl, which are frequent conspecific brood parasites [22]. Eadie [23] proposed an automatic unsupervised method based on maximum Euclidean distance (MED) that identifies parasitized clutches by detecting eggs that deviate significantly from the others in the same clutch—more than would typically be expected from a single female’s eggs. His thesis, along with a study by Pöysä et al. [24], demonstrated that this method is reliable for identifying parasitized clutches of common goldeneyes (Bucephala clangula). However, other studies that have replicated this approach in various waterfowl species have reported mixed results, indicating that the method’s reliability varies between species, and they advise using it with caution [25–29]. A more nuanced approach was proposed by Eadie et al. [30], who suggested categorizing clutches into two groups: (1) clutches that can be reliably classified as parasitized or non-parasitized, and (2) clutches where the model’s classification is uncertain. While this more conservative method improved the accuracy, the authors still recommend combining its results with observational or molecular techniques for the best outcomes. Recent technological and computational advances have enabled the use of supervised machine learning methods to investigate visual cues in ecological research [31,32]. However, their application to the study of egg phenotypes remains limited, with only a few studies using these techniques [16,33]. Similarly, deep learning methods have been applied in only a small number of recent studies [34,35], despite their demonstrated success in other areas of animal identification [32,36,37], which is likely owing to their limited interpretability and the requirement for relatively large, genetically validated training datasets [38].
Over 30 years ago, Møller’s pioneering studies revealed CBP in the barn swallow (Hirundo rustica). He identified this behaviour by noting the appearance of two eggs in active nests during the same day [7] and by finding eggs in experimental, non-active nests [39]. Since Møller never directly observed the parasitizing individuals, he relied on egg appearance to identify parasitic eggs and even to speculate on the identity of females that laid them. However, it is well documented that the last eggs laid by various species, including barn swallows, often differ from the other eggs in the clutch (reviewed in [40]), which increases the risk of misidentification when using this method alone [41,42]. Therefore, the use of egg appearance for accurately identifying parasitized clutches and specific parasitic eggs in barn swallows still requires further validation.
In this study, we investigated whether egg phenotype can be reliably used to identify parasitized clutches and parasitic eggs in the barn swallow (hereafter swallow), a widely assumed conspecific brood parasite (but see also recent findings on the extremely low level of brood parasitism in this species [14]). Using a labelled dataset of swallow eggs that were molecularly assigned to their genetic mothers, we simulated brood parasitism and tested the ability of human participants, both with and without expert knowledge of swallow egg appearance, to identify foreign (‘parasitic’) eggs within ‘host’ clutches. Additionally, we applied analytical techniques to quantify phenotypic traits, including size, shape, spotting pattern and colour from UV–visible photographs and compared the identification accuracy of the unsupervised and supervised tools with that of human participants. The high accuracy of the supervised model used in this study was previously demonstrated for common cuckoo eggs [16]. In the present study, we adapted it to explore its potential for advancing research on conspecific brood parasitism. Beyond our specific findings on barn swallow eggs, we provide a complete machine learning pipeline to facilitate future studies investigating egg phenotypes in other brood parasitic species.
2. Material and methods
(a). Study population
We collected data during the 2020 and 2021 breeding seasons at four farms in the villages Stará Hlína (49°02′21.4″ N, 14°49′06.8″ E), Břilice (49°01′14.4″ N, 14°44′15.3″ E), Lužnice (49°3'25.3" N, 14°46'11.4" E) and Lomnice nad Lužnicí (49°4'7.7" N, 14°42'36.7" E) in southern Bohemia, Czech Republic. Here, swallows breed inside cattle barns, nesting on walls, beams, or lamps, or in crevices near the ceiling. They start arriving in late March, and females usually start laying eggs in April and May. From May to July, we conducted four mist-netting sessions and ringed all adults with a unique combination of aluminium and plastic coloured rings. All individuals were sexed, measured, weighed and photographed, and a venipuncture blood sample (approx. 20 μl) was taken. Most active nests were found before egg laying and monitored daily during the egg-laying period and at 2–5 day intervals during the nestling stage. Chicks were ringed and blood sampled (approx. 10 μl) at 9 days old, and unhatched eggs were collected for embryonic tissue samples. All blood and embryonic tissue samples were stored in 96% ethanol. We selected 54 clutches, ensuring that each was laid by a different female and that the same female laid all eggs within a clutch. Parentage was verified by genotyping all parents and offspring with 17 microsatellite markers using Geneious Prime® 2024.0.3 (GraphPad Software) and Cervus 3.0.7 (Field Genetics Ltd). Further details on molecular assignment are available in the electronic supplementary material and in Jelínek et al. [14], which presents a comprehensive maternity analysis in our study population from 2010 to 2021.
(b). Egg photography and image analysis
Avian eggs, including those of swallows, reflect both visible and ultraviolet (UV) light [43], and birds are known to use UV signals for egg recognition [44,45]. Therefore, we took human-visible and UV-spectrum photographs of swallow eggs within the first three days after clutch completion using a full spectrum Samsung NX 1000 camera with a Nikkor EL 80 mm lens. Visible-light photographs were taken through a Baader UV–IR blocking filter (Baader Planetarium, Mammendorf, Germany; 420–680 nm), and UV photographs with a Baader UV pass filter (320–380 nm). All eggs of a given clutch were placed on the side on a dark board inside a white nylon light tent (50 × 50 × 50 cm, Fomei, China; see electronic supplementary material) and photographed together in the shade, at the same angle and from the same distance to minimize lighting variability during the day [46]. Despite this uniform protocol, we detected a small quadratic effect of time of the day (but no effect of calendar day) on the colour and luminance variables extracted from our photographs (see electronic supplementary material). Although we do not believe this influenced our final results, we recommend restricting image acquisition to a specific time of the day to reduce the noise introduced by natural light [46]. RAW images were calibrated by polytetrafluoroethylene grey standards (3 and 97% reflectance). Exposure settings were adjusted accordingly with lighting conditions, yet the International Organization for Standardization (ISO) value was set constant at 400 and aperture f/8. Image calibration and pattern, colour and shape analysis were performed in ImageJ [47] using the Multispectral Image Calibration and Analysis (MICA) Toolbox [48,49]. All images were rescaled to the scale of the smallest image (30 pixels mm−1).
For colour analysis, we used a custom ImageJ script (K. Szala 2025, personal communication) that incorporates functions of the MICA Toolbox [48] to measure the brightness and colour of egg spots and background independently. Spots were detected using the Phansalkar thresholding method [50] with Gaussian blur correction for uneven illumination [51]. We applied a 50 pixel radius for thresholding and a 2048 pixel Gaussian blur. To prevent incorrect thresholding in darker egg edges, we reduced the selection area around each egg by 3% of its width. We extracted reflectance values for red (R), green (G), blue (B) and ultraviolet (UV) channels, as well as brightness values, for both the spots and the background of each egg. Additionally, using the MICA Toolbox [48], we also calculated pixel proportions across ten luminance levels (ranging from 0 to 1 in 0.1 increments) to capture a more detailed description of the overall luminance of the entire egg.
For pattern analysis, we applied granularity analysis to quantify pattern energy at different spatial frequencies [48,52]. Since pattern energy alone does not differentiate between dark spots on a light background and light spots on dark background, we also calculated the skewness of the pattern, which quantifies the asymmetry of the pattern luminance distribution. Additional information and the code for calculating skewness can be found in Šulc et al. [16]. Pattern energies and skewness were calculated across the whole egg and separately for the blunt pole, sharp pole and middle section to measure within-egg pattern variability.
Additionally, we used a custom ImageJ script (K. Szala 2025, personal communication) to calculate average spot size, the percentage of egg surface covered by spots, and three measures of pattern dispersion. Pattern dispersion parameters provided insights into how spots are distributed along the egg’s long axis. By analysing pattern coverage for three sections (blunt pole, sharp pole and middle), we calculated the mean and standard deviation (s.d.), and coefficient of variation (s.d./mean × 100) of pattern dispersion.
For shape analysis, we used the MICA Toolbox [48] to calculate egg length, maximum width, volume, surface area, ellipse deviation and ellipse aspect ratio (parameter a in [53]).
Since clutch size in our swallow population is typically five eggs, we selected photographs of five-egg clutches laid by different females as verified by molecular analysis (see below). We excluded low-quality images (blurry or unevenly illuminated), resulting in a dataset of 270 eggs from 54 females.
(c). Preparing variables describing egg appearance
We collected colour, pattern, size and shape data from calibrated photographs of 270 swallow eggs (54 clutches, each containing 5 eggs). To avoid correlated variables in models, we performed principal component analyses (PCA) on different egg features and selected PCA components based on scree plot inspection [54]. Percentages of variation explained by these selected components are listed below.
Colour and luminance data. To perform a PCA for the colour features, we used average R, G, B, UV and brightness values for spots and background. For luminance, we conducted a PCA using the pixel proportions across ten luminance levels across the entire egg. From these analyses, three colour PCA components (explaining 95% of variance) and one luminance PCA component (explaining 41% of variance) were included in the final dataset.
Pattern data. Four PCA components for pattern features were included in the dataset. The first two components (explaining 54% of variance) were derived from a PCA of 12 pattern energy values and 12 skewness values, measured at multiple scales (from 1 to 0.0221 in steps of 1/√2) across the whole egg and within each of three egg segments. The remaining two components (explaining 92% of variance) were calculated from a separate PCA of average spot size, percentage of egg surface covered by spots and the mean, s.d. and coefficient of variance of pattern dispersion.
Shape data. The last PCA was conducted for egg length, maximum width, volume, surface area, ellipse deviation and aspect ratio. One shape PCA component (explaining 55% of variance) was included in the final dataset.
The final dataset included nine PCA components, referred to as egg phenotypic traits, which were used for further analyses.
(d). Within- and between-clutch variance in egg appearance
For egg appearance to be a reliable indicator of parasitized clutches and parasitic eggs, the within-clutch variation must be lower than the between-clutch variation. To assess this, we first scaled all nine phenotypic trait variables to standardize distance calculations. To quantify within-clutch variance, we calculated the s.d. for each trait from all eggs within a clutch and averaged these s.d. values across all traits, providing an overall variance metric for each female. To quantify between-clutch variance, we calculated the average value of each phenotypic trait from all eggs in a clutch, effectively creating an ‘average’ egg of each clutch. We then calculated the s.d. for each phenotypic trait across all clutches and averaged these s.ds to generate a metric of between-clutch variance across all traits. To test whether within-clutch variance is indeed lower than between-clutch variance, we performed a one-sample t‐test, comparing the within-clutch variance metric (n = 54) against the test value representing between-clutch variance.
Additionally, we calculated Beecher’s information statistic (Hs) to quantify how well egg phenotype signals individual identity. This metric is particularly valuable as it allows comparisons across various studies, species and signature systems [55,56]. This analysis was conducted using the R package IDmeasurer [56]. To validate our findings, we compared the results from the real data with a control statistic generated by shuffling the ID labels [16].
(e). Ranking phenotypic traits by their prediction accuracy
To assess which phenotypic traits are best at predicting parasitic eggs, we fitted a random forest model using the R package randomForest [57]. This model was applied to the entire dataset of 270 eggs and their associated female identities to determine the prediction accuracy of each phenotypic trait, measured by mean decrease in accuracy. Mean decrease in accuracy quantifies the reduction in accuracy when a specific variable is excluded, with higher values indicating greater importance for classification. The mean decrease in accuracy values was also used as weights to transform the phenotypic trait values to improve accuracy in identifying parasitized clutches and individual parasitic eggs in subsequent models.
We weighted each phenotypic trait by multiplying it with the corresponding mean decrease in accuracy value from the random forest model. Using weighted phenotypic traits yielded higher prediction accuracy of the unsupervised method compared with unweighted traits (see electronic supplementary material).
(f). Identification of parasitized clutches
To assess whether egg appearance can be used to distinguish parasitized clutches from non-parasitized clutches, we adapted Eadie’s method [23,30] using the maximum Euclidean distance (MED). For each non-parasitized clutch in our dataset (n = 54), we calculated Euclidean distances between all possible egg pairs within a clutch (10 comparisons per clutch of 5 eggs) based on nine weighted egg phenotypic traits. Then, we calculated a mean distance for each egg by taking the average Euclidean distance of all the egg pairs it was involved in. The value of the most different egg was identified as the MED for that clutch. For parasitized clutches, we created 54 exemplar parasitized clutches by using slides from participant 1 in game 1 (see below for further details), and randomly removed one host egg from each clutch to standardize them to a total of five eggs per clutch. We then carried out the same process to calculate the MED for each clutch as for the non-parasitized clutches. Subsequently, we compared MED values between parasitized and non-parasitized clutches using a t‐test and assessed distribution overlap to evaluate this method’s effectiveness.
(g). Identification of parasitic eggs
We used human assessment and two automatic methods to identify parasitic eggs in barn swallow clutches, all using a dataset of 270 eggs from 54 clutches. For human assessment, we created calibrated RGB images of all eggs in ImageJ by using the MICA Toolbox [48] and rescaled them to 10 pixels mm−1 to match the dimensions of commonly used computer screens. To simulate brood parasitism, we added a randomly selected swallow egg from a different female (the parasitic egg) to each five-egg clutch laid by the same female (host eggs), generating 14 310 unique combinations of parasitized clutches. We then randomly selected 1890 combinations, ensuring that each participant assessed all 54 host clutches with a randomly selected parasitic egg. This approach finally resulted in 1641 unique combinations of parasitized clutches, 114 combinations being duplicated twice and seven combinations being duplicated three times.
(h). Human assessment
To evaluate human ability to discriminate a parasitic egg from five host eggs, we tested 105 participants, divided into three groups based on their experience with bird eggs. The first group consisted of 35 researchers or students with extensive recent experience handling barn swallow eggs (‘experienced with swallow eggs’). The second group included 35 researchers experienced with wild bird eggs but not swallow eggs (‘experienced with bird eggs’). The final group comprised 35 participants with no prior experience with wild bird eggs (‘inexperienced’).
We designed two online screen tests (hereafter games) using PsychoPy [58], with participants completing both games, with an interval of one to two months apart. Each game featured 54 slides displaying parasitized clutches on a grey background. In game 1, participants were tasked with selecting one egg that appeared most different from a randomly ordered set of six eggs (complete clutch of five eggs plus one parasitic egg), simulating a scenario where a researcher encounters a complete clutch without knowing the egg-laying order (figure 1A). In game 2, participants were presented with four randomly selected host eggs from a five-egg clutch in the top row and two eggs below—the remaining fifth host egg and a parasitic egg (figure 1B). Participants had to choose between the two bottom-row eggs, simulating a scenario where a researcher conducts daily nest checks and finds four eggs laid in the normal laying rhythm (i.e. one egg per day), but two eggs laid on the same day, with one of these presumed to be parasitic.
Figure 1.
Example slides from the screen games. Both games included 54 slides, each displaying a six-egg clutch with five eggs laid by a single ‘host’ female and one by a different ‘parasitic’ female. In game 1 (A), participants visually identified the parasitic egg from all six eggs. In game 2 (B), participants chose only between two eggs (bottom row), while the four eggs above were confirmed as host eggs. Asterisks indicate the parasitic eggs. Additional slides for readers to test their ability to identify parasitic eggs are available in the electronic supplementary material.
Every participant within a specific group received a unique set of parasitized clutches, generating 1890 combinations of parasitized clutches (54 slides × 35 participants). Participants with the same number (1–35) in each experience group received identical sets of parasitized clutches, allowing comparison across experience groups. Additionally, every participant received the same set of parasitized clutches in both games, enabling us to assess improvement from game 1 to game 2.
(i). Automatic assessments
(i). Unsupervised classification: Euclidean distance analysis
We applied an unsupervised classification model for each game. In game 1, we calculated Euclidean distances based on nine weighted egg phenotypic traits for all 15 possible egg pairs in each six-egg parasitized clutch. The parasitic egg was identified as the one within a clutch with the highest mean egg distance (across all phenotypic traits), and we measured the model’s accuracy as the percentage correct assignment across all 1890 clutches. For game 2, a similar procedure was followed, except we compared only two candidate parasitic eggs, selecting the one with the greatest mean egg distance.
(ii). Supervised classification: same/different analysis
We used a supervised random forest model to classify egg pairs as either ‘same’ (laid by the same female) or ‘different’ (laid by two different females), the same approach as we previously implemented for identification of eggs laid by the common cuckoo [16]. The model was trained on a balanced dataset of 265 ‘same’ and 265 ‘different’ cases and validated using a ‘leave-one-clutch-out’ approach [59], meaning that for each tested egg, the training dataset consisted only of eggs laid by different females (n = 265). In the test phase, we compared each egg with all others, obtaining 72 630 comparisons (270 × 269) with two comparisons per egg pair (one for each egg as the target). Since we used only within-clutch comparisons from the same 1890 combinations of parasitized clutches as in human assessments, this resulted in 10 comparisons (2 × 5) for each egg within a clutch. As generating the training dataset involves stochastic processes, we repeated this procedure ten times, resulting in 100 comparisons for each egg within the parasitized clutch. This approach reduced the number of inconclusive identifications (i.e. where the model assigned the same number of ‘different’ classifications to multiple eggs) and improved overall accuracy.
In game 1, we compared all eggs within a parasitized clutch, identifying the parasitic egg as the one most frequently classified as ‘different’. In game 2, a similar procedure was followed, except we compared the two candidate parasitic eggs with the remaining four eggs and selected the one with the highest number of ‘different’ results. Finally, we calculated the model’s accuracy as the percentage of times an egg was correctly identified as ‘parasitic’. In rare cases, the model identified more than one egg as parasitic (i.e. same number of ‘different’ results); we considered these assessments ambiguous and did not include them in the final accuracy calculation.
For game 2, we additionally applied a random forest model that included, in the training dataset, eggs from the tested clutch that were laid in a regular daily sequence (i.e. one egg per day). We refer to this method as the ‘leave-one-egg-out’ approach. This analysis was designed for situations where researchers assume that these regularly laid eggs were produced by the host female and aim to identify which of the two additional eggs laid on the same day is parasitic. By incorporating known host eggs, we expected the model to improve the accuracy of assigning the remaining host egg and identifiying the parasitic egg. We did not apply this approach in game 1, as it was designed to reflect a real-life scenario where the laying order of eggs is unknown.
The full workflow of methods used for the automatic identification of parasitized clutches and parasitic eggs is illustrated in figure 2.
Figure 2.
Workflow of methods used for the automatic identification of parasitized clutches and parasitic eggs. For further details, please refer to Material and methods.
(j). Supplementary analyses
We also ran an unsupervised k-means clustering analysis and a supervised one-class support vector machine analysis. Both of these methods were relatively poor at discriminating between parasitic and host eggs, so we do not present them in the main manuscript, but full details can be found in the supplementary code.
3. Results
(a). Within- and between-clutch variance in egg appearance
The mean within-clutch variance was 0.58 (s.d. = 0.16; range 0.30–1.06, all clutches can be seen in the electronic supplementary material). Overall, between-clutch variance (mean = 0.82, s.d. = 0.05; range = 0.76–0.91) was higher than within-clutch variance (one-sample t‐test, t = 26.02, d.f. = 53, p < 0.001). Beecher’s information statistic (a measure of how well egg phenotype signals individual identity) Hs = 0.93, considering only significant variables. This can be compared with a control Hs = 0.33, where the ID labels were randomly shuffled. Variation in the egg appearance is also graphically illustrated in the electronic supplementary material.
(b). Ranking traits for prediction
PC1 for shape was the most important variable for egg classification, and the variables loading onto this PC were the length, maximum width, volume and surface area of the egg. The second most important variable was PC3 for colour, where the spot UV channel, the background UV channel and the spot brightness contrasted with the background visible channels (R and G in particular). The importance of all nine traits used for egg classification is summarized in table 1.
Table 1.
Ranking of trait importance for egg classification by using a random forest model. The main principle component analysis (PCA) loadings are those that were greater than ±0.25.
|
variable |
mean decrease in accuracy |
main PCA loadings |
|---|---|---|
|
PC1 shape |
37.13 |
length, maximum width, volume, surface area |
|
PC3 colour |
32.06 |
spot UV channel, spot brightness and background UV channel versus background R and G channels |
|
PC2 pattern |
28.44 |
— |
|
PC2 colour |
22.48 |
spot R, G and B channel versus background B and UV channels and background brightness |
|
PC1 colour |
21.30 |
spot R, G, B and UV channels, background R, G, B and UV channels, spot and background brightness |
|
PC1 pattern |
20.44 |
— |
|
PC1 luminance |
19.73 |
luminance bands 0.1, 0.2, 0.3, 0.4, 0.5 versus 0.6 and 0.7 |
|
PC2 pattern 2 |
18.61 |
standard deviation and coefficient of variance of pattern dispersion |
|
PC1 pattern 2 |
17.95 |
average spot size, percentage of the egg covered by spots, mean and standard deviation of pattern dispersion |
(c). Identification of parasitized clutches
The MED was significantly higher in parasitized compared with non-parasitized clutches (t = 4.51, d.f. = 104, p < 0.001; figure 3A), with 96% (52 out of 54) of non-parasitized clutches showing an MED below 350. This suggests that clutches with an MED above this threshold are likely to be parasitized. However, there was a considerable overlap between the MED distributions of parasitized and non-parasitized clutches (figure 3B), and the majority of parasitized clutches (42 out of 54) showed MED values below this threshold. MED on its own, therefore, cannot reliably distinguish parasitized and non-parasitized clutches.
Figure 3.
(A) Maximum Euclidean distances (MEDs) calculated for 54 non-parasitized and 54 parasitized clutches. (B) Frequency distribution of MED depicting the substantial overlap between non-parasitized and parasitized clutches.
(d). Identification of parasitic eggs
(i). Human assessment: game 1
Overall, participants performed relatively well on this task, achieving an average accuracy of 71.9%, which was significantly above chance (Wilcoxon signed rank test compared with a mean of 9: V = 5565, p < 0.001; figure 4A). Accuracy did not differ among the three experience groups (one-way ANOVA: F2,102 = 1.7, p = 0.188), indicating that expertise did not affect the performance of the human assessment. The mean time taken on each decision was 10.04 s (s.d. = 13.97).
Figure 4.
(A) Percentage of parasitic eggs correctly assigned by three differently experienced groups of human participants in game 1. Since participants were choosing from six-egg options, the red line denotes a level of chance, i.e. 16.7% correct answers. (B) Percentage of parasitic eggs correctly assigned by three differently experienced groups of human participants in game 2. Participants were choosing from two-egg options, so the red line denotes a 50% level of chance.
(ii). Human assessment: game 2
Participants performed better on the second game, where they selected between only two eggs, compared with the first game (paired-sample t‐test: t = −16.851, d.f. = 104, p < 0.001). In the second game, participants achieved a mean accuracy of 86.8%, which was significantly higher than chance (Wilcoxon signed rank test compared with a mean of 27: V = 5565, p < 0.001; figure 4B). As in the first game, accuracy did not significantly differ among the three experience groups (one-way ANOVA: F2,102 = 1.31, p = 0.274). The mean time taken on each decision was 7.40 s (s.d. = 19.67).
Participants who performed well in game 1 also tended to do well in game 2 (Pearson’s correlation coefficient: r = 0.59, t = 7.45, d.f. = 103, p < 0.001). Additionally, participants who spent more time playing the game generally achieved higher accuracy (average time across games, r = 0.37, t(103) = 4.01, p < 0.001).
(e). Automatic method: unsupervised classification
In game 1, our unsupervised method based on weighted Euclidean distances predicted the correct parasitic egg with 62.2% accuracy, which was significantly lower than the accuracy of human participants (Wilcoxon signed rank test, V = 4979, p < 0.001). The unsupervised approach performed better in game 2 by identifying correctly parasitic eggs in 86.5% of cases, which was comparable to human performance (Wilcoxon signed rank test, V = 3365, p = 0.06).
(f). Automatic method: supervised classification
First, we applied the ‘leave-one-clutch-out’ approach for both games. In game 1, the model correctly identified 1417 of 1890 parasitic eggs, and in 456 clutches another egg was flagged as the parasitic egg. This resulted in a 75.7% accuracy rate, which was significantly better than human assessment (Wilcoxon signed rank test, V = 1742, p < 0.001). In the remaining 17 clutches, one host egg was incorrectly flagged as parasitic alongside the parasitic egg, making it impossible to confidently identify the parasitic egg based on this supervised method.
In game 2, the model identified a single egg as parasitic in 1877 out of 1890 clutches, of which 1720 were truly parasitic eggs, and 157 were host eggs, yielding a 91.6% accuracy, which was higher than the accuracy of human participants (Wilcoxon signed rank test, V = 585, p < 0.001). In the remaining 13 clutches, the model did not allow a definite decision to be made as both target eggs were flagged as parasitic at the same rate.
When we applied the ‘leave-one-egg-out’ approach for game 2 (see Methods), the model identified a single egg as parasitic in 1887 out of 1890 clutches, of which 1838 were truly parasitic eggs, and 49 were host eggs. Only the remaining three clutches showed ambiguous results as both target eggs were flagged as parasitic at the same rate. This model, therefore, showed a 97.4% accuracy rate, which again significantly outperformed the accuracy of human assessment (Wilcoxon signed rank test, V = 3, p < 0.001).
4. Discussion
Our study confirms that eggs laid by the same barn swallow females are more similar to each other than to eggs laid by different females. This is consistent with previous findings across various species [11,15,16]. In theory, such individual egg signatures could help swallows distinguish foreign eggs from their own, which would be particularly advantageous in defending against brood parasites or in recognizing their own clutch in dense colonies. The former idea was, however, not supported experimentally because barn swallows have been shown to fail in recognizing and rejecting conspecific or mimetic model eggs placed among their own [60,61]. A similar lack of rejection has been observed in other conspecific brood parasites, such as spotless and common starlings (Sturnus unicolor and Sturnus vulgaris; [62,63]). In contrast, some hosts of conspecific brood parasites, such as great-tailed grackles (Quiscalus mexicanus) and house sparrows (Passer domesticus), exhibit relatively high rejection rates of conspecific eggs [64–66]. These contrasting results suggest that egg recognition abilities vary among species, likely owing to differences in how variable eggs are and/or the intensity of selective pressures associated with CBP.
Whether variation in egg appearance helps swallows recognize their own clutches in dense breeding colonies remains an open question. However, we find this also unlikely, as swallows typically engage in nest guarding behaviour and actively chase away intruders [39], including foreign females that could inadvertently attempt to lay eggs in, or incubate, a foreign clutch. Therefore, we believe that the greater variation observed among clutches compared with variation within clutches might be a general phenomenon across bird species, not necessarily driven by selection for egg or clutch recognition. Instead, this pattern likely reflects genetic, developmental, physiological and environmental differences among individual females, which affect the reproductive system, such as shell gland morphology and function. However, the extent to which selective pressures, such as brood parasitism or colonial nesting, contribute to these patterns remains an interesting question for future research.
Interestingly, the identity signal (Hs) was two times lower for swallow eggs compared with that previously observed in common cuckoo eggs [16]. This difference was primarily due to between-clutch variance in cuckoos being more than double that of swallows, suggesting that the cuckoo’s strategy of mimicking the egg phenotypes of various host species likely drives this increased between-clutch variation [67]. This comparison supports the idea that identity signals of bird eggs are strongly influenced by species-specific breeding strategies [21].
Our results show little support for using Eadie’s MED method [23,30] to identify parasitized clutches. Although clutches with MED values exceeding 350 had a 96% likelihood of being parasitized, this approach would fail to detect the majority of parasitized clutches (78%) because their MED values fell below this threshold (figure 3B). We suggest that this may be due to the first- or last-laid egg, which often differs noticeably from other eggs in the clutch, as documented in multiple species [68–70], including barn swallows [40]. Our additional analysis of clutches with known laying sequence of all eggs (n = 32) supports this, showing that both the first- and the last-laid eggs differed the most from the others in the clutch (electronic supplementary material). Therefore, we concur with previous studies [41,42], including the research on closely related American cliff swallows (Petrochelidon pyrrhonota) [9], and advise against relying solely on egg phenotype to distinguish parasitized from non-parasitized clutches. We suggest including additional data, such as observing two eggs laid on the same day, for more accurate identification.
On the other hand, when parasitism is confirmed in a swallow clutch (e.g. by the appearance of two eggs during the same day), the combination of lower within- and higher between-clutch variation enables relatively accurate identification of parasitic eggs, consistently above the chance. Although human participants performed relatively well in both games, supervised models always achieved higher accuracy (table 2). In the first game, where the task was to identify one parasitic egg among six eggs, error rates remained high (28% for humans and 24% for the model). Therefore, we find assigning the parasitic egg in these situations too unreliable in barn swallows. For other species with lower within-clutch and higher between-clutch variation, it may be possible that the model may yield more reliable results, though this remains to be tested.
Table 2.
Summary of average identification accuracies in games 1 and 2, achieved by human participants, the unsupervised method and two supervised models.
|
game 1 (%) |
game 2 (%) |
|
|---|---|---|
|
human assessment |
71.9 |
86.8 |
|
unsupervised method |
62.2 |
86.5 |
|
supervised model: ‘leave-one-clutch-out’ |
75.7 |
91.6 |
|
supervised model: ‘leave-one-egg-out’ |
n.a. |
97.4 |
In contrast, in the other scenario, where the choice was between the two eggs laid on the same day (game 2), accuracy was much higher, particularly for supervised models, which made errors only in 8 and 3% of cases (table 2). Hence, we recommend using supervised models, especially the ‘leave-one-egg-out’ approach, for identifying parasitic eggs, but only in the specific case of distinguishing between two eggs laid on the same day. Human assessment, while the easiest method for field researchers, varied across individuals, even among highly experienced researchers. We therefore suggest first testing the performance of individual researchers before relying on their judgement. Consequently, we urge caution when interpreting early studies on CBP in barn swallows that relied solely on human assessment to identify parasitic eggs and laying females [7,39]. This is particularly important in the light of recent findings demonstrating that CBP in this species may be less common than previously believed (a recent study showed only 0.3% parasitism rate [14]). Overall, our results show that once parasitism is detected within a clutch (e.g. through daily nest monitoring of the laying order), supervised machine learning models are currently the most effective approach for identifying parasitic eggs.
We believe the supervised automated method outperformed human participants in identifying parasitic eggs because it analysed a broader range of visual information from the photographs. In contrast, human perception likely prioritizes certain traits over others, limiting the simultaneous processing of multiple traits to the same extent [71,72]. Additionally, the data used in the automated analyses included highly detailed measurements, such as UV reflectance, which is beyond human perception, which may have significantly improved identification accuracy. Indeed, UV spot and background coloration contributed significantly to the second most important variable for egg classification. However, colour data are often strongly positively intercorrelated (e.g. the reflectance of the UV and blue channel [73]), a pattern that also applies to our dataset. Therefore, we expect the supervised model to achieve similar accuracy even when relying only on visible-light photographs. Moreover, the UV coloration of swallow eggs is unlikely to play a role in egg or clutch recognition by swallows themselves, as previous research has shown that UV light barely reaches nests located in buildings [61].
The most informative egg traits for the models were related to egg dimensions—length, width, volume and surface area. These traits were also prioritized by human participants during screen games (personal communication with participants, see also [16]). This is encouraging as it suggests that similar analyses could be effective for species with immaculate eggs, where differences in dimensions and background coloration can still be used. Such an approach could improve parasitic egg detection in waterfowl species where previous studies have failed to achieve sufficient accuracy [25–29]. Interestingly, the random forest model indicated that pattern characteristics were less informative, likely because last-laid swallow eggs tend to have lower maculation [40], reducing the reliability of this trait for egg identification.
In conclusion, the high within-clutch variation in barn swallow eggs prevents reliable identification of parasitized clutches based on egg phenotype alone. However, once parasitism is confirmed (e.g. with unambiguous irregular egg-laying patterns or genetic analyses), supervised automated classification has proven highly effective for identifying the parasitic egg. Since barn swallows have often been cited as a textbook example of conspecific brood parasitism among songbirds, but recent findings suggest they have an extremely low parasitism rate [14], our pipeline may provide a useful approach for a more thorough re-examination of their reproductive behaviour across populations. Beyond barn swallows, we believe that our method can be used to aid in identifying parasitic eggs in other conspecific brood parasites, though its accuracy and the size of the training dataset needed will strongly depend on the egg characteristics of the species.
Identifying the parasitic egg is a crucial first step to enable further studies on host cognition and response toward parasitic eggs, survival of parasitic eggs and chicks (when it is possible to trace which chick hatched from which egg), and, perhaps most importantly, the identification of specific parasitic females by comparing the phenotypes of parasitic eggs with other eggs within a locality [16]. The ability to identify parasitic females directly in the field can open new opportunities to study their behavioural and physiological adaptations, as well as the fitness consequences of conspecific parasitism for both hosts and parasites. To facilitate these broader applications, we have provided a step-by-step markdown guide for our R code, detailing phenotypic traits preparation, model construction and final egg assignment.
Another major strength of automated models resides in their analytical power with larger datasets, while providing more objective assessments compared with human participants, owing to the high level of subjectivity involved within and among individual observers. The main limitation of supervised machine learning models is that they require a labelled dataset with eggs of known identities for training [38], which in our case was achieved through microsatellite genotyping. Nonetheless, supervised models hold great potential for advancing research on avian egg coloration and its links to interesting behaviours such as brood parasitism and colonial nesting.
Acknowledgements
We thank our students and colleagues, including K. Bendová, M. Frýbová, M. Janča, K. Míčková, K. Pačandová, L. Pazdera, G. Štětková, O. Tomášek, J. Týblová, J. Záleská, H. Zdobinská and L. Zemanová, for their invaluable assistance with fieldwork, as well as all participants who took part in our egg identification games. We are also grateful to K. Szala for providing written scripts that facilitated our analysis of egg coloration and patterning, and we thank the editor and two anonymous referees for their comments that substantially improved the manuscript. Finally, our sincere appreciation goes to the managers of the cattle farms that kindly allowed us to conduct our fieldwork on their land.
Contributor Information
Anna E. Hughes, Email: anna.hughes@essex.ac.uk.
Lisandrina Mari, Email: lisandrina.m.mari@jyu.fi.
Jolyon Troscianko, Email: J.Troscianko@exeter.ac.uk.
Václav Jelínek, Email: jelinek@ivb.cz.
Tomas Albrecht, Email: albrecht@ivb.cz.
Michal Šulc, Email: sulc@ivb.cz.
Ethics
We declare that all experiments performed for this study were approved by the animal and ethics representatives of the Czech Academy of Sciences and nature conservation authorities (62065/2017-MZE-17214 and MZP/2020/630/964). The fieldwork adhered to the Czech Law on the Protection of Animals against Mistreatment (licence nos CZ03971 and CZ04122).
Data accessibility
All data for these analyses can be found in the supplementary information. Supplementary material is available online [74].
Declaration of AI use
We have not used AI-assisted technologies in creating this article.
Authors’ contributions
A.E.H.: conceptualization, formal analysis, funding acquisition, methodology, software, visualization, writing—original draft, writing—review and editing; L.M.: conceptualization, formal analysis, methodology, writing—original draft; J.T.: software, writing—review and editing; V.J.: conceptualization, data curation, funding acquisition, investigation, methodology, project administration, writing—review and editing; T.A.: data curation, investigation, writing—review and editing; M.Š.: conceptualization, data curation, formal analysis, funding acquisition, investigation, methodology, project administration, writing—original draft, writing—review and editing.
All authors gave final approval for publication and agreed to be held accountable for the work performed herein.
Conflict of interest declaration
We declare we have no competing interests.
Funding
This work was financially supported by the Czech Science Foundation under grant project number 20-06110Y.
References
- 1. Mann CF. 2017. A taxonomic review of obligate and facultative interspecific avian brood parasitism. In Avian brood parasitism: behaviour, ecology, evolution and coevolution (ed. Soler M), pp. 61–92. Cham, Switzerland: Springer International Publishing. ( 10.1007/978-3-319-73138-4_4) [DOI] [Google Scholar]
- 2. Soler M. 2017. Brood parasitism in birds: a coevolutionary point of view. In Avian brood parasitism: behaviour, ecology, evolution and coevolution (ed. Soler M), pp. 1–19. Cham, Switzerland: Springer. ( 10.1007/978-3-319-73138-4_1) [DOI] [Google Scholar]
- 3. Yom-Tov Y, Geffen E. 2017. Conspecific brood parasitism among birds: the effects of phylogeny, mode of reproduction and geographic distribution. In Avian brood parasitism: behaviour, ecology, evolution and coevolution (ed. Soler M), pp. 95–103. Cham, Switzerland: Springer. ( 10.1007/978-3-319-73138-4_5) [DOI] [Google Scholar]
- 4. Mikulica O, Grim T, Schulze-Hagen K, Stokke BG. 2018. The cuckoo: the uninvited guest. Plymouth, UK: Wild Nature Press. ( 10.4324/9780429483622-8) [DOI] [Google Scholar]
- 5. Yom‐Tov Y, Anderson GMDA. 1974. Intraspecific nest parasitism in the starling Sturnus vulgaris. Ibis 116, 87–90. ( 10.1111/j.1474-919X.1974.tb00226.x) [DOI] [Google Scholar]
- 6. Yom‐Tov Y. 1980. Intraspecific nest parasitism among dead sea sparrows Passer moabiticus. Ibis 122, 234–237. ( 10.1111/j.1474-919x.1980.tb02663.x) [DOI] [Google Scholar]
- 7. Møller AP. 1987. Intraspecific nest parasitism and anti-parasite behaviour in swallows, Hirundo rustica. Anim. Behav. 35, 247–254. ( 10.1016/S0003-3472(87)80230-0) [DOI] [Google Scholar]
- 8. Kendra PE, Roth RR, Tallamy DW. 1988. Conspecific brood parasitism in the house sparrow. Wilson Bull. 100, 80–90. [Google Scholar]
- 9. Brown CR, Sherman LC. 1989. Variation in the appearance of swallow eggs and the detection of intraspecific brood parasitism. Condor 91, 620–627. ( 10.2307/1368112) [DOI] [Google Scholar]
- 10. Jackson WM. 1992. Estimating conspecific nest parasitism in the northern masked weaver based on within-female variability in egg appearance. Auk 109, 435–443. ( 10.1093/auk/109.3.435) [DOI] [Google Scholar]
- 11. McRae SB, Burke T. 1996. Intraspecific brood parasitism in the moorhen: parentage and parasite-host relationships determined by DNA fingerprinting. Behav. Ecol. Sociobiol. 38, 115–129. ( 10.1007/s002650050224) [DOI] [Google Scholar]
- 12. Andersson M, Åhlund M. 2001. Protein fingerprinting: a new technique reveals extensive conspecific brood parasitism. Ecology 82, 1433–1442. ( 10.1890/0012-9658(2001)082[1433:pfantr]2.0.co;2) [DOI] [Google Scholar]
- 13. Griffith SC, Barr I, Sheldon BC, Rowe LV, Burke T. 2009. Egg patterning is not a reliable indicator of intraspecific brood parasitism in the blue tit Cyanistes caeruleus. J. Avian Biol. 40, 337–341. ( 10.1111/j.1600-048x.2009.04671.x) [DOI] [Google Scholar]
- 14. Jelínek V, et al. 2025. Conspecific brood parasitism in the barn swallow (Hirundo rustica) and other Hirundinidae. bioRxiv ( 10.1101/2025.01.31.635828) [DOI] [Google Scholar]
- 15. Ornés AS, Herbst A, Spillner A, Mewes W, Rauch M. 2014. A standardized method for quantifying eggshell spot patterns. J. Field Ornithol. 85, 397–407. ( 10.1111/jofo.12079) [DOI] [Google Scholar]
- 16. Šulc M, et al. 2022. Automatic identification of bird females using egg phenotype. Zool. J. Linn. Soc. 195, 33–44. ( 10.1093/zoolinnean/zlab051) [DOI] [Google Scholar]
- 17. Kilner RM. 2006. The evolution of egg colour and patterning in birds. Biol. Rev. 81, 383–406. ( 10.1017/S1464793106007044) [DOI] [PubMed] [Google Scholar]
- 18. Cherry MI, Gosler AG. 2010. Avian eggshell coloration: new perspectives on adaptive explanations. Biol. J. Linn. Soc. 100, 753–762. ( 10.1111/j.1095-8312.2010.01457.x) [DOI] [Google Scholar]
- 19. Stoddard MC, Kilner RM, Town C. 2014. Pattern recognition algorithm reveals how birds evolve individual egg pattern signatures. Nat. Commun. 5, 4117. ( 10.1038/ncomms5117) [DOI] [PubMed] [Google Scholar]
- 20. Birkhead TR, Thompson JE, Cox AR, Montgomerie RD. 2021. Exceptional variation in the appearance of common murre eggs reveals their potential as identity signals. Ornithology 138, ukab049. ( 10.1093/ornithology/ukab049) [DOI] [Google Scholar]
- 21. Quach L, Miller AE, Hogan BG, Stoddard MC. 2021. Egg patterns as identity signals in colonial seabirds: a comparison of four alcid species. J. Exp. Zool. B Mol. Dev. Evol. 336, 595–605. ( 10.1002/jez.b.22945) [DOI] [PubMed] [Google Scholar]
- 22. Lyon BE, Eadie JM. 2008. Conspecific brood parasitism in birds: a life-history perspective. Annu. Rev. Ecol. Evol. Syst. 39, 343–363. ( 10.1146/annurev.ecolsys.39.110707.173354) [DOI] [Google Scholar]
- 23. Eadie JM. 1989. Alternative reproductive tactics in a precocial bird: the ecology and evolution of brood parasitism in goldeneyes. Doctoral thesis, University of British Columbia. ( 10.14288/1.0098189) [DOI] [Google Scholar]
- 24. Pöysä H, Runko P, Ruusila V, Milonoff M. 2001. Identification of parasitized nests by using egg morphology in the common goldeneye: an alternative to blood sampling. J. Avian Biol. 32, 79–82. ( 10.1034/j.1600-048x.2001.320112.x) [DOI] [Google Scholar]
- 25. Ådahl E, Lindström J, Ruxton GD, Arnold EK, Begg T. 2004. Can intraspecific brood parasitism be detected using egg morphology only? J. Avian Biol. 35, 360–364. ( 10.1111/j.0908-8857.2004.03224.x) [DOI] [Google Scholar]
- 26. Roy CL, Parker PG, Gates RJ. 2009. Egg morphology is an unreliable indicator of intraspecific nest parasitism in wood ducks. Condor 111, 377–381. ( 10.1525/cond.2009.080117) [DOI] [Google Scholar]
- 27. Lemons PR, Sedinger JS, Svete Randle P. 2011. Detecting conspecific brood parasitism using egg morphology in black brant Branta bernicla nigricans. J. Avian Biol. 42, 282–288. ( 10.1111/j.1600-048X.2011.05217.x) [DOI] [Google Scholar]
- 28. Cheng K, Zong C, Cai T, Ha L. 2016. The effectiveness of egg morphology for detecting parasitized nests and eggs for common coots (Fulica atra) in Heilongjiang, China. Waterbirds 39, 306–311. ( 10.1675/063.039.0311) [DOI] [Google Scholar]
- 29. Petrželková A, Pöysä H, Klvaňa P, Albrecht T, Hořák D. 2017. Egg morphology fails to identify nests parasitized by conspecifics in common pochard: a test based on protein fingerprinting and including female relatedness. J. Avian Biol. 48, 229–234. ( 10.1111/jav.00865) [DOI] [Google Scholar]
- 30. Eadie JM, Smith JNM, Zadworny D, Kühnlein U, Cheng K. 2010. Probing parentage in parasitic birds: an evaluation of methods to detect conspecific brood parasitism using goldeneyes Bucephala islandica and Bl. clangula as a test case. J. Avian Biol. 41, 163–176. ( 10.1111/j.1600-048X.2009.04735.x) [DOI] [Google Scholar]
- 31. Ferreira AC, Silva LR, Renna F, Brandl HB, Renoult JP, Farine DR, Covas R, Doutrelant C. 2020. Deep learning‐based methods for individual recognition in small birds. Methods Ecol. Evol. 11, 1072–1085. ( 10.1111/2041-210x.13436) [DOI] [Google Scholar]
- 32. Norouzzadeh MS, Morris D, Beery S, Joshi N, Jojic N, Clune J. 2021. A deep active learning system for species identification and counting in camera trap images. Methods Ecol. Evol. 12, 150–161. ( 10.1111/2041-210x.13504) [DOI] [Google Scholar]
- 33. Gómez J, Gordo O, Minias P. 2021. Egg recognition: the importance of quantifying multiple repeatable features as visual identity signals. PLoS One 16, e0248021. ( 10.1371/journal.pone.0248021) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 34. Ben Aoun N, Nhidi W, Ejbali R. 2025. Automatic avian parasitic egg identification from pertinent visual features using hybrid machine learning models. Int. J. Mach. Learn. Cyber. ( 10.1007/s13042-025-02762-2) [DOI] [Google Scholar]
- 35. Nhidi W, Ben Aoun N, Ejbali R. 2024. Brood parasitism identification using a deep learning model with Mish activation function. In Intelligent systems design and applications (eds Abraham A, Bajaj A, Hanne T), pp. 136–145. Cham, Switzerland: Springer Nature. ( 10.1007/978-3-031-64776-5_14) [DOI] [Google Scholar]
- 36. Tabak MA, et al. 2019. Machine learning to classify animal species in camera trap images: applications in ecology. Methods Ecol. Evol. 10, 585–590. ( 10.1111/2041-210x.13120) [DOI] [Google Scholar]
- 37. Weinstein BG. 2018. A computer vision for animal ecology. J. Anim. Ecol. 87, 533–545. ( 10.1111/1365-2656.12780) [DOI] [PubMed] [Google Scholar]
- 38. Wäldchen J, Mäder P. 2018. Machine learning for image based species identification. Methods Ecol. Evol. 9, 2216–2225. ( 10.1111/2041-210x.13075) [DOI] [Google Scholar]
- 39. Møller AP. 1989. Intraspecific nest parasitism in the swallow Hirundo rustica: the importance of neighbors. Behav. Ecol. Sociobiol. 25, 33–38. ( 10.1007/BF00299708) [DOI] [Google Scholar]
- 40. Beech ARF, Santos MC, Smith EB, Berejka BW, Liu Y, Tsunekage T, Levin II. 2022. High within-clutch repeatability of eggshell phenotype in barn swallows despite less maculated last-laid eggs. Ornithology 139, ukac024. ( 10.1093/ornithology/ukac024) [DOI] [Google Scholar]
- 41. McRae SB. 1997. Identifying eggs of conspecific brood parasites in the field: a cautionary note. Ibis 139, 701–704. [Google Scholar]
- 42. Grønstøl G, Blomqvist D, Wagner RH. 2006. The importance of genetic evidence for identifying intra-specific brood parasitism. J. Avian Biol. 37, 197–199. ( 10.1111/j.0908-8857.2006.03574.x) [DOI] [Google Scholar]
- 43. Li D, Bai Y, Li X, Guan S, Liu Y, Zhang Z. 2020. Lack of fine-tuned egg rejection adjustment in barn swallows with variable local abundance of common cuckoos. Behav. Process. 174, 104087. ( 10.1016/j.beproc.2020.104087) [DOI] [PubMed] [Google Scholar]
- 44. Honza M, Polačiková L. 2008. Experimental reduction of ultraviolet wavelengths reflected from parasitic eggs affects rejection behaviour in the blackcap Sylvia atricapilla. J. Exp. Biol. 211, 2519–2523. ( 10.1242/jeb.017327) [DOI] [PubMed] [Google Scholar]
- 45. Šulc M, Procházka P, Capek M, Honza M. 2016. Birds use eggshell UV reflectance when recognizing non-mimetic parasitic eggs. Behav. Ecol. 27, 677–684. ( 10.1093/beheco/arv206) [DOI] [Google Scholar]
- 46. Szala K, Tobolka M, Surmacki A. 2023. Presence of the cloud cover and elevation angle of the sun affect measurements of eggshell coloration and patterning obtained from calibrated digital images. Ecol. Evol. 13, e10170. ( 10.1002/ece3.10170) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 47. Schneider CA, Rasband WS, Eliceiri KW. 2012. NIH Image to ImageJ: 25 years of image analysis. Nat. Methods 9, 671–675. ( 10.1038/nmeth.2089) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 48. Troscianko J, Stevens M. 2015. Image calibration and analysis toolbox – a free software suite for objectively measuring reflectance, colour and pattern. Methods Ecol. Evol. 6, 1320–1331. ( 10.1111/2041-210x.12439) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 49. van den Berg CP, Troscianko J, Endler JA, Marshall NJ, Cheney KL. 2020. Quantitative colour pattern analysis (QCPA): a comprehensive framework for the analysis of colour patterns in nature. Methods Ecol. Evol. 11, 316–332. ( 10.1111/2041-210x.13328) [DOI] [Google Scholar]
- 50. Phansalkar N, More S, Sabale A, Joshi M. 2011. Adaptive local thresholding for detection of nuclei in diversity stained cytology images. In Proc. 2011 Int. Conf. Communications and Signal Processing (ICCSP), Kerala, India, 10–12 February 2011, pp. 218–220. New York, NY: IEEE. ( 10.1109/ICCSP.2011.5739305) [DOI] [Google Scholar]
- 51. Gómez J, Ramo C, Troscianko J, Stevens M, Castro M, Pérez-Hurtado A, Liñán-Cembrano G, Amat JA. 2018. Individual egg camouflage is influenced by microhabitat selection and use of nest materials in ground-nesting birds. Behav. Ecol. Sociobiol. 72, 142. ( 10.1007/s00265-018-2558-7) [DOI] [Google Scholar]
- 52. Šulc M, Troscianko J, Štětková G, Hughes AE, Jelínek V, Capek M, Honza M. 2019. Mimicry cannot explain rejection type in a host–brood parasite system. Anim. Behav. 155, 111–118. ( 10.1016/j.anbehav.2019.05.021) [DOI] [Google Scholar]
- 53. Troscianko J. 2014. A simple tool for calculating egg shape, volume and surface area from digital images. Ibis 156, 874–878. ( 10.1111/ibi.12177) [DOI] [Google Scholar]
- 54. Schreiber JB. 2021. Issues and recommendations for exploratory factor analysis and principal component analysis. Res. Soc. Adm. Pharm. 17, 1004–1011. ( 10.1016/j.sapharm.2020.07.027) [DOI] [PubMed] [Google Scholar]
- 55. Beecher MD. 1989. Signalling systems for individual recognition: an information theory approach. Anim. Behav. 38, 248–261. ( 10.1016/S0003-3472(89)80087-9) [DOI] [Google Scholar]
- 56. Linhart P, Osiejuk TS, Budka M, Šálek M, Špinka M, Policht R, Syrová M, Blumstein DT. 2019. Measuring individual identity information in animal signals: overview and performance of available identity metrics. Methods Ecol. Evol. 10, 1558–1570. ( 10.1111/2041-210x.13238) [DOI] [Google Scholar]
- 57. Breiman L. 2001. Random forests. Mach. Learn. 45, 5–32. ( 10.1023/A:1010933404324) [DOI] [Google Scholar]
- 58. Peirce JW. 2007. PsychoPy—psychophysics software in Python. J. Neurosci. Methods 162, 8–13. ( 10.1016/j.jneumeth.2006.11.017) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 59. Stone M. 1974. Cross-validatory choice and assessment of statistical predictions. J. R. Stat. Soc. B 36, 111–133. ( 10.1111/j.2517-6161.1974.tb00994.x) [DOI] [Google Scholar]
- 60. Liang W, Yang C, Wang L, Møller AP. 2013. Avoiding parasitism by breeding indoors: cuckoo parasitism of hirundines and rejection of eggs. Behav. Ecol. Sociobiol. 67, 913–918. ( 10.1007/s00265-013-1514-9) [DOI] [Google Scholar]
- 61. Šulc M, Hughes AE, Mari L, Troscianko J, Tomášek O, Albrecht T, Jelínek V. 2022. Nest sanitation as an effective defence against brood parasitism. Anim. Cogn. 25, 991–1002. ( 10.1007/s10071-022-01646-0) [DOI] [PubMed] [Google Scholar]
- 62. Eens M, Pinxten R. 1999. Responses of male spotless starlings Sturnus unicolor to experimental intraspecific nest parasitism vary in relation to the nesting stage. J. Avian Biol. 30, 122–125. ( 10.2307/3677253) [DOI] [Google Scholar]
- 63. Moksnes A, Elvertrø PA. 2006. Host responses against natural and experimental conspecific brood parasitism in the starling Sturnus vulgaris. Ornis Fenn. 83, 139–144. [Google Scholar]
- 64. Peer BD, Sealy SG. 2000. Conspecific brood parasitism and egg rejection in great‐tailed grackles. J. Avian Biol. 31, 271–277. ( 10.1034/j.1600-048X.2000.310301.x) [DOI] [Google Scholar]
- 65. Lopéz de Hierro MDG, Ryan PG. 2008. Nest defence and egg rejection in the house sparrow (Passer domesticus) as protection against conspecific brood parasitism. Behaviour 145, 949–964. ( 10.1163/156853908784089270) [DOI] [Google Scholar]
- 66. Soler M, Ruiz-Castellano C, del Carmen Fernández-Pinos M, Rösler A, Ontanilla J, Pérez-Contreras T. 2011. House sparrows selectively eject parasitic conspecific eggs and incur very low rejection costs. Behav. Ecol. Sociobiol. 65, 1997–2005. ( 10.1007/s00265-011-1209-z) [DOI] [Google Scholar]
- 67. Stokke BG, Fossøy F, Røskaft E, Moksnes A. 2017. Adaptations of brood parasitic eggs. In Avian brood parasitism: behaviour, ecology, evolution and coevolution (ed. Soler M), pp. 363–384. Cham, Switzerland: Springer. ( 10.1007/978-3-319-73138-4_20) [DOI] [Google Scholar]
- 68. López de Hierro MDG, De Neve L. 2010. Pigment limitation and female reproductive characteristics influence egg shell spottiness and ground colour variation in the house sparrow (Passer domesticus). J. Ornithol. 151, 833–840. ( 10.1007/s10336-010-0520-1) [DOI] [Google Scholar]
- 69. Huo J, Su T, Niu N, Yang C, Liang W. 2018. Last but not the least: effects of laying sequence on egg color variation and embryonic development of russet sparrow (Passer cinnamomeus). Avian Res. 9, 21. ( 10.1186/s40657-018-0113-x) [DOI] [Google Scholar]
- 70. Mari L, Šulc M, Szala K, Troscianko J, Eeva T, Ruuskanen S. 2025. Heavy metal pollution exposure affects egg coloration but not male provisioning effort in the pied flycatcher Ficedula hypoleuca. J. Avian Biol. 2025, e03283. ( 10.1111/jav.03283) [DOI] [Google Scholar]
- 71. Alexander RG, Nahvi RJ, Zelinsky GJ. 2019. Specifying the precision of guiding features for visual search. J. Exp. Psychol. 45, 1248–1264. ( 10.1037/xhp0000668) [DOI] [PMC free article] [PubMed] [Google Scholar]
- 72. Hulleman J. 2020. Quantitative and qualitative differences in the top-down guiding attributes of visual search. J. Exp. Psychol. 46, 942–964. ( 10.1037/xhp0000764) [DOI] [PubMed] [Google Scholar]
- 73. Delhey K, Delhey V, Kempenaers B, Peters A. 2015. A practical framework to analyze variation in animal colors using visual models. Behav. Ecol. 26, 367–375. ( 10.1093/beheco/aru198) [DOI] [Google Scholar]
- 74. Hughes AE, Mari L, Troscianko J, Jelínek V, Albrecht T, Šulc M. 2025. Supplementary material from: A machine learning approach to facilitate parasitic egg identification in a conspecific brood parasite. Figshare. ( 10.6084/m9.figshare.c.8156626) [DOI] [PubMed]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
All data for these analyses can be found in the supplementary information. Supplementary material is available online [74].




