PLOS Science Wednesday: Hi reddit, we’re Marinho and Leandro and we applied math models to explore the brain regions that contribute most to seizures to help neurosurgeons perform more targeted surgeries for epilepsy patients – Ask Us Anything!


Hi Reddit,

My name is Marinho Lopes and I am a Research Fellow at the University of Exeter. And I’m Leandro Junges and I am a Research Fellow at the EPSRC centre for predictive modelling in healthcare at the University of Exeter. Our research focuses on the mechanisms of seizure emergence and on mathematical models to quantitatively predict whose brains regions are most responsible for seizure generation.

Our group recently published a paper titled “An optimal strategy for epilepsy surgery: Disruption of the rich-club?” in PLOS Computational Biology. We used statistical methods to determine how different regions were connected from the electrical recordings of the brain. We then applied advanced mathematical modelling to study which regions of the brain contribute most greatly to generating seizures and whether their removal would result in the brain being seizure-free. The idea being that if brain surgeons targeted these regions the outcome of surgery would be enhanced.

We will be answering your questions at 1pm ET-- Ask Us Anything!

Don’t forget to follow our group on Twitter @CBMA_UoE.

Two questions:

  • It looks like your model is informed by intracranial EEGs. How practical is it to acquire an iEEG from a patient during a seizure?

  • My understanding is that when surgical resection is being considered, the patient may sometimes be conscious during the procedure to help ensure that the surgery is not cutting into areas that impact speech or mobility. What is this experience like for patients? Any interesting stories you can share?


Marinho and Leandro: “It looks like your model is informed by intracranial EEGs. How practical is it to acquire an iEEG from a patient during a seizure?” That’s right, our methods use intracranial EEGs (iEEG). In order to acquire an iEEG it is necessary to implant electrodes inside the skull, which is an invasive procedure. Once implanted, the electrodes can record brain activity at any time, including during seizures. This kind of recordings is usually used to try to find out what brain regions are generating seizures, so our methods are only using data that is usually recorded anyway. It is not “practical”, but it is a standard pre-surgical procedure (in some cases the clinicians may skip the iEEG if they have strong evidence for what brain region is responsible for the seizures, namely an identifiable lesion on a MRI). The advantage of iEEG compared to scalp EEG (noninvasive recordings) is the fact that iEEG provides a much better spatial resolution to pinpoint the pathological brain region.

“My understanding is that when surgical resection is being considered, the patient may sometimes be conscious during the procedure to help ensure that the surgery is not cutting into areas that impact speech or mobility. What is this experience like for patients? Any interesting stories you can share?” Unfortunately, we are unable to answer your questions, because we are mathematicians and we have not been involved in the actual surgeries. We have only analyzed the data that our colleagues have provided us.

