Scalable Bayesian GPFA with automatic relevance determination and discrete noise models

Kristopher T Jensen, Ta-Chu Kao, Jasmine Talia Stone, Guillaume HennequinNeurIPS 2021

In computational neuroscience, latent variable models are the workhorses used to make sense of the chaotic firing patterns of thousands of neurons. By finding a low-dimensional "latent" space that explains the population's activity, researchers can visualize how the brain prepares a movement or makes a decision.

However, the gold standard tool—Gaussian Process Factor Analysis (GPFA)—has long suffered from a "scalability wall." It struggles with long recordings and often assumes neural noise is Gaussian, which is inaccurate for discrete spike counts. In this paper, Jensen et al. introduce bGPFA, a fully Bayesian, highly scalable framework that finally allows researchers to analyze hours of continuous neural data without chopping it into artificial "trials."

The Scalability Wall in Neural Modeling

Traditional GPFA has a computational complexity of $O(T^3)$, where $T$ is the number of time bins. This means if you double your recording length, the processing time increases eightfold. Consequently, researchers usually have to break data into short "trials" (e.g., 1-second snippets), which ignores long-term trends like fatigue, learning, or fluctuating engagement.

Furthermore, standard GPFA requires computationally expensive cross-validation to determine how many latent dimensions (e.g., 5 vs. 50) are needed to explain the data. Finally, neurons fire in discrete spikes, but GPFA typically assumes Gaussian noise, leading to potentially inaccurate models of neural dynamics.

Methods: The bGPFA Framework

The authors bridge the gap between flexible Bayesian methods and scalable engineering by introducing several key innovations:

  1. Whitened Variational Inference: They use a "whitened" parameterization of the Gaussian Process, which stabilizes learning and ensures the inferred trajectories are smooth.
  2. Toeplitz Acceleration: By exploiting the mathematical structure of the covariance matrices (Toeplitz structures), they reduce the computational complexity from $O(T^3)$ to $O(T \log T)$ and memory from $O(T^2)$ to $O(T)$. This allows them to process millions of data points on a standard GPU.
  3. Automatic Relevance Determination (ARD): Instead of guessing the number of dimensions, bGPFA starts with a high number and uses a prior that "shrinks" unnecessary dimensions to zero. The model effectively "prunes" itself during training.
  4. Discrete Noise Models: The framework supports Poisson and Negative Binomial distributions, which are far better suited for modeling the discrete, often "overdispersed" nature of neural spiking.
Generative model and inference in bGPFA

Datasets

The researchers validated bGPFA on two primary types of data:

  • Synthetic Data: Used to prove that ARD can correctly recover the "ground truth" number of dimensions and that the model can handle overdispersed noise.
  • Primate Electrophysiology: A massive dataset consisting of 30 minutes of continuous recording from a rhesus macaque performing a self-paced reaching task. This included ~14 million data points from 130 neurons in the primary motor cortex (M1) and 70 neurons in the somatosensory cortex (S1).

Key Insights and Results

Validation on Synthetic Data

Using synthetic datasets, the authors demonstrated that bGPFA's ARD successfully identifies the correct latent dimensionality without manual tuning. Furthermore, the model accurately recovers ground-truth latent trajectories and length scales, outperforming standard GPFA and Factor Analysis (FA).

Performance of bGPFA on synthetic data, demonstrating ARD and trajectory recovery

Discoveries in Continuous Primate Recordings

Applying bGPFA to the 30-minute continuous primate recording yielded several neuroscientific insights:

  • Scalability & Dimensionality: bGPFA successfully processed the entire continuous recording—a mathematical impossibility for standard GPFA. ARD automatically identified 16 relevant dimensions for M1 and 12 for S1.
  • Preparation is Universal: Even when the monkey wasn't forced to wait for a "go" cue (self-paced reaching), the M1 latent state still migrated toward a specific "preparatory" region before movement began.
  • The "Distance" to Readiness: The distance between the neural state at the moment a target appears and the final "preparatory state" is highly predictive of reaction time (Pearson $\rho = 0.45$). If the brain is already "closer" to the right state, the monkey moves faster.
  • M1 Leads, S1 Follows: By shifting M1 data forward by 100ms, the model fit improved significantly. This confirms that M1 encodes future motor plans, while S1 reflects current sensory feedback.
  • Slow-Wave Engagement: bGPFA discovered latent processes evolving over seconds rather than milliseconds. One specific slow process was strongly correlated with reaction time across the entire session, likely representing the monkey's fluctuating task engagement or motivation.

Limitations and Future Work

While bGPFA represents a massive leap forward, the authors note a few areas for future improvement. The model currently assumes a linear relationship between the latent space and neural firing rates; moving to a non-linear Gaussian Process Latent Variable Model (GPLVM) could capture even more complexity. Additionally, the data is currently binned (e.g., 25ms bins). Moving to a "point process" model would allow for millisecond-precision analysis. Finally, future versions could automatically infer the optimal temporal delays between different brain regions, rather than relying on manual shifts.

Check out the paper: Scalable Bayesian GPFA with automatic relevance determination and discrete noise models (NeurIPS 2021).

Summary updated

BibTeX
@inproceedings{jensen2021scalable,
  author = {Kristopher T Jensen and Ta-Chu Kao and Jasmine Talia Stone and Guillaume Hennequin},
  title = {{Scalable Bayesian GPFA with automatic relevance determination and discrete noise models}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=_IvXbsw3Zvu},
}
Figure