# Time-varying time-frequency complexity measures for epileptic EEG data analysis

Marcelo Colominas, Mohamad El Sayed Hussein Jomaa, Nisrine Jrad, Anne Humeau-Heurtier, Patrick van Bogaert

► To cite this version:

Marcelo Colominas, Mohamad El Sayed Hussein Jomaa, Nisrine Jrad, Anne Humeau-Heurtier, Patrick van Bogaert. Time-varying time-frequency complexity measures for epileptic EEG data analysis. THE DESIRE PROJECT - 4th Annual Meeting, Oct 2017, La Valette, Malta. 10.1109/TBME.2017.2761982. doi:10.1109/TBME.2017.2761982

HAL Id: hal-02159627

https://hal.science/hal-02159627

Submitted on 21 Jun 2021

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Time-varying Time-Frequency Complexity Measures for Epileptic EEG Data Analysis

Marcelo A. Colominas, Mohamad El Sayed Hussein Jomaa, Nisrine Jrad, Anne Humeau-Heurtier and Patrick Van Bogaert

***Abstract***—**Objective:** Our goal is to use existing and to propose new time-frequency entropy measures that objectively evaluate the improvement on epileptic patients after medication by studying their resting state EEG recordings. An increase in the complexity of the signals would confirm an improvement in the general state of the patient. **Methods:** We review the Rényi entropy based on time-frequency representations, along with its time-varying version. We also discuss the entropy based on singular value decomposition computed from a time-frequency representation, and introduce its corresponding time-dependant version. We test these quantities on synthetic data. Friedman tests are used to confirm the differences between signals (before and after proper medication). Principal component analysis is used for dimensional reduction prior to a simple threshold discrimination. **Results:** Experimental results show a consistent increase in complexity measures in the different regions of the brain. These findings suggest that extracted features can be used to monitor treatment. When combined, they are useful for classification purposes, with areas under ROC curves higher than 0.93 in some regions. **Conclusion:** Here we applied time-frequency complexity measures to resting state EEG signals from epileptic patients for the first time. We also introduced a new time-varying complexity measure. We showed that these features are able to evaluate the treatment of the patient, and to perform classification. **Significance:** The time-frequency complexities, and their time-varying versions, can be used to monitor the treatment of epileptic patients. They could be applied to a wider range of problems.

***Index Terms***—EEG data, epilepsy, Rényi entropy, signal complexity, SVD entropy, time-frequency.

## I. INTRODUCTION

ELECTROENCEPHALOGRAPHY (EEG) is a technique that records variations of the electrical potentials along time between 2 electrodes placed over the scalp. EEG data has a powerful temporal resolution of the order of the millisecond. These recordings are a good reflect of the electrical activity at rest or during an activation task within both close and far groups of neurons [1].

The probably most studied pathology through EEG is epilepsy [2]. This neurological disorder is characterized by

the occurrence of recurrent unprovoked epileptic seizures. Examples of works dealing with the analysis and/or prediction of seizures can be found in [3], [4]. Most epileptic patients do present on their resting state EEG recordings, even when no seizure occurs, i.e. in the interictal state, abnormal transients that are called interictal epileptiform discharges (IED). These IED display a particular morphology called spikes and waves or sharp waves [2].

As a seizure is characterized by a synchronous discharge of a group of neurons, the complexity of the EEG signal is expected to decrease during a seizure. Studies have shown that this decrease of the complexity of the signals may even be identified before seizure, with the perspective to predict it [5]. One of the most common ways to measure this complexity is through entropy, and its several variants [6], [7]. The application of entropy to EEG is widespread nowadays [8], [9], [10], [11], even with examples of entropies computed from time-frequency representations [12]. However, some of these entropy measures can have some limitations to discriminate signals of different complexity, which will be illustrated. Because of that, it is the purpose of the present work to propose new time-varying complexity measures useful to better distinguish signal complexities and to apply them to the study of EEG recordings from children with benign childhood epilepsy with centrotemporal spikes (BECTS). This form of epilepsy is the most common epileptic syndrome of childhood and has usually a favorable evolution with full recovery expected at adolescence and absence or mild cognitive deficits. However, atypical evolution may occur with strong exacerbation of IED during sleep, that may even consist in a pattern of continuous spikes and waves during sleep (CSWS). In this situation, the goal of the treatment is to decrease IED during sleep in order to limit cognitive deterioration [13], [14].

The paper is organized as follows. We recall the concepts of multicomponent signals and entropies based on time-frequency representations in Sec. II. In Sec. III we illustrate the need for time-varying entropy quantities, reviewing existing ones and introducing a new time-varying entropy based on singular value decomposition (SVD). We evaluate its performance on synthetic signals. Sec. IV is devoted to the analysis of resting state EEG recordings (segments without IED) of epileptic children before and after proper medication. Finally, Sec. V concludes the paper.

*M. A. Colominas, M. El Sayed Hussein Jomaa and A. Humeau-Heurtier are with Univ. Angers, LARIS - Laboratoire Angevin de Recherche en Ingénierie des Systèmes, 62 avenue Notre-Dame du Lac, 49000 Angers, France (correspondence e-mail: marcelo.colominas@univ-angers.fr).

N. Jrad is with Université Catholique de l'Ouest, Angers-Nantes, France and with Univ. Angers, LARIS - Laboratoire Angevin de Recherche en Ingénierie des Systèmes, 62 avenue Notre-Dame du Lac, 49000 Angers, France.

P. Van Bogaert is with Univ. Angers, LARIS - Laboratoire Angevin de Recherche en Ingénierie des Systèmes, 62 avenue Notre-Dame du Lac, 49000 Angers, France, with the Department of Pediatric Neurology, CHU Angers, France, and with Laboratoire de Cartographie Fonctionnelle du Cerveau, Université Libre de Bruxelles, Hôpital Erasme, Brussels, Belgium.

## II. MULTICOMPONENT SIGNALS AND
## TIME-FREQUENCY ENTROPIES

