Next Article in Journal
How to Write Effective Prompts for Screening Biomedical Literature Using Large Language Models
Previous Article in Journal / Special Issue
ViBEx: A Visualization Tool for Gene Expression Analysis
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

High Accuracy of Epileptic Seizure Detection Using Tiny Machine Learning Technology for Implantable Closed-Loop Neurostimulation Systems

by
Evangelia Tsakanika
1,*,
Vasileios Tsoukas
1,
Athanasios Kakarountas
1 and
Vasileios Kokkinos
2
1
Intelligent Systems Laboratory, Department of Computer Science and Biomedical Informatics, University of Thessaly, 35131 Lamia, Greece
2
Department of Neurology, Northwestern Memorial Hospital and Northwestern University, Chicago, IL 60611, USA
*
Author to whom correspondence should be addressed.
BioMedInformatics 2025, 5(1), 14; https://doi.org/10.3390/biomedinformatics5010014
Submission received: 31 December 2024 / Revised: 15 February 2025 / Accepted: 27 February 2025 / Published: 10 March 2025
(This article belongs to the Special Issue Editor's Choices Series for Methods in Biomedical Informatics Section)

Abstract

:
Background: Epilepsy is one of the most common and devastating neurological disorders, manifesting with seizures and affecting approximately 1–2% of the world’s population. The criticality of seizure occurrence and associated risks, combined with the overwhelming need for more precise and innovative treatment methods, has led to the development of invasive neurostimulation devices programmed to detect and apply electrical stimulation therapy to suppress seizures and reduce the seizure burden. Tiny Machine Learning (TinyML) is a rapidly growing branch of machine learning. One of its key characteristics is the ability to run machine learning algorithms without the need for high computational complexity and powerful hardware resources. The featured work utilizes TinyML technology to implement an algorithm that can be integrated into the microprocessor of an implantable closed-loop brain neurostimulation system to accurately detect seizures in real-time by analyzing intracranial EEG (iEEG) signals. Methods: A dataset containing iEEG signal values from both non-epileptic and epileptic individuals was utilized for the implementation of the proposed algorithm. Appropriate data preprocessing was performed, and two training datasets with 1000 records of non-epileptic and epileptic iEEG signals were created. A test dataset with an independent dataset of 500 records was also created. The web-based platform Edge Impulse was used for model generation and visualization, and different model architectures were explored and tested. Finally, metrics of accuracy, confusion matrices, and ROC curves were used to evaluate the performance of the model. Results: Our model demonstrated high performance, achieving 98% and 99% accuracy on the validation and test EEG datasets, respectively. Our results support the use of TinyML technology in closed-loop neurostimulation devices for epilepsy, as it contributes significantly to the speed and accuracy of seizure detection. Conclusions: The proposed TinyML model demonstrated reliable seizure detection in real-time by analyzing EEG signals and distinguishing epileptic activity from normal brain electrical activity. These findings highlight the potential of TinyML in closed-loop neurostimulation systems for epilepsy, enhancing both speed and accuracy in seizure detection.

1. Introduction

Epilepsy is one of the most common and most devastating neurological disorders [1]. It is associated with social stigma, psychiatric comorbidities, and high treatment costs [2] and affects approximately 1–2% of the world’s population [3]. The condition is ranked as the second most burdensome neurological disorder worldwide in terms of disability-adjusted life years [4]. Epileptic seizures are the manifestation of a variety of brain-related etiologies associated with neuronal dysfunction and electro-chemical imbalance [5,6]. The occurrence of epileptic seizures has a significant impact on the patients’ daily routine and quality of living, often also devastating parents and caretakers. Patients with this condition are at high risk of physical injury secondary to seizures [7], status epilepticus [8], and sudden unexpected death (SUDEP) [9]. Patients with a diagnosis of focal epilepsy that turn out to be refractory to antiepileptic medication are approximately 30% of the adult patient population [10], and they are considered for epilepsy surgery as a means to further improve seizure control. Candidates for epilepsy surgery are assessed in specialized epilepsy facilities with non-invasive techniques, and a hypothesis regarding the origin of the epileptic activity is formulated by a multidisciplinary panel of epileptology and epilepsy surgery experts [11]. However, it is often the case that a fraction of these patients will not be offered traditional resective surgery [12] and instead become candidates for more palliative therapies such as invasive neurostimulation [13]. Neurostimulation therapy is approved for epileptic patients refractory to both medication and surgery, aiming to reduce the frequency of seizure occurrence and improve seizure control [14].
Machine learning (ML) is a specialized sector of artificial intelligence (AI) that focuses on achieving human learning abilities in machines while analyzing and optimizing big data for valuable results [15]. The application of ML in healthcare has contributed to the creation of advanced and effective methods of treating diseases [16,17], testing and approving drug discovery [18,19], optimizing and managing vast amounts of health data [20], offering data security and privacy [21,22], and enhancing financial accuracy. Hence, the contribution of inventive technologies is necessary to address health challenges.
Tiny Machine Learning (TinyML) is a technology that allows ML algorithms to run on smaller and less powerful hardware devices [23,24,25]. It is a fast-growing branch of ML, and due to its characteristics, it can be applied in many applications, especially in embedded systems [26], Internet of Things (IoT) devices, and wearable devices in general [27,28,29]. TinyML is a modern, cutting-edge technology that offers valuable advantages in many applications that require flexibility, speed, low power consumption, and immediate response to external stimulation [30,31].
Due to its capabilities, TinyML technology carries significant advantages over devices with large and complex processors. Some of the key benefits are (a) the Latency: TinyML models run and operate on edge devices, thus it is not necessary to send the data they record to cloud servers [32]; (b) Power Savings: due to the implementation of TinyML algorithms on microprocessors and microchips, the need for power and power supply is dramatically reduced [33]; (c) Network Integrity: TinyML algorithms continuously receive signals from the sensors of the microcontroller in which they are embedded, and process them directly and in real-time, reducing the need to send the data for external processing [34]; and finally (d) Data Security: due to direct access and processing of the generated data, the need for data transfer to external servers for processing is decreased [35].
A novel approach to the creation and implementation of a TinyML model for a closed-loop implantable neurostimulation device system is presented in this work. These systems can continuously and effectively track and analyze intracranial EEG (iEEG) signals from a patient and detect the possible occurrence of seizures in real-time. If the detected features of the iEEG signal suggest the occurrence of an epileptic seizure, the device applies electrical stimulation pulses to the implanted areas of the brain to suppress the ongoing seizure activity. The patient’s iEEG data are transferred from the device and stored in a cloud archive system, thus providing the patient’s physician access to evaluate the therapeutic progress. This research presents and focuses on the implementation of a TinyML model intended for use in a microprocessor of a closed-loop implantable neurostimulation device while also contributing to efficient and accurate operation and provision of the device.
A thorough introduction to the research’s concept is presented in Section 1. Section 2 provides a brief review of the current neurostimulation treatment options and a comparison between their key characteristics. Section 3 provides in-depth scientific research on TinyML, its advantages and applications, and existing research and bibliography. Section 4 provides evidence of the proposed model, its creation and implementation, and research analysis. The results of the performance of the model are presented in Section 5. Section 6 discusses the general view of the method and the opportunities and avenues arising from this research area. Finally, in Section 7, the summary and conclusions of the research are presented.

2. Neurostimulation Devices for Epilepsy Treatment

2.1. Vagus Nerve Stimulation

One of the available key neurostimulation devices for epilepsy is the Vagus Nerve Stimulator (VNS). VNS devices are recommended for adult and pediatric patients of all ages and seizure types [36]. This treatment consists of an implantable device surgically placed in the left subclavicular region, with the stimulation electrode wrapped around the patient’s vagus nerve [37,38]. This treatment aims to regularly apply electrical stimulation to the vagus nerve in an open-loop feedback-free fashion, thereby indirectly reaching the patient’s brain to affect the baseline epileptic activity and reduce the risk of epileptic seizure occurrence [39]. The VNS system also enables the patient to initiate the stimulation therapy upon the onset of their subjective warning (epileptic aura) by swiping a magnet over the implanted VNS device to suppress the ongoing seizure [40]. The VNS therapy takes more than several months before it shows appreciable effects on the patient’s seizures [41]. VNS therapy is also applied in psychiatric conditions, such as depression [42] and anxiety [43].

2.2. Deep Brain Stimulation

Deep Brain Stimulation (DBS) therapy is a widely applied treatment approach for medication-resistant epilepsy [44]. DBS is recommended for patients 18 years of age or older [45]. This therapeutic approach involves the implantation of the DBS device in the left subclavicular region [46], with two electrodes invasively placed into the patient’s brain—one targeting the left anterior thalamus and the other targeting the right anterior thalamus. The DBS device is programmed in an open-loop fashion to deliver stimulation of a specific duration at specific intervals directly to the anterior thalamic regions [47]. Like the VNS, the DBS aims to modulate the baseline epileptic activity and reduce the probability of seizure occurrence [48]. The DBS therapy also takes considerable time before it manifests notable changes in epileptic seizure control. DBS therapy has been used for the treatment of other neurological conditions, such as Parkinson’s disease [49], as well as psychiatric conditions such as depression [50] and obsessive-compulsive disorder (OCD) [51].

2.3. Responsive Nerve Stimulation

A more recent and sophisticated neurostimulation treatment approach for patients with medication-resistant epilepsy is the responsive neurostimulation (RNS) [52]. RNS therapy involves a device surgically implanted in the skull after craniotomy, connected to two invasive electrodes implanted in the brain, applying electrical stimulation pulses to regions associated with the onset of epileptic seizures to suppress the ongoing epileptic seizure activity [53,54]. RNS neurostimulation treatment is approved only for adults [55]. The main difference between RNS and the VNS/DBS approaches is its closed-loop principle of operation that allows the device to read the iEEG signals in real time, process them in situ, and detect the onset of an epileptic seizure in the patient’s brain [56]. When the onset of an epileptic seizure is detected, the RNS device applies a pre-programmed amount of electrical stimulation therapy to the implanted areas of the brain to suppress the ongoing seizure. The RNS device is trained to detect the patient’s seizure activity during the post-operative interval after device implantation and before stimulation is activated. Currently, the RNS is supported by a battery with a lifespan of approximately 8–10 years [57].

2.4. Comparison of Device Treatments

Based on currently published literature, the RNS approach is the only one with the ability to act based on the patient’s iEEG signals and allows review of the patient’s seizure and baseline activity by a supervising epilepsy expert [58]. However, the RNS device can only be implanted in the patient’s skull, which introduces considerable surgical risk [52]. In contrast, the VNS and DBS devices implanted in the left subclavicular region introduce less surgical risks [59,60]. Overall, the main advantages of the closed-loop RNS therapy over the open-loop VNS and DBS therapies are (a) its efficiency in iEEG monitoring and seizure detection, (b) the potential for an epilepsy expert to evaluate the patient’s therapeutic progress from the iEEG recordings at any time, and (c) the low complication rate associated with its use. The main features of the three available neurostimulation devices relevant to this study are shown in Table 1 [14].

3. TinyML: Advantages and Technologies

Current Research

TinyML technologies are used by the scientific community and have contributed significantly to the design of various research projects and everyday applications.
More specifically, Yadav et al. [61] presented a portable system for detecting human activity using a TinyML algorithm for fast and immediate analysis and processing, while Saha et al. [62] provided an extensive review of techniques and approaches for applying machine learning algorithms to microcontrollers utilizing TinyML. In addition, Tsoukas et al. [63] implemented an intelligent system to facilitate agricultural tasks. Additionally, Gkogkidis et al. [64] utilized TinyML technology for indoor leakage detection. Furthermore, Sabovic et al. [65] highlighted the reduced battery consumption resulting from using TinyML technology in microprocessors. An essential component in the development of TinyML research is the work of David et al. [66], who created the TensorFlow Lite programming library for implementing TinyML algorithms. Sabry et al. [28] and Sun et al. [67] combined Neural Network techniques with TinyML technologies.
As far as the healthcare sector is concerned, TinyML technologies have contributed significantly to the development and evolution of valuable and innovative projects. More specifically, TinyML algorithms have been exploited in the creation of vital metrics monitoring and analysis systems for blood pressure prediction [68], as well as for the processing and analysis of real-time-detected ECG signals for patient monitoring [69]. TinyML technologies are an integral component of applications in brain disorders. A recent study by Gibbs et al. [70] presented a resource-constrained system aimed at detecting stress levels, while Mai et al. and Tharian et al. [71,72] presented the implementation of intelligent systems that use TinyML algorithms to detect emotions. On the other hand, Hashir et al. [73] implemented a resource-constrained system that can detect a brain stroke episode through microwave head imaging analysis by a TinyML algorithm. Finally, Tsoukas et al. [74] and Diab & Rodriguez-Villegas [75] presented an extensive guide on the usefulness and applications of TinyML in the healthcare field.
Classic machine learning algorithms have greatly facilitated accurate and rapid detection of epileptic seizures [76]. Several machine learning techniques and their results in detecting epileptic seizures through EEG signals have been presented by Yuan et al. [77]. Although research on TinyML technologies is continuously evolving, expanding across various domains and significantly impacting everyday life—particularly in healthcare—it is acknowledged that further investigation is required in epilepsy to leverage its potential fully. Based on the current literature, there are very remarkable studies that deal with the application of TinyML to the classification of EEG signals. Tragoudaras et al. [78] managed to create a TinyML algorithm for EEG signal classification that is capable of being embedded in a microprocessor, while Agrawal et al. [79] examined a new architecture that combines Neural Network and Decision Tree algorithms for the creation of a TinyML algorithm for biomedical applications, including epileptic seizure detection. Additionally, Ponnada et al. [80] explored the application of TinyML in assistive devices, focusing on applications of health monitoring, where one of each was in epileptic seizures. Finally, Motahhir and Bossoufi [81] explored the integration of TinyML and IoT to develop resource-efficient models suitable for embedded systems, with focus on predicting epileptic seizures. Therefore, TinyML and advanced machine learning technologies hold significant potential in epilepsy and generally in wearable, implantable, and edge healthcare devices. Further exploration and refinement of these methodologies are essential to developing more autonomous, adaptive, and patient-centric solutions, ultimately improving real-time monitoring, early intervention, and personalized therapies and, thus, neurostimulation.

4. System and Model Presentation

The aim of this research is to create a TinyML model with the ability for integration into the microprocessor of an implantable closed-loop neurostimulation device in order to achieve fast, efficient, and accurate detection of any emerging epileptic seizure in the patient wearing the device with the least possible consumption of the device’s resources. The architecture of the implantable closed-loop neurostimulation system appropriate for our technology resembles the existing RNS system [82]. Our proposal aspiration is for this system to have the novelty of using a TinyML algorithm, aiming at more accurate and rapid processing of the patient’s EEG signals in order to detect the occurrence of an epileptic seizure and generate an appropriate response after an immediate decision to suppress the ongoing epileptic seizure. However, it is important to note that our proposal focuses only on processing and classifying EEG signals, not on the response to the ongoing seizure. More specifically, the presented system has the potential to continuously record the patient’s EEG signals, perform real-time processing, analyze the recorded EEG signals, and, based on their features, determine when an epileptic seizure occurs. A more detailed description of the model architecture is given in Section 4.4.2.
When an epileptic seizure is detected, the system may apply a predetermined amount of electrical stimulation therapy to the implanted area of the patient’s brain to suppress the ongoing seizure; when the system detects normal non-epileptic brain signals, neurostimulation remains inactive yet continues to track the EEG for seizures.

4.1. Device Selection

In the context of this research, for the proposed system, a survey of the available microprocessors with available resources and ability to incorporate TinyML algorithms was conducted, and the nRF52840 microcontroller was selected for implementation. The selection was based on the microcontroller’s characteristics and its wide use in applications and systems aimed at fast and accurate real-time data analysis while requiring low computational power and resources. Notable research, both in the scientific fields of IoT and Biomedicine, claims the usefulness of this microprocessor in various applications, for instance, the development of an innovative system for patient rehabilitation [83], development of a system to assist people with disabilities [84], and implementation of a system for voice recognition [85].

4.2. Dataset Selection

The dataset used to implement the model in this research is the “Epilepsy Seizure Recognition” dataset available on the Kaggle platform [86].
The dataset consists of a total of 100 scalp EEG records, each record representing a single subject. Each record contains brief segments of brain activity. The dataset includes five separate categories of subjects, represented by labels 1, 2, 3, 4, and 5. Subject category 1 represents signals of epilepsy patients, while subject categories 2, 3, 4, and 5 represent non-epileptic individuals.
In the context of this research, we used EEG recordings from category 1 epilepsy patients and categories 4 and 5 non-epileptic individuals. The model was trained using a supervised technique using a total of 2000 EEG records of both non-epileptic individuals and epileptic patients. Finally, it was tested with 500 randomly selected EEG records not included in the training datasets.

4.3. Platform Selection: Edge Impulse

The Edge Impulse platform was utilized for this research [87]. Edge Impulse is a cloud-based platform for developing, implementing, and testing machine learning models in edge devices [88,89]. It is a direct and fast web-based environment that enables both data upload and real-time data collection. It has data processing capability and the ability to develop, without intensive programming activity, functional and edge-based machine learning models of many types and functions. The acclaimed tool has also been exploited for its simplicity, flexibility, compatibility with many special purposes and general-purpose microprocessor devices, and wide range of alternatives for training machine learning models.
Edge Impulse software is widely used in many research applications and projects, especially in the TinyML research area [90]. Very important to mention is the contribution of this software to research on the Internet of Things and the creation of both machine and deep learning models [91]. At the same time, the software’s contribution to biomedical projects, such as analyzing medical images and medical data, is also significant [92].

4.4. Model Development, Implementation, and Infrastructure

4.4.1. Data Preprocessing and Exploration

Appropriate pre-processing of the used dataset was first performed. More specifically, two CSV files were created for the model training process. The first CSV file contained 1000 records with label 1, i.e., records of epileptic patients, while the second contained 1000 records with labels 4, 5, i.e., records of non-epileptic individuals. In these CSV files, data cleaning and data checking were performed using Python 3.11.4 version scripts to make them suitable for model training. The CSV files consist of a total of 180 columns, of which the first one is the id of the individual, columns 2 to 179 contain the EEG signal records, and column 180 contains the labels.
Furthermore, a header line was added in the first row of the CSV files to clarify the separation of the columns from the model. After completing the above process, the two CSV files were uploaded to the Edge Impulse platform for training. The training data were separated into training and validation data at a percentage of 80–20%.
The model was tested on an independent dataset similarly derived from the baseline dataset. A random selection was performed between samples labeled 1,4,5, which were checked to verify that they had not been previously used for model training, and a CSV file with 500 records of both non-epileptic and epileptic individuals was created. Similarly, using the above procedure, the same pre-processing of the data in the CSV file was carried out in order to obtain clean and appropriately formatted data that can be understood by the model. Then, after pre-processing, the CSV file was uploaded to the Edge Impulse platform to test the model.
To identify the key differences and different characteristics of epileptic EEG signals from non-epileptic brain signals, a brief exploratory analysis of the data was performed using the Python programming language. As shown in Figure 1, the range of values of the EEG signals of non-epileptic individuals is smaller than the corresponding range of values of the EEG signals of epileptic patients. More specifically, the values of non-epileptic EEG signals range from approximately −380 to 330 uV. Regarding the distribution of the values of the epileptic EEG signals, it was observed that the epileptic EEG values range from approximately −1800 up to about 2000 uV.
Furthermore, it is observed that the values of non-epileptic EEG signals have a frequency of occurrence in about 17,600 EEG recordings, with values close to 0. On the contrary, it is observed that the values of epileptic EEG signals have a frequency of occurrence in about 25,000 EEG recordings, with values close to 0. Regarding the distribution of the occurrence of the different values of the non-epileptic EEG signals, it is observed that the difference in appearance frequency is smoother and more linear. Regarding the distribution of the occurrence of the different values of the epileptic EEG signals, it is observed that the difference in appearance frequency has a more significant scaling. The distribution of both non-epileptic and epileptic EEG signal values follows the normal distribution. Therefore, based on the above observations, it is comprehensible that the values of epileptic EEG signals have a more extensive range starting from larger negative values and reaching larger positive values compared to the corresponding values of non-epileptic EEG signals while they are also presented with a higher frequency. Figure 1 shows the EEG signal values on the x-axis and the frequency of occurrence of each signal value on the y-axis. The left panel of Figure 1 shows the non-epileptic EEG signals while the right panel shows the epileptic EEG signals.
Once the data preprocessing and exploration were completed, all the data were successfully uploaded to the Edge Impulse platform and the creation of “Impulse” followed. The “Impulse” in the Edge Impulse platform is the process through which the user defines how they want the raw data uploaded to their dataset to be received and how they will be processed using signal processing techniques to detect patterns and points of interest so that they can be correctly and efficiently classified by the model. A window size of 1000 ms and a frequency of 50 Hz were used.

4.4.2. Comparison and Selection of Model Architecture

After this creation, the process of finding the appropriate model architecture continued. Since the data studied in this research are in the form of a time series, it was necessary to choose the appropriate layers of the model. Therefore, the input layer was initially chosen to consist of 50 features, and the output layer consisted of 1 class. Regarding the structure of the intermediate layers of the model, several different approaches and combinations were tested and investigated to find the most efficient architecture. Some selected architectures whose performances were tested in order to find the most efficient architecture are presented in Table 2 and Table 3 for the validation and test set, respectively. The choice of the most suitable architecture was based on the model’s performance on both the validation set and the test set.
The four architectures presented in the performance table are worth mentioning and comparing with the selected one. Architecture 1 consists of two dense layers with 20 and 10 neurons and a dropout layer of 0.5 rate. It uses spectral analysis with wavelet transformation with bior1.3 value as a parameter. Architecture 2 consists of two dense layers with 20 and 10 neurons while also using spectral analysis with a wavelet parameter with the haar value for the data processing. Furthermore, Architecture 3 uses two dense layers with 40 and 20 neurons and a dropout layer of 0.5 rate while using a spectral analysis of 16 FFT points. Based on the above results, it is concluded that both the small number of neurons in the intermediate dense layers and the use of wavelets resulted in a lower final accuracy of the model in the validation and test datasets, respectively.
In conclusion, Architecture 4, which is highlighted for its best performance and is the one that was selected for the model in this research, consists of two dense layers with 40 and 20 neurons, and has a dropout layer with a 0.25:1 ratio while using spectral analysis with 64 FFT points. A workflow of the model’s architecture is shown in Figure 2. The specific architecture achieved 1.48% accuracy in the validation set and 99% accuracy in the test set, with a completion time of 4 ms while using only 1.4 KB of RAM and 17.3 KB of Flash usage of the microprocessor. All the architectures presented above were executed in 30 epochs running cycles.

5. Model Results

The selection of the architecture of the model in this study, derived from the exploration, as mentioned, is based on its performance on both the validation set and the test set. More specifically, the architecture supported for incorporation into the RNS implantable device consists of an input layer containing 37 features, two dense layers of 40 and 20, and a dropout layer with 0.25:1 ratio. It also includes an output layer with two classes for both non-epileptic and epileptic signal detection to be successfully performed on the patient. Additionally, it is of paramount importance to mention that this architecture uses only 1.4 KB of the microprocessor’s RAM and 17.3 KB of the microprocessor’s FLASH memory. Finally, the total execution time of the model is 4 ms. It is necessary to highlight that this model, after research, was concluded at 30 epochs as its optimal training with a training rate of 0.0005 to avoid over-fitting the model and inaccurate results.
Based on the above layer combination, this architecture was able to achieve 98.3% specific accuracy in the validation set while achieving 0.05 loss and 98.18% accuracy in the test set. The following figures show two scatter plot diagrams of the validation and test set data. Figure 3 represents the performance of the model using the validation set, while Figure 4 represents the performance using the test set. Both figures include yellow-colored points representing correctly predicted data with label 0, expressing signals in non-epileptic individuals, and purple-colored points representing incorrectly predicted data with label 0. The green points represent correctly predicted data with label 1, expressing signals in epileptic patients, while the orange-colored points indicate incorrectly predicted data with label 1. It is important to mention that in the scatter plot of the test set, a small number of points (two points) were classified as unknown and are colored grey.
Confusion matrices of the model’s performance using both validation and test sets were also generated. Based on the confusion matrix of the validation set (Table 4), we concluded that 98.5% of the data with label 0 and 98.0% with label 1 were predicted correctly in the validation set. Similarly, Table 5, which contains the confusion matrix of the test set, shows that 99.2% of the data with label 0 and 97.1% with label 1 were predicted correctly in the test set. In addition, it is observed that more data with label 1 were mispredicted as data with label 0 in both the validation and test sets. Compared to the misprediction of data with label 0, the percentage of inaccurately predicted data with label 1 is 2.0:1.5% and 1.2:0.4%, respectively. Finally, both data labeled 0 and 1 had an F1 score of 0.98 out of 1 in the validation set and 0.99 for label 0 and 0.98 for label 1 in the test set.
In addition, Sensitivity and Specificity metrics were calculated to estimate the model’s performance. Sensitivity is a categorical metric that depicts a model’s ability to predict true positives in each available category, specifically the model’s ability to correctly find the samples characterized by the available categories ‘ labels. Specificity is a categorical metric that depicts the model’s ability to predict true negatives of each available category, mainly depicting the model’s ability to correctly find samples not characterized by a specific category label. By calculating the theoretical formulas of the Sensitivity and Specificity metrics based on the True Positive (TP), True Negative (TN), False Positive (FP), and False Negative (FN) labels, which can be calculated from the confusion matrix, the following sensitivity and specificity results were obtained for the model:
Sensitivity and Specificity for Label 0—Non-Epileptic EEG Signals—Validation Set:
S e n s i t i v i t y = T P T P + F N = 0.9805 0.9805 + 0.015 = 98.49 %
S p e c i f i c i t y = T N T N + F P = 0.980 0.980 + 0.020 = 98.0 %
Sensitivity and Specificity for Label 1—Epileptic EEG Signals—Validation Set:
S e n s i t i v i t y = T P T P + F N = 0.980 0.980 + 0.020 = 98.0 %
S p e c i f i c i t y = T N T N + F P = 0.9805 0.9805 + 0.015 = 98.49 %
Sensitivity and Specificity for Label 0—Non-Epileptic EEG Signals—Test Set:
S e n s i t i v i t y = T P T P + F N = 0.992 0.992 + 0.04 = 96.12 %
S p e c i f i c i t y = T N T N + F P = 0.971 0.971 + 0.012 = 98.77 %
Sensitivity and Specificity for Label 1—Epileptic EEG Signals—Test Set:
S e n s i t i v i t y = T P T P + F N = 0.971 0.971 + 0.012 = 98.77 %
S p e c i f i c i t y = T N T N + F P = 0.992 0.992 + 0.04 = 96.12 %
Thus, based on the model’s performance using the validation set, the sensitivity is approximately 98.5% and the specificity is approximately 98.0% for the prediction of label 0 and 98.0% and 98.5%, respectively, for the prediction of label 1. Referring to the model’s performance using the test set, the sensitivity is approximately 96.12% and the specificity is approximately 98.77% for the prediction of label 0 and 98.77% and 96.12%, respectively, for the prediction of label 1; two EEG signals were classified as unknown.
Finally, the area under the curve metric was calculated and the ROC curve was constructed to determine the reliability of the model’s results. The area under the curve metric and the ROC curve plot are multi-purpose techniques for quantifying and visualizing a model’s predictions and reconciling the possible and risky predictions of a model. The two ROC curve diagrams for predicting performance using the validation and test sets are presented below (Figure 5 and Figure 6).
Visualization of the model’s performance based on the ROC curves shows that both label 0 (non-epileptic EEG signals) and label 1 (epileptic EEG signals) demonstrate high levels of performance, with area under the curve (AUC) values of 0.98 for both labels. This indicates that the model has excellent capability to distinguish between non-epileptic and epileptic EEG signals. A high AUC value close to 1.0 signifies that the model has a strong true positive rate while maintaining a low false positive rate, thus confirming its effectiveness and reliability in correctly identifying and differentiating the two classes. This robust performance is crucial for the precise detection and response to the occurrence of a seizure.

6. Discussion

The advent of the use of implantable neurostimulation devices for the treatment of medication-resistant epilepsy and epilepsy not amenable to surgical therapy is a significant advancement in the management of epileptic patients [14,93]. All currently clinically approved neurostimulation systems are designed to deliver electrical stimulation therapy to reduce the risk of epileptic seizures occurring. However, only one of these devices, the RNS system, acts in real-time based upon the patient’s own iEEG data, introducing a closed-loop functionality to its principle of operation and the overall therapeutic approach. In this respect, neurostimulation devices implementing closed-loop activation therapy have higher demands for processing efficiency and accuracy in detecting the target iEEG epileptic pattern. Based on the published scientific literature, this system helps many different classes of patients, such as adult patients with onset epilepsy [94] and even in more specific cases of epileptic patients who suffer from other health conditions, such as eriventricular nodular heterotopia [95]. In addition, research has been conducted on the application and efficacy of the RNS system in the treatment of drug-resistant epilepsy in pediatric patients [94,95,96].
Neurostimulation is currently offered as a palliative therapy to epilepsy patients who have failed to respond to several first-line anti-epileptic medications over a reasonable time interval [97] and, who, after detailed presurgical workup, are rendered poor candidates for resective or ablative epilepsy surgery. There is a multitude of reasons why the patient’s candidacy for epilepsy surgery may be cancelled, most often because the area responsible for the generation of epileptic seizures is either over eloquent cortex (underlying key brain functions such as body motion, somatic sensation, vision, and language), or distributed in multiple foci across the brain (namely multifocal epilepsy), or because the presurgical evaluation failed to clearly define the extent of a resectable region (non-localizable seizure origin) [98]. Cultural confounds and influences can also affect the patient’s decision to undergo epilepsy surgery. Before the availability of implantable neurostimulation devices, these patients would undergo no further evaluation or surgical treatment and would be placed on a long pathway of recurrent anti-epileptic medication trials. Now, the neurostimulation approach is offered in a palliative manner, with the expectation that it will provide a substantial improvement to the patient’s seizure control by either reducing the frequency of seizure occurrence, the duration of seizures, or the intensity of seizure manifestation [99].
Currently, one closed-loop (RNS) and two open-loop (VNS and DBS) neurostimulation devices have been approved for refractory epilepsy patients. However, evaluating these invasive devices in terms of efficacy of seizure control is an ongoing process in the clinical field [100,101,102]. The RNS has provided the epilepsy community with a unique access to a continuously growing dataset of intracranial data. The most crucial advantage of accessing the patient’s iEEG data during neurostimulation therapy is the potential for superior evidence-based clinical evaluation of the patient’s seizure control. The epilepsy physician can assess the patient’s seizure burden and the efficacy of neurostimulation therapy without having to rely on subjective reports from the patient or parents/caretakers, thus making the assessment based on hard evidence recorded by the device. At the same time, the RNS device generates a large quantity of iEEG data that has opened a new pathway to personalized approaches to seizure detection, stimulation therapy, and overall personalized medicine for epilepsy [103]. In this context, computational methods used to process the iEEG data uncover features associated with improved outcomes and treatment [104] and develop novel strategies for seizure detection, which are most valuable in the epilepsy field. The RNS system has been approved for and studied in several clinical trials in a restricted adult patient population diagnosed with refractoryfocal epilepsy [105,106,107]. More specifically, responsive neurostimulation was approved as a surgical treatment option for adult patients who were refractory to both anti-epileptic medication and resective surgery and have either a single non-resectable epileptic focus (e.g., overlapping with eloquent cortex) or more than one epileptic focus (multifocal epilepsy). In this respect, the majority of its clinical use as well as the respective clinical trials [105,107], have so far been restricted to this patient group. However, several off-label pediatric populations and patients with generalized epilepsy have received neurostimulation therapy via RNS for their refractory seizures, and the relevant literature is growing [108]. In addition, over the past decade, the application of neurostimulation treatments has extended to include off-label psychiatric patient groups, such as people suffering from obsessive-compulsive disorder (OCD) [109], depression [110], and eating disorders [111].
The TinyML model proposed here achieved good and reliable seizure detection in terms of the accuracy of real-time inspection of the EEG signal dataset and discriminating epileptic activity from the normal background electrical activity of the brain. Our model presented an excellent performance of 98% and 99%, respectively, for the validation and test datasets of actual EEG data. Our results support the use of the TinyML algorithm in closed-loop neurostimulation devices for epilepsy, as it contributes significantly to the speed and accuracy of seizure detection. The integration of TinyML and ML algorithms into closed-loop neurostimulation devices is a promising approach that enhances the device’s functionality, flexibility, and accuracy by providing a more rapid and accurate detection mechanism. TinyML can enable the implementation of machine learning models directly on the implantable device’s hardware, which encompasses a crucial role in real-time data processing and therapeutic responses. The processing and analysis of real-time EEG data on-board minimizes computational latency and reduces dependency on external processing, which is essential for timely intervention. In addition, TinyML can facilitate personalized treatment approaches by continuously learning and adapting to the patient’s unique iEEG patterns, implementing tailored detection and therapeutic approaches to neurostimulation.
In addition to the above clinical applications, it is worth outlining the interdisciplinary nature of applying TinyML as a complementary technology in other biomedical devices, facilitating the detection of other medical conditions. The aim of our work, in addition to showcasing a TinyML model for the detection of epileptic seizures in implantable closed-loop neurostimulation devices, is to provide a robust basis for the application of our model architecture to other biomedical resource-constrained devices [112,113]. With appropriate adaptations and depending on the nature of the medical problem in each patient group, our model can be used for the implementation of specialized models for processing other biological signal modalities, such as electrocardiography (ECG) signals for devices offering cardiac monitoring [114].
An additional key is the implementation of TinyML algorithms using both web development cloud platforms, such as Edge Impulse, and programming language packages, such as TensorFlow Lite Micro library [66,115], Microsoft Edge ML [116], and EmbML Tool [117,118]. These software development and platform options significantly contribute to the development and implementation of TinyML models adapted to the device specifications and available resources. Nevertheless, it is crucial in this field of research, as well as in the medical sector as a whole, to consider key ethical principles to ensure responsible, meaningful, and impactful research [119,120,121].

7. Conclusions

The closed-loop neurostimulation treatment approach in epilepsy provides essential support to patients refractory to both antiepileptic medication and traditional epilepsy surgery. The use of the TinyML algorithm in closed-loop neurostimulation systems and other implantable and wearable devices in general is a promising tool and part of an evolving scientific research field that aims to achieve optimal and more precise treatment. The TinyML model proposed here achieved good and reliable accuracy in detecting epileptic seizures by performing real-time detection of seizure activity in the EEG signal, and reliable separation of the latter from normal background EEG activity. Excellent performance of 98% and 99% using the validation and test sets of the model, respectively, was achieved. Our results also show that the use of the TinyML algorithm contributes significantly to the speed and accuracy of seizure detection. The integration of TinyML technology in closed-loop implantable neurostimulation devices can result in significant advancements in the invasive treatment of epilepsy, offering real-time precise detection and intervention to reduce seizure activity. This innovative approach has the potential to enhance the efficacy of seizure management and can pave the path for personalized treatment plans tailored to individual neural activity patterns. The combination of neurostimulation and cutting-edge machine learning technology underscores a promising future for the management of epilepsy, aiming to significantly improve the quality of life for those affected by this devastating brain disorder.

Author Contributions

Conceptualization, E.T.; methodology, E.T.; software, E.T.; validation, E.T.; formal analysis, E.T.; investigation, E.T.; resources, E.T.; data curation, E.T.; writing—original draft preparation, E.T.; writing—review and editing, E.T., V.T., A.K. and V.K.; visualization, E.T.; supervision, V.T., A.K. and V.K.; project administration, V.T. and A.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

All data analyzed in this research were retrieved from Kaggle, specifically from the public dataset entitled “Epileptic Seizure Recognition Dataset” (2021). The dataset is available online at https://www.kaggle.com/datasets/yasserhessein/epileptic-seizure-recognition (accessed on 26 February 2025).

Acknowledgments

The infrastructure of the laboratory “ParICT-CENG” was leveraged for the experiments described in this work. The authors acknowledge the contribution and support to this work by the computing node “ParICT\_CENG: Enhancing ICT research infrastructure in Central Greece to enable processing of Big data from sensor stream, multimedia content, and complex mathematical modeling and simulations” (MIS 5047244), which is implemented under the Action “Reinforcement of the Research and Innovation Infrastructure”, funded by the Operational Program “Competitiveness, Entrepreneurship and Innovation” (NSRF 2014-2020) and co-financed by Greece and the European Union (European Regional Development Fund).

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
TinyMLTiny Machine Learning
MLMachine Learning
AIArtificial Intelligence
EEG Electroencephalography (signals)
iEEGIntracranial Electroencephalography (signals)
SUDEPSudden Unexpected Death of some
IoTInternet of Things
TPTrue Positive
TNTrue Negative
FPFalse Positive
FNFalse Negative
AUCArea Under Curve
ROC-CurveReceiver Operating Characteristics Curve

References

  1. Fiest, K.M.; Sauro, K.M.; Wiebe, S.; Patten, S.B.; Kwon, C.S.; Dykeman, J.; Pringsheim, T.; Lorenzetti, D.L.; Jetté, N. Prevalence and Incidence of Epilepsy: A Systematic Review and Meta-Analysis of International Studies. Neurology 2017, 88, 296–303. [Google Scholar] [CrossRef] [PubMed]
  2. Begley, C.E.; Beghi, E. The Economic Cost of Epilepsy: A Review of the Literature. Epilepsia 2002, 43, 3–9. [Google Scholar] [CrossRef] [PubMed]
  3. Falco-Walter, J. Epilepsy—Definition, Classification, Pathophysiology, and Epidemiology. Semin. Neurol. 2020, 40, 617–623. [Google Scholar] [CrossRef] [PubMed]
  4. Murray, C.J.L.; Vos, T.; Lozano, R.; Naghavi, M.; Flaxman, A.D.; Michaud, C.; Ezzati, M.; Shibuya, K.; Salomon, J.A.; Abdalla, S.; et al. Disability-Adjusted Life Years (DALYs) for 291 Diseases and Injuries in 21 Regions, 1990–2010: A Systematic Analysis for the Global Burden of Disease Study 2010. Lancet 2012, 380, 2197–2223. [Google Scholar] [CrossRef]
  5. Farooq, M.S.; Zulfiqar, A.; Riaz, S. Epileptic Seizure Detection Using Machine Learning: Taxonomy, Opportunities, and Challenges. Diagnostics 2023, 13, 1058. [Google Scholar] [CrossRef]
  6. Gabeff, V.; Teijeiro, T.; Zapater, M.; Cammoun, L.; Rheims, S.; Ryvlin, P.; Atienza, D. Interpreting Deep Learning Models for Epileptic Seizure Detection on EEG Signals. Artif. Intell. Med. 2021, 117, 102084. [Google Scholar] [CrossRef]
  7. Singh, G.; Sander, J.W. The Global Burden of Epilepsy Report: Implications for Low- and Middle-Income Countries. Epilepsy Behav. 2020, 105, 106949. [Google Scholar] [CrossRef]
  8. Shorvon, S. Tonic Clonic Status Epilepticus. J. Neurol. Neurosurg. Psychiatry 1993, 56, 125–134. [Google Scholar] [CrossRef]
  9. Nashef, L. Sudden Unexpected Death in Epilepsy: Terminology and Definitions. Epilepsia 1997, 38, S6–S8. [Google Scholar] [CrossRef]
  10. Kwan, P.; Brodie, M.J. Early Identification of Refractory Epilepsy. N. Engl. J. Med. 2000, 342, 314–319. [Google Scholar] [CrossRef]
  11. Cross, J.H.; Jayakar, P.; Nordli, D.; Delalande, O.; Duchowny, M.; Wieser, H.G.; Guerrini, R.; Mathern, G.W. Proposed Criteria for Referral and Evaluation of Children for Epilepsy Surgery: Recommendations of the Subcommission for Pediatric Epilepsy Surgery. Epilepsia 2006, 47, 952–959. [Google Scholar] [CrossRef] [PubMed]
  12. Schuele, S.U.; Lüders, H.O. Intractable Epilepsy: Management and Therapeutic Alternatives. Lancet Neurol. 2008, 7, 514–524. [Google Scholar] [CrossRef] [PubMed]
  13. Panov, F.; Ganaha, S.; Haskell, J.; Fields, M.; La Vega-Talbott, M.; Wolf, S.; McGoldrick, P.; Marcuse, L.; Ghatan, S. Safety of Responsive Neurostimulation in Pediatric Patients with Medically Refractory Epilepsy. J. Neurosurg. Pediatr. 2020, 26, 525–532. [Google Scholar] [CrossRef] [PubMed]
  14. Ryvlin, P.; Rheims, S.; Hirsch, L.J.; Sokolov, A.; Jehi, L. Neuromodulation in Epilepsy: State-of-the-Art Approved Therapies. Lancet Neurol. 2021, 20, 1038–1047. [Google Scholar] [CrossRef]
  15. Jiang, T.; Gradus, J.L.; Rosellini, A.J. Supervised Machine Learning: A Brief Primer. Behav. Ther. 2020, 51, 675–687. [Google Scholar] [CrossRef]
  16. Grampurohit, S.; Sagarnal, C. Disease Prediction Using Machine Learning Algorithms. In Proceedings of the 2020 International Conference for Emerging Technology (INCET), Belgaum, India, 5–7 June 2020; pp. 1–7. [Google Scholar]
  17. Ahsan, M.M.; Luna, S.A.; Siddique, Z. Machine-Learning-Based Disease Diagnosis: A Comprehensive Review. Healthcare 2022, 10, 541. [Google Scholar] [CrossRef]
  18. Patel, L.; Shukla, T.; Huang, X.; Ussery, D.W.; Wang, S. Machine Learning Methods in Drug Discovery. Molecules 2020, 25, 5277. [Google Scholar] [CrossRef]
  19. Dara, S.; Dhamercherla, S.; Jadav, S.S.; Babu, C.M.; Ahsan, M.J. Machine Learning in Drug Discovery: A Review. ArtifIntell. Rev. 2022, 55, 1947–1999. [Google Scholar] [CrossRef]
  20. Mooney, S.J.; Pejaver, V. Big Data in Public Health: Terminology, Machine Learning, and Privacy. Annu. Rev. Public Health 2018, 39, 95–112. [Google Scholar] [CrossRef]
  21. Papernot, N.; McDaniel, P.; Sinha, A.; Wellman, M. Towards the Science of Security and Privacy in Machine Learning. arXiv 2016, arXiv:1611.03814. [Google Scholar]
  22. Xue, M.; Yuan, C.; Wu, H.; Zhang, Y.; Liu, W. Machine Learning Security: Threats, Countermeasures, and Evaluations. IEEE Access 2020, 8, 74720–74742. [Google Scholar] [CrossRef]
  23. Abadade, Y.; Temouden, A.; Bamoumen, H.; Benamar, N.; Chtouki, Y.; Hafid, A.S. A Comprehensive Survey on TinyML. IEEE Access 2023, 11, 96892–96922. [Google Scholar] [CrossRef]
  24. Alajlan, N.N.; Ibrahim, D.M. TinyML: Enabling of Inference Deep Learning Models on Ultra-Low-Power IoT Edge Devices for AI Applications. Micromachines 2022, 13, 851. [Google Scholar] [CrossRef]
  25. Banbury, C.R.; Reddi, V.J.; Lam, M.; Fu, W.; Fazel, A.; Holleman, J.; Huang, X.; Hurtado, R.; Kanter, D.; Lokhmotov, A.; et al. Benchmarking TinyML Systems: Challenges and Direction. arXiv 2021, arXiv:2003.04821. [Google Scholar]
  26. Kallimani, R.; Pai, K.; Raghuwanshi, P.; Iyer, S.; López, O.L.A. TinyML: Tools, Applications, Challenges, and Future Research Directions. Multimed. Tools Appl. 2023, 83, 29015–29045. [Google Scholar] [CrossRef]
  27. Ficco, M.; Guerriero, A.; Milite, E.; Palmieri, F.; Pietrantuono, R.; Russo, S. Federated Learning for IoT Devices: Enhancing TinyML with on-Board Training. Inf. Fusion 2024, 104, 102189. [Google Scholar] [CrossRef]
  28. Sabry, F.; Eltaras, T.; Labda, W.; Alzoubi, K.; Malluhi, Q. Machine Learning for Healthcare Wearable Devices: The Big Picture. J. Healthc. Eng. 2022, 2022, 1–25. [Google Scholar] [CrossRef]
  29. Medeiros, T.; Amaral, M.; Targino, M.; Silva, M.; Silva, I.; Sisinni, E.; Ferrari, P. TinyML Custom AI Algorithms for Low-Power IoT Data Compression: A Bridge Monitoring Case Study. In Proceedings of the 2023 IEEE International Workshop on Metrology for Industry 4.0 & IoT (MetroInd4.0&IoT), Brescia, Italy, 6–8 June 2023; IEEE: Brescia, Italy, 2023; pp. 54–59. [Google Scholar] [CrossRef]
  30. Tsoukas, V.; Boumpa, E.; Giannakas, G.; Kakarountas, A. A Review of Machine Learning and TinyML in Healthcare. In Proceedings of the 25th Pan-Hellenic Conference on Informatics, Volos, Greece, 26–28 November 2021; ACM: Volos, Greece, 2021; pp. 69–73. [Google Scholar] [CrossRef]
  31. Shafique, M.; Theocharides, T.; Reddy, V.J.; Murmann, B. TinyML: Current Progress, Research Challenges, and Future Roadmap. In Proceedings of the 2021 58th ACM/IEEE Design Automation Conference (DAC), San Francisco, CA, USA, 5–9 December 2021; IEEE: San Francisco, CA, USA, 2021; pp. 1303–1306. [Google Scholar] [CrossRef]
  32. Behnam, P.; Tong, J.; Khare, A.; Chen, Y.; Pan, Y.; Gadikar, P.; Bambhaniya, A.; Krishna, T.; Tumanov, A. Hardware–Software Co-Design for Real-Time Latency–Accuracy Navigation in Tiny Machine Learning Applications. IEEE Micro 2023, 43, 93–101. [Google Scholar] [CrossRef]
  33. Giordano, M.; Baumann, N.; Crabolu, M.; Fischer, R.; Bellusci, G.; Magno, M. Design and Performance Evaluation of an Ultralow-Power Smart IoT Device with Embedded TinyML for Asset Activity Monitoring. IEEE Trans. Instrum. Meas. 2022, 71, 2510711. [Google Scholar] [CrossRef]
  34. Heim, L.; Biri, A.; Qu, Z.; Thiele, L. Measuring What Really Matters: Optimizing Neural Networks for TinyML. arXiv 2021, arXiv:2104.10645. [Google Scholar]
  35. Ray, P.P. A Review onTinyML: State-of-the-Art and Prospects. J. King Saud Univ. Comput. Inf. Sci. 2022, 34, 1595–1623. [Google Scholar] [CrossRef]
  36. Toffa, D.H.; Touma, L.; El Meskine, T.; Bouthillier, A.; Nguyen, D.K. Learnings from 30 Years of Reported Efficacy and Safety of Vagus Nerve Stimulation (VNS) for Epilepsy Treatment: A Critical Review. Seizure 2020, 83, 104–123. [Google Scholar] [CrossRef] [PubMed]
  37. Guberman, A. Vagus Nerve Stimulation in the Treatment of Epilepsy. Can. Med. Assoc. J. 2004, 171, 1165–1166. [Google Scholar] [CrossRef] [PubMed]
  38. Afra, P.; Adamolekun, B.; Aydemir, S.; Watson, G.D.R. Evolution of the Vagus Nerve Stimulation (VNS) Therapy System Technology for Drug-Resistant Epilepsy. Front. Med. Technol. 2021, 3, 696543. [Google Scholar] [CrossRef] [PubMed]
  39. Krahl, S. Vagus Nerve Stimulation for Epilepsy: A Review of the Peripheral Mechanisms. Surg. Neurol. Int. 2012, 3, 47. [Google Scholar] [CrossRef]
  40. Fisher, R.S. Therapeutic Devices for Epilepsy. Ann. Neurol. 2012, 71, 157–168. [Google Scholar] [CrossRef]
  41. Mertens, A.; Gadeyne, S.; Lescrauwaet, E.; Carrette, E.; Meurs, A.; De Herdt, V.; Dewaele, F.; Raedt, R.; Miatton, M.; Boon, P.; et al. The Potential of Invasive and Non-Invasive Vagus Nerve Stimulation to Improve Verbal Memory Performance in Epilepsy Patients. Sci. Rep. 2022, 12, 1984. [Google Scholar] [CrossRef]
  42. Austelle, C.W.; O’Leary, G.H.; Thompson, S.; Gruber, E.; Kahn, A.; Manett, A.J.; Short, B.; Badran, B.W. A Comprehensive Review of Vagus Nerve Stimulation for Depression. Neuromodul. Technol. Neural Interface 2022, 25, 309–315. [Google Scholar] [CrossRef]
  43. George, M.S.; Ward, H.E.; Ninan, P.T.; Pollack, M.; Nahas, Z.; Anderson, B.; Kose, S.; Howland, R.H.; Goodman, W.K.; Ballenger, J.C. A Pilot Study of Vagus Nerve Stimulation (VNS) for Treatment-Resistant Anxiety Disorders. Brain Stimul. 2008, 1, 112–121. [Google Scholar] [CrossRef]
  44. Zangiabadi, N.; Ladino, L.D.; Sina, F.; Orozco-Hernández, J.P.; Carter, A.; Téllez-Zenteno, J.F. Deep Brain Stimulation and Drug-Resistant Epilepsy: A Review of the Literature. Front. Neurol. 2019, 10, 601. [Google Scholar] [CrossRef]
  45. Vonck, K.; Sprengers, M.; Carrette, E.; Dauwe, I.; Miatton, M.; Meurs, A.; Goossens, L.; De Herdt, V.; Achten, R.; Thiery, E.; et al. A Decade of Experience with Deep Brain Stimulation for Patients with Refractory Medial Temporal Lobe Epilepsy. Int. J. Neural Syst. 2013, 23, 1250034. [Google Scholar] [CrossRef] [PubMed]
  46. Yan, H.; Toyota, E.; Anderson, M.; Abel, T.J.; Donner, E.; Kalia, S.K.; Drake, J.; Rutka, J.T.; Ibrahim, G.M. A Systematic Review of Deep Brain Stimulation for the Treatment of Drug-Resistant Epilepsy in Childhood. J. Neurosurg. Pediatr. 2019, 23, 274–284. [Google Scholar] [CrossRef] [PubMed]
  47. Klinger, N.; Mittal, S. Deep Brain Stimulation for Seizure Control in Drug-Resistant Epilepsy. Neurosurg. Focus 2018, 45, E4. [Google Scholar] [CrossRef]
  48. Peltola, J.; Colon, A.J.; Pimentel, J.; Coenen, V.A.; Gil-Nagel, A.; Gonçalves Ferreira, A.; Lehtimäki, K.; Ryvlin, P.; Taylor, R.S.; Ackermans, L.; et al. Deep Brain Stimulation of the Anterior Nucleus of the Thalamus in Drug-Resistant Epilepsy in the MORE Multicenter Patient Registry. Neurology 2023, 100, e1852–e1865. [Google Scholar] [CrossRef] [PubMed]
  49. Bove, F.; Fraix, V.; Cavallieri, F.; Schmitt, E.; Lhommée, E.; Bichon, A.; Meoni, S.; Pélissier, P.; Kistner, A.; Chevrier, E.; et al. Dementia and Subthalamic Deep Brain Stimulation in Parkinson Disease: A Long-Term Overview. Neurology 2020, 95, e384–e392. [Google Scholar] [CrossRef]
  50. Wu, Y.; Mo, J.; Sui, L.; Zhang, J.; Hu, W.; Zhang, C.; Wang, Y.; Liu, C.; Zhao, B.; Wang, X.; et al. Deep Brain Stimulation in Treatment-Resistant Depression: A Systematic Review and Meta-Analysis on Efficacy and Safety. Front. Neurosci. 2021, 15, 655412. [Google Scholar] [CrossRef]
  51. Wu, H.; Hariz, M.; Visser-Vandewalle, V.; Zrinzo, L.; Coenen, V.A.; Sheth, S.A.; Bervoets, C.; Naesström, M.; Blomstedt, P.; Coyne, T.; et al. Deep Brain Stimulation for Refractory Obsessive-Compulsive Disorder (OCD): Emerging or Established Therapy? Mol. Psychiatry 2021, 26, 60–65. [Google Scholar] [CrossRef]
  52. Jarosiewicz, B.; Morrell, M. The RNS System: Brain-Responsive Neurostimulation for the Treatment of Epilepsy. Expert Rev. Med. Devices 2021, 18, 129–138. [Google Scholar] [CrossRef]
  53. Dalkilic, E.B. Neurostimulation Devices Used in Treatment of Epilepsy. Curr. Treat. Opt. Neurol. 2017, 19, 7. [Google Scholar] [CrossRef]
  54. Skarpaas, T.L.; Jarosiewicz, B.; Morrell, M.J. Brain-Responsive Neurostimulation for Epilepsy (RNS® System). Epilepsy Res. 2019, 153, 68–70. [Google Scholar] [CrossRef]
  55. Chen, H.; Dugan, P.; Chong, D.J.; Liu, A.; Doyle, W.; Friedman, D. Application of RNS in Refractory Epilepsy: Targeting Insula. Epilepsia Open 2017, 2, 345–349. [Google Scholar] [CrossRef] [PubMed]
  56. Rao, V.R. Chronic Electroencephalography in Epilepsy with a Responsive Neurostimulation Device: Current Status and Future Prospects. Expert Rev. Med. Dev. 2021, 18, 1093–1105. [Google Scholar] [CrossRef]
  57. Sun, F.T.; Morrell, M.J. The RNS System: Responsive Cortical Stimulation for the Treatment of Refractory Partial Epilepsy. Expert Rev. Med. Dev. 2014, 11, 563–572. [Google Scholar] [CrossRef]
  58. Davis, P.; Gaitanis, J. Neuromodulation for the Treatment of Epilepsy: A Review of Current Approaches and Future Directions. Clin. Ther. 2020, 42, 1140–1154. [Google Scholar] [CrossRef]
  59. Fahoum, F.; Boffini, M.; Kann, L.; Faini, S.; Gordon, C.; Tzadok, M.; El Tahry, R. VNS Parameters for Clinical Response in Epilepsy. Brain Stimul. 2022, 15, 814–821. [Google Scholar] [CrossRef]
  60. Wong, S.; Mani, R.; Danish, S. Comparison and Selection of Current Implantable Anti-Epileptic Devices. Neurotherapeutics 2019, 16, 369–380. [Google Scholar] [CrossRef]
  61. Yadav, S.S.; Agarwal, R.; Bharath, K.; Rao, S.; Thakur, C.S. tinyRadar: mmWave Radar Based Human Activity Classification for Edge Computing. In Proceedings of the 2022 IEEE International Symposium on Circuits and Systems (ISCAS), Austin, TX, USA, 27 May–1 June 2022; IEEE: Austin, TX, USA, 2022; pp. 2414–2417. [Google Scholar] [CrossRef]
  62. Saha, S.S.; Sandha, S.S.; Srivastava, M. Machine Learning for Microcontroller-Class Hardware: A Review. IEEE Sens. J. 2022, 22, 21362–21390. [Google Scholar] [CrossRef]
  63. Tsoukas, V.; Gkogkidis, A.; Kakarountas, A. A TinyML-Based System For Smart Agriculture. In Proceedings of the 26th Pan-Hellenic Conference on Informatics, Athens, Greece, 25–27 November 2022; ACM: Athens, Greece, 2022; pp. 207–212. [Google Scholar]
  64. Gkogkidis, A.; Tsoukas, V.; Papafotikas, S.; Boumpa, E.; Kakarountas, A. A TinyML-Based System for Gas Leakage Detection. In Proceedings of the 2022 11th International Conference on Modern Circuits and Systems Technologies (MOCAST), Bremen, Germany, 8–10 May 2022; IEEE: Piscataway, NJ, USA; pp. 1–5. [Google Scholar]
  65. Sabovic, A.; Aernouts, M.; Subotic, D.; Fontaine, J.; De Poorter, E.; Famaey, J. Towards Energy-Aware tinyML on Battery-Less IoT Devices. Internet Things 2023, 22, 100736. [Google Scholar] [CrossRef]
  66. David, R.; Duke, J.; Jain, A.; Reddi, V.J.; Jeffries, N.; Li, J.; Kreeger, N.; Nappier, I.; Natraj, M.; Regev, S.; et al. TensorFlow Lite Micro: Embedded Machine Learning on TinyML Systems. Proc. Mach. Learn. Syst. 2021, 3, 800–811. [Google Scholar] [CrossRef]
  67. Sun, B.; Bayes, S.; Abotaleb, A.M.; Hassan, M. The Case for tinyML in Healthcare: CNNs for Real-Time On-Edge Blood Pressure Estimation. In Proceedings of the 38th ACM/SIGAPP Symposium on Applied Computing, Tallinn, Estonia, 27–31 March 2023; Association for Computing Machinery: New York, NY, USA; pp. 629–638. [Google Scholar] [CrossRef]
  68. Ahmed, K.; Hassan, M. tinyCare: A tinyML-Based Low-Cost Continuous Blood Pressure Estimation on the Extreme Edge. In Proceedings of the 2022 IEEE 10th International Conference on Healthcare Informatics (ICHI), Rochester, MN, USA, 11–14 June 2022; IEEE: Rochester, MN, USA, 2022; pp. 264–275. [Google Scholar] [CrossRef]
  69. Bengherbia, B.; AymeneBerkani, M.R.; Achir, Z.; Tobbal, A.; Rebiai, M.; Maazouz, M. Real-Time Smart System for ECG Monitoring Using a One-Dimensional Convolutional Neural Network. In Proceedings of the 2022 International Conference on Theoretical and Applied Computer Science and Engineering (ICTASCE), Ankara, Turkey, 29 September–1 October 2022; IEEE: Ankara, Turkey, 2022; pp. 32–37. [Google Scholar] [CrossRef]
  70. Gibbs, M.; Woodward, K.; Kanjo, E. Combining Multiple tinyML Models for Multimodal Context-Aware Stress Recognition on Constrained Microcontrollers. IEEE Micro 2023, 44, 67–75. [Google Scholar] [CrossRef]
  71. Mai, N.-D.; Nguyen, H.-T.; Chung, W.-Y. Real-Time On-Chip Machine-Learning-Based Wearable Behind-The-Ear Electroencephalogram Device for Emotion Recognition. IEEE Access 2023, 11, 47258–47271. [Google Scholar] [CrossRef]
  72. Tharian, J.; Nandakrishnan, R.; Sajesh, S.; Arun, A.V.; Jayadas, C.K. Automatic Emotion Recognition System Using tinyML. In Proceedings of the 2022 International Conference on Futuristic Technologies (INCOFT), Karnataka, India, 25–27 November 2022; IEEE: Belgaum, India, 2022; pp. 1–4. [Google Scholar] [CrossRef]
  73. Hashir, M.; Khalid, N.; Mahmood, N.; Rehman, M.A.; Asad, M.; Mehmood, M.Q.; Zubair, M.; Massoud, Y. A TinyML Based Portable, Low-Cost Microwave Head Imaging System for Brain Stroke Detection. In Proceedings of the 2023 IEEE International Symposium on Circuits and Systems (ISCAS), Monterey, CA, USA, 21–25 May 2023; IEEE: Monterey, CA, USA, 2023; pp. 1–4. [Google Scholar] [CrossRef]
  74. Tsoukas, V.; Gkogkidis, A.; Boumpa, E.; Kakarountas, A. A Review on the Emerging Technology of TinyML. ACM Comput. Surv. 2024, 56, 1–37. [Google Scholar] [CrossRef]
  75. Diab, M.S.; Rodriguez-Villegas, E. Embedded Machine Learning Using Microcontrollers in Wearable and Ambulatory Systems for Health and Care Applications: A Review. IEEE Access 2022, 10, 98450–98474. [Google Scholar] [CrossRef]
  76. Rasheed, K.; Qayyum, A.; Qadir, J.; Sivathamboo, S.; Kwan, P.; Kuhlmann, L.; O’Brien, T.; Razi, A. Machine Learning for Predicting Epileptic Seizures Using EEG Signals: A Review. IEEE Rev. Biomed. Eng. 2021, 14, 139–155. [Google Scholar] [CrossRef]
  77. Yuan, J.; Ran, X.; Liu, K.; Yao, C.; Yao, Y.; Wu, H.; Liu, Q. Machine Learning Applications on Neuroimaging for Diagnosis and Prognosis of Epilepsy: A Review. J. Neurosci. Methods 2022, 368, 109441. [Google Scholar] [CrossRef]
  78. Tragoudaras, A.; Antoniadis, C.; Massoud, Y. TinyML for EEG Decoding on Microcontrollers. In Proceedings of the 2023 IEEE International Symposium on Circuits and Systems (ISCAS), Monterey, CA, USA, 21–25 May 2023; IEEE: Monterey, CA, USA, 2023; pp. 1–5. [Google Scholar]
  79. Agrawal, K.; Borthakur, A.; Singh, A.K.; Srikaran, P.; Nandi, D.; Pujari, O. Neural Decision Tree for Bio-TinyML. In Proceedings of the IEEE Biomedical Circuits and Systems Conference (BioCAS 2024), Xi’an, China, 24–26 October 2024; IEEE: Piscataway, NJ, USA. [Google Scholar] [CrossRef]
  80. Ponnada, S.; Tak, T.K.; Kshirsagar, P.R.; Rao, P.S.; Dayal, A. Expanding Applications of TinyML in Versatile Assistive Devices: From Navigation Assistance to Health Monitoring System Using Optimized NASNet-XGBoost Transfer Learning. IEEE Access 2024, 12, 168328–168338. [Google Scholar] [CrossRef]
  81. Aoueileyine, M.O.E. Tiny Machine Learning for IoT and eHealth Applications: Epileptic Seizure Prediction Use Case; Digital Technologies and Applications. ICDTA 2023; Lecture Notes in Networks and Systems; Springer: Cham, Switzerland, 2023. [Google Scholar] [CrossRef]
  82. Lee, B.; Zubair, M.N.; Marquez, Y.D.; Lee, D.M.; Kalayjian, L.A.; Heck, C.N.; Liu, C.Y. A Single-Center Experience with the NeuroPace RNS System: A Review of Techniques and Potential Problems. World Neurosurg. 2015, 84, 719–726. [Google Scholar] [CrossRef]
  83. Mad Kaidi, H.; Izhar, M.A.M.; Ahmad, N.; Dziyauddin, R.A.; Sarip, S.; Jalil, S.Z.A. Rehabilitation Monitoring Prototype: Arduino Nano 35 BLE. J. Phys. Conf. Ser. 2022, 2250, 012009. [Google Scholar] [CrossRef]
  84. Bouh, Y.; Baslam, M.; Ouhda, M. TinyML on Arduino Nano 33 BLE for Disabled Person. In Proceedings of the International Conference on Advanced Intelligent Systems for Sustainable Development (AI2SD’2023); Ezziyyani, M., Kacprzyk, J., Balas, V.E., Eds.; Springer Nature Switzerland: Cham, Switzerland, 2024; pp. 82–88. [Google Scholar] [CrossRef]
  85. Patel, P.; Gupta, N.; Gajjar, S. Real Time Voice Recognition System Using Tiny ML on Arduino Nano 33 BLE*. In Proceedings of the 2023 IEEE International Symposium on Smart Electronic Systems (iSES), Ahmedabad, India, 18–20 December 2023; IEEE: Ahmedabad, India, 2023; pp. 385–388. [Google Scholar] [CrossRef]
  86. Hessein, Y. Epileptic Seizure Recognition Dataset. 2021. Kaggle. Available online: https://www.kaggle.com/datasets/yasserhessein/epileptic-seizure-recognition (accessed on 26 February 2025).
  87. Edge Impulse. Edge Impulse: Machine Learning for TinyML and IoT Devices. 2024. Available online: https://edgeimpulse.com/ (accessed on 26 February 2025).
  88. Situnayake, D.; Plunkett, J. AI at the Edge. 2024. O’Reilly Media, Inc.. Available online: https://www.oreilly.com/library/view/ai-atthe/9781098120191/ (accessed on 26 February 2025).
  89. Hymel, S.; Banbury, C.; Situnayake, D.; Elium, A.; Ward, C.; Kelcey, M.; Baaijens, M.; Majchrzycki, M.; Plunkett, J.; Tischler, D.; et al. Edge Impulse: An MLOps Platform for Tiny Machine Learning. arXiv 2023, arXiv:2212.03332. [Google Scholar]
  90. Mihigo, I.N.; Zennaro, M.; Uwitonze, A.; Rwigema, J.; Rovai, M. On-Device IoT-Based Predictive Maintenance Analytics Model: Comparing TinyLSTM and TinyModel from Edge Impulse. Sensors 2022, 22, 5174. [Google Scholar] [CrossRef]
  91. Diab, M.S.; Rodriguez-Villegas, E. Performance Evaluation of Embedded Image Classification Models Using Edge Impulse for Application on Medical Images. In Proceedings of the 2022 44th Annual International Conference of the IEEE Engineering in Medicine & Biology Society (EMBC), Glasgow, UK, 11–15 July 2022; IEEE: Glasgow, UK, 2022; pp. 2639–2642. [Google Scholar] [CrossRef]
  92. Ryvlin, P.; Jehi, L.E. Neuromodulation for Refractory Epilepsy. Epilepsy Curr. 2022, 22, 11–17. [Google Scholar] [CrossRef]
  93. Kwan, P.; Arzimanoglou, A.; Berg, A.T.; Brodie, M.J.; Allen Hauser, W.; Mathern, G.; Moshé, S.L.; Perucca, E.; Wiebe, S.; French, J. Definition of Drug Resistant Epilepsy: Consensus Proposal by the Ad Hoc Task Force of the ILAE Commission on Therapeutic Strategies. Epilepsia 2010, 51, 1069–1077. [Google Scholar] [CrossRef] [PubMed]
  94. Heck, C.N.; King-Stephens, D.; Massey, A.D.; Nair, D.R.; Jobst, B.C.; Barkley, G.L.; Salanova, V.; Cole, A.J.; Smith, M.C.; Gwinn, R.P.; et al. Two-Year Seizure Reduction in Adults with Medically Intractable Partial-Onset Epilepsy Treated with Responsive Neurostimulation: Final Results of the RNS System Pivotal Trial. Epilepsia 2014, 55, 432–441. [Google Scholar] [CrossRef] [PubMed]
  95. Nune, G.; Desai, S.A.; Razavi, B.; Agostini, M.A.; Bergey, G.K.; Herekar, A.A.; Hirsch, L.J.; Lee, R.W.; Rutecki, P.A.; Srinivasan, S.; et al. Treatment of Drug-Resistant Epilepsy in Patients with Periventricular Nodular Heterotopia Using RNS System: Efficacy and Description of Chronic Electrophysiological Recordings. Clin. Neurophysiol. 2019, 130, 1196–1207. [Google Scholar] [CrossRef] [PubMed]
  96. Sharma, A.; Parfyonov, M.; Tiefenbach, J.; Hogue, O.; Nero, N.; Jehi, L.; Serletis, D.; Bingaman, W.; Gupta, A.; Rammo, R. Predictors of Therapeutic Response Following Thalamic Neuromodulation for Drug-Resistant Pediatric Epilepsy: A Systematic Review and Individual Patient Data Meta-Analysis. Epilepsia 2024, 65, 542–555. [Google Scholar]
  97. Ryvlin, P.; Cross, J.H.; Rheims, S. Epilepsy Surgery in Children and Adults. Lancet Neurol. 2014, 13, 1114–1126. [Google Scholar] [CrossRef]
  98. Kokkinos, V.; Sisterson, N.D.; Wozny, T.A.; Richardson, R.M. Association of Closed-Loop Brain Stimulation Neurophysiological Features With Seizure Control Among Patients with Focal Epilepsy. JAMA Neurol. 2019, 76, 800. [Google Scholar] [CrossRef]
  99. Wang, A.J.; Bick, S.K.; Williams, Z.M. Vagus Nerve Stimulation versus Responsive Neurostimulator System in Patients with Temporal Lobe Epilepsy. Stereotact. Funct. Neurosurg. 2020, 98, 21–29. [Google Scholar] [CrossRef]
  100. Ellens, N.R.; Elisevich, K.; Burdette, D.E.; Patra, S.E. A Comparison of Vagal Nerve Stimulation and Responsive Neurostimulation for the Treatment of Medically Refractory Complex Partial Epilepsy. Stereotact. Funct. Neurosurg. 2018, 96, 259–263. [Google Scholar] [CrossRef]
  101. Park, H.R.; Choi, S.J.; Joo, E.Y.; Seo, D.-W.; Hong, S.B.; Lee, J.-I.; Hong, S.-C.; Lee, S.; Shon, Y.-M. The Role of Anterior Thalamic Deep Brain Stimulation as an Alternative Therapy in Patients with Previously Failed Vagus Nerve Stimulation for Refractory Epilepsy. Stereotact. Funct. Neurosurg. 2019, 97, 176–182. [Google Scholar] [CrossRef]
  102. Sisterson, N.D.; Wozny, T.A.; Kokkinos, V.; Constantino, A.; Richardson, R.M. Closed-Loop Brain Stimulation for Drug-Resistant Epilepsy: Towards an Evidence-Based Approach to Personalized Medicine. Neurotherapeutics 2019, 16, 119–127. [Google Scholar] [CrossRef] [PubMed]
  103. Venkatesh, P.; Sneider, D.; Danish, M.; Sisterson, N.D.; Zaher, N.; Urban, A.; Grover, P.; Richardson, R.M.; Kokkinos, V. Quantifying a Frequency Modulation Response Biomarker in Responsive Neurostimulation. J. Neural Eng. 2021, 18, 046017. [Google Scholar] [CrossRef]
  104. Constantino, A.C.; Sisterson, N.D.; Zaher, N.; Urban, A.; Richardson, R.M.; Kokkinos, V. Expert-Level Intracranial Electroencephalogram Ictal Pattern Detection by a Deep Learning Neural Network. Front. Neurol. 2021, 12, 603868. [Google Scholar] [CrossRef]
  105. Jobst, B.C.; Kapur, R.; Barkley, G.L.; Bazil, C.W.; Berg, M.J.; Bergey, G.K.; Boggs, J.G.; Cash, S.S.; Cole, A.J.; Duchowny, M.S.; et al. Brain-responsive neurostimulation in patients with medically intractable seizures arising from eloquent and other neocortical areas. Epilepsia 2017, 58, 1005–1014. [Google Scholar] [CrossRef]
  106. Geller, E.B. Responsive Neurostimulation: Review of Clinical Trials and Insights into Focal Epilepsy. Epilepsy Behav. 2018, 88, 11–20. [Google Scholar] [CrossRef]
  107. Geller, E.B.; Skarpaas, T.L.; Gross, R.E.; Goodman, R.R.; Barkley, G.L.; Bazil, C.W.; Berg, M.J.; Bergey, G.K.; Cash, S.S.; Cole, A.J.; et al. Brain-responsive neurostimulation in patients with medically intractable mesial temporal lobe epilepsy. Epilepsia 2017, 58, 994–1004. [Google Scholar] [CrossRef]
  108. Piazza, M.G.; Varga, G.; Welch, W.; Abel, T.J. The Utility of Responsive Neurostimulation for the Treatment of Pediatric Drug-Resistant Epilepsy. Brain Sci. 2023, 13, 1455. [Google Scholar] [CrossRef]
  109. Vissani, M.; Nanda, P.; Bush, A.; Neudorfer, C.; Dougherty, D.; Richardson, R.M. Toward Closed-Loop Intracranial Neurostimulation in Obsessive-Compulsive Disorder. Biol. Psychiatry 2023, 93, e43–e46. [Google Scholar] [CrossRef]
  110. Marangell, L.B.; Martinez, M.; Jurdi, R.A.; Zboyan, H. Neurostimulation therapies in depression: A review of new modalities. Acta Psychiatr Scand. 2007, 116, 174–181. [Google Scholar] [CrossRef]
  111. Wu, H.; Adler, S.; Azagury, D.E.; Bohon, C.; Safer, D.L.; Barbosa, D.A.N.; Bhati, M.T.; Williams, N.R.; Dunn, L.B.; Tass, P.A.; et al. Brain-Responsive Neurostimulation for Loss of Control Eating: Early Feasibility Study. Neurosurgery 2020, 87, 1277–1288. [Google Scholar] [CrossRef]
  112. Balanou, E.; van Gils, M.; Vanhala, T. State-of-the-art of wearable EEG for personalized health applications. Stud. Health Technol. Inform. 2013, 189, 119–124. [Google Scholar] [PubMed]
  113. Cannard, C.; Brandmeyer, T.; Wahbeh, H.; Delorme, A. Self-health monitoring and wearable neurotechnologies. Handb. Clin. Neurol. 2020, 168, 207–232. [Google Scholar]
  114. Rubel, P.; Fayn, J.; Simon-Chautemps, L.; Atoui, H.; Ohlsson, M.; Telisson, D.; Adami, S.; Arod, S.; Forlini, M.C.; Malossi, C.; et al. New paradigms in telemedicine: Ambient intelligence, wearable, pervasive and personalized. Stud Health Technol. Inform. 2004, 108, 123–132. [Google Scholar]
  115. Manor, E.; Greenberg, S. Custom Hardware Inference Accelerator for TensorFlow Lite for Microcontrollers. IEEE Access 2022, 10, 73484–73493. [Google Scholar] [CrossRef]
  116. Ahmed, Z.; Amizadeh, S.; Bilenko, M.; Carr, R.; Chin, W.-S.; Dekel, Y.; Dupre, X.; Eksarevskiy, V.; Filipi, S.; Finley, T.; et al. Machine Learning at Microsoft with ML.NET. In In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Anchorage, AK, USA, 4–8 August 2019; ACM: Anchorage, AK, USA, 2019; pp. 2448–2458. [Google Scholar] [CrossRef]
  117. da Silva, L.T.; Souza, V.M.; Batista, G.E. EmbML Tool: Supporting the Use of Supervised Learning Algorithms in Low-Cost Embedded Systems. In Proceedings of the 2019 IEEE 31st International Conference on Tools with Artificial Intelligence (ICTAI), Portland, OR, USA, 4–6 November 2019; IEEE: Piscataway, NJ, USA; pp. 1633–1637. [Google Scholar] [CrossRef]
  118. Tsutsui Da Silva, L.; Souza, V.M.A.; Batista, G.E.A.P.A. An Open-Source Tool for Classification Models in Resource-Constrained Hardware. IEEE Sens. J. 2022, 22, 544–554. [Google Scholar] [CrossRef]
  119. Hegde, M.; Chiong, W.; Rao, V.R. New Ethical and Clinical Challenges in “Closed-Loop” Neuromodulation. Neurology 2021, 96, 799–804. [Google Scholar] [CrossRef] [PubMed]
  120. Shlobin, N.A.; Campbell, J.M.; Rosenow, J.M.; Rolston, J.D. Ethical Considerations in the Surgical and Neuromodulatory Treatment of Epilepsy. Epilepsy Behav. 2022, 127, 108524. [Google Scholar] [CrossRef]
  121. Simpson, H.D.; Schulze-Bonhage, A.; Cascino, G.D.; Fisher, R.S.; Jobst, B.C.; Sperling, M.R.; Lundstrom, B.N. Practical Considerations in Epilepsy Neurostimulation. Epilepsia 2022, 63, 2445–2460. [Google Scholar] [CrossRef]
Figure 1. Distribution of values of EEG signals of non-epileptic individuals (left panel) and epileptic patients (right panel). A difference in value range and value distribution is observed.
Figure 1. Distribution of values of EEG signals of non-epileptic individuals (left panel) and epileptic patients (right panel). A difference in value range and value distribution is observed.
Biomedinformatics 05 00014 g001
Figure 2. Workflow of the proposed model’s architecture.
Figure 2. Workflow of the proposed model’s architecture.
Biomedinformatics 05 00014 g002
Figure 3. Scatter plot of labels 0 and 1 predictions in the validation set.
Figure 3. Scatter plot of labels 0 and 1 predictions in the validation set.
Biomedinformatics 05 00014 g003
Figure 4. Scatter plot of labels 0 and 1 predictions in the test set.
Figure 4. Scatter plot of labels 0 and 1 predictions in the test set.
Biomedinformatics 05 00014 g004
Figure 5. ROC curve for the validation set.
Figure 5. ROC curve for the validation set.
Biomedinformatics 05 00014 g005
Figure 6. ROC curve for the test set.
Figure 6. ROC curve for the test set.
Biomedinformatics 05 00014 g006
Table 1. A comparison of the key characteristics of three currently available neurostimulation treatments for epilepsy.
Table 1. A comparison of the key characteristics of three currently available neurostimulation treatments for epilepsy.
Vagus Nerve StimulationDeep Brain StimulationResponsive Nerve Stimulation
Open-loop operation: does not record or act on the patient’s iEEG signals.Open-loop operation: does not record or act on the patient’s iEEG signals.Closed-loop operation: records and acts on the patient’s iEEG signals, thus offers further data accessibility.
Fixed intermittent stimulation protocol.Fixed intermittent stimulation protocol.Stimulation activation by detected seizure activity.
Approved only for stimulation of the vagus nerve.Approved only for the stimulation of the anterior thalami.Approved for seizure onset anywhere in the central nervous system.
Less complex surgical placement.Demanding surgical placement.Highly demanding surgical placement.
Negligible risk of implantation-related intracranial hemorrhage.Considerable risk of implantation-related intracranial hemorrhage.Higher risk of implantation-related intracranial hemorrhage.
Table 2. Performance of different architectures in the validation set.
Table 2. Performance of different architectures in the validation set.
ArchitectureAccuracyF1-Score for Label 0F1-Score for Labels 1
Architecture 187%0.900.81
Architecture 292%0.940.90
Architecture 397%0.970.96
Architecture 498%0.980.98
Table 3. Performance of different architectures in the test set.
Table 3. Performance of different architectures in the test set.
ArchitectureAccuracyF1-Score for Label 0F1-Score for Labels 1
Architecture 187%0.900.81
Architecture 292%0.940.90
Architecture 397%0.970.96
Architecture 499%0.990.99
Table 4. Confusion matrix of model’s performance using the validation set.
Table 4. Confusion matrix of model’s performance using the validation set.
Label 0Label 1
Label 098.05%1.5%
Label 12.0%98.0%
F1-Score0.98%0.98%
Table 5. Confusion matrix of model’s performance using the test set.
Table 5. Confusion matrix of model’s performance using the test set.
Label 0Label 1
Label 099.02%0.4%
Label 11.2%97.1%
F1-Score0.99%0.98%
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Tsakanika, E.; Tsoukas, V.; Kakarountas, A.; Kokkinos, V. High Accuracy of Epileptic Seizure Detection Using Tiny Machine Learning Technology for Implantable Closed-Loop Neurostimulation Systems. BioMedInformatics 2025, 5, 14. https://doi.org/10.3390/biomedinformatics5010014

AMA Style

Tsakanika E, Tsoukas V, Kakarountas A, Kokkinos V. High Accuracy of Epileptic Seizure Detection Using Tiny Machine Learning Technology for Implantable Closed-Loop Neurostimulation Systems. BioMedInformatics. 2025; 5(1):14. https://doi.org/10.3390/biomedinformatics5010014

Chicago/Turabian Style

Tsakanika, Evangelia, Vasileios Tsoukas, Athanasios Kakarountas, and Vasileios Kokkinos. 2025. "High Accuracy of Epileptic Seizure Detection Using Tiny Machine Learning Technology for Implantable Closed-Loop Neurostimulation Systems" BioMedInformatics 5, no. 1: 14. https://doi.org/10.3390/biomedinformatics5010014

APA Style

Tsakanika, E., Tsoukas, V., Kakarountas, A., & Kokkinos, V. (2025). High Accuracy of Epileptic Seizure Detection Using Tiny Machine Learning Technology for Implantable Closed-Loop Neurostimulation Systems. BioMedInformatics, 5(1), 14. https://doi.org/10.3390/biomedinformatics5010014

Article Metrics

Back to TopTop