Towards Operational Definition of Postictal Stage : Spectral Entropy as a Marker of Seizure Ending

The postictal period is characterized by several neurological alterations, but its exact limits are clinically or even electroencephalographically hard to determine in most cases. We aim to provide quantitative functions or conditions with a clearly distinguishable behavior during the ictal-postictal transition. Spectral methods were used to analyze foramen ovale electrodes (FOE) recordings during the ictal/postictal transition in 31 seizures of 15 patients with strictly unilateral drug resistant temporal lobe epilepsy. In particular, density of links, spectral entropy, and relative spectral power were analyzed. Partial simple seizures are accompanied by an ipsilateral increase in the relative Delta power and a decrease in synchronization in a 66% and 91% of the cases, respectively, after seizures offset. Complex partial seizures showed a decrease in the spectral entropy in 94% of cases, both ipsilateral and contralateral sides (100% and 73%, respectively) mainly due to an increase of relative Delta activity. Seizure offset is defined as the moment at which the “seizure termination mechanisms” actually end, which is quantified in the spectral entropy value. We propose as a definition for the postictal start the time when the ipsilateral SE reaches the first global minimum.


Introduction
Epilepsy is a chronic disease affecting more than 50 million people around the world.It is characterized by the recurring appearance of unpredictable and unprovoked seizures caused by a sudden disturbance of the normal electrical activity of the brain, with potential harmful consequences for the patient.Anticipating the moment of the seizure onset could not only avoid potential physical damage for the epilepsy patient but also would allow initiating therapeutic actions to minimize the consequences of this traumatic episode.In view of that, much effort has been devoted to predict the exact moment of seizure onset [1][2][3][4].Moreover, development of automatic algorithms capable of identifying the seizure onset time have received attention in the last few years [5] because of the importance, among other things, in devising seizure-triggered actions without any physician supervision.On the contrary, automatic detection of a seizure's termination has received much less attention despite its clinical importance.For instance, detection of seizure termination could signal the presence of a status epilepticus, a fatally threatening condition.If a seizure offset alert does not appear after a reasonable time, the existence of a status epilepticus should be seriously considered and an immediate action must be taken.Only a few recent works [6,7] have addressed this important issue.The work of Stamoulis et al. [7] has also used information theoretic measures on scalp EEG recordings belonging to the ictal/postictal transition, but focused mainly on the role played by high frequency oscillations (HFO).
Seizure offset is followed by the postictal period, one of the four stages in which the epilepsy is divided: the preictal stage, just before the seizure onset; the ictal, or seizure itself; the postictal just after the seizure offset; and the interictal one, the period in between seizures.According to the International League Against Epilepsy (ILAE) the postictal state is a transient clinical abnormality of the central nervous system function that appears, or becomes accentuated, when the clinical signs of the ictus have ended [8].In this description, only a clinical definition is proposed which certainly requires the assessment of an expert physician.Moreover, postictal scalp EEG analysis in partial (focal) epilepsies did not show a clear pattern of electroencephalografical activity after the seizure ends [9,10].Particularly, partial seizures were not associated with detectable changes in scalp EEG in up to 80% of cases.Perhaps the most common observation is related with a postictal depression associated with attenuation and slowing of rhythms, mainly in the Delta band [11].Also, the increased spike counts after seizure offset occurs in 25% of seizures [12].Most of the aforementioned findings are, however, based in the visual analysis of raw EEG which certainly does not seem to fit into a quantitative scheme.Much of those postictal findings have also been employed for the purpose of seizure lateralization although with controversial conclusions [13][14][15][16].
In searching for an appropriate measure which allows quantitative determination of the ictal termination; two issues should be taken into account.On the one hand, findings on brain electrical activity have been described mainly in the frequency domain.Since the invention of the EEG by Hans Berger, frequency bands have been extensively used to describe and characterize the epilepsy dynamics.On the other side, the intrinsic complexity and apparently random behavior exhibited by the EEG recordings, especially during the preictal/ictal/postictal transitions, require the use of measures capable of quantifying this underlying complexity, and thus, information theoretic measures seem to be most apt.By combining these two issues, the spectral entropy arises as a natural choice of a quantitative measure capable of bring new information during the ictal/postictal transition.Indeed, it seems to be a more appropriate usage than any other information theoretic measure, as for instance the Shannon Entropy, Renyi Entropy, the Approximate Entropy, etc.
We aim at constructing a measurable definition of the seizure end/postictal start, by using spectral functions over foramen ovale electrodes (FOE) recordings.As a byproduct, we are able to clearly differentiate the postictal activity depending on whether a partial simple (PS) or a complex partial (CP) seizure has occurred, as the findings presented here will demonstrate.

