Detecting seizures and interpreting EEGs, the direct algorithmic way 

28th September 2022

– Ullas A 

Researchers at the Indian Institute of Science (IISc), in collaboration with AIIMS Rishikesh, have developed an algorithm that can help decode brain scans to identify the occurrence and type of epilepsy.

Epilepsy is a neurological disease where the brain emits sudden bursts of electrical signals in a short amount of time, resulting in seizures, fits, and in extreme cases, death. Based on the point of origin of the brain’s erratic signals, epilepsy is classified as either focal or generalised epilepsy. Focal epilepsy occurs when the erratic signals are confined to a specific region in the brain. If the signals are at random locations, then it is termed as generalised epilepsy.

To identify whether a patient is epileptic, neurophysiologists need to manually inspect EEGs (electroencephalograms), which can capture such erratic signals. Visual inspection of EEG can become tiring after prolonged periods, and may occasionally lead to errors, says Hardik J Pandya, Assistant Professor at the Department of Electronic Systems Engineering (DESE) and the corresponding author of the study published in Biomedical Signal Processing and Control. “The research aims to differentiate EEG of normal subjects from epileptic EEGs. Additionally, the developed algorithm attempts to identify the types of seizures. Our work is to help the neurologists make an efficient and quick automated screening and diagnosis,” he adds.

In their study, the team reports a novel algorithm that can sift through EEG data and identify signatures of epilepsy from the electrical signal patterns. After initial training, the algorithm was able to detect whether a human subject could have epilepsy or not – based on these patterns in their respective analyses – with a high degree of accuracy, the researchers say.

To develop and train the algorithm, the researchers first examined EEG data from 88 human subjects acquired at AIIMS Rishikesh. Each subject underwent a 45-minute EEG test, divided into two parts: an initial 10-minute test when the subject was awake, which included photic stimulation and hyperventilation, followed by a 35-minute sleep period when the subject was asked to sleep. Next, the team analysed this data and classified different wave patterns into sharp signals, spikes, and slow waves. Spikes are patterns where a signal rises and falls within a very short duration of time (~70 milliseconds), while sharps are those with rises and falls spread over a slightly longer duration (~250 milliseconds), and slow waves have a much longer duration (~400 milliseconds).

Approach to detect and classify epileptic seizures (Credit: Rathin K Joshi)

An epileptic subject shows a different set of patterns compared to a healthy individual. The researchers developed an algorithm to calculate the total number of sharp waves – the Cumulative Sharp Count – and use this as a parameter to detect if the subject is epileptic or not (a higher value indicates a greater chance that the subject is epileptic). The algorithm also calculates the sum of areas under the spikes and sharp curves to distinguish between focal and generalised epilepsy (a greater value indicates generalised epilepsy, as opposed to focal epilepsy, which has a lower value). The researchers add that the study shows a way to identify absence seizures (those that involve a brief, sudden lapse of consciousness), using a Cumulative Spike-Wave Count; in some cases, these absence seizures are critical and can be fatal.

The team then ran their algorithm on a new set of EEG data from subjects for whom the classification (whether they had epilepsy, and if so, what type of epilepsy they had) was already known to the doctors. This blind validation study successfully classified the subjects accurately in nearly 91% of the cases.

“We hope to refine this further by testing on more data to consider more variabilities of human EEGs until we reach the point where this becomes completely translational and robust,” says Rathin K Joshi, a PhD student in DESE and first author of the study.

Currently, a patent has been filed for the work and the algorithm is being tested for its reliability by physicians at AIIMS Rishikesh.


Joshi RK, Kumar V, Agrawal M, Rao A,  Mohan L, Jayachandra M,  Pandya HJ, Spatiotemporal analysis of interictal EEG for automated seizure detection and classification, Biomedical Signal Processing and Control (2022).


Hardik J Pandya
Assistant Professor
Department of Electronic Systems Engineering (DESE)
Indian Institute of Science (IISc)
Phone: +91 80 2293 3084



a) If any of the text in this release is reproduced verbatim, please credit the IISc press release.
b) For any queries about IISc press releases, please write to or