Search bioRxiv⌕ Search

Biology subjects

Pachitariu, M.

Publications and source records attributed to Pachitariu, M..

32 records · Page 2Linked to original sources

Solving the spike sorting problem with Kilosort

Spike sorting is the computational process of extracting the firing times of single neurons from recordings of local electrical fields. This is an important but hard problem in neuroscience, complicated by the non-stationarity of the recordings and the dense overlap in electrical fields between nearby neurons. To solve the spike sorting problem, we have continuously developed over the past eight years a framework known as Kilosort. This paper describes the various algorithmic steps introduced in different versions of Kilosort. We also report the development of Kilosort4, a new version with substantially improved performance due to new clustering algorithms inspired by graph-based approaches. To test the performance of Kilosort, we developed a realistic simulation framework which uses densely sampled electrical fields from real experiments to generate non-stationary spike waveforms and realistic noise. We find that nearly all versions of Kilosort outperform other algorithms on a variety of simulated conditions, and Kilosort4 performs best in all cases, correctly identifying even neurons with low amplitudes and small spatial extents in high drift conditions.

neuroscience↗

Facemap: a framework for modeling neural activity based on orofacial tracking

Recent studies in mice have shown that orofacial behaviors drive a large fraction of neural activity across the brain. To understand the nature and function of these signals, we need better computational models to characterize the behaviors and relate them to neural activity. Here we developed Facemap, a framework consisting of a keypoint tracking algorithm and a deep neural network encoder for predicting neural activity. We used the Facemap keypoints as input for the deep neural network to predict the activity of [~]50,000 simultaneously-recorded neurons and in visual cortex we doubled the amount of explained variance compared to previous methods. Our keypoint tracking algorithm was more accurate than existing pose estimation tools, while the inference speed was several times faster, making it a powerful tool for closed-loop behavioral experiments. The Facemap tracker was easy to adapt to data from new labs, requiring as few as 10 annotated frames for near-optimal performance. We used Facemap to find that the neuronal activity clusters which were highly driven by behaviors were more spatially spread-out across cortex. We also found that the deep keypoint features inferred by the model had time-asymmetrical state dynamics that were not apparent in the raw keypoint data. In summary, Facemap provides a stepping stone towards understanding the function of the brainwide neural signals and their relation to behavior.

neuroscience↗

Cellpose 2.0: how to train your own model

Generalist models for cellular segmentation, like Cellpose, provide good out-of-the-box results for many types of images. However, such models do not allow users to adapt the segmentation style to their specific needs and may perform sub-optimally for test images that are very different from the training images. Here we introduce Cellpose 2.0, a new package which includes an ensemble of diverse pretrained models as well as a human-in-the-loop pipeline for quickly prototyping new specialist models. We show that specialist models pretrained on the Cellpose dataset can achieve state-of-the-art segmentation on new image categories with very little user-provided training data. Models trained on 500-1000 segmented regions-of-interest (ROIs) performed nearly as well as models trained on entire datasets with up to 200,000 ROIs. A human-in-the-loop approach further reduced the required user annotations to 100-200 ROIs, while maintaining state-of-the-art segmentation performance. This approach enables a new generation of specialist segmentation models that can be trained on new image types with only 1-2 hours of user effort. We provide software tools including an annotation GUI, a model zoo and a human-in-the-loop pipeline to facilitate the adoption of Cellpose 2.0.

bioinformatics↗

Structured random receptive fields enable informative sensory encodings

Brains must represent the outside world so that animals survive and thrive. In early sensory systems, neural populations have diverse receptive fields structured to detect important features in inputs, yet significant variability has been ignored in classical models of sensory neurons. We model neuronal receptive fields as random, variable samples from parameterized distributions and demonstrate this model in two sensory modalities using data from insect mechanosensors and mammalian primary visual cortex. Our approach leads to a significant theoretical connection between the foundational concepts of receptive fields and random features, a leading theory for understanding artificial neural networks. The modeled neurons perform a randomized wavelet transform on inputs, which removes high frequency noise and boosts the signal. Further, these random feature neurons enable learning from fewer training samples and with smaller networks in artificial tasks. This structured random model of receptive fields provides a unifying, mathematically tractable framework to understand sensory encodings across both spatial and temporal domains.

neuroscience↗

Toroidal topology of population activity in grid cells

