Reading time: about 8 minutes · 9 November 2026 · bioRxiv, 2026

A brief burst of activity in the hippocampus can last less than a tenth of a second. If you want to act on that burst while it is still happening, you have to notice it and respond inside the same short window. This post is about a system built to do that.

Background

The hippocampus is a structure deep in the brain that is especially important for forming memories of events and places. A memory is not finished at the moment of experience. During later rest, the hippocampus can replay fragments of what just happened, a process thought to help those traces stabilize and, over time, settle into longer-lasting networks (Buzsáki, 2015).

To watch this activity, researchers place a thin electrode in the tissue and record the local field potential (LFP): the voltage in the fluid just outside neurons. That voltage is produced mainly by the summed electrical currents of many nearby cells acting together. It is a local population signal, not the spike of a single neuron (Buzsáki, Anastassiou, & Koch, 2012).

In the hippocampus, one of the most distinctive LFP patterns is the sharp-wave ripple. A slower deflection (the sharp wave) is accompanied by a brief, fast oscillation (the ripple). In the rodent recordings used here, the ripple sits in the 100–250 Hz range and typically lasts only about 30–100 milliseconds (Félix et al., 2026; Buzsáki, 2015). It is a short, highly synchronized burst in a local group of hippocampal neurons. These events appear mainly in “offline” states: when an animal is still and quietly awake, or during slow-wave (non-REM) sleep, rather than while it is actively moving and exploring (Buzsáki, 2015).

Why study them? During ripples, neurons that fired together in a recent experience can fire again in a compressed sequence, often called replay. This has been linked to memory consolidation. In one well-known experiment, interrupting ripples after a spatial learning session impaired later memory performance in rats (Girardeau et al., 2009). That kind of test only works if the intervention is timed to the event itself.

That is a closed-loop problem. A closed-loop system watches the ongoing brain signal and acts only when a chosen pattern appears, instead of stimulating all the time. For a ripple, the action has to arrive before that brief oscillation ends; otherwise it is no longer acting on that event. The paper discussed here builds a loop that can detect ripples and trigger a brief intervention. It measures how quickly the loop can respond, and whether a timed pulse of light changes the ripple’s electrical signature. It does not test whether the animals remember better or worse afterward.

Problem

The difficulty is time as much as accuracy. A ripple is over in tens of milliseconds, so high-bandwidth brain data have to be turned into a decision and a command inside that window, and with a power budget that later devices could in principle carry. Large deep-learning detectors can be accurate, but they are often too heavy to run this quickly at the edge. A complete loop for such fast, fleeting events—fast enough, efficient enough, built on tools many labs already use, and tested in a living brain—had not been shown.

In a 2026 bioRxiv preprint, Félix and colleagues set out to close that gap. They train a compact spiking neural network (SNN)—a network whose units communicate with discrete pulses, like neurons—and run it on SpiNNaker, a board designed to simulate such networks in real time at low power. They plug the board into Open Ephys, a common lab recording system, and, when a ripple is detected, trigger a brief flash of light to suppress the event in an awake mouse.

Method

The starting signal is an LFP recorded in CA1, a hippocampal subregion where ripples are often measured. The authors keep only the ripple band (100–250 Hz), then convert the filtered trace into two event streams: an UP pulse when the signal rises past a threshold, and a DN pulse when it falls. This is asynchronous delta modulation. Events first sampled at 30 kHz are reduced to 1 kHz to match SpiNNaker’s 1 ms time step. The aim is not a perfect reconstruction of the waveform, only to keep the timing pattern that marks a ripple. Rebuilt traces still show the fast oscillation, and the encoded pulses are much denser during ripples than during quiet baseline.

Those streams are cut into short overlapping windows and used to train a small feed-forward SNN: two input channels, two hidden layers of leaky integrate-and-fire neurons (24, then 16 units), and one output neuron that fires when the network reports a ripple—41 neurons and 530 adjustable parameters in all. Training used surrogate-gradient backpropagation, so a pulsing network can be trained with the same kind of gradient descent used in ordinary deep learning.

Figure 1. Spike-based encoding and the compact SNN. (A) A raw CA1 local field potential is band-pass filtered in the ripple range (100–250 Hz) and converted into sparse UP and DN events, then downsampled from 30 kHz to 1 kHz. (B) Reconstructing the filtered trace from those events still shows the high-frequency ripple. (C) Encoded firing rate and reconstruction SNR are higher during ripples (R) than during non-ripple baseline (NR). (D) Overlapping windows are labeled for supervised training. (E) The network has two hidden layers of 24 and 16 leaky integrate-and-fire neurons and a single output neuron. From Félix et al., 2026, Figure 1.

