Introduction

Hippocampal sharp-wave-ripples (SPW-Rs) are essential for the compression, chunking, and delivery of neural codes to the neocortex1,2. Decades of rodent research have established the role of SPW-Rs in consolidating and guiding experience. In rodents, place cell sequences acquired during exploratory behavior are replayed in SPW-Rs during offline states, such as consummatory behaviors and NREM sleep3,4,5, when acetylcholine levels are decreased6. SPW-Rs trigger widespread neocortical activation to induce long-term synaptic plasticity in hippocampal output regions2,5,7,8,9,10,11,12. Selective prolongation or erasure of SPW-Rs leads to memory enhancement or impairment, respectively, during rodent spatial navigation, proving their essential role4,13,14.

In rodents, hippocampal electrodes with high spatial precision confidently detect SPW-Rs and their corollary spike bursts. SPW-Rs appear in the local field potential (LFP) as a negative sharp-wave in the CA1 stratum radiatum and brief high-frequency oscillations (100–200 Hz) in the CA1 pyramidal layer. CA3 and CA2 population bursts drive the coordinated oscillatory excitation of CA1 interneurons and pyramidal cells, manifest as the fast ripple oscillation15,16,17. In the CA2/3 dendritic layers and the dentate gyrus (DG), this excitation is manifest as a large negative sharp wave. In turn, strong excitatory output from CA1 during SPW-Rs can induce lower frequency ripples in the efferent subicular complex, retrosplenial cortex and deep entorhinal cortex layers12,18,19,20.

Recent human studies report hippocampal ripples during NREM sleep and awake tasks21,22,23,24,25,26,27 at lower frequencies than rodent SPW-Rs24,25,28,29,30. Unlike rodent SPW-Rs, defined by the CA2/3 sharp wave followed by the CA1 high frequency oscillation, human ripples are considered as brief “ripple band” events or high-frequency oscillations (HFOs) in the hippocampus or neocortex. Hippocampal subfields are rarely defined, with some exceptions24,31 and the sharp-wave component is rarely reported30,32,33. Most detection parameters use a simple bandpass filter (between 80-120 Hz25,28,32,33 or up to 200 Hz24,26,29,31) to detect brief (30-100 ms) events above a certain power threshold24,32. Ripple events have been detected during low-cholinergic states such as NREM sleep, phase-coupled with spindles and slow oscillations23,28, as in rodents34. Ripples during awake, effortful memory processes have also been reported. Increased hippocampal ripple rates have been linked to successful encoding and retrieval21,24,25,31. Hippocampal ripples during autobiographical retrieval have been demonstrated to trigger widespread increases in high gamma activity in regions associated with default mode network (DMN)35, implicated in internal processing and rest states.

On the surface, these human studies suggest a translational link with rodent SPW-R activity. However, reports of SPW-R activity during high cholinergic states and arousal, such as effortful encoding and retrieval appear inconsistent with rodent reports. Given the poor spatial resolution and sparse electrode samplings, contamination with IEDs in epileptic brain tissue, muscle artifacts, and lack of arousal state measurements, separation of SPW-Rs from other physiological (e.g., high gamma) and pathological HFOs is fraught (for a review see ref.29). Clinical macroelectrodes typically sample from tens of thousands of neurons36, and rarely target the CA1 subfield24,35. Confirmation of electrode placement to the CA1pyramidal layer, standard in rodents, is difficult to achieve and not routinely attempted in human studies. The large size of the macroelectrode ( ~ 1.3–2 mm diameter) would likely span several subfields and layers during surgical implantation. Finally, detection parameters across human studies vary widely, resulting in a wide distribution of reported ripple incidences across sleep, from 0.35 to 30 ripples per minute22,29. Given the heterogeneity in human ripple reports and the inherent limitations of clinical sampling, we sought to develop a standardized algorithm for accurate ripple detection based on the “ground truth” of SPW-R detection in the mouse hippocampus.

We compared high-resolution hippocampal recordings from all hippocampal subfields in APP/PS1 transgenic mice to hippocampal macro- and microwire recordings in 13 surgical epilepsy patients with temporal or extratemporal epilepsy. The APP/PS1 mouse model of Alzheimer’s disease is characterized by reliable expression of hippocampal interictal epileptiform discharges (IEDs), resembling the human interictal brain state. In contrast to conventional epilepsy models, APP/PS1 mice rarely develop seizures, and the hippocampal anatomy is preserved (not sclerotic as in other mouse models of epilepsy), allowing simultaneous recording of SPW-Rs and IEDs. Using wide-coverage 1024-channel probes (SiNAPS)37,38, we characterized the spectrotemporal features of rodent SPW-Rs and IEDs across all hippocampal subfields and layers. From these high-dimensional recordings, we identified key features that distinguish ripples from IEDs, such as multiple consecutive ripple cycles visible in the unfiltered LFP, narrowband frequency increase in the ripple frequency band and absence of large-amplitude sharp spikes, typical for IEDs. With these guiding features, we developed a pipeline for human ripple detection based on IED removal, channel selection, and unsupervised Uniform Manifold Approximation and Projection (UMAP)-based clustering of LFP waveforms, efficiently discarding IEDs, noise, and other false positive detections. The UMAP clustering and selection were implemented in our human ripple curation toolbox (ripmap). Selecting channels for ripple detection, based on narrowband high frequency peaks, identified 40 % of the tested macrocontacts and 60 % of the microwires as ripple-negative. Ripmap additionally discarded ~20 % of events in ripple-positive channels. Comparison of the remaining ripples to IEDs demonstrated distinct features similar to those observed in mice.

Results

Challenges of human SPW-R detection compared to rodents and key definitions

In rodents, high-density probes can simultaneously record across hippocampal subfields and cellular layers at the micrometer scale (Fig. 1a). Characteristic physiological features from laminar recordings from the hippocampus enable real-time identification of subfields and layers which can later be confirmed by histology. The distinct laminar morphology of SPW-Rs facilitates differentiation from other high-frequency events, such as gamma oscillations39 or IEDs (Fig. 1c). The ability to select a channel in CA1 pyramidal layer (typically the channel with highest ripple power, see Methods) for automatic detection, additionally reduces the rate of false-positive detections. In contrast, human probes sample signals at the millimeter scale and lack the 2-dimensional density of rodent probes (Fig. 1d). Recording positions are estimated by visualizing contacts on a postoperative computer tomography (CT)-scan, aligned to the patient’s magnetic resonance imaging (MRI) (Fig. 1e). Microwires may sample hippocampal single neurons but their unpredictable splay across hippocampal layers and subfields precludes accurate localization (Fig. 1d-f). These technical constraints limit the ability to reliably identify individual channel positions. Signal analysis is further complicated by high-power IEDs (Fig. 1f), short-lived “high-gamma” oscillations, and broadband gamma activity overlapping with ripple frequencies.

Fig. 1: Comparison to standard recordings in rodent hippocampus demonstrates limitations of human recordings.
Fig. 1: Comparison to standard recordings in rodent hippocampus demonstrates limitations of human recordings.
Full size image

