Abstract
Yawning is a widespread and automatic behavior in vertebrates. Yawn contagion, responding with a yawn to others’ yawns, helps synchronize motor activities, particularly in social animals, promoting coordination within groups. While primarily observed in social, endothermic species, yawn contagion remains unconfirmed in ectotherms. We discovered yawn contagion in zebrafish (Danio rerio). Using a deep learning model to distinguish yawning from breathing, we found that fish not only yawn but also “catch” yawns from others. The presence of yawn contagion in fish raises important evolutionary questions, particularly regarding its origin. According to evolutionary biology theories, on one hand, it could be a shared trait among vertebrates, with the secondary loss of this phenomenon in some taxa. On the other hand, it may be a result of convergent evolution, emerging independently in different evolutionary lineages as a response to the need for synchronization of motor actions within social groups.

Similar content being viewed by others
Introduction
Yawning is a fixed action pattern widespread across vertebrate taxa including fish (Salvelinus leucomaenis)1, amphibians (Pheognathus hubrichti)2, reptiles (Geochelone carbonaria)3, birds (Melopsittacus undulatus)4, and mammals (Homo sapiens5, Pan troglodytes6, Mandrillus leucophaeus7, Panthera leo8). The evolutionary conserved trait of yawning and its presence at an early ontogenetic stage2,9 suggest the importance of this behavior in physiological regulation processes10. In endothermic species, three different phases have been operationally identified during a yawning event i) slow mouth opening and air inhalation, ii) maximum jaw stretching for a short period (acme), and iii) rapid mouth closing and air exhalation5,8,11, although some emerging data are indicating a certain degree of variability in the yawning execution12,13,14. Despite its apparent simplicity and automaticity, one of the most challenging aspects in the study of yawning in species living in different environments (terrestrial vs aquatic)15 and phylogenetically distant to humans is the unbiased detection of the behavior.
Yawning seems to be involved in the regulation of various physiological functions. It is suggested to have originally evolved as a thermoregulatory mechanism, particularly in endotherm vertebrates like mammals and birds16,17,18. Moreover, the behavior has been linked to physiological arousal, increasing heart rate and intracranial circulation through deep inhalation and jaw stretching19,20 and to brain cooling promoting wakefulness and cognitive performance16,21. Although most of the research on yawning has focused on endotherms, there is increasing evidence that yawning in ectotherms may also play a role in physiological state regulation such as thermoregulatory functions22. For instance, studies on ectotherm species have shown that yawning often occurs before a shift in behavioral states, suggesting a role in preparing for increased activity (fish1,23,24; amphibians2,25 and reptiles22). In endotherms, the state-change hypothesis posits that yawning functions as a mechanism to induce a behavioral transition from resting to activity, thus increasing physiological arousal (macaques12; drills7; chimpanzees13, lions8).
If yawning is widely observed across vertebrates, yawn contagion, the phenomenon of responding to others’ yawns with a yawn, has frequently been reported in endothermic social species5,20,26,27. To our knowledge, the only study focusing on yawn contagion in an ectotherm species (red footed tortoise, Geochelone carbonaria3) failed to find the phenomenon. One of the most parsimonious explanations for yawn contagion is the ‘chameleon effect,’ which posits that perceiving a behavior leads the observer to unconsciously imitate the gesture, aligning individuals’ activities26,27,28. Recent studies also indicate that yawn contagion may play a role in synchronizing group behavior. In lions (Panthera leo), yawn contagion among group members facilitates behavioral alignment, ensuring synchronized activity8. Such behavioral synchronization is vital for maintaining social cohesion and plays a key role in the cooperative dynamics of social species27,28. Despite being the subject of intense and lively scientific debate29,30,31, yawn contagion seems also to be involved in some empathic processes, being considered a phenomenon driven by emotional contagion, a building block of empathy32,33.
To understand the evolutionary roots of yawn contagion, we explored these phenomena in the zebrafish (Danio rerio), a freshwater fish, that are a valuable model in behavioral neuroscience research, complementing mammalian systems34,35, also considering that they share over 70% of genes with humans36. Due to its social habits and ability to transmit emotions to group members37,38, the species is highly suitable for studying yawn contagion, which has never been demonstrated in any ectothermic species3.
Spontaneous yawning has been already qualitatively described in fishes1,39. However, since clearly identifying yawning from simply breathing actions in aquatic vertebrates is challenging, some authors refer to the behavior as “mouth gaping” or “yawn-like” pattern40,41.
Here, we employed a deep learning approach to objectively distinguish yawning from breathing events in zebrafish. After clearly identifying yawning using a convolutional neural network (CNN), we experimentally tested for the presence of yawn contagion by using the previously deep learning-based classification of yawning and breathing events to create video stimuli.
Results
Deep learning classification of yawning and breathing events
We recorded videos lasting about 30 min for each of three groups of six adult zebrafish. Here, based on the existing literature1, we define yawning in fish as comprising three distinct phases: 1) mouth opening slowly and widely, reaching the maximum mouth size 2) mouth gaping typically accompanied by the expansion of the gill covers and by a noticeable stretching of the jaw, 3) rapid mouth closing. To empirically validate this distinction, we analyzed videos frame-by-frame and measured the duration of each yawning phase. Our results confirm that the third phase, characterized by rapid mouth closing (0.143 s ± 0.099), is consistently shorter than the first phase (0.339 s ± 0.148) as already reported for other vertebrate species12,14,15. A summary of the durations for the phases of each yawning event is provided in Supplementary Table 1.
We collected a total of 136 yawning and breathing events from all 18 individually identified subjects (Nfemales = 9; Nmales = 9). All the 136 yawning and 136 breathing events analyzed frame-by-frame were considered to start in correspondence with the first frame in which the lips appeared parted and to end in the correspondence with the frame in which the lips appeared closed. The goal was to extract a total of 11 frames centered around the acme of the event of interest (yawning or breathing), with 5 frames before and 5 frames after the specified moment. Then, these frames were utilized to fine-tune a CNN model (YOLOv8n) for the classification of different behaviors.
The CNN model was fine-tuned to classify three behaviors: yawning, breathing, and mouth closing (MC). Early stopping occurred at epoch 166 out of 200 since no further improvements were detected, with 36.8 ms of inference time, and a computational time of 7.135 h using an Apple M2 Pro CPU (Fig. 1a–c). The optimal network configuration has 73 layers, a total of 1,438,723 parameters, and a computational complexity of 3.3 GFLOPs. The proposed approach achieved an accuracy of 89% on the validation set. The CNN achieved a perfect 100% precision, recall, and F1-score for the mouth closing class, while for the breathing class, the network obtained a precision of 83%, recall of 85%, and F1-score of 84%. For the yawning class, the precision was 84%, recall 82%, and F1-score 84% on the validation set. On the test set, the CNN maintained a perfect 100% precision, recall, and F1-score for the mouth closing class. The CNN achieved a precision of 80%, recall of 86%, and F1-score of 83% for the breathing class, while for the yawning class, the network obtained a precision of 85%, recall of 78%, and F1-score of 81%. Overall, the CNN achieved an accuracy of 88% on the test set.
Performance of the CNN model in the classification task: training and validation loss curves show the model learning progress over epochs; the average accuracy achieved on the validation set is shown over epochs, along with the top accuracy among the three classes (A). Normalized confusion matrices for the validation (B) and test (C) sets. The boxplot (D) represents the duration of yawning (Y, light green) and breathing events (B event, light blue). Individual scores are shown as colored points. The boxes display the median value and first and third quartiles, whiskers are extended to the most extreme value inside the 1.5-fold interquartile range. A zebrafish (E) during mouth closing (MC) at the center of the image, during a breathing event (B) on the left and during a yawning event (Y) on the right. Credits for the drawings: Fosca Mastrandrea.
Basically, the deep learning classification overlaps with the a priori classification made by the two operators (A.G. and S.A.). Supplementary Fig. 1 presents twelve representative prediction samples selected from the test dataset, categorized by class (yawning, breathing, mouth closing) in descending order. These visually demonstrate the network’s ability to accurately classify the three target behaviors.
Yawning and breathing differ in their duration and motor actions
The duration of yawning and breathing events was compared (Linear Mixed Model, LMM, MODELduration). To investigate whether the DURATION (dependent variable, Gaussian distribution) differed between yawning and breathing, we compared a full model including yawning/breathing as fixed factor and the identity of the subjects (IDfish) as random factor with a null model including only the random factor. The models significantly differed (likelihood ratio test: χ2 = 195.97, df = 1, P < 0.01; Supplementary Table 2; Fig. 1d), with yawning events (00:00.92 s ±00:00.42 SE) lasting longer than breathing events (00:00.16 s ±00:00.02 SE). See Supplementary Data 1.
Additionally, out of a total of 136 yawns, in 75 cases (55.15%) we observed that yawning was not only associated with a mouth movement but also with appendage motor actions such as fin stretching and tail lowering (Fig. 1e; Supplementary Movie 1 and 2). The mean duration of fin stretching and tail lowering was 0.247 s, with a minimum of 0.014 and a maximum of 1.096 s. Notably, fin stretching and tail lowering always occurred within the entire duration of the yawn; there were no instances where these bodily motor actions started before the onset or ceased after the end of the yawn (Fig. 2a). Fin stretching and tail lowering were never recorded during breathing events (Fig. 1e; Supplementary Movie 3).
The panel (A) is a descriptive illustration showing that a fin stretching and tail lowering event always falls within the yawning time window. In the panel (B) the boxplot depicts the duration of yawns with (red) or without (yellow) the stretching event. The dots represent raw data points. The boxes display the median and the first and third quartiles, with whiskers extending to the most extreme values within 1.5 times the interquartile range.
Yawning with stretching lasts longer than yawning without stretching
To investigate whether the DURATION (dependent variable, Gaussian distribution) differed between yawning characterized by the presence/absence of stretching phase, we compared a full model including the presence of stretching phase as fixed factor and the identity of the subjects (IDfish) as random factor with a null model including only the random factor (Linear Mixed Model, LMM, MODELstretching). The models significantly differed (likelihood ratio test: χ2 = 34.149, df = 1, P < 0.01; Supplementary Table 2; Fig. 2b), with yawning events characterized by the presence of stretching phase lasting longer than yawning without this phase. See Supplementary Data 2.
Yawn contagion
To create the video stimuli for the yawn contagion experiment, we used the yawning and breathing events previously classified by the CNN. The stimuli were then edited using DaVinci Resolve 19 software: a 4-min experimental video (Yawningvideo) featuring the demonstrator performing yawning events, which included three repetitions of an empty tank period (1 min) alternated with three repetitions of 10 yawning events. The control video (Breathingvideo) was built following the identical protocol but for the presence of breathing events instead of yawning events (Fig. 3a). We tested 12 females and 10 males over eight different days. Each fish was tested with both stimuli (Breathingvideo and Yawningvideo) on the same day with a minimum interval of six hours.
The (A) part of the figure illustrates the experimental setting. Each gray box represents 25 s of empty tank image, each light blue box illustrates 10 breathing events, and each light green box illustrates 10 yawning events. The observations were conducted for 13 min starting from the last breathing or yawning event of the first block. The boxplot (B) shows the median of the number of yawns recorded under the two different conditions: the control (Breathingvideo, light blue) and experimental (Yawningvideo, light green). The dots show raw data. The boxes display the median value and first and third quartiles, whiskers are extended to the most extreme value inside the 1.5-fold interquartile range.
We ran a Generalized Linear Mixed Model (GLMM, MODELcontagion) to investigate whether the Yawning NUMBER (response variable, Poisson distribution with Zero-inflation) was more likely under Yawningvideo than Breathingvideo. The full model included CONDITION (Yawningvideo/Breathingvideo), SEX of the tester (male/female), ORDER OF TREATMENT (sequence in which stimuli were presented), and TIME of day (morning/afternoon) as fixed factors and IDfish as a random factor. This model was compared with a control model including all the fixed factors but CONDITION and SEX. The full model significantly differed from the control model (likelihood ratio test: χ2 = 9.467, df = 2, P = 0.008; Supplementary Table 3). The results show that the probability to obtain a yawn response under Yawningvideo was higher than during Breathingvideo (Fig. 3b). See Supplementary Data 3.
As a further control, we tested whether the likelihood of a breathing event differed between the Yawningvideo and the Breathingvideo conditions. The full and the control models for the MODELcontrol-contagion were built in an identical way to the MODELcontagion. We found that the full model did not significantly differ from the control model (likelihood ratio test: χ2 = 0.793, df = 2, P = 0.672). See Supplementary Data 4.
Yawn response latency
Latency was defined as the difference between the exact time-interval from the end of the first stimulus yawn to the onset of the response yawn. We ran a Generalized Linear Mixed Model (GLMM, MODELlatency_first) to investigate whether the LATENCY of the first yawn response (response variable, Poisson distribution) was shorter in Yawningvideo than in Breathingvideo. The full model included CONDITION (Yawningvideo/Breathingvideo), SEX of the tested subject (male/female), ORDER OF TREATMENT (sequence in which stimuli were presented), and TIME of day (morning/afternoon) as fixed factors and IDfish as a random factor. This model was compared with a control model including all the fixed factors but CONDITION. The full model significantly differed from the control model (likelihood ratio test: χ2 = 11.116, df = 1, P < 0.01; Supplementary Table 4). The results show that the latency of the first yawn response was shorter in Yawningvideo than in Breathingvideo (Fig. 4a). See Supplementary Data 5.
A Violin plot showing the distribution of the first yawn response latency (A) and the latencies for all yawn responses (B) under the two conditions: Yawn Condition (Yawningvideo, light green) and Control Condition (Breathingvideo, light blue). The dots show raw data. The violin plot displays the distribution of a numerical variable through its estimated density. The colored areas represent the data distribution, with its width indicating the estimated density of values at each level.
We repeated an identical model with all the yawn responses present in each trial as response variable to assess if the yawn responses are more time-blocked under the Yawningvideo compared to the Breathingvideo. The full and the control models for the MODELlatency_all were built in an identical way to the MODELlatency_first (Supplementary Table 4). We found that the full model significantly differed from the control model (likelihood ratio test: χ2 = 9.643, df = 1, P < 0.001) indicating that the latency of the yawn responses was shorter under Yawningvideo than during Breathingvideo (Fig. 4b).
Behavioral state change
A behavioral state change was considered when, within the second following the yawn, there was a change in direction (shift in movement orientation) or activity (from a stationary state to movement, or vice versa). We ran a binomial Generalized Linear Mixed Model (GLMM) to assess whether yawning with or without stretching influenced the probability of an immediate behavioral state CHANGE (response variable, binomial distribution). The full model included presence/absence of STRETCHING and the CONDITION (Yawningvideo/Breathingvideo) as fixed factors and IDfish and TRIAL NUMBER as random factors. The full model was compared with a control model including the CONDITION and the random factors. The full model significantly differed from the control model (likelihood ratio test: χ² = 25.414, df = 2, p < 0.001; Supplementary Table 5). The results showed that yawns accompanied by stretching were more likely to be followed by a change in behavioral state (Fig. 5).
Discussion
The CNN has intercepted with a high level of accuracy the differences between yawning and breathing events in zebrafish thus confirming that the yawning event is present as a distinct pattern in this species. Moreover, a yawn differed from a breathing event in the duration of the motor execution implying a profound mandibular stretching accompanied by the protrusion of oral bones. Such motor patterns are strongly similar to those recorded during yawning in other vertebrates10. Additionally, further motor bodily components involving fin stretching and tail lowering were present in more than half of yawning events (55%) (Fig. 1e, Supplementary Movie 1 and Supplementary Movie 2) and always started after the onset of the mandibular stretching (Fig. 2a). Moreover, those yawns including fin and tail stretching lasted longer than those without such bodily motor activation (Fig. 2b). Stretching different body districts while yawning is a phenomenon known as pandiculation or stretch-yawning syndrome, well reported in many mammals39 and birds41. In terrestrial vertebrates, pandiculation has a role in re-activating the central nervous system after resting periods thus preparing organisms to properly and rapidly react to environmental stimuli. Such re-activation seems to be present also in zebrafish. The analysis of the behavior state change after a simple yawn and after a yawn accompanied by body stretching revealed that the probability of a behavioral shift was higher in the latter than the former situation (Fig. 5). It is difficult to say if yawning and pandiculation are homologous traits across vertebrate taxa, however, the evidence of these phenomena in zebrafish suggests possible convergences in their functions1. A further interesting issue regarding spontaneous yawning in ectotherms is its covariation with temperature and physiological arousal, as recently demonstrated in reptiles22. This finding appears to align with the data already available for endotherms.
Our data indicate that yawn contagion is present in zebrafish that were more than twice as likely to yawn while visually detecting others’ yawns. An incidence which is very similar to that reported for humans5. We found not only that the yawning responses were significantly higher during Yawningvideo compared to Breathingvideo, but also that the latency of responses were shorter in the former than in the latter condition (Supplementary Table 4, Fig. 4). The deep learning analysis made us confident that the Yawningvideo and Breathingvideo provided to the tested fish actually included the yawning and breathing stimuli, respectively. Moreover, the environmental conditions (e.g., temperature, light-dark yawn contagion, pH, manipulative phases, tank uniformly illuminated) were kept constant across all stages of the experiment, and the experiments were conducted away from feeding phases. Therefore, the differences in the number of yawns emitted in the yawning and breathing conditions can be ascribed to the different visual dynamic components of the stimulus administered and not to other environmental stimuli. The ability to visually perceive the yawns of others aligns with the zebrafish visual perception capabilities, which are, from a neural perspective, particularly sophisticated and complex42.
The presence of yawn contagion in fish raises thought-provoking evolutionary questions, thus inviting deeper reflection particularly regarding the origin of the phenomenon. According to evolutionary biology theories, yawn contagion may have two possible origins. On one hand, its demonstration could trace the origins of this motor resonance phenomenon back in evolutionary history, at least coinciding with the emergence of modern teleosts (200–250 million years ago), followed by the secondary loss of this trait in certain taxa (absence of yawn contagion: Geochelone carbonaria3, Corvus corax43, Gorilla gorilla44; presence of yawn contagion: Melopsittacus undulatus45, Pan paniscus46). On the other hand, it may represent a result of convergent evolution, with yawn contagion emerging independently in different evolutionary lineages as a response to the need for synchronization of motor actions within social groups. Further studies on other vertebrate taxa (e.g., amphibians) could help address the intricate issue on the evolution of contagious yawning.
Yawn contagion in zebrafish can be interpreted in light of both proximate (e.g., social cognitive abilities) and ultimate factors (e.g., evolutionary advantages) (sensu Tinbergen47). Recent studies on this species’ ability to share others’ emotional states48, whether positive or negative49, reveal intriguing parallels with mammalian neural systems involved in emotional contagion, which is well-documented in humans50. Zebrafish can share the fear or distress of others both behaviorally and physiologically. They are more likely to engage with distressed individuals than with those in neutral states, even though the distress may signal potential risks51. The approaches of zebrafish towards distressed individuals can provide various tangible benefits to the interacting agents such as stress buffering35, enhanced vigilance, attack mitigation, and antipredator advantages52.
The presence of yawn contagion in zebrafish may also be explained by its potential evolutionary advantages. Yawning serves as a dependable predictor of upcoming behavioral state changes52,53 and there are empirical data showing that yawn contagion between two agents facilitates their subsequent behavioral alignment7 and vigilance state54. Synchronization at a group-level derives from synchronization at the dyadic level32. In line with the concept of perception-action coupling proposed by de Waal and Preston33, the ability to mirror the behaviors of others becomes exceptionally beneficial for animals whose survival and reproductive success depend on qualities like unity and social connection. Synchronization makes the school formation and maintenance possible in fish. Schooling acts as a vital cohesive social system offering numerous advantages, such as decreased risk of predation (e.g., vigilance, dilution effect) and enhanced efficiency in food searching54. Although it remains uncertain whether yawn contagion enhances spatial and social alignment, its presence in zebrafish hints at potential implications for their social behavior. It would be interesting to investigate whether yawn contagion occurs in solitary fish species that do not engage in schooling or shoaling. This could help determine if and to what extent social synchronization plays a role in the emergence of this motor resonance phenomenon.
In sum, here we overcame the challenges of detecting and classifying yawns in fish using a deep learning model thus underlining the importance of artificial intelligence in comparative studies. Then, we obtained robust results, consistent across diverse experimental conditions in highly controlled environments, demonstrating that yawn contagion in zebrafish is not a mere coincidence but a genuine motor resonance phenomenon. Our findings challenge the prevailing assumption that yawn contagion is confined to mammal and bird species thus opening new avenues for exploring the neurobiological mechanisms underlying this phenomenon and its potential functions from an evolutionary perspective.
Methods
Zebrafish care
Zebrafish AB strains adults were housed in 3.5-liter tanks (28 cm ×11 cm × 17 cm) in social groups of 16 fishes per tank on a 14 h light/10 h dark yawn contagion. Fish water was maintained at a constant temperature of 28 °C, with a pH of 7.2 and conductivity of 700 μS. Zebrafish were fed twice daily with dry pellets and brine shrimp. On the day of the experiment, the fish were fed 12 h prior to the test. Husbandry and experimental procedures were carried out in accordance with European Legislation for the Protection of Animals used for Scientific Purposes (Directive 2010/63/EU), the Italian (D.lgs. 26/ 2014) animal protection standards, and the local Ethical Committee of the University of Pisa (authorization n.99/2012-A, 19.04.2012).
Deep learning classification of yawning and breathing events
We collected videos of 18 subjects, each individually identified by their body size, colors, and stripe patterns. Video recordings were conducted over three different days at various times of the day in a quiet room. The videos commenced after a 1-h acclimation period to habituate the fish to the presence of the video camera. A full HD video camera (Sony FDR-AX43A) was consistently mounted on a stand to ensure high video quality. Videos were analyzed via Pot-Player software that allows slowing down the frames of interest. We recorded all the yawning events and the same amount of breathing events per each subject. For each event, we listed: i) the exact time of the day, ii) the identity of the yawner, iii) notes about the good visibility of the display.
Inter-observer reliability was calculated throughout the analysis. Every 30 yawning and breathing events, 5 events were randomly selected and independently scored by two observers. Cohen’s κ reached a score of 0.98 for the yawning events and 0.94 for the breathing events.
We selected the events on the basis of the best quality images obtaining 1080 frames from 18 subjects. To extract the 11 specific frames from each yawning and breathing event, we utilized the ‘subprocess’ module in Python to execute the FFmpeg command. The frames were used to fine-tune a CNN for the classification of different behaviors.
The model was fine-tuned to accurately differentiate yawning from other events (breathing/mouth closing) in zebrafish, ensuring precise and unbiased identification for further analysis. We chose the YOLOv8n (You Only Look Once, version 8 nano) model due to its exceptional performance in object detection, especially in real-time applications. YOLOv8n offers a good balance between detection accuracy and computational efficiency, making it suitable for processing large datasets like ours, where precise classification of similar behaviors is required. This model also has a well-documented architecture and training process, which supports the replicability of our study. The model was fine-tuned using frames previously extracted from the video data collected. Data augmentation techniques were applied to increase the diversity of the training data, thereby improving the model’s robustness to variations in the visual presentation of the events. The model was fine-tuned using a pre-trained version of YOLOv8n (nano), which had been trained on the ImageNet dataset. The selected model leverages a CNN architecture comprising three core components: backbone, neck, and head. The backbone, a modified CSPDarknet53, employs a feature pyramid network to facilitate multi-scale object detection. The pre-trained model, consists of 99 layers, 1,442,131 parameters, with a computational requirement of 3.4 GFLOPs. The dataset, containing 1080 images evenly distributed across three classes (yawning; breathing, and mouth closing events), was divided into training, validation, and testing sets with a 70-20-10 ratio. For the training process, we used a batch size of 32 over 200 epochs, implementing early stopping with a patience of 100 to prevent overfitting. Standard data augmentation techniques were applied. Model evaluation encompassed loss, accuracy, precision, recall, and F1-score metrics. The detailed documentation of our training process, model selection, and data handling methods ensures that this phase of the study is replicable. Training and subsequent analyses were executed using Ultralytics in Python.
Yawn contagion
To create Yawningvideo and Breathingvideo, we used the yawning and breathing events classified by the CNN (see Results for details). We also edited a 10-min video of the housing tank without fish, used as a background video during acclimatization. During the tests, the videos were displayed on monitors as life-size images. The experiments were conducted in a test tank (13 × 28 × 7 cm), illuminated by a LED which provided a homogeneously diffused light, with an LCD monitor (RedMi Note 11 Pro 5 G or iPhone X) placed on one of the two long sides of the tank, visible through the glass walls. The remaining part of the tank was covered with black cardboard sheeting to block light and prevent visual interference from external stimuli. The focal fish were kept in overnight isolation, housed individually in the test. The following day, after correctly positioning the monitor, a camera (SONY FDR-AX43A 4K) was placed on the opposite side of the monitor. Recording was started just before the stimulus began. Each fish was tested with both stimuli (Breathingvideo and Yawningvideo) on the same day with a minimum interval of 6 h. The fish were tested with one of the two stimuli in random order after a coin toss. The focal fish (N = 22) were not familiar with the demonstrators in the video (i.e., they never had prior contact). During the entire duration of the experiments, no one had access to the laboratory. The videos of the tested subjects were then analyzed using the same methods previously employed. All the yawning and the breathing events were classified and counted by AG and SA obtaining the following inter-observer variability scores: 0.97 for the yawning events and 0.95 for the breathing events.
Subsequently, the yawning and breathing events, independently classified by two authors, were evaluated using the deep learning model to assess the accuracy of the initial classifications made by the operators.
Statistics and reproducibility
Modelduration
To examine whether yawning and breathing events differ in their duration, we ran a LMM (glmmTMB R-package55; Version 1.4.1717). As for the variables included in the model see Results.
Modelstretching
To test whether yawning with stretching phase and yawning without stretching phase differ in their duration, we ran a LMM (glmmTMB R-package55). As for the variables included in the model, see Results. For this model and the previous one we verified the normal distribution and homogeneity of the model’s residuals by looking at the Q-Q plot and plotting the residuals against the fitted values.
MODELcontagion
To test for the presence of YAWN CONTAGION (number of yawns under Yawningvideo and Breathingvideo conditions), we ran a GLMM56. As for the variables included in the model, see Results. We found no evidence of collinearity among the fixed factors (VIFmin = 1.02; VIFmax = 1.11). As a further control, we also ran a second GLMM (MODELcontrol-contagion), in which the response variable was the number of breathing events under Yawningvideo and Breathingvideo conditions. As for the variables included in the model, see Results. We found no evidence of collinearity among the fixed factors (VIFmin = 1.02; VIFmax = 1.11).
MODELlatency
To test for the LATENCY of the first yawn response under Yawningvideo and Breathingvideo conditions, we ran a GLMM56. As for the variables included in the model, see Results. We found no evidence of collinearity among the fixed factors (VIFmin = 1.02; VIFmax = 1.08).
MODELchangestate
To test for the probability of having a behavioral CHANGE state after a yawn with stretching or without under Yawningvideo and Breathingvideo conditions, we ran a GLMM56. As for the variables included in the model, see Results. We found no evidence of collinearity among the fixed factors (VIFmin = 1.01; VIFmax = 1.81).
By using a likelihood ratio test (LRT, Anova with argument test “Chisq”57), we tested the significance of each full model57. Then, the p-values for the individual predictors were calculated based on the likelihood ratio tests between the full and the null/control model by using the R-function Anova in the R-package car 3.0-1058.
To ensure reproducibility, our study employed a rigorous experimental design with 18 zebrafish (AB strain) individually identified by body size, coloration, and stripe patterns. Video recordings were conducted over three separate days at different times, with each subject tested under controlled conditions following a standardized protocol. To minimize variability, fish were acclimated for 1 h before testing, and all experiments were conducted in a quiet, controlled environment. Husbandry conditions were meticulously maintained. All behavioral events (yawning and breathing) were manually annotated and validated through inter-observer reliability checks (Cohen’s κ = 0.98 yawning, 0.94 breathing) to enhance accuracy. To facilitate replication, all video data, annotation workflows, and deep learning classification models (YOLOv8n) were documented and executed using standardized pipelines in Python. The complete dataset was divided into training, validation, and testing subsets following a 70-20-10 split, ensuring balanced representation across behavioral categories. For testing yawn contagion, we used a double-control approach. Each fish was tested with both stimuli (Yawningvideo and Breathingvideo). Additionally, we ran a control model to verify that breathing responses did not differ between conditions, confirming that the observed yawning responses were specific to the yawning stimulus.
Reporting summary
Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.
Data availability
The data that support the findings of this study are available as Supplementary Material.
References
Yamada, H. & Wada, S. Fish yawn: the state-change hypothesis in juvenile white-spotted char Salvelinus leucomaenis. J. Ethol. 41, 111–117 (2023).
Bakkegard, K. A. Yawning by Red Hills salamanders (Phaeognathus hubrichti) at their burrow entrance. Herpetol. Rev. 48, 32–36 (2017).
Wilkinson, A., Sebanz, N., Mandl, I. & Huber, L. No evidence of contagious yawning in the red-footed tortoise Geochelone carbonaria. Curr. Zool. 57, 477–484 (2011).
Gallup, A. C., Miller, M. L. & Clark, A. B. Yawning and thermoregulation in budgerigars, Melopsittacus undulatus. Anim. Behav. 77, 109–113 (2009).
Provine, R. R. Yawning: the yawn is primal, unstoppable and contagious, revealing the evolutionary and neural basis of empathy and unconscious behavior. Am. Sci. 93, 532–539 (2005).
Campbell, M. W. & Cox, C. R. Observational data reveal evidence and parameters of contagious yawning in the behavioral repertoire of captive-reared chimpanzees (Pan troglodytes). Sci. Rep. 9, 13271 (2019).
Galotti, A. et al. More than a simple fixed action pattern: Yawning in drills. Primates 65, 281–297 (2024).
Casetta, G., Nolfo, A. P. & Palagi, E. Yawn contagion promotes motor synchrony in wild lions, Panthera leo. Anim. Behav. 174, 149–159 (2021).
Ferrari, G. A. et al. Ultrasonographic investigation of human fetus responses to maternal communicative and non-communicative stimuli. Front. Psychol. 7, 354 (2016).
Krestel, H., Bassetti, C. L. & Walusinski, O. Yawning—its anatomy, chemistry, role, and pathological considerations. Prog. Neurobiol. 161, 61–78 (2018).
Barbizet, J. Yawning. J. Neurol. Neurosurg. Psychiatry 21, 203 (1958).
Zannella, A., Stanyon, R., Maglieri, V. & Palagi, E. Not all yawns tell the same story: the case of Tonkean macaques. Am. J. Primatol. 83, e23263 (2021).
Vick, S. J. & Paukner, A. Variation and context of yawns in captive chimpanzees (Pan troglodytes). Am. J. Primatol. 72, 262–269 (2010).
Galotti, A., Romano, R., Baragli, P. & Palagi, E. Yawning in sync: implications for social cohesion in horses. Curr. Zool. zoae052, https://doi.org/10.1093/cz/zoae052 (2024).
Ames, A. E. Yawn-like behavior in a beluga whale (Delphinapterus leucas). Aquat. Mamm. 48, 495–500 (2022).
Gallup, A. C., & Gallup, G. G. Yawning as a brain cooling mechanism: nasal breathing and forehead cooling diminish the incidence of contagious yawning. Evol. Psychol. 5; https://doi.org/10.1177/147470490700500109 (2007).
Massen, J. J. et al. Brain size and neuron numbers drive differences in yawn duration across mammals and birds. Commun. Biol. 4, 503 (2021).
Provine, R. R. Yawning as a stereotyped action pattern and releasing stimulus. Ethology 72, 109–122 (1986).
Gallup, A. C. Why do we yawn? Primitive versus derived features. Neurosci. Biobehav. Rev. 35, 765–769 (2011).
Gallup, A. C. The causes and consequences of yawning in animal groups. Anim. Behav. 187, 209–219 (2022).
Shoup-Knox, M. L., Gallup, A. C., Gallup, G. G. Jr & McNay, E. C. Yawning and stretching predict brain temperature changes in rats: support for the thermoregulatory hypothesis. Front. Evol. Neurosci. 2, 108 (2010).
Kotake, K. T., Yamaguchi, S. T., Mukai, Y., Zhou, Z. & Norimoto, Z. Yawning and its temperature-dependent modulation in leopard geckos. Zool. Sci. 42, 25–30 (2024).
Myrberg, A. A. Jr, Ha, S. J., Walewski, S. & Banbury, J. C. Effectiveness of acoustic signals in attracting epipelagic sharks to an underwater sound source. Bull. Mar. Sci. 22, 926–949 (1972).
Baenninger, R. On yawning and its functions. Psychon. Bull. Rev. 4, 198–207 (1997).
Hartzell, S. M., Pitt, A. L. & Davis, S. Observations of yawning behaviour in the eastern hellbender (Cryptobranchus alleganiensis alleganiensis). Herpetol. Bull. 142, 46–47 (2017).
Guggisberg, A. G., Mathis, J., Schnider, A. & Hess, C. W. Why do we yawn?. Neurosci. Biobehav. Rev. 34, 1267–1276 (2010).
Palagi, E., Celeghin, A., Tamietto, M., Winkielman, P. & Norscia, I. The neuroethology of spontaneous mimicry and emotional contagion in human and non-human animals. Neurosci. Biobehav. Rev. 111, 149–165 (2020).
Yoon, J. M. & Tennie, C. Contagious yawning: a reflection of empathy, mimicry, or contagion?. Anim. Behav. 79, e1–e3 (2020).
Massen, J. J. & Gallup, A. C. Why contagious yawning does not (yet) equate to empathy. Neurosci. Biobehav. Rev. 80, 573–585 (2017).
Gallup, A. C. On the link between emotional contagion and contagious yawning. Neurosci. Biobehav. Rev. 121, 18–19 (2021).
Palagi, E., Celeghin, A., Tamietto, M., Winkielman, P. & Norscia, I. Disentangling attentional and affective contribution to contagious yawning. Neurosci. Biobehav. Rev. 132, 892–893 (2022).
Duranton, C. & Gaunet, F. Behavioural synchronization from an ethological perspective: Overview of its adaptive value. Adapt. Behav. 24, 181–191 (2016).
de Waal, F. B. M. & Preston, S. D. Mammalian empathy: behavioural manifestations and neural basis. Nat. Rev. Neurosci. 18, 498–509 (2017).
Choi, T. Y., Choi, T. I., Lee, Y. R., Choe, S. K. & Kim, C. H. Zebrafish as an animal model for biomedical research. Exp. Mol. Med. 53, 310–317 (2021).
Mrinalini, R., Tamilanban, T., Kumar, V. N. & Manasa, K. Zebrafish - the Neurobehavioural model in trend. Neuroscience 520, 95–118 (2023).
Barbazuk, W. B. et al. The syntenic relationship of the zebrafish and human genomes. Genome Res. 10, 1351–1358 (2000).
Burbano Lombana, D. A., Macrì, S. & Porfiri, M. Collective emotional contagion in zebrafish. Front. Behav. Neurosci. 15, 730372 (2021).
Akinrinade, I. et al. Evolutionarily conserved role of oxytocin in social fear contagion in zebrafish. Science 379, 1232–1237 (2023).
Baenninger, R. Some comparative aspects of yawning in Betta splendens, Homo sapiens, Panthera leo, and Papio sphinx. J. Comp. Psychol. 101, 349 (1987).
Ritter, E. K. Mouth gaping behavior in Caribbean reef sharks, Carcharhinus perezi. Mar. Freshw. Behav. Phy. 41, 161–167 (2008).
Gallup, A. C., Militello, J., Swartwood, L. & Sackett, S. Experimental evidence of contagious stretching and ingroup bias in budgerigars (Melopsittacus undulatus). J. Comp. Psychol. 131, 69 (2017).
Baier, H. & Scott, E. K. The Visual Systems of Zebrafish. Annu. Rev. Neurosci. 47, 255–276 (2024).
Gallup, A. C., Schild, A. B., Ühlein, M. A., Bugnyar, T. & Massen, J. J. No evidence for contagious yawning in juvenile ravens (Corvus corax): an observational study. Animals 12, 1357 (2022).
Palagi, E., Norscia, I. & Cordoni, G. Lowland gorillas (Gorilla gorilla gorilla) failed to respond to others’ yawn: Experimental and naturalistic evidence. J. Comp. Psychol. 133, 406 (2019).
Gallup, A. C., Swartwood, L., Militello, J. & Sackett, S. Experimental evidence of contagious yawning in budgerigars (Melopsittacus undulatus). Anim. Cogn. 18, 1051–1058 (2015).
Demuru, E. & Palagi, E. In bonobos yawn contagion is higher among kin and friends. PLoS One 7, e49613 (2012).
Tinbergen, N. Derived activities; their causation, biological significance, origin, and emancipation during evolution. Q. Rev. Biol. 27, 1–32 (1952).
Kareklas, K. & Oliveira, R. F. Emotional contagion and prosocial behaviour in fish: an evolutionary and mechanistic approach. Neurosci. Biobehav. Rev. 163, 105780 (2024).
Burbano, D., Senthilkumar, S. & Manzini, M. C. Exploring emotional contagion in zebrafish: A virtual-demonstrator study of positive and negative emotions. Behav. Process. 213, 104961 (2023).
Prochazkova, E. & Kret, M. E. Connecting minds and sharing emotions through mimicry: A neurocognitive model of emotional contagion. Neurosci. Biobehav. Rev. 80, 99–114 (2017).
Mukherjee, I. & Bhat, A. Hiding in the bush, in fear of a predator! Vegetation and predators influence shoaling among wild zebrafish. bioRxiv, http://www.biorxiv.org/content/10.1101/2023.07.02.547402v1 (2023).
Corey, T. P., Shoup-Knox, M. L., Gordis, E. B. & Gallup, Jr G. G. Changes in physiology before, during, and after yawning. Front. Evol. Neurosci.3, 7 (2012).
Gallup, A. C. & Meyers, K. Seeing others yawn selectively enhances vigilance: An eye-tracking study of snake detection. Anim. Cogn. 24, 583–592 (2022).
Pitcher, T. J. Functions of shoaling behaviour in teleosts. In: The behaviour of teleost fishes (ed. Pitcher, T. J.) 294-337 (Springer US, 1993).
Kuhn, M., Wing, J., Weston, S., Williams, A. & Keefer, C. Engelhardt and Team RC Package ‘caret’. R. J. 223, 7 (2020).
Dobson, A. J. An introduction to Generalized Linear Models, 2nd edn (Chapman and Hall/CRC Press, 2002).
Forstmeier, W. & Schielzeth, H. Cryptic multiple hypotheses testing in linear models: overestimated effect sizes and the winner’s curse. Behav. Ecol. Sociobiol. 65, 47–55 (2012).
Fox, J. & Weisberg, S. Nonlinear regression, nonlinear least squares, and nonlinear mixed models in. R. Popul. 150, 200 (2019).
Acknowledgements
We really thank Fosca Mastrandrea for the drawings. The deep learning analysis was funded by National Geographic Meridian Project OCEAN-ROBOCTO (NGS-106067R-23).
Author information
Authors and Affiliations
Contributions
E.P., M.A. conceived the study; A.G., S.A. performed video analyses; A.G., under E.P. and M.A. supervision, prepared the stimuli; A.G., M.D. and S.A. performed the experiment; M.D. provided technical support for the data collection; A.G. performed video analysis of the experiment; A.G., E.P. and M.A. performed statistical analysis; G.M., D.R. performed the deep learning training and analysis; A.G., E.P., M.A., G.M., M.D. drafted the manuscript; all the authors revised the first draft of the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Ethics
The study was purely observational without the manipulation of animals. For these reasons, the committee (Animal Care and Use board of University of Pisa) waived the need for a permit. We have complied with all relevant ethical regulations for animal use.
Peer review
Peer review information
Communications Biology thanks the anonymous reviewers for their contribution to the peer review of this work. Primary Handling Editors: Pawel Fedurek and Michele Repetto.
Additional information
Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Galotti, A., Manduca, G., Digregorio, M. et al. Diving back two hundred million years: yawn contagion in fish. Commun Biol 8, 580 (2025). https://doi.org/10.1038/s42003-025-08004-z
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s42003-025-08004-z