Figure 1. Spike-based encoding and the compact SNN. (A) A raw CA1 local field potential is band-pass filtered in the ripple range (100–250 Hz) and converted into sparse UP and DN events, then downsampled from 30 kHz to 1 kHz. (B) Reconstructing the filtered trace from those events still shows the high-frequency ripple. (C) Encoded firing rate and reconstruction SNR are higher during ripples (R) than during non-ripple baseline (NR). (D) Overlapping windows are labeled for supervised training. (E) The network has two hidden layers of 24 and 16 leaky integrate-and-fire neurons and a single output neuron. From Félix et al., 2026, Figure 1.

The trained network then sits in a live chain. Open Ephys streams the LFP to a host program that filters and encodes each snippet. UP and DN events go over Ethernet to SpiNNaker. When the output neuron fires, an Arduino sends a pulse that turns on a 100 ms flash of blue light. This uses optogenetics: certain cells are genetically prepared so that light can switch them on or off. Here the light recruits inhibitory neurons in CA1, with the aim of damping the ripple. A firing threshold on the output neuron sets how readily the system declares a detection.

Experiments

The authors tested the loop at several levels, and kept pre-recorded tests separate from sessions in a living animal. Three scores appear often, each answering a different question. Recall asks: of the ripples a person marked, what fraction did the network catch? Precision asks: of the moments the network said “ripple,” what fraction were real? The F1-score is a single number that balances the two. Timing is measured as round-trip, or total closed-loop, latency: how long from the start of a ripple, through recording, encoding, the board, and the trigger, until the command pulse appears. Relative latency compares that delay with how long that ripple lasted; a value below 100% means the pulse arrived before the event ended.

Offline detection on annotated recordings

Detection was scored on 23 sessions from five mice, with 2,719 manually marked ripples, using a public dataset of awake, head-fixed CA1 recordings and additional sessions in a similar format. The SNN was compared with a classical Buzsáki-style RMS filter, another filter (Dutta), and larger deep-learning models, both at default settings and after tuning to this dataset.

Closed-loop tests with pre-recorded signals

To run the network on the board without a live animal, pre-recorded LFPs were streamed through Open Ephys, encoded, and processed on SpiNNaker. This is online processing of buffered recordings, as opposed to offline playback in a software simulator or on the board. The authors varied the output threshold and compared power use on 14 sessions for a GPU, a CPU, and SpiNNaker.

To time the complete chain, they built a hardware-in-the-loop setup: pre-recorded hippocampal LFPs were played into Open Ephys as if they were arriving live, then through encoding, SpiNNaker, and an Arduino whose pulse was recorded back. They compared two ways of firing the Arduino, and varied how much data was buffered before each step and how high the detection threshold was set.

In vivo optogenetic sessions

The full sensing–processing–stimulation loop was then run in two awake, head-fixed mice, across twelve sessions (4 with the light off, 8 with it on). CA1 signals were recorded with high-density electrodes that can also deliver light. A detection triggered a 100 ms inhibitory light pulse, aimed at inhibitory (GABAergic) neurons. These live sessions used a preliminary configuration, before the timing optimizations above: a longer (20 ms) buffer, and a slower route for the trigger. Afterward, 1,699 ripples were scored. The authors compared light-on and light-off sessions on detection scores, latency, ripple-band power around the detection time, and, for the longest 25% of detected ripples in each session, the energy of the oscillation—roughly, how strong and prolonged it was.

Results

Detection performance

In the offline software test, the network caught most marked ripples but also raised a fair number of false alarms: median recall was 0.89, median precision was 0.50, and median F1 was 0.56. The best SNN reached a median F1 of 0.61, in the same range as larger deep-learning models. A carefully tuned classical filter still scored higher (median F1 = 0.70). When those filters were left at their default settings, though, their scores dropped, and the SNN did better than the untuned versions.

Once the same network was running on SpiNNaker, raising the detection threshold made the system choosier (fewer false alarms, more misses). Moving from the software simulator to the board lowered F1 only modestly; switching from offline to online processing on the board added little further cost at the more balanced thresholds. The power difference was large. On 14 sessions, GPU and CPU inference used medians of 70 W and 53 W and did not keep up in real time. SpiNNaker ran the same sessions in biological real time at about 3.6 W for the whole board, of which about 0.35 W was attributed to the simulation itself—up to about 200-fold less if that simulation power is compared with the GPU or CPU.

