Evolution, ever the directionless tinkerer, has spent millions of years helping animals crawl out of the ocean and onto land. But as a new Yale University study reminds us, the journey wasn't always one-way: dozens of major groups of mammals and reptiles eventually said "actually, the water was fine" and went back, developing flippers and other aquatic adaptations along the way. The findings were published in Current Biology, presumably because Nature was already booked.

"These secondarily aquatic groups adapted in strikingly similar ways to their new aquatic home -- evolving flippers and a suite of other features that made them better swimmers," said lead author Caleb Gordon, who completed his doctorate at Yale's Graduate School of Arts and Sciences (GSAS) earlier this year and is now a postdoctoral researcher at the Florida Museum of Natural History. "As a result, they've become textbook examples of convergent evolution, which can tell us a lot about the processes driving and constraining adaptive change in response to similar environmental cues." In other words, when the environment hands you a niche, evolution will hand you a flipper. Repeatedly.

To reconstruct these evolutionary U-turns, the researchers examined hundreds of fossil and modern specimens housed at the Yale Peabody Museum and dozens of other institutions worldwide, collecting more than 11,000 measurements, photographs, and CT scans. They combined traditional paleontological techniques with machine learning models that account for evolutionary relationships, and threw in a statistical approach originally used by naval forces during World War II. Because nothing says "ancient reptile" quite like a mid-century military radar technique.

"Reconstructing the lives of extinct life forms in a scientifically rigorous way, as opposed to just telling stories, is a precise and delicate undertaking," said Bhart-Anjan Bhullar, senior author of the study and an associate professor of Earth and planetary sciences in Yale's Faculty of Arts and Sciences (FAS) and an associate curator of vertebrate paleontology and vertebrate zoology at the Peabody Museum. "It requires a careful interweaving of data from modern organisms, of which our understanding is necessarily far deeper, and knowledge of these living organisms' genealogy relative to fossil forms." He added that Gordon's work accomplishes all of this and more, on a massive evolutionary scale -- and without resorting to the paleontological equivalent of fan fiction.

For decades, scientists have disagreed about when particular groups of prehistoric animals became fully adapted to life underwater, largely because the fossil record often provides incomplete or conflicting clues. Some skeletal features may indicate an aquatic lifestyle, while others suggest the same animal remained capable of moving and feeding on land. These contradictions have left researchers stuck, as Gordon put it: "In these cases, paleontologists are often stuck, as different lines of evidence disagree about what the ancient animal was like." His solution? Machine learning models trained on living animals, which can identify relationships between skeletal proportions and known lifestyles and estimate how extinct species used aquatic environments -- even predicting soft tissue adaptations, including swimming structures that rarely survive in fossils.

The most headline-grabbing finding concerns Spinosaurus, the giant prehistoric dinosaur whose relationship with water has generated considerable controversy -- presumably because paleontologists enjoy a good argument. Spinosaurus lived approximately 113 million to 94 million years ago in what is now northern Africa. While scientists generally agree it was associated with aquatic environments, exactly how it moved, hunted, and spent its time has remained a subject of debate. Some evidence points to an animal that frequently submerged itself and pursued prey underwater, much like seals or penguins. Other findings suggest a lifestyle closer to that of a modern heron, with Spinosaurus walking and searching for food along shorelines and in shallow water. The Yale team's analysis provides new support for the more aquatic interpretation.

"Our results shed new light on how much time Spinosaurus spent submerged, which could support the underwater hunting view," Gordon said. "We confidently recovered highly aquatic habits for Spinosaurus, indicating that it spent the vast majority of its time submerged in the water." The findings don't settle every question about how Spinosaurus hunted, but they strengthen the case that this enormous predator spent much more of its life underwater than on land -- effectively making it the dinosaur equivalent of that one friend who never leaves the pool.

But not every ancient reptile was so eager to commit to the aquatic life. The researchers reached a different conclusion about mesosaurs, small marine reptiles that lived between 290 million and 274 million years ago in regions now forming parts of South Africa and eastern South America. Mesosaurs have long interested paleontologists because they gave birth to live young, a characteristic some researchers interpreted as evidence of a fully aquatic existence. However, the new analysis suggests their limbs were not adapted for a life spent entirely in water. Instead, their skeletal proportions indicate that mesosaurs regularly moved between aquatic and terrestrial environments.

"They spent a lot of time on land, like a modern-day alligator or platypus does," Gordon said. "Mesosaurs didn't completely leave the land behind." The findings suggest a broader pattern among the earliest marine reptiles: all Paleozoic marine reptiles (all marine reptiles around before the dinosaurs appeared) continued to return to land regularly. None appeared to have evolved a completely aquatic lifestyle, with even the most water-adapted species remaining amphibious -- essentially, they kept a foot on dry land, just in case.

The researchers found that forelimb proportions were particularly useful for distinguishing these lifestyles. Using this information, their models could predict with more than 90% accuracy whether an animal possessed soft tissue flippers and whether it had highly or fully aquatic habits. Not bad for a technique that started life tracking enemy planes.

An especially unusual part of the research involved adapting a statistical method developed during the 1940s. "Caleb resurrected a statistical technique from a bygone era," said co-author Jacques Gauthier, a professor of Earth and planetary sciences at Yale and curator-in-charge for vertebrate paleontology at the Peabody Museum. "It was developed during WWII to estimate the probability that an approaching blip on the radar screen was an enemy plane. Caleb cleverly used it to get at whether or not an extinct animal had limbs modified for swimming." The approach could eventually help scientists investigate other major evolutionary transitions, including when human ancestors developed the ability to walk on two legs and how the dinosaur ancestors of birds evolved the ability to fly -- because apparently we can't resist asking the big questions.

Because most prehistoric vertebrates are known primarily through their fossilized skeletons, reconstructing their behavior is one of paleontology's greatest challenges. Bones preserve valuable information, but they rarely provide a complete picture of how an animal lived. Traditionally, scientists have interpreted particular skeletal features to make arguments about the lifestyles of extinct species, and those interpretations can differ significantly, especially when fossils are incomplete or several anatomical characteristics point toward different conclusions. The new approach offers a more systematic way to evaluate that evidence, using patterns observed in living species to make testable predictions about animals that disappeared millions of years ago.

"Bones are all that is left to us of the vast majority of vertebrate animals that have lived on Earth," Bhullar said. "We want to know so very much about these creatures and the succession of lost worlds they inhabited, but we have so little on which to base our conclusions. From skeletal remains, people have tried to discern life habits, generally making an argument on the basis of one preferred set of features or another. Caleb's method removes the subjectivity from this process and allows the data to speak for themselves." Which is a polite way of saying: finally, a way to settle paleontological arguments without resorting to who has the loudest voice at the conference bar.

The study's additional co-authors are Lisa Freisem, a doctoral student at Yale's Graduate School of Arts and Sciences, and Christopher Griffin, an assistant professor of geosciences at Princeton University who previously worked as a postdoctoral fellow at Yale. Research support was provided by the Yale Institute for Biospheric Studies, the International Union for Conservation of Nature's Crocodile Specialist Group, and the National Science Foundation.