Hi Marino & Leandro. Thanks so much for doing this AMA. As someone who suffers with (seemingly drug-resistant) epilepsy (and also lives a stones' throw from Exeter!) I am really excited by your work.

I am considering the possibility of gamma-knife surgery, and wonder if you could tell us how your work is being integrated into the mainstream-NHS?

(I'd also happily be a guinea pig if you need to record seizure activity!!)


Marinho and Leandro: For now we have to gather more data and test our methods in a larger cohort of patients. Only then we will be able to integrate it in clinical practice. Thank you! (Not all hospitals save the data for research, but they will ask you your permission to use the data, if they collaborate with researchers like us.) Best wishes if you go ahead with the surgery!

Thanks for doing this AMA.

I skimmed parts of the paper and I would like to know more about the mathematical model. Can you give an explanation of the model for someone who has a math background but knows almost nothing about biology?

Conversely, some might like to have a non-technical explanation of the math, assuming they have a background in biology. I can't speak for that group, however.

Also, how can applied mathematicians better collaborate with people in biology and medicine? There are lots of papers applying math to biological problems, but in my experience they are written for a mathematical audience and therefore people on the biology/medicine side might not read them.

Math departments tend to be somewhat isolated from other departments at a university. How can we get researchers from seemingly disjoint fields to talk together about their research, without too much of a 'jargon language barrier?'


Marinho and Leandro: Taking into account that you have a math background, first the functional networks are inferred using zero-lag cross-correlation between pairs of signals recorded with iEEG. Then, these networks are used as a substrate for the mathematical modelling, where we use the normal form of the saddle-node bifurcation on the invariant circle. Using this model, each node in the network can be in a ‘normal state’ (fixed point) or in a ‘seizure state’ (limit cycle). The state of one node depends on its in-neighbours state, in such a way that the ‘seizure-like’ activity can propagate from one node to another. We then can study how the removal of different sets of nodes impacts on the propensity of the whole network to generate seizure-like activity. For a non-technical explanation, you might like to read the following article about our paper:

Indeed, it is difficult to overcome the ‘jargon’ barrier in this kind of multidisciplinary research. In our experience, the most important is to find people with different backgrounds that are really willing to collaborate, whose goals are well-aligned.

Thank you for your time and willingness to respond to questions.

The ketogenic diet has been used for almost a century to treat medication resistant epilepsy. In a paper recently published in the Journal of Epilepsia,
they found that Medium-Chain Triglycerides (MCTs) C8 and C10 might play a role in mitigating seizures. The findings suggest that C10 which relies on CPT1 (not found in large amounts in the neuron) isn't largely consumed for energy, while C8 is. They speculate C10 is activating mitochondrial biogenisis and playing an antioxidant role by activating PPARg and maybe some other unknown mechanisms are at play.

  1. Do you have any experience treating patients with the ketogenic diet and how do you feel about the therapy as a whole, pros and cons.

  2. In your view, is there any merit to the idea that epilepsy is a disorder of mitochondrial disfunction or energy disregulation as has been suggested for neurodegenerative diseases like parkinson's and alzheimer's? If so, could MCTs, like C8 and C10 combined, help restore energy homeostasis in the epileptic neuron or do the ketone bodies themselves play a more important role?


Marinho and Leandro: Unfortunately, we are unable to answer your first question, because we are mathematicians and we have not been involved in patient care. Concerning the second question, it has also been hypothesized that there might exist an “energy dysregulation” in epilepsy, but there is no definite evidence yet.

Hi! Thanks for your research. I have a human friend with epilepsy that is not controlled with drugs, and he has resisted surgery because of the great fear that it won't work.

(I also have a cat with epilepsy from a brain tumor, but his is currently well controlled with Keppra, prednisalone, and phenobarbitol so he is fat and happy.)

My question is this: In your mathematical models, you said that you considered 3 minutes before, 3 minutes during, and 3 minutes after the active seizure as your comparison points for each patient.

For further studies, have you considered trying to find candidates who have a longer peri-eptic period to further refine your model? (I recently read about a service dog that detected an oncoming seizure in a human 45 minutes before it happened, which is incredible.)


Marinho and Leandro: Actually, we used 3 minutes before, the whole seizure, and 3 minutes after the seizure. The results did not seem to depend on the duration of the seizures. Concerning the dogs that seem capable of predicting seizures, there is no scientific (reproducible) evidence of that being the case.

Hi Marinho and Leandro, I am an undergraduate student interested in doing computational biology for my graduate thesis. Although I have no computational background, I am double majoring in math and biology with a minor in physics, which have shown me the potential of applying math to understanding biological systems. That being said, how did you guys find yourself in computational biology? What would you recommend to me, and undergraduate student interested in computational biology? What is the most efficient way to be familiarized with this subject? Thank you for reading this and doing this AMA!


Marinho: Sometimes it seems that it is the research that guides us towards our path. During my PhD I was using statistical physics to study phase transitions in neuronal networks, and eventually the results I got made me get interested on epilepsy! My recommendation would be to read a lot. At this point I think you should not focus too much on a specific area, so can bet on introductory books. Finding what really interests you may be more important than trying to obtain specific knowledge. Another recommendation would be to try to find the researchers with whom you might work in the future, and discuss their research with them.

How do epileptologists and neurosurgeons react to your work?


Marinho and Leandro: Some are skeptical, others are enthusiastic. The skepticism is understandable at this point because we used a small dataset of 16 patients. That’s why our aim is to test our methods on a much larger cohort of patients. The enthusiasm is based on the fact that our methods allow a quantitative prediction of surgeries, and therefore they have a great potential to help surgeons decide what is the best surgical strategy for a given patient.

As someone who has epilepsy that is not responding to medication and is also active in the computational modeling world, this strikes close to home. Is this something that you think will be used in practice soon?

I've glanced over your paper and it seems like this is a high dimension optimization problem that involves solving eigenvalue equations? Since the ideal method doesn't scale well, you've simplified it. Do you think your results could be improved in a non negligible way if it was fully treated rather than reduced?

Also just thank you for your work.


Marinho and Leandro: Before it can be used in practice, it has to be tested in a much larger cohort of patients. Unfortunately, gathering this kind of data takes time, because for instance we have to wait for the follow-ups of the surgeries, in order to know if they were successful or not. Concerning your second question, no, we don’t think that the use of the reduced model represents a limitation. As we show in the paper, in the case of networks in which we can expect the model to find targets for surgery (rich-clubs, for instance), the predictions of the two models are in perfect agreement.

How have you dealt with the concern that other cognitive functions might be severly "damaged" after surgery? Are your model meant for only people where surgery is last resort - and therefore meant to make this a better process - better targeting of only the tissue that seem to give the problem? - or is it more generel mapping of the area that seem to course the problem - thus not only for patients that need surgery cause nothing else works? - and if the latter is the case; again, how have you dealt with the concern and ethics about brain surgery and it's consequences.


Marinho and Leandro: Before every surgery, the cortex is mapped in order to avoid damaging any motor or cognitive areas. If the area presumed to cause seizures overlaps with brain areas responsible for mapped brain functions, then usually the surgery is not performed. Our framework uses intracranial EEG data and, as this is a quite invasive procedure, it is generally only recommended in the refractory cases (when the patient do not respond to medication).

Hello! What a fascinating article, and quite honored to find myself in your bibliography.

Did the 16 patients you analyzed have temporal, neocortical, or a mix of epilepsies? Did you make any effort to correlate rich-club nodes with anatomical landmarks?

Can you say any more about what a saddle-node invariant circle is and why it provides a useful cutpoint? I skimmed a few articles about it but am having trouble visualizing it.


Marinho and Leandro: The patients had frontal lobe epilepsy, lateral temporal lobe epilepsy, mesial temporal lobe epilepsy, and parietal lobe epilepsy. No, we did not correlate the rich-clubs with anatomical landmarks. A saddle-node bifurcation is a simple model of a transition between a steady state (which we use as representative of ‘normal activity’) and a limit cycle (which represents the high amplitude oscillations as observed in EEG during seizures).

Why aren’t pharmaceutical companies and doctors more open to therapeutic levels of cannabis treatment and research that has shown to relieve many patient’s seizures?


Marinho and Leandro: Our research does not focus on the use of cannabis to treat epilepsy, so we are unable to comment on its potential. As far as we know, there are several research groups looking into it, but there is no definite evidence yet.

Pre-surgical planning procedures for epilepsy seem to be heading in the direction of non-invasive imaging to prevent unintended brain damage, decrease the number of surgeries and increase patient safety and recovery. So my question is, do you think there is potential for your developed technique to be used with non-invasive techniques (such as MR and/or HD-EEG) and/or combined with electrical source imaging head modeling methodology?


Marinho and Leandro: A natural extension of this work is to evaluate the efficiency of the method in predicting surgery outcome solely based on scalp EEG. A potential problem is the fact that scalp EEG may not provide sufficient spatial resolution to accurately delineate the brain region responsible for the seizures. We are working on that.

How close are you to figuring out how to control epilepsy. I need this sorted.


Marinho and Leandro: Our research only addresses the question of how to optimize epilepsy surgery, which is usually only considered for patients that do not respond to anti-epileptic drugs. However, there are other research groups studying other potential treatments for epilepsy. Eventually new neuro-imaging techniques will allow us to better understand the mechanisms that underlie the emergence of seizures, and then it will be easier to devise new treatments.

I have epilepsy, but i don't have the normal seizures that are associated with it. I have absent seizures. How is this different in terms of the regions of the brain? Would it be the same as curing the normal seizures?


Marinho and Leandro: Absence seizures usually involve wide spread areas of the brain, and that's why they are classified as "generalized seizures". More information in:

My younger brother suffered from seizures at 2yo, but they mysteriously receded. Is there still a risk for him that they will come back later in life?


Marinho and Leandro: We cannot make predictions. However, it is not uncommon for children to grow out of seizures.



Marinho and Leandro: To the best of our knowledge, the Hodgkin-Huxley type models continue to be the most accurate description that we have for neurons. In our paper however we did not use this kind of models, because we were interested on a mathematical description at the scale of neural masses (millions of neurons), at which details of single neuron dynamics are assumed to be irrelevant.

Hi Marinho and Leandro, and thank you for doing this AMA.

  • Do you have any suspicions as to what mechanisms of action may underlie a failure to adequately respond to traditional anti-epileptic medications?

  • I've recently become interested in Dravet Syndrome, where a number of clinical case studies and animal models suggest that serotonergic modulation may be useful for controlling seizures (most frontline anti-epileptic drugs target sodium channelsor GABA signaling). Do you think this mechanism of action makes sense? Can you envision serotonergic modulators having an impact in other paroxysmal disorders beyond Dravet Syndrome? Maybe even in drug refractory epilepsy?


Marinho and Leandro: “Do you have any suspicions as to what mechanisms of action may underlie a failure to adequately respond to traditional anti-epileptic medications?” The short answer is no. It is unclear how anti-epileptic drugs actually work, so it is also unclear why in some cases they are unable to control seizures. Some mathematical models of seizure generation give us the hint that this kind of paroxysmal activity can emerge due to several different mechanisms. Some medications may have an impact on certain mechanisms, but not on others.

“I've recently become interested in Dravet Syndrome, where a number of clinical case studies and animal models suggest that serotonergic modulation may be useful for controlling seizures. Do you think this mechanism of action makes sense? Can you envision serotonergic modulators having an impact in other paroxysmal disorders beyond Dravet Syndrome? Maybe even in drug refractory epilepsy?” We have not studied serotonergic modulation, so we are incapable of assessing its potential.

Thanks Marinho and Leandro for offering to do the AMA. I have tried to understand the link - thanks for your understanding if the below questions are too early-stage.

  1. Have you accounted the effect of documented impact on a specific region or calcification (eg to the parietal lobe) in the brain?

  2. In terms of a cure to epilepsy that does not involve extensive surgery, removal of brain tissue etc: Do you see synergies with Neuralink? Musk and/or others have stated that one of the goals is an electrode array to cure epilepsy. Link 1 Link 2

  3. As a practical question: If we are looking at true disruption and increasing the success rate of surgery, can a person who is taking epilepsy medication (eg topiramate and keppra on a daily basis) for seizures expect to get his condition triaged into - medicines / surgery / inconclusive? Would this require an expensive set of diagnosis, fMRI etc? (It is worth highlighting that general practitioners refer patients to specialists who currently prescribe drugs, and not the other way around)


Marinho and Leandro: (1) No. Our approach was generic, we did not take into account any specific information beyond the iEEG recordings. In principle we should be able to integrate much more information in our methods. (2) There is ongoing research on the use of implanted electrodes to stimulate the brain with the purpose of stopping seizures. This, however, should be considered as a potential treatment, and not as a "cure". Nonetheless, yes, our mathematical methods may also be adapted to consider electrical brain stimulation. Most research groups tackling this problem use machine learning to try to "learn" from the ongoing brain activity when and what kind of stimulation should be applied to stop seizures. (3) Eventually, if surgeries become sufficiently successful, it might become an option. Currently surgeries are only considered when medication does not work, because it's a potentially risky procedure, with a success rate far from optimal.

My mother suffers from epilepsy. She is the only one know in the family to have epilepsy. Its been more than 45 years. Thank you for your work. Would you know if others in the family would/should be susceptible to epilepsy?


Marinho and Leandro: Some types of epilepsy have a genetic origin, others do not. There is ongoing research to understand the role of genes on different types of epilepsies.

First off, let me say that your work is incredibly inspirational and motivating to me as a hopeful future graduate student. The use of computational power and (smart, efficient) mathematical models to generate outcome predictions for treatments, especially neurological treatments, gives me a lot of hope that I can retool my undergraduate CS knowledge into something tangibly beneficial for typical people.

I have a couple questions:

1) It seems from the paper like the network-topological characteristics of a particular brain region are specific to each individual, is this an accurate statement? If so, how did you go about actually measuring the characteristics of each patient's brain in a way that would allow you to characterize the topological regimes of candidate treatment regions?

2) Regarding the use of the theta model as a representation of a neuron cluster-- Is epileptiform firing activity in a neuron cluster synchronous or wave-like in some way, such that spiking activity of a single node in the the model is a good approximate for the aggregate membrane potential? Or are the collective dynamics more like a transition between stable and unstable states?