Neurophysiological Data
In this study, we analyzed 31 seizures (12 PS and 19 CP) from 15 patients (nine women; mean age 37.4 ± 9.5 years) (Table 1) with strictly unilateral drug resistant temporal lobe epilepsy (TLE) who underwent semi-invasive presurgical evaluation with FOE under video-EEG monitoring.The selected patients accomplished the inclusion criteria of being seizure-free two years after the resective surgery (Engel I) [17].The patients were also presurgically evaluated accordingly with the Hospital de la Princesa's protocol, as previously published elsewhere [18,19].This research was approved by the Ethics Committee of the Hospital de la Princesa.Signed written informed consent was obtained from all patients included in the present study.In each patient, six-contact platinum FOEs with 1-cm center-to-center spacing (AD-Tech, Racine, WI, USA) were inserted bilaterally under general anesthesia [20][21][22].Correct implantation was assured using fluoroscopic imaging in the operating room.The overall procedure of FOE surgical implantation as well as typical scalp + FOE recordings may be visualized in reference [22].Table 1 includes clinical information, presurgical studies evaluations, and overall diagnosis.EEG recordings were sampled at 500 Hz, (NeuroWorks, XLTEK ® , Oakville, ON, Canada), exported to ASCII at 200 Hz, band-pass filtered in the range 0.5-60 Hz and notch filtered at 50 Hz (line voltage).Scalp EEG signals are commonly contaminated by electrical (line frequency interference, light fluorescence, etc.), physiological (muscle and cardiac activity, eyes blinking, etc.), and electrode displacement artifacts.Although this is of serious concern during online analysis [23,24], the situation nonetheless can be handled in several ways when a retrospective analysis is conducted.One way is to eliminate the presence of scalp-EEG artifacts by using a selected artifacts removal algorithm [25].Another way, the one implemented here, is to select by visual inspection those recordings free of artifacts, suitable for numerical analysis, as we have done in previous works [22,26].This election portrays the benefits of using the data, particularly FOE recordings barely affected by muscle artifacts, as they are recorded without introducing extra manipulations.Post-processing was done using R packages.All derivations were referenced to scalp electrodes (Fz + Cz + Pz)/3.Epochs of approximately 30 min containing one seizure suitable for numerical analysis were visually selected and divided in consecutive intervals of five-second (1000 data points at 200 Hz).These sliding non-overlapping temporal windows of 5 s were selected as a trade-off between long enough records that can be considered, at least, weakly stationary [27] and short enough to obtain a dynamical picture of the entire spectral and network evolution.Seizure onset and termination were always determined in an independent way by an expert neurophysiologist (LV-Z) using both clinical and standard EEG analysis criteria.Data came from both PS and CP partial (focal) seizures.In temporal lobe epilepsy, partial seizures originate in a small area (focus) of the temporal lobe and the main (but not the only) difference between PS and CP is that CP involves alteration of consciousness, which is not affected during a PS seizure.

Synchronization and Spectral Analyses
Levels of synchronization between mesial sides of the temporal lobes were estimated by calculating the network density of lines (DoL).In each temporal window of five seconds, a correlation matrix was calculated between every pair of the 12 FOE recordings.By eliminating correlations below a certain threshold (see below), a mesial network was constructed in such a way that the areas located below the FOE were considered linked, functionally connected, if and only if the absolute value of the calculated correlation was above the predefined threshold.Note that for the particular case of a threshold equal to zero, a fully connected network-all nodes connected with each other-is obtained.Once the network was constructed, the DoL was calculated.DoL is usually defined as the ratio of the actual number of links in the network, to the number of all possible links.In this way, a highly synchronized network with many links between the nodes has a DoL very close to 1.As an estimation of the network links, that is, the functional connectivity between cortical areas, the absolute value of the Pearson correlation coefficient between every pair of electrode recordings i and j was calculated [26,28,29].A threshold in the correlation was used with the objective to eliminate those correlations not representative of a truly underlying functional connectivity.Thus, a link between nodes i and j was exclusively considered if the absolute value of the Pearson correlation between these nodes was greater than 0.5.Others thresholds in the range 0.2-0.8 were also employed with similar results, as in [26].Because the Pearson correlation is a linear measure, a nonlinear correlation measure was also calculated, as a test of consistency.The phase synchronization [26,30] was employed as a measure of nonlinear synchronization with similar results to the Pearson correlation ones.Previous works [26,28] have shown that the use of DoL in a simple network, as the one built upon FOE electrode recordings, is equivalent to the use of synchronization levels, but of a much simpler interpretation.
The spectral entropy (SE), which is nothing but the Shannon entropy of the full signal power spectrum, was calculated as an indicator of the signal spectral content.The SE was calculated in the following way.Firstly, the normalized power spectrum nPS i was estimated for each electrode's time series where PS i (f l ) is the power spectrum of x i and the sum runs all over the spectrum of frequencies f l .Secondly, the Shannon entropy of this "probability distribution" was calculated where SE i is the spectral entropy for channel i.The average of the SE for a set of electrodes, i.e., the whole network electrodes or a particular region, was finally calculated as where N electrodes is the total number of electrodes considered, e.g., six for each mesial side.The meaning of the SE is easy to understand when one realizes that is in fact the entropy of the frequency content of the signal.A decrease in the SE should be interpreted as a decrease in the number of relevant frequencies present in the time series power spectrum, in other words, in a more organized or simple distribution.

Statistical Analyses
With the aim to use a common metric to evaluate changes in different types of measures-DoL, spectral power, and SE-the standardized mean difference (SMD) was calculated.

