Artificial Intelligence in Epilepsy
Correspondence Address: Source of Support: None, Conflict of Interest: None DOI: 10.4103/0028-3886.317233
Source of Support: None, Conflict of Interest: None
Keywords: Artificial intelligence, deep learning, epilepsyKey Message: Advancements in AI in medicine have tremendous potential to assist doctors in accurate & timely diagnosis of the health problems. AI is not going to replace doctors, but to assist doctors to increase the efficiency of timely diagnosis for better healthcare.
Epilepsy is a central nervous system (neurological) disorder caused by the sudden abnormal discharge of the brain neurons. According to the World Health Organization (WHO), 50 million of the world population is suffering from epilepsy. An estimated 2.4 million people are diagnosed with epilepsy each year. As a chronic disease, it has adverse effects on the quality of life of patients, including cognitive impairment, decreased ability of daily activities, and the possible social stigmatization. Till date, a full understanding of the etiology of epilepsy is not available. The start or onset of a seizure, in which a group of neurons synchronously discharge or misfire from several focal points and spread out to other hemispheres (or the whole brain), is followed by electrophysiological anomalies and behavioral manifestations such as impaired awareness, muscles stiffness, and pain. Its diagnosis is mostly performed using electroencephalography (EEG)., The general practice of analyzing the recorded EEG to trace the presence of epileptiform patterns and mark their onsets across the time series is performed by neurophysiologists through visual inspection. Notably, this process of manual detection is very time-consuming and inefficient, especially during cases of long-term EEG recording., Moreover, overlapping symptomatology of epilepsy with other neurological disorders and contamination of EEG signals (especially the extracranial or scalp recordings) by artifacts makes the visual scrutinization procedure very challenging even for an experienced neurophysiologist. The repercussions of delayed or incorrect diagnosis could lead to permanent neurobiological, cognitive, social, and psychological impairments. This has led to the research and development of portable EEG devices capable of continuous monitoring and streaming the EEG signals wirelessly onto devices capable of storing, visualizing, and processing such data. Problems associated with wet electrodes such as lack of movement and continuous application of conducting gel are being resolved by the development of dry electrodes that are capable of providing a clean signal with a high signal to noise ratio. In both cases, the duration of continuous monitoring is large. Manual annotation and tagging/detection of significant seizure events become a challenging and laborious process. Hence, there is a need to automate the process of detecting epileptiform patterns more efficiently, and this has been the basis for the development of various artificial intelligence (AI)-based models.,,,,,,,,,,,
Artificial intelligence (AI)
AI is the simulation of human intelligence processes by machines, especially computer systems. AI can also be described as the study or design of “restricted” intelligent agents, that can discern and understand their surroundings and accordingly take appropriate action to maximize the chances of achieving the desired objectives. [Figure 1] summarizes the definition of AI, machine learning (ML), and deep learning (DL).
AI is not a single methodology but rather a collection of techniques to solve a particular task. These tasks of varying complexity are highly relevant to the healthcare domain, from delivering precision medicine by analysis of symptoms of a patient to the calculation of the probability of someone acquiring a particular disease.
The success of AI stems from its ability to learn from its mistakes. Classical systems based on statistics have fixed knowledge, i.e., they will keep making the same mistakes again and again based on fixed rules. AI algorithms supersede this methodology by learning from their mistakes. The knowledge database of an AI algorithm continues to increase with experience.
The history of AI reaches back to the 1950s with the advent of the perceptron. However, it was not until the 1990s that ML techniques became more widely used. The development of ML tools including support vector machine (SVM),,,,,,, probabilistic neural network (PNN), artificial neural networks (ANN),,, K-nearest neighbor (KNN), multilayer perceptron (MLP),,, and Bayes Network (BayesNet), etc., allowed researchers to leverage the computational power available to build statistical models robust to data variation and to make new inferences about real-world problems.
Arguably, the biggest developments in AI till date have come in the last decade as large-scale data and hardware suitable for processing these data have become available, and sophisticated DL methods have become computationally feasible.,,, An instinctive way to appreciate how DL works originates from understanding the neuron firing patterns in the brain. A brain neuron, as well as a node in the DL network, receives the input, which gets transformed to an output according to a set of rules that aid learning. The similarity between AI and the neuronal function is the reason it is often called an ANN. Numerous examples illustrate the use of ML and DL algorithms in automated diagnosis.,,,,,,,,,,,,,,,
Where can AI help?
The rapid growth of the patients each year necessitates the need for automated seizure detection techniques from EEG signals as the visual interpretation by the neurologists is both tedious and cumbersome. The visual detection of an epileptic seizure is a challenging task due to the nonlinear and nonstationary nature of EEG. Besides, the signals of interest are of extremely low power and amplitude (in the order of microvolts). The signal is often corrupted by electrical noise or other external disturbances. Body movements such as eye blinks, muscle movements, chewing, jaw clenching, etc., also induce artifacts that are difficult to identify., Moreover, when developing software that works on multiple people, the underlying technology has to be robust enough to generalize aspects that vary from person to person. The number of variables in such problems is too high. Statistical methods fail to generalize and accommodate a wide variety of these issues. On the other hand, AI is the right approach to solve such problems. The algorithm starts by having fixed knowledge about the system. It constantly learns more information about the domain through supervision by a domain expert. Over time, the performance of the system gradually increases as it increases its knowledge by modifying its internal parameters. By providing an AI system with enough high-quality data and by tuning its parameters correctly, the performance of the system can be compared with the domain expert. For example, several AI systems have been developed by companies such as IBM that can defeat world champions in the games of Chess Go. Boston Dynamics has been designing humanoid-like robots that walk and perform tasks such as lifting heavy weights while maintaining human-like agility. Exoskeleton suits are also being developed to assist differently-abled people to walk with confidence. These systems leverage knowledge learned through an incremental process about the domain and avoid making mistakes by learning the correct approach to solve that problem. Amid the emerging technologies, there is still a silver lining., Such systems are not complex enough to completely replace a human being. There are situations where the cost of making mistakes is high; for example, having an AI model perform surgery or drive a vehicle is risky. Mistakes can lead to loss of human life and such systems cannot be readily deployed or marketed to the general public without serious evaluation. Moreover, at present, there are no laws that describe the activities that may be automated using AI algorithms. The scientific community must decide and formulate such laws unilaterally before any critical systems can be shipped to the public. As discussed above, AI systems fail in some scenarios due to their restricted capability in understanding the complex structure of the brain and how it makes decisions.
Why visual inspection and interpretation of EEG are challenging?
As a visual experiment that describes the behavior of EEG signals, we have considered three sinusoidal waveforms of 10 Hz, 50 Hz, and 100 Hz shown in [Figure 2]a, [Figure 2]b, [Figure 2]c. Let us assume these waveforms as brain waves for the sake of generality. The x-axis represents time 't' in milliseconds (ms). The y-axis represents the amplitude of the wave in microvolt (μV). When we combine these three waveforms as shown in [Figure 2]d, we get a resultant waveform that is completely different from our original three sine waves. We can easily tell the frequency of the first three waves but will fail in identifying the frequency of the resultant wave by visual inspection since the frequency of the waveform varies at every time instance. This behavior represents the nonstationary nature of EEG signals. In real-time scenarios, there are multiple frequencies with different signals that impede analysis of the underlying pattern without converting the nonstationary EEG signal to a stationary form. One way of converting from nonstationary to stationary form is to break down a long trace of EEG signal to several small lengths (in s) EEG epochs using short-time Fourier transform (STFT) or wavelet decomposition techniques., After this mathematical treatment, quantitative EEG/Magnetoencephalography analysis can be conducted to find out the changes in various features of the signal.,,,,,
To transform the signal from a time-domain representation (as shown in [Figure 2]) into frequency domain representation, the FT is commonly used. Once the signal is analyzed in the frequency domain, irrelevant frequencies are filtered out and inverse FT is used to generate the EEG signal back into the time domain. Using this technique, we recover a noise-free EEG signal. The disadvantage of this approach is that once the signal is transformed into the frequency domain, the time domain features are lost. Identification of the presence of a specific frequency at a time instance is not possible. This limitation generates a need for an analysis mechanism that incorporates both times as well as frequency domains together. Such techniques are known as time-frequency analysis techniques and they include STFT and wavelet transform. Wavelet transform provides a high-frequency resolution at low frequencies and high-time resolution at high frequencies, thus giving a better insight into the signal.
The techniques discussed above are quite useful in building up an AI-based system that can provide an automated diagnosis., [Figure 3] gives a preliminary idea of how such a system can be formulated.
As illustrated in [Figure 3], the typical blocks in an AI-based diagnosis system involve EEG acquisition, followed by preprocessing (50 Hz noise removal, artifact removal), and thereafter either ML- or DL-based approach can be followed.,,,,, ML involves EEG analysis using the time-domain-, frequency-domain-, or time-frequency-based methods. The extracted features using these methods are subjected to selection and then classification. DL approaches on the other hand have a complete end-to-end structure that automatically performs feature extraction and classification. All the state-of-art approaches reported in the past have used the building blocks discussed in [Figure 3] to make automatic diagnosis systems for epilepsy. Although these systems contribute to the diagnosis and early detection of the disease, they cannot assume the role of human interaction, i.e., it is difficult for them to mimic empathy.
AI is not to replace doctors
The prime goal of AI in healthcare is not to replace doctors., Rather, it is a tool to optimize the performance of clinicians, releasing them from menial tasks, and providing them assistance with issues that they may have otherwise failed to notice. For example, visually inspecting and annotating hours-long-EEG records for complex epileptic patterns is tedious, time-consuming, and susceptible to errors. AI can automate this process by marking relevant signal segments in the recorded EEG into defined categories (discharge, ictal, interictal, artifacts, and normal background)., Thus, the physician automatically gets a list of spikes, discharges, and seizures to review. [Figure 4] shows an example of this process. The success of the AI model shown in [Figure 4] is entirely dependent on the availability of labeled data for training via which the model learns. Providing accurate labels by carefully interpreting the data will always remain a human territory.
Importance of the domain knowledge in building robust AI models
Cutting-edge AI models in conjunction with high-quality clinical EEG data lead to improved diagnostic models for epilepsy. Despite the clinical promise of AI, ML, and DL algorithms in diagnosis, they are not a one-size-fits-all solution for all types of clinical epileptic patterns and questions., A common limitation of clinical AI studies is the amount of available data with high-quality outcome labels, rather than the availability of robust AI algorithms and computational resources. AI and DL are just a mathematical framework that can potentially answer many disease-related questions through the application of existing complex and comprehensive model architectures, so long as training data (the best label data) of sufficient quantity and quality is available, So, the most important thing is that the performance of an AI model must be benchmarked against a known clinical outcome that provides a target label for AI prediction (e.g., seizure versus no seizure; drug response vs. no drug response; depression vs. no depression). The accurate identification of these target labels requires clinical knowledge. To identify these target labels, we are heavily dependent on experts with extensive clinical experience. In addition, experts such as neurologists have a nonlinear working method that requires careful inspection, creativity, and problem-solving skills that these AI systems are not capable of. Thus, there is a need to integrate the physician's/neurologist domain knowledge with the AI model to build robust detection systems.
Timely detection of seizures has a significant impact on the quality of life of patients as it can lead to a speedy diagnosis and treatment delivery. Much research has been conducted in the domain of automated epileptic seizure diagnosis using ML and DL algorithms, but limited functional hardware and software programs are available for recognition in real-time.,,,,,,,,,,,,,,, For example, an ensemble of pyramidal one-dimensional CNN (P-1D-CNN) for seizure classification was proposed that has rendered an overall accuracy of 99.1% on Bonn-dataset. In another work, RNN was employed on the same dataset which rendered an accuracy of 99% for epileptic vs. nonepileptic cases. The use of long short-term memory (LSTM) for seizure detection using the American Epilepsy Society Seizure Prediction Challenge dataset was reported. An interesting work that makes use of a 2D time-frequency image of an EEG signal along with CNN has also been reported for preictal and interictal segment classification using three publicly available datasets.
The experts in the domain of AI and signal processing believe that powerful tools for seizure diagnosis can be build using deep learning.,,, Surveying the literature from the past it is observed that the technique to be used for diagnosis should be chosen carefully. While selecting the appropriate structure, one should take into consideration the dataset characteristics, the need for real-time implementation, the minimum acceptable value of the classification accuracy, and whether to use pretrained architectures. Multiple ML and DL models exist in the literature that works well on different datasets. Comparing the efficacy of such models becomes difficult as they are built using different datasets. The DL models are advantageous in the context that they require no handcrafted features, limited/no preprocessing, no feature selection mechanism, and are robust to noise in contrast to the ML methods.,,, However, they require huge amounts of data for computationally expensive training. There are some prime challenges to overcome in the application of deep learning methods. First, the available dataset is segmented EEG signals differing their performance on the continuous real-time signals. Second, clinical datasets are not publicly available. Third, the size of the available dataset for model training is insufficient. Finally, deep models require massive computational resources that are not accessible to everyone.
The researchers from multidisciplinary domains should come up with techniques that generalize well on the standard and the clinical data that requires minimum computational effort and have good detection accuracy even on imbalanced datasets of long-duration EEG.
One such model currently in progress is a collaboration between AIIMS and IIT Delhi called EPiSAVES (Epilepsy Patient Interactive and Synchronized Automated Video EEG), which seeks to create a portable AI-based mobile application diagnostic tool. The mobile application on the patient's smartphone connects wirelessly to a cap equipped with novel dry electrodes to enable 24/7 synchronous video and epileptiform EEG discharge recording. The use of such a device can facilitate the diagnosis of epilepsy without costly tools such as inpatient monitoring, and as a 24/7 system, it presents large amounts of data to the attending physician for more accurate diagnoses. Furthermore, through manual annotation of data, the application is being trained to recognize and color code epileptiform discharges to make the diagnosis process simpler. The mobile application represents a uniquely versatile method of treatment delivery to the patient, especially as smartphones are readily owned by patients. Notably, many additional features can be added to the mobile application, such as a seizure diary, medication application reminder system, and lifestyle checklists to further enrich the user experience with little additional burden on the provider.
AI has already started playing a big role in every corner of our life including medical diagnosis and prognosis. It is going to play a far bigger role in future medical practice. It has the potential to create a paradigm shift in the diagnosis, prediction, and management of neurological diseases such as epilepsy. Advancements in AI have the potential to reduce the uncertainty surrounding in diagnosis and treatment of epileptic seizures.
The present paper provides a comprehensive review of the use of AI-based systems for automatic seizure detection. Surveying reveals the merits and demerits of employing AI models for detection. Undoubtedly, AI has rendered automatic algorithms for the speedy processing of high-dimensional nonstationary EEG data in contrast to the visual inspection by the physicians. Patients would benefit from predictive modeling of the AI systems, which would enable them to some cautionary measures to avert the same promptly. The review also highlights the complexity of understanding the brain processes via EEG signals. It also emphasizes the need for time-frequency-based methods to analyze the nonstationary characteristics of EEG signals. The paper also discusses why AI is not about replacing doctors and why we will always need experts' domain knowledge to build accurate AI models. The review also recognizes the need to concentrate both on the practical and hardware aspects of AI-based systems. Such systems can be placed in the cloud and mobile/wearable may be equipped with them. All the computations can be performed on the cloud server. For real-time detection, a cap with EEG electrodes integrated into it can be constructed that can acquire the signals and send them to the cloud for processing. Finally, the review concludes with the promise of AI in the development of early detection of seizure model that can help healthcare professionals for robust and accurate diagnosis of the problem in less time.
Financial support and sponsorship
This work is supported by PSA, Govt. of India Grant no: Prn.SA/Epilep/2017.
Conflicts of interest
There are no conflicts of interest.
[Figure 1], [Figure 2], [Figure 3], [Figure 4]