Discussions about weight loss may soon take a dramatic turn. At issue will be the microbiome, a collection of bacteria that lines the intestine, nose, throat, skin, and genital tract.

Although people are blissfully unaware of its existence, humans have about 10 times more bacteria lining the surface of their bodies (about 100 trillion) than they have cells in their bodies (about 10 trillion). In many ways, we live in peace with our microbiome, which helps to digest food and balance glucose levels. But the microbiome has also been associated with various problems, including asthma, allergies, eczema, and diabetes. The microbiome also helps to store fat, which can lead to obesity.

Obesity isn’t a trivial problem—it affects life-expectancy, quality of life, and health-care costs. The problem is far more common than most people realize. More than 44 percent of the world’s population is obese; 300 million people are morbidly obese. In the United States, about 35 percent of the population battles obesity.

So how can you know whether you have a good microbiome or a bad microbiome?

Microbiomes are acquired when babies leave the womb (which is sterile) and enter the birth canal (which isn’t). This is the moment when people inherit a set of bacteria that will later determine whether they are more likely to be thin or obese. So what do we do? We fight back with diet and exercise. As a consequence, many people successfully lose weight. Unfortunately, about 80 percent of those who lose weight will regain it within 12 months. The “yo-yo effect” occasionally exceeds the original weight. Researchers have now shown that both the propensity for obesity and the demoralizing weight rebound can be predicted by the type of bacteria that comprise the intestinal microbiome.

Can the microbiome be manipulated away from the obese phenotype and toward the thin phenotype? Recently, scientists have performed a series of studies that offer a ray of hope.

In 2013, Jeffrey Gordon and coworkers at the University of Washington studied three sets of female fraternal twins and one set of identical twins. In each case, one twin was obese and the other thin. The researchers then took fecal samples from an obese twin or a thin twin and transferred them into the intestines of mice that were sterile (so-called germ-free mice). Although all of the mice ate the same amounts of food, those that had received intestinal bacteria from obese women stored more fat and grew heavier than those that had received microbiomes from thin women.

When Gordon and his colleagues put the thin mice and obese mice into the same cage, they found something that surprised them. The obese mice became thin. The reason was that mice are coprophagic, meaning that they eat feces from other mice. In this case, the obese mice ate the feces from the thin mice. (It’s unclear whether it is more disgusting that mice eat the feces of other mice or that there is actually a word for it.)

In 2016, Eran Elinav and coworkers at the Weizmann Institute of Science in Rehovat, Israel, advanced Gordon’s studies by determining exactly what was happening in the intestines of thin mice that allowed them to remain thin.

First, they repeated Gordon’s studies, finding that germ-free mice that received the feces from obese mice became obese and those that received the feces from thin mice remained thin. Then they studied the yo-yo effect. They found that when obese mice lost weight, they were much more likely to regain the weight and regain it quickly if they retained the microbiomes of obese mice. On the other hand, if obese mice received fecal transplants from thin mice, they would not only lose weight, they wouldn’t regain it. The researchers had eliminated the yo-yo effect.

Then the Israeli researchers compared the metabolites produced by the bacteria in obese mice with those produced in the intestines of the thin mice. One thing jumped out: Mice that were obese no longer produced certain flavinoids, specifically apigenin and narigenin. (Flavinoids are a byproduct of certain plants and fungi.) Then they found out why. The bacteria from obese mice made enzymes that destroyed apigenin and narigenin, so less of these flavinoids were available. They also found that high-fat diets promoted the growth of bacteria that destroyed the flavinoids.

Why was this important? Flavinoids are critical to the storage of fats. Also, apigenin and narigenin increase energy expenditure. Because they had lost apigenin and narigenin, obese mice expended less energy and stored more fats.

The next experiment was encouraging. Researchers found that administering apigenin and narigenin to obese mice not only caused them to lose weight; it also eliminated the yo-yo effect.

What does this mean for people? Hard to know. Mice aren’t people. But studies are underway to determine whether obesity can be treated with fecal transplants from thin people or by administering flavinoids like apigenin and narigenin. Time will tell. But discussions about losing weight might soon shift from miracle diets to something entirely different.

Paul A. Offit is the director of the Vaccine Education Center at the Children’s Hospital of Philadelphia and the author of Pandora’s Lab: Seven Stories of Science Gone Wrong (National Geographic Press, 2017).