English

ContextFlow: Context-Aware Flow Matching For Trajectory Inference From Spatial Omics Data

Machine Learning 2026-05-15 v3

Abstract

Inferring trajectories from longitudinal spatially-resolved omics data is fundamental to understanding the dynamics of structural and functional tissue changes in development, regeneration and repair, disease progression, and response to treatment. We propose ContextFlow, a novel context-aware flow matching framework that incorporates prior knowledge to guide the inference of structural tissue dynamics from spatially resolved omics data. Specifically, ContextFlow integrates local tissue organization and ligand-receptor communication patterns into a transition plausibility matrix that regularizes the optimal transport objective. By embedding these contextual constraints, ContextFlow generates trajectories that are not only statistically consistent but also biologically meaningful, making it a generalizable framework for modeling spatiotemporal dynamics from longitudinal, spatially resolved omics data. Evaluated on three datasets, ContextFlow consistently outperforms state-of-the-art flow matching methods across multiple quantitative and qualitative metrics of inference accuracy and biological coherence. Our code is available at: \href{https://github.com/santanurathod/ContextFlow}{ContextFlow}

Keywords

Cite

@article{arxiv.2510.02952,
  title  = {ContextFlow: Context-Aware Flow Matching For Trajectory Inference From Spatial Omics Data},
  author = {Santanu Subhash Rathod and Francesco Ceccarelli and Sean B. Holden and Pietro Liò and Xiao Zhang and Jovan Tanevski},
  journal= {arXiv preprint arXiv:2510.02952},
  year   = {2026}
}

Comments

42 pages, 21 figures, 30 tables

R2 v1 2026-07-01T06:15:10.708Z