SMD =
preictal measure − postictal measure pooled standard deviation This index is most apt to evaluate size effects when comparing changes in different types of measures.To calculate the SMD accordingly with Equation ( 5), preictal measures were evaluated in an epoch length of 30 s, located approximately five minutes before seizure onset.Postictal values were calculated for several consecutive 30-second epochs starting just after seizure termination and ending approximately 15 min after that.For the purpose of the analysis, only those 30-second windows after seizures offset were considered.In this way, SMD values were obtained for; 30 s after seizure offset, i.e., the first SMD value; 1 min after seizure offset, i.e., the second SMD value; 90 s after seizure offset, i.e., the third SMD value, etc. Taking into account that time was discretized in five-second windows, the evaluation of the SMD was performed using six values in each SMD 30-second window.Since positive SMD imply decreased values of the evaluated measure, SMD values were multiplied by (−1) for a better visualization.
The whole procedure is depicted in Figure 1.In the first step (upper panel of Figure 1), we transform the raw EEG signals, sampled at 200 Hz, in a new set of time series including spectral and network measures.This is done by calculating them inside every consecutive window of five seconds (1000 data points, black rectangles in Figure 1).In each and every window, the relative power of each band (Equation ( 1)) and the SE (Equation ( 3)) was calculated.Also, in each and every window the correlation matrix was calculated and a network of interaction was constructed, as already explained, and the density of lines was finally calculated.In this way, we obtain a new set of time series, sampled now at five seconds, with the information of the spectral and DoL dynamics.The second step (lower panel of Figure 1) involves the evaluation of changes, by using the SMD index, of these measures.This is done by comparing their values during the preictal stage with the postictal one.
To do this, we used epochs of 30 s (red rectangles in Figure 1) which comprise six values of the calculated measures (sampled at five seconds).Thus, we calculated the SMD index by using epoch of 30-second located on the preictal stage and 15 different epochs of 30 s on the postictal period.Note that changes in the measures during the ictal/postictal transition are compared against a period of 30 s located five minutes prior to the seizure onset.Although there is no accepted definition of the preictal period, that is, when it actually begins, we will say that it is located in the preictal period, nonetheless.When longer recordings were available, no significant differences were found whether the preictal period was located 5 or 60 min before the seizure onset.The constraints imposed by the available recordings, encompassing only 10 min of data before the seizure onset, led to the five minute period.In any case, using this period would facilitate the construction of an automatic seizure offset system alert.
The whole procedure is depicted in Figure 1.In the first step (upper panel of Figure 1), we transform the raw EEG signals, sampled at 200 Hz, in a new set of time series including spectral and network measures.This is done by calculating them inside every consecutive window of five seconds (1000 data points, black rectangles in Figure 1).In each and every window, the relative power of each band (Equation ( 1)) and the SE (Equation ( 3)) was calculated.Also, in each and every window the correlation matrix was calculated and a network of interaction was constructed, as already explained, and the density of lines was finally calculated.In this way, we obtain a new set of time series, sampled now at five seconds, with the information of the spectral and DoL dynamics.The second step (lower panel of Figure 1) involves the evaluation of changes, by using the SMD index, of these measures.This is done by comparing their values during the preictal stage with the postictal one.To do this, we used epochs of 30 s (red rectangles in Figure 1) which comprise six values of the calculated measures (sampled at five seconds).Thus, we calculated the SMD index by using epoch of 30-second located on the preictal stage and 15 different epochs of 30 s on the postictal period.Note that changes in the measures during the ictal/postictal transition are compared against a period of 30 s located five minutes prior to the seizure onset.Although there is no accepted definition of the preictal period, that is, when it actually begins, we will say that it is located in the preictal period, nonetheless.When longer recordings were available, no significant differences were found whether the preictal period was located 5 or 60 min before the seizure onset.The constraints imposed by the available recordings, encompassing only 10 min of data before the seizure onset, led to the five minute period.In any case, using this period would facilitate the construction of an automatic seizure offset system alert.For each measure (SE, etc.) time series, an evaluation of its changes is performed by using the SMD index (Equation ( 5)), using six values of the measure in a preictal window of 30 s (red rectangles), and several 30-second windows located at different positions during the postictal stage.
Lastly, inferential statistical analyses were performed using generalized estimating equation models.In all cases, if a statistically significant interaction was found, additional pairwise comparisons (Bonferroni sequential adjustment) were made and the method of estimation was the maximum likelihood.The significance of the effects was determined by the Wald χ2 statistic or by Z-score, when appropriate.Data are presented as mean ± standard error.It is worthwhile to Lastly, inferential statistical analyses were performed using generalized estimating equation models.In all cases, if a statistically significant interaction was found, additional pairwise comparisons (Bonferroni sequential adjustment) were made and the method of estimation was the maximum likelihood.The significance of the effects was determined by the Wald χ2 statistic or by Z-score, when appropriate.Data are presented as mean ± standard error.It is worthwhile to remember here that statistical analyzes were always performed over the SMD outcomes, not over the measures (power spectra, DoL or SE) themselves.Thus, reported statistical differences (see below) refer always to relative changes in these measures.
For a better understanding, we detailed the analyses in a single patient with CP seizures (patient G in Table 1).A 12-node network (six left FOE and six right FOE) was constructed upon the correlation matrix obtained from the FOE recordings, in each five-second temporal window.The DoL of these matrices was calculated thereafter.Figure 2A represents this calculation for every five-second temporal window, starting 15 min before seizure onset (black vertical solid line) and ending 15 min after seizure onset.In this figure we also plotted thin dashed vertical lines in those temporal windows with high excitability [26].These lines give a rough idea of the seizure extent.A significant increase in the DoL observed immediately after seizure offset is sustained during several of minutes well into the postictal period.
In an independent way, the SE was calculated for each of the two regions covered by FOE, in every five-second temporal window.Figure 2B shows the results of these calculations for each set of FOE (upper two panels) and a global average which includes all of the electrodes (bottom panel).In this case, a steady decrease just after seizure onset in the SE was readily observed lasting approximately the whole seizure extent.The reached lowest SE levels were maintained after seizure offset, that is, during the postictal stage.As can be observed, the maximal decrease was in the mesial ipsilateral side (right FOE).
Entropy 2017, 19, 81 7 of 15 remember here that statistical analyzes were always performed over the SMD outcomes, not over the measures (power spectra, DoL or SE) themselves.Thus, reported statistical differences (see below) refer always to relative changes in these measures.
For a better understanding, we detailed the analyses in a single patient with CP seizures (patient G in Table 1).A 12-node network (six left FOE and six right FOE) was constructed upon the correlation matrix obtained from the FOE recordings, in each five-second temporal window.The DoL of these matrices was calculated thereafter.Figure 2A represents this calculation for every five-second temporal window, starting 15 min before seizure onset (black vertical solid line) and ending 15 min after seizure onset.In this figure we also plotted thin dashed vertical lines in those temporal windows with high excitability [26].These lines give a rough idea of the seizure extent.A significant increase in the DoL observed immediately after seizure offset is sustained during several of minutes well into the postictal period.
In an independent way, the SE was calculated for each of the two regions covered by FOE, in every five-second temporal window.Figure 2B shows the results of these calculations for each set of FOE (upper two panels) and a global average which includes all of the electrodes (bottom panel).In this case, a steady decrease just after seizure onset in the SE was readily observed lasting approximately the whole seizure extent.The reached lowest SE levels were maintained after seizure offset, that is, during the postictal stage.As can be observed, the maximal decrease was in the mesial ipsilateral side (right FOE).   Figure 3A helps in explaining the SE reduction during seizures.RP of each band is represented in this figure for each of the two regions.Although most of the spectral power during the preictal period was in the Delta band, some spill over onto the other bands is observed (gray areas).During the ictal stage, however, there were dramatic and rapid changes in the spectral distribution.For instance, just after seizure onset, the spectral content changes, with many frequencies leaving the Delta band to move toward higher frequencies, primarily Theta and Alpha, to return back to the Delta band with even more power than before.Once the seizure ends, most of the signals' spectral frequencies were located in the Delta band, as evidenced by the reddish hue-close to 100%-in the lower panel of Figure 3A.instance, just after seizure onset, the spectral content changes, with many frequencies leaving the Delta band to move toward higher frequencies, primarily Theta and Alpha, to return back to the Delta band with even more power than before.Once the seizure ends, most of the signals' spectral frequencies were located in the Delta band, as evidenced by the reddish hue-close to 100%-in the lower panel of Figure 3A.Changes between preictal and postictal values in the RP were quantified using the SMD index (Equation ( 5)). Figure 3B shows results of SMD when applied to the SE (bottom panel) and RP of frequency bands.Reddish hues imply a decrease, as compared with the preictal period, meanwhile bluish hues imply an increase of values with respect to the preictal stage.During the ictal stage, approximately the first minute after seizure onset, not a clear pattern is apparent.However, the percentage of the Delta power increases substantially during the postictal stage.The SE (lower panel) also displays a substantial decrease during the postictal period, with higher intensity reduction along the ipsilateral (right) side.

