Introduction

Temporal lobe epilepsy (TLE) is often medically refractory and requires invasive therapy resulting in 60–80% seizure freedom after resection or laser ablation of the seizure focus (Chang et al. 2015; Asadi-Pooya et al. 2017). A reason why some surgeries fail is thought to be due to the epileptogenic activity extending to the extratemporal structures (Harroud et al. 2012). The precise localization of the epileptogenic zone (EZ) is critical for improving seizure outcomes, but the process of identifying the margins of the EZ remains imperfect.

Magnetoencephalography (MEG) has demonstrated its value in epilepsy surgery planning by noninvasively detecting interictal spikes and localizing their activity in the deeper cortical regions, such as interhemispheric regions and mesial temporal lobe structures (Ebersole 1997; Knowlton and Shih 2004; Pizzo et al. 2019; Laohathai et al. 2021; Piastra et al. 2021). Studies have shown that failure to completely resect a MEG-positive epileptogenic zone resulted in inadequate seizure control after surgery (Fischer et al. 2005; Owen et al. 2023). The equivalent current dipole (ECD), which is currently used in clinical practice with MEG, evaluates the burden of spikes in various regions of the brain and locates discrete areas associated with spike activity (Laohathai et al. 2021). However, it does not account for the temporal dynamics of spike propagation, and few studies to date have achieved this using MEG data (Hara et al. 2007; Wang et al. 2012; Tanaka et al. 2014).

The temporal dynamics of interictal activity is highly clinically relevant and correlated with surgical outcomes. Prior studies have demonstrated that interictal spikes consistently propagate for 10–50 ms (Alarcon et al. 1997; Zumsteg et al. 2006; Tomlinson et al. 2016). In a retrospective analysis of stereo EEG (sEEG) recordings in 45 patients, the surgical resection of tissue containing both interictal spike onset and propagation source nodes was shown to provide a greater chance of seizure freedom compared to spike onset source nodes alone (Azeem et al. 2021). In the recent study using intracranial EEG for the spatiotemporal mapping of spike propagation, the resection of the region of spike onset disrupted the epileptogenic network and resulted in a greater likelihood of postoperative seizure freedom (Matarrese et al. 2023). Few case reports have examined the feasibility of spike propagation in MEG, with limited ability to detect spike onest (Hara et al. 2007; Tanaka et al. 2010; Kuznetsova and Ossadtchi 2021). In a larger study of 37 TLE patients who received surgical resections of the temporal lobe, patients with temporoparietal spread of propagated interictal spikes on MEG had worse postsurgical outcomes compared to those with spikes restricted to the anterior or mesial temporal lobe (Tanaka et al. 2014).

Epileptogenic activity is also tightly interconnected with sleep function (Derry and Duncan 2013). The number of interictal spikes quantitatively increases in sleep with a preferential increase in the medial temporal regions (Lambert et al. 2018). Normal sleep waveform activity in MEG data, including sleep spindles, vertex waves, and K-complexes, may present as sharp normal transients (Ramantani et al. 2006). These waveforms could be differentiated from epileptiform spikes by the wave morphology and dipole orientation, with sleep-related activity oriented radially on EEG (Ramantani et al. 2006), although this becomes more difficult when epochs of MEG recordings are being averaged. To the best of our knowledge, no previous work has been done to separate the spatiotemporal sources of the interictal epileptiform activity from normal sleep MEG data.

Currently, the localization of interictal spike onset to delineate the epileptogenic zone has been accomplished with intracranial EEG recordings (Tomlinson et al. 2016; Conrad et al. 2020; Matarrese et al. 2023). However, the detection of such activity is limited to the areas where the electrodes are being implanted. As such, the tools for the assessment of the broader dynamics of interictal brain activity in presurgical patients are currently lacking. In the present study, we describe a custom analytical tool to noninvasively localize the area of onset of interictal spikes in the whole brain and track their propagation on MEG. To better delineate the spike, we applied a novel approach of normalization of the abnormal activity against spike-free sleep background, which is distinct from previous attempts to use the awake background activity as the corresponding reference. In addition to the incorporation of sleep artifact removal, the novelty of the approach described herein is in more accurate localization of interictal spike onset and integration into the Multi-Modal Visualization Tool (MMVT).

Materials and Methods

Participants

This is a methodological feasibility study applied to retrospective data of patients thought to have medically refractory TLE who received MEG imaging at the University of Nebraska Medical Center and had ECD results showing dipoles in the temporal lobe. Their clinical and demographic characteristics and findings from their EEG, MRI, and PET imaging studies were extracted from the electronic medical records.

MEG Data Recording and Processing