The medial entorhinal cortex (MEC) is part of a neural system for mapping a subjects position within a physical environment1,2. Grid cells, a key component of this system, fire in a characteristic hexagonal pattern of locations3, and are organized in modules4,5 which collectively form a population code for the animals allocentric position1,6-8. The invariance of the correlation structure of this population code across environments9,10 and behavioural states11,12, independently of specific sensory inputs, has pointed to intrinsic, recurrently connected continuous attractor networks (CANs) as a possible substrate of the grid pattern1,2,13-16. However, whether grid cell networks show continuous attractor dynamics, and how they interface with inputs from the environment, has remained elusive due to the small samples of cells obtained to date. Here we show, with simultaneous recordings from many hundreds of grid cells, and subsequent topological data analysis, that the joint activity of grid cells from an individual module resides on a toroidal manifold, as expected in a two-dimensional CAN. Positions on the torus correspond to the moving animals position in the environment. Individual cells are preferentially active at singular positions on the torus. Their positions are maintained, with minimal distortion, between environments and from wakefulness to sleep, as predicted by CAN models for grid cells but not by alternative feed-forward models where grid patterns are created from external inputs by Hebbian plasticity17-22. This demonstration of network dynamics on a toroidal manifold provides the first population-level visualization of CAN dynamics in grid cells.

neuroscience↗

Neuropixels 2.0: A miniaturized high-density probe for stable, long-term brain recordings

To study the dynamics of neural processing across timescales, we require the ability to follow the spiking of thousands of individually separable neurons over weeks and months, during unrestrained behavior. To address this need, we introduce the Neuropixels 2.0 probe together with novel analysis algorithms. The new probe has over 5,000 sites and is miniaturized such that two probes plus a headstage, recording 768 sites at once, weigh just over 1 g, suitable for implanting chronically in small mammals. Recordings with high quality signals persisting for at least two months were reliably obtained in two species and six different labs. Improved site density and arrangement combined with new data processing methods enable automatic post-hoc stabilization of data despite brain movements during behavior and across days, allowing recording from the same neurons in the mouse visual cortex for over 2 months. Additionally, an optional configuration allows for recording from multiple sites per available channel, with a penalty to signal-to-noise ratio. These probes and algorithms enable stable recordings from >10,000 sites during free behavior in small animals such as mice.

neuroscience↗

Cellpose: a generalist algorithm for cellular segmentation

Many biological applications require the segmentation of cell bodies, membranes and nuclei from microscopy images. Deep learning has enabled great progress on this problem, but current methods are specialized for images that have large training datasets. Here we introduce a generalist, deep learning-based segmentation method called Cellpose, which can precisely segment cells from a wide range of image types and does not require model retraining or parameter adjustments. We trained Cellpose on a new dataset of highly-varied images of cells, containing over 70,000 segmented objects. We also demonstrate a 3D extension of Cellpose which reuses the 2D model and does not require 3D-labelled data. To support community contributions to the training data, we developed software for manual labelling and for curation of the automated results, with optional direct upload to our data repository. Periodically retraining the model on the community-contributed data will ensure that Cellpose improves constantly.

bioinformatics↗

High precision coding in mouse visual cortex

Single neurons in visual cortex provide unreliable measurements of visual features due to their high trial-to-trial variability. It is not known if this \"noise\" extends its effects over large neural populations to impair the global encoding of stimuli. We recorded simultaneously from [~]20,000 neurons in mouse primary visual cortex (V1) and found that the neural populations had discrimination thresholds of [~]0.34{degrees} in an orientation decoding task. These thresholds were nearly 100 times smaller than those reported behaviorally in mice. The discrepancy between neural and behavioral discrimination could not be explained by the types of stimuli we used, by behavioral states or by the sequential nature of perceptual learning tasks. Furthermore, higher-order visual areas lateral to V1 could be decoded equally well. These results imply that the limits of sensory perception in mice are not set by neural noise in sensory cortex, but by the limitations of downstream decoders.

neuroscience↗

Retinal outputs depend on behavioural state

The operating mode of the visual system depends on behavioural states such as arousal1,2. This dependence is seen both in primary visual cortex3-7 (V1) and in subcortical brain structures receiving direct retinal input4,8. Here we show that this effect arises as early as in the output of the retina. We first measured activity in a region that receives retinal projections9, the superficial superior colliculus (sSC), and found that this activity strongly depended on behavioural state. This modulation was not mediated by feedback inputs from V1 as it was immune to V1 inactivation. We then used Neuropixels probes10 to record activity in the optic tract, and we found some retinal axons whose activity significantly varied with arousal, even in darkness. To characterize these effects on a larger sample of retinal outputs, we imaged the activity of retinal boutons11,12 in sSC during behaviour using a calcium indicator. The activity of these boutons correlated with arousal as strongly as that of sSC neurons, and this correlation persisted also during darkness. These results reveal a novel property of retinal function in mice, which could be observed only during behaviour: retinal outputs are modulated by behavioural state before they reach the rest of the brain.

neuroscience↗

High-dimensional geometry of population responses in visual cortex

