bioRxiv Science⌕ Search

bioRxiv · 10.1101/2025.04.11.648468

Dissociating physiological ripples and epileptiform discharges with vision transformers

Abstract

Two frequently studied bursts of neural activity in the hippocampus are normal physiological ripples and abnormal interictal epileptiform discharges (IEDs). While they are different waveforms, IEDs are notoriously picked up as false positives when using typical automated ripples detectors which are prone to sharp edge artifacts. This has created challenges for studying ripples and IEDs independently. We leveraged recent advances in computer vision on time-frequency feature representations to enable more comprehensive and objective dissociation of these phenomena. We retrospectively evaluated human intracranial recordings from 46 hippocampal depth electrode sites among 17 patients with focal epilepsy, the majority of whom had a seizure-onset zone/network involving the hippocampus. We implemented a common human ripple detection algorithm and broadband spectrograms of all detected "ripple candidates" were projected into low-dimensional space. We segmented them using k-means to infer pseudo-labels for probable ripples and probable IEDs. Independently, human expert IED labels were manually annotated for comparison. State-of-the-art vision transformer models were implemented on individual spectrograms to approach ripple vs. IED dissociation as an image classification problem. We detected 31,847 ripple/IED candidates, and a median 3.9% per patient (range: 0-47.2%) were IEDs based on expert label overlap. Low-dimensional projection of spectrograms separated canonical IEDs vs. ripples better than raw or ripple-filtered waveforms. Canonical ripple and IED candidates emerged at opposite poles with a continuous landscape of intermediates in between. A binary vision transformer model trained on expert-labeled IED vs. non-IED candidate spectrograms with 5-fold cross-validation showed a mean area under the curve (AUC) of 0.970 and mean precision-recall curve of 0.694, both significantly above chance. To evaluate generalizability, we implemented a leave-one-patient-out cross-validation approach, in which training on pseudo-labels and testing on expert-labeled data demonstrated near-expert performance (mean AUC 0.966 across patients, range 0.892-0.997). Transformer-derived attention maps revealed that models were tuned to triangle-like edge artifact spatial features in the spectrograms. Model-derived probabilities (i.e. of being an IED) for all candidates demonstrated continuous transitions between ripples vs. IEDs, as opposed to binary clustering. The delineation between ripples and IEDs appears best represented as a gradient (i.e. not binary) due to physiological ripple features overlapping with sharpened and/or high frequency pathophysiological IED features. Vision transformers nevertheless perform virtually at human expert levels in dissociating these phenomena by leveraging time-frequency spatial features enabled by neural data spectrograms. Such tools applied to spectrotemporal representations may augment comprehensive investigations in cognitive neurophysiology and epileptiform signal biomarker optimization for closed-loop applications.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Zhang, D., Kleen, J.. 2025-04-18. Dissociating physiological ripples and epileptiform discharges with vision transformers. https://doi.org/10.1101/2025.04.11.648468

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related preprints

The Unreasonable Effectiveness of Cell Types in Describing Neuronal Physiological Features

Single-cell RNA sequencing (scRNA-seq) captures detailed gene expression profiles at scale, while patch-clamp recordings measure intrinsic neuronal electrophysiological properties. Modeling the relations between these two modalities remains a challenge. Here, we compare how well electrophysiological features can be predicted by traditional transcriptomic cell type classification, representations derived from a foundational model (scGPT) pretrained on large-scale scRNA-seq datasets, ion channel-coding genes, and highly variable genes. Using paired transcriptomic and electrophysiological patch-sequencing data from 495 human neurons from neurosurgical tissue, we find that cluster-level cell type representations consistently outperform highly variable gene selection, ion channel gene selection, and context-enriched scGPT embeddings. Notably, performance varies across model architectures and initializations, and the best results are obtained by combining the outputs of separate cell type and scGPT-based models. Together, these findings suggest that traditional discrete cellular classification is highly effective in predicting physiological features. For maximum performance it can be complemented by pretrained transformer models.

neuroscience↗

A nonlinear inhibition pathway underlying cortical responses to tuned holographic optogenetic perturbations

Optogenetics enables causal manipulation of cortical activity. Perturbation responses can be counterintuitive due to network interactions, making theory essential for predicting them. Existing approaches often rely on linear approximations, which fail for many biologically relevant perturbations. Here we develop a nonlinear theory of responses to holographic perturbations in cell-type-specific recurrent networks with structured connectivity. We fit a nonlinear model to mouse V1 data, which shows cotuned-ensemble suppression: perturbing spatially clustered neurons with similar preferred orientations yields markedly stronger short-range suppression than perturbing untuned ensembles. We show that cotuned-ensemble suppression arises from a feature-tuned, nonlinear inhibition pathway implicating somatostatin-positive (SST) interneurons. The theory predicts that cotuned ensembles suppress parvalbumin-positive (PV) neurons but facilitate SST neurons, and links the degree of cotuned-ensemble suppression or facilitation to the variance of the SST response. This framework identifies mechanisms by which nonlinear inhibition sculpts cortical dynamics and establishes a predictive basis for targeted optogenetic interventions.

neuroscience↗

Proteomic signatures of APOE ε4 across human tissues and cell types in Alzheimers disease

The apolipoprotein E {varepsilon}4 (APOE {varepsilon}4) allele is the strongest genetic risk factor for late-onset Alzheimers disease (AD). However, the underlying molecular mechanisms remain unclear. This study included 1691 participants from the Religious Orders Study and Rush Memory and Aging Project (ROSMAP), 1226 participants from the Accelerating Medicines Partnership - Alzheimers Disease (AMP-AD) Diverse Cohorts Study, and 735 participants from the Alzheimers Disease Neuroimaging Initiative (ADNI). To characterise APOE {varepsilon}4 molecular effects, we analysed proteomic data from plasma, cerebrospinal fluid (CSF), and induced pluripotent stem cell (iPSC)-derived astrocytes and neurons, as well as transcriptomic and proteomic data from multiple brain regions. The association of APOE {varepsilon}4 with AD neuropathology was also examined. APOE {varepsilon}4 carriers shared a plasma proteomic signature enriched for immune processes, irrespective of AD diagnosis. A machine learning classifier trained on this signature discriminated APOE {varepsilon}4 carriers from non-carriers in an independent cohort using CSF proteomics. APOE {varepsilon}4 carriage was associated with higher Braak stages and Consortium to Establish a Registry for Alzheimers Disease (CERAD) score. However, only limited APOE {varepsilon}4-associated transcriptomic and proteomic changes were observed in bulk brain tissue, with poor cross-layer concordance. Proteomic analyses of iPSC-derived astrocytes and neurons further revealed cell-type-specific APOE {varepsilon}4-associated changes. APOE {varepsilon}4 is associated with a consistent proteomic signature across plasma and CSF. Its molecular effects in the brain differ across cell types, brain regions and molecular layers. These findings support the need for cell-type-resolved multi-omic studies to elucidate how APOE {varepsilon}4 confers AD risk.

neuroscience↗