TL;DR: Your gut houses roughly 100 trillion microorganisms that communicate directly with your brain through the vagus nerve, immune signals, and microbial metabolites. When this ecosystem is disrupted — by ultra-processed food, chronic stress, antibiotics, or low fibre intake — cognition suffers. A diet rich in fermented foods, prebiotic fibre, polyphenols, and omega-3 fatty acids can restore microbial diversity and reduce the systemic inflammation that clouds your thinking. The most actionable change, supported by a landmark 2021 trial in Cell, is to eat several servings of fermented foods every day.

Introduction: The Second Brain in Your Gut

There is a nervous system in your abdomen that contains roughly 500 million neurons — more than the spinal cord, more than the peripheral nervous system of most other organs. This enteric nervous system, sometimes called the “second brain”, does far more than manage digestion. It produces over 90% of the body’s serotonin, generates dozens of other neurotransmitters, and maintains a continuous bidirectional conversation with the brain in your skull.

This conversation is what researchers call the gut-brain axis, and over the past fifteen years it has become one of the most intensely studied frontiers in neuroscience and nutrition. The central insight is deceptively simple: the community of microorganisms living in your intestines — your gut microbiome — exerts a measurable influence on how you think, feel, and perform cognitively.

This is not fringe science. The evidence base now includes mechanistic animal studies, large human cohort analyses, and randomised controlled trials published in journals like Cell, Nature Reviews Neuroscience, and The Lancet. The implications are practical and immediate: by changing what you feed your microbiome, you can meaningfully alter its composition — and, in turn, shift the neurochemical and inflammatory signals it sends to your brain.

This article explains how the gut-brain axis works, what disrupts it, what supports it, and how to build a dietary protocol around the current evidence.

How the Gut-Brain Axis Works

The gut-brain axis is not a single pathway. It is a network of overlapping communication channels, each capable of influencing cognition, mood, and neuroinflammation. Understanding these channels helps explain why dietary changes can have such far-reaching effects on mental function.

The Vagus Nerve: A Direct Line

The vagus nerve is the longest cranial nerve in the body, running from the brainstem to the abdomen. It serves as a physical highway between the gut and the brain, carrying signals in both directions. Approximately 80% of vagal fibres are afferent — meaning they transmit information from the gut upward to the brain, not the other way around.

Gut bacteria can stimulate vagal signalling directly. In a series of landmark studies, Bravo et al. (2011) showed that the probiotic bacterium Lactobacillus rhamnosus reduced anxiety- and depression-related behaviour in mice — but only when the vagus nerve was intact. When the vagus nerve was severed, the behavioural effects disappeared entirely, confirming that the nerve was the critical communication route.

In humans, vagal tone — a measure of how active and responsive the vagus nerve is — is associated with better emotional regulation, lower inflammation, and improved cognitive flexibility. Diet is one of the factors that can modulate vagal tone.

Short-Chain Fatty Acids: Microbial Metabolites That Reach the Brain

When gut bacteria ferment dietary fibre, they produce short-chain fatty acids (SCFAs) — primarily butyrate, propionate, and acetate. These molecules are not merely waste products. They are biologically active signalling compounds with effects that extend well beyond the colon.

Butyrate, the most studied SCFA, strengthens the intestinal barrier (preventing inflammatory compounds from leaking into the bloodstream), modulates immune cell activity, and crosses the blood-brain barrier where it influences gene expression in neurons. Animal studies have demonstrated that butyrate promotes the production of brain-derived neurotrophic factor (BDNF), a protein critical for learning, memory, and neuroplasticity (Stilling et al., 2016).

The practical implication is direct: the more fermentable fibre you eat, the more SCFAs your microbiome produces, and the more neuroprotective signalling your brain receives. This is one reason why foods that increase BDNF overlap so heavily with foods that feed beneficial gut bacteria.

Immune Signalling: The Inflammation Connection