A neuronal population encodes information most efficiently when its activity is uncorrelated and high-dimensional, and most robustly when its activity is correlated and lower-dimensional. Here, we analyzed the correlation structure of natural image coding, in large visual cortical populations recorded from awake mice. Evoked population activity was high dimensional, with correlations obeying an unexpected power-law: the nth principal component variance scaled as 1/n. This was not inherited from the 1/f spectrum of natural images, because it persisted after stimulus whitening. We proved mathematically that the variance spectrum must decay at least this fast if a population code is smooth, i.e. if small changes in input cannot dominate population activity. The theory also predicts larger power-law exponents for lower-dimensional stimulus ensembles, which we validated experimentally. These results suggest that coding smoothness represents a fundamental constraint governing correlations in neural population codes.

neuroscience↗

Spontaneous behaviors drive multidimensional, brain-wide population activity

Cortical responses to sensory stimuli are highly variable, and sensory cortex exhibits intricate spontaneous activity even without external sensory input. Cortical variability and spontaneous activity have been variously proposed to represent random noise, recall of prior experience, or encoding of ongoing behavioral and cognitive variables. Here, by recording over 10,000 neurons in mouse visual cortex, we show that spontaneous activity reliably encodes a high-dimensional latent state, which is partially related to the mouses ongoing behavior and is represented not just in visual cortex but across the forebrain. Sensory inputs do not interrupt this ongoing signal, but add onto it a representation of visual stimuli in orthogonal dimensions. Thus, visual cortical population activity, despite its apparently noisy structure, reliably encodes an orthogonal fusion of sensory and multidimensional behavioral information.

neuroscience↗

Community-based benchmarking improves spike inference from two-photon calcium imaging data

In recent years, two-photon calcium imaging has become a standard tool to probe the function of neural circuits and to study computations in neuronal populations1, 2. However, the acquired signal is only an indirect measurement of neural activity due to the comparatively slow dynamics of fluorescent calcium indicators3. Different algorithms for estimating spike trains from noisy calcium measurements have been proposed in the past4-8, but it is an open question how far performance can be improved. Here, we report the results of the spikefinder challenge, launched to catalyze the development of new spike inference algorithms through crowd-sourcing. We present ten of the submitted algorithms which show improved performance compared to previously evaluated methods. Interestingly, the top-performing algorithms are based on a wide range of principles from deep neural networks to generative models, yet provide highly correlated estimates of the neural activity. The competition shows that benchmark challenges can drive algorithmic developments in neuroscience.

neuroscience↗

Robustness of spike deconvolution for calcium imaging of neural spiking

Calcium imaging is a powerful method to record the activity of neural populations, but inferring spike times from calcium signals is a challenging problem. We compared multiple approaches using multiple datasets with ground truth electrophysiology, and found that simple non-negative deconvolution (NND) outperformed all other algorithms. We introduce a novel benchmark applicable to recordings without electrophysiological ground truth, based on the correlation of responses to two stimulus repeats, and used this to show that unconstrained NND also outperformed the other algorithms when run on \"zoomed out\" datasets of ~10,000 cell recordings. Finally, we show that NND-based methods match the performance of a supervised method based on convolutional neural networks, while avoiding some of the biases of such methods, and at much faster running times. We therefore recommend that spikes be inferred from calcium traces using simple NND, due to its simplicity, efficiency and accuracy.

neuroscience↗

Visual motion computation in recurrent neural networks

Populations of neurons in primary visual cortex (V1) transform direct thalamic inputs into a cortical representation which acquires new spatio-temporal properties. One of these properties, motion selectivity, has not been strongly tied to putative neural mechanisms, and its origins remain poorly understood. Here we propose that motion selectivity is acquired through the recurrent mechanisms of a network of strongly connected neurons. We first show that a bank of V1 spatiotemporal receptive fields can be generated accurately by a network which receives only instantaneous inputs from the retina. The temporal structure of the receptive fields is generated by the long timescale dynamics associated with the high magnitude eigenvalues of the recurrent connectivity matrix. When these eigenvalues have complex parts, they generate receptive fields that are inseparable in time and space, such as those tuned to motion direction. We also show that the recurrent connectivity patterns can be learnt directly from the statistics of natural movies using a temporally-asymmetric Hebbian learning rule. Probed with drifting grating stimuli and moving bars, neurons in the model show patterns of responses analogous to those of direction-selective simple cells in primary visual cortex. These computations are enabled by a specific pattern of recurrent connections, that can be tested by combining connectome reconstructions with functional recordings.*\n\nAuthor summaryDynamic visual scenes provide our eyes with enormous quantities of visual information, particularly when the visual scene changes rapidly. Even at modest moving speeds, individual small objects quickly change their location causing single points in the scene to change their luminance equally fast. Furthermore, our own movements through the world add to the velocities of objects relative to our retinas, further increasing the speed at which visual inputs change. How can a biological system process efficiently such vast amounts of information, while keeping track of objects in the scene? Here we formulate and analyze a solution that is enabled by the temporal dynamics of networks of neurons.

neuroscience↗