Neural posterior estimation (NPE) is a simulation-based approach to Bayesian inference that trains a neural network to approximate the posterior distribution from simulated parameter - data pairs, bypassing likelihood evaluation. We apply NPE -- to our knowledge for the first time -- to stochastic susceptible-infectious-removed (SIR) epidemic models observed through final outcome data, considering both homogeneously mixing and household-structured populations. Such data arise naturally in retrospective outbreak investigations and household transmission studies, yet inference is computationally challenging: data-augmentation Markov chain Monte Carlo (MCMC) can be slow to mix in large populations and difficult to implement, while Approximate Bayesian Computation (ABC) suffers from low acceptance rates, particularly for large populations or unlikely outcomes. The discrete, low-dimensional nature of such observations makes this setting particularly well suited to NPE. We show that a logNormal posterior approximation, parameterised by a feed-forward neural network, accurately recovers reference posteriors across a range of population sizes and transmission regimes, and extends naturally to joint inference on global and local transmission rates in the household model. Once trained, the network produces approximate posterior distributions in seconds and generalises reliably to population sizes and structures not seen during training. Performance on both synthetic and real outbreak datasets is consistently strong, with results in close agreement with published analyses.
翻译:神经后验估计(NPE)是一种基于模拟的贝叶斯推断方法,通过训练神经网络从模拟的参数-数据对中逼近后验分布,从而绕过似然函数的显式计算。我们首次将NPE应用于通过最终结果数据观测的随机易感-感染-移除(SIR)流行病模型,并考虑了均匀混合和家庭结构两种人群场景。此类数据常见于回顾性疫情调查及家庭传播研究,但其推断面临计算挑战:数据增强马尔可夫链蒙特卡洛(MCMC)方法在大规模人群中混合缓慢且实现困难,而近似贝叶斯计算(ABC)方法则面临高拒绝率问题(尤其对大规模人群或小概率事件)。观测数据的离散低维特性使该场景特别适用于NPE。我们发现,由前馈神经网络参数化的对数正态后验分布,能够准确恢复不同人群规模与传播机制下的参考后验分布,并可自然推广至家庭模型中对全局和局部传播率进行联合推断。在训练完成后,该网络可在数秒内生成近似后验分布,并可靠泛化至训练过程中未出现的人群规模与结构。对合成数据集和真实疫情数据集的实证结果表明,该方法性能稳健,与已发表分析结果高度吻合。