Modified Time-Frequency Marginal Features for Detection of Seizures in Newborns

The timely detection of seizure activity in the case of newborns can help save lives. Clinical signs of seizures in newborns are difficult to observe, so, in this study, we propose an automated method of detecting seizures in newborns using multi-channel electroencephalogram (EEG) recording acquired from 36 newborns admitted to Royal Women’s Hospital, Brisbane, Australia. A novel set of time-frequency marginal features are defined to detect seizure activity in newborns. The proposed set is based on the observation that EEG seizure signals appear either as a train of spikes or as a summation of frequency-modulated chirps with slow variation in the instantaneous frequency curve. The proposed set of features is obtained by extracting the time-frequency (TF) signature of seizure spikes and frequency-modulated chirps by exploiting the direction of ridges in the TF plane. Based on extracted TF signature of spikes, the modified time-marginal is computed whereas based on the extracted TF signature of frequency-modulated chirps, the modified frequency-marginal is computed. It is demonstrated that features extracted from the modified time-domain marginal and frequency-domain marginal in combination with TF statistical and frequency-related features lead to better accuracy than the existing TF signal classification method, i.e., the proposed method achieves an F1 score of 70.93% which is 5% greater than the existing method.


Introduction
Timely detection of seizures in newborns can help to save lives [1]. Clinical signs of seizures in newborns are difficult to observe, so, in this study, we propose an automated method of detecting seizures in newborns using multi-channel electroencephalogram (EEG) recording. Seizure detection usually requires monitoring of electroencephalogram (EEG) signals by an expert neurophysiologist. So, there is a need to develop an automated seizure detection algorithm. Machine learning based seizure detection algorithms usually involve the extraction of features from signal representation followed by training of a classifier signal [2,3]. The performance of such methods mainly depends on the discriminatory performance of extracted features. For feature extraction, the following forms of signal representations can be used: (a) time-domain, (b) frequency-domain, and (c) joint timefrequency (TF) domain [4][5][6][7][8]. It has been demonstrated in earlier studies that extracting features from TF features generally leads to better performance than time-domain features or frequency domain features [9,10]. One alternative to extracting features from joint TF representations is to first employ signal decomposition methods such as empirical mode decomposition to decompose signals into their components and then extract features from each component separately [1,11,12].
Recently, deep learning methods are employed for the automated detection of seizures. These methods do not require domain knowledge of an analyst to define features; rather, deep learning architectures automatically learn features from signal representation [13][14][15][16][17][18]. However, these methods usually require the availability of large databases.
We propose a novel approach to extracting features from joint TF representation. The proposed method is based on the observation that seizures either appear as a train of spikes or a summation of piece-wise linear frequency modulated chirps with slow variation in instantaneous frequency [6]. The TF signature of such signals is composed of ridges that are either aligned to the time axis or to the frequency axis [19,20]. The mathematical representation for a class of seizures that are modeled as a train of impulses is given as: and the mathematical modulation of EEG seizures modeled as a summation of frequencymodulated chirps is given as: where f o (t) is the instantaneous frequency of fundamental component. It is usually modeled as a piece-wise linear frequency modulated chirp [8]. To exploit this information, we extract features (a) from the modified time-marginal that extracts the time-domain signature of only spikes, (b) the modified frequency-marginal that extracts frequency-domain signatures of frequency-modulated chirps, and (c) from filtered TF representation that extracts the TF signature of seizure signals. Experimental results indicate that the proposed method achieves better performance than a state of the art in terms of F1-score. The proposed method achieves an F1-score of 0.709 whereas the F1-score of the existing method is 0.65. The organization of the remainder of the article is as follows. Section 2 presents details of the methodology for extracting the proposed features for seizure detection. To assess the performance of the seizure detection scheme, numerical results are presented in Sections 3 and 4 concludes the article.

Methodology
Multi-channel EEG signals are acquired and signals from all channels are averaged to get the signal x(t). The remaining process is performed on the averaged signal. The proposed system is illustrated in Figure 1 and the main steps are explained in the following sections.

