The intricate relationship between epilepsy and depression presents a significant clinical challenge, contributing substantially to patient morbidity, mortality, and healthcare resource strain. Understanding the bidirectional risk and identifying individuals at highest risk for developing the comorbid condition remains an unmet need in neurology and psychiatry. This is not merely about managing two separate diseases; it is about addressing a complex interplay that exacerbates both conditions.
Epilepsy and depression are chronic conditions that frequently co-occur, but the precise mechanisms driving this bidirectional relationship have remained elusive. Patients with epilepsy (PWE) face a higher risk of developing depression, and conversely, individuals with depression (PWD) show an increased incidence of epilepsy. This complex interplay complicates diagnosis, treatment, and overall patient management, often leading to poorer quality of life and increased healthcare burden.1
A recent European retrospective database study, led by Alessandro Ruggieri, a neuroscientist at the University of Glasgow, aimed to unravel these associations using advanced machine learning.1 The investigators sought to identify specific predictors for depression onset in PWE and epilepsy onset in PWD, leveraging a large-scale, multinational dataset. This approach represents a significant departure from traditional statistical methods, allowing for the analysis of complex, non-linear relationships across vast amounts of real-world data.1
How they ran it and what the numbers showed
The study, published in BMJ Neurology Open, involved an extensive AI-driven analysis of a European retrospective database.1 This database encompassed a diverse patient population, allowing for a broad examination of demographic, clinical, and treatment-related factors. The researchers constructed two distinct machine learning models: one to predict depression in PWE and another to predict epilepsy in PWD.1
For predicting depression in PWE, the model achieved an area under the receiver operating characteristic curve (AUC) of 0.88.1 This indicates a strong predictive capability, far exceeding what might be expected from random chance. Key predictors for depression onset in PWE included a history of previous psychiatric comorbidities (OR 2.7; 95% CI, 2.1-3.5; P<.001), polytherapy for epilepsy (OR 1.9; 95% CI, 1.5-2.4; P<.001), and a higher seizure frequency (OR 1.6; 95% CI, 1.3-2.0; P<.001).1 The model also identified specific antiepileptic drugs (AEDs) as risk factors, with levetiracetam (OR 1.4; 95% CI, 1.1-1.8; P=.003) and topiramate (OR 1.3; 95% CI, 1.0-1.7; P=.04) showing associations with increased depression risk.1
Conversely, the model predicting epilepsy onset in PWD demonstrated an AUC of 0.85.1 This also represents a robust predictive performance. Significant predictors for epilepsy in PWD included a history of head trauma (OR 3.1; 95% CI, 2.4-4.0; P<.001), a family history of epilepsy (OR 2.5; 95% CI, 1.9-3.3; P<.001), and the presence of anxiety disorders (OR 2.2; 95% CI, 1.7-2.8; P<.001).1 Certain antidepressant medications, particularly tricyclic antidepressants (TCAs), were also associated with a slightly increased risk of epilepsy (OR 1.2; 95% CI, 1.0-1.5; P=.03), though this association was less pronounced than other risk factors.1
The study enrolled a substantial number of patients, with N=12,450 PWE and N=15,890 PWD included in the final analysis.1 This large sample size, drawn from multiple European centers, lends considerable weight to the generalizability of the findings. The retrospective nature of the database allowed for the inclusion of a wide range of real-world clinical data, including patient demographics, medical history, medication use, and comorbidity profiles, which are often difficult to capture in prospective trials.1
But the retrospective design is an obvious caveat. While the large dataset provides statistical power, it inherently carries limitations regarding data completeness and potential confounding factors that are not always captured in electronic health records.1 For instance, the precise onset and severity of symptoms might be subject to reporting bias or variations in clinical documentation across different institutions. The model’s reliance on existing diagnostic codes also means it cannot account for undiagnosed or subclinical conditions, which could influence predictive accuracy.1
The advanced ML model employed a gradient boosting algorithm, specifically XGBoost, known for its ability to handle complex datasets and identify intricate patterns.1 This choice of algorithm is critical, as it can capture non-linear relationships between variables that simpler statistical models might miss. The model was trained on 70% of the data, validated on 15%, and tested on the remaining 15%, ensuring a rigorous evaluation of its performance and generalizability.1 Feature importance analysis, a component of the ML methodology, helped pinpoint which specific variables contributed most to the predictive power of each model, providing clinical insights beyond mere correlation.1
The investigators also performed sensitivity analyses to assess the robustness of their findings across different subgroups, such as age groups and geographical regions.1 These analyses largely confirmed the primary results, suggesting that the identified predictors hold across diverse patient populations within the European context. Still, the model was developed and validated on a European population, and its applicability to other ethnic or geographical groups remains to be fully explored. Cultural differences in healthcare-seeking behavior and diagnostic practices could influence its performance elsewhere.1
The study’s focus on identifying shared risk factors across both directions of the epilepsy-depression relationship is particularly insightful. For example, a history of psychiatric comorbidities emerged as a strong predictor for depression in PWE, while anxiety disorders were significant for epilepsy in PWD.1 This overlap suggests common underlying biological or environmental vulnerabilities that warrant further investigation. The identification of specific AEDs and antidepressants as risk factors also provides actionable information for clinicians, prompting a re-evaluation of current prescribing practices in vulnerable patients.1
The model did not, however, account for genetic predispositions or specific neurobiological markers, which are increasingly recognized as playing a role in both epilepsy and depression.1 Future research could integrate such data to further refine predictive accuracy. The study also did not explore the impact of psychosocial factors, such as socioeconomic status or social support networks, which are known to influence the course of both conditions.1 The absence of these variables means the model provides a clinical snapshot, but not a holistic view of patient risk. What remains unclear is how these predictive models might integrate into routine clinical workflows, and whether they can truly translate into improved patient outcomes through earlier intervention.
This machine learning model offers a clear, data-driven framework for identifying patients at high risk for developing comorbid epilepsy or depression. Clinicians now have specific, quantifiable risk factors to consider, moving beyond anecdotal observation to evidence-based screening. The model's strong predictive performance means we can, and should, be more proactive in monitoring vulnerable patient populations.
The identification of specific antiepileptic drugs like levetiracetam and topiramate as risk factors for depression in PWE demands attention. While these are effective therapies, their potential to exacerbate or induce depression necessitates careful patient selection and close monitoring, particularly in those with a history of psychiatric issues. This is not a call to abandon these drugs, but to prescribe them with greater awareness of their psychiatric side effect profiles.
For patients, this means the potential for earlier intervention, which could significantly mitigate the burden of these chronic conditions. Catching depression before it becomes entrenched in an epilepsy patient, or identifying epilepsy risk in a depressed individual, could alter disease trajectories. This shift from reactive treatment to proactive risk management is a tangible benefit of such predictive analytics.
The next step is to see these models validated prospectively and integrated into electronic health record systems. The challenge lies in translating these sophisticated algorithms into user-friendly tools that can genuinely assist busy general practitioners and specialists. Without seamless integration and clear clinical utility, even the most accurate predictive model remains an academic exercise.
- The Pivot An advanced machine learning model successfully identified predictors for the onset of depression in patients with epilepsy and epilepsy in patients with depression.
- The Data The model achieved an AUC of 0.88 for predicting depression in epilepsy and 0.85 for predicting epilepsy in depression.
- The Action Clinicians should consider integrating these identified risk factors into routine screening protocols for patients presenting with either epilepsy or depression to facilitate earlier intervention.
ART-2026-575
07/26
Cite This Article
Team E. Ml model predicts epilepsy onset in depression, depression in epilepsy. The Life Science Feed. Published July 10, 2026. Updated July 10, 2026. Accessed July 10, 2026. https://thelifesciencefeed.com/neurology/epilepsy/innovation/ml-model-predicts-epilepsy-onset-in-depression-depression-in-epilepsy.
Editorial & AI Standards
All content is researched from peer-reviewed, open-access sources: published trial data, clinical guidelines, and regulatory filings. AI tools are used solely to structure and summarise that evidence; no AI-generated conclusions appear without editor verification against the primary source.
Every article is reviewed by a named editor before publication. Source citations are listed in the References section. This content does not represent the views of any pharmaceutical company, medical device manufacturer, or healthcare provider.
Licence & Rights
© 2026 The Life Science Feed. All rights reserved. Unless otherwise indicated, all content is the property of The Life Science Feed and may not be reproduced, distributed, or transmitted in any form or by any means without prior written permission.
Medical Disclaimer
The information provided on The Life Science Feed is for educational and informational purposes only. It is not intended as a substitute for professional medical advice, diagnosis, or treatment. Always seek the advice of your physician or other qualified healthcare provider regarding any medical condition or treatment decision. Never disregard professional medical advice or delay in seeking it because of something you have read on this website.
References
1. Ruggieri A, Leach JP, Alvarez-Baron E. AI-driven European Retrospective Database Study to predict disease onset in patients with epilepsy and depression. BMJ Neurol Open 2026.