The multicomponent signals, which are made of a superposition of a small number of components modulated both in amplitude and frequency (AM-FM), are a versatile way to model phenomena such as audio signals [15], biomedical signals [16], or economic temporal series [17]. In the EEG context, a multicomponent model was assumed in [12], [18], [19].

For a signal of K components we have

$$x(t) = \sum_{k=1}^{K} x_k(t) = \sum_{k=1}^{K} a_k(t) \cos(2\pi\phi_k(t)), \quad (1)$$

with $a_k(t)$, $\phi'_k(t) > 0 \forall t$. In this case, the temporal variations of $a_k(t)$ and $\phi'_k(t)$ are much smaller than those of $\phi_k(t)$, which adds new constraints: $|a'_k(t)|, |\phi''_k(t)| < \epsilon \phi'_k(t)$, for a small $\epsilon > 0$. The signals modeled as in (1) have a special structure in a time-frequency plane: every component occupies a “ribbon” around its instantaneous frequency $\phi'(t)$. The more components we have, the more ribbons and the larger occupancy of the plane we will get.

If we analyze the signal (1) with the (modified) Short Time Fourier Transform (STFT)

$$F_x^g(t, f) = \int x(u)g(u-t)e^{-i2\pi f(u-t)}du, \quad (2)$$

where $g(t)$ is an even real compact-supported window with $\text{supp}\{G(f)\} \subseteq [-B, +B]^1$, then its spectrogram is