Time-Frequency Analysis of EEG Signals
EEG signals, because of their non-stationary characteristics, are best analyzed in the joint TF domain using TF representations. Previous studies have shown that analyzing seizure signals in the joint TF domain reveals important features that can be used for their classification [21,22]. TF representations are generally classified into linear and quadratic classes [23]. We have employed quadratic TF representations because they represent the distribution of signal energy in the TF domain [23].
Wigner Ville distribution (WVD) is a core TF distribution of quadratic class defined as [24]: where z(t) is the analytic associate of a real-life signal x(t). The WVD has high energy concentration for mono-component linear frequency modulated signals but it produces cross-terms for multi-component and non-linear frequency modulated signals [23]. The cross-terms in the WVD are typically reduced by convolving them with signal-dependent or independent kernels [25].
In our earlier studies, we demonstrated that an effective method to reduce crossterms in WVD is through the application of signal-dependent adaptive directional kernel whose principal direction is adjusted at each TF point. TFDs obtained as a result of adaptive directional smoothing are called adaptive directional time-frequency distributions (ADTFDs) [26].
where γ θ (t, f ) is given as: where t θ = t cos(θ) + f sin(θ) and f θ = f cos(θ) − t sin(θ), θ is the direction of γ θ (t, f ), a determines the extent of smoothing along the major axis, and parameter b determines the extent. We adjust the direction of γ θ (t, f ) at each TF point to align its principal direction with the major axis of ridges. The direction of principal axis of ridges is estimated as [26]: where θ is varied from 0 • degree to 180 • degree with the step size of 3 • . EEG seizure signals are modeled as either train of impulses or as the sum of harmonically related frequency modulated chirps, whereas background appears as noise.
To enhance discriminatory characteristics of seizures, EEG signals are first pre-processed through differentiator filter [27] as: d dt x(t). This differentiation implementation can be implemented digitally as x(n) − x(n − 1). Let us analyze two types of EEG seizure signals and EEG background signals in the joint TF domain using the ADTFD. Figure 2a illustrates a TF representation of EEG seizure signal with spiky characteristics, Figure 2b illustrates TF representation of seizure signal composed of frequency-modulated chirps, and Figure 2c illustrates TF representation of non-seizure signal.
It is observed that the TF signature of EEG seizures is composed of ridges that are either aligned to the time axis due to spikes or aligned to the frequency axis due to frequency-modulated chirps. However, in the case of background ridges, they can follow any random direction.

Modified Time-Marginal and Frequency-Marginal Features
In this study, we develop a novel approach to compute modified time-marginal and modified frequency marginal for extracting features from EEG signals. From TFDs, that satisfy marginal properties, time-marginal can be estimated from TFD as [23]: or similarly, frequency-marginal can be estimated as: We define modified marginals to extract the time-domain signature of epileptic spikes or frequency-domain signatures of frequency-modulated chirps.

Time Marginal Feature
Let us define a TF distribution, i.e., (ρ t (t, f )), that preserves only those ridges that are aligned to the frequency axis and has 0 value for all other TF points [28].
The time-domain signature of spikes can then be extracted from ρ t (t, f ): Let us consider a TF signature of EEG seizure signal with spiky characteristics as shown in Figure 3a. The TF signature of spikes is extracted by ρ t (t, f ) as shown in Figure 3b. The time-domain marginals obtained from ρ(t, f ) and ρ t (t, f ) are illustrated in Figure 3c. Note that time-marginal obtained from ρ(t, f ) contains energy from both spike and tone components whereas the time-marginal obtained from ρ t (t, f ) only has energy from spikes.   Note that s(t) only contains spike components. We estimate the features from timedomain marginal of s(t) by dividing them into 4 non-overlapping equal segments and then estimating energy in each segment as: where k = 0, 1, 2, 3.

Frequency Marginal Feature
We adopt a similar approach to extract modified frequency-marginal. Let us define a TF representation that preserves ridges aligned with time-axis We extract the frequency-domain marginal as: We define features from modified frequency-domain marginal, i.e., s( f ), by estimating energy from the sub-bands (0 Hz to 1 Hz), (1 Hz to 2 Hz), (2 Hz to 3 Hz), (3 Hz to 4 Hz), (4 Hz to 8 Hz), and (8 Hz to 16 Hz). The modified frequency marginal features are given in Table 1.