Results
We now turn into the analysis of the entire patient sample.To focus on the postictal period, the origin of times will be set at the moment of seizures termination.The exact moment of the seizure termination was independently informed by an expert neurophysiologist, by using a combination of clinical and EEG signs.In each case, moreover, the average over all seizures-ictal extent was Changes between preictal and postictal values in the RP were quantified using the SMD index (Equation ( 5)). Figure 3B shows results of SMD when applied to the SE (bottom panel) and RP of frequency bands.Reddish hues imply a decrease, as compared with the preictal period, meanwhile bluish hues imply an increase of values with respect to the preictal stage.During the ictal stage, approximately the first minute after seizure onset, not a clear pattern is apparent.However, the percentage of the Delta power increases substantially during the postictal stage.The SE (lower panel) also displays a substantial decrease during the postictal period, with higher intensity reduction along the ipsilateral (right) side.

Results
We now turn into the analysis of the entire patient sample.To focus on the postictal period, the origin of times will be set at the moment of seizures termination.The exact moment of the seizure termination was independently informed by an expert neurophysiologist, by using a combination of clinical and EEG signs.In each case, moreover, the average over all seizures-ictal extent was represented as a shaded area.This interval lasts 55.3 ± 21.3 s for PS seizures and 126.4 ± 59.4 s for CP seizures.Firstly, we looked at potential differences between contralateral and ipsilateral sides of PS and CP seizures.The assessment of changes in the DoL through the use of SMD is depicted in Figure 4A for PS and Figure 4B for CP seizures.The statistical analysis revealed significant differences for PS and CP seizures (Z-score = −3.783,p < 0.001 and Z-score = −3.808,p < 0.001, respectively).The decrease in the DoL on the ipsilateral side of PS was found in 91% of the patients.The SMD of the SE shown in Figure 4C,D presented significant differences between contralateral and ipsilateral sides of PS and CP seizures (Z-score = −3.508,p < 0.001 and Z-score = −4.976,p < 0.001, respectively).A decrease in SE was present in the 66% and 94% readings of the ipsilateral sides of PS and CP, respectively.In order to evaluate whether the Delta band was responsible for the SE shift during the postictal period, we further calculated the SMD of the RP for both the ipsilateral and contralateral sides during PS (Figure 5) and CP seizures (Figure 6).No appreciable changes were observed in the contralateral side of PS (Figure 5A).However, for the case of PS on the ipsilateral side (Figure 5B) significant differences between the Delta and the other bands (Wald χ2 = 1.4 × 10 14 , p < 0.001) exist, namely; an increase of Deltar vs. Alphar (p < 0.05) and Gammar (p < 0.05).These differences start 30 s after seizures offset.Moreover, 66% of seizures presented a Deltar increase at the ipsilateral side.The SMD of the RP for CP seizures (Figure 6) presented a global frequency band effect in the ipsilateral and contralateral side (Wald χ2 = 1.207 × 10 12 , p < 0.001 and Wald χ2 = 1.345 × 10 12 , p < 0.001).Further analysis showed an increase of Deltar vs. the other frequency bands at both sides (p < 0.001) (Figure 6A,B), in 100% of seizures in the ipsilateral, and 73% in the contralateral side.Moreover, 100% of seizures presented an Alphar and Betar decrease in the ipsilateral side.In order to evaluate whether the Delta band was responsible for the SE shift during the postictal period, we further calculated the SMD of the RP for both the ipsilateral and contralateral sides during PS (Figure 5) and CP seizures (Figure 6).No appreciable changes were observed in the contralateral side of PS (Figure 5A).However, for the case of PS on the ipsilateral side (Figure 5B) significant differences between the Delta and the other bands (Wald χ2 = 1.4 × 10 14 , p < 0.001) exist, namely; an increase of Delta r vs. Alpha r (p < 0.05) and Gamma r (p < 0.05).These differences start 30 s after seizures offset.Moreover, 66% of seizures presented a Delta r increase at the ipsilateral side.The SMD of the RP for CP seizures (Figure 6) presented a global frequency band effect in the ipsilateral and contralateral side (Wald χ2 = 1.207 × 10 12 , p < 0.001 and Wald χ2 = 1.345 × 10 12 , p < 0.001).Further analysis showed an increase of Delta r vs. the other frequency bands at both sides (p < 0.001) (Figure 6A,B), in 100% of seizures in the ipsilateral, and 73% in the contralateral side.Moreover, 100% of seizures presented an Alpha r and Beta r decrease in the ipsilateral side.Because extreme changes-SMD maxima and minima-in SE and RP were found approximately at 0.5 and one minute after the seizures offset, we decided to analyze the slope of the SMD in the frequency bands with the aim to determine when and how these changes appear during the postictal period.
The statistical analysis of slopes in the frequency bands changes for the case of PS (Figure 7) presented significant interaction between side of the seizure and time for Delta r (Wald χ2 = 3.587 × 10 14 , p < 0.001) and Beta r (Wald χ2 = 375, p < 0.001).A further decomposition of interaction presented an increase of Delta r of ipsilateral vs. contralateral (p < 0.05), and a decrease of Beta r of ipsilateral vs. contralateral (p < 0.05).All these effects were found into the 0-30 s interval after seizure offset, suggesting that this is in fact the critical time-zone of the actual seizure offset, during PS seizures.Moreover, in the first minute after the seizure offset, in the ipsilateral side, 91% of the seizures presented an increase in the SMD Delta r 's slope, and an 91%, 66% and 75% of seizures presented a decrease in Theta r 's, Alpha r 's and Beta r 's slope, respectively.Remarkably, 75% of seizures also presented a decrease in Theta r at the contralateral side.In the CP case (not shown), despite no differences were found in the slope on both sides, the ipsilateral side presented an increase of Delta r in 84% of seizures, and a decrease of Theta r , Alpha r and Beta r , all in 84% of analyzed seizures.These results suggest that the SMD slope could be a good parameter to lateralize the seizures' side during PS seizures, but not during CP seizures.
Because extreme changes-SMD maxima and minima-in SE and RP were found approximately at 0.5 and one minute after the seizures offset, we decided to analyze the slope of the SMD in the frequency bands with the aim to determine when and how these changes appear during the postictal period.
The statistical analysis of slopes in the frequency bands changes for the case of PS (Figure 7) presented significant interaction between side of the seizure and time for Deltar (Wald χ2 = 3.587 × 10 14 , p < 0.001) and Betar (Wald χ2 = 375, p < 0.001).A further decomposition of interaction presented an increase of Deltar of ipsilateral vs. contralateral (p < 0.05), and a decrease of Betar of ipsilateral vs. contralateral (p < 0.05).All these effects were found into the 0-30 s interval after seizure offset, suggesting that this is in fact the critical time-zone of the actual seizure offset, during PS seizures.Moreover, in the first minute after the seizure offset, in the ipsilateral side, 91% of the seizures presented an increase in the SMD Deltar's slope, and an 91%, 66% and 75% of seizures presented a decrease in Thetar's, Alphar's and Betar's slope, respectively.Remarkably, 75% of seizures also presented a decrease in Thetar at the contralateral side.In the CP case (not shown), despite no differences were found in the slope on both sides, the ipsilateral side presented an increase of Deltar in 84% of seizures, and a decrease of Thetar, Alphar and Betar, all in 84% of analyzed seizures.These results suggest that the SMD slope could be a good parameter to lateralize the seizures' side during PS seizures, but not during CP seizures.In Table 2, we summarize the main results of postictal changes found during the postictal period.Changes are quantified in terms of SMD of postictal intervals with respect to the preictal.In Table 2, we summarize the main results of postictal changes found during the postictal period.Changes are quantified in terms of SMD of postictal intervals with respect to the preictal.

