According to Gram Research analysis, the ketogenic diet failed to reduce seizures or brain inflammation in mice infected with a virus that causes epilepsy, despite successfully changing their gut bacteria and achieving ketosis. This 2026 study suggests that the ketogenic diet’s seizure-fighting benefits depend on the type of epilepsy, and infection-driven seizures may require different treatment approaches than other forms of the condition.

A new study challenges the idea that the ketogenic diet works for all types of seizures. Researchers found that while the high-fat, low-carb diet did change gut bacteria and put mice into ketosis, it failed to reduce seizures caused by a viral infection. The diet also didn’t reduce brain inflammation linked to the seizures. This suggests that the ketogenic diet’s seizure-fighting powers depend on the type of epilepsy, and infection-caused seizures may need completely different treatments than other forms of epilepsy.

Key Statistics

A 2026 mouse study published on bioRxiv found that the ketogenic diet did not reduce seizure incidence, severity, or burden during acute viral infection, despite successfully achieving ketosis and significantly altering gut microbiota composition.

Research showed that the ketogenic diet reduced gut bacterial diversity and enriched protective bacteria like Akkermansia, yet these microbial changes were insufficient to prevent inflammation-driven seizures in virus-infected mice.

The study demonstrated that the ketogenic diet did not significantly alter immune cell infiltration into the central nervous system, indicating limited effects on the brain inflammation driving seizures during viral infection.

The Quick Take

  • What they studied: Whether the ketogenic diet could prevent or reduce seizures caused by a viral infection in mice, and how it affected brain inflammation and gut bacteria.
  • Who participated: Laboratory mice infected with Theiler’s murine encephalomyelitis virus (TMEV), a virus that triggers seizures. Some mice ate a ketogenic diet while others ate a normal diet.
  • Key finding: Despite successfully putting mice into ketosis and changing their gut bacteria, the ketogenic diet did not reduce seizure frequency, severity, or total seizure burden during viral infection. Brain inflammation also remained unchanged.
  • What it means for you: The ketogenic diet may work for some types of epilepsy, but seizures caused by infections or inflammation may require different treatment approaches. Talk to your doctor about the best options for your specific type of seizures.

The Research Details

Researchers divided mice into two groups: one fed a ketogenic diet (high fat, very low carbs) and one fed a normal diet. Both groups were then infected with a virus that causes seizures. The scientists tracked seizures for five days after infection, measuring how often they happened and how severe they were. They also examined brain tissue to look for immune cell activity and analyzed stool samples to see how the diet changed the bacteria living in the mice’s guts.

This type of study is called a controlled experiment because the researchers carefully controlled which diet each mouse received and then measured the outcomes. By comparing the two groups, they could see whether the diet made a difference. The researchers used advanced lab techniques to measure immune responses and identify specific types of bacteria in the gut.

Understanding when and why the ketogenic diet works is important because it’s currently used to treat people with drug-resistant epilepsy. If doctors know that the diet works better for some types of seizures than others, they can make better treatment plans. This research helps explain that the ketogenic diet’s benefits aren’t universal—they depend on what’s causing the seizures.

This study was published on bioRxiv, which is a preprint server where researchers share findings before formal peer review. This means the work hasn’t yet gone through the full scientific review process that published journal articles undergo. The study used careful scientific methods and modern lab techniques to measure seizures and analyze bacteria, which strengthens the findings. However, because this is preliminary research in mice, results may not directly apply to humans with epilepsy.

What the Results Show

The ketogenic diet successfully put the mice into ketosis, a metabolic state where the body burns fat instead of carbohydrates. The diet also dramatically changed the composition of bacteria in the mice’s guts, increasing some beneficial bacteria like Akkermansia while reducing others like Bifidobacterium. However, despite these changes, mice on the ketogenic diet had just as many seizures as mice on the normal diet. The seizures were equally severe and happened just as often.

When researchers examined the brains of both groups, they found similar levels of immune cell activity in both the ketogenic diet group and the normal diet group. This suggests that the ketogenic diet didn’t reduce the brain inflammation that was driving the seizures. The virus-triggered inflammation appeared to override any protective effects the diet might normally provide.

These results were surprising because previous research has shown that the ketogenic diet can reduce seizures in other types of epilepsy. The difference appears to be that infection-driven seizures work through different biological mechanisms than other forms of epilepsy, and the ketogenic diet’s benefits don’t extend to this context.

The study revealed that the ketogenic diet significantly reduced the diversity of bacteria in the gut—meaning fewer different types of bacteria were present. While the diet enriched certain bacterial species that researchers thought might be protective, these changes weren’t enough to prevent seizures. This finding suggests that simply changing gut bacteria composition isn’t sufficient to protect against inflammation-driven seizures, even when those bacteria are thought to be beneficial.