3) I was fascinated to read that the neurotopological characteristics of patients with epilepsy tend to show more degree-variant structures with respect to healthy patients. Speculatively, do you think there might be some feedback mechanism within the neuronal dynamics of seizure activity that form rich-clubs within the brain, or is this variation genetic (and, from this genetic misfortune, seizure activity is simply more likely to emerge)?

4) Lastly, this is completely far-fetched and coming from a layman, so you don't have to answer. However, I'm interested in the future potential of real-time neurostimulation as a neurological treatment methodology. Do you think there could ever be a way to computationally characterize the equivalent of a brain region approaching the SNIC bifurcation in the Wendling model? (In the infinite sci-fi possibilities of my imagination, such a metric could allow for carefully timed stimulation of neuron clusters to move their dynamics to a more stable region of parameter space.)

Thanks so much for the AMA. Your research is of the sort that truly inspires people to pursue science.


Marinho: (1) Yes, that's right. For each patient, we inferred 'functional networks' from the intracranial EEG, which represent a functional dependence structure between the brain regions where the electrodes were placed. We then studied the properties of these networks, and found that specific types of structures when resected correlated to better postsurgical outcome. (2) The theta model is a simple phase oscillator model which has two states (a stable fixed phase, and an unstable state in which the phase rotates). (3) It's unclear what might be the mechanism responsible for the emergence of these brain structures in the first place. (4) In principle, our models can be modified to take into account neurostimulation with the purpose of better controlling it. There are already some research groups trying this kind of approach.

