Exercise may protect the brain from the mental consequences of junk food

For anyone who’s ever tried to ditch junk food, science might provide some encouraging news. A new study in Brain medicineconducted in Ireland, found that regular exercise can counteract the depressive effects of a Western-style “cafeteria” diet high in fat and sugar, at least in rats.
The team found that voluntary running reversed mood changes linked to poor diet, through changes in gut-derived metabolites and hormones that connect the body and brain. According to the authors, exercise appears to protect mood by restoring metabolic balance in the gut-brain connection.
“Exercise has an antidepressant effect in a poor dietary context, which is good news for those who find it difficult to change their diet,” said Professor Julio Licinio in a recent press release.
When exercise meets a junk food diet
To test the interaction between food and movement, researchers fed adult male rats either a standard chow or a rotating cafeteria diet, high in sugar and fat; half of each group had continuous access to the running wheels. The intervention took place over 7.5 weeks with four groups with voluntary wheel driving.
After just under two months, sedentary rats on the cafeteria diet showed more desperate behavior, higher insulin and leptin levels, and broad changes in gut chemistry. Exercise curbed cafeteria diet-related weight gain, reduced fat deposits, and alleviated these hormonal changes.
The cafeteria diet significantly changed the gut metabolome (100 of 175 metabolites measured in sedentary rats), while exercise changed a small subset. Exercise partially restored three metabolites – substances produced during metabolism – that were linked to mood regulation, and which decreased on the cafeteria diet.
Interestingly, although running improved overall brain health, the cafeteria diet attenuated one of the biggest benefits of exercise: neurogenesis, or the formation of new neurons in the hippocampus. Rats on a healthier diet experienced a strong neurogenic boost from exercise, while those eating junk food did not, suggesting that diet quality may determine how much the brain benefits from movement.
Learn more: It doesn’t matter what time you exercise, as long as you get moving
The gut-brain connection
Research reveals that exercise keeps the mind resilient even with a poor diet: it’s about restoring the chemical balance of the gut. The execution restored key compounds involved in the metabolism of serotonin and amino acids – molecules that help regulate mood and gut-brain communication.
This recalibration at the intestinal level could allow physical activity to protect mental health, even when eating habits are not satisfactory.
Why diet is still important, even when you exercise
The study highlights a nuanced truth about the relationship between diet, exercise and the brain: Although physical activity can improve mood even in the context of poor diet, the brain’s ability to grow and adapt may still depend on what we eat. This suggests that exercise alone cannot fully restore the neuroplastic benefits supported by a healthy diet.
This opens new questions about how best to combine lifestyle interventions. Future research will explore whether changes in diet and exercise order, or longer, sustained programs, can amplify these effects. The team also points to several gut-derived compounds as possible biomarkers or therapeutic targets for mood disorders.
Although the experiments were conducted on male rats, the implications go beyond the laboratory. As scientists continue to decode the gut-brain connection, this research adds to a growing body of evidence showing how movement and metabolism work together to shape mental health. For now, even if your diet isn’t perfect, getting up and moving is still one of the most powerful tools for keeping your mind and microbiome in balance.
This article does not offer medical advice and should be used for informational purposes only.
Learn more: Is 30 minutes of exercise a day enough?
Article Sources
Our Discovermagazine.com editors use peer-reviewed research and high-quality sources for our articles, and our editors review the articles for scientific accuracy and editorial standards. See the sources used below for this article:




