# OneFlowSBI: One Model, Many Queries for Simulation-Based Inference

DevFeed: [OneFlowSBI: One Model, Many Queries for Simulation-Based Inference](<https://devfeed.tech/articles/oneflowsbi-one-model-many-queries-for-simulation-based-inference-103738.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2601.22951>)

Author: Mayank Nautiyal, Li Ju, Melker Ernfors, Klara Hagland, Ville Holma, Maximilian Werk\\"o S\\"oderholm, Andreas Hellander, Prashant Singh

Published: 2026-10-28T04:00:00Z

Content type: article

Language: en

Sources: [arXiv: Machine Learning](<https://devfeed.tech/sources/arxiv-machine-learning.md>)

Topics: [Neural Network](<https://devfeed.tech/topics/neural-network.md>), [Transformer](<https://devfeed.tech/topics/transformer.md>), [Deep neural networks](<https://devfeed.tech/topics/deep-neural-networks.md>)

Tags: [attention](<https://devfeed.tech/tags/attention.md>), [conditional](<https://devfeed.tech/tags/conditional.md>), [cs-lg](<https://devfeed.tech/tags/cs-lg.md>), [denoising](<https://devfeed.tech/tags/denoising.md>), [distribution](<https://devfeed.tech/tags/distribution.md>), [faster](<https://devfeed.tech/tags/faster.md>), [flow-matching](<https://devfeed.tech/tags/flow-matching.md>), [image](<https://devfeed.tech/tags/image.md>), [inference](<https://devfeed.tech/tags/inference.md>), [mask](<https://devfeed.tech/tags/mask.md>), [network](<https://devfeed.tech/tags/network.md>), [sbi](<https://devfeed.tech/tags/sbi.md>), [scale](<https://devfeed.tech/tags/scale.md>), [simulation](<https://devfeed.tech/tags/simulation.md>), [stat-ml](<https://devfeed.tech/tags/stat-ml.md>), [tasks](<https://devfeed.tech/tags/tasks.md>), [transformer](<https://devfeed.tech/tags/transformer.md>), [variables](<https://devfeed.tech/tags/variables.md>), [water](<https://devfeed.tech/tags/water.md>), [windows](<https://devfeed.tech/tags/windows.md>)

## AI overview

OneFlowSBI uses a single masked flow-matching network trained on the joint distribution of parameters and observations to support posterior, conditional, marginal, and likelihood queries. For each coordinate, a ternary mask indicates whether it is observed, generated, or absent; changing the mask selects the query, without retraining. Because the mask is an input rather than a token per variable, the backbone can follow the data structure without the quadratic attention cost described for transformer generalists. The excerpt reports lower posterior error on high-dimensional image-denoising and shallow-water tasks, faster sampling than a transformer-based generalist, and competitive performance on most of ten SBIBM tasks at the largest simulation budget. Results are limited to the listed benchmarks and comparisons.

## Source excerpt

arXiv:2601.22951v2 Announce Type: replace-cross Abstract: Simulation-based inference (SBI) methods typically amortize a single query, usually the posterior, so each further conditional or marginal needs its own model. Existing generalists amortize many queries in one transformer with one token per variable, so their attention cost grows quadratically with the number of variables. We introduce OneFlowSBI, a masked flow matching framework that trains one network on the joint distribution of parameters and observations. A ternary mask marks each coordinate as observed, generated or absent, so any conditional or marginal is sampled by changing the mask. The mask is an input, rather than a tokenization, so the backbone can follow the data's structure and scale to many variables. On high-dimensional image denoising and shallow water inference, OneFlowSBI achieves lower posterior error than the baselines, samples far faster than a transformer-based generalist, and handles missing regions and partial observation windows without retraining. On most of the ten SBIBM tasks at the largest simulation budget, it matches or exceeds neural posterior estimation and is comparable to transformer-based generalists, while also providing the likelihood and marginals.