Previous studies have shown that the ketogenic diet reduces seizures in genetic forms of epilepsy and drug-resistant epilepsy through mechanisms involving gut bacteria and metabolic changes. This new research suggests those protective mechanisms don’t work the same way when seizures are caused by viral infection and acute inflammation. The findings indicate that the ketogenic diet’s effectiveness is highly dependent on the underlying cause of the seizures—a concept researchers call ‘context-dependent’ effects.

This study was conducted in mice, not humans, so results may not directly translate to people with epilepsy. The sample size wasn’t specified in the available information, making it harder to assess statistical reliability. The study only looked at acute (short-term) seizures during the first week of infection, so it’s unclear whether longer-term effects might differ. Additionally, the research was published as a preprint and hasn’t yet undergone formal peer review by other scientists.

The Bottom Line

If you have seizures caused by viral infection or inflammation, the ketogenic diet alone may not be an effective treatment. Work with your neurologist to explore other evidence-based options. For people with other types of epilepsy, the ketogenic diet may still be worth considering as part of a comprehensive treatment plan. (Confidence: Moderate—based on mouse studies, not human trials)

This research is most relevant to people with infection-associated seizures, their families, and healthcare providers treating viral encephalitis. It’s also important for researchers studying epilepsy and for people considering the ketogenic diet as a seizure treatment. People with genetic or drug-resistant epilepsy should discuss with their doctors whether these findings affect their treatment plans.

This research is preliminary and hasn’t been tested in humans. If new treatments are developed based on these findings, it could take several years before they become available. In the meantime, people with infection-driven seizures should work with their medical team on proven treatment approaches.

Frequently Asked Questions

Does the ketogenic diet work for all types of seizures?

No. A 2026 study found the ketogenic diet reduced seizures in some epilepsy types but failed to prevent seizures caused by viral infection, even though it changed gut bacteria and achieved ketosis. The diet’s effectiveness depends on what’s causing the seizures.

Can changing gut bacteria help prevent seizures from infections?

Not necessarily. Research showed that the ketogenic diet enriched beneficial bacteria like Akkermansia, but these microbial changes didn’t reduce seizures during viral infection. Inflammation-driven seizures may require different treatment approaches than bacteria-related mechanisms.

What should I do if I have seizures from a viral infection?

Work with your neurologist to develop a treatment plan tailored to infection-driven seizures. The ketogenic diet alone may not be effective for this type. Your doctor can recommend medications and other evidence-based approaches specifically designed for viral infection-related seizures.

Why doesn’t the ketogenic diet work for virus-caused seizures?

Virus-triggered seizures are driven by acute brain inflammation, which appears to override the ketogenic diet’s protective mechanisms. The diet works through different biological pathways that don’t effectively counter infection-related inflammation.

Can I still try the ketogenic diet if I have epilepsy?

Discuss this with your neurologist first. The ketogenic diet may help with some epilepsy types but not infection-driven seizures. Your doctor can assess whether it’s appropriate for your specific condition and monitor its effectiveness.

Want to Apply This Research?

  • If you have seizures, track the type of seizure, time of day, duration, and any potential triggers (illness, stress, sleep) in a daily log. Note whether you’re following a ketogenic diet or other dietary intervention. This data helps your doctor identify patterns and evaluate treatment effectiveness.
  • Work with your healthcare provider to establish a seizure action plan that includes medication management, dietary considerations, and when to seek emergency care. Use the app to set reminders for medications and to log any dietary changes you’re making under medical supervision.
  • Maintain a long-term seizure diary that tracks frequency, severity, and circumstances. Share this data with your neurologist at regular appointments to assess whether your current treatment plan is working. If you’re considering dietary changes, document any changes in seizure patterns before and after the change.

This research is preliminary, published as a preprint in mice, and has not yet undergone formal peer review. The findings may not directly apply to humans with epilepsy. If you have seizures or epilepsy, consult with a qualified neurologist or healthcare provider before making any changes to your treatment plan, including dietary interventions. Do not stop taking seizure medications without medical supervision. This article is for informational purposes only and should not replace professional medical advice.

This research translation is published by Gram Research, the science division of Gram, an AI-powered nutrition tracking app.

Source: The Ketogenic Diet Fails to Mitigate Seizures and Neuroinflammatory Responses in a Mouse Model of Virus-Induced Epilepsy.bioRxiv : the preprint server for biology (2026). PubMed 42239152 | DOI