a High-density probe in the mouse hippocampus, contacts (yellow) span several CA1 layers: so—stratum oriens, sp—stratum pyramidale, sr—stratum radiatum, slm—stratum lacunosum-moleculare. b DAPI-stained coronal section of mouse dorsal hippocampus outlined in (a), showing traces of 4 probe shanks (white arrows). c Example mouse LFP from one shank of a 64-channel probe (4 × 16, NeuroNexus) in CA1. A sharp wave-ripple (SPW-R; blue box) is detected in CA1 sp (detection channel *) but not visible in the two channels above the hippocampus. An interictal epileptiform discharge (IED; red box) shows a distinct laminar distribution visible on all channels. d Bottom: Conventional LFP and single-unit sampling in surgical patients: cortical grid and multielectrode array over neocortical structures, and a depth electrode in the temporal lobe. Top: Tip of a Behnke-Fried macro/microwire depth electrode in hippocampus. Flexible microwires spread unpredictably; here shortened to 4 mm and scaled to true proportions of the human hippocampus (Allen Brain Atlas, adult human, https://doi.org/10.1002/cne.24080https://atlas.brain-map.org/) to demonstrate possible coverage of distant subfields—cornu ammonis (CA1-3), dentate gyrus (DG) and subiculum (sub). Two macrocontacts sample CA1 and adjacent neocortex. e Top: postoperative coronal CT shows a depth electrode with microwire bundle visible at the tip (white arrow). Bottom: corresponding preoperative MRI coronal section from the same patient with transferred microwire tip coordinates from CT (yellow cross). f Example LFPs from a human depth electrode with 8 microwires (blue), and 8 macro-contacts (green). The exact microwire location is unknown and channel order is arbitrary. One putative SPW-R (blue box) precedes a more ambiguous, IED-like event (pink box), associated with a high-frequency oscillation on channel 7 (black arrow). Ripple detection channel is marked with *. a, c, d Created in BioRender. Maslarova, A. (2025) https://BioRender.com/u24k047.

To account for different recording methods in rodents and humans, we adopt the following terminology: In mice, where the location of the channel used for event detection is known (see Methods), we use the canonical “sharp-wave ripples”, or “SPW-Rs”, for events detected in the CA1 pyramidal layer. In human recordings, where spatial information is imprecise, we consider events detected on all hippocampal channels as putative ripples; however, the word “putative” is omitted for brevity. Because human recordings may not consistently sample from CA1-3 dendritic layers due to surgical approach, the sharp wave component is rarely detected (or reported). We refer to other high-frequency oscillatory and aperiodic detections in humans that are rejected by our automated detection methods or visual inspection as “false positives”, which include IEDs and other high-frequency non-ripple events.

Rodent SPW-Rs are localized to CA1 pyramidal layer

To evaluate the spatial, temporal, and morphological features of SPW-Rs across the hippocampus, we utilized high-density recordings spanning the entire dorsal hippocampus in APP/PS1 mice using 1024-channel, 8-shank probes (SiNAPS, NeuroNexus and Corticale SRL, Fig. 2a). This allowed us to visualize SPW-Rs across all hippocampal subfields simultaneously (Fig. 2b). SPW-Rs were confined to the CA2/CA1 axis, consistent with earlier findings using lower-density probes39,40. During CA1 SPW-Rs, CA3 exhibited population spike bursts and sharp waves with less prominent and variable ripples, while the dentate gyrus displayed irregular negative waves on event-averaged traces (Fig. 2c). Current source density (CSD) analysis confirmed that SPW-Rs resulted in current sinks in the CA1 stratum radiatum and sources in the pyramidal layer (Fig. 2b). Wavelet spectrograms showed a narrowband ~160 Hz peak in CA1 pyramidal and radiatum layer during SPW-Rs, which was absent in CA3 and dentate gyrus. During CA1 SPW-Rs, low frequency peaks ( ~ 20 Hz) were simultaneously observed in CA3 and dentate gyrus, possibly reflecting filtered versions of SPW-Rs (Fig. 2d).

Fig. 2: Mouse hippocampal SPW-Rs and IEDs display distinct spatial, spectral and morphologic features.
Fig. 2: Mouse hippocampal SPW-Rs and IEDs display distinct spatial, spectral and morphologic features.
Full size image

a An 8-shank, 1024 channel probe in the dorsal hippocampus (Allen Brain Atlas, mouse adult brain, https://atlas.brain-map.org/) of an APP/PS1 mouse sampling all hippocampal subfields. Inset: probe pixel design. b Example SPW-R detected in the CA1 pyramidal (pyr) layer. LFP of every 4th channel plotted atop an average current-source-density (CSD) map from 803 SPW-Rs in one session. Pyramidal and granule cell layers are outlined in white. c LEFT: Average LFP traces and wavelet spectrograms from CA1 pyr and radiatum (rad) layers, CA3 pyr and dentate gyrus hilus (DG hil). Ripples are visible only in CA1 pyr and rad. RIGHT: two example SPW-Rs. d Histograms of peak frequencies from LFPs in CA1 pyr/rad, CA3 and DG, time-locked to SPW-Rs detected in CA1 pyr (CA1/DG: 7134 SPW-Rs, 9 sessions; CA3: 5712 SPW-Rs, 7 sessions, 5 mice). e TOP: Locations of channels used in (c, d, g, h). Black inset shows channels within 300 µm from CA1 pyr (distance 0 µm). BOTTOM: Average peri-SPW-R power-spectral-density (PSD) at different depths from one session. f Example IED detected in CA1 rad. LFP of every 8th channel overlayed on average CSD map (7 IEDs from one session). g Same as (c) for 13 IEDs from one session. h Mean peak power of SPW-Rs (blue, n = 9 sessions, 5 mice, 7134 SPW-Rs) and IEDs (magenta, n = 8 sessions, 5 mice, 78 IEDs) in the 130 to 180 Hz frequency range, as a function of distance from CA1 pyr (0 µm). Negative values indicate channels above the pyramidal layer (deep, towards cortex), as shown in (e). Shaded areas = SEM. LEFT: band-pass 130–180 Hz. RIGHT: after removing aperiodic 1/f frequencies, SPW-Rs show a narrowband 130–180 Hz peak absent in IEDs. i Distinctive SPW-R and IED features in the mouse hippocampus. a Created in BioRender. Maslarova, A. (2025) https://BioRender.com/u24k047. Source data are provided as a Source Data file.

To determine the spatial extent of SPW-Rs, we calculated peak frequencies and power of the signal during SPW-Rs, as a function of distance from the CA1 pyramidal layer (Fig. 2e). The peak power in the ripple band was strongest in the CA1 pyramidal layer and rapidly dropped off with distance. (n = 9 sessions, Fig. 2h). To evaluate whether SPW-Rs can be detected in regions remote from CA1 despite the rapid decrease in power, we used the same detection parameters (band-pass filter 130–200 Hz, signal peaks 5 SDs above baseline, 30–200 ms duration) in CA3, dentate gyrus molecular layer and hilus, then measured the temporal coupling of detected peaks to CA1 SPW-Rs (Supplementary Fig. 1). Peaks detected outside of CA1 showed a broad distribution of frequencies in the physiological range (130–180 Hz) and weak temporal coupling to CA1 SPW-Rs ( ± 100 ms window, CA3: 17 ± 5 %, average/SEM of 7 sessions, DG hilus: 8 ± 1 %, DG molecular layer: 8 ± 2 %, average/SEM of 9 sessions, Supplementary Fig. 1g).

CA3 and DG events coupled with CA1-SPW-Rs showed slightly longer durations (Supplementary Table 1). However, the distributions of coupled and uncoupled events were highly overlapping, with small effect sizes (Cohen’s d ranging from 0.09 to 0.29), indicating that it would be difficult to predict which events correspond to CA1 SPW-Rs. Finally, we examined whether specific features of CA1 SPW-Rs predict whether ripple peaks will be simultaneously detected (defined as coupling) in other regions. Mean voltages of CA1 SPW-Rs coupled with CA3 events were higher than uncoupled SPW-Rs (58 µV vs 49 µV, Cohen’s d = 0.5, n = 652 vs 5863 events, p < 0.0001, Mann-Whitney U test (MW)), and had slightly higher peak frequencies (163 Hz vs 157 Hz, Cohen’s d = 0.36, p < 0.0001, MW) and longer durations (42 ms vs 36 ms, Cohen’s d 0.42, p < 0.0001, MW). There were no features of CA1 SPW-Rs predictive of coupled DG oscillations (Cohen’s d ranging from 0.008 to 0.22, Supplementary Fig. 2).

In summary, CA1 SPW-Rs of higher frequency, longer duration, and higher amplitude were occasionally coupled to CA3 ripples with similar features. However, there was no clear spectrotemporal relationship between CA1 SPW-Rs and DG oscillations. The majority (90%) of peaks detected in DG were not temporally coupled to CA1 SPW-Rs. These findings suggest that SPW-Rs are tightly localized to the CA1 subfield, and that automatic SPW-R detection can lead to false positives if the detection is performed in the dentate gyrus.

Distinct features of rodent IEDs

IEDs are pathological, hypersynchronous population bursts observed between seizures41,42,43. Electrographically, IEDs are transient events clearly distinguished from the background, lasting 20–70 ms (“spike”) or 70–200 ms (“sharp wave”), followed by a negative slow wave. IEDs may be phase-coupled with pathological HFOs within the mesial temporal lobe seizure-onset zone44,45. Like SPW-Rs, hippocampal IEDs are more frequent during NREM sleep46,47,48 and appear to propagate along hippocampal efferent pathways49,50,51, possibly through the excessive synchronization of sharp wave events42,52. IEDs directly compete with SPW-Rs. Mounting evidence suggests IEDs’ role in disrupting memory encoding25 and consolidation50,53.

To differentiate SPW-Rs from IEDs, we detected IEDs in APP/PS1 mice and characterized their waveforms and frequencies across hippocampal subfields. IEDs were detected in 7 out of 9 sessions from all 5 mice and were characterized by brief, large-amplitude LFP discharges exceeding SPW-R magnitudes by over fivefold. IEDs were simultaneously observed in all hippocampal regions (Fig. 2f). CSD analysis showed an initial current sink in the DG54, with rapid propagation along the CA axis, respecting anatomical pathways (Fig. 2f, supplementary Fig. 3a). The IED appearance was similar to previous reports from the kindling model50,55 and also resembled evoked responses, which could be explained by their propagation along the trisynaptic pathway. In CA1 and CA3 dendritic layers, 80% of IEDs (range 40-100% of events for each session) started as a sharp negative spike. In CA1 and CA3 pyramidal layer, the negative spike was less prominent and IED appearance was dominated by the large-amplitude positive slow wave (Fig. 2f,g). A sharp negative population spike was unique to IEDs42 and not seen with CA1 SPW-Rs (Fig. 2b,c). Unlike SPW-Rs, IEDs lacked ripple-like oscillations but exhibited a broad-band (20–400 Hz) power increase, approximately 10-fold higher than SPW-Rs, possibly reflecting the large-amplitude sharp spike (Fig. 2g). IED peak frequencies were lower than SPW-Rs (54 ± 11 Hz in the pyramidal layer). However, when a ripple band filter (130–180 Hz) was applied, IED power exceeded SPW-R power. Even outside of CA1 pyramidal layer (Fig. 2h), IED spectral features were stable. This power increase likely reflects edge filtering artifacts, as no ripple oscillations were visible in the raw LFP during IEDs. Subtracting the aperiodic 1/f component of the power spectrum significantly reduced the IED power in the ripple frequency range. Thus, without the 1/f correction, a narrowband high-frequency filter (130–180 Hz) applied to the LFP may actually represent IEDs. Broadband power events simultaneously visible on multiple recording channels were consistent with IEDs.

In summary, mouse SPW-Rs and IEDs demonstrated: (1) distinct LFP morphologies (SPW-Rs—multiple consecutive ripple cycles vs. IEDs—a sharp, large amplitude negative spike and wave); (2) spectral features (narrow-band vs broad-band power increase); and (3) spatial distributions (SPW-R from the CA1 pyramidal layer vs IED involving all hippocampal regions and layers, Fig. 2i).

Early selection of putative channels with a narrowband spectral peak > 60 Hz guides human ripple detection

Our rodent findings demonstrated that SPW-R power is tightly localized to the CA1 pyramidal layer, with a rapid decrease in spectral power in neighboring subfields (Fig. 2h). This highlights the importance of electrode location for reliable human ripple detection. Conversely, ripple presence may confirm the location of CA1 pyramidal layer. We applied this principle to human hippocampal recordings from Behnke-Fried macro-microwire hybrid electrodes (Fig. 3a; Supplementary Fig. 4) in 13 patients during surgical evaluation (6 temporal lobe epilepsy; 7 extratemporal epilepsy (Table 1). We first identified sleep epochs by a spectrogram and an individually thresholded beta to delta ratio, with visual verification by examining the raw LFP signal (see “Methods”). After excluding automatically detected IEDs ( ± 0.5 s) to avoid high-power artifacts49 (Supplementary Fig. 5), we thresholded the band-pass filtered signal (80 to 250 Hz, 30–200 ms long, see “Methods”) to detect putative ripple events. We selected these parameters to be inclusive of previously published detection thresholds24,25,26,27.

Fig. 3: A spectral narrowband peak in peri-event PSDs guides ripple-positive channel selection in humans.
Fig. 3: A spectral narrowband peak in peri-event PSDs guides ripple-positive channel selection in humans.
Full size image

a TOP: CT image showing electrode contacts and T2 image overlaid with hippocampal subfield divisions delineated using ASHS62. Arrow: microwires. LEFT: Behnke-Fried hybrid electrodes. BOTTOM: Anatomical distribution of electrodes used in this study. Large circles: macro-contacts; small circles: microwire bundles. Blue: Channels with >60 Hz peaks in peri-event PSDs. b Average waveform, wavelet spectrogram and example LFP traces of automatically detected ripples from example CA1 (top) and DG (bottom) macroelectrodes, referenced to the nearest WM electrode. c Peri-event power spectral density (PSD) of macroelectrodes in (b). Spectral peaks were extracted from 1/f-corrected PSD (dotted lines), which demonstrates that the CA1 electrode displays a narrowband peak >60 Hz whereas the DG electrode does not. d TOP: Peak frequency distribution of all hippocampal macro-contacts (n = 20) demonstrates a bimodal distribution above and below 60 Hz. BOTTOM: Percentage of macroelectrodes with a > 60 Hz spectral peak. Most electrodes lacking a > 60 Hz peak did not show ripples. e Microwire selection in two patients followed the same criteria as with macroelectrodes. TOP: Detection channels were selected based on the >60 Hz spectral peak in peri-event PSDs. When multiple channels showed >60 Hz peak, the one with the strongest power was selected (green shade). BOTTOM: If no channels showed a > 60 Hz peak, the entire bundle was considered ripple negative. f Percentage of microwire bundles with and without a narrowband >60 Hz peak. a Created in BioRender. Maslarova, A. (2025) https://BioRender.com/u24k047. Source data are provided as a Source Data file.

Table 1 Patient demographics and electrodes

To accurately identify narrowband spectral peaks in peri-event PSDs, we corrected for the 1/f aperiodic component in the PSDs around the automatically detected putative ripple events ( ± 100 ms window) (Fig. 3b-c; Supplementary Fig. 6)56. Macroelectrodes showed a bimodal distribution of peak frequencies, below or above 60 Hz (Fig. 3d). Visual inspection confirmed that events detected on channels lacking a > 60 Hz peak were false positives, except for one channel in CA1 showing 11% of the detected events resembled ripples (Supplementary Fig. 7). Based on these findings, we selected a single wire per microwire bundle if it exhibited a > 60 Hz peak in the peri-event PSD (Fig. 3e). Of the 19 bundles, 11 contained at least one channel with a > 60 Hz peak (Fig. 3f). If multiple channels showed a narrowband peak, the one with the largest peak power was selected for further analysis. Microwire bundles lacking >60 Hz peaks showed no ripples upon visual inspection, demonstrating that peri-event PSD can reliably exclude ripple-negative channels in humans. We note that the >60 Hz threshold observed in humans is much lower than the 130 Hz threshold used in rodents, which is consistent with prior reports of human ripples being lower frequency than found in rodents.

Semi-automated separation of ripples and false positives

Previous studies have identified IEDs as the primary source for false positives in ripple detection22,32,35. Given that electrodes demonstrating a peak frequency >60 Hz may still include electrodes contaminated with filtered IEDs or other noises, further separation based on morphological criteria was necessary. Upon visual inspection, electrodes with peak frequency above 60 Hz exhibited diverse waveforms, some resembling IEDs, while others did not resemble either IEDs or ripples (Fig. 4a). This suggests that, despite attempts to exclude IEDs using an automatic detector prior to ripple detection, some undetected IEDs were still falsely detected as ripples. Moreover, these findings indicate that IEDs are not the only contributors to false-positive ripple detections.

Fig. 4: Semi-automated separation of ripples and false positives.
Fig. 4: Semi-automated separation of ripples and false positives.
Full size image

a Examples of automatically detected ripple events from one channel. Note the variability in waveforms. b Schematic of UMAP dimensionality reduction. c LEFT: UMAP projection of all automatically detected ripples and detected IEDs (n_neighbors = 10, min_dist = 0) from the channel in (a). Dots in black represent the detected ripples (IEDs are not shown). RIGHT: Same UMAP projection, now including IEDs (red dots). Note that some events project together with IEDs. Blue shaded events were selected for the next step. Grey dots indicate ripple events that were not selected. d Example events rejected in (c). e TOP: UMAP axis fitting to group events into discrete bins BOTTOM: Proportion of events detected from ripple detector (blue) and IED detector (red). RIGHT: Waveforms of events in each bin with average waveforms in bold. Green square indicates selected bins (Bins 3-6). f Example events accepted in (e). g Percentage of ripple-positive channels with >60 Hz peak after ripmap. h Comparison of waveform and spectrogram between consensus ripples and IEDs from example channels in humans. i Subfield-specific occurrence of ripples and IEDs in macrocontacts and microwires. Multiple means microwires spanned across multiple subfields. Source data are provided as a Source Data file.

As visual inspection is laborious, subjective, and time-consuming, we sought to apply a semi-automated classification method that separates events based on morphology. Uniform manifold approximation and projection (UMAP)57 is an unsupervised approach that places LFP events based on their waveform morphology within a high-dimensional feature space, where each dimension represents one timepoint within the event (Fig. 4b; see “Methods”). UMAP maintains the original topographical features of events but reduces their dimensionality to allow visual separation of clusters. UMAP has previously been applied to rodent SPW-Rs to relate ripple waveform heterogeneity with underlying circuit properties58.

To determine whether we could also use UMAP to reliably segregate ripples from IEDs in our human dataset, we first assessed the results using a subset of manually-labeled ripples, which served as a “ground truth”58. Evaluating UMAP-based segregation of events against this ground truth confirmed that, in most cases, manually labeled false positives from automatic ripple detection clustered with IEDs (Supplementary Fig. 8). We then evaluated UMAP-based separation of clusters of events (including automatically detected ripples and IEDs, as both groups contained cross-contamination from the other group) in both the original and reduced space, using several clustering validation metrics. We noticed that parameter-dependent changes in Ripple-IED segregation (e.g., due to window size, sampling frequency) were consistent across both the original and 4D spaces (Supplementary Fig. 8)59,60. We identified a set of parameters that optimized Ripple-IED segregation: brief window duration (between 10 and 50 ms), single channel selection (based on the narrowband peak), 400–500 Hz lowpass filtering, detrending (removal of slow transients), and use of absolute voltage amplitudes (not z-scoring) (Supplementary Fig. 9). Sampling frequency did not have a significant effect (Supplementary Fig. 9). These parameters were validated in an independent dataset (n = 8 patients) and found that the same parameters optimized segregation (Supplementary Fig. 9). As with the original dataset, these different patients showed varying degrees of separation between ripples and IEDs (Supplementary Fig. 9e-g). The intrinsic dimension of the ripple events was four for both human datasets, like previously reported values for rodent SPW-Rs58, with ripple dimensionality significantly higher than the IEDs (Supplementary Figs. 8, 9), consistent with their more complex waveforms.

Based on these parameters, we developed ripmap, a user-friendly open-source toolbox allowing UMAP-aided semi-automated inspection and curation of events (https://github.com/acnavasolive/ripmap; see Methods). We found that IEDs falsely detected as ripples often clustered together with IED events and formed a separate cluster from putative ripples (Fig. 4c,d; see Supplementary Fig. 10 for UMAP embedding of all ripple-positive channels). Some events forming separate clusters from IED clusters and ripple clusters, such as noise, could be easily rejected as well. This suggests that UMAP can efficiently isolate ripples from IEDs and artifactual noise.

Although exclusion of IEDs, noise, and other event clouds efficiently reduced the number of false positives, we still found that in some recordings ripple “clouds” included many false positives with ripple-like features. Thus, we implemented an additional step in ripmap to further distinguish ripples from false positives by fitting an axis to the UMAP embedding of the ripple ‘cloud’ (Fig. 4e-f, See Supplementary Methods). We visually inspected this final grouping to identify ripple events. As shown in the example in Fig. 4e, the average waveform of each bin in the ripple cloud can differ substantially. With ripmap, users can visualize events grouped within each bin and further refine detections by discarding bins that contain few or no ripple-like events. However, it is important to note that average waveforms can be misleading (Supplementary 11), and we recommend reviewing all individual events within each bin before making exclusion decisions. For instance, while the average waveform in bin 2 appears ripple-like, it includes non-oscillatory events (Supplementary Fig. 11a). Conversely, the average waveform of bin 6 does not resemble canonical ripples, yet many events within that bin exhibit clear ripple activity (Supplementary Fig. 11b). Researchers can select event groups based on their analytical priorities, whether minimizing false positives or maximizing detection sensitivity. While some subjectivity remains in the curation process, similar to traditional manual review, ripmap offers a standardized and reproducible workflow that enhances consistency within and across users. Additional steps, such as rejecting events lacking >60 Hz peak from the selected bins or manual curation, can also be incorporated to further reduce false positives.

To assess the reproducibility of ripmap, we evaluated the consistency of the clustering and axis-fitting steps across three independent raters. We calculated the average pairwise agreement by dividing the number of events with matching labels (accepted or rejected) by the total number of events for the clustering step, and the number of bins with matching labels by the total number of bins for the axis-fitting step (see “Methods”). Both steps showed high inter-rater agreement (Clustering: median 0.94, range 0.45–1; Axis: median 0.89, range 0.33–1), demonstrating the reproducibility of the ripmap workflow (Supplementary Fig. 12). Using ripmap, we could further exclude two macrocontacts and three microwire bundles that showed >60 Hz spectral peaks but lacked ripple-like events (Supplementary 1314). This refinement yielded 10 out of 12 ripple-positive macrocontacts and 8 out of 11 ripple-positive microwire bundles in our dataset (Fig. 4g). Among ripple-positive electrodes, on average 25 ± 7% and 28 ± 8% of events from macrocontacts and microwires, respectively, were rejected using ripmap (Supplementary 12). In summary, UMAP enables standardized and reproducible curation of automatically detected events from channels exhibiting a narrowband peak above 60 Hz.

Similar ripple and IED features in rodents and humans

We asked if the differences of SPW-Rs and IEDs we observed in rodent recordings generalize to humans. Because we do not have ground truth ripples in humans, we focused on high-confidence ripples defined by events from the UMAP cluster and axis bins accepted by all three raters. Because ripmap axis bins sometimes included IEDs and non-oscillatory events (Supplementary Fig. 11), we removed events lacking 60 Hz peaks from accepted ripmap bins. Ripple rates during NREM sleep before ripmap curation were 10.5 ± 1.6 events/min on macrocontacts (n = 10) and 6.6 ± 2.2 events/min on microwires (n = 8). After ripmap curation, these rates dropped to 7.3 ± 0.9 events/min and 4.8 ± 1.9 events/min, respectively.

We then compared spectral and morphological features of these consensus ripple events with IEDs. Consistent with rodents, we found that ripples displayed narrowband power increase between 60 and 140 Hz while IEDs show broadband power increase between 20 and 200 Hz (Fig. 4h). Human ripples showed peak frequencies below 150 Hz, lower than the frequency band (> 250 Hz) associated with pathological HFOs2,26.

Our mouse results demonstrated that SPW-Rs are confined to CA1, and other studies have shown ripples in the subiculum19,61. We also showed that the automatic detection protocol used to detect CA1 SPW-Rs can lead to high false-positive detections in DG or CA3, where rodent SPW-Rs were associated with a negative wave (Fig. 2c). However, few studies in humans have reported ripple localization at the level of hippocampal subfields. To determine the spatial distribution of human ripples, we localized macrocontacts and microwire bundles to hippocampal subfields with the Automatic Segmentation of Hippocampal Subfields (ASHS) segmentation pipeline62 (Fig. 3a, Table 1). Note that while the whole microwire bundle could be localized on the CT-scan, the precise locations of individual microwires could not be determined due to limited resolution (Fig. 1e, Supplementary Fig. 4). In total, 20 macrocontacts and 19 microwire bundles inside the hippocampal formation were included for ripple analysis (Table 1). Most macrocontacts were in CA1 (n = 15), with others in DG (n = 2), subiculum (n = 1) or white matter (n = 2, with corresponding microwires in the hippocampus) (Supplementary Fig. 4). Microwire bundles were distributed across DG (n = 6), CA1 (n = 2), and subiculum (n = 5). There were 6 microwire bundles that spanned across neighboring subregions, as illustrated in Fig. 1d. The absence of macro- and microelectrodes in CA3 could be due to a transverse surgical approach, targeting of CA1, or the smaller representation of the CA3 subfield in ASHS segmentation (Supplementary Fig. 4).

Human ripples were primarily found in CA1 and subiculum, and were absent from DG electrodes, aligning with rodent findings (Fig. 4i). Note that due to the limitation of imaging resolution, we could not locate individual microwires to specific subfields (Supplementary Fig. 4). Ripples were also seen on microwires in overlapping neighboring subregions, possibly due to partial location of some of the bundles in CA1. In contrast, IEDs were detected across all subfields. Approximately 60% of macrocontacts and microwires in CA1/subiculum lacked ripples, possibly due to their distance from the pyramidal layer or tissue pathology. In summary, rodent and human ripples shared distinction by spectral and spatial features.

Relationship between human ripples on macrocontacts and microwires

A key question in the study of human memory is whether clinical macrocontacts can detect localized events such as ripples and their relationship to ripples seen in microwires. Macro-electrodes sample the extracellular potential of tens of thousands of neurons and can span several hippocampal subfields or layers63,64, whereas microwires can identify single units and sample from tens of neurons. Our results confirm that macrocontacts can indeed detect ripples. Ripples detected on macrocontacts and microwires showed similar peak frequencies (macro: 85 ± 0.2 Hz, n = 9036 events, micro: 88 ± 0.2 Hz, n = 5080 events; mean ± SEM; p < 0.001, Wilcoxon rank-sum test; Cohen’s d = 0.16) and durations (macro: 61 ± 0.3 ms vs. micro: 59 ± 0.4 ms; p < 0.001, Wilcoxon rank-sum test; Cohen’s d = 0.08) (Supplementary Fig. 15). However, macrocontact ripples tended to show larger amplitudes (macro: 0.86 ± 0.003 vs. micro: 0.48 ± 0.003; p < 0.001, Wilcoxon rank-sum test; Cohen’s d = 1.5; Supplementary Fig. 15). Most putative ripples showed peak frequencies below 150 Hz, lower than the typical frequency band (> 250 Hz) associated with pathological HFOs2,26.

Five out of eight ripple-positive microwires had nearby ripple-positive macrocontacts on the same electrode assembly, enabling us to directly relate ripple detections from macro- and micro-contacts. These macro-micro pairs were in the same hippocampal subfields or nearby white matter. To understand how macrocontacts reflect local ripple events, we examined the microwire signals during “macro-ripples” (ripples detected on macrocontacts). After extracting microwire signals around macro-ripple peaks ( ± 100 ms window), we computed PSDs and counted the number of microwires with a narrowband spectral peak between 60 and 150 Hz (Fig. 5). Most macro-ripples were coupled with simultaneous ripples on microwires. The peak frequency and amplitude of these macro-ripples did not vary with a greater number of microwires involved (Fig. 5d-e, i-j). In summary, macrocontacts can indeed detect ripples, and corresponded to microwire ripples—and vice versa—when both channels are in CA1 or subiculum.

Fig. 5: Ripples are coupled on macrocontacts and microwires.
Fig. 5: Ripples are coupled on macrocontacts and microwires.
Full size image

a Example ripple detected on a macrocontact (blue) coupled with microwire channels (red). b The number of coupled microwire channels was estimated based on peri-macro-ripple PSD of the microwire signals. In this example, all eight microwire channels show a narrowband peak at ~90 Hz which likely represents ripple events. The colors correspond to different channels in (a). c Distribution of the number of coupled microwire channels across all ripple events detected on the macroelectrode in (a). Most ripple events demonstrated a high number of microwires involved in this electrode. d Waveforms of macro-ripples do not vary with greater number of coupled microwire channels. e Ripple peak frequency and amplitude do not vary with the number of coupled microwire channels, color coded as in (d). f Same as (a) but in this example, not all microwire channels showed a ripple peak during a macro-ripple event. g Same as (b) but for the example in (f). h Distribution of the number of coupled microwire channels of the macro-micro pair in (f). i Same as (d) but for the electrode in (f). j Same as (e) but for the electrode in (f). Source data are provided as a Source Data file.

Ripple and IED modulation of single units in mice and humans

SPW-Rs are characterized by precise short-lived recruitment of pyramidal cells and interneurons16,17,65. By contrast, previous studies including our work have shown that IEDs lead to a prolonged suppression of neuronal firing in the CA1 region45,49,66,67. We therefore evaluated whether distinct modulation patterns could serve to differentiate ripples from IEDs, and whether these differential effects depended on specific hippocampal subfields.

To estimate peri-ripple spiking modulation across all hippocampal subfields, we first identified putative principal cells and interneurons by their spiking frequency and profile (see Methods) in APP/PS1 mice (668 principal cells, 406 interneurons). As expected, mouse SPW-Rs were associated with a brief burst of firing of principal cells and interneurons in CA1, CA2, CA316,17,40 and DG (Fig. 6a). The increase in neuronal firing rates was more widespread than the observed LFP ripple oscillation (Fig. 2). In total 451 (67%) of principal cells were positively modulated by ripples: 291 neurons (76%) in CA1, 21 (42%) in CA2, 60 (80%) in CA3, and 79 (48%) in DG, but only 18 neurons (2.7%) were negatively modulated (bootstrap test, see Methods). Among interneurons, 226 (55%) exhibited positive modulation during ripples: 123 (55%) of cells in CA1, 8(42%) in CA2, 31(60%) in CA3 and 64(55%) in DG. Negative modulation was seen in 95 (23%) of interneurons with the highest proportion in CA2 (50%)40. The average z-scored firing rate of positively modulated pyramidal neurons was highest in CA1 (6.5 ± 0.26 SEM), followed by CA3 (4.8 ± 0.32), DG (3.8 ± 0.4) and CA2 (2.7 ± 0.4). For interneurons, CA1 showed the highest increase (4.8 ± 0.4), followed by CA3 (4.8 ± 0.5), DG (3.9 + 0.5) and CA2 (3.8 ± 1). We next analyzed neuronal modulation by IEDs in mice (Fig. 6b). Due to the small number of IEDs (2–14 per session), we were unable to compute statistical significance. However, peri-stimulus spiking rates indicated that some neurons visibly increased firing during IEDs, and most neurons were subsequently suppressed—a pattern consistent with our prior chronic CA1 recordings in the same mouse model49. As in our previous study, post-IED suppression appeared stronger in interneurons (mean z-scored firing rate −0.4) than −0.16 in pyramidal neurons (−0.16; Fig. 6b). Firing patterns appeared consistent across hippocampal subfields.

Fig. 6: SPW-Rs/ripples and IEDs show distinct modulation patterns of neural spiking in rodents and humans.
Fig. 6: SPW-Rs/ripples and IEDs show distinct modulation patterns of neural spiking in rodents and humans.
Full size image

a TOP: average LFP trace of all SPW-Rs, aligned to the ripple trough. MIDDLE: Z-scored peri-SPW-R spiking in all recorded putative principal cells and interneurons from 5 APP/PS1 mice during 9 sessions/ 7134 SPW-Rs. Neurons are sorted by hippocampal subfields and by their z-scored firing rate at the ripple trough (±25 ms). BOTTOM: corresponding mean firing rates of all cells by subfield, z-scored to the firing rate before SPW-Rs (−0.5 to −0.1 s) Shaded areas = SEM. b Same for peri-IED spiking, aligned to the negative IED spike (n = 57 IEDs, from 7 sessions/ 5 mice). c TOP: average LFP trace of ripples (n = 732) from one patient (NY6), aligned to the ripple trough. MIDDLE: Z-scored peri-ripples spiking in putative principal cells and interneurons recorded from 10 epilepsy patients, time-locked to ripples (n = 14,116 ripples) detected on the same microwire bundle (local neurons) or to ripples detected on a different microwire bundle in the same patient (remote neurons). Neurons are sorted by their z-scored firing rate at the ripple trough (±25 ms). BOTTOM: corresponding mean firing rates sorted by distance of the neurons from the ripple detection channel (local vs remote), z-scored to the firing rate before SPW-Rs (−0.5 to −0.1 s). d Same for peri-IED spiking aligned to the negative IED spike (n = 6258 IEDs). Only neurons modulated by IEDs detected on the same ripple+ channels as in (a) are shown. The order of neurons is the same order as in (c) to compare directly the peri-IED and peri-ripple modulation for each neuron. a and (c) were created using BioRender. Maslarova, A. (2025) https://BioRender.com/u24k047, and hippocampus images from the hippocampus Allen Brain Atlas (mouse adult brain, https://atlas.brain-map.org/, adult human, https://doi.org/10.1002/cne.24080https://atlas.brain-map.org/). Source data are provided as a Source Data file.

Human ripples detected on macro-contacts or microwires in CA1 represent population level dynamics between excitatory pyramidal cells and inhibitory interneurons. Microwires can also detect single neuron firing, allowing to study neuronal modulation by ripples or IEDs. In our 10 epilepsy patients with ripple-positive channels, we detected 72 principal cells and 52 interneurons (67 principal cells and 44 interneurons, respectively, were found in sessions with detected ripples). Positive modulation was seen in 16 principal cells (24%) and 10 interneurons (22%), whereas no principal cells and 5 interneurons (11%) were negatively modulated (bootstrap test, see Methods). The average z-scored firing rate of positively modulated neurons was 3.3 (±0.6 SEM) for principal cells and 3.9 (±1.2) for interneurons. We next examined whether ripples detected on macrocontacts reflect the same population dynamics. We could confirm that ripples detected on macrocontacts were associated with an increase in firing rate, followed by a decrease in firing rate as seen on microwires (Supplementary Fig. 17).

For human IEDs, positive modulation was seen in 21 (29%) principal cells and 9 (17%) interneurons (Fig. 6d; bootstrap test). The mean z-scored firing rate of positively modulated neurons was 5.2 (±0.85) for pyr and 5.3 (±1.9) for interneurons. The same neurons were modulated similarly by ripples and IEDs detected on microwires (Fig. 6c,d), indicating that both events recruit the population in a similar way. Therefore, neuronal modulation could not separate ripples and IEDs.

In patients with more than one hippocampal microwire bundle, we could compare the modulation by ripples and IEDs of neurons detected on a depth electrode other than the one used for ripple detection—remote modulation). Ripples did not show significant modulation of remote pyramidal and interneurons. By contrast, IEDs caused increase of firing rates remotely, as is expected by their more propagated nature (Fig. 6c,d).

Discussion

With the introduction of high-resolution electrodes and advanced computational methods, the neuroscience of human memory has entered a new era. Recently, there have been numerous publications relating “ripple activity” to memory processes. However, the field is limited by the sparse and coarse nature of clinical macroelectrodes, imprecise electrode localization relative to the hippocampal subfield or layer, and variable detection thresholds29. Because of these inherent challenges in human recordings, we leveraged high-resolution recordings of SPW-Rs and IEDs in mouse hippocampus, where we could confidently separate SPW-Rs and IEDs and characterize their distinguishing spectral, spatial, and morphological features. We used these “ground truth” features observed in rodents to guide detection of hippocampal ripples and IEDs in patients.

Key features of hippocampal SPW-Rs in mice included (1) tight localization to the CA1 pyramidal layer, (2) a narrow-band peak within 100–250 Hz, (3) multiple ripple cycles in the raw LFP, (4) differing polarity of the sharp-wave component in the cell-body (positive) and dendritic (negative) CA1 layer, and (5) accompaniment with a burst of pyramidal and interneuron firing in CA1-3 followed by quiescence. We noted that SPW-Rs were rarely detected in DG.

We found that human hippocampal ripples during NREM sleep were also (1) highly localized to CA1 and mostly absent in DG, (2) showed a narrow band peak between 80 and 120 Hz with multiple LFP cycles. Human pyramidal cells and interneurons demonstrated a burst of activity followed by silence, analogous to rodent activity, but this was limited to a small fraction of neurons (likely due to sparser sampling).

Conversely, rodent IEDs had (1) a broader spatial field compared to SPW-Rs, (2) higher voltage compared to SPW-Rs ( ~ 5–15 fold), (3) a broadband peak, and (4) prolonged decrease in pyramidal and interneuron firing after IEDs, as shown previously49. It should be noted that only a small number of IEDs were recorded in this study, which constrained statistical analyses of neuronal modulation. This resulted from the head-fixed recordings with high-density, wide-coverage rigid probes, which limited recording durations but facilitated detailed analysis of LFP waveforms. Human IEDs had similar spectrotemporal features to rodent IEDs, but in humans more neurons showed positive modulation by IEDs, consistent with a previous study45.

Ripples could be simultaneously detected on macro- and microwire contacts. Ripples on both channels showed similar peak frequencies (average peak frequency of 85 Hz and 88 Hz, respectively), indicating that the lower frequencies of human ripples cannot entirely be attributed to smoothing effects of the macrocontacts. However, electrodes residing away from the CA1 and subiculum were less likely to detect ripples. Most ripples detected on macrocontacts were visible on multiple microwires. In two patients, a small percentage of ripples were detected on CA1 macroelectrodes, but not in microwires. We interpret this discrepancy by assuming that the microwires were located outside of the CA1 pyramidal layer. In the neurosurgical transverse approach, where macrocontact tip targets the CA1, the microwires extend to more medially located structures, i.e. DG and subiculum (Fig. 1d).

Based on our findings, we propose the following sequence of steps to distinguish ripples from IEDs and other false positive events in the human hippocampus (Fig. 7).

  1. 1.

    IED detection and cleaning. We recommend removing IEDs from the raw LFP signal prior to ripple detection. IEDs falsely raise the baseline threshold for detection of other high-frequency transients, including ripples (Supplementary Fig. 5). Moreover, IEDs can be falsely detected as ripples because of their wide-band power increase caused by the high-voltage sharp-transient.

  2. 2.

    Ripple detection. Here, we applied a widely used automatic ripple detector based on bandpass filtering, amplitude and duration thresholds (see Methods). While we used a broad frequency range (80–250 Hz) in this study to include diverse ripple waveforms, a narrower frequency range of 80–160 Hz could be used because most ripples showed peak frequencies between 80 and 160 Hz (Supplementary Fig. 15).

  3. 3.

    Selection of CA1 electrodes with PSD peaks > 60 Hz. We used the ASHS segmentation pipeline to identify human hippocampal subfields and confirmed the electrode positions by visual inspection (Supplementary Fig. 4). Given the highly localized nature of ripples, electrode selection is critical for ripple detection (Figs. 2, 4). We therefore recommend focusing ripple detection on CA1 and the subiculum, and discarding electrodes in DG. While rodent recordings permit CA1 pyramidal and radiatum layer identification to confirm the source and sink of ripple activity, as well as the CA3 subfield to identify the associated sharp wave, this level of anatomical specificity is not possible with electrodes co-registered to the post-op CT and pre-op MRI brain in humans, at least in our hands. Moreover, high-density recording in rodents demonstrated that even within CA1, the likelihood of ripple detection drastically drops as the distance from the pyramidal layer increases and that a ripple-positive channel should display a narrowband, high-frequency peak after 1/f correction (Fig. 2h). Therefore, we recommend selecting candidate channels by examining the average peri-event PSD around automatically detected putative events in human recordings. We found that spectral peaks across candidate electrodes demonstrated a bimodal distribution, above and below 60 Hz. Channels with a narrowband >60 Hz peak were more likely to exhibit ripples. On the contrary, most channels lacking >60 Hz peak were ripple negative. By discarding channels lacking >60 Hz peak, we eliminated ~40% of the detected events (Fig. 7).

  4. 4.

    Separation of candidate ripple events by morphology based on an unsupervised clustering algorithm (UMAP). Even after cleaning of IEDs, electrode localization to CA1, and physiological confirmation of electrode location based on a narrowband peak >60 Hz, not all detected events were ripples. Because averaged LFP waveforms can be misleading (Supplementary Fig. 11), individual candidate events must still be evaluated by their morphology. UMAP provides an unbiased, standardized approach to group individual events by LFP waveform similarity. The toolbox we developed for this, ripmap, was useful to separate IEDs from ripples and other false positives. UMAP increased the efficiency of our selection by discarding ~20 % of false-positives in ripple-positive channels within a few steps (Fig. 4).

  5. 5.

    Visual inspection. Visual inspection can be used throughout as a means of quality control. Visual inspection is useful to achieve the desired specificity of accepted ripples. For example, “ground truth” events are necessary to validate the outcomes of unsupervised clustering algorithms58, and we used a subset of visually inspected ripples, with high agreement ratios across and within raters to develop ripmap. However, our experience is that visual inspection of individual events is highly subjective and inconsistent over time, even among experts.

Fig. 7: Human ripple detection pipeline.
Fig. 7: Human ripple detection pipeline.
Full size image

a Channel inclusion and exclusion steps in this study. In total, 39 channels were used. b TOP: Proposed ripple detection workflow. BOTTOM: The number of channels and events in this dataset after each step using this workflow.

We acknowledge that ripmap may not eliminate all false positives in certain datasets. In such cases, we found it useful to screen out events lacking a > 60 Hz spectral peak after applying ripmap. Other additional post-processing steps, not explored here, could further reduce false-positive rates depending on the desired level of specificity.

While human clinical recordings lack the spatial resolution and laminar profiles of rodent recordings, we confirmed that tight SPW-R localization to CA1 was a key principle in guiding human ripple detection. Early CA1 channel selection in humans—through anatomical and physiological confirmation—was critical in rejecting the majority of false positive events. In fact, correct channel selection cut the number of candidate events by 40%. Moreover, unsupervised clustering based on morphological features of candidate events was helpful to exclude both physiological and artifactual false positives in the selected channels.

In this study, we focused on identifying human hippocampal ripples during sleep, a state in which ripple occurrence is well established. In contrast, most of the human studies involving hippocampal ripples have been performed during awake cognitive tasks21,24,25,31,32,33,35,68. Ripple detection during awake states is challenged by contamination from muscle artifacts and the presence of other HFOs, such as gamma frequency oscillations and aperiodic high gamma band activity. Moreover, as rodent SPW-Rs occur in low-cholinergic states6,34,69,70, ripple activity in humans during effortful tasks appears to be contradictory. In rodents, theta-gamma coupling, not SPW-Rs, is observed during active movement71. However, when the animal transitions from immobility to locomotion, SPW-Rs may serve to “prime” hippocampal circuits and serve to select salient memories for route planning in rodents65. It is possible that similar rapid shifts in the human brain state occur immediately prior to attentive states. Alternatively, high-frequency events identified as “ripples” may, in some cases, represent transient gamma oscillations or aperiodic activity, both of which are promoted by attention and cholinergic tone6,70,72. Future human studies combining hippocampal recordings with measurements of arousal, such as pupil size, heart rate variability, and skin conductance, may help distinguish ripples from gamma oscillations during awake states. Relating ripple (or gamma) phase modulation by slower rhythms (delta or theta) may also help with separation. In addition, the development of feature-based detection methods would allow more specialized oscillatory pattern detection while reducing reliance on noise thresholds73. Although our current work focused on sleep, the same workflow could be extended to awake recordings to improve the specificity of ripple detection.

Our study focused on identifying ripples analogous to rodent hippocampal SPW-Rs, which are known to emerge through the coordinated interplay of CA1 pyramidal cells and interneurons. These SPW-Rs have explicitly been causally linked to planning, replay, memory selection and consolidation by methods of high-density sampling and optogenetic manipulations4,5,13,14,74. The term “ripples” is sometimes used more broadly, including bursts of neuronal activation, without specificity to brain state or generation mechanism. Hippocampal SPW-Rs communicate with a broad spectrum of upstream regions11,12 and can be coupled with oscillations in the ripple frequency range in cortical areas. However, oscillations in the ripple frequency range can be generated independently in cortical regions with fast firing interneurons, and do not always demonstrate coupling with hippocampal SPW-Rs.

In this study, several limitations of cross-species comparisons become obvious. Human ripple detection was limited to the hippocampal head and body, where sampling is usually performed in epilepsy patients whereas rodent recordings typically sample the dorsal hippocampus (equivalent to the human hippocampal tail). However, there is evidence that SPW-Rs recorded from the ventral to intermediate sections possess smaller amplitudes and are more localized compared to dorsal SPW-Rs12,75. Another limitation is the absence of a rodent model that ideally represents the human disease. Most available epilepsy models are designed to reproduce tonic-clonic seizures and pronounced mesial temporal alterations, such as hippocampal sclerosis. By contrast, the APP/PS1 model used here exhibits more subtle hyperexcitability features similar to the human interictal state, in the context of APP/Aβ deposition, a pathology linked to both AD and temporal lobe epilepsy76. This model reliably demonstrates IEDs at a regular rate, without seizures. Importantly, the absence of hippocampal sclerosis in this model parallels our patient cohort, in which structural abnormalities were largely absent (with one exception). The propagation patterns and waveforms of IEDs in this model are also comparable to those observed in other limbic epilepsies55. Nevertheless, it cannot be excluded that genuine disease-specific patterns are not fully comparable. Uncertain macroelectrode localization is another limitation of clinical recordings, which is a greater problem in microelectrodes with an unpredictable splay. Ideally, definitive subfield and layer localization could be confirmed via post-resection histology, but the hippocampus may not be resected. Co-registration of pre- to post-operative imaging to idealized subfield segmentation with subtle brain shift may introduce additional error to visualized subfield location. This potential error explains why physiological confirmation of electrode location via a narrowband peak >60 Hz is necessary.

Our rigorous, cross-species approach demonstrates significant similarities between rodent “ground truth” SPW-Rs and human hippocampal ripples. Unsupervised clustering of events via ripmap introduces another standardized means of separating ripples from false positives. We intend for these findings to help the human neuroscience community to detect hippocampal ripples in an empirically-driven, standardized, and reproducible manner. Reliable methods to distinguish hippocampal ripples from pathological IEDs and other HFOs in epileptic brain tissue are foundational to discovery of brain-behavior dynamics

Methods

Rodent neurophysiology

Rodents

We used male APP/PS1 hemizygous mice (n = 5, age 3–9 months, JAX Stock No. 004462). Only male mice were used to avoid variability effects of the female ovarian cycle on IEDs and SPW-Rs77. These mice express mutations of two genes associated with Alzheimer’s disease (AD): amyloid precursor protein (APP) and presenilin-1 (PSEN1) and exhibit neuronal hyperexcitability and alterations in cortical oscillations78,79. They show early development of interictal epileptiform discharges (IEDs)49,54,80, but seizures are very rare, allowing to study IEDs and physiologic events, without the influence of hippocampal sclerosis or postictal effects.

Rodent handling and surgery

All experiments were performed in accordance with the Institutional Animal Care and Use Committee at New York University Medical Center. Mice were housed at a vivarium on a 12-hour light/dark cycle and were handled daily and accommodated to the experimenter before the surgery and head-fixed recording. As described previously38, for head-fixation, mice were implanted with a custom 3D-printed head-fixation headpost81 (Form2 printer, FormLabs, Sommerville, MA), attached to the skull with dental cement (C&B Metabond, Parkell, Edgewood, NY) under isoflurane anesthesia. A stainless-steel ground screw was implanted above the cerebellum. After recovery from surgery for at least 7 days, mice were gradually habituated to the head-fixation for at least 5 consecutive days. The head-fixation system was equipped with a treadmill (https://github.com/misiVoroslakos/3D_printed_designs/tree/main/Treadmill_Rinberg), allowing the animals to walk freely during training and recording sessions. After the habituation was complete, a craniotomy was performed above the hippocampus (craniotomy dimensions 2.5*0.5 mm, center coordinates 2 mm posterior to Bregma, 1.5 mm lateral to midline). The dura was removed, and the craniotomy was temporarily sealed with Kwik-Sil (World Precision Instruments, Sarasota, FL).

Rodent data acquisition

Acute recordings were performed on the day after the craniotomy to allow for the effects of isoflurane to fade. Recordings were performed using 8-shank, 1024-channel active CMOS-based probes (SiNAPS, NeuroNexus, Ann Arbor, MI; Corticale SRL, Genoa, Italy37,38, Fig. 2a). These probes provide simultaneous recordings from all 1024 electrodes, distributed over 8 shanks x 128 channels in a two-column configuration (inter-shank distance of 300 µm, center-to-center contact pitch ~30 μm, total recording area of 2100x1924 µm). The probe was gradually inserted to the target depth using a manual micromanipulator (MM-33, Sutter Instruments, Novato, CA). During insertion, live monitoring of the electrophysiological signal was used to establish that the desired depth had been reached. The data was digitized at 20 kHz using Smartbox Pro and Activus SiNAPS interface box and visualized using RadiensTM Allego software (NeuroNexus Technologies, Ann Arbor, MI). At least 20 min were allowed for equilibration before data collection, and 2 h sessions were recorded per mouse. After each session, the craniotomy was resealed with Kwik-Sil, and mice were returned to their home cages. A maximum of two insertions was performed per craniotomy over two consecutive days, with the second insertion positioned either posteriorly or anteriorly relative to the first to ensure recordings from undamaged hippocampal tissue. For some mice, analogous craniotomy and recording were also performed on the contralateral hemisphere.

Rodent Channel localization

Identification of hippocampal subfields, and cellular layers, was based on established electrophysiological markers as described in ref.38. CA1: We automatically detected SPW-Rs on a single electrode from the CA1 pyramidal layer and calculated current-source density (CSD) profiles82 to delineate the stratum radiatum and pyramidal layer of the CA1/CA2 axis (Fig. 2b). For further analysis, we chose the CA1 pyramidal channel with the highest high-frequency power (100–500 Hz) and the CA1 radiatum channel on the same shank with the largest negative wave during detected SPW-Rs. DG: Analogously, we computed CSD profiles of dentate spikes detected in the dentate gyrus83. Dentate spikes are brief large-amplitude LFP waves in the DG representing the firing of DG neurons in response to inputs from the entorhinal cortex. Dentate spikes show polarity reversal above the granule cell layer83,84. The border between current sinks and sources of SPW-Rs delineated pyramidal from dendritic layers38. CA2 and CA3: Identified neurons helped to delineate the pyramidal layers of CA3, CA2, and CA1. Separation of CA2 was performed based on peri-ripple firing histograms38,40.

Rodent IED detection

IED detection was performed on a CA1 radiatum channel (see above). The wide-band LFP signal (1250 Hz) was band-pass filtered between 20 and 80 Hz49,50 and transformed to a normalized squared signal (NSS). IEDs were detected by thresholding the baseline at 5 standard deviations (SD) and thresholding peaks at 20 SD of the NSS for 50 to 250 ms. All events were then visually inspected and manually curated. If necessary, the SD thresholds were adjusted for individual subjects. For further analysis, detected events were realigned to the trough of the unfiltered LFP.

Rodent SPW-R detection

SPW-R detection was performed as previously described49,85. We detected SPW-Rs on the CA1 pyramidal channel with the highest high-frequency (100–500 Hz) power. The wide-band LFP signal (1250 Hz) was band-pass filtered between 130 and 200 Hz using a 3rd order Butterworth filter and transformed to a normalized squared signal (NSS). Periods of IEDs ( ± 0.5 s) were excluded. SPW-Rs were detected by thresholding the baseline at 2 SD and thresholding peaks at 5 SD of the IED-free NSS signal. Events shorter than 30 ms or longer than 250 ms were discarded. The correct detection was confirmed by manual curation.

Frequency analysis

Event-triggered wavelet spectrograms were computed for the frequency range of 1–400 Hz using Morlet wavelet. Power spectral densities were computed using Welch’s average.

Human neurophysiology

Human subjects

We conducted a retrospective analysis of intracranial recordings from 13 patients (Table 1) with drug-resistant epilepsy who underwent diagnostic stereotactic electrode implantation for identification of epileptogenic cortex. Patient age ranged from 20 to 38 years (mean ± s.d. = 28.8 ± 6.7 years). Patients in the preoperative epilepsy program of the Level 4 Epilepsy Center of Erlangen University Hospital, Germany, were recruited and consented between 2019 and 2022. The decision for implantation was made by the interdisciplinary epilepsy board. Ethical approval was granted by the “Ethik Kommission” of Friedrich-Alexander Universität Erlangen-Nürnberg (142_12B), and all patients consented to implantation of hippocampal macro/microwire bundles (Behnke-Fried Electrodes) in addition to standard iEEG depth electrodes (AdTech Medical, USA) in other temporal and extratemporal regions.

Electrode reconstruction and hippocampal subfield segmentation

Electrode localization was performed using automated methods followed by expert review. All patients underwent a preoperative 3 T MRI (Magnetom Trio, Siemens Healthineers, Erlangen, Germany) with a dedicated 32-channel head coil at the Department of Neuroradiology, Erlangen University Hospital, Germany. For this study, we utilized following sequences: isotropic T1–3D-magnetization-prepared rapid gradient-echo (MPRAGE) sequence (1 mm), coronal and axial T2w TSE sequence (3 mm) oriented to the long axis of the hippocampus. We first co-registered the preoperative T1-weighted structural MRI and postoperative computed tomography (CT) containing visible electrode artifacts, using FSL flirt affine registration. Macrocontact locations were defined by the center coordinate of each contact. For microwires, we used the span between the two most distal points in each bundle to approximate spatial coverage across hippocampal subfields (Supplementary Fig. 4). To localize individual macrocontacts and microwire bundles to specific hippocampal subfields (e.g., CA1, CA2/3, DG), we used the Automatic Segmentation of Hippocampal Subfields (ASHS) toolbox62 applied to T2-weighted images. This toolbox generates subfield labels for each contact. We visually validated the labels by superimposing the subfield maps on the MRI along with the macrocontact and microwire coordinates (Supplementary Fig. 4). For descriptive purposes (Fig. 3a), we aligned each subject’s CT images to MNI152 T1-weighted template using CT2MNI15286. MNI coordinates for each macrocontact and microelectrode were extracted visually from the normalized CT overlaid on the MNI152 T1 MRI using the FSLeyes software.

Human macroelectrode and microwire recording

In addition to standard depth macroelectrodes (Ad-Tech Medical), patients were implanted with 1 to 2 macro/microwire hybrid electrodes (Behnke-Fried electrodes, Ad-Tech Medical) in mesial temporal lobe structures. Electrode trajectories were planned by the clinical team based on surface EEG, seizure semiology, and additional diagnostic modalities and without respect to this study. Microwire bundles consisted of eight high-impedance wires (40 µm diameter each, up to 3 MΩ impedance) and one low-impedance wire, which served as reference. Macrocontacts had a 1.3 × 1.6 mm diameter and impedance up to 250 Ω. Prior to implantation, all microwires were shortened to extend 5 mm from the first macro-contact. Electrode positions were confirmed by an intraoperative MRI- and postoperative MRI- and CT-scan. Only recordings from temporal electrodes with hippocampal microwires were included in this study. Following surgery, patients were monitored continuously for 7 days upon withdrawal of antiepileptic drugs.

Data were acquired using an ATLAS recording system consisting of CHET-10-A preamplifiers and a Digital Lynx NX amplifier (Neuralynx Inc.). Signals were filtered with cutoff frequencies at 0.1 and 9000 Hz and sampled at 2048 Hz for macroelectrodes and 32,768 Hz for microwires. The LFP signal from microwires was downsampled to 2048 Hz. Line noise at 50 Hz, 100 Hz and 150 Hz was removed using a second-order infinite impulse response notch filter (irrnotch.m). Hippocampal macroelectrodes were re-referenced to the nearest white matter contact of the same electrode. The raw data were converted to int16 binary format for processing with buzcode analysis scripts in Matlab (MathWorks; https://github.com/buzsakilab/buzcode).

Human sleep scoring using iEEG signals

To identify sleep periods in human iEEG signals, we computed the delta to gamma power ratio on all macro-contacts and microwires49. Initially, all iEEG signals were down-sampled to 64 Hz and divided into 30-second epochs before calculating the spectrogram and power spectral density (PSD). For each iEEG channel, we derived the spectrogram and delta-to-gamma power ratio. The spectrogram was obtained using a continuous wavelet transform with a Morlet Wavelet, set to 10 voices per octave and a time-bandwidth product of 90, using MATLAB’s “wt” and “cwtfilterbank” functions. We focused on frequencies between 0.5 Hz and 30 Hz. PSD was computed through fast Fourier transform (FFT). Relative delta (0.5–4 Hz) and gamma (20–30 Hz) power were calculated by normalizing the power within each frequency band by the total PSD power. We plotted the spectrogram showing median power across all channels for each frequency band, overlaid with the median delta-to-gamma ratio across the entire recording. This visualization allowed us to set a subject-specific delta-to-gamma threshold to distinguish wake and sleep epochs. Epochs with a delta-to-gamma ratio exceeding this threshold were classified as sleep, while those lasting less than 5 min were considered wake epochs and excluded from analysis.

Spectral peak extraction using FOOOF

Previous methods for extracting the peak frequency of candidate SPW-R events typically relied on filtered signals within a pre-defined ripple band (80–120 Hz in humans, 80-250 Hz in rodents). This approach is vulnerable to filtering artifacts caused by harmonics of low-frequency non-sinusoidal oscillations or sharp transients87 and often forced the identification of peaks within the ripple band, even if there was no clear spectral peak in the power spectrum. For example, as seen in our rodent recordings, IEDs spread over the entire spectrum, due to their sharp spike component. To more accurately estimate peak frequency of events detected in the ripple band, we first extracted the power spectrum in the time window ±100 ms around the ripple peak. Next, the aperiodic (slope) component was removed using FOOOF56, resulting in a 1/f corrected peri-event power spectrum. Spectral peaks were then identified from the corrected power spectrum using the findpeaks.m function, and those with an amplitude less than 0.2 were discarded. If peaks were found between 60 and 180 Hz, the one with the highest amplitude was selected. If no peak was found in this range, the low-frequency peak ( < 60 Hz) was identified.

IED detection in humans

IED detection was performed on the same channels used for SPW-R detection. The raw LFP signal was band-pass filtered between 20 and 80 Hz and transformed to a normalized squared signal (NSS). IEDs were defined by peaks beyond 10 SD of the NSS whenever the signal crossed 3 SDs of the NSS for 50 to 250 ms. All events were then visually inspected and manually curated. Whenever necessary, the SD thresholds were adjusted for individual subjects. For further analysis, detected events were realigned to the peak of the unfiltered LFP.

Human automatic ripple detection

In humans, ripples were detected on one microwire per microwire bundle, and the nearest macroelectrode. The microwire from each bundle was selected based on spectral peak analysis as described above (Spectral peak extraction using FOOOF). Signals were band-pass filtered from 80 to 250 Hz using a 3rd order Butterworth filter. This wide ripple band was chosen to capture a diverse range of ripple events and to examine how electrode size (macroelectrode vs. microwire) and location affect peak frequency. Very few events had peak frequencies above 160 Hz, indicating that we were primarily detecting physiological ripples despite the wide frequency band. IEDs can exhibit large transient peaks of broadband power, which can falsely raise the detection threshold for ripples (Supplementary Fig. 5). To reduce the impact of IEDs on the average and standard deviation of the signal, ±0.5 s data around IED peaks were removed after rectifying the filtered signal. This process produced a ripple power time series, which was then z-score normalized. Ripple detection was restricted to sleep epochs. Putative ripples were defined by beginning and ending cutoffs exceeding 2 standard deviations and peak power exceeding 5 standard deviations. Additionally, events were required to last between 30 and 250 ms, and events separated by less than 30 ms were merged.

Event inspection and curation with UMAP

Events detected with the automatic ripple detector or IED detector can be further analyzed and curated by reducing their dimensionality and visualizing them in a 2D space. We applied uniform manifold approximation and projection (UMAP) over all the detected events from both detectors. To make the analysis versatile and user-friendly, we created an open-source toolbox (ripmap) that runs on python. Ripmap first analyzes the topological features of the data by (i) computing the mean intrinsic dimension of the data in the original space, and (ii) characterizing the shape of the cloud using persistent homology. Then, data is reduced to a lower dimensional space and plotted in 2D. The ripmap GUI offers the possibility to perform the dimensionality reduction with different parameters at the same time and interactively select the parameters that better segregate IEDs from ripples. If events are clearly segregated, users can select events in the ripple cluster in the interactive plot, guided by unsupervised clustering (“do_clusters=1” Fig. 4c. However, if the UMAP cloud does not show a clear segregation, ripmap offers an alternative curation approach (“do_clusters=0”), which projects 2D UMAP cloud into a 1D axis and bin the events in equidistant segments (Fig. 4e). Then, ripmap visualizes the average waveform of the events in each bin, which typically transitions from a ripple-like waveform to an IED-like waveform. Individual events can also be displayed. Users can then select bins with ripple-like waveform or bins including high percentage of ripple events.

Data processing and UMAP projection

UMAP input is a matrix of events × time, where events include the detections from both the IED and the ripple detectors, where each time point represents a specific feature. This strategy has been previously applied in rodents to analyze SPW-R diversity58. The original space will have as many dimensions as there are time points in the event, and the coordinates of each dimension X will be the LFP value at time point X. Consequently, the shape of the cloud in both the original and reduced space will depend on how events are created or processed. First, we ascertained that all events were properly aligned. Ripples were centered on the negative peak in the band-pass-filtered signal. IEDs were detected as negative peaks on the band-pass filtered signal, and their centers were defined as minimum or maximum of the smoothed LFP within ±75 ms of the detection timestamp (Supplementary Fig. 8a). The key preprocessing parameters to prepare the UMAP input included i) win_size_umap: the window duration on each side of the event center; ii) do_detrend: flag to detrend the data or not, and iii) do_zscore: flag to z-score the data or not. We explored how these parameters affected the topology of the ripple-IED cloud, in addition to i) number of channels used (one vs two), ii) sampling frequency (original, 2048 Hz, vs downsampled, 1024 Hz), and iii) frequency of a low pass filter (200 Hz, 300 Hz, 400 Hz, 500 Hz or no filtering). We computed two different cluster index metrics for all possible sets of parameters and all patients (Supplementary Figs. 8,9): Density-Based Clustering Validation (DBCV) index (permetrics.clustering.ClusteringMetric88), and Silhouette59 (sklearn.metrics89). Metrics were computed for all possible sets of parameters. Metrics computed using one channel (add_channel = 0) used the LFP of the channel where the events were detected. Metric computed for two channels (add_channel = 1), implemented an additional channel. For microwires all additional microwires contained in the bundle were tested, but only the channel that best optimized the metric for each case is displayed in Supplementary Fig. 9. For macrocontacts, the next adjacent contact was used. To correct potential topological biases, metrics were recomputed after data labels were shuffled 100 times for every set of parameters. We observed that, although small, there were significant differences in the custer index metric values for different parameters. To correct this, we subtracted the mean metric value per parameter (Supplementary Fig. 9) to compare. In summary, this analysis allowed us to compute the optimal parameters to prepare UMAP input. In order to create an UMAP embedding in ripmap, more parameters need to be specified. In our toolbox, the metric is always Euclidean, but the number of components (n_components), the number of neighbors (n_neighbors) and the minimum distance (min_dist) can be set to any value. We have used n_components=4 to match the intrinsic dimension (see Supplementary Fig. 11), and a list of several n_neighbors and min_dist, with list_n_neighbors = [10, 50, 100, 200], and list_min_dists = [0.0, 0.1, 0.2, 0.3].

