Flow-Based Density Ratio Estimation for Intractable Distributions with Applications in Genomics
Abstract
Estimating density ratios between pairs of intractable data distributions is a core problem in probabilistic modeling, enabling principled comparisons of sample likelihoods under different data-generating processes across conditions. While exact-likelihood models such as normalizing flows offer a promising approach to density ratio estimation, naive evaluations are computationally expensive and prone to discretization errors because they require simulating each distribution's likelihood independently. In this work, we leverage condition-aware flow matching to derive a single dynamical formulation for tracking density ratios along generative trajectories. We demonstrate competitive performance on simulated benchmarks for closed-form ratio estimation, and show that our method supports versatile tasks in single-cell genomics data analysis, where likelihood-based comparisons of cellular states across experimental conditions enable treatment effect estimation and batch correction evaluation.
Lay Summary
Comparing how likely a data point is under two different probability distributions is a deceptively simple question with expensive answers. Standard approaches estimate each distribution separately using continuous normalizing flows and divide, compounding numerical errors and doubling computation time. Our model, scRatio, sidesteps this by deriving a differential equation that tracks the ratio directly along a single flow matching trajectory, turning two costly simulations into one. The result is a simultaneous gain in both accuracy and efficiency over the naive approach, with strong performance across synthetic benchmarks of varying dimensionality. The payoff extends well beyond benchmarks. Applied to single-cell genomics, where each observation captures a cell's gene activity under a specific biological condition, scRatio offers a principled lens for a wide range of analyses: detecting which cells respond to a treatment, spotting residual batch effects after correction, uncovering synergistic drug interactions, and profiling how individual patients differ in their responses.