Very cool work.

Were these iEEG recordings sEEG, subdural grid, or both? In other words, were the data you were looking at primarily local (subdural grids) or distributed (sEEG)?


Marinho and Leandro: Thank you! The EEG signals were recorded intracranially by strip, grid and depth electrodes. You can find more details about the data in: Rummel C, et al. Resected brain tissue, seizure onset zone and quantitative EEG measures: towards prediction of post-surgical seizure control. PloS one. 2015 Oct 29;10(10):e0141023.

Hi Marinho and Leandro,

I just want to start off by saying this is some really awesome work you guys have put out!

My question to you is, being that there are so many unsolved and important problems in biology, how do we communicate to the next generation of students that biology can be just as, if not more technical and mathematically complex of a field as the so-called "hard sciences." In far too many of my undergraduate level physics courses, biology was almost always the punchline of the joke and referred to as a "soft science." I think it's vital to expose young minds who have an interest in describing the physical world mathematically, to what work is being done in the computational biology area, in hopes of bringing more computationally and analytic trained minds into the exciting world that is biology.

Again, loved the paper and the work you guys are doing!


Marinho: Thank you! I think you gave the answer: it's necessary to show them examples of how mathematics can be applied in biology (and focus on the most interesting examples). In fact, I would say that the problem is also related to the fact that they get exposed to such examples too late. Biology becomes a "joke" probably in high school... I think it's necessary to update both biology and mathematics books at the high school level to address this problem.