Figure 4. Online deployment on SpiNNaker. (A) Open Ephys view of streamed LFPs, with detection pulses compared against annotated ripples. (B, C) The output-neuron firing threshold trades recall for precision; thresholds between 0.8 and 1.0 give the best F1-scores. (D) Moving from the software simulator (snnTorch) to SpiNNaker lowers F1 somewhat; switching from offline to online buffered processing on the board has little further cost at the balanced thresholds. (E) False negatives and false positives per minute as a function of threshold. (F) Power during inference: GPU and CPU consume tens of watts, while SpiNNaker board power (Total) and the power attributed to the simulation (Sim) are much lower. From Félix et al., 2026, Figure 4.

Figure 4. Online deployment on SpiNNaker. (A) Open Ephys view of streamed LFPs, with detection pulses compared against annotated ripples. (B, C) The output-neuron firing threshold trades recall for precision; thresholds between 0.8 and 1.0 give the best F1-scores. (D) Moving from the software simulator (snnTorch) to SpiNNaker lowers F1 somewhat; switching from offline to online buffered processing on the board has little further cost at the balanced thresholds. (E) False negatives and false positives per minute as a function of threshold. (F) Power during inference: GPU and CPU consume tens of watts, while SpiNNaker board power (Total) and the power attributed to the simulation (Sim) are much lower. From Félix et al., 2026, Figure 4.

Speed of the optimized loop

In the hardware-in-the-loop test, the path of the trigger mattered. Driving the Arduino directly from the control program, rather than through an Open Ephys plugin, shortened the median delay and raised the share of ripples that still received a pulse before they ended from 59% to about 80%. Shorter buffers were faster; longer buffers improved detection only a little, while adding a lot of delay.

The fastest setting—a 3 ms buffer and a relatively sensitive threshold—gave a median total closed-loop latency of 48.53 ms, with the middle half of delays falling between 41.37 and 56.52 ms. This is the paper’s “approximately 50 ms.” At that setting, a pulse arrived before ripple termination in 80.4% of events. These 50 ms and 80% figures come from this pre-recorded, optimized hardware-in-the-loop test. They are not the latencies measured later in the live-animal sessions.

Figure 5. Hardware-in-the-loop measurement of total closed-loop latency. (A) Pre-recorded LFPs are played into Open Ephys, encoded, sent to SpiNNaker, and used to trigger an Arduino pulse that is recorded back for timing. (B) Direct Python control of the Arduino (PY) is faster than the Open Ephys plugin (OE), and closer to the offline baseline (OFF). The right panel shows latency as a percentage of each ripple’s duration; the dashed line at 100% is the event’s end. (C) Round-trip latency grows with buffer size. Short buffers fall within the typical ripple-duration distribution (histogram); longer buffers push relative latency above 100%. (D) Larger buffers raise F1 only modestly, while median latency increases substantially. (E, F) Buffer size and firing threshold together set the latency–performance operating point. From Félix et al., 2026, Figure 5.

Figure 5. Hardware-in-the-loop measurement of total closed-loop latency. (A) Pre-recorded LFPs are played into Open Ephys, encoded, sent to SpiNNaker, and used to trigger an Arduino pulse that is recorded back for timing. (B) Direct Python control of the Arduino (PY) is faster than the Open Ephys plugin (OE), and closer to the offline baseline (OFF). The right panel shows latency as a percentage of each ripple’s duration; the dashed line at 100% is the event’s end. (C) Round-trip latency grows with buffer size. Short buffers fall within the typical ripple-duration distribution (histogram); longer buffers push relative latency above 100%. (D) Larger buffers raise F1 only modestly, while median latency increases substantially. (E, F) Buffer size and firing threshold together set the latency–performance operating point. From Félix et al., 2026, Figure 5.

Effects in the awake mouse

In the preliminary in vivo configuration, the median round-trip latency was 76.47 ms, with the middle half of delays between 66.67 and 88.13 ms, and only 13.7% of ripples received stimulation before they ended. The detector still found most marked events (median recall 0.77, precision 0.30, F1 0.44).

Aligning ripple-band power on the detection time, light-on and light-off sessions looked similar before the pulse. In the 50 ms after detection, mean power was lower when the light was on. Across all 12 sessions, that difference did not reach the paper’s threshold for statistical significance (p = 0.07), though the effect was large (Cliff’s δ = 0.69; this number describes how consistently one group sits below the other).

Because the longer delay meant brief ripples were often already finished when the light arrived, the authors then looked at the longest 25% of detected ripples in each session—the events most likely to still be ongoing. In that subset, light-on sessions had significantly lower ripple energy than light-off sessions (p = 0.048, δ = 0.75). Other features moved in the same direction: the longest events looked weaker and more spread out in frequency, with large effects that were not statistically significant given the number of sessions.