Discussion
In the present work, we used synchronization and spectral analyses to quantitatively study the ictal/postictal transition as well as during the postictal period, in both PS and CP seizures.The analysis was performed on FOE recordings taken from patients with drug-resistant TLE.All of the findings reported here were done using SMD indices, particularly suited to comparing changes in different types of measures.This means that what we actually evaluated were changes during the postictal period with respect to the preictal one.
Although the postictal state has received much attention from clinical and behavioral perspectives [9][10][11], very few works have dealt with its quantitative definition and delimitation.One of the few exceptions is the work of Stamoulis et al. [7], which, using information theoretic tools showed that high frequency oscillations (above 100 Hz) disrupt the preexisting ictal low frequency (below 100 Hz) synchronization, facilitating in this way the seizure termination.This finding, carried out in 25 seizures from eight patients, seems to be nonetheless in contradiction not only with the results presented here, but also with other recent findings which show a gradual increase of synchronization toward the ictal/postictal transition [31,32] (and references in [32]).
Regarding PS, seizure offsets are accompanied with: an ipsilateral decrease in SE; a decrease in the RP and slope of the Delta band; a decrease in the ipsilateral slope of Alpha and Beta bands; and an ipsilateral decrease in the DoL.The case of CP showed a bilateral decrease in the SE, mainly due to an increase in the Delta r at both sides.A decrease in the ipsilateral DoL is also found with no appreciable changes in the contralateral side.
From these results, it seems appropriate to associate seizure offset, for the case of PS, with an ipsilateral decrease in synchronization, since the DoL decreases in a 91% of the cases.On the other hand, CP seizures presented an increase, or at least a no decrease, in synchronization with no significant differences between both sides.Taking into account that CP seizures involve, by definition, loss of consciousness, it seems plausible to infer that pure mesial connectivity changes could be masked, or enhanced, by bilateral subcortical mechanisms responsible for cognitive impairment throughout the seizure itself as well as during the postictal stage.On the other hand, once PS seizure has ended, there is a globally significant difference in the level of DoL along the postictal period between contralateral and ipsilateral, suggesting that the termination mechanism in this case is confined to the ipsilateral side alone.Moreover, impairment of synchronizations has been reported [26,28], showing the existence of an ipsilateral deficit in synchronization-both ictal and interictal-as compared with the contralateral synchronization level.The findings presented here show that when the postictal stage arrives, the pre-existing imbalance [26,28] persists (or even increases) for PS seizures and it decreases for the CP case.Bearing in mind that we are actually evaluating changes-through the SMD indices-in the DoL, the postictal ipsilateral synchronization will be lower than the preictal one, while the contralateral synchronization remains approximately unchanged, for the case of PS (Figure 4A).Whether a preictal imbalance-with ipsilateral synchronization lower than the contralateral one-exists, this difference increases in the postictal period, as it was shown.Conversely, the preictal imbalance will be reduced during the postictal period because the ipsilateral DoL increases more than the contralateral one, for CP seizures (Figure 4B).
Although the postictal EEG slowing [11,12,15] has been used to lateralize the seizure focus [9,10], the findings presented here are in disagreement.Despite the fact that in the 100% of CP seizures an increase in Delta r or a decrease in Alpha r and Beta r in the ipsilateral side appears, these changes were also found in the contralateral side, although with a lower percentage.This could be due to the spillover of the Delta activity to the contralateral side derived from the impairment of consciousness [33].In PS, there was not a globally significant change in frequency bands, perhaps due to the local confinement of the process since Delta was only augmented during the first minute.
Our results also demonstrated that the postictal periods of both types of seizures were different: the postictal period of CP seizures extended longer than PS seizures; the CP frequency bands' changes were maintained throughout time rather than being an acute process; and finally, the lack of effect in slope in CP could be explained because the increase or decrease of the frequency bands, and the subsequent sudden change in slope starting inside the seizure, a process that has been related to the expansion of the seizure to subcortical structures [34].Likewise, Yang et al. [16] demonstrated, using high density scalp EEG, an increase in Delta activity during the postictal period in PS, CP, and secondarily generalized seizures, suggesting a possible connection between behavioral states and the EEG changes.These analyses gave origin to the hypothesis of the 'network inhibition' [33], which briefly states that a seizure, spreading from mesial areas to subcortical regions, causes an abnormal function of these subcortical areas, leading to a depressed activity in the cortex and a loss of consciousness.Similarly, a recent work showed that an increase of the synchronization between the thalamus and the cortex facilitates the end of the seizures [35].Moreover, 88% of CP seizures in mesial temporal epilepsy had a synchronous pattern of termination [36].Our hypothesis is that if the disconnection originated by the decrease in DoL, found in the PS, is not able to stop the seizure, there would be a spread of the seizure to other brain areas, causing longer and worse behavioral postictal changes, as seen during CP seizures.Thus, while seizure ending process in the PS is due to a decrease in DoL in the proximal areas where seizure starts, in CP it is due to the inhibition produced by subcortical areas.
Although the commission for classification and terminology from the ILAE has recommended not classifying partial seizures as complex or simple [37], the findings shown in this work suggest the existence of different underlying mechanisms between both types of seizures, in addition to the consciousness' impairment.Hence, derived from the findings presented here, we propose the absolute minimum of the ipsilateral SE as the beginning of the postictal period for both PS and CP seizures.The mechanisms associated with seizure termination, especially the role played by the increment of the postictal Delta r , is the main cause of the postictal lowering in the SE.Thus, once the SE minimum is reached, it is reasonable to think that a seizure has effectively stopped.In this way, seizure offset is defined as the moment at which the 'seizure termination mechanism' actually ends, which is quantified in the SE value.Other results presented in this work (Table 2) would certainly help in classifying the type of seizure because they act as "fingerprints" of the type of seizure that has occurred.For instance, PS and CP clearly differentiate whether contralateral SE decreases (CP) or not (PS).Whether this is a cause or an effect of consciousness impairment cannot be answered from this sole analysis.
From a methodological perspective also, a combination of network measures and spectral entropy seems to work perfectly at the time of characterizing the ictal/postictal transition providing, moreover, a rationale of the underlying mechanisms.Even though few works have studied, from a quantitative point of view, the seizure termination, many applied linear and nonlinear methodologies to the study of the preictal/ictal transition, including wavelets, information theoretic measures, wavelet entropy, high order spectra, etc. (see [38] and references therein).The wavelet entropy [39,40], that is, entropy of the wavelets energy levels, is perhaps the closest methodology to the one actually employed here.Although results depend on the mother wavelets selected, it nonetheless seems a promising methodology which can be certainly applied on the determination of the ictal/postictal transition.
Lastly, some limitations of the present work should be considered.On the first hand, the sample size, both in patients and seizures, certainly limits the scope of the present work.Not only should the small size be considered but also the kind of recordings analyzed.FOE are not universally used in the clinical study of drug resistant epilepsy patients, but many other types-like depth electrodes, subdural grids, etc.-are also routinely used in many epilepsy centers.In this way, a wider study including other invasive methods would shed more light on the issue presented here.

