07-Learning_to_Sort_Few-shot_Spike_Sorting_with_Adversarial_Representation_Learning
07-Learning_to_Sort_Few-shot_Spike_Sorting_with_Adversarial_Representation_Learning
Representation Learning
Tong Wu1∗ , Anikó Rátkai2 , Katalin Schlett2 , László Grand3 , and Zhi Yang1
Abstract— Spike sorting has long been used to obtain activi- optimization problem through iterative computations to infer
ties of single neurons from multi-unit recordings by extracting spike times and waveforms. In density-based clustering,
spikes from continuous data and assigning them to putative spikes are grouped into regions of higher densities than
neurons. A large body of spike sorting algorithms have been
developed that typically project spikes into a low-dimensional the rest in the feature space, requiring little or no prior
feature space and cluster them through iterative computations. knowledge about the data. In practice, the number of clusters
However, there is no reached consensus on the optimal feature is often sensitive to the parameter that determines the radius
space or the best way of segmenting spikes into clusters, which of neighborhood to estimate densities. Furthermore, calcu-
often leads to the requirement of human intervention. It is hence lating the distance between every pair of data points in each
desirable to effectively and efficiently utilize human knowledge
in spike sorting while keeping a minimum level of manual iteration could drastically slow down the processing. Model-
intervention. Furthermore, the iterative computations that are based clustering classifies spikes by fitting assumed model
commonly involved during clustering are inherently slow and structures (e.g., Gaussian mixture model) to the empirical
hinder real-time processing of large-scale recordings. In this data distribution. It also allows incorporating prior informa-
paper, we propose a novel few-shot spike sorting paradigm tion or assumptions into modeling. However, the learning
that employs a deep adversarial representation neural network
to learn from a handful of annotated spikes and robustly and inference of such probabilistic models often incur high
classify unseen spikes sharing similar properties to the labeled computational costs.
ones. Once trained, the deep neural network can implement In addition to the increasing demand for computational
a parametric function that encodes analytically the categorical power, one important commonality of recent spike sorting
distribution of spike clusters, which can be significantly accel- pipelines is the leverage of human knowledge to improve
erated by GPUs and support processing hundreds of thousands
of recording channels in real time. The paradigm also includes the sorting performance. Human supervision is mainly ne-
a clustering routine termed DidacticSort to aid users for cessitated due to the lack of ground truth information and
labeling spikes that will be used to train the deep neural that even well designed spike sorting pipelines cannot ex-
network. We have validated the performance of the proposed haustively cover all possible situations. For example, in
paradigm with both synthetic and in vitro datasets. [3], an interactive clustering is designed to allow users to
I. I NTRODUCTION merge or split clusters for model re-fitting. In general, human
supervision is used as part of the post-processing in spike
Understanding the coordinated activity underlying brain sorting pipelines for correcting the erroneous or suboptimal
computations requires large-scale, simultaneous electrophys- decisions made by the automated heuristic routines. There
iological recordings from distributed neuronal structures at a are limitations of this “cluster-then-refine” arrangement: 1)
cellular-level resolution. A key step in interpreting the multi- It requires a suitable feature space for visualizing and
unit neural activities is spike sorting, the process of detecting manipulating spikes, which is difficult to design; 2) The
spiking events from continuously sampled extracellular volt- human supervision can only happen after the collection and
ages and assigning the events to their originating neurons. automated clustering of a large amount of spikes, making
Recent spike sorting pipelines are mainly based on three it less suitable for online decoding experiments that require
techniques (often a mixture of them): template matching [1], minimum processing delay.
[2], [3], density-based clustering [2], [4], [5], and model- In this work, we propose the design of a few-shot spike
based clustering [6], [3]. Template matching assumes that sorting (FSSS) model that can learn to sort from a small
extracellularly recorded signals can be decomposed into a number of labeled spikes, thereby allowing the model im-
weighted sum of spike templates plus noise. Identifying itating the way human operators sort spikes and avoiding
and clustering spikes usually requires solving a customized problematic clustering decisions that might be made by auto-
1 T. Wu (corresponding author) and Z. Yang are with the Department of mated routines. This few-shot learning capability is achieved
Biomedical Engineering, University of Minnesota, Minneapolis, MN, 55455, primarily through an adversarial representation learning pro-
USA. Emails: {wuxx1521, yang5029}@umn.edu cess inspired by the semi-supervised learning theory from
2 A. Rátkai and K. Schlett are with the Neuronal Cell Biology Research
machine learning community [7], [8]. The proposed model
Group, Department of Physiology and Neurobiology, Eotvos University,
Budapest, Hungary. is built upon a deep neural network with no recurrent struc-
3 L. Grand is with the Faculty of Information Technology and Bion- tures, therefore can be significantly accelerated by dedicated
ics, Pázmány Péter Catholic University, Budapest, Hungary; Neurology hardwares such as GPUs. In addition to FSSS, we design
and Neurosurgery Department, Johns Hopkins University, Baltimore, MD,
21205, USA; APPERCELL Biotech Ltd., Budapest, Hungary. Email: a lightweight clustering routine termed DidacticSort to
[email protected] aid users in sorting spikes semi-manually.
714
Authorized licensed use limited to: Universita degli Studi di Bologna. Downloaded on December 24,2024 at 10:05:58 UTC from IEEE Xplore. Restrictions apply.
TABLE I Cluster 1 (155) Cluster 2 (38) Cluster 3 (35) Cluster 4 (13)
500 500 500
S PIKE SORTING PERFORMANCE ON C D I F F I C U L T 1. 500
0
0 0 0
−500
−500
50 spikes 100 spikes 200 spikes −1000
−500
−1000
−500
250
0 0
with an unlabeled mini-batch to update the encoder q(y, z|x) −500 −250
0 0
−500
and the decoder by minimizing the reconstruction error −1000 −500 −500
−1000
−1000 −1000
samples generated by the encoder (generator G). The event Cluster 17 (2) Cluster 18 (1)
1000
probabilities of Cat(y) are determined by the proportions of 500
250
0
the spike counts of the selected clusters in DidacticSort. 0
715
Authorized licensed use limited to: Universita degli Studi di Bologna. Downloaded on December 24,2024 at 10:05:58 UTC from IEEE Xplore. Restrictions apply.
1000 1000 600
500
500
500
0 400
0 0 0
−500 −500
−500
−1000 200
−1000 −1000 −1000
0 20 40 0 20 40 0 20 40 0 20 40
1000
0
1000 500
500 500
250 −200
µV
0 0
0 0
−500
−500
−250
−400
−1000
−1000
−500
−1000 −600
0 20 40 0 20 40 0 20 40 0 20 40
(a) (b)
Fig. 2. (a) Ten sorted clusters on all the unlabeled spikes processed by FSSS. The vertical axis of each sub-figure is in µV. A few clusters contain several
outliers that are not labeled by DidacticSort. (b) Spike templates of the ten clusters.
716
Authorized licensed use limited to: Universita degli Studi di Bologna. Downloaded on December 24,2024 at 10:05:58 UTC from IEEE Xplore. Restrictions apply.