Skip to main content
QUICK REVIEW

[Paper Review] STNDT: Modeling Neural Population Activity with a Spatiotemporal Transformer

Trung Le, Eli Shlizerman|arXiv (Cornell University)|Jun 9, 2022
Neural dynamics and brain functionNeuroscience5 citations
TL;DR

STNDT introduces a spatiotemporal Transformer architecture that extends Neural Data Transformers by modeling both temporal dynamics and spatial covariation among individual neurons in neural populations. By incorporating spatial self-attention and a contrastive fine-tuning loss, STNDT achieves state-of-the-art performance in predicting unseen neural activity across four diverse neural datasets, while revealing interpretable, influential neuron subsets through its spatial attention mechanism.

ABSTRACT

Modeling neural population dynamics underlying noisy single-trial spiking activities is essential for relating neural observation and behavior. A recent non-recurrent method - Neural Data Transformers (NDT) - has shown great success in capturing neural dynamics with low inference latency without an explicit dynamical model. However, NDT focuses on modeling the temporal evolution of the population activity while neglecting the rich covariation between individual neurons. In this paper we introduce SpatioTemporal Neural Data Transformer (STNDT), an NDT-based architecture that explicitly models responses of individual neurons in the population across time and space to uncover their underlying firing rates. In addition, we propose a contrastive learning loss that works in accordance with mask modeling objective to further improve the predictive performance. We show that our model achieves state-of-the-art performance on ensemble level in estimating neural activities across four neural datasets, demonstrating its capability to capture autonomous and non-autonomous dynamics spanning different cortical regions while being completely agnostic to the specific behaviors at hand. Furthermore, STNDT spatial attention mechanism reveals consistently important subsets of neurons that play a vital role in driving the response of the entire population, providing interpretability and key insights into how the population of neurons performs computation.

Motivation & Objective

  • To model neural population dynamics that capture both temporal evolution and spatial covariation among neurons in single-trial spiking activity.
  • To improve predictive performance on unseen neurons and timesteps by explicitly modeling inter-neuronal correlations alongside temporal dynamics.
  • To enhance model robustness against noise through a novel contrastive fine-tuning loss complementary to the mask modeling objective.
  • To provide interpretability by identifying key neuron subsets that drive population-level responses via spatial attention mechanisms.
  • To evaluate performance across diverse neural datasets spanning autonomous and non-autonomous dynamics, independent of specific behavioral task structures.

Proposed method

  • STNDT employs a dual-attention mechanism: separate multi-head self-attention modules for spatial (neuron-to-neuron) and temporal (time-step-to-time-step) dependencies.
  • The model processes neural spiking activity as a matrix $X \in \mathbb{N}^{N \times T}$, where $N$ is the number of neurons and $T$ is the number of timepoints.
  • Spatial attention is applied to the temporal attention feature matrix, enabling neurons to attend to each other while also attending across time.
  • A contrastive learning loss is introduced to improve robustness by encouraging consistent predictions under data augmentations such as noise and masking.
  • The model is pre-trained with a masked modeling objective and fine-tuned with contrastive learning to enhance generalization and predictive accuracy.
  • Ensemble models are used to improve performance, leveraging predictions across multiple model instances.

Experimental results

Research questions

  • RQ1Can a Transformer-based architecture that models both spatial and temporal dependencies in neural population activity outperform existing methods in predicting single-trial neural dynamics?
  • RQ2Does incorporating spatial attention improve the identification of functionally important neuron subsets that drive population responses?
  • RQ3To what extent does contrastive fine-tuning enhance model robustness and predictive performance under noisy or augmented data?
  • RQ4Can STNDT generalize across diverse neural datasets with varying dynamics (autonomous vs. non-autonomous) and behavioral task structures?
  • RQ5How do spatial attention weights in STNDT reveal interpretable, consistent patterns of neural population computation?

Key findings

  • STNDT achieved state-of-the-art performance on the ensemble level across four neural datasets in the Neural Latents Benchmark suite, outperforming prior methods in predicting activity of held-out neurons and timesteps.
  • On the MC_Maze dataset, the ensemble STNDT with contrastive loss achieved a co-bps score of 0.3862, a 0.0189 improvement over the model without contrastive loss.
  • The contrastive loss improved performance on both single and ensemble levels, with the most significant gains observed on MC_Maze and DMFC_RSG datasets.
  • Spatial attention in STNDT consistently identified influential neuron subsets that play a critical role in driving population responses, offering interpretability into neural computation.
  • The model maintained strong decoding performance from rate predictions, demonstrating its utility in brain-computer interface applications.
  • The absence of performance gains from spatial attention alone in small-scale or unstructured datasets (e.g., Area2_Bump, MC_RTT) suggests that sufficient data scale and structured behavior are necessary for effective spatial feature learning.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.