Figure 1 .
Figure 1.Schematic representation of the implemented procedure.Upper panel: at the left, EEG recordings from scalp (16 channels) and FOE (12 channels), sampled at 200 Hz (only a subset of channels, in a bipolar montage, is displayed).In every temporal window (black rectangles) of 1000 data points (five seconds), different measures are calculated: DoL, SE and RP in each band.The obtained values for each measure produces a new time series sampled at five seconds.Lower panel:For each measure (SE, etc.) time series, an evaluation of its changes is performed by using the SMD index (Equation (5)), using six values of the measure in a preictal window of 30 s (red rectangles), and several 30-second windows located at different positions during the postictal stage.

Figure 1 .
Figure 1.Schematic representation of the implemented procedure.Upper panel: at the left, EEG recordings from scalp (16 channels) and FOE (12 channels), sampled at 200 Hz (only a subset of channels, in a bipolar montage, is displayed).In every temporal window (black rectangles) of 1000 data points (five seconds), different measures are calculated: DoL, SE and RP in each band.The obtained values for each measure produces a new time series sampled at five seconds.Lower panel: For each measure (SE, etc.) time series, an evaluation of its changes is performed by using the SMD index (Equation (5)), using six values of the measure in a preictal window of 30 s (red rectangles), and several 30-second windows located at different positions during the postictal stage.

