NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

convSeq: Fast and Scalable Method for Detecting Patterns in Spike Data

Roman Koshkin, Tomoki FukaiICML 2024

TL;DR

convSeq is a novel, unsupervised method that leverages backpropagation and GPU acceleration to detect repeating spatiotemporal patterns in neural spike data. Operating over 100 times faster than current state-of-the-art methods, it enables researchers to analyze massive datasets—spanning hundreds of neurons and several days of recording—with unprecedented efficiency and built-in uncertainty estimates.

The Challenge of Scaling Neural Data Analysis

In the brain, "spontaneous" activity is rarely just noise; it frequently consists of precise sequences of neurons firing in a specific order. A well-known example is "hippocampal replay," where the brain replays a sequence of activity during sleep that originally occurred while an animal navigated an environment. These patterns are fundamental to memory consolidation and learning.

However, as neural recording technology advances, neuroscientists are drowning in data. Modern probes can record hundreds or thousands of neurons simultaneously over multiple days. Existing computational tools for finding these patterns (such as convNMF or seqNMF) are computationally expensive and struggle to scale to these massive datasets. Researchers urgently need a way to find these "needles in the haystack" efficiently, without relying on a behavioral reference (like a GPS track) to dictate where to look.

Methods: Treating Detection as Filter Optimization

To address this bottleneck, the authors introduce convSeq, which reframes pattern detection as a filter optimization problem.

  1. The Filter Approach: The model searches for 2D filters (templates) that, when convolved with the raw neural data, produce high-intensity "peaks" exactly when a specific pattern occurs.
  2. Backpropagation: Unlike previous methods that rely on slow, iterative matrix factorization, convSeq uses backpropagation—the core engine behind modern deep learning. This allows the method to fully leverage automatic differentiation frameworks (like PyTorch) and GPU acceleration.
  3. The Loss Function: The model minimizes a specialized loss function designed to:
  4. Maximize Variance: High variance in the output indicates the filter is successfully "hitting" specific patterns rather than just responding to uniform background noise.
  5. Minimize Total Variation: This ensures the learned filters remain smooth and biologically interpretable.
  6. Minimize Cross-Correlation: This forces different filters to learn distinct patterns, preventing them from converging on the same sequence.
  7. Gaussian Parameterization: To further streamline the process, the authors propose a variant where filters are modeled as "truncated Gaussians," drastically reducing the number of parameters the model needs to learn.
Raster plots of spike data (A-C), the resulting filter output with detected peaks (D), and the learned spatiotemporal templates (E-F).

Validation Datasets

The research team validated convSeq using a mix of simulated and real biological data:

  • Synthetic Datasets: 81 different synthetic datasets were generated to test the model's resilience against "jitter" (timing noise), "dropout" (missing spikes), and "time-warping" (patterns playing back at varying speeds).
  • Mouse CA1 (Hippocampus): Real recordings of a mouse running on a linear track. The model successfully identified both forward and backward sequences of "place cells."
  • Songbird HVC (Higher Vocal Center): Recordings from a songbird, where neurons are known to fire in extremely precise, timed sequences during singing.

Key Insights and Innovations

  • Speed is a Feature, Not Just a Metric: By achieving a 100x speedup, convSeq fundamentally changes how researchers can interact with their data. They can now perform empirical searches for the optimal number of patterns ($K$) by running the model multiple times with different settings in mere minutes, rather than days.
  • Uncertainty Estimation: Unlike its predecessors, convSeq provides a statistical significance threshold ($\alpha$) via bootstrapping. This critical feature tells the researcher whether a detected peak represents a genuine biological pattern or just a random coincidence of spikes.
Filter outputs and density plots illustrating how convSeq establishes significance thresholds to separate true patterns from noise.
  • Robustness to "Warping": The brain does not always replay sequences at a constant speed. convSeq proved robust to mild time-warping and can be easily adapted to find significantly slowed-down or sped-up patterns by simply adjusting the filter width parameter ($M$).

Key Results

  • 100x Speedup: In head-to-head benchmarks, convSeq performed over 100 times faster than PP-Seq and seqNMF on identical datasets.
  • Massive Scalability: On a large dataset containing 500,000 timesteps, convSeq (running on a GPU) was roughly 32 times faster than PP-Seq (running on a CPU).
  • Maintained Accuracy: Despite its incredible speed, convSeq matched or outperformed baseline methods in terms of Area Under the ROC Curve (AUC) across various levels of data noise and sparsity. It also successfully disentangled overlapping patterns and bidirectional sequences.

Limitations and Future Work

While highly powerful, the authors note a few areas for future refinement:

  • Shared Neurons: If two distinct patterns share a large proportion of the same neurons and occur very close together in time, the model can occasionally struggle to disentangle them perfectly.
  • Hyperparameter Tuning: Users must still provide an initial estimate for the number of patterns ($K$) and the maximum length of a pattern ($M$). However, the model's speed makes trial-and-error tuning highly practical.
  • Architectural Evolution: The authors suggest that incorporating "dilated" or "strided" convolutions could make the method even more efficient and capable in future iterations.

Reference: Koshkin, R., & Fukai, T. (2024). convSeq: Fast and Scalable Method for Detecting Patterns in Spike Data. Proceedings of the 41st International Conference on Machine Learning (ICML).

Summary updated

BibTeX
@inproceedings{koshkin2024convseq,
  author = {Roman Koshkin and Tomoki Fukai},
  title = {{convSeq: Fast and Scalable Method for Detecting Patterns in Spike Data}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=KVa4i4RR1O},
}
Figure