Scalable Simulation-Based Model Inference with Test-Time Complexity Control

Manuel Gloeckler, J.p. Manzano-Patrón, Stamatios Sotiropoulos, Cornelius Schröder, Jakob H. Macke

TL;DR

The authors introduce PRISM (PRIor-flexible Simulation-based Model inference), a deep learning framework that simultaneously infers discrete model structures and their continuous parameters directly from simulated data. Crucially, PRISM allows researchers to dynamically control model complexity (parsimony) at test time using a tunable hyperparameter, completely eliminating the need to retrain the network when adjusting modeling assumptions.

What Problem Does This Paper Address?

In many scientific fields, the primary bottleneck is no longer running a simulator, but deciding which simulator or model structure best explains the observed data. For instance, in computational neuroscience or epidemiology, researchers must choose from large families of plausible mechanistic models, each representing different hypotheses.

Standard Bayesian model selection relies on calculating marginal likelihoods (evidence), which is computationally intractable for large, combinatorially explosive model spaces. While recent Simulation-Based Inference (SBI) methods amortize these costs by training neural networks, they typically hard-code a fixed model prior or complexity penalty during training. This forces practitioners to commit to a specific parsimony assumption before seeing the actual data. If they want to explore simpler or more complex explanations later, they have to retrain the entire pipeline from scratch.

Methods

PRISM addresses these challenges using a novel transformer-based encoder-decoder architecture featuring two parallel decoding streams:

  1. Discrete Model Decoder: An autoregressive (AR) multivariate Bernoulli decoder that predicts the presence or absence of discrete model components. Using an AR approach allows the network to capture strong correlations between components.
  2. Continuous Parameter Decoder: A diffusion-based decoder (utilizing the EDM noise parameterization) that infers the continuous parameters associated with the active model components.
Figure 1. PRISM overview. (a) During training, we sample from a model family M with a hierarchical prior p(M | λ), where λ controls a chosen notion of model complexity, and we jointly approximate the model posterior and the conditional pa- rameter posterior p(M, θ | x, λ) by optimizing the loss L = L(M, p(M | x, λ)) + L(θM, p(θ | Mλ, x)), for model eval- uations x ∼pM(x | θM). (b) At inference time, we set λ to tune parsimony, and select or explore models in the combinatorial space, infer model parameters, and deploy the resulting posteriors in downstream analyses.

Key Innovations:

  • Test-Time Complexity Control: The model complexity hyperparameter ($\lambda$) is injected directly into the decoders using adaptive layer normalization (AdaLN). This allows users to sweep from highly sparse models ($\lambda \to 0$) to highly complex models ($\lambda \to 1$) instantly during inference.
  • Dynamic Parameter Masking: To handle variable-dimensional parameter spaces (since different model structures have different numbers of parameters), PRISM uses an $M$-dependent block attention mask. Inactive components have their parameter tokens masked out, effectively marginalizing unused parameters within a single, shared network.
Figure 3. Architecture overview. PRISM is based on two parallel transformers to infer (i) the model posterior from tokenized model masks and (ii) the parameter posterior via a diffusion v-prediction network (t denotes diffusion time). Observations x enter through cross-attention; (λ, t) are injected via adaptive layer normalization (skip connections omitted).

Datasets

The framework was evaluated on two primary tasks:

  1. Synthetic Noisy Symbolic Regression: A toy benchmark designed to test combinatorial scaling. The basis library was scaled up to $K=100$ components, yielding model spaces containing up to $O(10^{30})$ distinct structural configurations.
  2. Diffusion MRI (dMRI) Biophysical Modeling: A real-world scientific application aimed at reconstructing brain white-matter fiber orientations. The authors tested multi-compartment models including Ball-and-Sticks (B3S) and an extended Ball-Stick-Zeppelin-Tensor (BSZT) space. Training was performed entirely on simulations, while evaluation used both synthetic data and real-world neuroimaging data from the UK Biobank (UKB) and the Human Connectome Project (HCP).

Key Insights and Ideas

  • Post-Hoc Parsimony Tuning: Much like adjusting a regularization strength (e.g., LASSO penalty) after seeing a regression plot, PRISM allows scientists to interactively explore the trade-off between model simplicity and goodness-of-fit at test time.
  • Extrapolation via Amortization: In combinatorially massive spaces, the network only sees a tiny fraction (e.g., $10^{-4}\%$) of possible configurations during training. Despite this extreme undersampling, PRISM generalizes remarkably well by learning to extrapolate across related model structures.
  • Unified Parameter Spaces: Rather than training separate networks for separate models, treating model selection as a joint discrete-continuous inference problem over a masked global parameter vector proves to be highly stable and accurate.

Key Results

  • Combinatorial Scaling: On the symbolic regression task, PRISM maintained near-zero relative root-mean-squared error (rRMSE) for model spaces up to $2^{30}$ configurations, significantly outperforming prior Simulation-Based Model Inference (SBMI) baselines.
  • dMRI Performance: When applied to real UKB and HCP data, PRISM accurately recovered complex multi-shell fiber orientations. It matched the gold-standard (but slow) MCMC reference method (BedpostX) and outperformed traditional single-model SBI pipelines.
  • Downstream Tractography: Posteriors generated by PRISM led to higher spatial correlation with MCMC across brain regions during probabilistic white-matter tractography (mean correlation of 0.96 vs. 0.86 for the baseline).

Limitations and Future Work

  • The Quadratic Bottleneck: The transformer backbone scales quadratically ($O(C^2)$) with the number of model components $C$. While efficient for $C \le 100$, scaling to thousands of components will require sparse or linear-attention transformer variants.
  • Extreme Undersampling: When the model space scales past $2^{50}$ configurations, performance begins to degrade because large regions of the combinatorial space remain entirely unseen during training.
  • Future Directions: The authors suggest extending PRISM to incorporate structured model priors (e.g., dependency-aware or domain-conditioned priors) and exploring alternative parameter decoders like flow-matching.

Summary updated

BibTeX
@inproceedings{gloeckler2026scalable,
  author = {Manuel Gloeckler and J.P. Manzano-Patrón and Stamatios Sotiropoulos and Cornelius Schröder and Jakob H. Macke},
  title = {{Scalable Simulation-Based Model Inference with Test-Time Complexity Control}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=hG1l88A3hb},
}
Figure