Collin P. Gross and his team at Stanford University have cracked a puzzle that has long puzzled ecologists: why are some caterpillars fussy eaters while others will devour almost anything in their path? The answer lies in a delicate dance between temperature, latitude, and sheer botanical abundance.

To uncover this secret, the research team analyzed an astonishing 87 million field records spanning more than 10,000 butterfly species and 150,000 plant varieties across the globe. The scope of the data—organized into a grid of 100-by-100-kilometer squares covering the world—allowed them to map the relationship between what caterpillars eat and the environments where they live.

Scientists had long observed that insects living near the equator tend to be pickier eaters than their cousins in temperate regions, but they didn't fully understand why. Gross's team set out to test a hypothesis: in tropical regions, where plant diversity explodes, caterpillars might specialize on a single plant family precisely because they can afford to. When thousands of plant species surround you, the logic goes, it makes evolutionary sense to master just one—learning to overcome its unique chemical defenses while avoiding competition with other insects eating the same plants.

The data confirmed this theory with remarkable clarity. In areas with abundant plant varieties, caterpillars were measurably pickier. This effect was strongest near the equator, where biodiversity peaks. Yet the researchers uncovered a complicating factor: heat itself pushed caterpillars toward broader diets. High temperatures and seasonal limitations force insects to be less selective, eating whatever plants are available to survive.

Here's where the story becomes truly interesting: plant diversity's effect on diet specialization proved far more powerful than temperature's influence. Even in hot climates, caterpillars living amid botanical abundance remained the pickiest eaters. "Our results reveal that global patterns in plant diversity, which are affected by climate, play a key role in shaping caterpillar diet breadth," the authors wrote in Nature Communications, "while there also exist direct effects of climate on diet breadth that are comparable in magnitude to the direct effects of plant diversity."

But nature rarely follows a single rulebook. The researchers discovered a striking exception on islands. Butterfly species on islands with diverse plant families actually had broader diets—the opposite of the mainland pattern. The team explains that island-dwelling insects often arrived in their new homes as generalists, forced to eat a wider range of plants to survive in unfamiliar territory. Yet even this rule has an exception: when an island hosts endemic species—plants found nowhere else on Earth—the insects evolve back into specialists, having spent generations alongside a limited botanical palette.

The study, led by Gross and published in Nature Communications, adds a crucial piece to our understanding of how life adapts to different corners of the world. It shows that biodiversity doesn't just exist in isolation; it actively shapes the feeding strategies and survival tactics of the creatures living within it. In tropical rainforests teeming with life, caterpillars have learned to do more with less—by specializing rather than generalizing. It's a reminder that in nature's most diverse places, the path to survival is often about becoming exquisitely, expertly picky.