Your willpower may not be entirely to blame for your eating habits — your gut bacteria may be responsible, too.

The gut microbiome, the collection of all the microbes in our digestive tracts, may influence our food choices and behavior, suggests a new study that recently appeared in the journal BioEssays.

Different bacteria have different nutritional needs based on the niches they’ve come to occupy in our guts, say researchers from University of California San Francisco, Arizona State University and the University of New Mexico. Sometimes the needs of those bacteria are “aligned with our own dietary goals, and others not,” says corresponding author Carlos Maley, the director of the UCSF Center for Evolution and Cancer.

These different microbes may be able to manipulate our dietary desires by releasing molecules that affect certain organ systems or influence our brain through the vagus nerve, says the study, which connects the brain to the stomach. (Yes, what happens in vagus doesn’t stay in vagus.)

“Microbes have the capacity to manipulate behavior and mood through altering the neural signals in the vagus nerve, changing taste receptors, producing toxins to make us feel bad, and releasing chemical rewards to make us feel good,” says senior author Athena Aktipis of the Arizona State University Department of Psychology.

It works both ways, however — what humans eat may also affect what food gut bacteria need. Bacteria specializing in digesting seaweed have been found in people in Japan, where seaweed is often a part of diets. And in one trial, humans who took a probiotic containing Lactobacillus casei saw their mood improve.

Understanding how microbes influence human behavior and vice versa may eventually help researchers learn how to curb unhealthy habits. “Because microbiota are easily manipulatable by prebiotics, probiotics, antibiotics, fecal transplants, and dietary changes, altering our microbiota offers a tractable approach to otherwise intractable problems of obesity and unhealthy eating,” the authors say in the study.

Write to Nolan Feeney at nolan.feeney@time.com.