Both a high-fat and a high-sugar diet can cause changes in gut bacteria that appear related to a significant loss of "cognitive flexibility"
Previously, some studies suggest a link between fat and sugar on cognitive function and behavior, positing that such problems may be linked to alteration of the microbiome -- a complex mixture in the digestive system of about 100 trillion microorganisms. Kathy Magnusson, from Oregon State University (Oregon, USA), and colleagues completed a study with laboratory mice that consumed different diets and then faced a variety of tests, such as water maze testing, to monitor changes. The team observed that both a high-fat and a high-sugar diet, compared to a normal diet, cause changes in gut bacteria that appear related to a significant loss of "cognitive flexibility," or the power to adapt and adjust to changing situations. This effect was most serious on the high-sugar diet, which also showed an impairment of early learning for both long-term and short-term memory. Noting that: “Higher percentages of Clostridiales and lower expression of Bacteroidales in high-energy diets were related to the poorer cognitive flexibility in the reversal trials,” the study authors submit that: "These results suggest that changes in the microbiome may contribute to cognitive changes associated with eating a Western diet.”
K.R. Magnusson, L. Hauck, B.M. Jeffrey, V. Elias, A. Humphrey, R. Nath, A. Perrone, L.E. Bermudez. “Relationships between diet-related changes in the gut microbiome and cognitive flexibility.” Neuroscience, Volume 300, 6 August 2015, Pages 128-140.