# Detecting fast-ripples on both micro- and macro-electrodes in epilepsy: A wavelet-based CNN detector

Ludovic Gardy, Jonathan Curot, Luc Valton, Louis Berthier, Emmanuel

Barbeau, Christophe Hurter

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

► To cite this version:

Ludovic Gardy, Jonathan Curot, Luc Valton, Louis Berthier, Emmanuel Barbeau, et al. Detecting fast-ripples on both micro- and macro-electrodes in epilepsy: A wavelet-based CNN detector. Journal of Neuroscience Methods, 2025, 415, pp.110350. 10.1016/j.jneumeth.2024.110350. hal-04891425

HAL Id: hal-04891425

https://enac.hal.science/hal-04891425v1

Submitted on 16 Jan 2025

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

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

<figure><img src="image_2.png" /></figure>
<figure><img src="image_3.png" /></figure>

# Detecting fast-ripples on both micro- and macro-electrodes in epilepsy: A wavelet-based CNN detector

Ludovic Gardy<sup>a,b,c</sup>, Jonathan Curot<sup>a,d</sup>, Luc Valton<sup>a,d</sup>, Louis Berthier<sup>e</sup>,
Emmanuel J. Barbeau<sup>a,b,*</sup>, Christophe Hurter<sup>c,**</sup>

## ARTICLE INFO

**Keywords:**
Epilepsy
Fast-ripples
HFO
CNN
hybrid electrodes
iEEG

## ABSTRACT

**Background:** Fast-ripples (FR) are short (~10 ms) high-frequency oscillations (HFO) between 200 and 600 Hz that are helpful in epilepsy to identify the epileptogenic zone. Our aim is to propose a new method to detect FR that had to be efficient for intracerebral EEG (iEEG) recorded from both usual clinical macro-contacts (millimeter scale) and microwires (micrometer scale).

**New Method:** Step 1 of the detection method is based on a convolutional neural network (CNN) trained using a large database of > 11,000 FR recorded from the iEEG of 38 patients with epilepsy from both macro-contacts and microwires. The FR and non-FR events were fed to the CNN as normalized time-frequency maps. Step 2 is based on feature-based control techniques in order to reject false positives. In step 3, the human is reinstated in the decision-making process for final validation using a graphical user interface.

**Results:** WALFRID achieved high performance on the realistically simulated data with sensitivity up to 99.95 % and precision up to 96.51 %. The detector was able to adapt to both macro and micro-EEG recordings. The real data was used without any pre-processing step such as artefact rejection. The precision of the automatic detection was of 57.5. Step 3 helped eliminating remaining false positives in a few minutes per subject.

**Comparison with Existing Methods:** WALFRID performed as well or better than 6 other existing methods.

**Conclusion:** Since WALFRID was created to mimic the work-up of the neurologist, clinicians can easily use, understand, interpret and, if necessary, correct the output.

## 1. Introduction

According to the World Health Organisation, epilepsy affects around 50 million people worldwide. About one-third of the patients suffer from drug-resistant epilepsy (Kwan et al., 2011). Only the surgical resection of the brain region involved in the initial steps of the epileptic seizures, the epileptogenic zone (EZ), when possible, can make these patients seizure-free (Engel, 1996; Rosenow and Lüders, 2001). An intracerebral exploration with the implantation of depth electrodes (or SEEG for stereo-EEG) is sometimes necessary to accurately identify the EZ and the epileptogenic network (Talairach and Bancaud, 1966; Trébuchon and

Chauvel, 2016; Bartolomei et al., 2017; Isnard et al., 2018). In this case, between 5 and 18 depth electrodes are implanted, each having from 5 to 18 contacts. This usually amounts to more than 120 recording sites per patient. Patients are continuously recorded 24/7, usually for 1–3 weeks, until several spontaneous seizures have been recorded, to accurately identify where the seizures originate from. The custom procedure is then to review these large amounts of data visually to analyze the seizures, and particularly the seizure onset (Rosenow and Lüders, 2001; Bernabei et al., 2023). This phase is tedious, time-consuming, and can take several months and up to one year before a synthesis can be reached. Following this stage, a neurosurgical decision can be made. But even if

**Abbreviations:** FR, fast-ripples; HFO, High Frequency Oscillations; iEEG, intracerebral EEG; SEEG, stereo-EEG.

<footnote><sup>a</sup> Centre de Recherche Cerveau et Cognition (CerCo, CNRS UMR5549), Toulouse 31300, France</footnote>

<footnote><sup>b</sup> Université Paul Sabatier, Toulouse 31300, France</footnote>

<footnote><sup>c</sup> Ecole Nationale de l'Aviation Civile, (ENAC), Toulouse 31300, France</footnote>

<footnote><sup>d</sup> Département de Neurologie, Hôpital Pierre Paul Riquet, Purpan, Centre Hospitalier Universitaire de Toulouse (CHU Toulouse), Toulouse 31300, France</footnote>

<footnote><sup>e</sup> IMT Mines Ales, University of Montpellier, Ales 30100, France</footnote>

<footnote>* Corresponding author at: Centre de Recherche Cerveau et Cognition (CerCo, CNRS UMR5549), Toulouse 31300, France.</footnote>

<footnote>** Corresponding author.</footnote>

<footnote>E-mail addresses: emmanuel.barbeau@cnrs.fr (E.J. Barbeau), christophe.hurter@enac.fr (C. Hurter).</footnote>
neurosurgery is performed, which will be the case for about 50 % of patients, only 65 % of the patients are seizure-free after 5 years (Téllez-Zenteno et al., 2005; Englot and Chang, 2014). There is, therefore, a pressing need for tools that can assist clinicians in analyzing SEEG data more easily and quickly, as well as tools that can contribute to improving patients' prognoses.

Biomarkers other than seizures can also help the identification of the EZ. Interictal epileptic discharges (IED) allow the characterization of the brain regions involved in seizure propagation and may help to deduce the location of the EZ (Azeem et al., 2021; Thomas et al., 2022). However, epileptic discharges are not specific to the EZ and are usually insufficient to identify the EZ precisely (de Curtis and Avanzini, 2001; Avoli et al., 2006; Bartolomei et al., 2016).

In recent years, research in epilepsy has focused on fast ripples (FR), a new promising biomarker of the EZ (Zijlmans et al., 2012). FR are high-frequency oscillations (HFO) superior to 200 Hz in frequency, of short duration (about 10 ms), that are considered to be pathological (Zelmann et al., 2012; Cimbálník et al., 2018). Studies have shown that the surgical removal of FR-related brain tissue is a good predictor of post-surgical outcome (Jacobs et al., 2010; Höller et al., 2015; Frauscher et al., 2017; Thomschewski et al., 2019; Nevalainen et al., 2020), including a recent review (Wang et al., 2024).

A major difficulty with FR detection is that they are highly transient events of relatively low amplitude compared to the background intracranial electroencephalogram (iEEG) activity. It is tedious to detect them manually in the clinical routine because the manual procedure involves reviewing the iEEG activity in short windows of 400–600 ms and adding a visual representation of the signal in the time-frequency domain. According to prior studies, it is deemed necessary to spend about 1 hour manually searching for FR in only 10 minutes of iEEG recording (Zelmann et al., 2009; Migliorelli et al., 2020), and this estimate escalates with the number of electrodes. In addition, interrater detection of HFO is usually low, suggesting that automated methods could help increase interrater reliability (Nariai et al., 2018).

FR can also be recorded from microwires using hybrid electrodes, which combine microwires and macro-contacts. Indeed, some studies suggest that more FR are recorded with microwires than macro-contacts (Worrell et al., 2008; Despouy et al., 2019). As microwires are very thin (20–50 micrometers), they allow access to the local field potential at the micrometer scale and can, in principle, record activities that macro-contacts of classical depth electrodes cannot. For example, the first FR were recorded in the EZ in rodents and humans using microelectrodes (Bragin et al., 1999). In addition, the iEEG signals from microwires are usually recorded with dedicated research amplifiers with frequency acquisition rate above 30KHz to record neuron action potentials. In contrast, the iEEG signal from macro-contacts is recorded from clinical amplifiers with frequency acquisition ranging from 512 Hz to 2KHz. This means that iEEG recorded with microwires can help recording high-frequency oscillations at higher oscillatory rates (Worrell et al., 2008; Blanco et al., 2011). However, the addition of microwires increases the amount of signal to be analyzed as well as its complexity. For example, microwires also record neuron action potentials as already mentioned, which adds unwanted events in the iEEG when studying HFO, or worse, can sometimes mimic FR when the neurons fire in bursts. Although FR seem to be a promising biomarker of the EZ, their use in clinical practice is thus hindered by all these difficulties.

Since the beginning of the 2000s, several automatic detectors of FR have been proposed. These detectors were applied to various interictal biomarkers of epilepsy such as ripples (80–200 Hz), FR (200–600 Hz), HFO (80–600 Hz) or epileptic discharges, in either the time or the frequency domains (Staba et al., 2002; Firpi et al., 2007; Gardner et al., 2007; Zelmann et al., 2009; Crépon et al., 2009; Song and Liò, 2010; Birot et al., 2013; Chaibi et al., 2013; Jrad et al., 2017; Gliske et al., 2016).

Techniques based on temporal signal characteristics were initially successful, in part because they work quite well to detect events that

stand out from the background activity, such as epileptic discharges. The use of time-frequency representations marked a turning point in the automatic detection of FR. For example, Delphos (Roehri et al., 2017) detects HFO in a normalized (ZH0) time-frequency representation by analyzing the time width and frequency spread of peaks above a threshold. The ZH0 normalization technique significantly enhances the HFO footprint in time-frequency space. EPINETLAB (Quitadamo et al., 2018) detects HFO in the scalogram of 1 s signal windows. The scalogram is obtained after preprocessing and segmenting the iEEG and transforming the time windows in the time-frequency domain using a complex Morlet transform. These methods have improved the detection and characterization of HFO. HFO can be represented in the time-frequency space as blobs that are more or less spread out vertically or horizontally, and stand out from the background activity (Roehri et al., 2017; Quitadamo et al., 2018; Donos et al., 2020).

In recent years, new methods have mainly focused on machine learning approaches. For example, the detector developed by Zuo et al. (2019) used a convolutional neural network (CNN) to detect HFO (ripples and FR) by giving as input to the CNN the temporal signal transformed into an image. Nadalin et al. (2021) developed a CNN able to detect epileptic spikes combined with ripples. Since a CNN requires the tuning of many parameters, they evaluated several configurations. Note that to our knowledge, these approaches (Zuo et al., 2019) have been applied to iEEG recorded at the macro-contact scale but it is unknown how they would perform at the microwire scale. A recent solution, PyHFO (Zhang et al., 2024), used deep learning as a second step to categorize events that had been identified by conventional HFO detectors. Other recent similar toolboxes have recently been developed, for example to study the characteristics of sharp-wave ripples (Navas-Olive et al., 2022; 2024), demonstrating a growing trend for these solutions in the field.

In this study, we describe the features and performance of WALFRID (Wavelet AnaLysis and IDentification of Fast-Ripples), an integrative method that takes advantage of the technique described above. The method is based on a CNN processing time-frequency maps (scalograms), followed by a feature-based control step that helps reject false positives. The SEEG data from 38 patients were used to train the CNN and assess its performance. Visualization and interaction with the candidates are available via a Graphical User Interface (GUI) to create a multi-step semi-automatized flexible detector, leading to a hybrid approach, automated detector + human rater, as suggested by recent work (Kural et al., 2022). We assessed the performance of WALFRID using several approaches as recommended by Remakanthakurup Sindhu et al. (2020). We first used simulated gold standard data to situate WALFRID's performance in comparison to six other FR detectors at the macro-iEEG scale (SimiEEG-dataset). We then tested WALFRID on real data acquired from a subset of 11 patients (RealiEEG-dataset), who were implanted with classical and hybrid micro-macroelectrodes.

## 2. Methods

### 2.1. Training datasets

#### 2.1.1. Patients

The iEEG of 38 awake patients with drug-resistant epilepsy was recorded at the University Hospital of Toulouse France (Epifar project, ClinicalTrial: NCT02491476, inclusion period 2015–2022). The implantation of the hybrid electrodes and the collection of data were approved by the local ethics committee and by the French National Agency for Medicines and Health Products Safety (CPP Sud-Ouest et Outre-Mer I, no.1–14–23 and ANSM 2014-A00747–40).

The patients were implanted with classical and 2–4 hybrid electrodes (DIXI Medical, Besançon, France). Each hybrid electrode comprised 6 or 9 conventional macro-contacts (diameter of the shaft: 800 microns, length of the macro-contacts: 2 mm) and 2 or 3 tetrodes emerging between the two deepest macro-contacts (see Despouy et al. (2020)) for a
detailed description of the hybrid electrode). Each tetrode comprised 4 micro-wires (diameter: 20 microns bundled together) (Fig. 1).

The macro-iEEG (intracranial EEG recorded on the macro-contacts) was recorded using two system PLUS EVOLUTION 64-channel acquisition unit (Micromed, France) with a sampling rate of 2048 Hz (anti-aliasing filter: 926.7 Hz; high-pass filter: 0.15 Hz; low-pass filter: 1000 Hz). The micro-iEEG (intracranial EEG recorded on the micro-contacts) was recorded using a 64-channel Cerebus system (Blackrock Microsystems, Salt Lake City, UT, USA) with a sampling rate of 30 kHz (0.3–7.5 kHz bandwidth). Line noise cancellation at 50 Hz was applied. A macro-contact located in the white matter was used as a reference for macro-iEEG and micro-iEEG contacts. The recordings were stored following the Brain Imaging Data Structure Specifications (BIDS; www.bids.neuroimaging.io) (Holdgraf et al., 2018, 2019; Pernet et al., 2018) (Fig. 2).

### 2.1.2. FR and non-FR dataset

FR were tagged by two experts in neurophysiological epileptic bio-markers (JC and LG). FR criteria for were those proposed by Jacobs et al. (2008) and Zelmann et al. (2009) (events containing at least 4 consecutive oscillations with amplitude clearly higher than the baseline). Brainstorm's GUI (Tadel et al., 2011) was used to manually detect FR using multiple panels for the visualisation of raw, filtered (200–600 Hz) and time-frequency signals. This first detection was performed by either LG or JC. Events were extracted and imported in WALFRID where they were reviewed with a panel presenting the raw and filtered signal as well as the corresponding scalogram for double validation by the second reviewer. No inter-rater agreement was calculated 1) as LG and JC simply discussed the case if it was discordant, 2) since some variability in the FR was accepted and in fact desired to train the CNN, 3) and that the final user can in any case review the features of the FR detected and modify their status in WALFRID ("Step 3") to check the results of the detection if she/he wants to be more or less liberal/conservative. At first, 4954 FR were manually detected among 13 patients (330 macro-FR and 4624 micro-FR). This manual detection stage allowed the construction of a first version of WALFRID, which allowed the automatic detection of 6598 new FR in the other 25 patients.

Each of these new FR were individually reviewed. The 11,552 detected FR in total (N macro-FR: 5529; N micro-FR: 6023) were extracted from the iEEG recordings with 400 ms portions of surrounding background activity.

Non-FR activity was extracted from these same 13 patients, using an automatic procedure where around 9000 signal portions of 400 ms were randomly drawn. These signals were manually reviewed to eliminate those in which a FR or a comparable event was captured by chance. At the end, 8574 signal portions of 400 ms were stored. Any type of activity could be found in these non-FR snippets: slow waves, gamma activity, ripples, epileptic discharges, artefacts... The goal was to feed the CNN and make it able to discriminate FR among a large variety of other activities that can be found classically in iEEG.

Thus, two datasets were created to train the neural network: a FR dataset and a non-FR dataset.

### 2.1.3. Structure of the datasets

We designed a NoSQL (Not only SQL) database architecture to store all FR and non-FR snippets with a unique JSON (JavaScript Object Notation) file to store the meta-data of all the events such as the source file name, time location, channel name, patient number, sample rate, duration, unit of measurement, etc. and a folder containing as many raw data files (in the form of.csv files) as the database contains events, where the time series for each event were stored (Fig. 2). All data were pseudonymized. This architecture allows for easy navigation by computers and human users, as well as flexible optimal storage in RAM and on the hard disk. A single event in this database, without compression, weighs between 21 and 50 KB. Fig. 3 shows the database configuration.

## 2.2. Test datasets

### 2.2.1. SimiEEG-dataset: Simulated Macro-iEEG

Realistically simulated macro-iEEG data were freely available from Roehri et al. (2017). This dataset was chosen to evaluate the performance of WALFRID because it had already been used to benchmark six other HFO detectors. Data from this dataset were generated using real recordings of non-rapid eye movement (non-REM) slow-wave sleep of

<figure><img src="image_4.png" /><figcaption>**Fig. 1.** Schematic representation of the hybrid electrode used in this study. (A) The gray areas represent the macro-contacts. The colored sticks and dots represent the tetrodes. (B) 10 seconds of micro-iEEG activity. (C) 10 seconds of macro-iEEG activity. Note that in the configuration where there are three tetrodes like in A, only the 3 most medial and 3 most lateral macro-contacts are recording EEG. "Mi": Macro-contact "i", "tet": tetrode.</figcaption></figure>
<figure><img src="image_5.png" /><figcaption>Fig. 2. Schematic representation of the database architecture with examples of the content of each event.</figcaption></figure>

patients with drug-resistant epilepsy undergoing pre-surgical intracerebral examination. Events such as IED, ripples and FR were extracted from the original data and were randomly inserted (3 events/min) into a simulated background activity, built from portions of the original signal without events, on which different filters were applied to control the Signal to Noise Ratio (SNR). Two events could appear simultaneously (e.g., an IED occurring concomitantly with a ripple, or a ripple occurring concomitantly with a FR). The 120-second simulated recording included 30 channels for 4 SNR values (0; 5; 10; and 15 dB). Each channel and SNR was simulated 30 times, leading to a total of 960 channels.

### 2.2.2. Real EEG-dataset: Real Hybrid macro/micro-iEEG

Simulated data cannot account for the diversity and complexity of real brain iEEG activity. Furthermore, to the best of our knowledge, no simulated micro-iEEG data are available to date. For these reasons, we evaluated our method on data recorded from patients implanted with deep brain hybrid micro- and macro-electrodes (DIXI Medical, Besançon, France). We used the iEEG of 11 patients randomly selected from the 38 patients mentioned above. To prevent overfitting, the data from these patients were removed from the FR-dataset and a specific CNN was trained with the data from the remaining 27 patients.
<figure><img src="image_6.png" /></figure>

<figure><img src="image_7.png" /><figcaption>**Fig. 3.** Description of the database. A. Data snippets were stored in two databases using the exact same structure, one database for Fast-ripple (FR) and the other for Non-FR. These events were extracted from the iEEG of 38 patients. The 400 ms time series and their metadata (patient num, channel name, file name, onset time...) were stored in a NoSQL database. B. Top of each insert: Raw signal. Middle: 200–600 Hz filtered-signal. Bottom: Scalogram. The CNN was trained with the 200–600 Hz portion of the scalogram, but we display it between 1 and 600 Hz so that the reader can have a better understanding of the overall signal dynamics. For the same reason, we represent the raw signal before pre-whitening.</figcaption></figure>

## 2.3. WALFRID detection pipeline

The summary workflow of our method is as follows: first, the iEEG recording is split into short time windows of 400 ms. These signal portions are pre-whitened and transformed into scalograms on which we apply a specific whitening method to reduce the noise and a convolution transform to increase the SNR. These scalograms are given as inputs to a trained CNN, whose binary output is used to assign a label to them: it can either be a FR candidate or a non-FR. All events tagged as FR candidates are sent to a second processing step in order to reduce false positives. For this step, the signal is filtered into two distinct frequency bands:

200–600 Hz (band-pass; which ideally requires the EEG signal to be sampled at 2048 Hz) and above 600 Hz (high-pass). We then calculate the Hilbert envelope of these signals to find the highest magnitude portions and check if one of these signal portions is representative of the candidate FR in terms of duration, amplitude and number of peaks, or if it is more likely to be a false positive that was detected by the CNN (see Fig. 4B). Thirdly, the detected events are stored in a database that can be consulted by the user through a GUI, that can be used to further explore the detected events if necessary, to assign a confidence level to them, or to carry out various operations of signal processing thanks to data visualization. This whole process is summarized in Fig. 4 and will be
## A. Detection step 1: CNN

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

## B. Detection step 2: Rejection of false positives

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

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

## C. Epistemological review and results

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

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

## D. Glass brain

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

(caption on next page)
**Fig. 4.** Flowchart of the WALFRID algorithm. (A) Schematic representation of Step 1, which is based on a CNN processing scalograms. (B) Schematic representation of Step 2. This step consists in rejecting false positives, based on the filtered signal and its Hilbert envelope which is shown as an orange dashed line above the filtered signal. See section "2.3.3.1. Control of FR criteria" for details. (C) Graphic user interface allowing users to review the detector output. Many options are available including tagging the event with different labels (FR, artefact, etc.). (C1) Left panel used to manage different parameters and change the label assigned to the displayed event. (C2) raw signal (400 ms). (C3) Filtered (200–600 Hz) signal (400 ms window). (C4) Scalogram (400 ms window). (C5) Additional time-synchronized window showing the raw signal of adjacent contacts. Please note that additional windows providing FR statistics can also be open (length, mode, entropy, etc. not shown here). (D) Results on a glass brain: example for one patient. The yellow diamonds represent the position of the micro-contacts in hybrid electrodes. The red dotted rectangles represent the FR detection site. In this example, the patient suffered from mesial temporal epilepsy localized in the left hemisphere, with a large number of FR being recorded there. Note that results are now presented under the form of a topographic map (see corresponding section and figure). However, a small amount of FR (macro-FR: 0.75 %, micro-FR: 0 %) were located in the hemisphere contralateral to the epileptogenic area (right).

explained in more detail in the next sections. Note that in all procedures, only 1 micro-wire per tetrode was kept. The reason is that the 4 micro-wires of a same tetrode reflect the same local field potential activity. The study of small differences at the scale of one tetrode falls outside the

scope of this paper and will be studied in the future.

### 2.3.1. Data preprocessing

Once cut into 400 ms portions, the iEEG snippets went through

<figure><img src="image_14.png" /><figcaption>**Fig. 5.** Overview of the CNN. A. The CNN was trained to differentiate scalograms of iEEG signal portions containing FR (FR-dataset) versus those not containing FR (Non-FR dataset). B. 4-fold cross-validation and final test diagram. C. Diagram of the architecture of the CNN. Model's architecture was plotted using Net2Vis (Bauerle et al., 2021).</figcaption></figure>
several stages of normalization:

1. Pre-whitening using first-order backward differencing procedure (Gardner et al., 2007; Roehri et al., 2016). The purpose of pre-whitening was to suppress the continuous component of the signal and to reduce the impact of low frequencies on the following steps (Eq. 1).

2. Pre-whitened signals were then transformed into scalograms using continuous wavelet transform (CWT) with the following parameters: wavelet type: Morlet; cycles: 16; boundaries: 200–600 Hz (fmin-fmax); number of frequencies between fmin and fmax (nf): 100 (Cohen, 2014). The scalograms were resized to 500 × 50 pixels.

3. A “H0 Z-score” normalization was applied to the scalograms to strengthen the SNR across frequencies (Roehri et al., 2016).

4. To further improve the SNR on the scalograms, we applied a two-dimensional convolution using a gaussian kernel of size 20 and standard deviation 5.

$$x[n] = x[n] - x[n - 1] \quad (1)$$

### 2.3.2. Detection step 1: CNN

CNNs are a particular class of deep, feed-forward neural networks. They have become popular network architectures in the Deep Learning field due to their success in image processing and classification (Firpi et al., 2007). The main difference between CNN and other feed-forward neural networks is the application of convolution operations to extract features from the input image. In addition to convolution, CNN have other layers that improve and accelerate learning and inference by downsampling the amount of data that is generated.

For the first step of the WALFRID detector, we trained a custom CNN to differentiate between 400 ms normalized scalograms containing a FR from those without (Fig. 5A). The architecture of the neural network is presented in Fig. 5C Input to the network are images (scalograms) with a size of 50 × 500 pixels.

The network was designed using the Python 3.7 version of Keras API for Ten-sorFlow 2.8.0. Its architecture was inspired from Zuo et al. (2019), with 3 convolutional layers (filters per layer: 32; 32; 16. Kernel size: [2,4]; [1,2]; [1,2]. Padding: always set to “same”. Trainable parameters: 288; 2080; 528), 3 max pooling layers (kernel size: [2,4]; [1, 4]; [1,4]), 1 drop-out layer, 1 flattened layer and 3 fully connected layers (units: 64; 32; 1. Activation: sigmoid, sigmoid, sigmoid. Trainable parameters: 179,264; 2080; 33). We explored various parameters, and while other configurations could be considered, we achieved satisfactory results with the ones we propose, which emerged as the most effective during our experimentation. The initial network weights were randomly assigned for each training session. To evaluate the models while cutting back overfitting problems, we performed a K-fold stratified cross-validation (with K=4). First, the dataset was split in two sets: 80 % was used to perform the 4-fold cross-validation and the remaining 20 % for performing a final test of the system (Fig. 5.B). The 4-fold cross-validation set was divided again into four different subsets. Each subset consisted of, approximately, 50 % FR and 50 % non-FR cases. Then, the network was trained and validated along 40 epochs (10 per fold), using three of the subsets for training and the remaining one for validating the system, with a learning rate of 0.00001 and a batch size of 32 using Adam optimizer. Operations were performed on the 32 hearts GPU and 64 Go of random-access memory (LPDDR5) of an Apple Silicon M1 Max Macbook Pro.

### 2.3.3. Detection step 2: Rejection of false positives

This step is divided into two parts that use exactly the same processing, but on the filtered signal at different frequencies, 200–600 Hz and above 600 Hz, respectively. The first part aims at eliminating false FR candidates based on the formal criteria defining FR (Zelmann et al., 2009). The second part aims to eliminate high harmonic signals, which can occasionally mislead the CNN due to the traces they leave in the spectrograms.

#### 2.3.3.1. Control of FR criteria.
Several objective criteria are used to define FR and need to be taken into consideration. While the CNN itself extracts the features of interest, it is necessary to verify that the FR candidates meet the expected criteria. To verify that the FR candidates meet the criteria of amplitude, duration and number of oscillations, and that those that do not meet them are rejected, we evaluate each of them according to the following procedure:

1. The Hilbert envelope (orange line in Fig. 4.B) of the filtered signal between 200 and 600 Hz is calculated (bandpass linear digital filter: Butterworth 200–600 Hz, order: 6). Only the portions above the 97.5th percentile are kept (above the green part of the filtered signal in Fig. 4.B). Such a threshold was previously used by Gardner et al. (2007) on the cumulative distribution function of line-length values, which is highly correlated with Hilbert’s envelope (Remakanthakurup Sindhu et al., 2020).

2. If this extreme portion of the Hilbert envelope is continuous for more than 6.6 seconds (minimum duration of an FR, for 4 oscillations at 600 Hz; corresponding to 1000 ms / 600 Hz x 4 oscillations), the signal goes to the next step, otherwise it is rejected.

3. The magnitude of the portion of the Hilbert envelope of interest is averaged and compared to the averaged magnitude of the rest of the envelope (<97.5th percentile, background activity). If the average magnitude of the continuous-extreme portion is at least twice that of the rest of the signal (arbitrary threshold, meeting Zelmann et al. (2009) criteria that the amplitude of the FR be clearly higher than the baseline), the signal goes to the next step.

4. The number of peaks in the oscillation below the Hilbert envelope portion of interest is estimated using a peak detection function (findPeaks method of the SciPy library in python). If the number of peaks is at least 4, the signal is kept and considered as a FR.

#### 2.3.3.2. Rejection of high harmonic signals.
The selected FR undergo a last selection step. This consists in repeating the 4 steps described before but on the signal filtered beyond 600 Hz rather than the one filtered between 200 and 600 Hz. Contrary to the decision process explained above, the signals that successfully meet the rejection criteria are eliminated. Indeed, some high harmonic signals, such as artefacts, very abrupt epileptic discharges or action potentials of single neurons in micro-iEEG can partially mimic the frequency signature of FR between 200 and 600 Hz. This leads to “false fast-ripples”, false oscillations due to the frequency transformation that are not present in the raw signal, sometimes referred to as the Gibbs phenomenon (Bénar et al., 2010; Worrell et al., 2008). However, unlike FR, these events also leave a trace in the higher frequency bands because of their harmonics. If these harmonics are detected, then the system considers that the presented element is not a FR, and it is rejected.

### 2.3.4. Evaluation metrics

We analyzed the results of WALFRID after Step1 and Step 2. Detected signal portions that actually contained a FR were considered as True Positives (TP). Detected signal portions that did not contain a FR were deemed False Positives (FP). Omitted FR were considered as False Negatives (FN). Note that, as for all such datasets, it is not possible to get a true negative value as the signal is continuous. It is thus not possible to compute specificity. To evaluate our model, we used precision (Eq. 2) and sensitivity (Eq. 3) criteria as well as the F1-score (Eq. 4), which combines precision and sensitivity to characterize the detector overall performance (Roehri et al., 2017).

$$Precision = 100 \times \frac{TP}{TP + FP} \quad (2)$$
$$Sensitivity = 100 \times \frac{TP}{TP + FN} \qquad (3)$$

$$F1score = \frac{2 \times Precision \times Sensitivity}{Precision + Sensitivity} \qquad (4)$$

## 2.4. WALFRID's GUI

Through the WALFRID's GUI, users can explore a diverse array of visualizations and signal analyses related to the FR that were detected. The GUI was designed to be easily used by non-specialists, such as clinicians. It displays the original raw EEG signal alongside the corresponding signal bandpassed between 200 and 600 Hz and the scalogram, aiding in the identification of potential labelling errors. The user can easily re-label the FR if necessary, using different options (artefact, neuronal spike, noise, etc.). We also provide the reviewer with the ability to give the FR a confidence level (1 = high confidence that this is a true FR to 3 = low confidence that this is a true FR) and to generate summaries taking into account these confidence levels. The user interface allows for instantaneous navigation through time series and transitions between channels. Statistics about FR, both for FR individually or across the whole FR database, are also available. These statistics include the length of the FR, entropy, spectral mode, FR index and SNR (Ibarz et al., 2010). More about the GUI is presented in Fig. 4.C.

# 3. Results

## 3.1. Training evaluation

We first evaluated the performance of the training (n(FR) = 11,552). After the cross-validation was performed, four subsets were used for training and the remaining 20 % of the dataset was used to test the network (Fig. 5). This model achieved 95.46 % accuracy. The evolution of the binary cross-entropy loss and accuracy over 10 epochs for each fold is shown in Fig. 6.

<figure><img src="image_15.png" /><figcaption>Fig. 6. Training and validation of the model. Evolution of the loss and accuracy when training the model using 4-fold cross validation with 10 epochs each using the entire FR-dataset.</figcaption></figure>

## 3.2. Evaluation on simulated macro-iEEG data and comparison with other FR detectors

We evaluated the two steps of our FR detection method on the SimiEEG-dataset, which contained 23,040 FR distributed in the macro-iEEG signal at different SNR values. This corresponds to 5760 FR for each SNR. This signal also included ripples, interictal epileptic discharges and background activity. WALFRID achieved low performance at 0 dB (sensitivity: 8.32 %; precision: 80.37 %). This result was, of course, expected as FR must stand out from surrounding activity to be correctly detected. Performance greatly improved at 5 dB (sensitivity: 72.5 %; precision: 96.98 %) and above, when the SNR increased. Global accuracy reached a plateau at 10 dB (sensitivity: 99.51 %; precision: 98.01 %), with no major changes at 15 dB (sensitivity: 99.95 %; precision: 96.51 %). Results of the detection are reported in Fig. 7 and in Table 1.