The gut houses approximately 70% of the body’s immune cells. The microbiome constantly trains and calibrates these immune responses. When the microbial community is diverse and well-balanced, immune signalling tends to be anti-inflammatory. When it is disrupted — a state called dysbiosis — the immune system can shift toward a chronic, low-grade inflammatory state.

This matters for cognition because neuroinflammation is one of the most consistent biological findings in conditions characterised by cognitive impairment, from brain fog to Alzheimer’s disease. Pro-inflammatory cytokines like interleukin-6 (IL-6) and tumour necrosis factor-alpha (TNF-alpha) can cross the blood-brain barrier and directly impair neuronal function (Cryan & Dinan, 2012).

Mayer, Knight, et al. (2015), in a comprehensive review published in the Journal of Clinical Investigation, argued that the gut microbiome should be considered a key regulator of brain inflammation — and that dietary manipulation of the microbiome represents a viable strategy for reducing neuroinflammatory burden.

Neurotransmitter Production

Gut bacteria do not just influence neurotransmitter levels indirectly. Many species produce neurotransmitters outright. Certain strains of Lactobacillus and Bifidobacterium produce gamma-aminobutyric acid (GABA), the brain’s primary inhibitory neurotransmitter. Escherichia, Bacillus, and Saccharomyces species produce norepinephrine, serotonin, and dopamine precursors, respectively.

While these microbially produced neurotransmitters do not all cross the blood-brain barrier directly, they influence brain function through vagal signalling and immune modulation. The net effect is that your microbiome’s composition has a measurable impact on the neurochemical environment that underpins your thinking.

What Disrupts the Gut-Brain Axis

Understanding what damages the microbiome is as important as understanding what supports it. Four factors stand out in the current literature.

Antibiotics

Antibiotics are sometimes medically necessary, but they are blunt instruments. A single course of broad-spectrum antibiotics can reduce gut microbial diversity by 30% or more, and some species may take months or years to recover — if they recover at all (Dethlefsen & Relman, 2011). Given the link between microbial diversity and cognitive-relevant signalling, this has implications beyond the gut.

Ultra-Processed Food

Ultra-processed foods (UPFs) are typically low in fibre, high in emulsifiers and artificial additives, and rich in refined carbohydrates — a combination that is hostile to a healthy microbiome. Emulsifiers such as carboxymethylcellulose and polysorbate-80 have been shown in animal models to disrupt the mucus layer that separates gut bacteria from the intestinal wall, promoting inflammation and altering microbial composition (Chassaing et al., 2015).

The epidemiological data is consistent with the mechanistic evidence. Higher UPF consumption is associated with lower microbial diversity, increased intestinal permeability, and elevated inflammatory markers — all of which feed back into impaired cognitive function.

Chronic Stress

The gut-brain axis is bidirectional, and chronic psychological stress is one of the most potent top-down disruptors of microbiome health. Stress activates the hypothalamic-pituitary-adrenal (HPA) axis, increasing cortisol levels. Elevated cortisol alters gut motility, reduces blood flow to the intestinal lining, and changes the composition of the microbial community — favouring pathogenic species over commensal ones.

This creates a vicious cycle: stress disrupts the microbiome, the disrupted microbiome sends pro-inflammatory signals to the brain, and those signals increase the brain’s stress response.

Low Fibre Intake

The average fibre intake in Western countries is approximately 15 grams per day — roughly half the recommended minimum and far below the 40-50 grams per day estimated in ancestral diets. Because fibre is the primary fuel source for SCFA-producing bacteria, chronically low fibre intake starves the very microbial populations that support cognitive health.

Sonnenburg and Sonnenburg (2014) described this as “starving our microbial self” and demonstrated in mouse models that low-fibre diets can cause irreversible loss of microbial species across generations — a finding with troubling implications for modern populations eating increasingly refined diets.

Foods That Support the Gut-Brain Axis

Four dietary categories have the strongest evidence for supporting gut-brain axis function.

Fermented Foods

Fermented foods — yoghurt, kefir, sauerkraut, kimchi, miso, tempeh, and kombucha — deliver live microbial cultures to the gut. While these organisms may not permanently colonise the intestine in most cases, they interact with resident microbiota, produce beneficial metabolites during transit, and modulate immune responses.

