arXiv:2610.35442cs.MAOct 2026

Manuscript Offprint

arXiv:2610.35442

Simulation-Efficient Double-Flow Neural Posterior Estimation for Agent-Based Models

Junyao Zhang, Jinglai Li, Junqi Tang

Abstract

Neural posterior estimation (NPE) enables Bayesian inference of the posterior parameter in agent-based models (ABMs) with intractable likelihoods, but simulating training data can be computationally expensive. We propose Double-Flow Neural Posterior Estimation (DF-NPE), which combines learned time-series summaries with two conditional normalizing flows for synthetic-data generation and posterior estimation. The framework supplements direct simulations with synthetic training pairs and supports both pooled and ordered training strategies. Experiments in two settings of the Brock-Hommes asset-pricing model show that DF-NPE can reduce direct simulations by 90 percent while achieving lower mean posterior discrepancies and runtime than standard NPE. Performance varies with the allocation of directly simulated and synthetic data and the training strategy. These results establish learned summary augmentation as a practical approach to reducing simulation costs for Bayesian posterior inference of parameters in ABMs.

Keywords: Agent-based models; Bayesian inference; Simulation-based inference; Neural posterior estimation; Normalising flows; Synthetic data; Latent-surrogate augmentation

1 Introduction

Agent-based models (ABMs) are able to describe macroscopic phenomena through the heterogeneous decisions and their interactions of individual agents. Applying these models in realistic analysis requires inference about their behavioural parameters (Windrum et al., 2007; Grazzini et al., 2017). Bayesian inference describes plausible parameter values and uncertainty about them through a posterior distribution. For many ABMs, however, the likelihood is intractable or expensive to evaluate. Simulation-based inference (SBI) uses model-simulated data to estimate the posterior, which requires the number and cost of simulator calls a practical constraint on calibration (Beaumont et al., 2009; Lux, 2018).

With the rapid development of machine learning, the neural posterior estimation (NPE) has been widely used in posterior inference in ABMs, which learns a conditional density from simulated parameter-data pairs (Cranmer et al., 2020). Its sequential variant directs later simulations towards parameter regions relevant to a particular observation (Greenberg et al., 2019). Once fitted, the estimator generates posterior draws without further simulator calls. For ABMs, Shiono (2021) applied BayesFlow to Bayesian parameter estimation, and Dyer et al. (2024) studied neural inference with learned time-series summaries and evaluated recovery of the full posterior distribution. The remaining simulation cost lies in producing the training pairs, whose number must be weighed against the quality of the resulting posterior.

Nowadays, there has been more and more studies in SBI investigating approaches to reduce the cost of obtaining these simulated pairs or the need for them. Sequential proposals concentrate simulator calls in relevant parameter regions. When simulators at several fidelity levels are available, multilevel neural inference can improve accuracy under a fixed computational budget (Hikida et al., 2025). Surrogates approximate parts of the simulation or inference procedure: Lamperti et al. (2018) use machine-learning surrogates to explore ABM parameter spaces, while Barde (2024) uses Gaussian-process surrogates for Bayesian estimation. Neural emulators approximate simulator likelihoods (Lueckmann et al., 2019), and sequential methods can jointly learn likelihood and posterior approximations (Wiqvist et al., 2021). Additionally, for posterior training itself, Refaeli et al. (2025) use a neural density surrogate to replace simulator calls in later sequential rounds. Generated pairs can enlarge a training set, but they follow the learned surrogate distribution. Their contribution to posterior recovery therefore depends on the surrogate approximation and on how they are combined with direct simulations. We examine this question when the surrogate generates learned summaries and the representation changes across rounds.

In this paper, we investigate our Double-Flow neural posterior estimation (DF-NPE) framework using a recurrent encoder to map simulated trajectories to parameter-predictive summaries. The first conditional flow generates summaries given model parameters, and then the second estimates the parameter posterior given a summary. Generation takes place in this learned space rather than the full trajectory space. Similar to the sequential variants of NPE, at each sequential round, direct simulations update the encoder and surrogate. We then re-encode stored trajectories and regenerate synthetic summaries so that both data sources use the current representation. Within this procedure, we vary the allocation between directly-simulated and synthetic pairs and their order during posterior training. Mixed training pools the two sources, Synthetic-to-Simulation and Simulation-to-Synthetic use them in successive stages. Two settings of the Brock–Hommes model allow us to assess posterior recovery for heterogeneous forecasting parameters against approximate ground-truth posteriors obtained from tractable transition likelihoods. These comparisons extend the simulation-efficiency question studied by Dyer et al. (2024) to the use of generated training data in sequential neural posterior estimation.

The contributions of this article are to provide:

  1. a sequential DF-NPE procedure that combines learned time-series summaries, conditional latent generation and posterior estimation;

  2. an evaluation of directly-simulated and synthetic data allocations through full-posterior discrepancies, predictive checks and recorded computational cost;

  3. a comparison of posterior-training strategies and frozen-component controls that characterise when augmentation improves posterior recovery.

References (57)