Some studies suggest a link between fat and sugar on cognitive function and behavior, and are suggesting that such problems may be linked to alteration of the microbiome. A study was done and team observed that both a high-fat and high-sugar diet, compared to a normal diet caused changes in gut bacteria that appear related to a significant loss of “cognitive flexibility” or the power to adapt and adjust to changing situations.