Time-Frequency Statistical and Time-Frequency Signal Features
Let us define the TFD that preserves ridges that are either aligned to the time axis or the ridges that are aligned along the frequency axis [20], i.e., Figure 4 illustrates ρ FIL (t, f ) and ρ(t, f ) for both background and seizure signals. It is observed that for seizure signals ρ FIL (t, f ) ≈ ρ(t, f ). However, for EEG background, ρ FIL (t, f ) is significantly different from ρ(t, f ).
Based on this observation, we employ ρ FIL (t, f ) instead of ρ(t, f ) for extracting TF statistical [9] and TF signal [9] related features. The list of features along with their respective formula are given in Table 2. The importance of each feature in the process of classification is found based on the decrease in accuracy when that feature is removed from the classification. The findings are presented in Section 3.3.

S. No
Name of Feature Formula

Database Description
We have used a multi-channel newborn EEG database that is described in [4,29,30] and was made publicly available along with relevant codes at https://github.com/ElsevierSof twareX/SOFTX-D-17-00059 (accessed on 1 November 2019). The database was acquired from 36 newborns using a 10-20 international electrode placement system at sampling frequency of 256 Hz. The marking of the channels is illustrated in Figure 5, which shows the possible placements of the electrodes. For each location, the first letter identifies the lobe whereas the second number or letter identifies the hemisphere location. The letters F, T, C, P, and O stand for Frontal, Temporal, Central, Parietal, and Occipital. The right hemisphere is represented by even numbers whereas odd numbers represent the left hemisphere. The z refers to an electrode placed on the mid-line. The signals were acquired at Royal Women's Hospital Brisbane by an expert pediatric neurologist. The database was annotated for seizure, artifacts, and normal background patterns. Ethical approval was given by Royal Brisbane and Women's Hospital (RBWH), Medical Research Ethics Committee (MREC), Brisbane, Australia [31]. The durations of background, seizures, and artifacts are 6 h, 5.16 h, and 5.04 h, respectively. EEG signals are segmented into non-overlapping segments of 8 s. The recorded dataset was divided into non-overlapping segments of duration 8-s. This database contains a total of 7290 segments including 2332 segments of seizures.
Each segment was labeled as 1 if seizure activity was observed and 0 if no seizure activity was observed. We analyzed the dataset and observed that approximately 78 percent seizure activity takes place below 4 Hz, 15 percent in between 4 Hz and 8 Hz, and 5.5 percent from 8 Hz to 12 Hz. Based on these observations, the signal is downsampled to 32 Hz to reduce the computational load. A snapshot of multi-channel EEG seizure signals is given in Figure 6.

Results and Discussion
In earlier studies, two alternate approaches of feature extraction from multi-channel EEG signals were proposed. The first approach converts multi-channel EEG recordings into the single channel through spatially averaging whereas the second approach converts extract features from each channel separately and then finally spatially averages the extracted features. In this study, we adopted the former approach to reduce computational costs. Illustrations of averaged and downsampled EEG signals just before the start of seizure signal and just after seizure signal are shown in Figure 7. Let us now apply the proposed methodology to detect seizures in newborns. Crossvalidation is performed using the leave-one-out approach where testing is performed by using EEG recordings of one patient while the EEG recordings of the remaining patients are used for training. This process is repeated until all patients are tested. We use equal examples of seizure and non-seizure segments from the training set. In order to reduce false positives, we first apply a 5-tap median filter, i.e., a given segment is classified as a seizure segment if a seizure appears in at least three out of five segments. The application of this median filter removes seizures appearing at the boundaries, thus reducing the overall sensitivity of the system. To improve the sensitivity, we extend the boundary by 8 s at each end. An illustration of the detected vs. original seizure using the balanced dataset is given in Figure 8. For the same EEG recording, Figure 9 illustrates the plot of extracted features.