The strongest evidence comes from a 2021 randomised controlled trial by Wastyk et al., discussed in detail in the next section. Beyond that trial, observational studies consistently associate regular fermented food consumption with higher microbial diversity and lower inflammatory markers.

Prebiotic Fibre

Prebiotics are specific types of dietary fibre that selectively feed beneficial gut bacteria. The most well-studied include inulin, fructooligosaccharides (FOS), and galactooligosaccharides (GOS). Rich dietary sources include garlic, onions, leeks, asparagus, Jerusalem artichokes, bananas (especially slightly green), chicory root, oats, and legumes.

Schmidt et al. (2015) demonstrated that GOS supplementation in healthy volunteers reduced cortisol awakening response and shifted attention toward positive stimuli — effects consistent with reduced stress signalling via the gut-brain axis. These findings suggest that prebiotic intake can influence not just microbial composition but downstream cognitive and emotional processing.

Polyphenols

Polyphenols — abundant in berries, dark chocolate, green tea, red wine, coffee, and extra virgin olive oil — are powerful modulators of the gut microbiome. A large fraction of dietary polyphenols are not absorbed in the small intestine and instead reach the colon, where they serve as substrates for microbial metabolism. In return, gut bacteria convert polyphenols into smaller, more bioavailable metabolites — many of which have anti-inflammatory and neuroprotective properties.

Cardona et al. (2013) reviewed the bidirectional relationship between polyphenols and the microbiome, concluding that polyphenol-rich diets promote the growth of beneficial bacterial genera, including Bifidobacterium and Lactobacillus, while suppressing potentially pathogenic species.

Omega-3 Fatty Acids

Omega-3 fatty acids — particularly EPA and DHA from fatty fish — influence the gut-brain axis through multiple mechanisms. They have direct anti-inflammatory effects, they support intestinal barrier integrity, and they modulate the composition of the gut microbiome. Menni et al. (2017) found that higher circulating DHA levels were associated with greater microbial diversity in a large population-based cohort.

The cognitive benefits of omega-3s are well documented independently of the microbiome (see our full guide on omega-3 and brain health), but the gut-mediated pathway adds an additional layer of explanation for why these fatty acids are so consistently linked to better brain function.

The Wastyk et al. 2021 Study: Fermented Foods and Immune Function

The trial that arguably did the most to elevate fermented foods from folk wisdom to evidence-based recommendation was conducted by Wastyk, Fragiadakis, Perelman, and colleagues at Stanford University, published in Cell in 2021.

The study was a 10-week randomised controlled trial comparing two dietary interventions: a high-fibre diet and a high-fermented-food diet. Thirty-six healthy adults were assigned to one group and asked to progressively increase their intake of the assigned food category over the study period.

The results were striking — and somewhat surprising. The high-fermented-food group showed a significant increase in overall microbial diversity, a metric that decades of research has linked to better health outcomes across virtually every organ system. They also demonstrated reduced markers of systemic inflammation, including decreases in IL-6, IL-10, and IL-12b.

The high-fibre group, unexpectedly, did not show the same increase in microbial diversity over the study period — though the researchers noted that the microbiome’s capacity to process increased fibre may require a longer adaptation window or a more diverse baseline microbial community.

The key takeaway from the Wastyk trial is practical: increasing fermented food intake to six or more servings per day produced measurable, beneficial changes in both the microbiome and the immune system within 10 weeks. Participants consumed foods like yoghurt, kefir, fermented cottage cheese, kimchi, kombucha, and other fermented vegetables. The variety of fermented food sources appeared to matter — more diverse fermented food intake was associated with greater microbial diversity gains.

This study did not measure cognitive outcomes directly, but the immunological and microbiological shifts it documented — increased diversity, reduced inflammation — are precisely the changes that the broader gut-brain axis literature links to improved cognitive function.

A Practical Protocol for Gut-Brain Health

