schematic
Figure 1: Dynamic Compression Flow Schematic. Dynamical data \( \mathbf{x}_t \) at \( \tau=1 \) with dynamics defined by \( \mathbf{v}_{\boldsymbol{\theta}} \) are mapped to a lower-dimensional compressed representation (\( \tau=0 \)) via a compressive/generative flow \( \mathbf{u}_{\boldsymbol{\phi}} \). Both \( \mathbf{u}_{\boldsymbol{\phi}} \) and \( \mathbf{v}_{\boldsymbol{\theta}} \) are trained via flow matching defined by an encoder/coupling \( \boldsymbol{\mu}_{\boldsymbol{\psi}} \).

The emergence of large-scale neural recording technologies has drastically changed our understanding of neural function, shifting systems neuroscience from a single unit perspective to a focus on neural populations and their collective dynamics. Fortunately, several lines of empirical evidence have shown that such seemingly complex and high-dimensional data can actually be described in terms of a much smaller number of “latent” variables (Gao et al., 2017; Trautmann et al., 2019; Vyas et al., 2020; Ebitz & Hayden, 2021). Not surprisingly, this observation has led to a proliferation of dimensionality reduction algorithms for neuroscience data.

These algorithms broadly fall into two major types: In the first, the primary goal is to construct a lower-dimensional representation of the original high-dimensional data while maximizing some measure of information retained. This “mapping” from data to latent space can be accomplished using classic linear (e.g.s, PCA, ICA, NMF, Mairal et al., 2009; Charles et al., 2011; Draelos et al., 2021), as well as non-linear approaches (e.g., Isomap, LLE, Tenenbaum et al., 2000; Roweis & Saul, 2000), visualization-based approaches (e.g., t-SNE, UMAP, PHATE, Van der Maaten & Hinton, 2008; McInnes et al., 2018; Moon et al., 2019), and even more modern approaches such as VAEs (Kingma & Welling, 2014; Rezende et al., 2014; Goffinet et al., 2021; Martinez & Williams, 2026), self-supervised learning (Azabou et al., 2024; Schneider et al., 2023), and the information bottleneck (Tishby et al., 2000). Regardless of the specific method, such models often ignore temporal structure, treating data as independent. Consequently, learned representations will often severely distort and scramble the original dynamics.

In the second class of models, nonlinear dynamical systems approaches attempt to capture temporal evolution directly, fitting flow fields to data (Charles et al., 2011; Kutz et al., 2016; Gao et al., 2016; Rajan et al., 2016; Linderman et al., 2017; Pandarinath et al., 2018; Kerg et al., 2019; Zhao & Park, 2020; Wiltschko et al., 2020; Nair et al., 2023; Busch et al., 2023; Driscoll et al., 2024; Weinreb et al., 2024). Despite their considerable success in identifying repeating dynamical motifs in data (Mante et al., 2013; Markowitz et al., 2023; Nair et al., 2023; Liu et al., 2024; Vinograd et al., 2024), such models still struggle to identify useful structure under (1) non-repeatability and (2) noise-dominant regimes, which are ubiquitous in neuroscience data. That is, when modeling data without the benefit of smoothing and trial-averaging, these methods can struggle to identify structure, since they are tailored to identify repeating dynamical motifs (Williams & Linderman, 2021). Likewise, most models assume that noise is small and/or follows simple forms, so that system evolution is governed by a well-defined velocity field. However, these assumptions can fail catastrophically when variance in the data is mostly due to unmeasured variables (Musall et al., 2019) or has heavy-tailed structure, resulting in latent dynamics that appear random rather than lawful (Draelos et al., 2021).

Recent breakthroughs in “simulation-free” flow training and the development of flow matching (Lipman et al., 2024; Albergo & Vanden-Eijnden, 2023; Albergo et al., 2025; Pooladian et al., 2023; Tong et al., 2024) from earlier diffusion-based models (DBMs, Song et al., 2021; Karras et al., 2022) have led to an explosion of work using latent flows (Polyak et al., 2024; Dao et al., 2023; Hu et al., 2024; Schusterbauer et al., 2024) and diffusions (Vahdat et al., 2021; Blattmann et al., 2023; Preechakul et al., 2022; Hudson et al., 2024). Yet despite their huge success as generative models, most of these approaches do not directly allow for dimensionality reduction, relying instead on a front-end encoder network to infer latent representations from data. Unfortunately, this approach can re-introduce the same identifiability issue mentioned above. Even though recent diffusion-based models for neural latent dynamics and spiking data do address low-dimensional latent structure (Wang et al., 2023; Kapoor et al., 2024), our focus here is instead on using flow matching to construct dynamics-preserving representations of data while also directly learning the velocity fields. Additionally, in standard diffusion formulations, the source distribution is typically fixed to be Gaussian, while flow matching can define transport between arbitrary source and target distributions, which may be helpful in understanding non-Gaussian neural activity distributions across time.

Here, we propose Dynamic Compression Flows (DCFs, Figure 1 ) as a means of inferring low-dimensional latent structure in a way that respects temporal dynamics in the data. Our contributions are as follows:

  • We develop a dual flow-matching approach, learning one generative/compressive flow field that maps the data to a low-dimensional latent space and another that captures temporal dynamics at each level of compression. Critically, the latent representations inferred by our model remain identifiable (up to a sign), making latent spaces reproducible across runs and thereby addressing a major limitation of previous approaches.
  • We achieve low-dimensional support for our latent distribution within the embedding space by training using nested dropout (Rippel et al., 2014), which ensures that our latent dimensions are ordered by construction while also allowing for controllable and soft dimensionality reduction.
  • We apply our proposed model extensively to both synthetic and benchmark neural and behavioral data and compare it against a variety of competing approaches, demonstrating both its effectiveness and superior performance in challenging, noise-dominated regimes.

Go to next section Model