Machine learning helps explain evolution of fish schools

Scientists have used new machine learning techniques to investigate a topic no one has ever found a way to study: The evolution of fish moving together in schools across thousands of species. 

The new paper, published Nov. 6 in the Proceedings of the National Academy of Sciences, is among the largest studies of the evolution of any behavior ever conducted in any group of species, according to the authors. The research shows that behaviors, which have previously been difficult to quantify, can be studied at a large evolutionary scale. 

The study reports that fish species have independently gained the capacity to move together as a unitsome 60 times – and lost it some 320 times – across the evolutionary tree of life for fish over the last 350 million years. Species can gain a trait when genetic mutations lead to changes that favor fitness and survival. Once that trait exists, it can be inherited by many descendant species, which can later lose it should it become no longer beneficial.  

“Independently, many lineages of fish went from not engaging in collective movement behavior to schooling,” said Andrew Hein, associate professor of computational biology in the College of Agriculture and Life Sciences (CALS). Hein is senior author of the study; Jay Love, a postdoctoral researcher in Hein’s lab, is first author. 

Perhaps what was more surprising is that the behavior was lost so many times, Hein said.  

“There were hundreds of examples across the tree where a lineage that engaged in collective movement left a daughter species that was solitary,” he said. “If you had asked me or other evolution of behavior experts before this study, we’d tell you that losses of collective behavior are probably very rare, but that’s simply not true.” While the evolution of collective behaviors – such as fish schooling, birds flying in a flock, or even people coordinating a wave in a stadium during a sports event – has been researched before, those studies, each including one or two species, add up to a few dozen species. 

Now, thanks to advances in machine learning, the researchers were able to classify both written descriptions of species behaviors as well as citizen science images of fish from iNaturalist and other sources to help quantify and analyze schooling behavior from an evolutionary perspective. The team trained a machine learning method known as a text transformer, the same method behind large language models, to analyze studies and descriptions of species and encode them as numbers that the researchers could then use to interpret whether a particular species might engage in collective movement. 

For images, the team used a series of machine learning techniques to analyze photos and videos, convert them into three dimensions, and assess the direction that individual fish were headed and pair their alignment with other individuals to determine if they were moving as a group. 

In total, the researchers were able to quantify observable traits, called phenotypes, of fish schoolingbehaviors for 2,839 species, or nearly 10% of the total 39,000 living fish species. 

“The study shows us that behaviors, which we often think of as very flexible and difficult to quantify, can be studied at this large evolutionary scale, in part with the help of these new machine learning methods,” Hein said. 

The techniques allowed the researchers to test two main hypotheses for why collective movement has evolved. 

“One is that it’s related to predator avoidance or collective defense, and that’s never been broadly tested,” Love said. The idea is that there is safety in numbers. To test this, the team examined where species that school occurred in the food chain. They hypothesized that a species low in the food chain with many predators might benefit from schooling. Similarly, one might expect a predator higher in the food chain to be a solitary species. 

“We did find this correlation exists,” Hein said. “There, in the data, species that are lower in the food chain are more likely to engage in collective behavior.” But, he added, the relationship isn’t iron clad, as many species low in the food chain don’t school, and many high in the food chain do, suggesting many factors influence whether a species gains or loses collective behavior. 

Another hypothesis is that schooling evolved to help individuals find scarce resources, Love said. “It would make sense to follow your neighbors around if they are eating the same thing,” he said. 

In fact, predators that move around in groups virtually all eat prey that also move in groups, Hein said. 

In addition, the researchers found that lineages where all the species engaged in schooling behavior were far more diverse, developing new species at a higher rate than lineages that didn’t school. 

“We don’t know if the speciation rate is higher or the extinction rate is lower, but we know that through a combination of those two things, we have more species being generated,” Love said. 

So, why have species in a lineage lost schooling behavior so many times? The researchers don’t know the answer, but they think clues may lie in drawbacks to collective movement. Fish that swim in groups are more susceptible to misinformation and information echo chambers – such as when a skittish fish darts away due to a false alarm, prompting all the fish to scatter. 

Another factor may be competition. If food is limited, moving as a group and sharing may not be an advantage. And finally, disease risk could play a role on longer time scales. “If you live in groups, you’re around lots of other individuals that are susceptible to similar diseases as you are, and that could be exerting some sort of major evolutionary force,” Hein said. 

Co-authors include graduate students Amlan Nayak and Abigail Grassick and post-doctoral associate Ling-Wei Kong, all in Hein’s lab; Ella Henry and Michael Gil at the University of Colorado, Boulder; Ashkaan Fahimipour at the Florida Atlantic University; and Matt Pennell, associate professor of computational biology in CALS. 

The study was funded by the National Science Foundation. 

Media Contact

Kaitlyn Serrao