Translating the research into daily behaviour requires specificity. The following protocol is designed to be progressive, sustainable, and grounded in the evidence discussed above.

Daily Foundations

  • Fermented foods (3-6 servings per day): This is the single most evidence-backed change you can make for microbiome diversity. One serving equals roughly 175 ml of yoghurt or kefir, 60 g of sauerkraut or kimchi, one cup of kombucha, or one tablespoon of miso paste. Rotate between different types to maximise microbial variety.
  • Prebiotic fibre (aim for 30+ grams of total fibre per day): Include garlic, onions, leeks, and legumes in your cooking regularly. Oats, bananas, and asparagus are easy additions. If your current fibre intake is low, increase gradually over two to three weeks to avoid digestive discomfort.
  • Polyphenol-rich foods (2-3 servings per day): A handful of berries, a cup of green tea, a square of dark chocolate (70%+ cacao), or a generous drizzle of extra virgin olive oil all count.
  • Omega-3 sources (2-3 times per week minimum): Fatty fish — salmon, mackerel, sardines, anchovies — are the most bioavailable source. Plant sources like walnuts, chia seeds, and flaxseeds provide alpha-linolenic acid (ALA), which converts to EPA and DHA at a low rate but still contributes to overall omega-3 status.

What to Minimise

  • Ultra-processed food, particularly products containing emulsifiers and artificial sweeteners
  • Excessive refined sugar, which promotes the growth of less beneficial microbial species
  • Unnecessary antibiotic use (always follow your doctor’s guidance, but discuss alternatives when appropriate)
  • Chronic alcohol intake, which damages the intestinal barrier and reduces microbial diversity

Practical Takeaway: Your Weekly Action Plan

Building a gut-brain-friendly diet does not require an overnight overhaul. The following weekly progression allows your microbiome — and your habits — to adapt gradually.

Week 1: Start with one fermented food daily. Choose the fermented food you find most palatable — yoghurt, kefir, kimchi, sauerkraut — and eat one serving every day. Focus on products labelled “live cultures” or “unpasteurised” where applicable, as heat-treated versions may contain fewer viable organisms.

Week 2: Increase fibre from whole food sources. Add one additional serving of legumes, oats, or prebiotic-rich vegetables (garlic, onion, leeks, asparagus) per day. If bloating occurs, reduce the portion and increase more slowly. Your microbiome needs time to upregulate the enzymes required to ferment novel fibre sources.

Week 3: Add polyphenol diversity. Introduce a daily polyphenol source you were not previously consuming regularly — green tea, berries, dark chocolate, or extra virgin olive oil. Aim for variety across the week rather than relying on a single source.

Week 4: Scale fermented foods to 3-6 servings per day. This is the level used in the Wastyk et al. trial and associated with measurable increases in microbial diversity. Distribute servings across meals — kefir at breakfast, a side of sauerkraut at lunch, miso soup at dinner.

Week 5: Reduce ultra-processed food intake by half. Audit your diet for the UPFs that appear most frequently and find whole-food alternatives. This step simultaneously reduces microbiome-disrupting additives and creates space for more beneficial foods.

Week 6: Assess and refine. Pay attention to changes in digestive comfort, mental clarity, energy levels, and mood. Many people notice improvements within this timeframe, though the full benefits of microbiome remodelling may take three to six months to manifest. Adjust the protocol based on what is working and what is sustainable for you.

Frequently Asked Questions

Can I just take a probiotic supplement instead of eating fermented foods?

Probiotic supplements contain a limited number of bacterial strains — typically one to ten — whereas fermented foods can introduce a far wider range of microbial species and metabolites. The Wastyk et al. trial used whole fermented foods, not supplements, and achieved its results through dietary diversity. Probiotic supplements may have a role in specific clinical situations (such as antibiotic-associated diarrhoea), but they are not a substitute for a microbiome-supportive diet. If you do take a probiotic, treat it as a complement to, not a replacement for, dietary fermented foods.

How long does it take for dietary changes to affect the microbiome?

