FLUX: Geometry-Aware Longitudinal Flow Matching with Mixture of Experts
Abstract
Many biological systems evolve through continuous local dynamics while switching between latent regimes defined by learning, stimulus context, internal state, or developmental stage. These processes are often observed only as unpaired longitudinal snapshots: the same cells, neurons, or animals are not tracked as matched trajectories, even though population states are sampled across successive stages. This creates two coupled challenges. First, trajectories must respect curved low-dimensional manifolds embedded in high-dimensional biological measurements. Second, the model must identify when the transport mechanism itself changes. Here, we develop FLUX (Flow matching for Unpaired longitudinal data with miXture-of-experts), a longitudinal flow-matching framework that shares the velocity field among a few experts, so that the expert assignment partitions time into candidate stages. FLUX trains the experts and a Straight-Through Gumbel-Softmax router on paths between adjacent marginals, which a learned metric can bend toward the data manifold, and selects their number from held-out transport. FLUX recovers the parameter switch of a regime-switching Lorenz system and separates pluripotent from differentiated populations in embryoid bodies. In widefield calcium imaging of mice learning a visual discrimination task, it separates early and intermediate from late training, a boundary that persists when each animal is fitted separately. These results suggest that transitions in population dynamics may be recoverable from snapshots alone, without tracking individuals or labeling their stages.