Intrinsic dimension and persistent homology

The intrinsic dimension of the data in the original dimension was computed using angle-based intrinsic dimensionality (ABID) method90. ABID derives the theoretical distribution of angles among neighboring points to construct an estimator for intrinsic dimensionality. We computed the intrinsic dimensionality of the data using n_neighbors = [10, 50, 100, 200]. Persistent homology diagrams91 were computed adapting the code from previously published works92. This method computes topological features of a space at different spatial resolutions. Assuming that features tpersistent during a wider range of spatial scales are more likely to represent true features of the space, the diagrams capture what topological features define the cloud in the original space. This analysis can be done at several levels (so-called “Betti numbers”), and each level describes a particular topological feature. For example, the first Betti number, β0, describes the number of connected components. Therefore, the number of persistent (long) bars in the diagram will reflect the number of unconnected components (or clusters).

Cluster suggestion and projection to 1D axis

If specified, clustering can be done over the 2D UMAP cloud. Clustering is done using hierarchical density-based spatial clustering of applications with noise (HDBSCAN)93. Note that clustering in this pipeline is meant to be used as a visualization and inspection aid, rather than an automatic clustering tool for SWR or IED type detection. The input parameters for HDBSCAN are 10% of the number of events for the min_cluster_size variable, and 0.05*min_cluster_size for min_samples. The interactive plot in ripmap visualizes all the individual events inside the user specified shape, allowing an instant evaluation of the performance of the event segregation. Alternatively, if the UMAP projection has no clear segregation and has the shape of a single cloud, we can explore the distribution of the events by dividing the cloud into equidistant sections. The number of bins into which it is divided can be specified by the parameter n_axis_bins. The mean waveform of all the events laying within that bin is then displayed, with the option to plot false positive (if labeled) separately using plot_fp_separately=True. The axis can be computed in two ways: from the pIEDs centroid to pSWR centroid (using axis_method = ‘centroids’), or fitting all data into a quadratic line (with axis_method = ‘fit’, see topol_utils.fit_axis). There is an additional option that allows plotting the events over and below the axis separately (do_axis_grid=True). Both in the clustering and projection options, the mean waveform and individual events displayed can be set to have a different length to the one used in UMAP with the parameter win_size_show.

