Behind the beautiful facade of a rainforest, a savanna or a placid lake is a world teeming with contests and partnerships. Species are competing for space, consuming one another for resources, taking advantage of one another’s talents, and brokering trades of nutrients. But there’s something funny about this picture. When ecologists try to model ecosystems using math, they tend to find that the more interactions there are among species, the more unstable the system. For a simple ecosystem model to be stable, all the interactions among its species must be in perfect harmony. Maintaining that balancing act gets much harder, however, as the number of coupled species and the strengths of their interactions rise: Any disturbance or imbalance for one couple ripples outward and sows chaos throughout the network.

Bring in mutualisms, relationships in which species contribute directly to each other’s survival, and things can really fly off the handle. Pairs of organisms that live off each other sometimes do so well in the mathematical simulations — thriving exponentially in extreme cases, in what Robert May, the theoretical ecology pioneer, once called “an orgy of mutual benefaction” — that everything else can go extinct.

It seems unlikely that real ecosystems are quite this flimsy. In a new paper in Nature Communications, a pair of theoretical ecologists at the University of Illinois explored more precisely how the give-and-take in mutualism affects ecosystem stability and how, under the right conditions, it might contribute to it. Their result joins previous work in suggesting how real-world communities manage to be more resilient than the models imply.

While researchers have learned how to work around the inconsistencies to get more realistic outcomes in their modeling studies, lately the problem of mutualism has taken on new urgency, according to James O’Dwyer, a theoretical ecologist and associate professor at the University of Illinois at Urbana-Champaign, who co-authored the paper with Stacey Butler, one of his doctoral students. Growing knowledge of how common communities of microbes are and how important they are for health makes it more pressing to find out how to model them.

“Large microbial communities with a lot of cross-feeding interactions where there’s exchange of resources should have a lot of strong mutualistic interactions,” he said. In traditional models, this would make for a very unstable system, and yet stability is considered a hallmark of these communities. Gut microbiomes are notably stable during periods of health, and fluctuations coincide with illness.

For their study, O’Dwyer and Butler first built a model in which organisms are born, reproduce and die while consuming and competing for resources that arrive from elsewhere, in a representation of the flow of nutrients into a microbial ecosystem. The researchers specified the preferences the organisms had for different kinds of resources. “You can imagine that this bacterium grows better on this carbon source but a little worse on another carbon source, so it would prefer the former,” explained Stefano Allesina, a theoretical ecologist at the University of Chicago who was not involved in the research but reviewed it for publication. For certain values of nutrient influxes and death rates, a stable ecosystem emerged.

Then O’Dwyer and Butler introduced mutualism by directing that the organisms feed not only on external resources but on each other’s byproducts — and they were very specific about who got what from whom. As expected, the mutualisms had a destabilizing effect on the system. But an important exception was if the researchers specified that the mutualism had to be symmetric — if each party in the partnership gave the same amount that it took. In that case, the system returned to stability.

What makes this finding interesting, according to Allesina, is that in previous studies, mutualisms in which the two parties didn’t benefit equally were generally thought to be more stabilizing because they would not drive the expansion of both species quite so wildly.

Perfect balance in mutualisms seems like a demanding and unlikely solution to mutualism’s destabilization influence. “They do find a special case where they can maintain a diverse stable community that’s mutualistic. But it has very strict requirements on the nature of [the] interactions,” said Katharine Z. Coyte , a theoretical ecologist now at Boston Children’s Hospital. There may be more plausible ways for real ecosystems to cope. In a 2015 paper in Science, Coyte and her colleagues reported that intense competition among the bacteria in the microbiome may itself be a stabilizing force , keeping in check any species that might otherwise overrun the system.

Nevertheless, Coyte doesn’t rule out the possibility of the balanced mutualisms that O’Dwyer and Butler modeled. “It would be interesting to see if there are biological scenarios that are like this,” she said.

Indeed, O’Dwyer and his colleagues want to use real-life data to adjust their models. Snapshots of the species in the gut microbiome, taken from people’s fecal samples over months or years, could be helpful to look at, O’Dwyer said, along with detailed information about the microbes’ feeding choices. This would help narrow down the parameters for which their model could realistically work.

Meanwhile, the task of modeling large microbial communities continues to draw many researchers’ interest. What should biologists expect when they run experiments where many bacteria are living together, competing and probably exchanging resources?

At present, there is not much of a null hypothesis, according to Allesina. In a recent paper in Nature Ecology & Evolution, he and his collaborators asked what would happen if, for instance, they threw a hundred varied bacterial samples onto the lush, well-provisioned plane of a petri dish and watched to see who survived. They found that when you model such a scenario, many species die off, but eventually a stable ecosystem does often arise, and it remains stable regardless of how the species are connected to each other.

He hopes that such theoretical work may eventually help advance work in the lab. “People have made a lot of progress in genetics by studying model organisms,” he said. “It would be fun to have model ecosystems that we can repeat in the lab several times.” If researchers better understood how standard communities of gut bacteria behaved in the dish, this might lead to more nuanced and useful theory as well. Knowing that what’s seen in nature never arises under the simplest classical forms of ecosystem modeling, researchers could ask, which of all these newer models comes closest?