My wife has an oligodendroglioma, part of her treatment included biopsy/debulking (right frontal lobe). She now has epilepsy.

My question is: Will your work inform how these operations are conducted in the future? By which i mean; will it give options for optimal position for resection of a diffuse tumor with the view to prevent epilepsy. Or more aggressive/targeted resection if the area involved is likely to cause seizures as would be outlined in your model.

Bonus question: Would your model eventually have scope for providing data for resection of an already damaged brain with the view to stop or lessen seizures?


Marinho and Leandro: Our methods were developed for patients with epilepsy, but it may be possible to change them to quantify the possible emergence of seizures as a consequence of a resective surgery.

Concerning your second question, previous damages in the brain should not represent a restriction to our methods. In fact, this framework can be applied in cases where a surgical procedure has already been done.

My child has had (mosty absent and sleeping) seizure as well as generalized dystonia since birth, but has never missed cognitive milestones. Unknown cause.

1) is there medical literature you can recommend to help me better advocate for my son?

2) What breakthroughs in treatment are expected to be available in the next 10-15 years?


Marinho and Leandro: (1) The ILAE has a good website which can be a good starting point: (2) It's unpredictable. There are many promising avenues of research at the moment to treat epilepsy, so one can expect that there will be breakthroughs. Optimizing brain surgery and improving electrical brain stimulation are certainly two of the most promising.

