Spike distance function as a learning objective for spike prediction

A neural network can be trained to predict the distance to a spike, and this representation can be used to effectively predict spike times.

Banner image

The auto-regressive prediction of a spike train using a spike distance model and Poisson-based models.

Spike distance function

A spike distance function maps each point in time to a scalar representing the temporal distance to the nearest spike. This is either the time elapsed since the last spike or the time remaining until the next spike, whichever is less. This is an implicit representation of a set of spikes using contours.

The spike distance function in milliseconds over the interval [0, 128] for the spike times [22, 67, 72, 95].

Training and inference

Neural networks can be trained to approximate spike distance functions. The lost signal can be a distance such as Euclidean distance between the predicted and true spike distance functions. Spikes can be inferred from outputs of trained models. Intuitively, this is done by placing spikes at the troughs of the outputted array.

Input and output for a model that tries to approximate a spike distance function.

Evaluation

The task is to produce spike trains, so the evaluation metrics should measure the quality of the spike trains produced. High quality should correspond to a spike train that is close to the ground truth spike train. To measure this fidelity with respect to the ground truth, we use spike train similarity and difference metrics: Schreiber similarity and Van Rossum distance.

Schreiber similarity can be thought of as the cosine similarity between the smoothed spike trains. Van Rossum distance can be thought of as the Euclidean distance between the smoothed spike trains. Both have a smoothing parameter.

Results

A neural network was trained multiple times: using the spike distance objective and using Poisson objectives with different summation interval lengths. The spike distance approach outperforms the Poisson approach across a wide range of smoothing parameters for the two evaluation metrics used. Spike prediction for the Poisson models utilized sampling to pick a spike count, then that number of spikes were tiled across the output interval. Other inference approaches were considered too, and for those, please check out the paper.

Schreiber similarity (left) and Van Rossum distance (right) between the ground truth spike trains and the model outputs, reported as interquartile mean over 60 chicken cells. Both metrics are evaluated for a range of their smoothing parameters, 𝜏 and σ, respectively. 95% confidence intervals are included for the Poisson-80 ms and spike distance models. The zero-spike spike train is included for comparison and highlights how the metrics lose their ability to distinguish spike trains at low smoothing levels.

Video Presentation

Abstract

Approaches to predicting neuronal spike responses commonly use a Poisson learning objective. This objective quantizes responses into spike counts within a fixed summation interval, typically on the order of 10 to 100 milliseconds in duration; however, neuronal responses are often time accurate down to a few milliseconds, and at these timescales, Poisson models typically perform poorly. We demonstrate this limitation, and present a new learning objective to overcome it. We propose the concept of a spike distance function that maps points in time to the temporal distance to the nearest spike. We show that neural networks can be trained to approximate spike distance functions, and we present an efficient algorithm for inferring spike trains from the outputs of these models. Using recordings of chicken and frog retinal ganglion cells responding to visual stimuli, we compare the performance of our approach to Poisson models trained with various summation intervals. We show that our approach outperforms the use of Poisson models at spike train inference.

BibTeX

@misc{doran2023distance,
      title={Spike distance function as a learning objective for spike prediction}, 
      author={Kevin Doran and Marvin Seifert and Carola A. M. Yovanovich and Tom Baden},
      year={2023},
      eprint={2312.01966},
      archivePrefix={arXiv},
      primaryClass={q-bio.NC}
}