UMAP was done using the Python library umap-learn (https://umap-learn.readthedocs.io/), signal processing tools were taken from scipy (https://docs.scipy.org/doc/; scipy.signal.detrend, scipy.stats.zscore). Clustering was done using HDBSCAN. Tests were run on Python 3.11.2 with the following library versions: h5py = =3.12.1, hdbscan = =0.8.39, matplotlib = =3.9.2, numba = =0.60.0, numpy = =2.0.2, permetrics = =2.0.0, persim = =0.3.7, ripser = =0.6.10, scikit-learn = =1.5.2, scipy = =1.14.1, tqdm = =4.67.0, umap-learn = =0.5.7.

Testing ripmap reproducibility across users

To calculate the inter-rater agreement ratio for the clustering step, we first vectorized the classification outcome for each event in a given dataset/subject, assigning a value of 1 for accepted events and 0 for rejected events. Agreement between two raters was defined as the number of events they both labeled the same (either accepted or rejected) divided by the total number of events. For example, if Rater 1’s results were [1 0 0 1 1] and Rater 2’s results were [1 1 0 0 1], the agreement ratio would be 3/5 = 0.6. This calculation was performed for all rater pairs (Rater 1 vs. Rater 2, Rater 2 vs. Rater 3, Rater 1 vs. Rater 3), and the average of these pairwise ratios was taken as the inter-rater agreement ratio for that dataset (represented as a single dot in Supplementary Fig. 12).

The inter-rater agreement ratio for the axis-fitting step was calculated in the same way, except that agreement was based on bin assignments rather than individual events—that is, the number of bins assigned the same label by both raters divided by the total number of bins.

Spike sorting in rodents and humans

Spike sorting was performed semiautomatically using Kilosort 1 for human and Kilosort 2.5 for rodent recordings (https://github.com/MouseLand/ Kilosort), followed by manual curation of the waveform clusters with Phy2 (https://phy-contrib.readthedocs.io/). For human recordings, spike sorting was performed separately for each microwire. Neurons were classified as putative pyramidal cells or interneurons using an automated cell type classification toolbox, CellExplorer, as described previously94. CellExplorer separates interneurons and pyramidal cells according to trough-to-peak duration of their waveforms and autocorrelogram shape of their firing rates. Parameters are based on known distinctive features. Briefly, hippocampal pyramidal cells typically have much wider waveforms than interneurons, are prone to bursting and their average firing rate is very low ( < 2 Hz). By contrast, interneurons demonstrate higher firing rates and lack bursting behaviour27,95,96. Automatic classification was followed by manual verification.

Neuronal modulation analysis

Peri-stimulus time histograms were computed for neural responses to IEDs and ripples using cross-correlograms with 5 ms bin sizes and analysis windows of ± 500 ms around event peaks. For IEDs, firing rates were analyzed during a 50 ms window centered on the discharge ( ± 25 ms), with baseline firing rates computed from a 50 ms period 500 ms before each event. For ripples, similar parameters were used with event windows of ±25 ms around ripple peaks and baseline periods 500 ms prior to events. Significant neural modulation was determined using bootstrap analysis, where 500 random event timestamps were sampled from the recording timeline to establish null distributions of firing rates during equivalent time windows. Cells were classified as significantly excited or inhibited if their actual firing rates during events fell outside the 99.9% confidence intervals of the bootstrap distribution. Only sessions with at least 50 events (IEDs or ripples) were used for bootstrap analysis.

Data analysis

All analyses were executed with custom written scripts in Matlab 2022a (MathWorks). Scripts were adapted from https://github.com/buzsakilab/buzcode and https://github.com/valegarman/HippoCookBook.

Data visualization

Illustrations in Figs. 1a, 2a, 3a and 6a,c were created using BioRender. Maslarova, A. (2025) https://BioRender.com/u24k047. Figures Figs. 2a and 6c include images from Allen Brain Atlas: mouse adult brain (https://atlas.brain-map.org) and adult human97. Statistical figures were plotted using Gramm Toolbox98.

Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.