Abstract
Neuroscience faces a growing need for scalable data analysis methods that reduce the dimensionality of population recordings yet retain key aspects of the computation or behaviour. To extract interpretable latent trajectories from neural data, it is critical to embrace the inherent topology of the features of interest: head direction evolves on a ring or torus, 3D body rotations on the special orthogonal group, and navigation is best described in the intrinsic coordinates of the environment. Accordingly, we recently proposed the manifold Gaussian process latent variable model (mGPLVM) to simultaneously infer latent representations on non-Euclidean manifolds and how neurons are tuned to these representations. This probabilistic method generalizes previous Euclidean models and allows principled selection between candidate latent topologies. While powerful, mGPLVM makes two unjustified approximations that limit its practical applicability to neural datasets. First, consecutive latent states are assumed independent a priori, whereas behaviour is continuous in time. Second, its Gaussian noise model is inappropriate for positive integer spike counts. Here, we extend mGPLVM by incorporating temporally continuous priors over latent states and flexible count-based noise models. This improves inference on synthetic data, avoiding negative spike count predictions and discontinuous jumps in latent trajectories. On real data, we also mitigate these pathologies while improving model fit compared to the original mGPLVM formulation. We provide an efficient implementation in python, relying on recent advances in approximate inference to e.g. fit 10,000 time bins of recording for 100 neurons in five minutes on a single GPU.
Introduction
In modern neuroscience, researchers often record from hundreds of neurons simultaneously. To interpret this high-dimensional "firehose" of data, dimensionality reduction is used to find "latent trajectories"—the underlying signals driving neural activity. Most standard tools, such as PCA or GPFA, assume these trajectories exist in Euclidean space (a flat, grid-like world). However, many neural representations are inherently non-Euclidean. For example, head direction exists on a ring ($S^1$), 3D body rotations on spherical groups ($SO(3)$), and navigation often follows the specific topology of an environment, such as a torus.
While the previously introduced manifold Gaussian process latent variable model (mGPLVM) addressed these non-flat shapes, it suffered from two significant limitations: it treated time points as independent (ignoring continuous movement) and used Gaussian noise models, which are ill-suited for discrete neural spikes.
Methodology
To address these limitations, the mGPLVM framework was extended in two critical ways:
1. Continuous Temporal Priors
Instead of assuming independent latent states at each time step, we introduced a Markovian prior defined on Lie groups. This is achieved by defining a random walk on the "tangent space" (a flat plane touching the manifold at a specific point) and then projecting that movement back onto the curved manifold. This ensures the inferred path is smooth and physically plausible, reflecting the continuous nature of animal behavior.
2. Count-Based Observation Models
Real neurons produce discrete spikes rather than continuous values. We replaced the standard Gaussian noise model with Poisson and Negative Binomial distributions. Using variational inference and Gauss-Hermite quadrature, we maintained mathematical tractability while allowing the model to handle the "bursty" or overdispersed nature of real neural data.
Results
Synthetic Validation
The model was first validated using simulated neural populations representing 1D (ring) and 2D (torus) head direction. As shown in Figure 1A and 1C, the continuous temporal prior significantly reduced the Root Mean Square Error (RMSE) compared to the original discontinuous model. By informing the model that time $t$ should be near time $t-1$, we prevented the "discontinuous jumps" that plagued earlier versions. Furthermore, the count-based models (Poisson) provided more accurate activity predictions than Gaussian models (Figure 1B).
Real-World Application: Mouse Thalamus
We applied the model to electrophysiology data from the mouse anterodorsal thalamic nucleus (ADn), a region known for head-direction cells. This dataset is notoriously overdispersed, making it an ideal test for the Negative Binomial noise model. The extended mGPLVM successfully uncovered the animal's head direction and the neurons' tuning curves in a completely unsupervised manner (Figure 1E-F). Notably, the model provides principled uncertainty quantification, identifying periods where it is less confident about the latent state, typically at the peaks of tuning curves.
Conclusion
The extended mGPLVM provides a robust, scalable tool for inferring non-Euclidean neural representations from large-scale recordings. By incorporating temporal continuity and appropriate noise models, it avoids the pathologies of previous Euclidean and discontinuous models. Leveraging modern approximate inference, the tool is highly efficient, capable of processing 10,000 time bins for 100 neurons in approximately five minutes on a single GPU. Future work will focus on automating manifold selection and incorporating more complex behavioral dynamics beyond simple random walks.
Summary updated