Adapting Neural Posterior Estimators for Simulation-Based Inference in Agent-Based Models
Organizations: School of Mathematics, University of Birmingham
Abstract
Agent-based models (ABMs) are widely used in economics and social sciences. They represent heterogeneous personal behaviors and their interactions by using simulations, whereas their likelihoods are often intractable for parameter estimations. Therefore, most traditional statistical inference techniques are hindered. Driven by recent advances in probabilistic machine learning, recent works have applied neural networks to achieve likelihood-free inference in large-scale ABMs. Specifically, Neural Posterior Estimation using normalizing flows provide amortized Bayesian inference from simulations, yet a pre-trained estimator may become inaccurate when the target task changes. In this work, we investigate the practicality of adapting a pre-trained conditional normalizing flow through a unified sequential neural posterior estimation test-time training (SNPE-TTT) framework. The framework includes four adaptation strategies: full-parameter adaptation, low-rank adaptation, and two update spaces identified from target-task gradients. We evaluate all four methods across economic simulation models with both tractable and intractable likelihoods. These benchmarks demonstrate that the sequential neural posterior estimation test-time training framework can adapt pre-trained posterior estimators to related inference tasks using a limited budget of target simulations. Posterior recovery and computational benefits depend on the task and adaptation strategy, with lower target-stage cost in some settings but no consistently superior posterior accuracy.
Figures & tables
| Method | WASS, median [IQR] | MMD 2 , median [IQR] |
|---|---|---|
| SNPE-FPA | 0.1364 [0.1207, 0.1631] | 0.5199 [0.4429, 0.5604] |
| SNPE-LoRA | 0.2939 [0.2479, 0.4429] | 0.6537 [0.6016, 0.6846] |
| GradSubspace-FPA | 0.1838 [0.1558, 0.2216] | 0.5133 [0.4808, 0.5307] |
| GradSubspace-PEA | 0.1789 [0.1560, 0.2072] | 0.4905 [0.4560, 0.5272] |
| Method | WASS, median [IQR] | MMD 2 , median [IQR] |
|---|---|---|
| SNPE-FPA | 0.2221 [0.1964, 0.2611] | 0.0715 [0.0592, 0.0908] |
| SNPE-LoRA | 0.2825 [0.2345, 0.3672] | 0.1053 [0.0874, 0.1470] |
| GradSubspace-FPA | 0.2137 [0.1934, 0.2278] | 0.0604 [0.0510, 0.0708] |
| GradSubspace-PEA | 0.2169 [0.1898, 0.2284] | 0.0598 [0.0511, 0.0742] |
Appendix figures & tables4 assets
Supplementary material from the paper’s appendix.
Appendix
| 90% coverage (%) | Mean normalised width | ||||||
|---|---|---|---|---|---|---|---|
| Method | Cases | ||||||
| Source-only | 77 | 87.0 | 92.2 | 83.1 | 0.875 | 0.742 | 0.284 |
| Scratch SNPE | 95 | 86.3 | 91.6 | 89.5 | 0.886 | 0.676 | 0.245 |
| SNPE-FPA | 98 | 85.7 | 92.9 | 88.8 | 0.871 | 0.615 | 0.225 |
| SNPE-LoRA | 99 | 86.9 | 88.9 | 92.9 | 0.866 | 0.614 | 0.236 |
| GradSubspace-FPA | 98 | 84.7 | 91.8 | 89.8 | 0.869 | 0.665 | 0.253 |
| Contrast | ||||
| Model | Metric | G-FPA FPA | PEA FPA | PEA G-FPA |
| BH | WASS: Holm | 0.000629 | 0.002865 | 0.621513 |
| Median difference | 0.041138 | 0.036054 | 0.001398 | |
| MMD 2 : Holm | 1.000000 | 1.000000 | 1.000000 | |
| Median difference | 0.015908 | |||
| MVGBM | WASS: Holm | 0.404900 | 0.398180 | 0.404900 |
Simulation-Based Inference
Simulation-based inference estimates parameters and uncertainty from simulators when evaluating a tractable likelihood is difficult or impossible.
See all 84 papers