$$S_x^g(t, f) = |F_x^g(t, f)|^2 \approx \sum_{k=1}^{K} a_k^2(t) |G(f - \phi'_k(t))|^2, \quad (3)$$

provided $\phi'_{k+1}(t) - \phi'_k(t) > 2B, \forall k$. For the sake of simplicity, and due to its symmetry for real signals, we considered only positive frequencies for the spectrogram, and we will do so for the rest of this work.

### A. Time-Frequency Complexity

A widespread manner to measure the information and complexity of the time-frequency plane comes from the analogy between signal energy densities and probability densities [20], [21]. In this analogy, the instantaneous energy $|x(t)|^2$ and the spectral energy $|X(f)|^2$ act as unidimensional densities of the energy of the signal in time and frequency respectively, while the time-frequency representation (TFR) of the signal would behave as a bidimensional energy density in time-frequency. However, to consider TFR $R_x(t, f)$ as a true density, it should satisfy<fnref n="3" /> the marginal properties

$$\int R_x(t, f) df = |x(t)|^2, \quad \int R_x(t, f) dt = |X(f)|^2, \quad (4)$$

the energy conservation property

$$\iint R_x(t, f) dt df = \int |X(f)|^2 df = \int |x(t)|^2 dt, \quad (5)$$

and the non-negativity property

$$R_x(t, f) \geq 0. \quad (6)$$

If a given TFR satisfies requirement (4), it automatically satisfies requirement (5), but the converse is not true [22]. Unfortunately most TFRs do not satisfy the three requirements simultaneously. The bilinear distributions that are manifestly positive and satisfy the marginal properties do not exist [22]. Wigner-Ville distribution satisfies the marginals but takes negative values, as well as all fixed-kernel Cohen's class TFRs that satisfy requirement (4) [21]. The spectrogram, on the other hand, satisfies the positivity property, but it does not do so with the marginals (although it satisfies the energy conservation property) [22], [23]. The negativity of the Wigner-Ville distribution prevented the authors in [21] to use a classical Shannon entropy [24] of the TFR. Instead, they opted, as in [20], for a Rényi entropy [25], which apparently solves the non-positivity issue by taking the logarithm outside of the integral:

$$H_R^\alpha(R_x) = \frac{1}{1-\alpha} \log_2 \iint \tilde{R}_x^\alpha(t, f) dt df. \quad (7)$$

However, because of the negative values of the Wigner-Ville distribution, it is still possible for (7) to not exist, since $\iint R_x^\alpha(t, f) dt df < 0$ could happen for odd $\alpha$. This is a bad result since odd orders $\alpha > 1$ make this entropy asymptotically invariant to the well-known cross-terms of the Wigner-Ville distribution.

All this drives us not to use the Wigner-Ville distribution, and we will opt for the spectrogram instead. Although it does not satisfy the marginal properties (4), it was already successfully used in the context of time-frequency complexity measures in [19], [26]. Its realness and positivity would also allow us to compute a Shannon entropy, but we will not make use of this in the present work.

A different way to measure the complexity of the time-frequency plane comes from the SVD entropy, first introduced in [27], and used in the context of time-frequency representations in [18]. The SVD of the time-frequency representation expands it as

$$R_x(t, f) = \sum_{n=1}^{\infty} \sigma_n u_n(t) v_n(f), \quad (8)$$

by solving a system of two coupled integral equations [22], [28]. A Shannon entropy is applied on the singular values $\sigma_n$'s, after normalization:

$$H_V(R_x) = - \sum_n \frac{\sigma_n}{\sum_n \sigma_n} \log_2 \left( \frac{\sigma_n}{\sum_n \sigma_n} \right). \quad (9)$$

### B. Properties of the TF Entropies

The rationale behind the Rényi and Shannon entropies is that for concentrated TFRs of signals made of a small number of components the entropy would attain low values, while for scattered TFRs of more complicated signals it would take larger values. The “counting” property of the Rényi entropy for TFRs is properly described in [21], and it is one of the main reasons for which it is used as a measure of complexity

<footnote n="1">¹This is only an approximation since the compact-supportness of $g$ prevents $G$ to have a compact support.</footnote>

<footnote n="2">²$X(f) = \int x(t)e^{-i2\pi ft} dt$ is the Fourier transform of $x(t)$.</footnote>

<footnote n="3">³The total amount property $\iint R_x(t, f) dt df = 1$ is trivial since it can be always satisfied through a proper normalization.</footnote>
<figure><img src="image_2.png" /><figcaption>Fig. 1. AM-FM signals of different complexities and their spectrograms. Left: pure tone as in (10), with $f_0 = 25$. Middle left: chirp signal as in (12), with $f_0 = 25$ and $k = 10$. Middle right: three pure tones, $f_{0,1} = 25$, $f_{0,2} = 50$, $f_{0,3} = 75$. Right: three chirps. In all four cases, the signals are defined for $0 \le t \le T = 1$ and were generated with a sampling frequency of $f_s = 1000$. The spectrograms were obtained with a Hann window of 200 samples, and for $0 \le f \le 100$.</figcaption></figure>

of the TF plane. Moreover, a study of the Rényi entropy of the spectrogram of a multicomponent signal can be found in [26]. However, it should be remarked that this entropy seems to be rather transparent to the nonstationarity of the signal. Provided the multicomponent signal hypothesis holds, the results are very similar for a monochromatic signal and for a chirp. Let

$$x_1(t) = \cos(2\pi f_0 t), \qquad (10)$$

be a pure tone with a spectrogram

$$S_{x_1}^g(t, f) = |G(f - f_0)|^2, \qquad (11)$$

depicted on Fig. 1 left, and

$$x_2(t) = \cos(2\pi f_0 t + \pi k t^2), \qquad (12)$$

be a chirp signal, where its spectrogram

$$S_{x_1}^g(t, f) \approx |G(f - (f_0 + k t))|^2, \qquad (13)$$

can be appreciated on Fig. 1 middle left. For both signals, the entropy would be

$$H_R^\alpha(S_{x_{1,2}}^g) = \log_2 T + \frac{1}{1-\alpha} \log_2 \left( \frac{\int |G(f)|^{2\alpha} df}{(\int |G(f)|^2 df)^\alpha} \right) \qquad (14)$$

where $\text{supp}\{x_1, x_2\} \subseteq [0, T]$. Table I presents the numerical results for $\alpha = 2$. It can be observed the very similar results for the Rényi entropy of $x_1(t)$ and $x_2(t)$. The estimated number of components (NoC) is [29], [26]

$$N_x^\alpha = 2^{H_R^\alpha(S_x)} - \hat{H}_R^\alpha, \qquad (15)$$

where $\hat{H}_R^\alpha$ is the Rényi entropy of a pure tone (which is the same value as (14)).

On the other hand, the SVD entropy is able to see these differences in frequency modulation. For the spectrogram of a single pure tone, $S_x^g = a^2(t)|G(f - f_0)|^2$, the singular value decomposition contains only one term, with only one non-zero singular value (all the columns are multiple of each other, or exactly equal for $a(t)$ constant). Equation (9) would yield a null value, while for spectrograms of frequency modulated signals $S_x^g \approx a^2(t)|G(f - \phi'(t))|^2$, the SVD entropy attains higher values. In a complementary way to the Rényi entropy,

the SVD entropy is rather transparent to the number of components. For a superposition of $K$ pure tones (with the same amplitude modulation) $S_{x_3}^g = a^2(t) \sum_{k=1}^K |G(f - f_{0,k})|^2$ (Fig. 1 middle right, with $K = 3$), this entropy retrieves again a null value. For a sum of several chirp signals ($x_4(t)$, Fig. 1 right), the entropy will give us a similar value to that of a single one.

Table I summarizes with numerical results the behavior of the Rényi entropy, the number of components based on it (as in (15)) and the SVD entropy of a pure tone, a sum of pure tones, a chirp and a sum of chirps. While the Rényi entropy cannot distinguish between $x_1(t)$ and $x_2(t)$, the SVD entropy is able to do so. The counting property of the Rényi entropy is well illustrated, as well as the “inmunity” of the SVD entropy to the number of components. The complementary nature of these two complexity measures will be exploited for EEG data analysis.

### III. THE NECESSITY OF TIME-VARYING QUANTITIES

We have illustrated the capabilities of the TF entropies to differentiate signals based on the amount of information they carry. While the Rényi entropy focuses on the number of components, the SVD entropy does it on their (non)stationarity. Yet, for very simple signals of different complexities, both might be unable to see a significant difference between them.

Let us consider the signals $y_1(t)$ depicted on Fig. 2 left, and $y_2(t)$ on Fig. 2 right. Although they may look similar, the second one is indeed more complex, since it carries more information (two transients onset against only one). But the fact that both spectrograms have the same integral value makes the Rényi entropy unable to differentiate them. Also, since one TFR can be obtained from the other by simply permutating

<table><caption>TABLE I
RÉNYI ENTROPY, NUMBER OF COMPONENTS (NOC) BASED ON THE RÉNYI ENTROPY AND SVD ENTROPY FOR THE SIGNALS DEPICTED ON FIG. 1.</caption><thead><tr><th></th><th>x<sub>1</sub>(t)</th><th>x<sub>2</sub>(t)</th><th>x<sub>3</sub>(t)</th><th>x<sub>4</sub>(t)</th></tr></thead><tbody><tr><td>Rényi</td><td>13.336</td><td>13.378</td><td>14.921</td><td>14.965</td></tr><tr><td>NoC</td><td>1</td><td>1.029</td><td>3</td><td>3.093</td></tr><tr><td>SVD</td><td>0.0027</td><td>1.796</td><td>0.0361</td><td>1.946</td></tr></tbody></table>
<figure><img src="image_3.png" /><figcaption>Fig. 2. Signals of different complexities, its spectrograms and its time-varying entropies. Left: pure tone plus one transient of half duration. Right: pure tone plus two transients of quarter duration each. In both cases, the signals are defined for $0 \le t \le T = 1$ and were generated with a sampling frequency of $f_s = 1000$. The spectrograms were obtained with a Hann window of 200 samples, and for $0 \le f \le 100$.</figcaption></figure>

columns, the singular values are the same, and so does the SVD entropy. This can be confirmed on Table II.

A time-varying approach for these complexity measures is needed not only to detect when a change occurred, but also to characterize the signals as a whole in a non-local manner. The marginal statistics of these time-varying quantities are useful to this purpose. The short-time Rényi entropy was introduced in [29]. For a slice of width $\Delta t$, the local Rényi entropy is defined as

$$H_R^\alpha(R_x; t) = \frac{1}{1-\alpha} \log_2 \int_{t-\Delta t/2}^{t+\Delta t/2} \int \widetilde{R}_x^\alpha(\tau, f) d\tau df, \quad (16)$$

where $\widetilde{R}_x(t, f) = R_x(t, f) / \int_{t-\Delta t/2}^{t+\Delta t/2} R_x(a, b) dadb$ is the locally normalized time-frequency representation. It should be noted that, in general, $H_R^\alpha(R_x) \neq \int H_R^\alpha(R_x; t) dt$ due to the nonlinearity of the logarithm and to the local normalization. A time-varying estimation of the number of components is constructed as [29]

$$N_x^\alpha(t) = 2^{H_R^\alpha(R_x; t)} - \hat{H}_R^\alpha(t), \quad (17)$$

where $\hat{H}_R^\alpha(t)$ is the time-varying Rényi entropy of a pure tone.

The reader can appreciate the mean, standard deviation and total variation 4 of $H_R^\alpha(S_{x_{1,2}}; t)$ on Table II, along with the ratio between the two signals. Those figures significantly different from 1 were highlighted. While the first two quantities do not present significant difference, the total variation is able to differentiate the two signals, with a higher value for the one that carries more information. The counting property of this entropy can be confirmed on the third row of Fig. 2, where it can be appreciated how $N_x^\alpha(t)$ behaves much as an instantaneous counter.

<table><caption>TABLE II
RÉNYI ENTROPY, NUMBER OF COMPONENTS (NOC) BASED ON THE RÉNYI ENTROPY AND SVD ENTROPY FOR THE SIGNALS DEPICTED ON FIG. 2, ALONG WITH THE MEANS, STANDARD DEVIATIONS AND TOTAL VARIATIONS OF ITS TIME-DEPENDENT VERSIONS. PARAMETERS: $\alpha = 2$, $\Delta t = 101$.</caption><thead><tr><th></th><th>y<sub>1</sub>(t)</th><th>y<sub>2</sub>(t)</th><th>Ratio</th></tr></thead><tbody><tr><td>Rényi H<sub>R</sub><sup>α</sup></td><td>13.97</td><td>14.02</td><td>0.996</td></tr><tr><td>NoC N<sup>α</sup></td><td>1.555</td><td>1.617</td><td>0.961</td></tr><tr><td>SVD H<sub>V</sub></td><td>1.177</td><td>1.295</td><td>0.909</td></tr><tr><td>mean(H<sub>R</sub><sup>α</sup>(t))</td><td>10.66</td><td>10.74</td><td>0.992</td></tr><tr><td>std(H<sub>R</sub><sup>α</sup>(t))</td><td>0.4514</td><td>0.3855</td><td>1.171</td></tr><tr><td>tv(H<sub>R</sub><sup>α</sup>(t))</td><td>2.262</td><td>4.482</td><td><b>0.505</b></td></tr><tr><td>mean(N<sup>α</sup>(t))</td><td>1.558</td><td>1.625</td><td>0.958</td></tr><tr><td>std(N<sup>α</sup>(t))</td><td>0.473</td><td>0.438</td><td>1.079</td></tr><tr><td>tv(N<sup>α</sup>(t))</td><td>2.366</td><td>4.745</td><td><b>0.498</b></td></tr><tr><td>mean(H<sub>V</sub>(t))</td><td>0.3215</td><td>0.5871</td><td><b>0.548</b></td></tr><tr><td>std(H<sub>V</sub>(t))</td><td>0.3233</td><td>0.286</td><td>1.130</td></tr><tr><td>tv(H<sub>V</sub>(t))</td><td>3.679</td><td>6.697</td><td><b>0.549</b></td></tr></tbody></table>

The same approach could be taken with the SVD entropy. We propose here to define a time-varying version of this complexity measure by taking the singular value decomposition of a slice of width $\Delta t$ of the time-frequency representation:

$$R_x(\tau, f) = \sum_{n=1}^{\infty} \hat{\sigma}_{n,t} \hat{u}_{n,t}(\tau) \hat{v}_{n,t}(f), \quad (18)$$

for $t - \Delta t/2 \le \tau \le t + \Delta t/2$. Then, the local SVD entropy is

$$H_V(R_x; t) = - \sum_n \frac{\hat{\sigma}_{n,t}}{\sum_n \hat{\sigma}_{n,t}} \log_2 \left( \frac{\hat{\sigma}_{n,t}}{\sum_n \hat{\sigma}_{n,t}} \right). \quad (19)$$

For those windows where the signal is more stationary, the time-varying SVD entropy would attain low values, while where the instantaneous frequency varies faster, the values would be increased. Specifically, for those windows where the signal has constant frequency we expect a null value; as the window advances into the transition zone the value would increase up to $\log_2(2) = 1$, when the center of the window corresponds with the onset time of one of the transients, to decrease again to zero as the window advances out of the transition. The fourth row of Fig. 2 depicts the values of $H_V(R_x; t)$, confirming our explanation. The difference between the two signals is now evident. Table II presents the mean, standard deviation, and total variation of this quantity for the two signals. The differentiation becomes clear. For the Rényi entropy, a common value of $\alpha = 2$ was used [26]. A window of $\Delta t = 101$ samples was used for all the time-varying quantities.

## IV. REAL EEG DATA FROM EPILEPTIC PATIENTS

The EEG recordings of patients with BECTS are quite remarkable due to the presence of spikes over the centrotemporal regions (unilateral or bilateral) with a biphasic or triphasic appearance and a relatively high amplitude [13]. Studies suggest that cognitive deficits might be correlated with the frequency of spikes [30], [31]. This should prompt the clinician to lower this spike discharge frequency using anti-epileptic drugs (AED). However this issue remains controversial as AED may, by their own, create or aggravate pre-existing

<footnote n="4">⁴For a signal $x(t)$, its total variation is defined as $TV_x = \int |x'(t)| dt$.</footnote>
cognitive dysfunction. A decreasing of the amount of spikes in patients with BECTS after being medicated with sulthiame was reported [32]. A syndrome quite close to BECTS is epilepsy with CSWS, whose patients were reported to diminish the frequency of spikes after medication with levetiracetam [33]. This study also showed that the clinical improvement of some patients was associated to decreased diffusion of the IED over the whole scalp even if the frequency of spikes was not decreased [33]. Moreover, the temporal association between clinical improvement and decrease of spikes is not always strict [14]. Taken together, this highlights that other methods to analyze EEG are suitable. In the past years, a lot of studies attempted to correlate cognitive outcome with the resting state activity in various neurological conditions including epilepsy (for a review, see [34] and [35]).

We will focus our attention on resting state signals, i.e. epochs without IED. Knowing that signals from healthy subjects present larger complexity [36], [5], [37], we wonder if this will be confirmed on resting state signals of patients with BECTS and related conditions before and after medication. Does the complexity of the resting state signals increase after proper medication? If positive, we expect to compute larger values of entropy on these epochs corresponding to recordings after medication. This procedure would allow for a better monitoring of the treatment.

A second question we will address is: Is this difference big enough as to separate the signals into two disjoint clusters? If positive, these time-frequency complexity features are good enough for classification task.

## A. Database

The EEG data of 3 epileptic patients acquired in the Université Libre de Bruxelles, Hôpital Erasme (agreement of local ethical committee number P2015/242) were analyzed. Patients were studied at baseline (T0) and about 4-6 weeks after a change of the AED regimen aimed to reduce IED (T1). Table III shows a summary of clinical data, diagnoses, AED at T0 and T1, and IED quantification on awake and sleep EEG using a spike-wave index (SWI) during sleep and an EEG grade that assesses the diffusion of IED, as previously proposed [33]. It was concluded from the visual analysis and quantification of the SWI during NREM sleep, performed by an experienced neurophysiologist (co-author P.V.B.), that patient BE001 did not respond to the change of AED (a benzodiazepine), and that patients BE003 and BE004 showed impressive EEG improvement after introduction of levetiracetam.

All the subjects were lied down comfortably and brain activity was recorded both during eyes open and eyes closed. The activity was recorded by 256 electrodes (hdEEG) with the Cz electrode as reference. The sampling frequency was 1000 Hz.

## B. Preprocessing and selection of epochs

The preprocessing stage consisted of three steps: band-pass filtering, artifact removal and selection of spike-free epochs. For the first task, we applied a high-order filter between 0.5 Hz and 45 Hz, with a transition bandwidth of 0.22 Hz.

<figure><img src="image_4.png" /><figcaption>Fig. 3. Thirteen regions of interest from the hdEEG (256 channels) recordings. PF: Pre-Frontal. F: Frontal. RF: Right Frontal. LF: Left Frontal. C: Central. RC: Right Central. LF: Left Central. RT: Right Temporal. LT: Left Temporal. P: Parietal. RP: Right Parietal. LP: Left Parietal. O: Occipital.</figcaption></figure>

The removal of artifacts was performed through Independent Component Analysis (ICA) [38] discarding those sources identified as artifacts before reconstruction. For the selection of epochs, a trained neurophysiologist visually isolated the spikes in order to obtain spike-free epochs of 1 second of duration. These epochs are the signals to be analyzed, playing the role of $x(t)$ of the previous sections. The choice of the length of the epochs was conditioned by the fact that one patient presented only 12 non-consecutive seconds of spike-free signals at T0. We were forced to segment this data into 12 epochs of 1 second, and proceed in the same way for the other two patients (although with more epochs). Shorter epochs would be affected by border effects. Therefore, an epoch of one second is a good trade-off between border effects and the difficulty of having longer spike-free segments.

## C. Features

The features to be used will be: total number of components based on Rényi entropy (to be referred as NoC in the figures), mean of time-varying number of components (MN), standard deviation of time-varying number of components (SN), total SVD entropy (VT), and mean of time-varying SVD entropy (MV). For every one of the epochs $e, e = 1...E$, we compute the five mentioned features, $C^p, p = 1...5$, for every electrode. Then, we define the features for a whole region $A$ as the mean of the corresponding feature for that epoch among the electrodes belonging to that specific region (see Fig. 3 for the regions and electrodes):

$$C_{e}^{A,p} = \frac{1}{\#A} \sum_{i \in A} C_{i,e}^{p} \quad (20)$$

where $\#A$ is the cardinality of the set $A$.
<caption>TABLE III</caption>

SUMMARY OF THE DATABASE. M: MALE, F: FEMALE, LTG: LAMOTRIGINE, ETS: ETHOSUXIMIDE, CLB: CLOBAZAM, LEV: LEVETIRACETAM, W: WAKE, S: NREM SLEEP. SWI CALCULATIONS AND EEG GRADES WERE PERFORMED AS DETAILED IN [33].

<table><thead><tr><th>Patient (number, age in years, gender)</th><th>Diagnosis</th><th>Localization of IED according to the 10-20 system</th><th>Treatment at T0</th><th>Treatment at T1</th><th>SWI at T0 and T1</th><th>EEG grade at T0</th><th>EEG grade at T1</th></tr></thead><tbody><tr><td>BE001, 10, M</td><td>Epilepsy w/ CSWS</td><td>T5</td><td>LTG + ETS</td><td>LTG + ETS + CLB</td><td>75% T0, 67% T1</td><td>3 (W and S)</td><td>3 (W and S)</td></tr><tr><td>BE003, 8, F</td><td>Atypical BECTS</td><td>C3</td><td>VPA + LTG</td><td>VPA + LEV</td><td>75% T0, 50% T1</td><td>3 (W and S)</td><td>0 W, 1 S</td></tr><tr><td>BE004, 9, M</td><td>BECTS</td><td>C3</td><td>None</td><td>LEV</td><td>60% T0, 70% T1</td><td>3 (W and S)</td><td>1 (W and S)</td></tr></tbody></table>

## D. Results and discussion

We begin this subsection analyzing the results for patient BE004. We processed $E = 30$ epochs of 1 second of duration during eyes open for both baseline (T0) and after six weeks on levetiracetam (T1). The values for the five features for the thirteen regions (region-wise computed as in (20)) can be appreciated on boxplots in Fig. 4. It can be seen how, in general, the features attain higher values for those epochs corresponding to T1. In order to objectively measure this increase, we performed a Friedman test [39] for every feature and for every region, and mark with an asterisk ('*') those with $p < 0.05$. The increasing of the features is observed on most of the regions, especially in the frontal area (regions prefrontal, frontal, and right and left frontal) with 12 out of 20 features experiencing it; and in the centrotemporal area (regions central, right and left central, and right and left temporal) with 21 out of 25 features with a significant increase. (We also test the features for a decreasing complexity on T1 with negative results). The fact that the major increasing is observed on the centrotemporal area is relevant since studies have shown that these regions are the sources of IED in BECTS. These results shed light on our first question: the complexity on the resting state signals does increase after proper medication.

In order to evaluate the capability of these features to perform a classification task, we performed a Principal Component Analysis (PCA) [40] for every feature on every region. Then, the first principal component (a mere linear combination of the five features) was used as the sole feature for binary classification. The ROC curves obtained for different values of the discrimination threshold are presented on Fig. 5, along with the areas under the curves (AUC). The better results again are on the centrotemporal area, with an AUC higher than 0.93 for left central region, i.e. the region of the brain where IED were localized in this patient. Now we are able to answer our second question: when used combined, these time-varying time-frequency entropy measures are able to perform a classification task with good results when analyzing EEG data from epileptic patients.

For patient BE003 we were able to isolate only $E = 12$ epochs without any spike because of the large amount of spikes present on the T0 recording. The results are summarized on Table IV. We mark with asterisks ('*') those features that present a significant difference ($p < 0.05$, Friedman test). As with the previous example, the results are good enough as to evidence the difference between the T0 recording and the T1 (six weeks on levetiracetam). We observed an even performance across regions. We also present the AUCs, with

<caption>TABLE IV</caption>

SUMMARY OF THE RESULTS FOR THE PATIENT BE003 (T0 vs. T1). PARAMETERS: HANN WINDOW OF 200 SAMPLES FOR STFT, $\alpha = 2$, $\Delta t = 21$. SIGNIFICATIVE DIFFERENCES ARE MARKED WITH '*'. $E = 12$ EPOCHS.

<table><thead><tr><th>Region</th><th>NoC</th><th>VT</th><th>MN</th><th>SN</th><th>MV</th><th>AUC</th></tr></thead><tbody><tr><td>Pre-Frontal</td><td>*</td><td>*</td><td>*</td><td></td><td>*</td><td>0.972</td></tr><tr><td>Frontal</td><td></td><td>*</td><td>*</td><td></td><td>*</td><td>0.917</td></tr><tr><td>Right Frontal</td><td>*</td><td>*</td><td>*</td><td></td><td>*</td><td>0.938</td></tr><tr><td>Left Frontal</td><td>*</td><td>*</td><td>*</td><td></td><td>*</td><td>0.993</td></tr><tr><td>Central</td><td>*</td><td>*</td><td>*</td><td></td><td>*</td><td>1.000</td></tr><tr><td>Right Central</td><td></td><td>*</td><td>*</td><td></td><td>*</td><td>0.944</td></tr><tr><td>Left Central</td><td>*</td><td>*</td><td>*</td><td>*</td><td>*</td><td>0.979</td></tr><tr><td>Right Temporal</td><td></td><td>*</td><td>*</td><td></td><td>*</td><td>0.979</td></tr><tr><td>Left Temporal</td><td>*</td><td>*</td><td>*</td><td>*</td><td>*</td><td>0.993</td></tr><tr><td>Parietal</td><td>*</td><td>*</td><td>*</td><td></td><td>*</td><td>1.000</td></tr><tr><td>Right Parietal</td><td>*</td><td>*</td><td>*</td><td></td><td>*</td><td>0.986</td></tr><tr><td>Left Parietal</td><td>*</td><td>*</td><td>*</td><td>*</td><td>*</td><td>0.972</td></tr><tr><td>Occipital</td><td>*</td><td>*</td><td>*</td><td></td><td>*</td><td>1.000</td></tr></tbody></table>

better results on the centrotemporal area, with an AUC up to 1 for the central region. These remarkable results must be considered carefully since they might be conditioned by the small sample.

The results for patient BE001 are presented in a summarized manner on Table V. Here we analyzed 30 epochs. The results are, in general, worse than those of the other two patients: less features present significant differences and the AUCs have lower values. This is the patient that did not present an improvement of the EEG. This could suggest that the complexity measures here presented are more sensitive than visual analysis of EEG to appreciate changes related to drugs.

All the records were analyzed using a Hann window of 200 samples for the STFT, a value of $\alpha = 2$ for the Rényi entropy, and $\Delta t = 21$ for the time-varying entropy measures. In all cases, we only considered eyes open epochs because of two reasons: the first one is that in this state there are less IED in some patients, and the second one is because it is the highest complexity state (it is known that the stronger alpha rhythm during eyes closed drives the complexity down).

The global scheme here applied on high density EEG recordings might also be applied on other types of neurophysiological signals, such as regular EEG or magnetoencephalography (MEG). As long as there is a difference in complexity between two states or populations, the procedure proposed here may reveal it. Here, besides the global entropies, we used marginal statistics of their time-varying versions, but other features derived from the same complexity measures might be used as well.
<figure><img src="image_5.png" /><figcaption>Fig. 4. Results for the 13 regions for patient BE004. The baseline records (T0) are shown in blue, while the records after six weeks on leveteracitam (T1) are shown in red. Those features that present significant differences (*p* < 0.05 in a Friedman test) are indicated with a star ('*'). NoC: Number of Components, according to (15). VT: total SVD entropy, (9). MN: mean of the time-varying number of components, (17). SN: standard deviation of the time-varying number of components. MV: mean of the time-varying SVD entropy, (19). Parameters: Hann window of 200 samples. Δ*t* = 21 samples. α = 2.</figcaption></figure>

<figure><img src="image_6.png" /><figcaption>Fig. 5. Results for the 13 regions for patient BE004. The ROC curves were performed on the first principal component obtained via PCA on the five features. The horizontal axes correspond to 1-specificity, while the vertical axes correspond to sensitivity. The areas under the curves are also shown.</figcaption></figure>

V. CONCLUSIONS

The entropies based on time-frequency representations have
been largely used on real world applications. In this work,
we review them and introduced a new time-varying quantity:
the short-time SVD entropy. We applied the global time-
frequency entropies along with statistics from their time-
varying counterparts to a particular problem: the analysis of
resting state EEG recordings from epileptic patients before and
after proper medication.

The results show an increase in the complexity for most
of the regions of the brain. This increase may be used, along

with the clinical exam and the decreasing in the amount of
spikes, to better monitoring the treatment of the patients. The
complexity features also show that, when combined, they are
able to perform classification between the state before and
after proper medication. We made no use of the preestablished
EEG frequency bands, which may sometimes slightly differ
between authors, but considered the whole frequency content
of the signal instead, with no a priori band separation.

The complexity measures presented here can be applied
to a wider range of problems. For instance, in epilepsy,
the time-varying versions are suitable for the prediction of
<caption>TABLE V</caption>

SUMMARY OF THE RESULTS FOR THE PATIENT BE001 (T0 vs. T1).
PARAMETERS: HANN WINDOW OF 200 SAMPLES FOR STFT, α = 2,
Δt = 21. SIGNIFICATIVE DIFFERENCES ARE MARKED WITH '*'. E = 30
EPOCHS.

<table><thead><tr><th>Region</th><th>NoC</th><th>VT</th><th>MN</th><th>SN</th><th>MV</th><th>AUC</th></tr></thead><tbody><tr><td>Pre-Frontal</td><td>*</td><td>*</td><td>*</td><td>*</td><td>*</td><td>0.711</td></tr><tr><td>Frontal</td><td>*</td><td>*</td><td>*</td><td>*</td><td>*</td><td>0.716</td></tr><tr><td>Right Frontal</td><td></td><td></td><td>*</td><td></td><td></td><td>0.679</td></tr><tr><td>Left Frontal</td><td></td><td></td><td>*</td><td>*</td><td></td><td>0.862</td></tr><tr><td>Central</td><td></td><td></td><td></td><td>*</td><td></td><td>0.604</td></tr><tr><td>Right Central</td><td></td><td></td><td></td><td>*</td><td></td><td>0.590</td></tr><tr><td>Left Central</td><td>*</td><td>*</td><td>*</td><td>*</td><td></td><td>0.793</td></tr><tr><td>Right Temporal</td><td></td><td>*</td><td>*</td><td>*</td><td>*</td><td>0.739</td></tr><tr><td>Left Temporal</td><td>*</td><td>*</td><td>*</td><td>*</td><td>*</td><td>0.933</td></tr><tr><td>Parietal</td><td>*</td><td>*</td><td>*</td><td>*</td><td>*</td><td>0.779</td></tr><tr><td>Right Parietal</td><td></td><td>*</td><td>*</td><td>*</td><td></td><td>0.732</td></tr><tr><td>Left Parietal</td><td>*</td><td>*</td><td>*</td><td>*</td><td>*</td><td>0.882</td></tr><tr><td>Occipital</td><td>*</td><td>*</td><td>*</td><td>*</td><td>*</td><td>0.858</td></tr></tbody></table>

epileptic seizures. A deeper study of the regional changes of the complexities should shed light on the localization of epileptic foci.

A weakness of this study is that data of only 3 patients were analyzed. Our preliminary results will be expanded in a larger cohort of patients.

ACKNOWLEDGMENT

This work was supported by the European Commission, Project FP7 DESIRE (Health-F2-602531-2013). M. A. Colominas and M. El Sayed Hussein Jomaa are both full-time granted by the DESIRE project.

REFERENCES

[1] E. Niedermeyer and F. L. da Silva, *Electroencephalography: basic principles, clinical applications, and related fields*. Lippincott Williams & Wilkins, 2005.

[2] B. S. Chang and D. H. Lowenstein, “Epilepsy,” *New Engl. J. Med.*, vol. 349, no. 13, pp. 1257–1266, 2003.

[3] M. V. Sysoeva, et al., “Application of adaptive nonlinear Granger causality: Disclosing network changes before and after absence seizure onset in a genetic rat model,” *J. Neurosci. Methods*, vol. 226, pp. 33–41, 2014.

[4] V. A. Maksimenko, et al., “Absence seizure control by a brain computer interface,” *Sci. Reports*, vol. 7, 2017.

[5] L. D. Iasemidis, “Epileptic seizure prediction and control,” *IEEE Trans. Biomed. Eng.*, vol. 50, no. 5, pp. 549–558, 2003.

[6] A. Humeau-Heurtier, “The multiscale entropy algorithm and its variants: a review,” *Entropy*, vol. 17, no. 5, pp. 3110–3123, 2015.

[7] A. Humeau-Heurtier et al., “Refined multiscale Hilbert–Huang spectral entropy and its application to central and peripheral cardiovascular data,” *IEEE Trans. Biomed. Eng.*, vol. 63, no. 11, pp. 2405–2415, 2016.

[8] H. Adeli et al., “A wavelet-chaos methodology for analysis of EEGs and EEG subbands to detect seizure and epilepsy,” *IEEE Trans. Biomed. Eng.*, vol. 54, no. 2, pp. 205–211, 2007.

[9] V. Srinivasan et al., “Approximate entropy-based epileptic EEG detection using artificial neural networks,” *IEEE Trans. Inf. Technol. Biomed.*, vol. 11, no. 3, pp. 288–295, 2007.

[10] X. Kang et al., “Multiscale entropy analysis of EEG for assessment of post-cardiac arrest neurological recovery under hypothermia in rats,” *IEEE Trans. Biomed. Eng.*, vol. 56, no. 4, pp. 1023–1031, 2009.

[11] H. Ocak, “Automatic detection of epileptic seizures in EEG using discrete wavelet transform and approximate entropy,” *Expert Syst. Appl.*, vol. 36, no. 2, pp. 2027–2036, 2009.

[12] U. Melia et al., “Measuring instantaneous and spectral information entropies by shannon entropy of Choi-Williams distribution in the context of electroencephalography,” *Entropy*, vol. 16, no. 5, pp. 2530–2548, 2014.

[13] U. Kramer, “Atypical presentations of benign childhood epilepsy with centrotemporal spikes: a review,” *J. Child Neurol.*, vol. 23, no. 7, pp. 785–790, 2008.

[14] P. Van Bogaert, “Physiopathology of atypical evolutions of idiopathic focal epilepsies in childhood,” *J. Pediat. Epilepsy*, vol. 5, no. 03, pp. 133–138, 2016.

[15] S. Mallat, *A wavelet tour of signal processing: the sparse way*. Academic press, 2009.

[16] H.-T. Wu et al., “Using synchrosqueezing transform to discover breathing dynamics from ECG signals,” *Appl. Comput. Harmon. Anal.*, vol. 36, no. 2, pp. 354–359, 2014.

[17] X. Zhang et al., “A new approach for crude oil price analysis based on empirical mode decomposition,” *Energ. Econ.*, vol. 30, no. 3, pp. 905–918, 2008.

[18] B. Boashash et al., “Time-frequency processing of nonstationary signals: advanced TFD design to aid diagnosis with highlights from medical applications,” *IEEE Signal Process. Mag.*, vol. 30, no. 6, pp. 108–119, 2013.

[19] J. Lerga et al., “Algorithm based on the short-term Rényi entropy and IF estimation for noisy EEG signals analysis,” *Comput. Biol. Med.*, vol. 80, pp. 1–13, 2017.

[20] W. J. Williams et al., “Uncertainty, information, and time-frequency distributions,” in *Proc. SPIE Int. Soc. Opt. Eng.*, 1991, pp. 144–156.

[21] R. G. Baraniuk et al., “Measuring time-frequency information content using the Rényi entropies,” *IEEE Trans. Inf. Theory*, vol. 47, no. 4, pp. 1391–1409, 2001.

[22] L. Cohen, *Time-frequency analysis*. Prentice hall, 1995, vol. 1, no. 995,299.

[23] P. Flandrin, *Time-frequency/time-scale analysis*. Academic press, 1999, vol. 10.

[24] C. E. Shannon, “A mathematical theory of communication – Part I,” *Bell Syst. Tech. J.*, vol. 27, pp. 379–423, 1948.

[25] A. Rényi, “On measures of entropy and information,” in *Proc. of the 4th Berkeley Symp. Mathematical Statistics and Probability*, vol. 1, 1961, pp. 547–561.

[26] N. Saulig et al., “Instantaneous counting of components in nonstationary signals,” in *Proc. 21st Eur. Signal Process. Conf. (EUSIPCO)*, 2013, pp. 1–5.

[27] O. Alter et al., “Singular value decomposition for genome-wide expression data processing and modeling,” *Proc. of the National Academy of Sciences*, vol. 97, no. 18, pp. 10101–10106, 2000.

[28] G. W. Stewart, “Fredholm, Hilbert, Schmidt - Three fundamental papers on integral equations translated with commentary by G. W. Stewart,” 2011.

[29] V. Sucic et al., “Estimating the number of components of a multicomponent nonstationary signal using the short-term time-frequency Rényi entropy,” *EURASIP J. Adv. Signal Process.*, vol. 2011, no. 1, p. 125, 2011.

[30] J. Weglage et al., “Neuropsychological, intellectual, and behavioral findings in patients with centrotemporal spikes with and without seizures,” *Dev. Med. Child Neurol.*, vol. 39, no. 10, pp. 646–651, 1997.

[31] R. Massa et al., “EEG criteria predictive of complicated evolution in idiopathic rolandic epilepsy,” *Neurology*, vol. 57, no. 6, pp. 1071–1079, 2001.

[32] T. Bast et al., “The influence of sulthiame on EEG in children with benign childhood epilepsy with centrotemporal spikes (BECTS),” *Epilepsia*, vol. 44, no. 2, pp. 215–220, 2003.

[33] A. Aeby et al., “Levetiracetam efficacy in epileptic syndromes with continuous spikes and waves during slow sleep: experience in 12 cases,” *Epilepsia*, vol. 46, no. 12, pp. 1937–1942, 2005.

[34] C. Rosazza and L. Minati, “Resting-state brain networks: literature review and clinical applications,” *Neurol. Sci.*, vol. 32, no. 5, pp. 773–785, 2011.

[35] D. J. Englot et al., “Regional and global connectivity disturbances in focal epilepsy, related neurocognitive sequelae, and potential mechanistic underpinnings,” *Epilepsia*, vol. 57, no. 10, pp. 1546–1557, 2016.

[36] X.-S. Zhang et al., “EEG complexity as a measure of depth of anesthesia for patients,” *IEEE Trans. Biomed. Eng.*, vol. 48, no. 12, pp. 1424–1433, 2001.

[37] W. Bosl et al., “EEG complexity as a biomarker for autism spectrum disorder risk,” *BMC Med.*, vol. 9, no. 1, p. 18, 2011.

[38] A. Hyvärinen et al., *Independent component analysis*. John Wiley & Sons, 2004, vol. 46.

[39] W. J. Conover and R. L. Iman, “Rank transformations as a bridge between parametric and nonparametric statistics,” *Am. Stat.*, vol. 35, no. 3, pp. 124–129, 1981.

[40] I. T. Jolliffe, “Principal component analysis and factor analysis,” in *Principal component analysis*. Springer, 1986, pp. 115–128.