Figure 6. Closed-loop optogenetic experiments in awake, head-fixed mice. (A) CA1 signals recorded with µLED optoelectrodes go through Open Ephys and a Python bridge to SpiNNaker; a detection triggers a 100 ms inhibitory light pulse. (B) In these sessions the detector’s median recall was 0.77, median precision 0.30, and median F1-score 0.44. (C) With a preliminary 20 ms buffer and the Open Ephys plugin, median latency sat to the right of most ripple durations, so relative latency was typically above 100%. (D) Mean ripple-band power aligned to detection. After the pulse, ON sessions (orange, n = 8) fall below OFF sessions (blue, n = 4); the difference in the +50 ms window was p = 0.07, with a large effect size. (E) For the longest 25% of ripples in each session, ON sessions had significantly lower energy (star). Other features show large effects in the same direction but were not statistically significant. From Félix et al., 2026, Figure 6.

Figure 6. Closed-loop optogenetic experiments in awake, head-fixed mice. (A) CA1 signals recorded with µLED optoelectrodes go through Open Ephys and a Python bridge to SpiNNaker; a detection triggers a 100 ms inhibitory light pulse. (B) In these sessions the detector’s median recall was 0.77, median precision 0.30, and median F1-score 0.44. (C) With a preliminary 20 ms buffer and the Open Ephys plugin, median latency sat to the right of most ripple durations, so relative latency was typically above 100%. (D) Mean ripple-band power aligned to detection. After the pulse, ON sessions (orange, n = 8) fall below OFF sessions (blue, n = 4); the difference in the +50 ms window was p = 0.07, with a large effect size. (E) For the longest 25% of ripples in each session, ON sessions had significantly lower energy (star). Other features show large effects in the same direction but were not statistically significant. From Félix et al., 2026, Figure 6.

Analysis

The compact SNN is useful here because it is small enough to run in real time on a low-power board, and remains competitive when classical filters are not painstakingly retuned. A carefully calibrated filter still reached the highest F1-score on this dataset.

The 50 ms median delay and the “up to 80%” intra-event rate describe the optimized pre-recorded loop. They show that, in that configuration, the full recording-to-trigger chain can often fit inside a ripple. The live-animal sessions used a slower preliminary setup, so most pulses arrived after that ripple had already ended. Only a pulse that still overlaps the oscillation can act on that event.

What the in vivo data show is more specific. Across all events, the drop in power after detection was large but not statistically significant (p = 0.07). On the longest quarter of ripples, where a delayed pulse was more likely to overlap the event, the energy of the oscillation was significantly lower when the light was on (p = 0.048). That is evidence that a neuromorphic-triggered light pulse can alter an ongoing ripple when it still coincides with the event. The measurements concern timing and the ripple’s electrical signature, not later memory performance.

Summary

  • A 41-neuron spiking network can detect hippocampal ripples in the same performance range as larger deep-learning detectors, and can run in real time on a SpiNNaker board at a fraction of the power of a CPU or GPU simulation.
  • In an optimized hardware-in-the-loop test with pre-recorded signals, the full loop reached a median total closed-loop latency of 48.53 ms and delivered a pulse before ripple termination in 80.4% of events.
  • In the actual in vivo sessions, which still used a slower preliminary setup, most pulses arrived after the ripple had ended (median 76.47 ms; only 13.7% arrived in time). On the longest events, the timed light pulse significantly reduced ripple energy. This paper measures timing and the ripple’s electrical signature, not later memory.

References and resources

  • Félix, P., Jurado-Parras, M.-T., Freitas, J., Ventura, J., de la Prida, L. M., & Aguiar, P. (2026). Low-latency neuromorphic closed-loop control of hippocampal ripples in vivo. bioRxiv. Preprint, posted 2026-07-15. doi.org/10.64898/2026.07.09.737518 · Full text
  • Buzsáki, G. (2015). Hippocampal sharp wave-ripple: A cognitive biomarker for episodic memory and planning. Hippocampus, 25(10), 1073–1188. doi.org/10.1002/hipo.22488
  • Buzsáki, G., Anastassiou, C. A., & Koch, C. (2012). The origin of extracellular fields and currents — EEG, ECoG, LFP and spikes. Nature Reviews Neuroscience, 13, 407–420. doi.org/10.1038/nrn3241
  • Girardeau, G., Benchenane, K., Wiener, S. I., Buzsáki, G., & Zugaro, M. B. (2009). Selective suppression of hippocampal ripples impairs spatial memory. Nature Neuroscience, 12, 1222–1223. doi.org/10.1038/nn.2384
  • Figures 1, 4, 5, and 6 are from Félix et al. (2026).
  • Training and evaluation used a public CA1 dataset (Figshare project 117897) and additional sessions, described in 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. doi.org/10.7554/eLife.77772 and 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. Communications Biology, 7, 211. doi.org/10.1038/s42003-024-05871-w.