Hello Marinho and Leandro,

Do you think you could apply mathematical/computational modeling to make augmented reality possible for surgeons? For example, if a surgeon is taking out a tumor in the brain, highlighting the tumor in red or guiding where to cut.

Thanks for the great work!


Marinho and Leandro: A surgery is usually well planned before being performed, therefore it is unlikely that augmented reality could help during the surgery.

Have you ever looked at the brain of people with KDVS (Koolen Devries Syndrome) they can can 45+minute seizures perhaps they could make a very good model for surgery if you can isolate the cause. I ask this because my daughter has KVS 1/350 known diagnoses.


Marinho and Leandro: In principle our methods should be equally applicable to patients having short or long seizures. We have not studied how does our predictions correlate with seizure duration (because our dataset was too small to do this kind of analysis).

What did you guys study in University? This topic and the kind of research you do is something I'd love to do, but as a Guatemalan student thinking of grad school I have to work harder to get there and would love some advice. Thanks!


Marinho and Leandro: We are both physicists, but we now work at the mathematics department. Actually, our research group has people with a wide range of backgrounds: physicists, mathematicians, statisticians, computer scientists,… In our opinion, the most important thing to decide in which path you will follow is to try to understand which aspects of the research appeals the most to you. The fact that you come from a developing country should not be a restriction. For instance, Leandro is Brazilian, and our group have also people from Mexico, Iran,...

I've had epilepsy since I had a brain injury at age 4. I still get break through seizures 49 tears later. I've tried a VNS, didn't do much for me. What would you say to convince me to have surgery?


Marinho and Leandro: The suitability of surgical intervention should be defined by the clinical team (epileptologists, neurosurgeon,…) and discussed with the patient afterwards. Different kinds of epilepsy might have different surgical prognosis. Our methods are a decision-supporting tool in the sense of indicating which brain regions are prone to influence the emergence of seizures.

Math is the language of the Universe. How do you come to find that Math+Neurology can equal cures. That's absolutely amazing and I would like to know how you all started that process


Marinho and Leandro: We are going to oversimplify, but you can imagine that in general when scientists record signals and make measurements, then applied mathematicians and/ or physicists may try to come up with mathematical models to describe and understand the recordings. Given this starting point, one can then potentially address every possible open problem. In this case, first researchers have studied mathematical models that mimic seizure activity. Then, with such models we could analyze in what conditions such activity emerges. Moreover, we could tackle the question of how one should perturb the system (i.e., perform surgery) to prevent seizures.

I think this may be a common question for you guys, but how do you do it? What's the process step by step? It sounds fascinating.


Marinho and Leandro: First we compute functional networks from the iEEG recordings. Each electrode corresponds to a node in the network, and every pair of nodes is considered connected if there is a statistical dependence between the corresponding recorded signals. We then use a mathematical model capable of mimicking normal and seizure-like activity to study the propensity of the network to generate seizures. This allows us to study different surgical procedures using computational simulations, by removing different sets of nodes. In particular, in this paper we showed that nodes that have a high number of connections (rich-clubs) should be considered to be resected, because previous surgeries that happened to remove these areas were more likely to be successful.

It looks like you do your analysis in R? Are there certain statistical packages you prefer for this type of modeling?


Marinho and Leandro: No, our work was done in MatLab, and most of the functions were developed by us.

A mathematical approach to mapping the Brain. Is this being applied to other Brain Abnormalities?


Marinho and Leandro: Yes. In our group (and other groups), researchers are using mathematical modelling and "maps" of the brain to study brain disorders such as dementia.

Forgive me I didn't have time to read your publication but has this approach been tried clinically on humans?


Marinho and Leandro: Yes. The algorithm was retrospectively validated in a cohort of 16 epilepsy patients that underwent epilepsy surgery.

Additional Assets


This article and its reviews are distributed under the terms of the Creative Commons Attribution 4.0 International License, which permits unrestricted use, distribution, and redistribution in any medium, provided that the original author and source are credited.