The MEG data were recorded in a magnetically shielded room with a whole scalp covered with 306 MEG channels, including 102 magnetometers and 204 planar gradiometers (Elekta Neuromag, Helsinki, Finland). Prior to the MEG study, patients were instructed to reduce habitual total sleep time by ~ 40% by postponing their typical sleep onset by 2–3 h while keeping their habitual wake time unchanged. During the recordings, patients were positioned supine with head support in the MEG helmet, and all patients achieved stage 2 and 3 sleep. The head position was measured and monitored during the entire study via four head indicator coils placed over the EEG cap. The locations of the coils with respect to anatomical landmarks on the head were determined with a 3D digitizer (Polhemus, Vermont, United States). The T1 MRI sequence of the brain was acquired for all patients.

The EEG data from 60 channels were recorded simultaneously using the prefabricated EEG cap (Easy Cap, Germany). The recording bandpass filtering and sampling rate were 0.03–300 and 1000 Hz, respectively. The data were processed offline, and artifacts were removed by spatially filtering the raw data using the temporal extension of Signal Space Separation (tSSS) as implemented in MaxFilter software (Taulu and Simola 2006). Both MEG and EEG data were recorded for six 10-min sessions, and tracings were reviewed for the presence of epileptiform activity (interictal spikes) by a neurophysiologist (V.G.) and epileptologist (O.T.). Interictal spikes were defined as epileptiform discharge of < 70 ms in duration. They were localized using the ECD method by the Neuromag software (Neuromag, Helsinki, Finland). The dipoles were accepted when their goodness of fit (into a sphere) was ≥ 80%. Each dipole included the location, orientation, and intensity of current flow in the activated cortical area. All ECDs were superimposed onto the individual patient’s MRI and retained for subsequent analysis of their spatiotemporal spike propagation analysis (Figs. 1A and 2A).

Fig. 1
figure 1

Temporal Lobe (TL) propagation group. Each row shows results for each patient, named TL-1 to TL-4. Column A shows the MEG clusters using the clinical ECD method. Column B shows the visualization of interictal spike propagation over time, using the MMVT. The spikes are mapped from 0 (yellow) to 10 ms (red) onto the MRI-derived 3D reconstruction of the patient brain. The region of onset of spike activity is circled in red. Column C shows the average max-z-value over 4 s epochs, with the onset of spikes selected by the neurophysiologist located at 0.0 s. The max-z-value represents spike burden, based on selected epochs normalized against the patient’s sleep activity without epileptiform discharges. The vertical line represents the selected 10 ms time window based on z-value peak (Color figure online)

Fig. 2
figure 2

Temporal plus (TP) propagation group. Each row shows results for each patient, named TP-1 to TP-3. Column A shows the MEG clusters using the clinical ECD method. Column B shows the visualization of interictal spike propagation over time, using the MMVT. The spikes are mapped from 0 (yellow) to 10 ms (red) onto the MRI-derived 3D reconstruction of the patient brain. The region of onset of spike activity is circled in red. Column C shows the average z-value over 4 s epochs, with the onset of spikes selected by the neurophysiologist located at 0.0 s. The max-z-value represents spike burden, based on selected epochs normalized against the patient’s sleep activity without epileptiform discharges. The vertical line represents the selected 10 ms time window based on max-z-value peak (Color figure online)

Ten epochs of waveforms, 4 s each, were clipped from the raw MEG tracings, 2 s before and 2 s after each interictal spike onset. Moreover, ten epochs of sleep stage 2 were clipped for sleep spike-free data, 40 s in total. All patients had at least 10 interictal spikes to meet the minimum requirements for dipoles, and the dipoles must have been grouped around the temporal lobe, becoming a cluster of dipoles.

MEG Source Propagation Analysis

We used a Boundary Element Method (BEM) to create a volume conduction model of the head based on each patient’s MRI (Tanaka and Du 1990). Spatiotemporal source distribution was determined using the Dynamic Statistical Parametric Mapping (dSPM) inverse method for each epoch (Dale et al. 2000). The dSPM method estimates the activity over time for 4000 equally spread points (vertices) on the surface of each hemisphere. Given that sleep activity on dSPM affected our ability to discern spike activity from sleep architecture, we averaged and normalized the source distributions against averaged spike-free sleep background. Specifically, we estimated the activity for these vertices for several minutes during stage 2 sleep devoid of any interictal epileptiform activity. We then calculated the average and standard deviation of the dSPM results for each vertex during the baseline period. Then, for each spike, we used the baseline mean and standard deviation to transfer the time series of each vertex to z-values over time, determining the significant change in activity from the baseline. The resulting z-values represented the burden of interictal spike activity compared to normal sleep-related activity. We provide an example of the effects of applying sleep normalization to the z-scores in Fig. 3.

Fig. 3
figure 3

