When Does Flow Matching Help Deterministic Multimodal Prediction: A Spatial Transcriptomics Study
Abstract
Flow matching is increasingly used beyond open-ended generation, including prediction tasks whose outputs are effectively deterministic, yet it remains unclear why flow matching helps when diversity is not the objective. We study this question in histology-conditioned spatial transcriptomics (ST) prediction, a challenging, sparse, high-dimensional task where thousands of spatially correlated spot-level observations arise from a limited number of heterogeneous tissue slides, and direct regression with pathology foundation features is already competitive. Repeated sampling with different initial Gaussian noises under the same histology input produces nearly identical predictions, indicating that output diversity does not explain the benefit of flow matching in this setting. We instead identify intermediate flow states as time-indexed target-side signals: they retain target-related information while remaining mixed with source noise. Their benefit emerges when this information is selectively routed into histology representations while preserving slide-level condition alignment. Guided by this mechanism, we instantiate conditional flow matching with a simple gated self-attention architecture to model interactions between histology tokens and noisy ST states, improving spatial-correlation metrics over regression and flow-based baselines. We further probe this mechanism through component ablations, context analyses, inference-time routing interventions, and additional evaluations in spatial proteomics and with a Qwen-gated-attention backbone. Together, these experiments provide a mechanistic account of when intermediate flow states can serve as structured target-side supervision in deterministic histology-conditioned spatial molecular prediction.