Abstract
Despite the increasing number of available antiseizure medications (ASMs), optimal medical therapy is still a process of trial and error. We aimed to predict the responsiveness of various ASMs based on initial tests using artificial intelligence. The study consisted of 2586 patients fulfilling the following criteria: (1) first visit to the epileptologists from 2008 to 2017, (2) a diagnosis of epilepsy, and 3) ≥ three years of follow-up duration. The clinical characteristics, ASM history, seizure frequency, laboratory, EEG, and MRI results, were collected. Machine algorithms were utilized to predict the responsiveness of specific regimens. Valproate showed the highest area under curve (AUC), 0.636. The AUCs of levetiracetam, oxcarbazepine, and lamotrigine were 0.614, 0.633, and 0.674. The AUCs of common dual regimens were 0.543 for levetiracetam + oxcarbazepine, 0.454 for levetiracetam + valproate, and 0.583 for levetiracetam + lamotrigine. Levetiracetam + carbamazepine showed the highest AUC, 0.686. In Shapley Additive exPlanations analysis, seizure type significantly impacted prediction performance for valproate responsiveness, and onset age and disease duration for lamotrigine. The prediction performances for the response based on initial data differ according to ASMs. An enormous dataset from a multicenter would improve the prediction power of ASM responsiveness in the future.
Similar content being viewed by others
Introduction
Epilepsy causes long-term disability from personal and social perspectives due to unexpected seizures and comorbidities. Various antiseizure medications (ASMs) are the cornerstone of epilepsy treatment. However, approximately 30% of cases remain medically intractable, requiring dose adjustments or changes in the combination of current ASMs to allow further seizure suppression1 and seeking surgical options. Primary epilepsy care starts with the appropriate selection of ASMs based on epilepsy or seizure types according to semiology and EEG findings since it is phenotypically intuitive and easily applicable in clinical settings. However, whether epilepsy patients become responders or not is not solely dependent on the seizure or epilepsy types. Moreover, epilepsy exhibits considerable heterogeneity, including variations in clinical factors, laboratory findings, and genetic landscape beyond etiology and seizure types. Thus the reason for responsiveness to certain drugs is unexplainable and unpredictable.
Drug-resistant epilepsy (DRE) was defined as recurrent seizures despite more than two ASM trials2. Forecasting how each patient will respond to ASMs is essential, given that drug treatment is a cornerstone of epilepsy management, being able to anticipate individual responses is critical for optimizing personalized treatment strategies. Unnecessary attempts of ‘projected’ poor responder ASM enable shortening unnecessary medical treatment, which might reduce the delay to surgical options.
While the advent of genomic sequencing enables the personalization of certain genetic epilepsy treatments, such as rapamycin for tuberous sclerosis, carbamazepine for PRRT2-related epilepsy, pyridoxine for ALDH7A1 deficiency, sodium channel blockers (SCBs) for SCN2A/8A mutations, quinidine for KCNT1-related epilepsy, and memantine for GRIN2A mutations, most cases of epilepsy do not have a specified treatment linked to the disease mechanism. In most cases, the ASM response cannot be predicted clinically before usage. Patient-specific factors such as age, sex, co-medications, obesity, and genetic polymorphisms should also be considered3. Thus, much of the optimization of medical therapy is still a process of trial and error4. If the bottom-up approach is based on genetic sequencing, the top-down approach can be understood as one that utilizes clinical phenotyping, including demographics, laboratory results, imaging data, and clinical course, to discover hidden features relevant to personalized treatment.
Artificial intelligence (AI) is a promising paradigm emerging in every healthcare field. In the epilepsy field, numerous types of AI research using EEG signals5,6 and images7,8,9,10,11 with or without clinical variables have been conducted to predict impending seizures and epilepsy outcomes. However, the prediction of the responsiveness of each ASM regimen with AI in long-term large-population cohort data has been seldom studied.
In this context, leveraging AI to analyze dynamic seizure patterns in combination with ASM response profiles enables a more refined understanding of patient subgroups and supports their early identification. This study aimed to predict various ASM responses leveraging AI methodologies based on clinical factors, images, and laboratory data.
Results
This cohort comprised the total population who visited our epilepsy center for the first time over ten years, from 2008 to 2017. The study design is shown in Fig. 1.
A total of 2586 patients (female, 46.1%) were analyzed. Among them, ‘de novo’ cases were individuals who had no history of epilepsy treatment or were managed less than six months from our clinic visit if any. The proportions of de novo and referred cases were 52.9% and 31.9%, respectively (Fig. 2A). For some patients (15.5%), the treatment records from other hospitals were not accurately recorded, making it impossible to distinguish whether they were de novo or referred cases. The onset age of epilepsy was 29.6 ± 19.6, and the age of the first visit to our center was 36.0 ± 17.4. The median duration of epilepsy was 2 years (interquartile range 2–10). The number of patients with focal epilepsy, generalized epilepsy, combined, and unknown were 1924 (74.4%), 467 (18.1%), 154 (6.0%), and 41 (1.6%), respectively. Regarding etiology, structural (873, 33.8%) was the most common, followed by genetic (438, 16.9%), immune (90, 3.5%), infectious (53, 2.0%), hypoxic (5, 0.2%), and metabolic (3, 0.1%), in order of frequency. However, 1124 patients (43.5%) had an unknown etiology (Table 1).
Seizure-free (SF) for more than one year at the final follow-up was found in 1707 patients (66.0%). The proportion of final SF according to ASM number is summarized in the supplementary Table 1.
The Antiseizure medication regimen
Comparing the initial and final visits, the number of ASMs decreased in 367 patients (14.2%), increased in 1010 patients (39.1%), and did not change in 1209 patients (46.8%) (Fig. 2B). The initial number of ASMs was 1.39 ± 0.80 (range, 1–6, median 1), and the last was 1.78 ± 1.17 (range 0–9, median 2) (Fig. 2C).
Of the mono-regimens, the most commonly used was levetiracetam (LEV), which accounted for 33.1%. The second most common was oxcarbazepine (OXC) (21.1%), and the third most common was valproate (VPA) (13.5%). Commonly used dual regimens were LEV + OXC (17.5%), LEV + VPA (8.0%), and LEV + lamotrigine (LMT) (7.7%). Triple regimens were diverse, but, LEV + OXC + topiramate (TPM), LEV + OXC + VPA, and clobazam (CLB) + LEV + OXC were relatively common (Fig. 3A-C).
Various regimens of antiseizure medications. (A) The regimens are listed in order of frequency. Prescription pathways from mono to dual therapy (left panel) and from dual to triple therapy (right panel) in focal (B) and generalized epilepsy (C). CBM, carbamazepine; CLB, clobazam; LCS, lacosamide; LEV, levetiracetam; LMT, lamotrigine; OXC, oxcarbazepine; PER, perampanel; PGB, pregabalin; PHT, phenytoin; TPM, topiramate; VPA, valproate; ZNS, zonisamide; RUF, rufinamide; ESX, ethosuximide.
To explore the dynamic pathway of ASM adjustment, we included only cases with switching or add-ons during the follow-up, excluding regimen reduction or maintenance. The most preferred transition after OXC monotherapy in focal epilepsy was LEV addition (51.2% of initial OXC mono-regimen). Similarly, OXC add-on (27.6%) was also the most common option after LEV monotherapy. Therefore, LEV + OXC was the most common dual regimen in the treatment of focal epilepsy. Even though there was only a small difference, CLB was the most commonly prescribed third addition to the LEV + OXC regimen (Fig. 3D). In generalized epilepsy, VPA (22.8%) was frequently added to LEV, followed by LMT (14.0%) and perampanel (PER) (14.0%). In VPA monotherapy, LEV add-on (37.8%) was the common option in generalized epilepsy. If LMT failed, LEV add-on (51.9%) or switching to LEV (25.9%) monotherapy was usually performed. As dual to triple regimen changes in generalized epilepsy, regimen changes from LEV + VPA to LEV + VPA + PER were slightly more common, but they were very diverse (Fig. 3E). The total number of each ASM prescribed, irrespective of poly- or monotherapy, is summarized in Supplementary Fig. 1.
Prediction of specific ASM regimens in individual patients
Drug response was defined in this study to indicate the patient-specific response to ASM(s) in a real-world setting. We assumed that a specific ASM regimen would be more effective in the long course of the disease among multiple ASM(s) tried during the follow-up. Regimens prescribed during ASM withdrawal or as part of a clinical trial or following epilepsy surgery were excluded from the analysis. Overall, 8874 regimens were prescribed. The average number of regimens per person was 2.87 (range 1–27). The effect of specific ASM regimens was classified into three categories. 2388 regimens led to a complete response, defined as seizure freedom, and 196 regimens led to a partial response, defined as a decrease of ≧ 50% compared to that immediately before the regimen change. A poor response (a decrease of < 50%) was observed for 5124 regimens. Intolerable cases (1166 regimens) were defined as the discontinuation of an ASM due to an adverse event and were excluded from the regimen efficacy analysis. The outcome of each ASM regimen was the term to determine the efficacy of each drug or regimen at the time of the clinic visit. It was classified as a responder if there was a reduction in seizure frequency of more than 50% between clinic visits compared to the immediate previous period, or not.
We analyzed the dataset separately according to the ASM regimen. The classifier trained on data using a specific ASM regimen and tested on another dataset with the same ASM. Therefore, the number of cases for the training, validation, and test sets was diverse, depending on the ASM regimen. We utilized both random forest (RF) and CatBoost (CATB) to assess point outcomes, which showed the highest area under the curve (AUC) and accuracy (ACC), respectively, in the final outcome analysis.
First, the responsiveness by monotherapy regimen were investigated. In XGBoost (XGB), the AUCs of LEV, OXC, VPA, LMT, TPM, carbamazepine (CBM), zonisamide (ZNS), lacosamide (LCS), phenytoin (PHT), pregabalin (PGB), and PER were 0.614, 0.633, 0.686, 0.606, 0.558, 0.626, 0.833, 0.643, 0.350, 1.000, and 0.500, respectively (Fig. 4A). All AUCs are better on XGB except CBM, which showed a slightly better AUC, 0.639. The detailed metrics are shown in Supplementary Table 2. While some ASMs, such as ZNS and PGB, had a higher AUC than others, the predicting VPA responder was the best among the top five ASMs frequently prescribed. This indicates a relatively better power of response prediction regarding VPA in an individual patient. LMT showed the second prediction performance. SHAP explained the parameters used to predict VPA and LMT responsiveness. Generalized seizure, high ALP/cholesterol/tCO2, and older onset were found to be the exclusively significant factors that explain the high responsiveness to VPA as a monotherapy (Fig. 5A). Additionally, older onset and shorter duration of epilepsy were found to be significant factors in explaining the responsiveness to LMT (Fig. 5B).
Second, we repeated the analysis in dual regimens. LEV + CBM had the highest prediction power. The AUCs were 0.709 and 0.764 for RF and CATB, respectively. In SHAP (SHapley Additive exPlanations) analysis, some blood parameters, such as ALP, BUN, glucose, and ANC explained responsiveness to LEV + CBM (Supplementary Fig. 2A). Figure 4B demonstrates the AUCs and number of cases for each dual regimen. The detailed metrics are summarized in Supplementary Table 3.
Sodium channel blocker or non-sodium channel blocker regimens
We classified the monotherapy regimen into SCB and non-SCB regimens to assess how well the algorithm predicted responsiveness to SCB. The AUCs of CATB and RF were 0.623 and 0.657, respectively (Supplementary Table 4). SHAP analysis demonstrated that de novo patients, older age at onset, and high fibrinogen were parameters explaining SCB responsiveness (Supplementary Fig. 2B).
Discussion
In this study, we scrutinized the patterns of ASM prescription more closely and evaluated the detailed seizure records with a comprehensive clinico-electro-radiological dataset with standardized clinical records from a single center, enabling AI research regarding the response to various ASM regimens in individual patients. Our study established an algorithm to predict the responsiveness of various ASMs, which may assist in identifying potentially suitable treatment options. Notably, our findings reveal that the responsiveness of VPA is relatively well predicted. Unlike prior AI studies12,13,14 that primarily aimed to predict DRE without addressing individual drug responsiveness or variations in treatment regimens, some studies have attempted to predict ASM efficacy but were limited to testing specific drugs within narrow parameters. In contrast, our approach uniquely evaluates the responsiveness to multiple ASMs within a single cohort, offering a more refined perspective on predicting ASM responses.
There have been several leading principles in choosing ASMs. On initiation of one ASM, the clinician considers age, sex, other medications, comorbidities, and seizure type or epilepsy syndrome to minimize the adverse events and maximize the efficacy15. However, several head-to-head studies in focal epilepsy disappointingly showed similar, if any, or slightly superior efficacy of some ASM16. Although the SANAD trial demonstrated the superior efficacy of LMT or ZNS compared to LEV for focal epilepsy17 and VPA compared to LMT18 and LEV19 in generalized epilepsy, it does not mean that seizure type is the sole predictor of personal seizure outcome. Another way to choose the conceptually best drug is by referring to the evidence-based guidelines published by the ILAE20. However, all things considered, the response to specific ASM or ASM combinations could be far from the anticipated response, implying that much is hidden and needs to be revealed.
Because of the complexity, polytherapy regimens are bound to vary depending on the patients. The causes of diversity are also due to the differences in national insurance systems, economic status, and clinicians’ preferences. This cohort exhibited a common pattern of ASM combinations prescribed by our experts. LEV plus OXC or VPA and LMT plus OXC were prescribed commonly in focal epilepsy, which is the same pattern in the data from Finland21 and similar to those from the United States22 where sodium channel blocker plus LEV was the most common combination as dual therapy in focal epilepsy. The Glasgow group preferred VPA plus LMT and PHT plus phenobarbital as a dual therapy regimen. The common monotherapy regimens in generalized epilepsy are LEV, VPA, and LMT, which is not different from another paper23.
Above all, the main purpose of this study was to develop an algorithm that can help select the patients who will be responders to a specific ASM or ASM combination. Given that even well-known ASMs may have an unrecognized mechanism of action for epilepsy24it is not possible to predict and select the best ASM pragmatically from the pharmacodynamic properties. The responsiveness to an ASM could be unpredictable owing to genetic polymorphisms affecting pharmacodynamics or kinetics. Our recent work25 also proved this association in lacosamide users. The work in another group tried to find the association between the polymorphism of UGT2B7, the main metabolic enzyme of VPA, and VPA response26. However, it did show negative results. In this study, the AI prediction performance was diverse according to ASM. Among monotherapy regimens, VPA showed a relatively better prediction performance, implying that this algorithm can predict the antiseizure effect of VPA on an individual basis better than other ASMs. Regarding the SHAP results of VPA monotherapy, generalized epilepsy, genetic etiology, and generalized-onset seizures were leading variables determining VPA responsiveness, which were compatible with the general principle. The ILAE guideline paper20 recommended CBM, LMT, OXC, PB, PHT, TPM, and VPA as initial monotherapy in generalized seizures with level C evidence. Aside from seizure or epilepsy type, some differences may exist in predicting the performance of ASMs, suggesting the presence of unrevealed personal factors, which highlight AI analysis using big data.
AI-based approaches investigated specific ASM responsiveness using single nucleotide polymorphism (SNP) data from multiple candidate genes in the Australian group27. Herein, the leave-one-out method could successfully predict the responsiveness to CBM or VPA by five SNPs, but it showed an insignificant result in predicting LMT responsiveness. The negative and positive predictive values were 67% and 60%, respectively, similar to ours regarding VPA. Our analysis demonstrated that LMT has the second-best performance following VPA. The most commonly prescribed ASM, LEV, showed an AUC of 0.540 and an accuracy of 0.544, which is a lower predictive power than the previous study28 using EEG and clinical features. Another study29 using only EEG features showed a slightly lower AUC of 0.75, but it was also higher than ours. Their outperformance, compared to ours, is likely due to the difference in the outcome to be classified. The previous study used the final remission, while our study focused on the response over the longitudinal course. Another explanation for the poor ability to predict LEV response is the broad range of effects regardless of clinico-electro-radiological status, including patient age, epilepsy type, and etiology. Recently, the prediction of the first ASM response was attempted with 1798 newly diagnosed patients. A similar approach using routinely collected data to predict ASM response by ML was recently published30. That study trained the model using the Glasgow registry and performed external validation, where the AUC was 0.62, to predict the outcome for the first ASM in the first year. It did not specify ASM. Another study used a large population from the US medical claim database and showed good performance of ASM regimen prediction, with an AUC of 0.72. However, it did not include epilepsy-specific information, such as seizure types, etiology, and electroradiologic data31. The prediction of brivaracetam efficacy was investigated utilizing genetic and clinical data from patients enrolled in phase III trials32. Despite its limited sample size, the study achieved an AUC of 0.76. This research benefits from incorporating a potentially significant variable, genetic influence. However, it diverges from our investigation, which examines a broader spectrum of drug responsiveness, whereas the previous study concentrates exclusively on the response of brivaracetam as an add-on therapy. Nonetheless, the methodological approach is akin to ours, employing a 50% response criterion.
Among dual therapy regimens, the response to CBM plus LEV could be predicted the best by the AI algorithm using the CATB classifier. Younger age at onset and male sex were explainable factors. Since a plausible mechanism cannot be suggested based on the findings of this study, more data are necessary to provide convincing evidence for accurate prediction of the response to polytherapy in future studies. For the most common polytherapy regimen, LEV plus OXC, the prediction performance was an AUC of 0.568 and an ACC of 0.565. This might be regarded as a disappointing result from a clinical point of view. However, to the best of our knowledge, this is the first attempt to predict responsiveness to ASM dual therapy.
The prediction of SCB responsiveness can be an imperative concept given that SCBs have been thought of as a core drug in polytherapy33. The older age, de novo patients, shorter duration of epilepsy, and the absence of epileptiform discharge were explainable factors of AI prediction although the prediction power was not high. Epileptiform discharge is known to be one of the predictors of drug-resistant epilepsy34. However, the reason why the presence of epileptiform discharge was more involved in SCB responder prediction than the other regimens should be further investigated.
Limitations
This is not a randomized or prospective study, leading to an inevitable imbalance in ASM choice. However, the various combinations from a large cohort could partly overcome this limitation. We admit that our algorithm for predicting the response to ASMs and final outcomes may be incomplete and have limited power. However, this approach holds the potential to reduce clinicians’ hesitation in selecting ASMs, especially if a sufficiently large and diverse dataset is accumulated in the future to overcome the limitations posed by current heterogeneity. However, our prediction algorithm seems more objective than other clinical decision-supporting systems solely based on expert opinions35,36. The second limitation is that our model did not utilize the specific genetic syndrome of epilepsy as a feature, which is the classic determinant of ASM choice. However, its effect is unlikely to be a great deal considering its minor proportion. Third, we did not investigate ASM adherence because we did not routinely record the status, whereas adherence is the premise of defining ASM responsiveness. ASM adherence was reported to reach 40% and is regarded as a cause of breakthrough seizures37. Fourth, we assessed the responsiveness of ASM after three or six months following the change in regimen. It is important to note that seizure occurrence can dynamically change38,39 therefore, the relatively short-term response may not solely be attributed to the ASMs. However, this timeframe is inevitable in real-world settings and is still considered substantial when compared to the assessment period in well-designed randomized clinical trials. Also, seizure frequency can vary over time or occur in clusters, which may not be fully captured in our analysis. In addition, adherence to ASM was not continuously monitored, and individual differences in treatment compliance could have influenced the observed outcomes. Some patients may also have made personal lifestyle adjustments, such as avoidance of alcohol, exercise, diet, or stress management, which could affect seizure occurrence. All these putative confounders may have contributed to the results. Therefore, our findings should be interpreted as reflecting the outcomes observed in association with ASM use in clinical practice, rather than the direct pharmacological efficacy of the drugs themselves. Considering the complex and evolving nature of epilepsy, future research that includes time-dependent clinical data may enhance the predictive accuracy of similar models. Incorporating pharmacogenomics data into drug response prediction would be beneficial, yet it presents practical challenges in real clinical practice. Since this study aimed to evaluate predictive power using initial baseline data in patients with epilepsy, we acknowledge the limitation of not considering genetic factors. Fifth, this study was conducted at a single center and lacks external validation, which limits the generalizability of the findings. External validation through multicenter collaboration is essential in future research.
There was a limitation in AI methods as well. AI algorithms heavily rely on not only dataset size but also dataset complexity40,41. Because the training, validation, and test sets were divided for each drug to reflect the clinical situation, the dataset size became small. As a result, even VPA, which is the third most commonly prescribed drug in monotherapy, was trained on only data from 200 patients. This limitation becomes more pronounced in dual ASM regimens, where certain combinations had very small sample sizes. In such cases, relatively high AUCs may be observed, but these results should be interpreted with caution due to the increased risk of overfitting. To support transparency, the number of training and testing cases for each regimen is reported in Supplementary Tables 2 and 3 and visualized in Fig. 4. On the contrary, if all ASM regimens were used in the training session and specific ASMs were used in the test session, the obtained algorithm would not reflect the responsiveness to various ASMs with different modes of action. However, the strength of this study is that this cohort comprises a relatively large number of patients without selection bias of enrollment and has detailed seizure records and meticulous epilepsy evaluations, compared to the previous study population of AI prediction.
Conclusion
This cohort study showed that our institution’s experts favor levetiracetam, oxcarbazepine, valproate, lamotrigine, and clobazam as mono-, dual, and triple therapies. Although it is a retrospective cohort and shows personal or single group-preferred data, SERENADE is the largest cohort from a single institution in an Asian country, which included detailed clinical information, images, an EEG database, and multiple trialed regimens over a long period of time. We underscore that this study fosters a baseline for multicenter collaboration for further validation of more regimens. What is even more interesting is that this is the first approach to use point outcome to evaluate the specific efficacy of ASMs. It is hoped that our novel approach of using AI to predict various ASM responders will enable even further performance improvement with an enormous database in combination with genetic factors and pave the way for refining epilepsy treatment strategies through future prospective studies.
Methods
The process of cohort establishment
Our cohort, SERENADE (Seoul national university hospital adult Epilepsy Retrospective cohort in the Era of Newer Antiseizure Drug Exposure), comprises 2586 consecutively and retrospectively collected adult patients and their data. The inclusion criteria were as follows: (1) a first visit to the experts of adult epileptology from 2008 to 2017, (2) a diagnosis of epilepsy based on the International League Against Epilepsy (ILAE) definition42 and (3) three years or more of follow-up. This study was approved by the Seoul National University Hospital Institutional Review Board (H-2102-178-1200) (H-2308-010-1455) and followed the principles of the Declaration of Helsinki. Due to the retrospective nature of the study, Seoul National University Hospital Institutional Review Board waived the need of obtaining informed consent.
Data collection and cohort structures
The patients’ lists and laboratory results were extracted from the clinical database warehouse in our institution. Additionally, investigators reviewed electronic medical records thoroughly, including sex, onset age, number of seizures before ASM initiation, de novo vs. referred case, seizure types, epilepsy classification, etiology, history of febrile convulsion, family history of epilepsy, comorbidities, co-medications (other than ASMs), and epilepsy surgery history. Detailed seizure occurrences were recorded homogenously at every visit to the clinic or admission. The intervals of outpatient clinics vary according to the patient’s circumstances, but the usual interval was three or six months. Laboratory results were collected when sampled within 90 days from the first visit. Routine blood data fulfilling the time criterion were available for 1782 (68.1%) patients.
EEGs were available in 2342 (90.6%) patients. MRI scans with an epilepsy-specific protocol in our institution could be obtained for 2036 (78.7%) patients. Surgical intervention, including resective operation and vagal nerve stimulation, was performed in 72 patients (2.8%).
Dataset for AI analysis
Among multiple ASMs, we considered 11 ASMs, including CBM, LCS, LEV, LMT, OXC, PER, PGB, PHT, TPM, VPA, and ZNS, for the response prediction analysis. Clonazepam was excluded from the analysis because it is frequently used for managing sleep-related or movement disorders. Gabapentin was also omitted as it is rarely used for ASM purposes at our center. Additionally, vigabatrin, rufinamide, and cannabidiol were excluded due to their low usage. Eslicarbazepine was introduced in our country in early 2021 and was not available for prescription during the period of this study. Furthermore, brivaracetam and cenobamate have not yet received approval, and thus, there are no prescription records for them. Additionally, prediction values were compared between SCBs, including PHT, CBM, OXC, LMT, and LCS, and non-SCBs.
In total, there were 84 categories, including 19 clinical, 33 blood parameters, 18 MRI-related, and 14 EEG-related features. Clinical variables included sex, onset age of epilepsy, epilepsy duration, number of seizures before ASM initiation, de novo or referred, seizure types (generalized, focal), history of febrile convulsion, family history of epilepsy, presence of comorbidities, presence of co-medication, three epilepsy classifications (generalized, focal, combined), and six etiologies (structural, genetic, infectious, metabolic, hypoxic, and immune). MRI findings were coded according to the lesion most relevant to the patient’s epilepsy by a consensus of three experienced epileptologists (KIP, SH, SKL) referring to the radiologist’s report. In patients who underwent surgery, when there was a discrepancy between the pathologic and the radiologic diagnosis, the coding was done based on the pathologic diagnosis. The categories are as follows; hippocampal sclerosis, tumor, focal cortical dysplasia, vascular anomaly, cerebromalacia, tuberous sclerosis, other migration disorders, supratentorial cyst, subdural hemorrhage/hygroma, hypoxic-ischemic insult, Sturge-Weber syndrome, calcified lesion, regional atrophy, encephalitis-related, others including vasculitis, demyelinating, progressive multifocal leukoencephalopathy, and multiple sclerosis and undetermined. The presence of potential epileptogenic lesions was added as a feature.
EEG coding was performed based on the first EEG during the entire duration, irrespective of the routine sleep & waking EEG (30-minute session) or video-EEG (at least 24-hour session). EEG features were divided into epileptiform discharges and irregular slow waves. Epileptiform discharges were classified into rhythmic spike-and-wave, sporadic spike-and-wave, rhythmic delta activity, and periodic discharge on the generalized or focal area. Irregular slow waves were coded with four features, including generalized continuous, generalized intermittent, focal continuous, and focal intermittent slow waves. Two additional parameters, the presence of epileptiform discharges and irregular slow waves, were also included for analysis. All parameters were summarized in Supplementary Table 5.
Outcome labeling for AI analysis
The outcome of each ASM regimen was the term to determine the efficacy of each drug or regimen at the time of the clinic visit. It was classified as a responder (R) if there was a reduction in seizure frequency of more than 50% between clinic visits compared to the immediate previous period, or not (NR)43. Various ML approaches, such as tree-based classifiers, i.e., RF, XGB, and CATB, were used.
In preparation for subsequent experiments and to facilitate easier interpretation and statistical analysis, categorical data were preprocessed using one-hot encoding. One-hot encoding is a process used to convert categorical variables into a binary matrix representation, where each category is represented by a binary vector with only one element set to 1 (hot) and the rest set to 0 (cold). This allows categorical data to be represented in a format that can be easily understood and processed by machine learning algorithms44. For the classification tasks, the dataset was partitioned into training, validation, and test sets using a random split, adhering to a proportion of 3:1:1 (train: valid: test) for each ASM. To address the issue of missing data and to enhance the performance of our classifiers, we employed the Multiple Imputation by Chained Equations (MICE) technique. MICE is a robust imputation method that provides better estimates by modeling each feature with missing values as a function of other features in an iterative round-robin fashion. This approach is particularly advantageous for handling missing in both categorical and continuous variables by utilizing all available data points to generate plausible values45. To confirm the validity of this choice, we compared AUC scores across different imputation methods, including KNN, Simple, and predictive model-based imputers. All methods showed similar performance, but MICE yielded slightly higher average AUC, supporting its use as the primary imputation strategy (Supplementary Table 6).
The AUC, ACC, F1 score, true positive ratio (TPR), true negative ratio (TNR), positive predictive value (PPV), and negative predictive value (NPV were derived as an evaluation matrix. For an additive explanation of the AI results, the SHAP method and conventional statistics were also applied.
Statistical analysis
The numerical values are expressed as numbers or mean ± standard deviation. When the data did not follow a normal distribution, the median and interquartile values are shown. To identify significant factors (p < 0.05), a Chi-squared test for categorical variables and an independent t-test or Mann‒Whitney test were utilized according to the data normality, assessed using the Shapiro test. ML analysis was conducted on Python 3.9.12. Also, SPSS (version 25, IBM, Chicago, IL, United States) was used for the multiple logistic analysis. GraphPad Prism (version 9, Dotmatics, San Diego, CA, United States), Inkscape (https://inkscape.org/), Rawgraphs (Version 2.0, DensityDesign Research Lab, Politecnico di Milano), and OriginPro (version 2022, Northampton, MA, United States) were used for graph drawing and editing.
Data availability
The datasets used and analyzed during the current study are available from the corresponding author upon reasonable request in anonymized form. All data generated or analyzed during this study are included in this published article and supplementary data. The authors are committed to responsible data sharing regarding this cohort study. These Data will be provided following publication at any time with no end date after review and approval of a research proposal and execution of a data-sharing agreement.
References
Kwan, P. & Brodie, M. J. Early identification of refractory epilepsy. N Engl. J. Med. 342, 314–319. https://doi.org/10.1056/NEJM200002033420503 (2000).
Kwan, P. et al. Definition of drug resistant epilepsy: consensus proposal by the ad hoc task force of the ILAE commission on therapeutic strategies. Epilepsia 51, 1069–1077. https://doi.org/10.1111/j.1528-1167.2009.02397.x (2010).
Siddiqui, A. et al. Association of multidrug resistance in epilepsy with a polymorphism in the drug-transporter gene ABCB1. N Engl. J. Med. 348, 1442–1448. https://doi.org/10.1056/NEJMoa021986 (2003).
Lindhout, D. Epilepsy treatment: precision medicine at a crossroads. Lancet Neurol. 14, 1148–1149. https://doi.org/10.1016/S1474-4422(15)00295-1 (2015).
Valderrama, M., Nikolopoulos, S., Adam, C., Navarro, V. & Le Van Quyen, M. In XII Mediterranean Conference on Medical and Biological Engineering and Computing 2010: May 27–30, 2010 Chalkidiki, Greece. 77–80 (Springer, 2010).
Mirowski, P., Madhavan, D., LeCun, Y. & Kuzniecky, R. Classification of patterns of EEG synchronization for seizure prediction. Clin. Neurophysiol. 120, 1927–1940 (2009).
Sinha, N. et al. Structural brain network abnormalities and the probability of seizure recurrence after epilepsy surgery. Neurology 96, e758–e771. https://doi.org/10.1212/WNL.0000000000011315 (2021).
Gleichgerrcht, E. et al. Temporal lobe epilepsy surgical outcomes can be inferred based on structural connectome hubs: A machine learning study. Ann. Neurol. 88, 970–983. https://doi.org/10.1002/ana.25888 (2020).
Memarian, N., Kim, S., Dewar, S., Engel, J. Jr. & Staba, R. J. Multimodal data and machine learning for surgery outcome prediction in complicated cases of mesial Temporal lobe epilepsy. Comput. Biol. Med. 64, 67–78. https://doi.org/10.1016/j.compbiomed.2015.06.008 (2015).
Hong, S. J., Bernhardt, B. C., Schrader, D. S., Bernasconi, N. & Bernasconi, A. Whole-brain MRI phenotyping in dysplasia-related frontal lobe epilepsy. Neurology 86, 643–650. https://doi.org/10.1212/WNL.0000000000002374 (2016).
He, X. et al. Presurgical thalamic hubness predicts surgical outcome in Temporal lobe epilepsy. Neurology 88, 2285–2293. https://doi.org/10.1212/WNL.0000000000004035 (2017).
An, S. et al. Predicting drug-resistant epilepsy - a machine learning approach based on administrative claims data. Epilepsy Behav. 89, 118–125. https://doi.org/10.1016/j.yebeh.2018.10.013 (2018).
Yao, L. et al. Prediction of antiepileptic drug treatment outcomes of patients with newly diagnosed epilepsy by machine learning. Epilepsy Behav. 96, 92–97. https://doi.org/10.1016/j.yebeh.2019.04.006 (2019).
Lee, D. A., Lee, H. J., Park, B. S., Lee, Y. J. & Park, K. M. Can we predict anti-seizure medication response in focal epilepsy using machine learning? Clin. Neurol. Neurosurg. 211, 107037. https://doi.org/10.1016/j.clineuro.2021.107037 (2021).
French, J. A. & Pedley, T. A. Clinical practice. Initial management of epilepsy. N Engl. J. Med. 359, 166–176. https://doi.org/10.1056/NEJMcp0801738 (2008).
French, J. A. et al. Efficacy and tolerability of the new antiepileptic drugs I: treatment of new onset epilepsy: report of the therapeutics and technology assessment subcommittee and quality standards subcommittee of the American academy of neurology and the American epilepsy society. Neurology 62, 1252–1260. https://doi.org/10.1212/01.wnl.0000123693.82339.fc (2004).
Marson, A. et al. The SANAD II study of the effectiveness and cost-effectiveness of levetiracetam, zonisamide, or lamotrigine for newly diagnosed focal epilepsy: an open-label, non-inferiority, multicentre, phase 4, randomised controlled trial. Lancet 397, 1363–1374. https://doi.org/10.1016/S0140-6736(21)00247-6 (2021).
Marson, A. G. et al. The SANAD study of effectiveness of valproate, lamotrigine, or topiramate for generalised and unclassifiable epilepsy: an unblinded randomised controlled trial. Lancet 369, 1016–1026. https://doi.org/10.1016/S0140-6736(07)60461-9 (2007).
Marson, A. et al. The SANAD II study of the effectiveness and cost-effectiveness of valproate versus Levetiracetam for newly diagnosed generalised and unclassifiable epilepsy: an open-label, non-inferiority, multicentre, phase 4, randomised controlled trial. Lancet 397, 1375–1386. https://doi.org/10.1016/S0140-6736(21)00246-4 (2021).
Glauser, T. et al. ILAE treatment guidelines: evidence-based analysis of antiepileptic drug efficacy and effectiveness as initial monotherapy for epileptic seizures and syndromes. Epilepsia 47, 1094–1120. https://doi.org/10.1111/j.1528-1167.2006.00585.x (2006).
Mäkinen, J., Rainesalo, S., Raitanen, J. & Peltola, J. The effect of newer antiepileptic drugs in combination therapy. Epilepsy Res. 132, 15–20. https://doi.org/10.1016/j.eplepsyres.2017.02.020 (2017).
Margolis, J. M., Chu, B. C., Wang, Z. J., Copher, R. & Cavazos, J. E. Effectiveness of antiepileptic drug combination therapy for partial-onset seizures based on mechanisms of action. JAMA Neurol. 71, 985–993. https://doi.org/10.1001/jamaneurol.2014.808 (2014).
Pipek, L. Z., Pipek, H. Z. & Castro, L. H. M. Seizure control in mono- and combination therapy in a cohort of patients with idiopathic generalized epilepsy. Sci. Rep. 12, 12350. https://doi.org/10.1038/s41598-022-16718-x (2022).
Kwan, P. & Brodie, M. J. Combination therapy in epilepsy: when and what to use. Drugs 66, 1817–1829. https://doi.org/10.2165/00003495-200666140-00004 (2006).
Ahn, S. J. et al. Effects of CYP2C19 genetic polymorphisms on the pharmacokinetics of lacosamide in Korean patients with epilepsy. Epilepsia https://doi.org/10.1111/epi.17399 (2022).
Adiga, S., Pb, N., Adiga, U. & Shenoy, V. UGT2B7 gene polymorphism and linkage disequilibrium in pediatric epileptic patients and their influence on sodium valproate monotherapy: a cohort study. Front. Pharmacol. 13, 911827. https://doi.org/10.3389/fphar.2022.911827 (2022).
Shazadi, K. et al. Validation of a Multigenic model to predict seizure control in newly treated epilepsy. Epilepsy Res. 108, 1797–1805. https://doi.org/10.1016/j.eplepsyres.2014.08.022 (2014).
Zhang, J. H. et al. Personalized prediction model for seizure-free epilepsy with Levetiracetam therapy: a retrospective data analysis using support vector machine. Br. J. Clin. Pharmacol. 84, 2615–2624. https://doi.org/10.1111/bcp.13720 (2018).
Croce, P. et al. Machine learning for predicting Levetiracetam treatment response in Temporal lobe epilepsy. Clin. Neurophysiol. 132, 3035–3042. https://doi.org/10.1016/j.clinph.2021.08.024 (2021).
Hakeem, H. et al. Development and validation of a deep learning model for predicting treatment response in patients with newly diagnosed epilepsy. JAMA Neurol. 79, 986–996. https://doi.org/10.1001/jamaneurol.2022.2514 (2022).
Devinsky, O. et al. Changing the approach to treatment choice in epilepsy using big data. Epilepsy Behav. 56, 32–37. https://doi.org/10.1016/j.yebeh.2015.12.039 (2016).
de Jong, J. et al. Towards realizing the vision of precision medicine: AI based prediction of clinical drug response. Brain 144, 1738–1750. https://doi.org/10.1093/brain/awab108 (2021).
Kwan, P. & Brodie, M. J. Epilepsy after the first drug fails: substitution or add-on? Seizure 9, 464–468. https://doi.org/10.1053/seiz.2000.0442 (2000).
Sultana, B. et al. Incidence and prevalence of Drug-Resistant epilepsy: a systematic review and Meta-analysis. Neurology 96, 805–817. https://doi.org/10.1212/WNL.0000000000011839 (2021).
Pestian, J. et al. Selecting anti-epileptic drugs: a pediatric epileptologist’s view, a computer’s view. Acta Neurol. Scand. 127, 208–215. https://doi.org/10.1111/ane.12002 (2013).
Gambardella, A. et al. Selection of Antiseizure medications for first add-on use: a consensus paper. Epilepsy Behav. 122, 108087. https://doi.org/10.1016/j.yebeh.2021.108087 (2021).
Kanner, A. M. & Bicchi, M. M. Antiseizure medications for adults with epilepsy: a review. JAMA 327, 1269–1281. https://doi.org/10.1001/jama.2022.3880 (2022).
Proix, T. et al. Forecasting seizure risk in adults with focal epilepsy: a development and validation study. Lancet Neurol. 20, 127–135. https://doi.org/10.1016/S1474-4422(20)30396-3 (2021).
Karoly, P. J. et al. Cycles in epilepsy. Nat. Rev. Neurol. 17, 267–284. https://doi.org/10.1038/s41582-021-00464-1 (2021).
Jan, B. et al. Deep learning in big data analytics: a comparative study. Comput. Electr. Eng. 75, 275–287 (2019).
Willemink, M. J. et al. Preparing medical imaging data for machine learning. Radiology 295, 4–15 (2020).
Scheffer, I. E. et al. ILAE classification of the epilepsies: position paper of the ILAE commission for classification and terminology. Epilepsia 58, 512–521. https://doi.org/10.1111/epi.13709 (2017).
Clinical investigation of medicinal products. In the treatment of epileptic disorders. Eur. Neuropsychopharmacol. 11, 253–259 (2001).
Harris, S. & Harris, D. Digital Design and Computer Architecture (Morgan Kaufmann, 2015).
Van Buuren, S. & Groothuis-Oudshoorn, K. Mice: multivariate imputation by chained equations in R. J. Stat. Softw. 45, 1–67 (2011).
Acknowledgements
This study was supported by the Korea Health Industry Development Institute, funded by the Ministry of Health & Welfare, Republic of Korea (RS-2023-00265638).
Author information
Authors and Affiliations
Contributions
KIP, and SKL conceptualized and designed the study. KIP, SH, YS, YJK, SBL, HS, MKK, YGK, and SKL contribute to data acquisition and analysis. KIP, JM, STL, KHJ, KC, KYJ, YGK, and SKL contribute to data interpretation. KIP, YJK, and HS draft the work. KIP, SH, YS, SBL, JM, STL, KHJ, KC, KYJ, YGK, and SKL performed critical revision. All authors had full access to the study design information and all data and approved final version to be published.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Supplementary Information
Below is the link to the electronic supplementary material.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Park, KI., Shin, Y., Hwang, S. et al. Prediction of personalized antiseizure medications response based on clinical signatures in epilepsy. Sci Rep 15, 33177 (2025). https://doi.org/10.1038/s41598-025-16881-x
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-025-16881-x