Discussion
Let us compare the performance of the proposed ADTFD-based TF features with the large set of TF features that include TF signal related features, TF image related features, TF Harlic features, and time-scale features proposed in [4]. This large set of features is extracted using Compact Kernel TFD (CKD), Spectrogram (SPEC), and Extended modified B distribution (EMBD). We have used F1-measure, sensitivity, total accuracy, specificity, and precision as criteria for performance comparison. The experimental results given in Table 3 indicate that the F1-score obtained by the proposed method is 70.93%, which is 5% greater than the results obtained by the next best method. The importance of each feature in the random forest classifier is given in Figure 10. The importance of each feature is computed based on the decrease in accuracy when that feature is removed from the classification. Figure 10. Importance of each feature. Note that F 1 ,F 2 ,F 3 ,F 4 , and F 5 are modified frequency marginal features described in Table 1. T 1 , T 2 , T 3 , and T 4 are modified time-marginal features described in Equation 2. TF 1 , TF 2 , . . . TF 8 are TF features defined in Table 2.
Experimental results indicate that the proposed approach of exploiting direction of ridges for extracting features from modified time-marginal, modified frequency-marginal, and filtered TF representation has significantly improved the classification accuracy and F1-score, e.g., the proposed method achieves the F1 score of 70.9%, which is 5% greater than the F1-score achieved by the next best method. These improved results are important as timely detection of seizures in newborns through an automated classification system can help save lives. The proposed approach is based on the observation that seizures either appear as a train of impulses or as a summation of harmonically related frequency modulated chirps, whereas in the case of background, ridges can follow any random directions. Based on these observations, a novel TF pre-processing method is developed where only those ridges that are either parallel to the time axis or parallel to the frequency axis are retained to extract TF signatures of seizures. The extracted TF signature is used to define novel features that lead to better accuracy than existing TF features. The proposed approach for the detection of seizure activity by extracting a signal of interest in the TF domain is not limited to the detection of seizures but can be adapted for the detection of abnormalities in a wide range of physiological signals, such as electrocardiogram signals.
The limitations of this study are as follows: • High computational cost: The proposed approach is computationally expensive as it requires the computation of ADTFD with complexity of O(N 2 log(N) where M is the size of the smoothing filter, N is the number of samples in a given segment, and R is the number of quantization levels. Note that the complexity of quadratic TFDs used in the earlier study was O(N 2 log(N)). • For detection of seizures in multi-channel recordings, the better classification results are obtained by first extracting features from each channel separately and then reducing the dimension of features through dimensionality reduction approaches as compared to first combining all channels through averaging followed by feature extraction. Due to the high computational cost of the proposed method, we first combined all channels through averaging and then extracted features from the single combined channel. In the future, we will further improve the performance of our method through feature averaging. • In this study, we used the EEG segment of 8-s duration sampled at 32 Hz for the detection of seizure activity. However, the results can be improved by using longer segments of EEG segments. • Artifact detection and removal: Sometimes the machine learning algorithm wrongly detects artifacts as EEG seizures; this causes false positives. A number of artifact detection and removal systems have been developed. We can improve the performance of the proposed method by integrating artifact detection and removal system as a preprocessing step.

Conclusions
A novel set of TF features are defined for the classification of EEG signals. The proposed set of features is obtained by defining a TFD that extracts the TF signatures of seizures based on the direction of ridges; e.g., ρ FIL (t, f ), ρ t (t, f ), and ρ f (t, f ). Modified time-marginal features are extracted by projecting the TF signature of seizures with spike characteristics to the time axis and modified frequency-marginal features are extracted by projecting the TF signature of seizures composed of frequency-modulated chirps to the frequency axis. Features from both modified time-marginal and modified frequencymarginals are extracted in addition to TF statistical features, energy concentration measure, TF flux, and TF flatness, which are extracted from filtered TF representation obtained by preserving ridges aligned to the time axis or frequency axis, i.e., ρ FIL (t, f ). Experimental results indicate that the proposed set of TF features leads to better performance by achieving an F1-score of 70.93%, which is 5% greater than the existing EEG seizure detection algorithm based on TF feature extraction. In this study, we used segments of 8-second duration for feature extraction and classification. As part of the feature study, we will explore larger segments of seizures to improve the classification accuracy. In addition, an automated integrating artifact detection and removal system will be integrated as a pre-processing step to minimize false positives.  Informed Consent Statement: Informed consent was obtained by the data provider.

Conflicts of Interest:
The authors declare no conflict of interest.