The quantity and type of food we eat and the consistency with which we follow a healthy diet are key factors influencing human health, a new study using artificial intelligence reveals.
Researchers at the Swiss Federal Technology Institute of Lausanne say what food we eat and how regularly we eat it are the most critical factors in determining gut health.
Studies routinely link diets that are rich in fibre, fruits, vegetables, and nuts to higher gut microbe diversity and better digestive health.
Gut microbes are bacteria, viruses, fungi, and other microorganisms that inhabit our digestive system. Some support health while others can be harmful.
The new research, published in the journal Nature Communications, shows, for the first time, that consistency in following a healthy diet is as vital for gut health as the type or quantity of food we eat.
The study, driven by AI analysis, suggests that regularly eating fruits, vegetables and grains is crucial for developing a healthy gut microbiota. “This research clearly shows that you cannot binge on vegetables on your healthy day and then eat in an unhealthy way for the rest of the week or month,” Marcel Salathé, one author of the study, said.
“In fact, our study suggests that irregular consumption of healthy foods undoes many of their beneficial effects on the gut microbiota. This is a real incentive for future studies to not just look at what people are eating but the patterns of what they’re eating over time.”

Advanced AI techniques to assess stool samples are increasingly being used to predict a person’s diet using their microbiota and vice versa.
The researchers found that a person’s gut microbiota could predict what they ate, and vice versa, with up to 85 per cent accuracy.
“Getting such data from a stool sample is relatively easy but understanding someone’s diet is notoriously difficult, it is data that’s been challenging to collect,” Dr Salathé said.
The latest study assessed nutritional information of some 1,000 people who were part of the “Food and You” study.
The data was collected through the MyFoodRepo app developed by the Swiss institute.
The app’s AI system analysed the data for nutritional content and the analysis was then reviewed by the researchers.
“Historically,” study lead author Rohan Singh said, “nutrition research has relied on food frequency questionnaires and 24-hour dietary recalls. In theory you could ask somebody to write down everything they eat, but in practice it’s just not done because it’s borderline impossible.”
The research provides insights into lifestyle-oriented gut disorders that often develop gradually.
“Since nutrition is one of the big contributors to these diseases, analyses like ours may be able to assess what can be improved in a person’s diet,” Dr Singh noted. “AI can then help nudge people to adjust their food intake accordingly.”
In view of these findings, the researchers call for dietary guidelines to be updated to emphasise not just the types and quantities of food but also the regularity of healthy eating behaviours.
They hope to use the new data to investigate the link between food additives such as emulsifiers, found in ultra-processed foods, and the gut microbiota. “There is a strong hypothesis that some of these additives really may negatively impact your microbiota and we have some early indications that this could indeed be the case,” Dr Salathé said.