The microbiome is remarkably responsive to dietary shifts. David et al. (2014) demonstrated in a study published in Nature that switching between plant-based and animal-based diets altered microbial composition within 24 hours. However, meaningful, stable changes in diversity and function — the kind linked to reduced inflammation and improved cognitive signalling — typically require sustained dietary changes over weeks to months. The Wastyk trial showed significant results at the 10-week mark.

Is there a test I can take to assess my gut health?

Commercial microbiome testing services exist, but their clinical utility remains limited. Current tests can identify which bacterial species are present but cannot reliably predict health outcomes or guide specific dietary interventions with high confidence. The science of microbiome testing is advancing rapidly, but as of now, the most evidence-based approach is to follow the dietary principles outlined above — increase fermented foods, prebiotic fibre, and polyphenols; reduce UPFs and unnecessary antibiotics — rather than tailoring your diet to a specific test result.

Does stress management matter as much as diet for gut health?

Yes. The gut-brain axis is bidirectional, and chronic stress is one of the most potent disruptors of microbiome health. Stress management practices — adequate sleep, regular physical activity, mindfulness, and social connection — support the microbiome through reduced cortisol and improved vagal tone. Diet and stress management are not competing strategies; they are complementary. Addressing only one while ignoring the other will limit your results.

Sources

  • Bravo, J. A., Forsythe, P., Chew, M. V., et al. (2011). Ingestion of Lactobacillus strain regulates emotional behavior and central GABA receptor expression in a mouse via the vagus nerve. Proceedings of the National Academy of Sciences, 108(38), 16050-16055.
  • Cardona, F., Andres-Lacueva, C., Tulipani, S., et al. (2013). Benefits of polyphenols on gut microbiota and implications in human health. The Journal of Nutritional Biochemistry, 24(8), 1415-1422.
  • Chassaing, B., Koren, O., Goodrich, J. K., et al. (2015). Dietary emulsifiers impact the mouse gut microbiota promoting colitis and metabolic syndrome. Nature, 519(7541), 92-96.
  • Cryan, J. F., & Dinan, T. G. (2012). Mind-altering microorganisms: the impact of the gut microbiota on brain and behaviour. Nature Reviews Neuroscience, 13(10), 701-712.
  • David, L. A., Maurice, C. F., Carmody, R. N., et al. (2014). Diet rapidly and reproducibly alters the human gut microbiome. Nature, 505(7484), 559-563.
  • Dethlefsen, L., & Relman, D. A. (2011). Incomplete recovery and individualized responses of the human distal gut microbiota to repeated antibiotic perturbation. Proceedings of the National Academy of Sciences, 108(Supplement 1), 4554-4561.
  • Mayer, E. A., Knight, R., Mazmanian, S. K., et al. (2015). Gut microbes and the brain: paradigm shift in neuroscience. The Journal of Neuroscience, 35(46), 15490-15496.
  • Menni, C., Zierer, J., Pallister, T., et al. (2017). Omega-3 fatty acids correlate with gut microbiome diversity and production of N-carbamylglutamate in middle aged and elderly women. Scientific Reports, 7, 11079.
  • Schmidt, K., Cowen, P. J., Harmer, C. J., et al. (2015). Prebiotic intake reduces the waking cortisol response and alters emotional bias in healthy volunteers. Psychopharmacology, 232(10), 1793-1801.
  • Sonnenburg, E. D., & Sonnenburg, J. L. (2014). Starving our microbial self: the deleterious consequences of a diet deficient in microbiota-accessible carbohydrates. Cell Metabolism, 20(5), 779-786.
  • Stilling, R. M., van de Wouw, M., Clarke, G., et al. (2016). The neuropharmacology of butyrate: the bread and butter of the microbiota-gut-brain axis? Neurochemistry International, 99, 110-132.
  • Wastyk, H. C., Fragiadakis, G. K., Perelman, D., et al. (2021). Gut-microbiota-targeted diets modulate human immune status. Cell, 184(16), 4137-4153.