<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" article-type="research-article" dtd-version="2.3" xml:lang="EN">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Neurosci.</journal-id>
<journal-title>Frontiers in Neuroscience</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Neurosci.</abbrev-journal-title>
<issn pub-type="epub">1662-453X</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fnins.2024.1472747</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Neuroscience</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Using Long Short-Term Memory (LSTM) recurrent neural networks to classify unprocessed EEG for seizure prediction</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Chambers</surname> <given-names>Jordan D.</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x002A;</sup></xref>
<uri xlink:href="https://loop.frontiersin.org/people/2803628/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/data-curation/"/>
<role content-type="https://credit.niso.org/contributor-roles/formal-analysis/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-original-draft/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Cook</surname> <given-names>Mark J.</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
<uri xlink:href="https://loop.frontiersin.org/people/31518/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/funding-acquisition/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Burkitt</surname> <given-names>Anthony N.</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
<uri xlink:href="https://loop.frontiersin.org/people/5513/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/funding-acquisition/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Grayden</surname> <given-names>David B.</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
<uri xlink:href="https://loop.frontiersin.org/people/52002/overview"/>
<role content-type="https://credit.niso.org/contributor-roles/conceptualization/"/>
<role content-type="https://credit.niso.org/contributor-roles/funding-acquisition/"/>
<role content-type="https://credit.niso.org/contributor-roles/writing-review-editing/"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Department of Biomedical Engineering, The University of Melbourne</institution>, <addr-line>Melbourne, VIC</addr-line>, <country>Australia</country></aff>
<aff id="aff2"><sup>2</sup><institution>Seer Medical</institution>, <addr-line>Melbourne, VIC</addr-line>, <country>Australia</country></aff>
<aff id="aff3"><sup>3</sup><institution>Departments of Medicine and Neurology, St Vincent's Hospital, The University of Melbourne</institution>, <addr-line>Melbourne, VIC</addr-line>, <country>Australia</country></aff>
<aff id="aff4"><sup>4</sup><institution>Graeme Clark Institute for Biomedical Engineering, The University of Melbourne</institution>, <addr-line>Melbourne, VIC</addr-line>, <country>Australia</country></aff>
<author-notes>
<fn fn-type="edited-by" id="fn0001">
<p>Edited by: Ali Khaleel Ibrahim, Florida Atlantic University, United States</p>
</fn>
<fn fn-type="edited-by" id="fn0002">
<p>Reviewed by: Matthias Duempelmann, Universit&#x00E4;tsklinikum Freiburg, Germany</p>
<p>Leon D Iasemidis, Barrow Neurological Institute (BNI), United States</p>
<p>Chiron Bang, Florida Atlantic University, United States</p>
</fn>
<corresp id="c001">&#x002A;Correspondence: Jordan D. Chambers, <email>jordanc@unimelb.edu.au</email></corresp>
</author-notes>
<pub-date pub-type="epub">
<day>15</day>
<month>11</month>
<year>2024</year>
</pub-date>
<pub-date pub-type="collection">
<year>2024</year>
</pub-date>
<volume>18</volume>
<elocation-id>1472747</elocation-id>
<history>
<date date-type="received">
<day>29</day>
<month>07</month>
<year>2024</year>
</date>
<date date-type="accepted">
<day>22</day>
<month>10</month>
<year>2024</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x00A9; 2024 Chambers, Cook, Burkitt and Grayden.</copyright-statement>
<copyright-year>2024</copyright-year>
<copyright-holder>Chambers, Cook, Burkitt and Grayden</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p>
</license>
</permissions>
<abstract>
<sec id="sec1">
<title>Objective</title>
<p>Seizure prediction could improve quality of life for patients through removing uncertainty and providing an opportunity for acute treatments. Most seizure prediction models use feature engineering to process the EEG recordings. Long-Short Term Memory (LSTM) neural networks are a recurrent neural network architecture that can display temporal dynamics and, therefore, potentially analyze EEG signals without performing feature engineering. In this study, we tested if LSTMs could classify unprocessed EEG recordings to make seizure predictions.</p>
</sec>
<sec id="sec2">
<title>Methods</title>
<p>Long-term intracranial EEG data was used from 10 patients. 10-s segments of EEG were input to LSTM models that were trained to classify the EEG signal. The final seizure prediction was generated from 5 outputs of the LSTM model over 50&#x2009;s and combined with time information to account for seizure cycles.</p>
</sec>
<sec id="sec3">
<title>Results</title>
<p>The LSTM models could make predictions significantly better than a random predictor. When compared to other publications using the same dataset, our model performed better than several others and was comparable to the best models published to date. Furthermore, this framework could still produce predictions significantly better than chance when the experimental paradigm design was altered, without the need to reperform feature engineering.</p>
</sec>
<sec id="sec4">
<title>Significance</title>
<p>Removing the need to perform feature engineering is an advancement on previously published models. This framework can be applied to many different patients&#x2019; needs and a variety of acute interventions. Also, it opens the possibility of personalized seizure predictions that can be altered to meet daily needs.</p>
</sec>
</abstract>
<kwd-group>
<kwd>epilepsy</kwd>
<kwd>EEG</kwd>
<kwd>seizure prediction</kwd>
<kwd>machine learning</kwd>
<kwd>long short-term memory</kwd>
<kwd>LSTM</kwd>
</kwd-group>
<contract-num rid="cn1">ICI70200030</contract-num>
<contract-sponsor id="cn1">Australian Research Council Industrial Transformation Training Centre in Cognitive Computing for Medical Technologies</contract-sponsor>
<counts>
<fig-count count="2"/>
<table-count count="4"/>
<equation-count count="6"/>
<ref-count count="40"/>
<page-count count="11"/>
<word-count count="9525"/>
</counts>
<custom-meta-wrap>
<custom-meta>
<meta-name>section-at-acceptance</meta-name>
<meta-value>Translational Neuroscience</meta-value>
</custom-meta>
</custom-meta-wrap>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="sec5">
<label>1</label>
<title>Introduction</title>
<p>Seizure prediction could improve quality of life for patients through removing uncertainty and providing an opportunity for acute treatments. Consequently, seizure prediction has attracted a lot of interest, particularly since it was shown to be feasible [for examples, see (<xref ref-type="bibr" rid="ref11">Iasemidis et al., 1990</xref>; <xref ref-type="bibr" rid="ref13">Iasemidis et al., 2005</xref>; <xref ref-type="bibr" rid="ref20">Lehnertz and Elger, 1998</xref>; <xref ref-type="bibr" rid="ref26">Moser et al., 1999</xref>) or for more comprehensive reviews see (<xref ref-type="bibr" rid="ref10">Iasemidis, 2011</xref>; <xref ref-type="bibr" rid="ref12">Iasemidis and Sackellares, 1996</xref>; <xref ref-type="bibr" rid="ref19">Kuhlmann et al., 2018b</xref>; <xref ref-type="bibr" rid="ref21">Litt and Echauz, 2002</xref>)]. Significant progress in seizure prediction has been made due to improvements in computer technologies (<xref ref-type="bibr" rid="ref21">Litt and Echauz, 2002</xref>), the accumulation of data (<xref ref-type="bibr" rid="ref19">Kuhlmann et al., 2018b</xref>; <xref ref-type="bibr" rid="ref38">Wong et al., 2023</xref>) and advances in machine learning algorithms (<xref ref-type="bibr" rid="ref24">Maimaiti et al., 2022</xref>). The accumulation of data is not just due to more studies and more patients, but also the development of medical devices that allow long-term recordings (<xref ref-type="bibr" rid="ref2">Andrzejak et al., 2023</xref>; <xref ref-type="bibr" rid="ref31">Stirling et al., 2021</xref>). The creation of larger datasets means machine learning algorithms improve in performance.</p>
<p>The most common approach using machine learning, or similar optimization techniques, is to perform feature extraction on the EEG recordings. These features are then used as input into a model designed to make a prediction. This approach is efficient in terms of directing the model toward important information and in terms of computational costs for optimizing the model. However, the performance of the model is restricted by the features extracted and the feature extraction is a process that requires human intuition. Models developed this way are limited to the information captured by the features extracted. Any changes to the experiment paradigm may reduce the performance of the model if the new paradigm requires information not captured in the original extracted features. In seizure prediction, this is particularly important because there is no agreement in what the best prediction timeframe is (<xref ref-type="bibr" rid="ref3">Arthurs et al., 2010</xref>; <xref ref-type="bibr" rid="ref30">Schulze-Bonhage et al., 2010</xref>) and different acute treatments will require different time courses to be effective. Therefore, a good seizure prediction model should be able to alter the experimental paradigm (such as seizure prediction horizon (SPH) and intervention period) to be useful for a range of patient needs and a range of acute treatments.</p>
<p>Recurrent neural networks are a form of machine learning architecture that have a feedback loop. This allows information to persist and, therefore, display temporal dynamics. As such, recurrent neural networks are ideal to analyze sequences or time series data, like EEG recordings. Long Short-Term Memory (LSTM) neural networks (<xref ref-type="bibr" rid="ref9">Hochreiter and Schmidhuber, 1997</xref>) are a special form of recurrent networks designed to deal with the vanishing gradient problem, which means they can learn long-term dependencies in the data.</p>
<p>Since LSTMs are well suited to interpret EEG, several studies have started to use LSTMs for seizure prediction [for example, (<xref ref-type="bibr" rid="ref1">Ali et al., 2019</xref>; <xref ref-type="bibr" rid="ref6">Daoud and Bayoumi, 2019</xref>; <xref ref-type="bibr" rid="ref23">Ma et al., 2018</xref>; <xref ref-type="bibr" rid="ref27">Pal Attia et al., 2023</xref>; <xref ref-type="bibr" rid="ref28">Payne et al., 2023</xref>; <xref ref-type="bibr" rid="ref32">Tsiouris et al., 2018</xref>; <xref ref-type="bibr" rid="ref34">Varnosfaderani et al., 2021</xref>; <xref ref-type="bibr" rid="ref35">Viana et al., 2023</xref>; <xref ref-type="bibr" rid="ref39">Zhang et al., 2021</xref>)]. However, most these studies perform some sort of feature extraction on the EEG before and passing those features to the LSTM model. Again, this limits the prediction power of the LSTM model to the extracted features. For example, a common approach is to perform a Fourier transform on the EEG data and then pass the frequency-time data to the LSTM model (<xref ref-type="bibr" rid="ref1">Ali et al., 2019</xref>; <xref ref-type="bibr" rid="ref23">Ma et al., 2018</xref>; <xref ref-type="bibr" rid="ref27">Pal Attia et al., 2023</xref>; <xref ref-type="bibr" rid="ref28">Payne et al., 2023</xref>; <xref ref-type="bibr" rid="ref35">Viana et al., 2023</xref>). This approach is efficient in terms of computational costs, but can lose important information, such as autocorrelation information [which has been shown to be a good predictor for seizures (<xref ref-type="bibr" rid="ref25">Maturana et al., 2020</xref>)]. Using convolutional neural networks (or similar architecture like encoders or perceptron) to process the EEG recordings (<xref ref-type="bibr" rid="ref6">Daoud and Bayoumi, 2019</xref>; <xref ref-type="bibr" rid="ref22">Lopes et al., 2024</xref>; <xref ref-type="bibr" rid="ref40">Zhou et al., 2018</xref>) has the potential to avoid losing such information, but it is unclear if performance is increased or decreased by having convolutional neural networks before or after the LSTM units.</p>
<p>In this current study, we used LSTMs to process raw EEG signals to make seizure predictions. Long-term intracranial EEG data was used (<xref ref-type="bibr" rid="ref5">Cook et al., 2013</xref>). The LSTM models could make predictions significantly better than a random predictor and better than several studies using the same dataset. Furthermore, this framework could still produce good predictions when the experimental paradigm was altered, which is an improvement on previous models.</p>
</sec>
<sec sec-type="methods" id="sec6">
<label>2</label>
<title>Methods</title>
<sec id="sec7">
<label>2.1</label>
<title>Data</title>
<p>Long-term intracranial EEG from the NeuroVista dataset was used (<xref ref-type="bibr" rid="ref5">Cook et al., 2013</xref>). This consisted of 16 electrodes continuously recording at 400&#x2009;Hz for 0.5&#x2013;2.1&#x2009;years (1.5&#x2009;years on average) for 15 patients with refractory focal epilepsy. The clinical feasibility study and sharing of data was approved by the Human Research Ethics Committee, St. Vincent&#x2019;s Hospital, Melbourne (approval LRR145/13).</p>
<p>Of the original 15 patients, 10 patients were used in this study. During model development, initial tests indicated approximately 30 seizures were required to train the LSTM models, which is similar to previous studies using the same dataset (<xref ref-type="bibr" rid="ref15">Karoly et al., 2017</xref>; <xref ref-type="bibr" rid="ref17">Kiral-Kornek et al., 2018</xref>; <xref ref-type="bibr" rid="ref18">Kuhlmann et al., 2018a</xref>; <xref ref-type="bibr" rid="ref28">Payne et al., 2023</xref>). Therefore, patients 4, 5, 12, and 14 were excluded because they had less than 15 seizures. Patient 7 was also excluded due to a combination of shorter recording time (less than 7&#x2009;months) and only 35 lead seizures. The recording times and seizure counts are provided for all patients in the <xref ref-type="supplementary-material" rid="SM1">Supplementary information</xref>.</p>
<p>We only used lead seizures to train and test the algorithms, consistent with other studies (<xref ref-type="bibr" rid="ref17">Kiral-Kornek et al., 2018</xref>; <xref ref-type="bibr" rid="ref18">Kuhlmann et al., 2018a</xref>). A lead seizure was defined as a seizure that did not have any seizure in the 4&#x2009;h prior. Similarly, 4&#x2009;h of data after each seizure was excluded from the datasets to avoid post-ictal patterns.</p>
<p>The first 100&#x2009;days of the recordings were excluded due to the inconsistency of the recordings (<xref ref-type="bibr" rid="ref33">Ung et al., 2017</xref>). The remaining data was split into training and testing sets with an 80:20 split. The first 80% of seizures were allocated to the training set, so that there was no chance of time-correlated data being used in the test set (<xref ref-type="bibr" rid="ref36">West et al., 2023</xref>). The half-way point between the last seizure in the training set and the first seizure in the test set was used to separate the two datasets.</p>
<p>The input into the model was 1&#x2009;min of EEG recordings across 16 electrodes. The only pre-processing that was performed was a normalization of the amplitude and removal of NaNs (not a number), which were due to missing data (usually because of NeuroVista device telemetry drop-outs). No other preprocessing of data was performed such as artifact removal or control for changes in signal quality. The amplitude was normalized so the raw values would fall into a range that was well suited to the sigmoid activation function of the LSTM units. This normalization was done separately for each electrode and involved subtracting the mean value of the signal for that 1&#x2009;min recording and dividing by the average standard deviation (where the average was calculated from the previous 30&#x2009;days of recordings and was updated once per day). Model development indicated a better performance when using the average standard deviation compared to using the standard deviation of the 1&#x2009;min segment of EEG because it included amplitude information in different brain states observed over many days. Missing data values were replaced with the mean value of the signal for that electrode and that 1&#x2009;min recording. A 1&#x2009;min recording was excluded from the dataset if there was more than 400 NaNs, or more than 1&#x2009;s of data missing, which allowed for small data dropouts (for example, from telemetry interruptions) but excluded minutes where larger dropouts started and finished (for example, charging the device battery). All other 1&#x2009;min recordings prior to a lead seizure were included in the dataset.</p>
<p>Balanced datasets were used to train the models, whereas unbalanced datasets were used to test the models. Two different datasets were used to train the model. The first dataset consisted of 10&#x2009;s segments of raw EEG to train the LSTM units. Since inter-ictal data out-numbered pre-ictal data, we used up-sampling of the pre-ictal data to create a balanced dataset. EEG data was stored in files comprising 1-min recordings. The inter-ictal dataset was created by taking the first 10&#x2009;s of every file that was labelled as inter-ictal. The pre-ictal dataset was created by taking multiple 10&#x2009;s segments of every file to up sample this dataset. First, this was done with even spacing (for example, 0&#x2013;10&#x2009;s, 10&#x2013;20&#x2009;s, etc.), followed by overlapping with increased amounts of overlap (5&#x2013;15&#x2009;s, 15&#x2013;25&#x2009;s, etc., then 2.5&#x2013;12.5&#x2009;s, 12.5&#x2013;22.5&#x2009;s) and finally by using a random number generator to give the start time of the 10&#x2009;s segment (at a resolution of 2.5&#x2009;ms). In the cases where more than two labels were used (Paradigms 3 and 4), the same procedure was used to up-sample all labels to match the label with the highest number of files.</p>
<p>The second dataset used to train the model consisted of 1&#x2009;min segments of EEG recordings. The parameters of the LSTM units were held constant while the classifier was trained. Up-sampling of this dataset was performed by creating random noise (&#x00B1; 5%) of the inputs into the classifier.</p>
<p>Unbalanced datasets were always used to test the models. To create the test datasets, for every file of 1-min of EEG recording, five 10&#x2009;s samples were generated with no overlap (0&#x2013;10&#x2009;s, 10&#x2013;20&#x2009;s, etc.). A sixth sample was not created because it would require some level of overlap due to the final recorded sampling rate being just below 400&#x2009;Hz (approximately 399.6&#x2009;Hz).</p>
<p>Model development and hyperparameter exploration was performed with three patients (Patients 1, 6 and 13) using a subset of the training data. <italic>None of the final test dataset data was accessed until the final models were run on the test data. Furthermore, no data from 7 out of 10 patients was accessed until the final training and test runs of these models.</italic></p>
</sec>
<sec id="sec8">
<label>2.2</label>
<title>The model</title>
<p><xref ref-type="fig" rid="fig1">Figure 1</xref> describes the model structure. 1&#x2009;min segments of the EEG recordings at 400&#x2009;Hz across 16 electrodes were used as the input into the model. The 1&#x2009;min recordings were broken up into five 10&#x2009;s segments with no overlap. Each 10&#x2009;s segment was played into the LSTM model. Five outputs from the LSTM model were combined with time information through a simple classifier to generate a final forecast or prediction.</p>
<fig position="float" id="fig1">
<label>Figure 1</label>
<caption>
<p>A schematic diagram of the overall model. 1&#x2009;min segments of the EEG recordings at 400&#x2009;Hz across 16 electrodes were used as the input. The 1&#x2009;min recordings were broken up into five 10&#x2009;s segments with no overlap. Each 10&#x2009;s segment was played into the LSTM model (details given in the inserted table). The output of the LSTM model was two, four, or five values (depending on the number of data labels for that experimental paradigm, as indicated by &#x201C;# labels&#x201D; in the figure). The output of five LSTM models was combined with time information through a simple dense classifier. The dense classifier comprised of two dense layers separated by a dropout layer.</p>
</caption>
<graphic xlink:href="fnins-18-1472747-g001.tif"/>
</fig>
<sec id="sec9">
<label>2.2.1</label>
<title>LSTM model</title>
<p>The model development and a range of machine learning model structures tested are described in the <xref ref-type="supplementary-material" rid="SM1">Supplementary material</xref>. LSTM units were used to process 10&#x2009;s segments of raw EEG recordings. LSTM units can process time series data through two state parameters and a series of three gates [for a full description see (<xref ref-type="bibr" rid="ref9">Hochreiter and Schmidhuber, 1997</xref>)]. For each data point in the time series, the LSTM unit calculates the two state parameters using the three gates. The two state parameters are a cell state (<italic>C<sub>t</sub></italic>) and a hidden state (<italic>h<sub>t</sub></italic>). The cell state contains information that can be retained for many time steps. The hidden state produces the new output of the LSTM unit at each time step. The three gates are an input gate (<italic>i<sub>t</sub></italic>), a forget gate (<italic>f<sub>t</sub></italic>) and an output gate (<italic>o<sub>t</sub></italic>). The input gate determines if the cell state should be updated with information from the current data point and the previous hidden state (<xref ref-type="disp-formula" rid="EQ1">Equation 1</xref>). The forget gate determines what to keep or forget from the current data point and previous hidden state (<xref ref-type="disp-formula" rid="EQ2">Equation 2</xref>). The output gate determines what information from the current data point and the previous hidden state is used to update the hidden state (<xref ref-type="disp-formula" rid="EQ3">Equation 3</xref>). Finally, the cell state and hidden state are updated. The cell state is updated by combining the output of the forget gate multiplied by the previous cell state with the output of the input gate multiplied by a potential new cell state (<xref ref-type="disp-formula" rid="EQ4">Equations 4</xref> and <xref ref-type="disp-formula" rid="EQ5">5</xref>). The hidden state is updated by combining the output gate with the cell state (<xref ref-type="disp-formula" rid="EQ6">Equation 6</xref>). For each gate, there are weights (W) and bias (U) parameters that are adjusted in training to learn the useful information required for seizure predictions. The equations to describing an LSTM unit are as follows:<disp-formula id="EQ1">
<label>(1)</label>
<mml:math id="M1">
<mml:msub>
<mml:mi>i</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>&#x03C3;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:msup>
<mml:mi>U</mml:mi>
<mml:mi>i</mml:mi>
</mml:msup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mi>W</mml:mi>
<mml:mi>i</mml:mi>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:math>
</disp-formula><disp-formula id="EQ2">
<label>(2)</label>
<mml:math id="M2">
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>&#x03C3;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:msup>
<mml:mi>U</mml:mi>
<mml:mi>f</mml:mi>
</mml:msup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mi>W</mml:mi>
<mml:mi>f</mml:mi>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:math>
</disp-formula><disp-formula id="EQ3">
<label>(3)</label>
<mml:math id="M3">
<mml:msub>
<mml:mi>o</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>&#x03C3;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:msup>
<mml:mi>U</mml:mi>
<mml:mi>o</mml:mi>
</mml:msup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mi>W</mml:mi>
<mml:mi>o</mml:mi>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:math>
</disp-formula><disp-formula id="EQ4">
<label>(4)</label>
<mml:math id="M4">
<mml:msub>
<mml:mover accent="true">
<mml:mi>C</mml:mi>
<mml:mo stretchy="true">&#x02DC;</mml:mo>
</mml:mover>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mo>tanh</mml:mo>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mi>x</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:msup>
<mml:mi>U</mml:mi>
<mml:mi>g</mml:mi>
</mml:msup>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:msup>
<mml:mi>W</mml:mi>
<mml:mi>g</mml:mi>
</mml:msup>
</mml:mrow>
</mml:mfenced>
</mml:math>
</disp-formula><disp-formula id="EQ5">
<label>(5)</label>
<mml:math id="M5">
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mi>&#x03C3;</mml:mi>
<mml:mfenced open="(" close=")">
<mml:mrow>
<mml:msub>
<mml:mi>f</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:mo>&#x2217;</mml:mo>
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mrow>
<mml:mi>t</mml:mi>
<mml:mo>&#x2212;</mml:mo>
<mml:mn>1</mml:mn>
</mml:mrow>
</mml:msub>
<mml:mo>+</mml:mo>
<mml:msub>
<mml:mi>i</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:mo>&#x2217;</mml:mo>
<mml:msub>
<mml:mover accent="true">
<mml:mi>C</mml:mi>
<mml:mo stretchy="true">&#x02DC;</mml:mo>
</mml:mover>
<mml:mi>t</mml:mi>
</mml:msub>
</mml:mrow>
</mml:mfenced>
</mml:math>
</disp-formula><disp-formula id="EQ6">
<label>(6)</label>
<mml:math id="M6">
<mml:msub>
<mml:mi>h</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
<mml:mo>=</mml:mo>
<mml:mo>tanh</mml:mo>
<mml:mfenced open="(" close=")">
<mml:msub>
<mml:mi>C</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
</mml:mfenced>
<mml:mo>&#x2217;</mml:mo>
<mml:msub>
<mml:mi>o</mml:mi>
<mml:mi>t</mml:mi>
</mml:msub>
</mml:math>
</disp-formula></p>
<p>Where <inline-formula>
<mml:math id="M7">
<mml:mi>&#x03C3;</mml:mi>
</mml:math>
</inline-formula> and <italic>tanh</italic> are the activation functions.</p>
<p>The model was made up of four LSTM layers, where each layer was separated by a max pooling layer, giving a total of three max pooling layers. The first three LSTM layers return the full sequence, so did not change the amount of data within the model. The max pooling layers were used to reduce the amount of data. Due to this reduction in data size, the number of LSTM units in each layer was reduced to speed up the training time. The final LSTM layer only returned a single value representing the final cell state. There was a final dense layer to reduce the number of variables within the model to be the same as the number of labels used in the data. For the LSTM layers, a sigmoid function was used for both the activation and recurrent activation. There was also a recurrent dropout (a dropout of the recurrent state during the linear transformation from one time step to the next) of 0.25. Adam (<xref ref-type="bibr" rid="ref16">Kingma and Ba, 2014</xref>) was used as the optimizer with a learning rate of 10<sup>&#x2212;4</sup>. Mean squared error was used as the loss function given that each label had its own output, which was set to zero or one.</p>
</sec>
<sec id="sec10">
<label>2.2.2</label>
<title>Combining LSTM model output with time information</title>
<p>Previously, it has been shown that seizures occur in cycles where the cycles can range from hours to months (<xref ref-type="bibr" rid="ref14">Karoly et al., 2018</xref>; <xref ref-type="bibr" rid="ref15">Karoly et al., 2017</xref>). It has also been shown that including time-of-day information with information from EEG improves seizure predictions (<xref ref-type="bibr" rid="ref17">Kiral-Kornek et al., 2018</xref>). Therefore, we combined the output of the LSTM model with time information (<xref ref-type="fig" rid="fig1">Figure 1</xref>). For every 1&#x2009;min of EEG recording, five 10&#x2009;s samples with no overlap were selected and input to the LSTM model. The outputs from the five LSTM models were combined with time information. There were nine values for the time information:<list list-type="bullet">
<list-item>
<p>Two values for the hour of day (24&#x2009;h cycle).</p>
</list-item>
<list-item>
<p>Two values for the day of the month (31&#x2009;day&#x2009;cycle).</p>
</list-item>
<list-item>
<p>Two values for the month of the year (12&#x2009;month&#x2009;cycle).</p>
</list-item>
<list-item>
<p>Two values day of the week (7&#x2009;day&#x2009;cycle).</p>
</list-item>
<list-item>
<p>The log of the minutes since the last seizure (while not related to the time of day, this value was added to help the model identify cycles that did not easily fit into the four cycles relating to time, such as a 12&#x2009;day&#x2009;cycle).</p>
</list-item>
</list></p>
<p>For each of the four cycles regarding time, two values were given. The first represented the actual value and the second represented the time period from the start of the cycle, to provide the cyclic information of time to the classifier. Both values were normalized to the range of 0&#x2013;5. Both values were calculated with a resolution of 1&#x2009;min, so that each 1&#x2009;min file of EEG recording had a unique value for each parameter of the time information.</p>
<p>The output of the LSTM models and the time information was combined using a simple dense (or fully connected) classifier. This classifier comprised two dense layers separated by a dropout layer. The number of neurons in the first dense layer was 10 times the number of data labels. The dropout rate used was 0.25. The number of neurons in the second dense layers was equal to the number of data labels. A sigmoid activation function was used in both dense layers. Again, Adam was used as the optimizer with learning rate 10<sup>&#x2212;4</sup>. Mean squared error was used as the loss function.</p>
</sec>
</sec>
<sec id="sec11">
<label>2.3</label>
<title>Experimental paradigms</title>
<p>Four different experimental paradigms were tested to see if the LSTM correctly classifies EEG signals with different labelling systems:</p>
<p>Paradigm 1: Pre-ictal was labelled as 1&#x2013;16&#x2009;min prior to seizure and inter-ictal was labelled as more than 16&#x2009;min before a seizure. This matched the labelling used in the Deep CNN model (<xref ref-type="bibr" rid="ref17">Kiral-Kornek et al., 2018</xref>). The Deep CNN model was chosen as a comparison because it was very similar to this model in terms of using machine learning algorithms with EEG data and time information.</p>
<p>Paradigm 2: Pre-ictal was labelled as 1&#x2013;4&#x2009;min prior to seizure and inter-ictal was labelled as more than 4&#x2009;min before a seizure. This matched the labelling used in the critical slowing model (<xref ref-type="bibr" rid="ref25">Maturana et al., 2020</xref>). The critical slowing model was chosen as a comparison because it has produced the best results to date.</p>
<p>Paradigm 3: EEG data was classified into four different labels relating to the time prior to seizure. Label 1 was 1&#x2013;15&#x2009;min before a seizure, label 2 was 15&#x2013;75&#x2009;min before a seizure, label 3 was 75&#x2009;min-24&#x2009;h before a seizure, and label 4 was more than 24&#x2009;h before a seizure.</p>
<p>Paradigm 4: EEG data was classified into five different labels relating to the time prior to seizure. Label 1 was 1&#x2013;5&#x2009;min before a seizure, label 2 was 5&#x2013;65&#x2009;min before a seizure, label 3 was 65&#x2009;min-8&#x2009;h before a seizure, label 4 was 8&#x2013;24&#x2009;h before a seizure, and label 5 was more than 24&#x2009;h before a seizure.</p>
</sec>
<sec id="sec12">
<label>2.4</label>
<title>Statistics</title>
<p>To analyze the output from the experimental paradigms 1 and 2, we used the Receiver Operator Characteristic (ROC) curve. We calculated a linear combination of the two output values from the model (in paradigms 1 and 2) to create a single value as the receiver operator. The ROC curve characterizes the relationship between two parameters defined as the true positive rate (proportion of true positives to true positives plus false negative) and false positive rate (proportion of false positives to false positives plus true negatives). The Area under the Curve (AUC) measures the area underneath the entire ROC curve, with greater AUC representing better performance.</p>
<p>To compare AUCs, we calculated confidence intervals using the Hanley and McNeil method (<xref ref-type="bibr" rid="ref8">Hanley and McNeil, 1983</xref>). A difference between AUCs was considered statistically significant when there was no overlap between the confidence intervals of both AUCs. When comparing an AUC to a random predictor, if the lower bound of the confidence interval was above 0.5 it was considered statistically significant.</p>
</sec>
</sec>
<sec sec-type="results" id="sec13">
<label>3</label>
<title>Results</title>
<p>We created a framework using LSTMs to process raw EEG signals to make seizure predictions without the use of any feature engineering. The LSTM models make predictions well above a random predictor and better than several publications using the same dataset. Furthermore, this framework could still produce good predictions when the experimental paradigm design was altered.</p>
<sec id="sec14">
<label>3.1</label>
<title>LSTMs can classify unprocessed EEG recordings to predict seizures</title>
<p>To ensure the LSTMs could classify EEG signals, we created artificial classes of EEG data by inserting a marker (distinct signal of 25 milliseconds) into the EEG recordings of patients. We demonstrated that LSTMs could classify EEG these artificial classes (see <xref ref-type="supplementary-material" rid="SM1">Supplementary information</xref>). The model was then tested to classify pre-ictal versus inter-ictal for three patients, which it did well above chance. We improved the performance by incorporating time information (to assist the model in identifying seizure cycles) and LSTM predictions over five 10&#x2009;s periods. We ran this final model using a test set of 10 patients, training on the first 80% of seizures and testing on the final 20% of seizures. <italic>This meant the training data from seven patients had never been seen by our model and the test dataset had never been seen by any of our models.</italic> All results presented below are from the final test dataset.</p>
<p><xref ref-type="fig" rid="fig2">Figure 2</xref> displays the ROC curves for 10 patients for paradigm 1 and 2. The model performed much better than a random predictor (<xref ref-type="table" rid="tab1">Table 1</xref>). Comparing panels A and B in <xref ref-type="fig" rid="fig2">Figure 2</xref> shows the effects of changing the data labels, where three patients show a statistically significant difference (<xref ref-type="table" rid="tab1">Table 1</xref>). Patient 1 shows a significant decrease when using the 1&#x2013;4&#x2009;min prior to seizure, whereas Patients 6 and 13 show a significant increase when using the 1&#x2013;4&#x2009;min prior to seizure. It should also be noted that Patient 10 showed an increase that was almost significant.</p>
<fig position="float" id="fig2">
<label>Figure 2</label>
<caption>
<p>Receiver operator characteristics (ROC) curves for all 10 patients for paradigm 1 (Panel A) and paradigm 2 (Panel B). For paradigm 1 (Panel A), pre-ictal data was labelled as 1-16 minutes prior to seizure and inter-ictal as more than 16 minutes. For paradigm 2 (Panel B), pre-ictal data was labelled as 1-4 minutes prior to seizure and inter-ictal as more than 4 minutes. Area under the curve (AUC) values are indicated in the legend. A random predictor is indicated by the black line.</p>
</caption>
<graphic xlink:href="fnins-18-1472747-g002.tif"/>
</fig>
<table-wrap position="float" id="tab1">
<label>Table 1</label>
<caption>
<p>The AUC values and Hanley McNeil confidence intervals.</p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th align="left" valign="top">Patient</th>
<th align="center" valign="top">Paradigm 1 AUC</th>
<th align="center" valign="top">Paradigm 2 AUC</th>
<th align="center" valign="top">No overlap in the confidence interval (Paradigm 1 compared to Paradigm 2)</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="top">Patient 1</td>
<td align="center" valign="top">0.86 (&#x00B1;0.039)</td>
<td align="center" valign="top">0.74 (&#x00B1;0.083)</td>
<td align="center" valign="top">&#x002A;</td>
</tr>
<tr>
<td align="left" valign="top">Patient 2</td>
<td align="center" valign="top">0.86 (&#x00B1;0.053)</td>
<td align="center" valign="top">0.82 (&#x00B1;0.100)</td>
<td/>
</tr>
<tr>
<td align="left" valign="top">Patient 3</td>
<td align="center" valign="top">0.73 (&#x00B1;0.019)</td>
<td align="center" valign="top">0.75 (&#x00B1;0.033)</td>
<td/>
</tr>
<tr>
<td align="left" valign="top">Patient 6</td>
<td align="center" valign="top">0.63 (&#x00B1;0.046)</td>
<td align="center" valign="top">0.77 (&#x00B1;0.077)</td>
<td align="center" valign="top">&#x002A;</td>
</tr>
<tr>
<td align="left" valign="top">Patient 8</td>
<td align="center" valign="top">0.83 (&#x00B1;0.019)</td>
<td align="center" valign="top">0.86 (&#x00B1;0.032)</td>
<td/>
</tr>
<tr>
<td align="left" valign="top">Patient 9</td>
<td align="center" valign="top">0.81 (&#x00B1;0.029)</td>
<td align="center" valign="top">0.86 (&#x00B1;0.050)</td>
<td/>
</tr>
<tr>
<td align="left" valign="top">Patient 10</td>
<td align="center" valign="top">0.73 (&#x00B1;0.024)</td>
<td align="center" valign="top">0.79 (&#x00B1;0.043)</td>
<td align="center" valign="top">#</td>
</tr>
<tr>
<td align="left" valign="top">Patient 11</td>
<td align="center" valign="top">0.89 (&#x00B1;0.017)</td>
<td align="center" valign="top">0.88 (&#x00B1;0.031)</td>
<td/>
</tr>
<tr>
<td align="left" valign="top">Patient 13</td>
<td align="center" valign="top">0.78 (&#x00B1;0.019)</td>
<td align="center" valign="top">0.83 (&#x00B1;0.031)</td>
<td align="center" valign="top">&#x002A;</td>
</tr>
<tr>
<td align="left" valign="top">Patient 15</td>
<td align="center" valign="top">0.70 (&#x00B1;0.039)</td>
<td align="center" valign="top">0.69 (&#x00B1;0.072)</td>
<td/>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p>The AUC values and Hanley McNeil confidence intervals for all patients from experimental Paradigms 1 and 2. For Paradigm 1, pre-ictal was defined as 1&#x2013;16&#x2009;min before seizure. For Paradigm 2, pre-ictal was defined as 1&#x2013;4&#x2009;min before seizure. When comparing an AUC to a random predictor, if the lower bound of the confidence interval was above 0.5 it was considered statistically significant, which indicates at all results for Paradigm 1 and Paradigm 2 were significantly better than a random predictor. The fourth column indicates if there was no overlap in the confidence interval when comparing the results in Paradigm 1 with the results in Paradigm 2 (&#x002A; indicates that there was no overlap, # indicates a minor overlap of 0.003).</p>
</table-wrap-foot>
</table-wrap>
</sec>
<sec id="sec15">
<label>3.2</label>
<title>Comparison to previously published models using the same dataset</title>
<p>Our model performed better than a random predictor, but there have been many studies using the same dataset that have also performed well [for example, (<xref ref-type="bibr" rid="ref4">Chen et al., 2022</xref>; <xref ref-type="bibr" rid="ref5">Cook et al., 2013</xref>; <xref ref-type="bibr" rid="ref14">Karoly et al., 2018</xref>; <xref ref-type="bibr" rid="ref15">Karoly et al., 2017</xref>; <xref ref-type="bibr" rid="ref17">Kiral-Kornek et al., 2018</xref>; <xref ref-type="bibr" rid="ref25">Maturana et al., 2020</xref>)]. To compare the performance of this model to previous models, we chose to two top-performing models, the Deep CNN model (<xref ref-type="bibr" rid="ref17">Kiral-Kornek et al., 2018</xref>) and the critical slowing model (<xref ref-type="bibr" rid="ref25">Maturana et al., 2020</xref>). Performance of these models was reported using the metrics sensitivity and time in high. Sensitivity represents the proportion of pre-ictal data correctly predicted. Time in high represents the proportion of all predictions that are labelled as pre-ictal. Therefore, desired performance is sensitivity as high as possible while keeping time in high as low as possible. Since sensitivity and time in high are a snapshot of the ROC curve at one location, to compare these results with our model, we looked up the closest matching sensitivity (which allowed a direct comparison of the time in highs) and the closest matching time in high (which allowed a direct comparison of the sensitivities). However, it should be noted that this is not a perfect comparison. Both previous studies are designed to process a continuous stream of data and flag a warning if a seizure is imminent. While this current algorithm classifies 1&#x2009;min segments of EEG, it can readily be implemented to update this classification every 2.5&#x2009;msec (or every time step), hereby producing the equivalent forecasts. Such an implementation makes very little difference in the results presented in this work because it just increases the number of samples without changing the data presented to the model. A major difference between this work and the previous models is the calculation of the sensitivity. Previous models have calculated sensitivity as a seizure level event. That is, if the model produces a warning once during the pre-ictal period it is considered to accurately predict that seizure. Whereas in this current work every sample in the pre-ictal period needs to be classified as pre-ictal to achieve the highest sensitivity, which is more difficult. Furthermore, calculating the sensitivity as a seizure level event can cause issues with calculating the time in high, unless the time in high is adjusted so that every seizure warning produces a time in high for the same duration has the length of the pre-ictal period. Without this adjustment, a discrepancy between the time scales for the sensitivity and time in high is introduced. This current work avoids such a discrepancy to accurately produce ROC curves.</p>
<p><xref ref-type="table" rid="tab2">Table 2</xref> compares the results of the Deep CNN model with LSTM model for Paradigm 1. The columns under the LSTM heading represent values when the pre-ictal label was higher than the inter-ictal label or a threshold of 0.5 on the ROC curve. Matching the sensitivity or time in high to the published values in the Deep CNN paper allows a direct comparison, which shows the LSTM model performed better for Patients 1, 3, 8, 9, 15. Patient 2 did not provide a good match with either the sensitivity or time in high due to jumps in the values, but our model did provide a slightly lower sensitivity for a far lower time in high. For Patient 11, both models produced almost the same performance. The Deep CNN model performed better for Patients 10 and 13.</p>
<table-wrap position="float" id="tab2">
<label>Table 2</label>
<caption>
<p>Comparison between Deep CNN model (<xref ref-type="bibr" rid="ref17">Kiral-Kornek et al., 2018</xref>) and Paradigm 1.</p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th rowspan="2"/>
<th align="center" valign="top" colspan="2">Deep CNN</th>
<th align="center" valign="top" colspan="2">LSTM</th>
<th align="center" valign="top" colspan="2">LSTM with matched sensitivity</th>
<th align="center" valign="top" colspan="2">LSTM with matched time in high</th>
</tr>
<tr>
<th align="center" valign="top">Sensitivity</th>
<th align="center" valign="top">Time in High</th>
<th align="center" valign="top">Sensitivity</th>
<th align="center" valign="top">Time in High</th>
<th align="center" valign="top">Sensitivity</th>
<th align="center" valign="top">Time in High</th>
<th align="center" valign="top">Sensitivity</th>
<th align="center" valign="top">Time in High</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="middle"><bold>Patient 1</bold></td>
<td align="center" valign="middle"><bold>0.65</bold></td>
<td align="center" valign="middle"><bold>0.21</bold></td>
<td align="center" valign="middle"><bold>0.39</bold></td>
<td align="center" valign="middle"><bold>0.02</bold></td>
<td align="center" valign="middle"><bold>0.65</bold></td>
<td align="center" valign="middle"><bold>0.18</bold></td>
<td align="center" valign="middle"><bold>0.69</bold></td>
<td align="center" valign="middle"><bold>0.21</bold></td>
</tr>
<tr>
<td align="left" valign="middle">Patient 2</td>
<td align="center" valign="middle">0.74</td>
<td align="center" valign="middle">0.11</td>
<td align="center" valign="middle">0.57</td>
<td align="center" valign="middle">0.002</td>
<td align="center" valign="middle">0.62</td>
<td align="center" valign="middle">0.01</td>
<td align="center" valign="middle">0.62</td>
<td align="center" valign="middle">0.06</td>
</tr>
<tr>
<td align="left" valign="middle"><bold>Patient 3</bold></td>
<td align="center" valign="middle"><bold>0.71</bold></td>
<td align="center" valign="middle"><bold>0.53</bold></td>
<td align="center" valign="middle"><bold>0.69</bold></td>
<td align="center" valign="middle"><bold>0.39</bold></td>
<td align="center" valign="middle"><bold>0.71</bold></td>
<td align="center" valign="middle"><bold>0.41</bold></td>
<td align="center" valign="middle"><bold>0.89</bold></td>
<td align="center" valign="middle"><bold>0.53</bold></td>
</tr>
<tr>
<td align="left" valign="middle">Patient 6</td>
<td/>
<td/>
<td align="center" valign="middle">0.18</td>
<td align="center" valign="middle">0.06</td>
<td/>
<td/>
<td/>
<td/>
</tr>
<tr>
<td align="left" valign="middle"><bold>Patient 8</bold></td>
<td align="center" valign="middle"><bold>0.77</bold></td>
<td align="center" valign="middle"><bold>0.32</bold></td>
<td align="center" valign="middle"><bold>0.78</bold></td>
<td align="center" valign="middle"><bold>0.21</bold></td>
<td align="center" valign="middle"><bold>0.77</bold></td>
<td align="center" valign="middle"><bold>0.25</bold></td>
<td align="center" valign="middle"><bold>0.84</bold></td>
<td align="center" valign="middle"><bold>0.32</bold></td>
</tr>
<tr>
<td align="left" valign="middle"><bold>Patient 9</bold></td>
<td align="center" valign="middle"><bold>0.83</bold></td>
<td align="center" valign="middle"><bold>0.43</bold></td>
<td align="center" valign="middle"><bold>0.81</bold></td>
<td align="center" valign="middle"><bold>0.30</bold></td>
<td align="center" valign="middle"><bold>0.83</bold></td>
<td align="center" valign="middle"><bold>0.32</bold></td>
<td align="center" valign="middle"><bold>0.90</bold></td>
<td align="center" valign="middle"><bold>0.43</bold></td>
</tr>
<tr>
<td align="left" valign="middle">Patient 10</td>
<td align="center" valign="middle">0.68</td>
<td align="center" valign="middle">0.32</td>
<td align="center" valign="middle">0.50</td>
<td align="center" valign="middle">0.18</td>
<td align="center" valign="middle">0.68</td>
<td align="center" valign="middle">0.36</td>
<td align="center" valign="middle">0.64</td>
<td align="center" valign="middle">0.32</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 11</td>
<td align="center" valign="middle">0.78</td>
<td align="center" valign="middle">0.18</td>
<td align="center" valign="middle">0.62</td>
<td align="center" valign="middle">0.09</td>
<td align="center" valign="middle">0.78</td>
<td align="center" valign="middle">0.17</td>
<td align="center" valign="middle">0.79</td>
<td align="center" valign="middle">0.18</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 13</td>
<td align="center" valign="middle">0.70</td>
<td align="center" valign="middle">0.21</td>
<td align="center" valign="middle">0.63</td>
<td align="center" valign="middle">0.14</td>
<td align="center" valign="middle">0.70</td>
<td align="center" valign="middle">0.25</td>
<td align="center" valign="middle">0.68</td>
<td align="center" valign="middle">0.21</td>
</tr>
<tr>
<td align="left" valign="middle"><bold>Patient 15</bold></td>
<td align="center" valign="middle"><bold>0.59</bold></td>
<td align="center" valign="middle"><bold>0.37</bold></td>
<td align="center" valign="middle"><bold>0.04</bold></td>
<td align="center" valign="middle"><bold>0.008</bold></td>
<td align="center" valign="middle"><bold>0.59</bold></td>
<td align="center" valign="middle"><bold>0.28</bold></td>
<td align="center" valign="middle"><bold>0.72</bold></td>
<td align="center" valign="middle"><bold>0.37</bold></td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p>Comparison of the results of the Deep CNN model (<xref ref-type="bibr" rid="ref17">Kiral-Kornek et al., 2018</xref>) with the LSTM model for Paradigm 1. The columns under the LSTM heading represent the sensitivity and time in high for when the pre-ictal label was higher than the inter-ictal label or a threshold of 0.5 on the ROC curve. Matching the sensitivity or time in high to the published values in the Deep CNN paper allows a direct comparison between the results. When the current LSTM model performed better than Deep CNN model values are highlighted in bold.</p>
</table-wrap-foot>
</table-wrap>
<p><xref ref-type="table" rid="tab3">Table 3</xref> compares the results of the critical slowing model with the LSTM model for Paradigm 2. Again, matching the sensitivity or time in high shows the critical slowing model performed better for Patients 1, 2, 6, 9, 10, 11 and 15. The LSTM model performed better for Patients 8 and 13.</p>
<table-wrap position="float" id="tab3">
<label>Table 3</label>
<caption>
<p>Comparison between critical slowing model (<xref ref-type="bibr" rid="ref25">Maturana et al., 2020</xref>) and Paradigm 2.</p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th rowspan="2"/>
<th align="center" valign="top" colspan="2">Critical slowing</th>
<th align="center" valign="top" colspan="2">LSTM</th>
<th align="center" valign="top" colspan="2">LSTM with matched sensitivity</th>
<th align="center" valign="top" colspan="2">LSTM with matched time in high</th>
</tr>
<tr>
<th align="center" valign="top">Sensitivity</th>
<th align="center" valign="top">Time in High</th>
<th align="center" valign="top">Sensitivity</th>
<th align="center" valign="top">Time in High</th>
<th align="center" valign="top">Sensitivity</th>
<th align="center" valign="top">Time in High</th>
<th align="center" valign="top">Sensitivity</th>
<th align="center" valign="top">Time in High</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="middle">Patient 1</td>
<td align="center" valign="bottom">0.83</td>
<td align="center" valign="bottom">0.08</td>
<td align="center" valign="bottom">0.22</td>
<td align="center" valign="bottom">0.02</td>
<td align="center" valign="top">0.83</td>
<td align="center" valign="top">0.42</td>
<td align="center" valign="top">0.48</td>
<td align="center" valign="top">0.08</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 2</td>
<td align="center" valign="bottom">0.87</td>
<td align="center" valign="bottom">0.0002</td>
<td align="center" valign="bottom">0.69</td>
<td align="center" valign="bottom">0.004</td>
<td align="center" valign="top">0.85</td>
<td align="center" valign="top">0.38</td>
<td align="center" valign="top">0.61</td>
<td align="center" valign="top">0.001</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 3</td>
<td/>
<td/>
<td align="center" valign="bottom">0.49</td>
<td align="center" valign="bottom">0.12</td>
<td/>
<td/>
<td/>
<td/>
</tr>
<tr>
<td align="left" valign="middle">Patient 6</td>
<td align="center" valign="bottom">0.66</td>
<td align="center" valign="bottom">0.03</td>
<td align="center" valign="bottom">0.28</td>
<td align="center" valign="bottom">0.06</td>
<td align="center" valign="top">0.66</td>
<td align="center" valign="top">0.21</td>
<td align="center" valign="top">0.08</td>
<td align="center" valign="top">0.03</td>
</tr>
<tr>
<td align="left" valign="middle"><bold>Patient 8</bold></td>
<td align="center" valign="bottom"><bold>0.64</bold></td>
<td align="center" valign="bottom"><bold>0.23</bold></td>
<td align="center" valign="bottom"><bold>0.78</bold></td>
<td align="center" valign="bottom"><bold>0.20</bold></td>
<td align="center" valign="top"><bold>0.64</bold></td>
<td align="center" valign="top"><bold>0.12</bold></td>
<td align="center" valign="top"><bold>0.81</bold></td>
<td align="center" valign="top"><bold>0.23</bold></td>
</tr>
<tr>
<td align="left" valign="middle">Patient 9</td>
<td align="center" valign="bottom">0.85</td>
<td align="center" valign="bottom">0.16</td>
<td align="center" valign="bottom">0.84</td>
<td align="center" valign="bottom">0.26</td>
<td align="center" valign="top">0.85</td>
<td align="center" valign="top">0.26</td>
<td align="center" valign="top">0.72</td>
<td align="center" valign="top">0.16</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 10</td>
<td align="center" valign="bottom">0.78</td>
<td align="center" valign="bottom">0.24</td>
<td align="center" valign="bottom">0.58</td>
<td align="center" valign="bottom">0.17</td>
<td align="center" valign="top">0.78</td>
<td align="center" valign="top">0.34</td>
<td align="center" valign="top">0.64</td>
<td align="center" valign="top">0.24</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 11</td>
<td align="center" valign="bottom">0.86</td>
<td align="center" valign="bottom">0.16</td>
<td align="center" valign="bottom">0.38</td>
<td align="center" valign="bottom">0.04</td>
<td align="center" valign="top">0.86</td>
<td align="center" valign="top">0.26</td>
<td align="center" valign="top">0.72</td>
<td align="center" valign="top">0.16</td>
</tr>
<tr>
<td align="left" valign="middle"><bold>Patient 13</bold></td>
<td align="center" valign="bottom"><bold>0.64</bold></td>
<td align="center" valign="bottom"><bold>0.14</bold></td>
<td align="center" valign="bottom"><bold>0.75</bold></td>
<td align="center" valign="bottom"><bold>0.17</bold></td>
<td align="center" valign="top"><bold>0.64</bold></td>
<td align="center" valign="top"><bold>0.10</bold></td>
<td align="center" valign="top"><bold>0.72</bold></td>
<td align="center" valign="top"><bold>0.14</bold></td>
</tr>
<tr>
<td align="left" valign="middle">Patient 15</td>
<td align="center" valign="bottom">0.87</td>
<td align="center" valign="bottom">0.0007</td>
<td align="center" valign="bottom">0.08</td>
<td align="center" valign="bottom">0.01</td>
<td align="center" valign="top">0.83</td>
<td align="center" valign="top">0.73</td>
<td align="center" valign="top">0.03</td>
<td align="center" valign="top">0.0007</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p>Compares the results of the critical slowing model (<xref ref-type="bibr" rid="ref25">Maturana et al., 2020</xref>) with the LSTM model for paradigm 2. The columns under the LSTM heading represent the sensitivity and time in high for when the pre-ictal label was higher than the inter-ictal label or a threshold of 0.5 on the ROC curve. Matching the sensitivity or time in high to the published values in the critical slowing paper allows a direct comparison between the results. When the current LSTM model performed better than critical slowing model, values are highlighted in bold.</p>
</table-wrap-foot>
</table-wrap>
</sec>
<sec id="sec16">
<label>3.3</label>
<title>Changing the experimental paradigm to a multi-class system using four and five data labels</title>
<p>Since our LSTM model can process raw EEG and classify pre-ictal versus inter-ictal, we tested to see if the model can classify raw EEG into more than two categories. This is like the original clinical feasibility study, where the patient advisory system indicated the seizure risk as low, moderate, or high. In this study, we labelled the data according to the time prior to seizure using either a four-label system or a five-label system, as described in paradigms 3 and 4.</p>
<p>For both paradigms 3 and 4, the LSTM model was able to process the raw EEG and classify it into one of the labels with much better accuracy than a random predictor. The confusion matrixes of 10 patients for paradigms 3 and 4 are provided in the <xref ref-type="supplementary-material" rid="SM1">Supplementary information</xref>. All patients showed a total accuracy above a random predictor for paradigm 3 (0.33&#x2013;0.83, range of total accuracy across all patients) and paradigm 4 (0.27&#x2013;0.78, range of total accuracy across all patients). The large range observed in the total accuracy was due to changes in performance of labels with a large proportion of the data (for example, comparing labels 8&#x2013;24&#x2009;h prior to seizure with more than 24&#x2009;h). Furthermore, the proportion of samples selected for each label showed proportions like the actual proportions of the test dataset. Given the model was trained on a balanced dataset, these results indicate the model was working well and far better than a random predictor. Taking the total accuracy and the proportion of time each label was selected together, the model performed many times better than a random predictor.</p>
<p>The results could also be compared to a random predictor with the same time selected for each label. Taking Patient 1 in paradigm 3 as an example, a random predictor that selects 1&#x2013;15&#x2009;min prior to seizure 0.021 of the time, would have a sensitivity of 0.021 (when normalized along the actual row), whereas our model has a higher sensitivity of 0.364. Performing the same comparison for all labels over all patients for paradigm 3, this model performed better than a random predictor with the same time selections for 95% of labels and more than 0.1 better for 50% of labels. Similarly, for paradigm 4, this model performed better for 88% of labels and more than 0.1 higher for 56% of labels.</p>
<p>Therefore, the performance of the LSTM model was better than a random predictor for paradigms 3 and 4, but not as good as the performance for paradigms 1 and 2. Whilst this is expected due to the larger number of labels, providing more labels means the model is producing more information, which could be used by patients to meet their personal needs. We tested this idea by having the classifier (<xref ref-type="fig" rid="fig1">Figure 1</xref>) train and predict on a new set of data labels (dLSTM). In this case, the classifier was trained on data labelled as pre-ictal when 40&#x2013;80&#x2009;min prior to seizure and inter-ictal for more than 80&#x2009;min prior to seizure. <xref ref-type="table" rid="tab4">Table 4</xref> shows the AUCs for these two models and for the CNN-LSTM model (<xref ref-type="bibr" rid="ref28">Payne et al., 2023</xref>) with the same pre-ictal and inter-ictal definition. These results again show the seizure predictions were well above a random predictor (which would have an AUC of 0.5). For the dLSTMs trained on four labels, three patients had statistically significant increases in the AUC compared to the CNN-LSTM model and one patient had a statistically significant decrease. For the dLSTMs trained on five labels, two patients showed a statistically significant improvement in AUC compared to the CNN-LSTM model.</p>
<table-wrap position="float" id="tab4">
<label>Table 4</label>
<caption>
<p>Comparison between two dLSTM models and CNN-LSTM model (<xref ref-type="bibr" rid="ref28">Payne et al., 2023</xref>).</p>
</caption>
<table frame="hsides" rules="groups">
<thead>
<tr>
<th/>
<th align="center" valign="top">dLSTM with 4 labels</th>
<th align="center" valign="top">dLSTM with 5 labels</th>
<th align="center" valign="top">CNN-LSTM</th>
</tr>
</thead>
<tbody>
<tr>
<td align="left" valign="middle">Patient 1</td>
<td align="center" valign="top">0.83 (&#x00B1;0.028)<xref ref-type="table-fn" rid="tfn1">
<sup>&#x002A;</sup></xref></td>
<td align="center" valign="top">0.79 (&#x00B1;0.030)</td>
<td align="center" valign="top">0.75 (&#x00B1;0.032)</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 2</td>
<td align="center" valign="top">0.61 (&#x00B1;0.047)</td>
<td align="center" valign="top">0.80 (&#x00B1;0.041)</td>
<td/>
</tr>
<tr>
<td align="left" valign="middle">Patient 3</td>
<td align="center" valign="top">0.70 (&#x00B1;0.015)</td>
<td align="center" valign="top">0.70 (&#x00B1;0.015)</td>
<td/>
</tr>
<tr>
<td align="left" valign="middle">Patient 6</td>
<td align="center" valign="top">0.58 (&#x00B1;0.030)</td>
<td align="center" valign="top">0.62 (&#x00B1;0.030)</td>
<td align="center" valign="top">0.64 (&#x00B1;0.030)</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 8</td>
<td align="center" valign="top">0.74 (&#x00B1;0.015)</td>
<td align="center" valign="top">0.73 (&#x00B1;0.015)</td>
<td align="center" valign="top">0.76 (&#x00B1;0.015)</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 9</td>
<td align="center" valign="top">0.83 (&#x00B1;0.019)</td>
<td align="center" valign="top">0.83 (&#x00B1;0.019)</td>
<td align="center" valign="top">0.80 (&#x00B1;0.020)</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 10</td>
<td align="center" valign="top">0.79 (&#x00B1;0.014)<xref ref-type="table-fn" rid="tfn1">
<sup>&#x002A;</sup></xref></td>
<td align="center" valign="top">0.78 (&#x00B1;0.014)<xref ref-type="table-fn" rid="tfn1">
<sup>&#x002A;</sup></xref></td>
<td align="center" valign="top">0.68 (&#x00B1;0.015)</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 11</td>
<td align="center" valign="top">0.81 (&#x00B1;0.015)</td>
<td align="center" valign="top">0.81 (&#x00B1;0.015)</td>
<td align="center" valign="top">0.82 (&#x00B1;0.014)</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 13</td>
<td align="center" valign="top">0.66 (&#x00B1;0.014)<xref ref-type="table-fn" rid="tfn1">
<sup>&#x002A;</sup></xref></td>
<td align="center" valign="top">0.71 (&#x00B1;0.014)<xref ref-type="table-fn" rid="tfn1">
<sup>&#x002A;</sup></xref></td>
<td align="center" valign="top">0.58 (&#x00B1;0.014)</td>
</tr>
<tr>
<td align="left" valign="middle">Patient 15</td>
<td align="center" valign="top">0.65 (&#x00B1;0.026)<xref ref-type="table-fn" rid="tfn2">
<sup>^</sup>
</xref></td>
<td align="center" valign="top">0.67 (&#x00B1;0.026)</td>
<td align="center" valign="top">0.70 (&#x00B1;0.026)</td>
</tr>
</tbody>
</table>
<table-wrap-foot>
<p>AUCs for two LSTM models and CNN-LSTM model (<xref ref-type="bibr" rid="ref28">Payne et al., 2023</xref>). The dLSTM models were variations on the LSTM with 4 or 5 labels, where the classifier was converted to make two predictions, pre-ictal or inter-ictal. Data was labelled as pre-ictal when 40&#x2013;80&#x2009;min prior to seizure and inter-ictal for more than 80&#x2009;min prior to seizure, which matches these results from the CNN-LSTM model. Statistically significant difference was determined by no overlap in the Hanley and McNeil confidence intervals (which are the values displayed in the brackets).</p>
<fn id="tfn1"><label>&#x002A;</label><p>Indicates a statistically significant increase in performance when compared to the CNN-LSTM model.</p></fn>
<fn id="tfn2"><label>^</label><p>Indicates a statistically significant decrease in performance when compared to CNN-LSTM model.</p></fn>
</table-wrap-foot>
</table-wrap>
</sec>
</sec>
<sec sec-type="discussion" id="sec17">
<label>4</label>
<title>Discussion</title>
<p>The ability to predict when seizures will occur in patients with epilepsy could be life changing for these patients as it could remove uncertainty and potentially allow acute treatments to prevent seizures. As a result, there have been many studies looking at seizure prediction. Most of these algorithms involve feature extraction from the EEG recordings, which is an efficient process but comes at the cost of limiting the usefulness of the model, particularly when there are changes to prediction requirements, such as an increase in the SPH to allow for different interventions. To overcome these limitations, we developed a framework where machine learning algorithms process the raw EEG data to make seizure predictions.</p>
<p>We have demonstrated that LSTMs can process raw EEG recordings and classify the EEG recordings to make seizure predictions or forecasts. Often a forecast is defined to be a probability of a seizure occurring sometime in the future, whereas a prediction is defined to be pre-ictal or not. The output of our model is a probability of each data label, which is then converted to a single prediction so that it can be evaluated against the true data label. These seizure predictions were far better than a random predictor for four different experimental paradigms, which indicates that this framework could be readily used for patients requiring different types of seizure predictions and/or patients using different acute intervention. This is an improvement on previous work because usually prediction algorithms are not tested against multiple SPH and sometimes fail to perform as well when using different data and/or different experimental paradigms. It is likely that this improvement arises from the LSTMs learning to extract features itself. A preliminary investigation into what information the LSTMs are extracting from the EEG recordings indicates that sometimes the upstroke of a single oscillation is important, sometimes the peak of a single oscillation is important and sometimes information spread over many oscillations is important. However, further investigations are required to provide a detailed analysis of what information LSTMs are using to make seizure predictions.</p>
<p>Since all model development and validation was performed on a subset of training data from three patients, this framework had never seen any data from 70% of patients until the final training and testing evaluation. Therefore, it is expected this model would produce similar performance on any new data that provides the same information. Furthermore, it is reasonable to expect this framework to work on any intracranial EEG recordings and any data labelling. While LSTMs do require substantial computing resources to train, in a clinical setting the training time for an individual patient could be reduced to a day or two by distributing individual samples within a training batch on a high-performance computing facility. A limitation of this current work is using 80% of the EEG data to train the LSTM models. This limitation could be overcome by using an adaptive approach where model parameters are updated after each seizure (<xref ref-type="bibr" rid="ref13">Iasemidis et al., 2005</xref>; <xref ref-type="bibr" rid="ref15">Karoly et al., 2017</xref>) or by using patient independent models (<xref ref-type="bibr" rid="ref27">Pal Attia et al., 2023</xref>).</p>
<sec id="sec18">
<label>4.1</label>
<title>Comparison to previously published model of seizure prediction</title>
<p>To compare our current model with previously published models, we only considered models that had used the same NeuroVista data (<xref ref-type="bibr" rid="ref5">Cook et al., 2013</xref>). We did this because the NeuroVista dataset is the only long-term intracranial dataset currently available. Short-term datasets can have issues such as clinicians provoking seizures or low seizure numbers requiring pooling of data across patients (<xref ref-type="bibr" rid="ref7">Freestone et al., 2017</xref>), time correlated data (<xref ref-type="bibr" rid="ref36">West et al., 2023</xref>), and not being long enough to capture seizure cycles (<xref ref-type="bibr" rid="ref14">Karoly et al., 2018</xref>; <xref ref-type="bibr" rid="ref15">Karoly et al., 2017</xref>). As new devices become clinically available, such as NeuroPace (<xref ref-type="bibr" rid="ref29">Razavi et al., 2020</xref>), analyzing long-term intracranial EEG recordings is going to become more important.</p>
<p>We did a direct comparison with two previously published models, the Deep CNN model (<xref ref-type="bibr" rid="ref17">Kiral-Kornek et al., 2018</xref>) and the critical slowing model (<xref ref-type="bibr" rid="ref25">Maturana et al., 2020</xref>). Whilst these comparisons are not perfect in terms of calculating the model performances as sensitivity and time in high, they do provide an indication of the relative performance. The Deep CNN model was used because of its similarity in only using EEG data and time information. Our model outperformed the Deep CNN model for six patients, one patient was essentially identical, and for two patients the Deep CNN model performed better. The Deep CNN model converted EEG recordings into the frequency-time domain, which is a very common approach in analyzing EEG. Our result of better performance using raw EEG compared to converting EEG to the frequency domain is the opposite of previous published findings (<xref ref-type="bibr" rid="ref40">Zhou et al., 2018</xref>), which indicates the importance of using LSTMs to process the raw EEG as opposed to convolutional neural networks. These results suggest using a Fourier transform loses information that can improve seizure predictions (for example, changes in the autocorrelation). Therefore, allowing the machine learning algorithms access to the raw data provides a better framework for seizure prediction compared to extracting features that may only be relevant for one length of SPH.</p>
<p>The critical slowing model outperformed our model for seven patients, whereas our model performed better for two patients. Performing better for two patients is an achievement because, when the critical slowing model was published, it outperformed all previous models for the 14 patients it used. This would make our current LSTM model the best model published to date for two patients. It should be noted, the calculations of model sensitivity in this current work requires all pre-ictal samples to be classified as pre-ictal to achieve the highest sensitivity, where the critical slowing model only required one warning per pre-ictal period to achieve the highest sensitivity. Similarly, due to the data labelling in this current work, the seizure occurrence period (SOP) was only 1-min, whereas most previous studies have a much larger SOP.</p>
<p>Furthermore, the critical slowing model used several carefully selected features of the EEG data in combination with the seizure cycles. While this produces the best performance, it does raise questions about how the model will perform under different conditions. For example, the autocorrelation, a feature in the model, only changes less than 2&#x2013;3&#x2009;min before a seizure. If a patient requires more than 2&#x2013;3&#x2009;min of warning before a seizure, it is unknown how this model will perform because it will be relying on other features. We have shown our current LSTM model can easily predict seizures under different conditions (such as changing the SPH and changing the number of data labels), which is an improvement on previously published models.</p>
<p>The only other model that has demonstrated flexibility in prediction times is the CNN-LSTM model (<xref ref-type="bibr" rid="ref28">Payne et al., 2023</xref>). In addition to flexibility, this model was also able to predict seizures with a seizure prediction horizon (the time between the warning and the seizure onset) of 40&#x2009;min, the largest of any models using the NeuroVista dataset. We replicated this in our model by using the output from the four-label or five-label LSTMs and changing the data labels for the classifier. Our model demonstrated a statistically significant improvement for two patients while there was no statistical difference between the remaining patients. This demonstrates the good performance of our framework and indicates this framework can be easily and quickly adapted to meet unique requirements for individual patients. Training the LSTM models takes considerable time, but training the classifier can be done in 10&#x2009;min on a stand-alone computer. This raises the possibility that individual patients could quickly and easily adapt an advisory system to their needs for that day.</p>
<p>Comparing our results to the Deep CNN model and the critical slowing model, it appears the performance of our LSTM model is comparable to the best models published to date, particularly when considering the differences in calculating the sensitivity. However, we have not made a direct comparison to several other models using the NeuroVista dataset [for example, (<xref ref-type="bibr" rid="ref4">Chen et al., 2022</xref>; <xref ref-type="bibr" rid="ref5">Cook et al., 2013</xref>; <xref ref-type="bibr" rid="ref15">Karoly et al., 2017</xref>; <xref ref-type="bibr" rid="ref18">Kuhlmann et al., 2018a</xref>)]. Our first and second experimental paradigms were deliberately chosen to be the same as those used for the Deep CNN model and the critical slowing model. When comparing the results of our model for these two experimental paradigms, three out of 10 patients showed statistically significant differences and a fourth patient the confidence intervals only just overlapped, which implies that a less stringent statistical test would have found a significant difference. Therefore, using the exact same prediction framework with the same data (except for a small change in the definition of the pre-ictal times) has produced significantly different results for at least 30% of patients. Given this result, it does not seem reasonable to compare the performance of different models when the data is labelled differently and handled differently (for example, selection criteria, pre-processing methods, normalization techniques, etc.). Ideally, there would be a standardized process for labelling and handling data for seizure predictions to allow direct comparisons between different studies. Indeed, this has been previously suggested (<xref ref-type="bibr" rid="ref18">Kuhlmann et al., 2018a</xref>; <xref ref-type="bibr" rid="ref37">Wiener et al., 2016</xref>). However, it would be very difficult to define such parameters because individual patients have different requirements for seizure predictions (<xref ref-type="bibr" rid="ref3">Arthurs et al., 2010</xref>; <xref ref-type="bibr" rid="ref30">Schulze-Bonhage et al., 2010</xref>) as will different intervention techniques. Therefore, a framework that allows for changes in the seizure prediction requirements, such as the one presented here, has the potential to be beneficial to a wider range of patients.</p>
</sec>
</sec>
<sec sec-type="conclusions" id="sec19">
<label>5</label>
<title>Conclusion</title>
<p>LSTMs can classify unprocessed EEG recordings to make seizure predictions better than chance and comparable performance to the best models. This framework produces good performance when the experimental design was altered, without the need to reperform feature engineering or alter the model structure. This is a significant advancement on previous works. Our framework was developed using minimal data and transferred well to unseen data and unseen patients. Therefore, it is expected this framework will perform well on new datasets and could be applied to other classification problems.</p>
</sec>
</body>
<back>
<sec sec-type="data-availability" id="sec20">
<title>Data availability statement</title>
<p>Publicly available datasets were analyzed in this study. This data can be found here: all source code and trained models are freely available for download at <ext-link xlink:href="https://github.com/JordanChambers/LSTM-seizure-prediction-raw-EEG" ext-link-type="uri">https://github.com/JordanChambers/LSTM-seizure-prediction-raw-EEG</ext-link>. Patient data can be accessed at <ext-link xlink:href="http://epilepsyecosystem.org" ext-link-type="uri">epilepsyecosystem.org</ext-link>. Patient data not available at <ext-link xlink:href="http://epilepsyecosystem.org" ext-link-type="uri">epilepsyecosystem.org</ext-link> may be made available on request at <ext-link xlink:href="http://epilepsyecosystem.org" ext-link-type="uri">epilepsyecosystem.org</ext-link> or by contacting the authors of the original clinical feasibility study (<xref ref-type="bibr" rid="ref5">Cook et al., 2013</xref>).</p>
</sec>
<sec sec-type="ethics-statement" id="sec21">
<title>Ethics statement</title>
<p>The studies involving humans were approved by Human Research Ethics Committee, St. Vincent&#x2019;s Hospital, Melbourne (approval LRR145/13). The studies were conducted in accordance with the local legislation and institutional requirements. The participants provided their written informed consent to participate in this study.</p>
</sec>
<sec sec-type="author-contributions" id="sec22">
<title>Author contributions</title>
<p>JC: Conceptualization, Data curation, Formal analysis, Writing &#x2013; original draft, Writing &#x2013; review &#x0026; editing. MC: Conceptualization, Funding acquisition, Writing &#x2013; review &#x0026; editing. AB: Conceptualization, Funding acquisition, Writing &#x2013; review &#x0026; editing. DG: Conceptualization, Funding acquisition, Writing &#x2013; review &#x0026; editing.</p>
</sec>
<sec sec-type="funding-information" id="sec23">
<title>Funding</title>
<p>The author(s) declare that financial support was received for the research, authorship, and/or publication of this article. This research was supported by Australian Research Council Industrial Transformation Training Centre in Cognitive Computing for Medical Technologies (project number ICI70200030).</p>
</sec>
<ack>
<p>This research was supported by The University of Melbourne&#x2019;s Research Computing Services and the Petascale Campus Initiative.</p>
</ack>
<sec sec-type="COI-statement" id="sec24">
<title>Conflict of interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
<p>The author(s) declared that they were an editorial board member of Frontiers, at the time of submission. This had no impact on the peer review process and the final decision.</p>
</sec>
<sec sec-type="disclaimer" id="sec25">
<title>Publisher&#x2019;s note</title>
<p>All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.</p>
</sec>
<sec sec-type="supplementary-material" id="sec26">
<title>Supplementary material</title>
<p>The Supplementary material for this article can be found online at: <ext-link xlink:href="https://www.frontiersin.org/articles/10.3389/fnins.2024.1472747/full#supplementary-material" ext-link-type="uri">https://www.frontiersin.org/articles/10.3389/fnins.2024.1472747/full#supplementary-material</ext-link></p>
<supplementary-material xlink:href="Data_Sheet_1.docx" id="SM1" mimetype="application/vnd.openxmlformats-officedocument.wordprocessingml.document" xmlns:xlink="http://www.w3.org/1999/xlink"/>
</sec>
<ref-list>
<title>References</title>
<ref id="ref1">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Ali</surname> <given-names>H.</given-names></name> <name><surname>Karim</surname> <given-names>F.</given-names></name> <name><surname>Qureshi</surname> <given-names>J. J.</given-names></name> <name><surname>Abuassba</surname> <given-names>A. O.</given-names></name> <name><surname>Bulbul</surname> <given-names>M. F.</given-names></name></person-group> (<year>2019</year>). &#x201C;<article-title>Seizure prediction using bidirectional LSTM</article-title>&#x201D; in <source>Cyberspace data and intelligence, and cyber-living, syndrome, and health, 2019</source>. ed. <person-group person-group-type="editor">
<name><surname>Ning</surname> <given-names>H.</given-names></name>
</person-group> (<publisher-loc>Singapore</publisher-loc>: <publisher-name>Springer Singapore</publisher-name>), <fpage>349</fpage>&#x2013;<lpage>356</lpage>.</citation>
</ref>
<ref id="ref2">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Andrzejak</surname> <given-names>R. G.</given-names></name> <name><surname>Zaveri</surname> <given-names>H. P.</given-names></name> <name><surname>Schulze-Bonhage</surname> <given-names>A.</given-names></name> <name><surname>Leguia</surname> <given-names>M. G.</given-names></name> <name><surname>Stacey</surname> <given-names>W. C.</given-names></name> <name><surname>Richardson</surname> <given-names>M. P.</given-names></name> <etal/></person-group>. (<year>2023</year>). <article-title>Seizure forecasting: where do we stand?</article-title> <source>Epilepsia</source> <volume>64</volume>, <fpage>S62</fpage>&#x2013;<lpage>S71</lpage>. doi: <pub-id pub-id-type="doi">10.1111/epi.17546</pub-id>, PMID: <pub-id pub-id-type="pmid">36780237</pub-id></citation>
</ref>
<ref id="ref3">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Arthurs</surname> <given-names>S.</given-names></name> <name><surname>Zaveri</surname> <given-names>H. P.</given-names></name> <name><surname>Frei</surname> <given-names>M. G.</given-names></name> <name><surname>Osorio</surname> <given-names>I.</given-names></name></person-group> (<year>2010</year>). <article-title>Patient and caregiver perspectives on seizure prediction</article-title>. <source>Epilepsy Behav.</source> <volume>19</volume>, <fpage>474</fpage>&#x2013;<lpage>477</lpage>. doi: <pub-id pub-id-type="doi">10.1016/j.yebeh.2010.08.010</pub-id>, PMID: <pub-id pub-id-type="pmid">20851054</pub-id></citation>
</ref>
<ref id="ref4">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Chen</surname> <given-names>Z.</given-names></name> <name><surname>Maturana</surname> <given-names>M. I.</given-names></name> <name><surname>Burkitt</surname> <given-names>A. N.</given-names></name> <name><surname>Cook</surname> <given-names>M. J.</given-names></name> <name><surname>Grayden</surname> <given-names>D. B.</given-names></name></person-group> (<year>2022</year>). <article-title>Seizure forecasting by high-frequency activity (80-170 Hz) in long-term continuous intracranial EEG recordings</article-title>. <source>Neurology</source> <volume>99</volume>, <fpage>e364</fpage>&#x2013;<lpage>e375</lpage>. doi: <pub-id pub-id-type="doi">10.1212/WNL.0000000000200348</pub-id>, PMID: <pub-id pub-id-type="pmid">35523589</pub-id></citation>
</ref>
<ref id="ref5">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Cook</surname> <given-names>M. J.</given-names></name> <name><surname>O'Brien</surname> <given-names>T. J.</given-names></name> <name><surname>Berkovic</surname> <given-names>S. F.</given-names></name> <name><surname>Murphy</surname> <given-names>M.</given-names></name> <name><surname>Morokoff</surname> <given-names>A.</given-names></name> <name><surname>Fabinyi</surname> <given-names>G.</given-names></name> <etal/></person-group>. (<year>2013</year>). <article-title>Prediction of seizure likelihood with a long-term, implanted seizure advisory system in patients with drug-resistant epilepsy: a first-in-man study</article-title>. <source>Lancet Neurol.</source> <volume>12</volume>, <fpage>563</fpage>&#x2013;<lpage>571</lpage>. doi: <pub-id pub-id-type="doi">10.1016/S1474-4422(13)70075-9</pub-id>, PMID: <pub-id pub-id-type="pmid">23642342</pub-id></citation>
</ref>
<ref id="ref6">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Daoud</surname> <given-names>H.</given-names></name> <name><surname>Bayoumi</surname> <given-names>M. A.</given-names></name></person-group> (<year>2019</year>). <article-title>Efficient epileptic seizure prediction based on deep learning</article-title>. <source>IEEE Trans. Biomed. Circuits Syst.</source> <volume>13</volume>, <fpage>804</fpage>&#x2013;<lpage>813</lpage>. doi: <pub-id pub-id-type="doi">10.1109/TBCAS.2019.2929053</pub-id>, PMID: <pub-id pub-id-type="pmid">31331897</pub-id></citation>
</ref>
<ref id="ref7">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Freestone</surname> <given-names>D. R.</given-names></name> <name><surname>Karoly</surname> <given-names>P. J.</given-names></name> <name><surname>Cook</surname> <given-names>M. J.</given-names></name></person-group> (<year>2017</year>). <article-title>A forward-looking review of seizure prediction</article-title>. <source>Curr. Opin. Neurol.</source> <volume>30</volume>, <fpage>167</fpage>&#x2013;<lpage>173</lpage>. doi: <pub-id pub-id-type="doi">10.1097/WCO.0000000000000429</pub-id>, PMID: <pub-id pub-id-type="pmid">28118302</pub-id></citation>
</ref>
<ref id="ref8">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hanley</surname> <given-names>J. A.</given-names></name> <name><surname>Mcneil</surname> <given-names>B. J.</given-names></name></person-group> (<year>1983</year>). <article-title>A method of comparing the areas under receiver operating characteristic curves derived from the same cases</article-title>. <source>Radiology</source> <volume>148</volume>, <fpage>839</fpage>&#x2013;<lpage>843</lpage>. doi: <pub-id pub-id-type="doi">10.1148/radiology.148.3.6878708</pub-id>, PMID: <pub-id pub-id-type="pmid">6878708</pub-id></citation>
</ref>
<ref id="ref9">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hochreiter</surname> <given-names>S.</given-names></name> <name><surname>Schmidhuber</surname> <given-names>J.</given-names></name></person-group> (<year>1997</year>). <article-title>Long short-term memory</article-title>. <source>Neural Comput.</source> <volume>9</volume>, <fpage>1735</fpage>&#x2013;<lpage>1780</lpage>. doi: <pub-id pub-id-type="doi">10.1162/neco.1997.9.8.1735</pub-id>, PMID: <pub-id pub-id-type="pmid">9377276</pub-id></citation>
</ref>
<ref id="ref10">
<citation citation-type="journal"><person-group person-group-type="author">
<name><surname>Iasemidis</surname> <given-names>L. D.</given-names></name>
</person-group> (<year>2011</year>). <article-title>Seizure prediction and its applications</article-title>. <source>Neurosurg. Clin. N. Am.</source> <volume>22</volume>, <fpage>489</fpage>&#x2013;<lpage>506</lpage>. doi: <pub-id pub-id-type="doi">10.1016/j.nec.2011.07.004</pub-id>, PMID: <pub-id pub-id-type="pmid">21939848</pub-id></citation>
</ref>
<ref id="ref11">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Iasemidis</surname> <given-names>L. D.</given-names></name> <name><surname>Chris Sackellares</surname> <given-names>J.</given-names></name> <name><surname>Zaveri</surname> <given-names>H. P.</given-names></name> <name><surname>Williams</surname> <given-names>W. J.</given-names></name></person-group> (<year>1990</year>). <article-title>Phase space topography and the Lyapunov exponent of electrocorticograms in partial seizures</article-title>. <source>Brain Topogr.</source> <volume>2</volume>, <fpage>187</fpage>&#x2013;<lpage>201</lpage>. doi: <pub-id pub-id-type="doi">10.1007/BF01140588</pub-id>, PMID: <pub-id pub-id-type="pmid">2116818</pub-id></citation>
</ref>
<ref id="ref12">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Iasemidis</surname> <given-names>L. D.</given-names></name> <name><surname>Sackellares</surname> <given-names>J. C.</given-names></name></person-group> (<year>1996</year>). <article-title>Review: Chaos theory and epilepsy</article-title>. <source>Neuroscientist</source> <volume>2</volume>, <fpage>118</fpage>&#x2013;<lpage>126</lpage>. doi: <pub-id pub-id-type="doi">10.1177/107385849600200213</pub-id>, PMID: <pub-id pub-id-type="pmid">39304265</pub-id></citation>
</ref>
<ref id="ref13">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Iasemidis</surname> <given-names>L. D.</given-names></name> <name><surname>Shiau</surname> <given-names>D. S.</given-names></name> <name><surname>Pardalos</surname> <given-names>P. M.</given-names></name> <name><surname>Chaovalitwongse</surname> <given-names>W.</given-names></name> <name><surname>Narayanan</surname> <given-names>K.</given-names></name> <name><surname>Prasad</surname> <given-names>A.</given-names></name> <etal/></person-group>. (<year>2005</year>). <article-title>Long-term prospective on-line real-time seizure prediction</article-title>. <source>Clin. Neurophysiol.</source> <volume>116</volume>, <fpage>532</fpage>&#x2013;<lpage>544</lpage>. doi: <pub-id pub-id-type="doi">10.1016/j.clinph.2004.10.013</pub-id>, PMID: <pub-id pub-id-type="pmid">15721067</pub-id></citation>
</ref>
<ref id="ref14">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Karoly</surname> <given-names>P. J.</given-names></name> <name><surname>Goldenholz</surname> <given-names>D. M.</given-names></name> <name><surname>Freestone</surname> <given-names>D. R.</given-names></name> <name><surname>Moss</surname> <given-names>R. E.</given-names></name> <name><surname>Grayden</surname> <given-names>D. B.</given-names></name> <name><surname>Theodore</surname> <given-names>W. H.</given-names></name> <etal/></person-group>. (<year>2018</year>). <article-title>Circadian and circaseptan rhythms in human epilepsy: a retrospective Cohort study</article-title>. <source>Lancet Neurol.</source> <volume>17</volume>, <fpage>977</fpage>&#x2013;<lpage>985</lpage>. doi: <pub-id pub-id-type="doi">10.1016/S1474-4422(18)30274-6</pub-id>, PMID: <pub-id pub-id-type="pmid">30219655</pub-id></citation>
</ref>
<ref id="ref15">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Karoly</surname> <given-names>P. J.</given-names></name> <name><surname>Ung</surname> <given-names>H.</given-names></name> <name><surname>Grayden</surname> <given-names>D. B.</given-names></name> <name><surname>Kuhlmann</surname> <given-names>L.</given-names></name> <name><surname>Leyde</surname> <given-names>K.</given-names></name> <name><surname>Cook</surname> <given-names>M. J.</given-names></name> <etal/></person-group>. (<year>2017</year>). <article-title>The circadian profile of epilepsy improves seizure forecasting</article-title>. <source>Brain</source> <volume>140</volume>, <fpage>2169</fpage>&#x2013;<lpage>2182</lpage>. doi: <pub-id pub-id-type="doi">10.1093/brain/awx173</pub-id>, PMID: <pub-id pub-id-type="pmid">28899023</pub-id></citation>
</ref>
<ref id="ref16">
<citation citation-type="other"><person-group person-group-type="author"><name><surname>Kingma</surname> <given-names>D. P.</given-names></name> <name><surname>Ba</surname> <given-names>J. J. A. E.-P</given-names></name></person-group>. (<year>2014</year>). Adam: A Method for Stochastic Optimization. Available at: <ext-link xlink:href="https://ui.adsabs.harvard.edu/abs/2014arXiv1412.6980K" ext-link-type="uri">https://ui.adsabs.harvard.edu/abs/2014arXiv1412.6980K</ext-link> [Accessed December 01, 2014].</citation>
</ref>
<ref id="ref17">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kiral-Kornek</surname> <given-names>I.</given-names></name> <name><surname>Roy</surname> <given-names>S.</given-names></name> <name><surname>Nurse</surname> <given-names>E.</given-names></name> <name><surname>Mashford</surname> <given-names>B.</given-names></name> <name><surname>Karoly</surname> <given-names>P.</given-names></name> <name><surname>Carroll</surname> <given-names>T.</given-names></name> <etal/></person-group>. (<year>2018</year>). <article-title>Epileptic seizure prediction using big data and deep learning: toward a mobile system</article-title>. <source>EBioMedicine</source> <volume>27</volume>, <fpage>103</fpage>&#x2013;<lpage>111</lpage>. doi: <pub-id pub-id-type="doi">10.1016/j.ebiom.2017.11.032</pub-id>, PMID: <pub-id pub-id-type="pmid">29262989</pub-id></citation>
</ref>
<ref id="ref18">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kuhlmann</surname> <given-names>L.</given-names></name> <name><surname>Karoly</surname> <given-names>P.</given-names></name> <name><surname>Freestone</surname> <given-names>D. R.</given-names></name> <name><surname>Brinkmann</surname> <given-names>B. H.</given-names></name> <name><surname>Temko</surname> <given-names>A.</given-names></name> <name><surname>Barachant</surname> <given-names>A.</given-names></name> <etal/></person-group>. (<year>2018a</year>). <article-title>Epilepsyecosystem.org: crowd-sourcing reproducible seizure prediction with long-term human intracranial EEG</article-title>. <source>Brain</source> <volume>141</volume>, <fpage>2619</fpage>&#x2013;<lpage>2630</lpage>. doi: <pub-id pub-id-type="doi">10.1093/brain/awy210</pub-id>, PMID: <pub-id pub-id-type="pmid">30101347</pub-id></citation>
</ref>
<ref id="ref19">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kuhlmann</surname> <given-names>L.</given-names></name> <name><surname>Lehnertz</surname> <given-names>K.</given-names></name> <name><surname>Richardson</surname> <given-names>M. P.</given-names></name> <name><surname>Schelter</surname> <given-names>B.</given-names></name> <name><surname>Zaveri</surname> <given-names>H. P.</given-names></name></person-group> (<year>2018b</year>). <article-title>Seizure prediction - ready for a new era</article-title>. <source>Nat. Rev. Neurol.</source> <volume>14</volume>, <fpage>618</fpage>&#x2013;<lpage>630</lpage>. doi: <pub-id pub-id-type="doi">10.1038/s41582-018-0055-2</pub-id>, PMID: <pub-id pub-id-type="pmid">30131521</pub-id></citation>
</ref>
<ref id="ref20">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lehnertz</surname> <given-names>K.</given-names></name> <name><surname>Elger</surname> <given-names>C. E.</given-names></name></person-group> (<year>1998</year>). <article-title>Can epileptic seizures be predicted? Evidence from nonlinear time series analysis of brain electrical activity</article-title>. <source>Phys. Rev. Lett.</source> <volume>80</volume>, <fpage>5019</fpage>&#x2013;<lpage>5022</lpage>. doi: <pub-id pub-id-type="doi">10.1103/PhysRevLett.80.5019</pub-id></citation>
</ref>
<ref id="ref21">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Litt</surname> <given-names>B.</given-names></name> <name><surname>Echauz</surname> <given-names>J.</given-names></name></person-group> (<year>2002</year>). <article-title>Prediction of epileptic seizures</article-title>. <source>Lancet Neurol.</source> <volume>1</volume>, <fpage>22</fpage>&#x2013;<lpage>30</lpage>. doi: <pub-id pub-id-type="doi">10.1016/S1474-4422(02)00003-0</pub-id>, PMID: <pub-id pub-id-type="pmid">12849542</pub-id></citation>
</ref>
<ref id="ref22">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lopes</surname> <given-names>F.</given-names></name> <name><surname>Pinto</surname> <given-names>M. F.</given-names></name> <name><surname>Dourado</surname> <given-names>A.</given-names></name> <name><surname>Schulze-Bonhage</surname> <given-names>A.</given-names></name> <name><surname>Dumpelmann</surname> <given-names>M.</given-names></name> <name><surname>Teixeira</surname> <given-names>C.</given-names></name></person-group> (<year>2024</year>). <article-title>Addressing data limitations in seizure prediction through transfer learning</article-title>. <source>Sci. Rep.</source> <volume>14</volume>:<fpage>14169</fpage>. doi: <pub-id pub-id-type="doi">10.1038/s41598-024-64802-1</pub-id>, PMID: <pub-id pub-id-type="pmid">38898066</pub-id></citation>
</ref>
<ref id="ref23">
<citation citation-type="book"><person-group person-group-type="author"><name><surname>Ma</surname> <given-names>X.</given-names></name> <name><surname>Qiu</surname> <given-names>S.</given-names></name> <name><surname>Zhang</surname> <given-names>Y.</given-names></name> <name><surname>Lian</surname> <given-names>X.</given-names></name> <name><surname>He</surname> <given-names>H.</given-names></name></person-group> (<year>2018</year>). &#x201C;<article-title>Predicting epileptic seizures from intracranial EEG using LSTM-based multi-task learning</article-title>&#x201D; in <source>Pattern recognition and computer vision, 2018</source>. eds. <person-group person-group-type="editor"><name><surname>Lai</surname> <given-names>J.-H.</given-names></name> <name><surname>Liu</surname> <given-names>C.-L.</given-names></name> <name><surname>Chen</surname> <given-names>X.</given-names></name> <name><surname>Zhou</surname> <given-names>J.</given-names></name> <name><surname>Tan</surname> <given-names>T.</given-names></name> <name><surname>Zheng</surname> <given-names>N.</given-names></name> <etal/></person-group>. (<publisher-loc>Cham</publisher-loc>: <publisher-name>Springer International Publishing</publisher-name>), <fpage>157</fpage>&#x2013;<lpage>167</lpage>.</citation>
</ref>
<ref id="ref24">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Maimaiti</surname> <given-names>B.</given-names></name> <name><surname>Meng</surname> <given-names>H.</given-names></name> <name><surname>Lv</surname> <given-names>Y.</given-names></name> <name><surname>Qiu</surname> <given-names>J.</given-names></name> <name><surname>Zhu</surname> <given-names>Z.</given-names></name> <name><surname>Xie</surname> <given-names>Y.</given-names></name> <etal/></person-group>. (<year>2022</year>). <article-title>An overview of EEG-based machine learning methods in seizure prediction and opportunities for neurologists in this field</article-title>. <source>Neuroscience</source> <volume>481</volume>, <fpage>197</fpage>&#x2013;<lpage>218</lpage>. doi: <pub-id pub-id-type="doi">10.1016/j.neuroscience.2021.11.017</pub-id>, PMID: <pub-id pub-id-type="pmid">34793938</pub-id></citation>
</ref>
<ref id="ref25">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Maturana</surname> <given-names>M. I.</given-names></name> <name><surname>Meisel</surname> <given-names>C.</given-names></name> <name><surname>Dell</surname> <given-names>K.</given-names></name> <name><surname>Karoly</surname> <given-names>P. J.</given-names></name> <name><surname>D'souza</surname> <given-names>W.</given-names></name> <name><surname>Grayden</surname> <given-names>D. B.</given-names></name> <etal/></person-group>. (<year>2020</year>). <article-title>Critical slowing down as a biomarker for seizure susceptibility</article-title>. <source>Nat. Commun.</source> <volume>11</volume>:<fpage>2172</fpage>. doi: <pub-id pub-id-type="doi">10.1038/s41467-020-15908-3</pub-id>, PMID: <pub-id pub-id-type="pmid">32358560</pub-id></citation>
</ref>
<ref id="ref26">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Moser</surname> <given-names>H. R.</given-names></name> <name><surname>Weber</surname> <given-names>B.</given-names></name> <name><surname>Wieser</surname> <given-names>H. G.</given-names></name> <name><surname>Meier</surname> <given-names>P. F.</given-names></name></person-group> (<year>1999</year>). <article-title>Electroencephalograms in epilepsy: analysis and seizure prediction within the framework of Lyapunov theory</article-title>. <source>Phys. D Nonlinear Phenom.</source> <volume>130</volume>, <fpage>291</fpage>&#x2013;<lpage>305</lpage>. doi: <pub-id pub-id-type="doi">10.1016/S0167-2789(99)00043-3</pub-id>, PMID: <pub-id pub-id-type="pmid">11001334</pub-id></citation>
</ref>
<ref id="ref27">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Pal Attia</surname> <given-names>T.</given-names></name> <name><surname>Viana</surname> <given-names>P. F.</given-names></name> <name><surname>Nasseri</surname> <given-names>M.</given-names></name> <name><surname>Duun-Henriksen</surname> <given-names>J.</given-names></name> <name><surname>Biondi</surname> <given-names>A.</given-names></name> <name><surname>Winston</surname> <given-names>J. S.</given-names></name> <etal/></person-group>. (<year>2023</year>). <article-title>Seizure forecasting using minimally invasive, ultra-long-term subcutaneous EEG: generalizable cross-patient models</article-title>. <source>Epilepsia</source> <volume>64</volume>, <fpage>S114</fpage>&#x2013;<lpage>S123</lpage>. doi: <pub-id pub-id-type="doi">10.1111/epi.17265</pub-id>, PMID: <pub-id pub-id-type="pmid">35441703</pub-id></citation>
</ref>
<ref id="ref28">
<citation citation-type="other"><person-group person-group-type="author"><name><surname>Payne</surname> <given-names>D. E.</given-names></name> <name><surname>Chambers</surname> <given-names>J. D.</given-names></name> <name><surname>Burkitt</surname> <given-names>A. N.</given-names></name> <name><surname>Cook</surname> <given-names>M. J.</given-names></name> <name><surname>Kuhlman</surname> <given-names>L.</given-names></name> <name><surname>Freestone</surname> <given-names>D. R.</given-names></name> <etal/></person-group>. (<year>2023</year>). Epileptic seizure forecasting with long short-term memory (LSTM) neural networks. arXiv, arXiv:5119239.</citation>
</ref>
<ref id="ref29">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Razavi</surname> <given-names>B.</given-names></name> <name><surname>Rao</surname> <given-names>V. R.</given-names></name> <name><surname>Lin</surname> <given-names>C.</given-names></name> <name><surname>Bujarski</surname> <given-names>K. A.</given-names></name> <name><surname>Patra</surname> <given-names>S. E.</given-names></name> <name><surname>Burdette</surname> <given-names>D. E.</given-names></name> <etal/></person-group>. (<year>2020</year>). <article-title>Real-world experience with direct brain-responsive neurostimulation for focal onset seizures</article-title>. <source>Epilepsia</source> <volume>61</volume>, <fpage>1749</fpage>&#x2013;<lpage>1757</lpage>. doi: <pub-id pub-id-type="doi">10.1111/epi.16593</pub-id>, PMID: <pub-id pub-id-type="pmid">32658325</pub-id></citation>
</ref>
<ref id="ref30">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Schulze-Bonhage</surname> <given-names>A.</given-names></name> <name><surname>Sales</surname> <given-names>F.</given-names></name> <name><surname>Wagner</surname> <given-names>K.</given-names></name> <name><surname>Teotonio</surname> <given-names>R.</given-names></name> <name><surname>Carius</surname> <given-names>A.</given-names></name> <name><surname>Schelle</surname> <given-names>A.</given-names></name> <etal/></person-group>. (<year>2010</year>). <article-title>Views of patients with epilepsy on seizure prediction devices</article-title>. <source>Epilepsy Behav.</source> <volume>18</volume>, <fpage>388</fpage>&#x2013;<lpage>396</lpage>. doi: <pub-id pub-id-type="doi">10.1016/j.yebeh.2010.05.008</pub-id>, PMID: <pub-id pub-id-type="pmid">20624689</pub-id></citation>
</ref>
<ref id="ref31">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Stirling</surname> <given-names>R. E.</given-names></name> <name><surname>Grayden</surname> <given-names>D. B.</given-names></name> <name><surname>D'souza</surname> <given-names>W.</given-names></name> <name><surname>Cook</surname> <given-names>M. J.</given-names></name> <name><surname>Nurse</surname> <given-names>E.</given-names></name> <name><surname>Freestone</surname> <given-names>D. R.</given-names></name> <etal/></person-group>. (<year>2021</year>). <article-title>Forecasting seizure likelihood with wearable technology</article-title>. <source>Front. Neurol.</source> <volume>12</volume>:<fpage>704060</fpage>. doi: <pub-id pub-id-type="doi">10.3389/fneur.2021.704060</pub-id>, PMID: <pub-id pub-id-type="pmid">34335457</pub-id></citation>
</ref>
<ref id="ref32">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Tsiouris</surname> <given-names>K.</given-names></name> <name><surname>Pezoulas</surname> <given-names>V. C.</given-names></name> <name><surname>Zervakis</surname> <given-names>M.</given-names></name> <name><surname>Konitsiotis</surname> <given-names>S.</given-names></name> <name><surname>Koutsouris</surname> <given-names>D. D.</given-names></name> <name><surname>Fotiadis</surname> <given-names>D. I.</given-names></name></person-group> (<year>2018</year>). <article-title>A long short-term memory deep learning network for the prediction of epileptic seizures using EEG signals</article-title>. <source>Comput. Biol. Med.</source> <volume>99</volume>, <fpage>24</fpage>&#x2013;<lpage>37</lpage>. doi: <pub-id pub-id-type="doi">10.1016/j.compbiomed.2018.05.019</pub-id>, PMID: <pub-id pub-id-type="pmid">29807250</pub-id></citation>
</ref>
<ref id="ref33">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ung</surname> <given-names>H.</given-names></name> <name><surname>Baldassano</surname> <given-names>S. N.</given-names></name> <name><surname>Bink</surname> <given-names>H.</given-names></name> <name><surname>Krieger</surname> <given-names>A. M.</given-names></name> <name><surname>Williams</surname> <given-names>S.</given-names></name> <name><surname>Vitale</surname> <given-names>F.</given-names></name> <etal/></person-group>. (<year>2017</year>). <article-title>Intracranial EEG fluctuates over months after implanting electrodes in human brain</article-title>. <source>J. Neural Eng.</source> <volume>14</volume>:<fpage>056011</fpage>. doi: <pub-id pub-id-type="doi">10.1088/1741-2552/aa7f40</pub-id>, PMID: <pub-id pub-id-type="pmid">28862995</pub-id></citation>
</ref>
<ref id="ref34">
<citation citation-type="other"><person-group person-group-type="author"><name><surname>Varnosfaderani</surname> <given-names>S. M.</given-names></name> <name><surname>Rahman</surname> <given-names>R.</given-names></name> <name><surname>Sarhan</surname> <given-names>N. J.</given-names></name> <name><surname>Kuhlmann</surname> <given-names>L.</given-names></name> <name><surname>Asano</surname> <given-names>E.</given-names></name> <name><surname>Luat</surname> <given-names>A.</given-names></name> <etal/></person-group>. (<year>2021</year>). &#x201C;A two-layer Lstm deep learning model for epileptic seizure prediction.&#x201D; in <italic>2021 IEEE 3rd International Conference on Artificial Intelligence Circuits and Systems (Aicas)</italic>. 6&#x2013;9 June 2021. pp. 1&#x2013;4.</citation>
</ref>
<ref id="ref35">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Viana</surname> <given-names>P. F.</given-names></name> <name><surname>Pal Attia</surname> <given-names>T.</given-names></name> <name><surname>Nasseri</surname> <given-names>M.</given-names></name> <name><surname>Duun-Henriksen</surname> <given-names>J.</given-names></name> <name><surname>Biondi</surname> <given-names>A.</given-names></name> <name><surname>Winston</surname> <given-names>J. S.</given-names></name> <etal/></person-group>. (<year>2023</year>). <article-title>Seizure forecasting using minimally invasive, ultra-long-term subcutaneous electroencephalography: individualized intrapatient models</article-title>. <source>Epilepsia</source> <volume>64</volume>, <fpage>S124</fpage>&#x2013;<lpage>S133</lpage>. doi: <pub-id pub-id-type="doi">10.1111/epi.17252</pub-id></citation>
</ref>
<ref id="ref36">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>West</surname> <given-names>J.</given-names></name> <name><surname>Dasht Bozorgi</surname> <given-names>Z.</given-names></name> <name><surname>Herron</surname> <given-names>J.</given-names></name> <name><surname>Chizeck</surname> <given-names>H. J.</given-names></name> <name><surname>Chambers</surname> <given-names>J. D.</given-names></name> <name><surname>Li</surname> <given-names>L.</given-names></name></person-group> (<year>2023</year>). <article-title>Machine learning seizure prediction: one problematic but accepted practice</article-title>. <source>J. Neural Eng.</source> <volume>20</volume>:<fpage>016008</fpage>. doi: <pub-id pub-id-type="doi">10.1088/1741-2552/acae09</pub-id>, PMID: <pub-id pub-id-type="pmid">36548993</pub-id></citation>
</ref>
<ref id="ref37">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wiener</surname> <given-names>M.</given-names></name> <name><surname>Sommer</surname> <given-names>F. T.</given-names></name> <name><surname>Ives</surname> <given-names>Z. G.</given-names></name> <name><surname>Poldrack</surname> <given-names>R. A.</given-names></name> <name><surname>Litt</surname> <given-names>B.</given-names></name></person-group> (<year>2016</year>). <article-title>Enabling an open data ecosystem for the neurosciences</article-title>. <source>Neuron</source> <volume>92</volume>, <fpage>617</fpage>&#x2013;<lpage>621</lpage>. doi: <pub-id pub-id-type="doi">10.1016/j.neuron.2016.10.037</pub-id>, PMID: <pub-id pub-id-type="pmid">27810004</pub-id></citation>
</ref>
<ref id="ref38">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wong</surname> <given-names>S.</given-names></name> <name><surname>Simmons</surname> <given-names>A.</given-names></name> <name><surname>Rivera-Villicana</surname> <given-names>J.</given-names></name> <name><surname>Barnett</surname> <given-names>S.</given-names></name> <name><surname>Sivathamboo</surname> <given-names>S.</given-names></name> <name><surname>Perucca</surname> <given-names>P.</given-names></name> <etal/></person-group>. (<year>2023</year>). <article-title>EEG datasets for seizure detection and prediction-a review</article-title>. <source>Epilepsia Open</source> <volume>8</volume>, <fpage>252</fpage>&#x2013;<lpage>267</lpage>. doi: <pub-id pub-id-type="doi">10.1002/epi4.12704</pub-id>, PMID: <pub-id pub-id-type="pmid">36740244</pub-id></citation>
</ref>
<ref id="ref39">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Zhang</surname> <given-names>Q.</given-names></name> <name><surname>Ding</surname> <given-names>J.</given-names></name> <name><surname>Kong</surname> <given-names>W.</given-names></name> <name><surname>Liu</surname> <given-names>Y.</given-names></name> <name><surname>Wang</surname> <given-names>Q.</given-names></name> <name><surname>Jiang</surname> <given-names>T.</given-names></name></person-group> (<year>2021</year>). <article-title>Epilepsy prediction through optimized multidimensional sample entropy and Bi-LSTM</article-title>. <source>Biomed. Signal Proces. Cont.</source> <volume>64</volume>:<fpage>102293</fpage>. doi: <pub-id pub-id-type="doi">10.1016/j.bspc.2020.102293</pub-id></citation>
</ref>
<ref id="ref40">
<citation citation-type="journal"><person-group person-group-type="author"><name><surname>Zhou</surname> <given-names>M.</given-names></name> <name><surname>Tian</surname> <given-names>C.</given-names></name> <name><surname>Cao</surname> <given-names>R.</given-names></name> <name><surname>Wang</surname> <given-names>B.</given-names></name> <name><surname>Niu</surname> <given-names>Y.</given-names></name> <name><surname>Hu</surname> <given-names>T.</given-names></name> <etal/></person-group>. (<year>2018</year>). <article-title>Epileptic seizure detection based on EEG signals and CNN</article-title>. <source>Front. Neuroinform.</source> <volume>12</volume>:<fpage>95</fpage>. doi: <pub-id pub-id-type="doi">10.3389/fninf.2018.00095</pub-id>, PMID: <pub-id pub-id-type="pmid">30618700</pub-id></citation>
</ref>
</ref-list>
</back>
</article>