The results obtained by six other detectors that processed the SimiEEG-dataset are available for download with the dataset (Roehri et al., 2017). These detectors are available in RippleLab (Navarrete et al., 2016), except for Delphos which is available with the Anywave software (Colombet et al., 2015), and MOSSDET (Lachner-Piza et al., 2020). Among these detectors, MOSSDET, Delphos and SLL demonstrate the best F1-score. On closer examination, MOSSDET and Delphos outperform SLL because of their overall better sensitivity/precision ratio (Fig. 7). A good balance between sensitivity and precision is indeed essential for the interpretability of results, which in the presence of large numbers of false positives can be difficult or impossible to use.

In this dataset, the efficiency of step 2 of WALFRID did not really reach the goal of improving the overall performance. This can be explained by the fact that the SimiEEG-dataset is very clean. For instance, at 5 dB the F1-score dropped from 82.07 % at Step 1–75.04 % at Step 2, due to a decrease of the sensitivity (-10.7 %) that was not compensated by a significant increase in precision (+0.5 %). Indeed, the precision could not really improve because it had already reached a high performance (96.38 %).

## 3.3. Resistance to false fast-ripples

As mentioned in the Introduction, a key feature expected from a FR detector is to be insensitive to “false fast-ripples”, that is false oscillations induced by the spectral content of sharp transients such as epileptic discharges (Bénar et al., 2010; Worrell et al., 2012). Among the 5760 simulated epileptic discharges that passed through our detector from the SimiEEG-dataset, 309 (5.4 %) were labeled as FR. However, 283 of these events were recorded on the same channels (GPH') and presented non-physiological morphological characteristics, maybe because of an inconsistency in the simulation parameters used to create these signals. It is very unlikely to record similar epileptic discharges in the real iEEG of patients. If we remove these events, false positives fall to 0.4 %, which suggests that WALFRID is largely immune to false FRs induced by sharp interictal epileptic discharge.

## 3.4. Evaluation of FR detection on real micro-macro iEEG data

With good performances observed on the SimiEEG-dataset, we challenged WALFRID on real data from the RealiEEG-dataset. Unlike simulated macro-iEEG data, these recordings also contained micro-iEEG data. Note also that we did not clean the data whatsoever, for example by removing artefacts or noisy time windows. As our method is resilient to noise and because we want to get as close as possible to the conditions of real use in clinical routine, we have not been restrictive on the quality of the data to obtain the best possible result. We simply removed the recording channels completely unusable when there were any, which was less than 1 % of the original data. For this evaluation, we used a different model than the one used before. We indeed removed the data of the patients including in this evaluation from the original dataset to
<figure><img src="image_16.png" /><figcaption>**Fig. 7.** Comparison of WALFRID with other detectors on simulated macro-iEEG data. WALFRID, in red, Step 1 bar plot shows the performance at CNN output. WALFRID Step 2 bar plot shows the performance after false positives rejection stage. MOSSDET: (Lachner-Piza et al., 2020); Delphos: (Roehri et al., 2016); HIL: (Crépon et al., 2009); MNI: (Zelmann et al., 2012); SLL: (Gardner et al., 2007); STE: (Staba et al., 2002).</figcaption></figure>

<caption>**Table 1**</caption>

Performance of WALFRID at Step 1 and Step 2 on the SimiEEG-dataset. Prec: precision (Eq. 2), Sens: sensitivity (Eq. 3), F: F1-score (Eq. 4). TP: true positives. FN: false negatives. FP: false positives.

<table><thead><tr><th colspan="7">Output of the step 1 (detection with CNN)</th></tr><tr><th>SNR</th><th>TP</th><th>FN</th><th>FP</th><th>Sens (%)</th><th>Prec (%)</th><th>F (%)</th></tr></thead><tbody><tr><td>0 dB</td><td>479</td><td>5281</td><td>117</td><td>8.32</td><td>80.37</td><td>15.08</td></tr><tr><td>5 dB</td><td>4176</td><td>1584</td><td>130</td><td>72.5</td><td>96.38</td><td>82.07</td></tr><tr><td>10 dB</td><td>5732</td><td>28</td><td>135</td><td>99.51</td><td>97.70</td><td>98.60</td></tr><tr><td>15 dB</td><td>5757</td><td>3</td><td>303</td><td>99.95</td><td>95.00</td><td>97.41</td></tr></tbody><thead><tr><th colspan="7">Output of the step 2 (false positives rejection)</th></tr><tr><th>SNR</th><th>TP</th><th>FN</th><th>FP</th><th>Sens (%)</th><th>Prec (%)</th><th>F (%)</th></tr></thead><tbody><tr><td>0 dB</td><td>287</td><td>5473</td><td>112</td><td>4.98</td><td>71.93</td><td>9.32</td></tr><tr><td>5 dB</td><td>3559</td><td>2201</td><td>121</td><td>61.79</td><td>96.91</td><td>75.40</td></tr><tr><td>10 dB</td><td>5710</td><td>50</td><td>116</td><td>99.13</td><td>98.01</td><td>98.57</td></tr><tr><td>15 dB</td><td>5744</td><td>16</td><td>208</td><td>99.72</td><td>96.51</td><td>98.09</td></tr></tbody></table>

avoid overfitting. A second model was thus trained on less FR (n FR = 5350). It achieved good accuracy (93.21 %) with accuracy and loss over 10 epochs for each fold highly comparable to the first model.

### 3.4.1. Events categorization

We manually visualized and assigned a label to each event detected as a FR candidate after the CNN output, so just after Step 1, based on five categories: one category for true positives and three categories for false positives. This distinction was intended to assess the efficiency of the second step of our detection procedure in eliminating each category of false positives, and to provide a better understanding of the events that are most likely to mislead a CNN that uses scalograms as input. Events were categorized as follows:

* FR (True Positive, examples in Fig. 8A1 and 6A2).

* Artefact (FP, examples in Fig. 8B1 and 6B2): Abnormal, large, and brief change in amplitude, or spurious frequency. Several causes can

be at the origin of such artefacts: movements of the patient, transient electrical dysfunction, action potentials in the micro-iEEG...

* FR-like (FP, example in Fig. 8C): Event resembling an FR in terms of the scalograms and/or the filtered temporal signal and/or the raw signal but which could not be objectively classified as such, mainly because one of the expected criteria was missing (e.g. only 3 oscillations instead of 4, relatively low amplitude or frequency...).

* Other (FP, example in Fig. 8D): Portions of the signal where no specific event could be identified or an unknown event.

### 3.4.2. True positives at the CNN output

WALFRID detected 4074 FR in the 11 patients of the RealiEEG-dataset after the CNN output (detection step 1) (Fig. 9). In the 6 patients for whom hybrid recordings could be analyzed, 1188 FR were detected at the macro-iEEG scale and 367 FR at the micro-iEEG scale. Note that for these patients, the available number of macro-contacts (n = 628) was much larger than the number of tetrodes (n = 51), as described in Table 2. The mean overall number of FR per macro-contact (1.9) was thus much lower than per tetrode (7.2). The remaining 2519 FR were detected in the 5 other patients for whom only macro-contacts (n = 490) were available.

### 3.4.3. False positives at the CNN output

#### 3.4.3.1. Sources of false positives at the CNN output at the macro-iEEG scale.
4500 false positives were detected by the CNN at the macro-iEEG scale in the 11 patients of the RealiEEG-dataset (right after detection step 1). The majority of FP at the macro-iEEG scale (44.4 % of all false positives) was categorized as "FR-like" for the following reasons: (a) insufficient number of oscillations, and/or (b) low amplitude, and/or (c) non-converging raw/filtered/time-frequency signals. The second source of FP (31.7 %) was coming from events that were categorized "Other". The remaining 23.9 % false positives originated from artefacts potentially caused by a transient electrical default or wire movements
<figure><img src="image_17.png" /><figcaption>**Fig. 8.** Example of different types of events. In these examples, we used one of the features of WALFRID to automatically code the power of the detected events using colors. Red indicates a high SNR, yellow and green a medium SNR and blue a low SNR. The right row contains events with relatively high SNR, the left contains events with relatively low SNR. Top of each insert: Raw signal. Middle: 200–600 Hz filtered signal. Bottom: 200–600 Hz scalogram. A1 and A2: Fast Ripples. B1: high-frequency, high-amplitude artefact. B2: burst of neuronal activity recorded on the micro-wires of hybrid electrodes. These bursts can mimic the spectral activity of a FR. C: This event was not classified as a true FR because of the number of oscillations. D: No particular event could be observed.</figcaption></figure>

caused by head movements or patient gestures.

3.4.3.2. Sources of false positives at the CNN output at the micro-iEEG scale. WALFRID detected 896 FP at the micro-iEEG scale in 6 patients of the RealiEEG-dataset at the CNN output (detection step 1). The distribution of FP across the different categories was roughly balanced, with 38 % of events classified as "FR-like", 32.6 % as "Other" and 29.4 % as "Artefacts". In addition to the sources of artefacts that can affect the macro-iEEG signal, new ones could be considered such as action potentials of neurons, in isolation or in burst.

3.4.4. Efficiency of Step 2 to reject false positives

About 1750,000 scalograms were analyzed by the CNN, in step 1 of our detection procedure (1169 channels * 600 seconds / 0.4 seconds). Following CNN output, 9470 events were classified as FR candidates, i.e. 0.54 %. Among these candidates, 4074 were FR (0.23 %) and 5396 were false positives (0.31 %). Of these false-positive, 2770 were eliminated by step 2. We describe the results of this step in detail in the paragraphs below and in Fig. 9.

3.4.4.1. Efficiency of Step 2 at the macro-iEEG scale. Of the 4500 false-positive detected at the macro-iEEG scale in 11 patients of the RealiEEG-dataset, 2392 (53.2 %) were eliminated by Step 2. More
<figure><img src="image_18.png" /><figcaption>**Fig. 9.** Distribution of the number of detected events over the two detection steps by WALFRID, for both macro- and micro-contacts. Results were manually labeled based on 4 categories after visual inspection. Left panel: results for 11 patients of the RealiEEG-dataset. Right panel: results on the micro-electrodes for 6 patients of the RealiEEG-dataset.</figcaption></figure>

<caption>**Table 2**</caption>

Characteristics of the electrodes implanted in the 11 patients used to evaluate our detector (RealiEEG-dataset).

<table><thead><tr><th>Patient</th><th>Number of electrodes (including hybrids)</th><th>Number of macro-contacts</th><th>Number of tetrodes</th></tr></thead><tbody><tr><td>1</td><td>13 (4)</td><td>108</td><td>9</td></tr><tr><td>2</td><td>11 (4)</td><td>104</td><td>10</td></tr><tr><td>3</td><td>10 (4)</td><td>105</td><td>9</td></tr><tr><td>4</td><td>13 (4)</td><td>97</td><td>9</td></tr><tr><td>5</td><td>14 (3)</td><td>107</td><td>6</td></tr><tr><td>6</td><td>13 (3)</td><td>107</td><td>8</td></tr><tr><td>7</td><td>13</td><td>101</td><td>no tetrode</td></tr><tr><td>8</td><td>15</td><td>106</td><td>no tetrode</td></tr><tr><td>9</td><td>12</td><td>111</td><td>no tetrode</td></tr><tr><td>10</td><td>12 (3)</td><td>110</td><td>corrupted</td></tr><tr><td>11</td><td>10 (3)</td><td>62</td><td>corrupted</td></tr><tr><td>Total</td><td>136 (22)</td><td>1118</td><td>51</td></tr><tr><td>Detected</td><td>4075</td><td>3707</td><td>368</td></tr><tr><td>FR</td><td></td><td></td><td></td></tr></tbody></table>

precisely, 2090 were eliminated in Step 2.1 and 302 in Step 2.2 (rejection of harmonics of events > 600 Hz). As expected, the efficiency of Step 2 was mainly observed in the "Other" (942 out of 1427 in total) and "Artefact" (902 out of 1077 in total) categories. As expected as well because of their resemblance to FR, the "FR-like" events were poorly eliminated (545 out of 1996 in total).

As a counterpart to the elimination of false positives, Step 2 also eliminated 486 FR (out of 3707 in total).

### 3.4.4.2. Efficiency of Step 2 at the micro-iEEG scale.
Among the 896 false-positive at the micro-iEEG scale in 6 patients of the RealiEEG-dataset, 378 (42.2 %) were eliminated by Step 2. More precisely, 268 were eliminated after Step 2.1 and 110 after Step 2.2. As for macro-iEEG, the efficiency of Step 2 was mainly observed in the "Other" (99 out of 292 in total) and "Artefact" (221 out of 264 in total) categories. As above, the "FR-like" events were poorly eliminated (58 out of 340 in total).

As a counterpart to the elimination of false positives, Step 2 also eliminated 36 FR (out of 367 in total).

### 3.4.5. Summary of the precision for the real micro-macro iEEG dataset

Considering the above figures, the overall precision of WALFRID after step 2 was 57.5 %. It was higher for macro-EEG (60.4 %) than for micro-EEG (39.0 %). This means that some FP were still present after Step 2 (about 40 % of all events for macro-EEG and 50 % of all events for micro-EEG). However, it only takes a few minutes to discard these FP using the Step 3 GUI. Sensitivity could not be measured because the number of false negatives is unknown for real EEG data.

### 3.5. Review and summary of the results

Automation of FR detection is crucial, but automated procedures do not address all demands. Users, in particular clinicians, require confidence and clinical insights in the result of the output of automated procedures. It is one of the goals of WALFRID to provide the user with an interface to review the results. WALFRID includes the automatic detection of FR but also many features revolving around interaction with the results that can be reviewed using specialized user interfaces. During the detection process, FR candidates are systematically stored in a database that can be consulted according to several representations: raw signal (Fig. 4C2), filtered signal (Fig. 4C3), scalograms (Fig. 4C4). The user can change their label or perform various signal processing operations to analyze them (Fig. 4C1). This Step 3, which we call "epistomological review" (Fig. 4) is necessary if one wants a system to be adopted by clinicians. For this reason, WALFRID is viewed as a semi-automatic detector as it does not, on purpose, remove the user from the whole detection procedure.

In addition, what a user wants to see is a summary of the amount of FR detected over the channels of each electrode. We designed a dedicated graphical representation to display this information efficiently (Fig. 10). It summarizes the intensity of the FR detection on a plot which shows the different electrodes on the y-axis and the different contacts on the x-axis. The clinician can thus easily understand from where the most FR were recorded.

An unexpected finding of such display is that for most patients, the information can be interpreted immediately after completing Steps 1 and 2 of the automatic detection procedure, without the need for manual
<figure><img src="image_19.png" /><figcaption>**Fig. 10.** Example of topographic maps. A. Result after automatic detection on 10 minutes macro-EEG signal, without human intervention to label the detected events. B. Showing FR after manual reviewing of each event (confidence level 1) using the WALFRID GUI. C. Showing FR with a confidence level 2. D. Showing FR with a confidence level 3. Note the strong co-location observed for all confidences.</figcaption></figure>

review of Step 3. For example, Fig. 10A shows all events after Step 2, while Fig. 10B shows the same results after manual reviewing (Step 3). Of course, results are cleaner on Fig. 10 after manual cleaning but Fig. 10A allowed to arrive at the same clinical conclusion, that is that most FR are recorded on channels B1–2–3 (those were located in the anterior hippocampus of the patient). This raises the possibility, which needs to be assessed in future studies, that the results of WALFRID do not necessarily need to be manually reviewed in details. It also suggests the interesting possibility that in fact most FR-like events (Fig. 8C), which were estimated to account for about 40 % of all false positives are in fact true FR, however not strictly meeting the formal criteria for FR reported in the literature and used in the current study for the sake of comparability across studies. Given these thoughts, we have developed a procedure to categorize FR in three: FR with a confidence level 1 (FR meeting all formal criteria), FR with a confidence level 2 (events close but not entirely meeting formal criteria) and FR with confidence level 3 (FR meeting some aspects of FR, i.e. more than 2 of the formal criteria for a FR are missing). As can be seen from Fig. 10, those provide a very similar picture of the location of FR in the brain suggesting that FR may overall have more variability than previously thought.

## 4. Discussion

Several studies have shown that FR could be promising biomarkers of the epileptogenic zone (Frauscher et al., 2017; Nevalainen et al., 2020; Thomschewski et al., 2019; Remakanthakurup Sindhu et al., 2020; Fedele et al., 2016; Scott et al., 2020; Wang et al., 2024), although this has recently been questioned (Lachner-Piza et al., 2020; Jacobs and Zijlmans, 2020; Kuhnke et al., 2019; Roehri et al., 2018). Over the past two decades, several attempts to create FR detectors have emerged (Donos et al., 2020; Lai et al., 2019; Fedele et al., 2016; Burnos et al., 2014), but no solution has gained consensus possibly because the constraints for day-to-day use are too great: clinicians do not have the time to perform extensive pre-processing on iEEG data or to sort out large amounts of false positives, without suitable interactive data visualization tools. Also, there may often be a discordance between the published performance of the algorithms and what clinicians experience when they implement them in the real world.

Here, we created a computer-aided method that automatically detects FR. We have combined the strengths and advantages of three generations of high-frequency oscillation detectors for the detection of FRs: those based on time series analysis, those based on scalogram analysis and those based on deep learning, to which we have added two
essential elements: firstly an approach mimicking the workup of clinicians for better performance and greater acceptability of the results by clinicians, and secondly an adaptive capacity for analysis at different scales of micro- and macro-EEG recordings. WALFRID thus follows three processing steps: FR candidate detection; rejection of false-positives and reviewing. The objective was to limit as much as possible the user's workload, especially the processing of false positives, which are always numerous as soon as large quantities of real data are used (Kural et al., 2022), while keeping the clinician into the loop in order to provide high confidence in the output results.

WALFRID's performance was compared to 6 other FR detectors. WALFRID performed close to the best detectors available, Delphos and MOSSDET, and even exceeded them at certain SNR levels. Delphos and MOSSDET performed better at 0 dB (+6% and +29% in F1-score respectively), but the interest of 0 dB oscillations is debatable since the criteria established in the literature stipulate that the amplitude of the FR must exceed that of the background activity to be considered as a true FR (Zelmann et al., 2009). At 5 dB, the gap between WALFRID, Delphos and MOSSDET became small (+3% in F1-score for both of them compared to WALFRID). At 10 dB, WALFRID took the lead (+8% compared to Delphos, +7% compared to MOSSDET), and remained better at 15 dB (+7% compared to Delphos, +4% compared to MOSSDET). These differences are relatively small and may vary from one dataset to another.

WALFRID is based first on a CNN. Detecting FR using deep learning allows us to approach the problem from a different and potentially more effective angle, or at least one that complements, past methods. Deep learning algorithms effectively demonstrate a certain form of resilience to poor-quality input data, including for multi-class scenarios (Zuo et al., 2019; Medvedev et al., 2019; Hagen et al., 2020). One critical benefit of the approach in this study was that there was no need for any pre-processing of the signal: we did not reject artefactual periods of iEEG as is usually needed for most conventional detectors. This is an important progress as this saves a lot of time, particularly for clinicians for whom artefact rejection has little added value. Of note, the few detectors based on deep learning available are usually fed with portions of the temporal signal, either raw or filtered. However, scalograms can be much more informative and discriminating when looking for HFO (Donos et al., 2020; Quitadamo et al., 2018; Roehri et al., 2016), leading to the idea that time series should only be used for fine analysis of the signal's oscillatory characteristics.

The second steps of WALFRID aimed at rejecting false positives. False-positives are common in iEEG recordings due a large variety of reasons related to electro-magnetic and electronic artefacts (sensor issues, connectors, cables movements, poor ground and reference, external source of electric noise, etc.). False FRs can also be induced by sharp transients. In addition, a large number of false positives, due to a liberal detector, helps achieving higher sensitivity. However, rejecting false positives manually through signal reviewing can be very time consuming and can severely diminish the interest of an automatic detector. The false-positives rejection step gave satisfactory results as improvement in precision was of 42% on the micro-EEG signal and of 53% on the macro-EEG signal. Importantly, we found out that contrary to true positive FR, which are densely clustered on a few electrode contacts, false positives are distributed without any particular rule (i.e., depending on the artefact, noise and so on that were recorded on these other contacts). When the user consults the map of the distribution of the FR across the different contacts, he can quickly perceive on which contacts is located the FR cluster because of the high density of detected events. In contrast, false positives spread out across other contacts, leading to a low density of events (example in Fig. 10A). We believe that our Step 2 could be improved in a number of ways, or even tailored to specific needs and teams if needed.

The counterpart of Step 2 is to also reject some true positives. Nevertheless, the time saved to process the final result in routine can compensate for this loss. If the user prefers not to lose any FR, the

different steps can be dissociated. The user can thus choose to stop at Step 1 and analyze the results at the output of the CNN. This choice can be interesting when a patient presents very few FR, or when the analyses focus on only a few electrodes, requiring less manual processing time. Generally speaking, and from a clinical point of view, it is not necessary to have the exact count of FR for a patient. This is probably impossible to achieve in any case as FR can more often than not be in a grey zone between FR strictly meeting all criteria for a FR and FR not meeting all these but still viewed as a FR. This will depend on reviewers and whether they are liberal or not regarding this issue. This situation is very similar to other interictal biomarkers that are difficult to categorize such as interictal epileptic discharges (Kural et al., 2020).

Interestingly, we found that events classified as "FR-like", that is, FR that were labeled with a confidence level 2 (medium confidence that it is a true FR) or even 3 (low confidence), were often co-located on the electrode contacts on which FR with high level of confidence were also recorded (Fig. 10). This observation leads us to believe that the criteria for selecting FR might generally be restrictive, leading to eliminating large amounts of events of interest regarding the localization of brain tissue related to the epileptogenic zone. These events are correctly detected by an unsupervised approach, such as with a CNN in this study, but discarded because of the objective criteria used to set the thresholds of parametric methods. To date, some criteria such as the number of peaks whose amplitude exceeds that of the background activity have been established mainly to avoid the detection of false FRs (Bénar et al., 2010; Amiri et al., 2016). But with the improvement and resilience of machine learning techniques, we could imagine in the near future being able to abandon certain criteria to maximize useful information. Different patterns broadly corresponding to FR could be automatically detected and then clustered to identify subtypes among FR and reject artefact-like FR, as suggested in Blanco et al. (2011).

Manual post-processing using Step 3 is most of the time not mandatory, particularly after what we have just reported regarding the analysis of the confidence levels applied to FR. If for some reason it has to be done, for example because a patient shows discordant results with another clinical examination or the clinicians simply want to gain confidence in the results, it takes about one hour to visually process 1000 events detected with WALFRID. For example, we processed for this study all detected events one by one, i.e. 9470 in the 11 patients, which corresponded to a processing time of about 9 hours. A combined approach mixing an automatic detection step and human supervision has proven to be efficient for interictal epileptic discharge analysis (Kural et al., 2022), which is similar to the approach we propose here. Of course, if we had to do this work entirely manually, it would have taken dozens of days, which is obviously impossible to ask of clinicians and demonstrates the interest of automated methods.

Another major objective of our study was to detect FR on the micro- contacts of hybrid electrodes. The first FR described in humans were recorded in the EZ using micro-electrodes (Bragin et al., 1999). But since it was discovered that FR could also be recorded with macro-electrodes, almost all clinical trials and dedicated automatic detectors were designed exclusively for this type of electrode. Some studies have shown that it is possible to record more FR at the micro-EEG scale, but in total, very few have been conducted simultaneously at both the macro-iEEG and micro-iEEG scales (Worrell et al., 2008; Despouy et al., 2019), thus limiting our capacity to draw solid conclusions about how many FR could be recorded at both scales simultaneously. Although there isn't yet any gold standard regarding FR recorded on micro-EEG, WALFRID performed without difficulty on micro-contact. With this regard, Step 3 is also useful to get acquainted with FR and to look for FR subtypes, which may be particularly relevant to analyze whether FR recorded in the micro-iEEG bring the same clinical information or have the same physiological origin that FR recorded in the macro-iEEG. Previous work in animals has for example suggested that there could be both "pure" and "emergent" FRs (Ibarz et al., 2010). Whether the size of the electrode, which can vary considerably in patients with epilepsy between
ECOG (electrocorticography), depth electrodes and microwires, has an effect on the FR record remains to be clarified (Menendez de la Prida et al., 2015).

To accurately capture FR within the upper range of the 200–600 Hz band (e.g., at 500 Hz), a sampling rate of 2048 Hz is ideally required, which may not be routinely available in clinical settings. It may be valuable to consider acquiring an hour-long EEG recording for FR analysis, such as during a nap or the early stages of nighttime sleep. Recent studies have described very high-frequency oscillations (>1000 Hz) (Brazdil et al., 2017). While WALFRID is not designed to detect these, its underlying principles and architecture could potentially be adapted for this purpose, provided a suitable dataset of events is available.

# 5. Conclusion

We have shown that the combination of frequency-based signal and image processing techniques for FR detection shows results that could live up to clinical expectations. WALFRID enables FR detection with high sensitivity and precision, while allowing clinicians to customize the level of sharpness of the results, from liberal to conservative, depending on the time available to process the data and their needs. It also allows processing both micro- and macro-EEG signal, a notable feature give the rising interest in microelectrodes recordings.

# Funding

This work has been funded by a grant from the Occitanie region to Ludovic Gardy (project Epivis, n° 244525). The sponsor was not involved in the study design, collection, analysis and interpretation of data, writing of the report and decision to submit the article for publication.

# Declaration of interest

The algorithm behind WALFRID is patented (WO2023067114A1) with L. Gardy, E. Barbeau and C. Hurter as inventors. Avrio MedTech, a startup company of which L. Gardy, E. Barbeau and C. Hurter are co-founders, has exclusive exploitation rights to the patent, the technology and the training database. Avrio MedTech is responsible for the industrialization of the technology and the regulatory process for the benefit of the clinical community and patients. The technology has been integrated into a software product marketed by Avrio MedTech under the name Halyzia™, a solution for the review of intracranial electroencephalograms. Avrio MedTech provides a dedicated support for Halyzia.

# CRediT authorship contribution statement

**Jonathan Curot:** Writing – review & editing, Data curation. **Ludovic Gardy:** Writing – review & editing, Writing – original draft, Funding acquisition, Formal analysis, Conceptualization. **Christophe Hurter:** Writing – review & editing, Writing – original draft, Supervision, Funding acquisition, Conceptualization. **Emmanuel J. Barbeau:** Writing – review & editing, Writing – original draft, Supervision, Funding acquisition, Conceptualization. **Louis Berthier:** Formal analysis. **Luc Valton:** Writing – review & editing, Data curation.

# Declaration of generative AI and AI-assisted technologies in the writing process

During the preparation of this work the author(s) used the free version of DeepL version 24.4.2912025 in order to improve the readability of some paragraphs. After using this tool/service, the authors reviewed and edited the content as needed and take full responsibility for the content of the published article.

# Declaration of Competing Interest

The authors declare the following financial interests/personal relationships which may be considered as potential competing interests: Emmanuel J. Barbeau reports a relationship with Avrio MedTech that includes: equity or stocks. Christophe Hurter reports a relationship with Avrio MedTech that includes: equity or stocks. Ludovic Gardy reports a relationship with Avrio MedTech that includes: equity or stocks. Emmanuel J. Barbeau has patent #WO2023067114A1 pending to Avrio MedTech. Christophe Hurter has patent #WO2023067114A1 pending to Avrio MedTech. Ludovic Gardy has patent #WO2023067114A1 pending to Avrio MedTech. If there are other authors, they declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

# Data Availability

The simulated macro-iEEG dataset is freely available from Roehri et al. (2017). The RealiEEG raw EEG dataset is not available, as it contains sensitive or confidential patient information. Extracts from the event database will be made available upon reasonable request.

# References

Amiri, M., Lina, J.-M., Pizzo, F., Gotman, J., 2016. High frequency oscillations and spikes: separating real HFOs from false oscillations. Clin. Neurophysiol. 127 (1), 187–196. https://doi.org/10.1016/j.clinphys.2015.04.290.

Avoli, M., Biagini, G., de Curtis, M., 2006. Do interictal spikes sustain seizures and epileptogenesis? Epilepsy Curr. 6 (6), 203–207. https://doi.org/10.1111/j.1535-7511.2006.00146.x.

Azeem, A., von Ellenrieder, N., Hall, J., Dubeau, F., Frauscher, B., Gotman, J., 2021. Interictal spike networks predict surgical outcome in patients with drug-resistant focal epilepsy. Ann. Clin. Transl. Neurol. 8 (6), 1212–1223. https://doi.org/10.1002/acn3.51337.

Bartolomei, F., Lagarde, S., Wendling, F., McGonigal, A., Jirsa, V., Guye, M., Bénar, C., 2017. Defining epileptogenic networks: contribution of SEEG and signal analysis. Epilepsia 58 (7), 1131–1147. https://doi.org/10.1111/epi.13791.

Bartolomei, F., Trébuchon, A., Bonini, F., Lambert, I., Gavaret, M., Woodman, M., Giusiano, B., Wendling, F., Bénar, C., 2016. What is the concordance between the seizure onset zone and the irritative zone? A SEEG quantified study. Clin. Neurophysiol. 127 (2), 1157–1162. https://doi.org/10.1016/j.clinphys.2015.10.029.

Bauerle, A., van Onzenoodt, C., Ropinski, T., 2021. Net2Vis – a visual grammar for automatically generating publication-tailored CNN architecture visualizations. IEEE Trans. Vis. Comput. Graph. 27 (6), 2980–2991. https://doi.org/10.1109/tvcg.2021.3057483.

Bénar, C.G., Chauvière, L., Bartolomei, F., Wendling, F., 2010. Pitfalls of high-pass filtering for detecting epileptic oscillations: a technical note on “false” ripples. Clin. Neurophysiol. 121 (3), 301–310. https://doi.org/10.1016/j.clinphys.2009.10.019.

Bernabei, J.M., Li, A., Revell, A.Y., Smith, R.J., Gunnarsdottir, K.M., Ong, I.Z., Davis, K. A., Sinha, N., Sarma, S., Litt, B., 2023. Quantitative approaches to guide epilepsy surgery from intracranial EEG. Brain 146 (6), 2248–2258. https://doi.org/10.1093/brain/awad007.

Birot, G., Kachenoura, A., Albera, L., Bénar, C., Wendling, F., 2013. Automatic detection of fast ripples. J. Neurosci. Methods 213 (2), 236–249. https://doi.org/10.1016/j.jneumeth.2012.12.013.

Blanco, J.A., Stead, M., Krieger, A., Stacey, W., Maus, D., Marsh, E., Viventi, J., Lee, K.H., Marsh, R., Litt, B., Worrell, G.A., 2011. Data mining neocortical high-frequency oscillations in epilepsy and controls. Brain 134 (10), 2948–2959. https://doi.org/10.1093/brain/awr212.

Bragin, A., Engel, J., Wilson, C.L., Fried, I., Buzsaki, G., 1999. High-frequency oscillations in human brain. Hippocampus 9 (2), 137–142. https://doi.org/10.1002/(sici)1098-1063(1999)9:2<137::aid-hipo5>3.0.co;2-0.

Brázdil, M., Pail, M., Halámek, J., Plešinger, F., Cimbálník, J., Roman, R., Jurák, P., 2017. Very high-frequency oscillations: novel biomarkers of the epileptogenic zone. Ann. Neurol. 82 (2), 299–310.

Burnos, S., Hilfiker, P., Sürücü, O., Scholkmann, F., Krayenbühl, N., Grunwald, T., Sarnthein, J., 2014. Human intracranial high frequency oscillations (HFOs) detected by automatic time-frequency analysis. PLoS ONE 9 (4), e94381. https://doi.org/10.1371/journal.pone.0094381.

Chaibi, S., Sakka, Z., Lajnef, T., Samet, M., Kachouri, A., 2013. Automated detection and classification of high frequency oscillations (HFOs) in human intracerebral EEG. Biomed. Signal Process. Control 8 (6), 927–934. https://doi.org/10.1016/j.bspc.2013.08.009.

Cimbálník, J., Hewitt, A., Worrell, G., Stead, M., 2018. The CS algorithm: a novel method for high frequency oscillation detection in EEG. J. Neurosci. Methods 293, 6–16. https://doi.org/10.1016/j.jneumeth.2017.08.023.
Cohen, M.X., 2014. Analyzing Neural Time Series Data. The MIT Press. https://doi.org/10.7551/mitpress/9609.001.0001.

Colombet, B., Woodman, M., Badier, J.M., Bénar, C.G., 2015. AnyWave: a cross-platform and modular software for visualizing and processing electrophysiological signals. J. Neurosci. Methods 242, 118–126. https://doi.org/10.1016/j.jneumeth.2015.01.017.

Crépon, B., Navarro, V., Hasboun, D., Clemenceau, S., Martinerie, J., Baulac, M., Adam, C., Le Van Quyen, M., 2009. Mapping interictal oscillations greater than 200 Hz recorded with intracranial macroelectrodes in human epilepsy. Brain 133 (1), 33–45. https://doi.org/10.1093/brain/awp277.

de Curtis, M., Avanzini, G., 2001. Intercellular spikes in focal epileptogenesis. Prog. Neurobiol. 63, 541–567. https://doi.org/10.1016/s0301-0082(00)00026-5.

Despouy, E., Curot, J., Denuelle, M., Deudon, M., Sol, J.-C., Lotterie, J.-A., Reddy, J., Nowak, L.G., Pariente, J., Thorpe, S.J., Valton, L., Barbeau, E.J., 2019. Neuronal spiking activity highlights a gradient of epileptogenicity in human tuberous sclerosis lesions. Clin. Neurophysiol. 130 (4), 537–547. https://doi.org/10.1016/j.clinph.2018.12.013.

Despouy, E., Curot, J., Reddy, J., Nowak, L.G., Deudon, M., Sol, J.-C., Lotterie, J.-A., Denuelle, M., Maziz, A., Bergaud, C., Thorpe, S.J., Valton, L., Barbeau, E.J., 2020. Recording local field potential and neuronal activity with tetrodes in epileptic patients. J. Neurosci. Methods 341, 108759. https://doi.org/10.1016/j.jneumeth.2020.108759.

Donos, C., Míndrúta, I., Barborica, A., 2020. Unsupervised detection of high-frequency oscillations using time-frequency maps and computer vision. Front. Neurosci. 14. https://doi.org/10.3389/fnins.2020.00183.

Engel, J., Jr, 1996. Surgery for seizures. N. Engl. J. Med. 334 (10), 647–653. https://doi.org/10.1056/nj19960373341008.

Englot, D.J., Chang, E.F., 2014. Rates and predictors of seizure freedom in resective epilepsy surgery: an update. Neurosurg. Rev. 37 (3), 389–405. https://doi.org/10.1007/s10143-014-0527-9.

Fedele, T., van 't Klooster, M., Burnos, S., Zweiphenning, W., van Klink, N., Leijten, F., Zijlms, M., Sarnthein, J., 2016. Automatic detection of high frequency oscillations during epilepsy surgery predicts seizure outcome. Clin. Neurophysiol. 127 (9), 3066–3074. https://doi.org/10.1016/j.clinph.2016.06.009.

Firpi, H., Smart, O., Worrell, G., Marsh, E., Dlugos, D., Litt, B., 2007. High-frequency oscillations detected in epileptic networks using swarmed neural-network features. Ann. Biomed. Eng. 35 (9), 1573–1584. https://doi.org/10.1007/s10439-007-9333-7.

Frauscher, B., Bartolomei, F., Kobayashi, K., Cimbalnik, J., van 't Klooster, M.A., Rampp, S., Otsubo, H., Höller, Y., Wu, J.Y., Asano, E., Engel, J., Jr., Kahane, P., Jacobs, J., Gotman, J., 2017. High-frequency oscillations: the state of clinical research. Epilepsia 58 (8), 1316–1329. https://doi.org/10.1111/epi.13829.

Gardner, A.B., Worrell, G.A., Marsh, E., Dlugos, D., Litt, B., 2007. Human and automated detection of high-frequency oscillations in clinical intracranial EEG recordings. Clin. Neurophysiol. 118 (5), 1134–1143. https://doi.org/10.1016/j.clinph.2006.12.019.

Gliske, S.V., Irwin, Z.T., Davis, K.A., Sahaya, K., Chestek, C., Stacey, W.C., 2016. Universal automated high frequency oscillation detector for real-time, long-term EEG. Clin. Neurophysiol. 127 (2), 1057–1066. https://doi.org/10.1016/j.clinph.2015.07.016.

Hagen, E., Chambers, A.R., Einevoll, G.T., Pettersen, K.H., Enger, R., Stasik, A.J., 2020. RippleNet: a recurrent neural network for sharp wave ripple (SPW-R) detection. Cold Spring Harb. Lab. https://doi.org/10.1101/2020.05.11.087847.

Holdgraf, C., Appelhoff, S., Bickel, S., Bouchard, K., D'Ambrosio, S., David, O., Devinsky, O., Dichter, B., Flinker, Aeden, Foster, Gorgolewski, B., Groen, K.J., Groppe, I.I.A., PhD, D., Gunduz, A., Hamilton, L.S., Honey, C.J., Jas, M., Knight, R., Lachaux, J.-P., Hermes, D., 2018. BIDS-iEEG: An extension to the brain imaging data structure (BIDS) specification for human intracranial electrophysiology. Cent. Open Data Sci. https://doi.org/10.31234/osf.io/r7vc2.

Holdgraf, C., Appelhoff, S., Bickel, S., Bouchard, K., D'Ambrosio, S., David, O., Devinsky, O., Dichter, B., Flinker, A., Foster, B.L., Gorgolewski, K.J., Groen, I., Groppe, D., Gunduz, A., Hamilton, L., Honey, C.J., Jas, M., Knight, R., Lachaux, J.-P., Hermes, D., 2019. iEEG-BIDS, extending the brain imaging data structure specification to human intracranial electrophysiology. Sci. Data 6 (1). https://doi.org/10.1038/s41597-019-0105-7.

Höller, Y., Kutil, R., Klaffenböck, L., Thomschewski, A., Höller, P.M., Bathke, A.C., Jacobs, J., Taylor, A.C., Nardone, R., Trink, E., 2015. High-frequency oscillations in epilepsy and surgical outcome. A meta-analysis. Front. Hum. Neurosci. 9. https://doi.org/10.3389/fnhum.2015.00574.

Ibarz, J.M., Foffani, G., Cid, E., Inostroza, M., Menendez de la Prida, L., 2010. Emergent dynamics of fast ripples in the epileptic hippocampus. J. Neurosci. 30 (48), 16249–16261. https://doi.org/10.1523/jneurosci.3357-10.2010.

Isnard, J., Taussig, D., Bartolomei, F., Bourdillon, P., Catenoix, H., Chassoux, F., Chipaux, M., Clémenceau, S., Colnat-Coulbois, S., Denuelle, M., Derrey, S., Devaux, B., Dorfmüller, G., Gilard, V., Guenot, M., Job-Chapron, A.-S., Landré, E., Lebas, A., Maillard, L., Sauleau, P., 2018. French guidelines on stereoelectroencephalography (SEEG). Neurophysiol. Clin. 48 (1), 5–13. https://doi.org/10.1016/j.neucli.2017.11.005.

Jacobs, J., LeVan, P., Chander, R., Hall, J., Dubeau, F., Gotman, J., 2008. Intercellular high-frequency oscillations (80–500Hz) are an indicator of seizure onset areas independent of spikes in the human epileptic brain. Epilepsia 49 (11), 1893–1907. https://doi.org/10.1111/j.1528-1167.2008.01656.x.

Jacobs, J., Zijlms, M., Zelmann, R., Chatillon, C., Hall, J., Olivier, A., Dubeau, F., Gotman, J., 2010. High-frequency electroencephalographic oscillations correlate with outcome of epilepsy surgery. Ann. Neurol. 67 (2), 209–220. https://doi.org/10.1002/ana.21847.

Jacobs, J., Zijlms, M., 2020. HFO to measure seizure propensity and improve prognostication in patients with epilepsy. Epilepsy Curr. 20 (6), 338–347. https://doi.org/10.1177/1535759720957308.

Jrad, N., Kachenoura, A., Merlet, I., Bartolomei, F., Nica, A., Biraben, A., Wendling, F., 2017. Automatic detection and classification of high-frequency oscillations in depth-eeg signals. IEEE Trans. Biomed. Eng. 64 (9), 2230–2240. https://doi.org/10.1109/tbme.2016.2633391.

Kuhnke, N., Klus, C., Dämpelmann, M., Schulze-Bonhage, A., Jacobs, J., 2019. Simultaneously recorded intracranial and scalp high frequency oscillations help identify patients with poor posturgical seizure outcome. Clin. Neurophysiol. 130 (1), 128–137. https://doi.org/10.1016/j.clinph.2018.10.016.

Kural, M.A., Duez, L., Sejer Hansen, V., Larsson, P.G., Rampp, S., Schulz, R., Tankisi, H., Wennberg, R., Bibby, B.M., Scherg, M., Beniczky, S., 2020. Criteria for defining interictal epileptiform discharges in EEG. Neurology 94 (20). https://doi.org/10.1212/wnl.0000000000009439.

Kural, M.A., Jing, J., Fürbass, F., Perko, H., Qerama, E., Johnsen, B., Fuchs, S., Westover, M.B., Beniczky, S., 2022. Accurate identification of EEG recordings with interictal epileptiform discharges using a hybrid approach: artificial intelligence supervised by human experts. Epilepsia 63 (5), 1064–1073. https://doi.org/10.1111/epi.17206.

Kwan, P., Schachter, S.C., Brodie, M.J., 2011. Drug-resistant epilepsy. N. Engl. J. Med. 365 (10), 919–926. https://doi.org/10.1056/nejmra1004418.

Lachner-Piza, D., Jacobs, J., Bruder, J.C., Schulze-Bonhage, A., Stieglitz, T., Dämpelmann, M., 2020. Automatic detection of high-frequency oscillations and their subgroups co-occurring with interictal-epileptic spikes. J. Neural Eng. 17 (1). https://doi.org/10.1088/1741-2552/ab4560.

Lai, D., Zhang, X., Ma, K., Chen, Z., Chen, W., Zhang, H., Yuan, H., Ding, L., 2019. Automated detection of high frequency oscillations in intracranial EEG using the combination of short-time energy and convolutional neural networks. IEEE Access 7, 82501–82511. https://doi.org/10.1109/access.2019.2923281.

Medvedev, A.V., Agoureeva, G.I., Murro, A.M., 2019. A long short-term memory neural network for the detection of epileptiform spikes and high frequency oscillations. Sci. Rep. 9 (1). https://doi.org/10.1038/s41598-019-55861-w.

Menendez de la Prida, L., Staba, R.J., Dian, J.A., 2015. Conundrums of high-frequency oscillations (80–800 hz) in the epileptic brain. J. Clin. Neurophysiol. 32 (3), 207–219. https://doi.org/10.1097/wnp.0000000000000150.

Migliorelli, C., Bachiller, A., Alonso, J.P., Romero, S., Aparicio, J., Jacobs-Le Van, J., Mananas, M.A., San Antonio-Arce, V., 2020. SGM: a novel time-frequency algorithm based on unsupervised learning improves high-frequency oscillation detection in epilepsy. J. Neural Eng. 17 (2), 026032. https://doi.org/10.1088/1741-2552/ab8345.

Nadalin, J.K., Eden, U.T., Han, X., Richardson, R.M., Chu, C.J., Kramer, M.A., 2021. Application of a convolutional neural network for fully-automated detection of spike ripples in the scalp electroencephalogram. J. Neurosci. Methods 360, 109239. https://doi.org/10.1016/j.jneumeth.2021.109239.

Nariai, H., Wu, J.Y., Bernardo, D., Fallah, A., Sankar, R., Hussain, S.A., 2018. Interrater reliability in visual identification of interictal high-frequency oscillations on electrocorticography and scalp EEG. Epilepsia Open 3 (S2), 127–132. https://doi.org/10.1002/epi4.12266.

Navarrete, M., Alvarado-Rojas, C., Le Van Quyen, M., Valderrama, M., 2016. RIPPLELAB: a comprehensive application for the detection, analysis and classification of high frequency oscillations in electroencephalographic signals. PLOS ONE 11 (6), e0158276. https://doi.org/10.1371/journal.pone.0158276.

Navas-Olive, A., Amaducci, R., Jurado-Parras, M.T., Sebastian, E.R., de la Prida, L.M., 2022. Deep learning-based feature extraction for prediction and interpretation of sharp-wave ripples in the rodent hippocampus. eLife 11, e77772. https://doi.org/10.7554/eLife.77772.

Navas-Olive, A., Rubio, A., Abbaspoor, S., Hoffman, K.L., de la Prida, L.M., 2024. A machine learning toolbox for the analysis of sharp-wave ripples reveals common waveform features across species. Commun. Biol. 7 (1), 211. https://doi.org/10.1038/s42003-024-05871-w.

Nevalainen, P., von Ellenrieder, N., Klimes, P., Dubeau, F., Frauscher, B., Gotman, J., 2020. Association of fast ripples on intracranial EEG and outcomes after epilepsy surgery. Neurology 95 (16), e2235–e2245. https://doi.org/10.1212/wnl.0000000000010468.

Pernet, C.R., Appelhoff, S., Flandin, G., Phillips, C., Delorme, A., Oostenveld, R., 2018. BIDS-EEG: an extension to the brain imaging data structure (BIDS) specification for electroencephalography. Cent. Open Sci. https://doi.org/10.31234/osf.io/63a4y.

Quitadamo, L.R., Foley, E., Mai, R., de Palma, L., Specchio, N., Seri, S., 2018. EPINETLAB: a software for seizure-onset zone identification from intracranial EEG signal in epilepsy. Front. Neuroinformatics 12. https://doi.org/10.3389/fninf.2018.00045.

Remakanthakurup Sindhu, K., Staba, R., Lopour, B.A., 2020. Trends in the use of automated algorithms for the detection of high-frequency oscillations associated with human epilepsy. Epilepsia 61 (8), 1553–1569. https://doi.org/10.1111/epi.16622.

Roehri, N., Lina, J.-M., Mosher, J.C., Bartolomei, F., Benar, C.-G., 2016. Time-Frequency strategies for increasing high-frequency oscillation detectability in intracerebral EEG. IEEE Trans. Biomed. Eng. 63 (12), 2595–2606. https://doi.org/10.1109/tbme.2016.2556425.

Roehri, N., Pizzo, F., Bartolomei, F., Wendling, F., Bénar, C.-G., 2017. What are the assets and weaknesses of HFO detectors? A benchmark framework based on realistic simulations. PLOS ONE 12 (4), e0174702. https://doi.org/10.1371/journal.pone.0174702.

Roehri, N., Pizzo, F., Lagarde, S., Lambert, I., Nica, A., McGonigal, A., Giusiano, B., Bartolomei, F., Bénar, C., 2018. High-frequency oscillations are not better
biomarkers of epileptogenic tissues than spikes. Ann. Neurol. 83 (1), 84–97. https://doi.org/10.1002/ana.25124.

Rosenow, F., Lüders, H., 2001. Presurgical evaluation of epilepsy. Brain 124 (9), 1683–1700. https://doi.org/10.1093/brain/124.9.1683.

Scott, J.M., Ren, S., Gliske, S.V., Stacey, W.C., 2020. Preictal variability of high-frequency oscillation rates in refractory epilepsy. Epilepsia 61 (11), 2521–2533. https://doi.org/10.1111/epi.16680.

Song, Y., Liò, P., 2010. A new approach for epileptic seizure detection: sample entropy-based feature extraction and extreme learning machine. J. Biomed. Sci. Eng. 03 (06), 556–567. https://doi.org/10.4236/jbise.2010.36078.

Staba, R.J., Wilson, C.L., Bragin, A., Fried, I., Engel, J., Jr, 2002. Quantitative analysis of high-frequency oscillations (80–500 Hz) recorded in human epileptic hippocampus and entorhinal cortex. J. Neurophysiol. 88 (4), 1743–1752. https://doi.org/10.1152/jn.2002.88.4.1743.

Tadel, F., Baillet, S., Mosher, J.C., Pantazis, D., Leahy, R.M., 2011. Brainstorm: a user-friendly application for MEG/EEG analysis. Comput. Intell. Neurosci. 2011, 879716. https://doi.org/10.1155/2011/879716.

Talairach, J., Bancaud, J., 1966. Lesion, "irritative" zone and epileptogenic focus. Stereotact. Funct. Neurosurg. 27 (1–3), 91–94. https://doi.org/10.1159/000103937.

Téllez-Zenteno, J.F., Dhar, R., Wiebe, S., 2005. Long-term seizure outcomes following epilepsy surgery: a systematic review and meta-analysis. Brain 128 (5), 1188–1198. https://doi.org/10.1093/brain/awh449.

Thomas, J., Kahane, P., Abdallah, C., Avigdor, T., Zweiphenning, W.J.E.M., Chabardes, S., Jaber, K., Latreille, V., Minotti, L., Hall, J., Dubeau, F., Gotman, J., Frauscher, B., 2022. A subpopulation of spikes predicts successful epilepsy surgery outcome. Ann. Neurol. 93 (3), 522–535. https://doi.org/10.1002/ana.26548.

Thomschewski, A., Hincapié, A.-S., Frauscher, B., 2019. Localization of the epileptogenic zone using high frequency oscillations. Front. Neurol. 10. https://doi.org/10.3389/fneur.2019.00094.

Trébuchon, A., Chauvel, P., 2016. Electrical stimulation for seizure induction and functional mapping in stereoelectroencephalography. J. Clin. Neurophysiol. 33 (6), 511–521. https://doi.org/10.1097/wnp.0000000000000313.

Wang, Z., Guo, J., van 't Klooster, M., Hoogteijling, S., Jacobs, J., Zijlmans, M., 2024. Prognostic value of complete resection of the high-frequency oscillation area in intracranial EEG: a systematic review and meta-analysis. Neurology 102 (9), e209216. https://doi.org/10.1212/WNL.00000000000209216.

Worrell, G.A., Gardner, A.B., Stead, S.M., Hu, S., Goerss, S., Cascino, G.J., Meyer, F.B., Marsh, R., Litt, B., 2008. High-frequency oscillations in human temporal lobe: simultaneous microwire and clinical macroelectrode recordings. Brain 131 (4), 928–937. https://doi.org/10.1093/brain/awn006.

Worrell, G.A., Jerbi, K., Kobayashi, K., Lina, J.M., Zelmann, R., Le Van Quyen, M., 2012. Recording and analysis techniques for high-frequency oscillations. Prog. Neurobiol. 98 (3), 265–278. https://doi.org/10.1016/j.pneurobio.2012.02.006.

Zelmann, R., Mari, F., Jacobs, J., Zijlmans, M., Dubeau, F., Gotman, J., 2012. A comparison between detectors of high frequency oscillations. Clin. Neurophysiol. 123 (1), 106–116. https://doi.org/10.1016/j.clinph.2011.06.006.

Zelmann, R., Zijlmans, M., Jacobs, J., Châtillon, C.-E., Gotman, J., 2009. Improving the identification of high frequency oscillations. Clin. Neurophysiol. 120 (8), 1457–1464. https://doi.org/10.1016/j.clinph.2009.05.029.

Zhang, Y., Liu, L., Ding, Y., Chen, X., Monsoor, T., Daida, A., Oana, S., Hussain, S., Sankar, R., Fallah, A., Santana-Gomez, C., Engel, J., Staba, R.J., Speier, W., Zhang, J., Nariai, H., Roychowdhury, V., 2024. PyHFO: lightweight deep learning-powered end-to-end high-frequency oscillations analysis application. J. Neural Eng. 21 (3), 036023. https://doi.org/10.1088/1741-2552/ad4916.

Zijlmans, M., Jiruska, P., Zelmann, R., Leijten, F.S.S., Jefferys, J.G.R., Gotman, J., 2012. High-frequency oscillations as a new biomarker in epilepsy. Ann. Neurol. 71 (2), 169–178. https://doi.org/10.1002/ana.22548.

Zuo, R., Wei, J., Li, X., Li, C., Zhao, C., Ren, Z., Liang, Y., Geng, X., Jiang, C., Yang, X., Zhang, X., 2019. Automated detection of high-frequency oscillations in epilepsy based on a convolutional neural network. Front. Comput. Neurosci. 13. https://doi.org/10.3389/fncom.2019.00006.