Application of the sleep normalization step. The presence of normal sleep architecture contributes an artifact to the cortical activity in Patient 1 of the Temporal Plus (TP) group and precludes the identification of the MEG peak (A). The dSPM method helps to mitigate this artifact and magnify the changes over time and space from the corresponding spike-free sleep baseline in the same patient, thereby allowing to discern the peak (B)

The onset of each spike was defined manually by a neurophysiologist (V.G.). To check the time, we correlated the manually selected times to the time of rise in z-values. According to our hypothesis, if the z-values measure the burden of interictal activity, we will see a spike in the z-values right after the onset. Moreover, the spike in z-values will occur only in the hemisphere where the dipoles were localized. To test this hypothesis, we first averaged the z-values in space using the Desikan-Killiany-Tourville cortical atlas (Klein and Tourville 2012), resulting in averaged z-values over time per cortical label. We then selected the maximum value per time point per hemisphere and plotted the results between − 2 s and + 2 s, where 0 is the onset determined manually by the neurophysiologist (Figs. 1C and 2C). Using these max-z-values plots, we determined whether we could capture the interictal onsets both in time (onset) and space (lateralization).

In the next step, we examined the spatial-temporal dynamics of the interictal spikes more closely by plotting the z-values on the patients’ cortical surface. As a threshold, we calculated the average value of the max-z-values before the onset for each hemisphere and picked the higher value (red dashed horizontal line in Figs. 1C and 2C). Interictal spikes have been shown to consistently propagate for at least 10 ms (Tomlinson et al. 2016) and this time interval was previously suggested as the minimum latenency to differentiate spike propagation from source onset in MEG (Laohathai et al. 2021). To compare the speed of propagation for each patient, denoting which patients had rapid spread of interictal spikes beyond the temporal lobe, we plotted all the z-values above this threshold on the cortical surfaces from the onset to 10 ms using a color gradient from yellow (onset) to red (10 ms). When the longer time intervals were applyed, we found it more difficult to visually localize the onset of spikes while presenting spike propagation on a static map of the brain. The propagation was plotted layer by layer, starting at 10 ms backward to the onset. A red region denotes spike source data activity (z-values > threshold) only at the end of the selected time window (t = 10 ms). A yellow region denotes the source data activity at or near the onset (t = 0 ms). Using this technique, we could represent the spatial and temporal dynamics of the interictal spikes in one figure (Figs. 1B and 2B). As a verification of our method, we anticipated a region of spike source data activity (z-values > threshold) at the onset where the ECDs were localized.

The model was incorporated into the publicly available and open-source MMVT (Felsenstein et al. 2019), to help visualize the spatial and temporal dynamics of spike propagation in the MRI-derived 3D reconstruction of the patient’s brain (Figs. 1B and 2B). To test our method on the spatial domain, we imported the ECDs into the 3D reconstructed brain and compared their locations to the locations where the z-values were above the threshold at the onset. The location of spike onset was then compared to the margins of epileptogenic zone established based on intracranial EEG findings or, if not available, the combination of brain imaging and scalp EEG findings.

Results

We identified seven patients with medically refractory TLE who underwent evaluation with MEG during their presurgical workup (Table 1). In all patients, the ECD results showed dipoles in the temporal lobe areas (Figs. 1A and 2A). Spike propagation activity was successfully quantified over space and time and normalized against spike-free background sleep activity (Fig. 3). For all patients, the onset of spikes (i.e., t = 0), defined manually by the neurophysiologist, matched the time of the peak in the max-z-values plots (Figs. 1C and 2C, vertical red dashed line). Moreover, the peak was found only in the max-z-values of the hemisphere where the interictal dipoles were localized.

Table 1 Clinical characteristics of selected patients

Based on their spatiotemporal propagation of source activity over the interval of 10 ms, we separated the patients into two groups: TL group, in which the propagation of source spike activity was restricted to the temporal lobe, and TP group, in which the propagation was distributed over the temporal lobe as well as extratemporal structures (Table 1). The results of the spatiotemporal propagation on the cortical surfaces are illustrated in Figs. 1B and 2B for the TL and TP groups, respectively. The propagation is colored using a yellow-to-red gradient, where the onset is in yellow (t = 0) and the propagation areas (closer to 10 ms) are in orange to red. For all patients, there was a spatial cluster on the 3D brain where the ECDs were localized (Fig. 1A and B circled in red)—a spatial verification for our method.

The spatiotemporal plots (Figs. 1B and 2B) were useful in capturing the interictal dynamics at a resolution of 10 ms. Moreover, in reviewing the retrospective clinical data, we found that the z-values spatial cluster fell within the EZ, based on findings from other diagnostic studies performed during presurgical evaluation, including intracranial and scalp EEGs, brain MRI and PET imaging (Table 1). Furthermore, with respect to postsurgical outcomes, patients TL-1 and TL-2 have been seizure-free at their last follow-up visit to the clinic. Patient TL-4 had seizure recurrence after 1 year of seizure freedom (Table 1). On the other hand, TP-1, who had activity propagated outside the temporal lobe and underwent resection, had seizure recurrence after 6 months of seizure freedom (Table 1).

Discussion

In the present pilot study, we developed a novel quantitative approach to assess the spatiotemporal dynamics of interictal MEG spikes and enhance their visualization by normalizing against spike-free stage 2 sleep background. We found their onset in the propagation sequences to be more precisely representative of the EZ in all seven patients compared to the ECD method alone. Although MEG was shown to be useful in presurgical planning for epilepsy, the currently employed ECD method lacks temporal information and cannot detect such dynamics. We demonstrated that MMVT could be applied as an additional tool for evaluating the spatial and temporal resolution of the interictal activity recorded with MEG. Our model offers an advantage over the currently used ECD model that does not allow to visualize interictal spikes over time, because the formation of dipoles meeting appropriate goodness of fit criteria cannot be sustained in a moving model. The ECD model also does not allow for averaging across source activity in multiple epochs or normalize against background sleep activity. The application of the proposed new model in epilepsy patients will add a powerful tool for noninvasive visualization of spike onset and propagation in the whole brain using MEG.

A proposed reason for why certain temporal lobe surgeries fail is thought to be due to the presence of extratemporal epileptogenic tissue, which may be referred to as temporal plus epilepsy (Barba et al. 2016). While this is possible, there is an alternative recognition that the EZ itself in TLE may be dynamic and evolve over time (Jehi 2018). Therefore, while the EZ may be characterized at one point through intracranial EEG (iEEG) studies, it may become a different location based on its epileptic network (Jehi 2018). Indeed, it was demonstrated that the resection of tissue containing both the interictal spike onset and propagation networks provides a greater chance of seizure freedom compared to targeting the location of spike onset alone (Azeem et al. 2021). As the role of interictal spike propagation in the presurgical evaluation of epilepsy is emerging, the studies using MEG recordings have remained limited. In a study that investigated postoperative outcomes of MEG spike propagation, interictal spike propagation beyond the temporal lobe was associated with worse postoperative seizure outcomes, though the location of spike onset was not fully characterized (Tanaka et al. 2014). Furthermore, there are limited data assessing the impact of the propagation velocity of interictal spikes in relation to the accompanying seizure network. We address this by evaluating the source localization of epileptiform activity over a standardized time window of 10 ms, through which we show variability in the distribution of spikes in both locations and the amount of spread, despite the ECDs residing in the temporal lobe in both groups. Overall, our study is original, because we (1) confirmed that dSPM provides at least one cortical spatial cluster that is correlated with the dipoles’ cluster, (2) filtered out non-epileptic artifact which produced patches of activity in the 3D space and interfered with precise localization of spike onset, and (3) applied a standardized 10 ms propagation window of the interictal activity.

When localizing the interictal activity recorded during non-rapid eye movement sleep (NREM) state, we wanted to account for the nonepileptic sleep-related brain activity. In the current MEG clinical method, the ECD results can be affected by sleep background when spikes are recorded during sleep (Gumenyuk et al. 2009). Therefore, the localization of spike activity would be more accurate when adjusting for normal sleep-related brain activity. We opted to normalize the interictal spike patterns against a sleep background without spike activity, which has not been done before. In this way, we would theoretically focus only on the epileptogenic activity while omitting activity from the patients’ nonepileptic activity.

The limitations of this study include the manual selection of spikes and spike-free sleep epochs by a neurophysiologist. While this approach is similar to the current clinical method, it may introduce a selection bias based on the training and experience of readers. Another limitation includes the limited postsurgical outcome data, though they appear consistent with previous findings suggesting that rapid spread of interictal spikes may be associated with increased likelihood of breakthrough seizure following surgical resection. Finally, while the normalization against normal sleep activity helped distinguish the interictal spike activity by reducing the presence of normal cortical activity in the statistical analyses, further work may explore even more optimal ways to separate out the spike, allowing for its tracking of propagation beyond the 10 ms time window and perhaps even past 50 ms.

In this pilot study, we have established the feasibility of a novel method to assess interictal spike propagation in patients with drug-resistant TLE and introduced a method to account for sleep when visualizing the spike propagation. We demonstrated that localizing and visualizing the onset of propagating interictal spikes through MMVT is possible with MEG. In the future, it can be applied to supplement the data obtained with iEEG. Future studies can expand this application to larger cohorts of patients with temporal and extratemporal epilepsy and allow for clinical validation of this approach against sEEG data and clinical outcomes. This method may help improve the evaluation of underlying epileptic networks and guide intracranial EEG implantation strategies and the selection of appropriate interventions.