Figure 2 .
Figure 2. Twenty minutes of temporal dynamic of DoL and SE, 10 min before seizure onset (vertical thick line), and 10 min after seizure onset, for patient G. Vertical dashed lines represent five-second temporal windows with high excitability.(A) DoL constructed upon the whole network recordings (scalp + FOE); (B) Mesial SE.Upper panel corresponds to left FOE, middle panel corresponds to right FOE and bottom panel corresponds to total (both FOE).

Figure
Figure3Ahelps in explaining the SE reduction during seizures.RP of each band is represented in this figure for each of the two regions.Although most of the spectral power during the preictal period was in the Delta band, some spill over onto the other bands is observed (gray areas).During the ictal stage, however, there were dramatic and rapid changes in the spectral distribution.For

Figure 2 .
Figure 2. Twenty minutes of temporal dynamic of DoL and SE, 10 min before seizure onset (vertical thick line), and 10 min after seizure onset, for patient G. Vertical dashed lines represent five-second temporal windows with high excitability.(A) DoL constructed upon the whole network recordings (scalp + FOE); (B) Mesial SE.Upper panel corresponds to left FOE, middle panel corresponds to right FOE and bottom panel corresponds to total (both FOE).

Figure 3 .
Figure 3. (A) Twenty minutes of temporal dynamics of the RP for each frequency band of patient G.In each panel, RP of Delta, Theta, Alpha, Beta, and Gamma for the left FOE, right FOE and total (Both FOE) are displayed.Warm colors mean higher percentages of spectral power.A thick vertical line represents seizure onset.Vertical dashed lines represent five-second temporal windows with high excitability.(B) Changes in RP and SE (bottom panel), in left and right FOE, quantified by the SMD index, comparing values in a preictal 30-second temporal window with the values taken in several postictal 30-second windows.Reddish hues imply a decrease and bluish hues imply an increase of values with respect to the preictal stage.

Figure 3 .
Figure 3. (A) Twenty minutes of temporal dynamics of the RP for each frequency band of patient G.In each panel, RP of Delta, Theta, Alpha, Beta, and Gamma for the left FOE, right FOE and total (Both FOE) are displayed.Warm colors mean higher percentages of spectral power.A thick vertical line represents seizure onset.Vertical dashed lines represent five-second temporal windows with high excitability; (B) Changes in RP and SE (bottom panel), in left and right FOE, quantified by the SMD index, comparing values in a preictal 30-second temporal window with the values taken in several postictal 30-second windows.Reddish hues imply a decrease and bluish hues imply an increase of values with respect to the preictal stage.
, we looked at potential differences between contralateral and ipsilateral sides of PS and CP seizures.The assessment of changes in the DoL through the use of SMD is depicted in Figure4Afor PS and Figure4Bfor CP seizures.The statistical analysis revealed significant differences for PS and CP seizures (Z-score = −3.783,p < 0.001 and Z-score = −3.808,p < 0.001, respectively).The decrease in the DoL on the ipsilateral side of PS was found in 91% of the patients.The SMD of the SE shown in Figure4C,D presented significant differences between contralateral and ipsilateral sides of PS and CP seizures (Z-score = −3.508,p < 0.001 and Z-score = −4.976,p < 0.001, respectively).A decrease in SE was present in the 66% and 94% readings of the ipsilateral sides of PS and CP, respectively.

Figure 4 .
Figure 4. Temporal dynamics quantified by the SMD in the DoL and SE for all the PS and CP seizures.(A) SMD of DoL corresponding to the ipsilateral and contralateral sides of PS seizures.(B) SMD of DoL corresponding to the ipsilateral and contralateral sides of CP seizures.(C) SMD of SE corresponding to the ipsilateral and contralateral side of PS seizures.(D) SMD of SE corresponding to the ipsilateral and contralateral side of CP seizures.All graphs represent the mean duration of the ictal period (shaded area) and 15 min after seizure onset.The mean and S.D. are shown.*** p < 0.001 vs. contralateral side.

Figure 4 .
Figure 4. Temporal dynamics quantified by the SMD in the DoL and SE for all the PS and CP seizures.(A) SMD of DoL corresponding to the ipsilateral and contralateral sides of PS seizures; (B) SMD of DoL corresponding to the ipsilateral and contralateral sides of CP seizures; (C) SMD of SE corresponding to the ipsilateral and contralateral side of PS seizures; (D) SMD of SE corresponding to the ipsilateral and contralateral side of CP seizures.All graphs represent the mean duration of the ictal period (shaded area) and 15 min after seizure onset.The mean and S.D. are shown.*** p < 0.001 vs. contralateral side.

Figure 5 .
Figure 5. Temporal dynamics quantified by the SMD in the RP of each frequency band for all the PS seizures.(A) SMD of RP corresponding to the contralateral side of PS seizures.(B) SMD of RP corresponding to the ipsilateral side of PS seizures.All graphs represent the mean duration of the ictal period (shaded area) and 15 min after seizure onset.The mean and S.D. are shown.* p < 0.05 Delta vs. Alpha, + p < 0.05 Delta vs. Gamma.

Figure 6 .
Figure 6.Temporal dynamics quantified by the SMD in the RP of each frequency band for all the CP seizures.(A) SMD of RP corresponding to the contralateral side of CP seizures.(B) SMD of RP corresponding to the ipsilateral side of CP seizures.All graphs represent the mean duration of the ictal period (shaded area) and 15 min after seizure onset.The mean and S.D. are shown.*** p < 0.001 vs. all the other frequencies.

Figure 5 . 15 Figure 5 .
Figure 5. Temporal dynamics quantified by the SMD in the RP of each frequency band for all the PS seizures.(A) SMD of RP corresponding to the contralateral side of PS seizures; (B) SMD of RP corresponding to the ipsilateral side of PS seizures.All graphs represent the mean duration of the ictal period (shaded area) and 15 min after seizure onset.The mean and S.D. are shown.* p < 0.05 Delta vs. Alpha, + p < 0.05 Delta vs. Gamma.

Figure 6 .
Figure 6.Temporal dynamics quantified by the SMD in the RP of each frequency band for all the CP seizures.(A) SMD of RP corresponding to the contralateral side of CP seizures.(B) SMD of RP corresponding to the ipsilateral side of CP seizures.All graphs represent the mean duration of the ictal period (shaded area) and 15 min after seizure onset.The mean and S.D. are shown.*** p < 0.001 vs. all the other frequencies.

Figure 6 .
Figure 6.Temporal dynamics quantified by the SMD in the RP of each frequency band for all the CP seizures.(A) SMD of RP corresponding to the contralateral side of CP seizures; (B) SMD of RP corresponding to the ipsilateral side of CP seizures.All graphs represent the mean duration of the ictal period (shaded area) and 15 min after seizure onset.The mean and S.D. are shown.*** p < 0.001 vs. all the other frequencies.

Figure 7 .
Figure 7. Temporal dynamics of the slope of the SMD of the RP of each frequency band for all the PS seizures.Slope of SMD of the relative spectral power for the frequency bands (Delta, Theta, Alpha, Beta, and Gamma) of ipsilateral and contralateral sides.All graphs represent the ictal period and 5 min after seizure onset.The mean and S.D. are shown.* p < 0.05 vs. contralateral side.

Table 2 .Figure 7 .
Figure 7. Temporal dynamics of the slope of the SMD of the RP of each frequency band for all the PS seizures.Slope of SMD of the relative spectral power for the frequency bands (Delta, Theta, Alpha, Beta, and Gamma) of ipsilateral and contralateral sides.All graphs represent the ictal period and 5 min after seizure onset.The mean and S.D. are shown.* p < 0.05 vs. contralateral side.