Technology Portugal , Portugal, Friday, March 25 of 2022, 10:51

Facebook analysis to prevent epilepsy-related deaths

Emotion and stress cues hidden in posts might serve as early warnings of unexpected death

IGC/DICYT A group of researchers demonstrate that social media could be used to detect behaviors preceding Sudden Unexpected Death in Epilepsy (SUDEP), the leading cause of death in people with uncontrolled epileptic seizures. The findings published in Epilepsy & Behavior reveal that the activity of epilepsy patients in social media increased before their sudden death. These changes in digital behavior could be used as early-warning signals to put preventive interventions for SUDEP into practice, possibly avoiding death.


SUDEP occurs when a person with epilepsy dies suddenly and no reason for death is found. Although the physiological mechanisms underlying SUDEP are still a mystery, people with frequent seizures are known to be at higher risk. The best preventive strategy, to date, is to keep seizures under control through medication, but not exclusively. Self-management, including reducing stress and keeping triggers in check, is also key to decreasing the risk of seizures and SUDEP. However, measuring stress and other mood states is particularly difficult. What if we had an algorithm for that?


That was the question that spurred an innovative study developed by the Instituto Gulbenkian de Ciência (IGC), the State University of New York, Binghamton University (SUNY), and Indiana University (IU) which explored the potential of using social media to identify behavior signatures that might predict SUDEP. “We instantly know when our best friend is not OK, they are mumbling, talking too much, or perhaps too little, eye contact is different, their tone is off, we just know it. Sometimes we know it over the phone, only after a few words. What if by detecting this sudden behavioral change, we could save a friend’s life?”, observes Rion Brattig Correia, co-first author of the study and researcher at IGC and Binghamton University (State University of New York).


Building on these thoughts, the researchers went through the Facebook timelines of six epilepsy patients deceased due to SUDEP and used various tools to decipher human emotion and any stress markers hidden in their written posts. “The first thing we tried was simply to answer the question of whether the amount of written text was increased in the platform right before their death. And that’s what we found!”, explains Rion. “For five subjects, the number of words written was significantly higher in their final days, in comparison to the rest of their timeline”. In addition, the type of words used by the subjects changed and there were drastic sentiment shifts in their posts in the weeks preceding their death. “We found significant alterations in the patient’s digital behavior that could be picked up as a signal by our algorithms”, remarks Ian B. Wood, co-first author of the study from Indiana University.


These changes in the patient’s social media engagement, as well as in the sentiment behind their publications, may serve as possible early-warning signals for SUDEP and guide preventive interventions. “We thought that Machine Learning could be very useful to uncover patient behaviors and outcomes from the wide array of unconventional data out there, such as social media”, states Luís M. Rocha, George J. Klir Professor of Systems Science at SUNY, Principal Investigator at IGC, and leader of the cross-university group responsible for this pioneering study sponsored by the National Institutes of Health in the USA. This interdisciplinary work involving informatics/complex systems researchers, clinical/behavioral epilepsy scientists, and supported by the Epilepsy Foundation of America, brought to light findings that are highly relevant for people living with this chronic condition. “In general, SUDEP studies do not consider digital behavioral data as we did here, focusing only on physiological and clinical data. As far as we know, this is the first time this kind of data was used to the study of SUDEP”, claims the principal investigator. Dr. Wendy Miller, epilepsy specialist from the School of Nursing at IU who also contributed to the study, acknowledged that the inclusion of this novel digital data could offer a complementary view of patient behavior leading up to SUDEP that is often missed during clinical consultations.


The expert adds that “any advances in this area are likely to have a significant impact on the lives of families affected”.


In the future, the authors intend to validate the predictive power of these behavioral signals extracted from social media in clinical studies involving more people and more data. If the digital behavior of patients proves to be useful at predicting SUDEP, this analysis could be expanded to additional platforms, besides Facebook, and possibly prevent unnecessary deaths. “The method we employed could be applied to any digital behavior data, such as SMS or chat exchange, phone calls, and others”, clarifies Ian.


Sponsored by the National Institutes of Health (National Library of Medicine) in the USA, the team is currently working on a personalized web service for epilepsy, myAura, which will include diverse clinical and non-clinical data, namely self-reported patient entries regarding seizures, medication adherence, and physician encounters. This easy-to-use web service will also include the option for users to donate their social media timelines, making this data more easily accessible for larger studies.



Wood, I. B., Correia, R. B., Miller, W. R., & Rocha, L. M. (2022). Small cohort of patients with epilepsy showed increased activity on Facebook before sudden unexpected death. Epilepsy & Behavior, 128, 108580. DOI: