← All research
2026 R Package Tools & Packages · Modeling & Simulation

neuralsbi: Neural Simulation-Based Inference

Pedro Nascimento de Lima

— Abstract

A native R implementation of neural simulation-based inference (SBI), focused on neural posterior estimation. Given a prior over parameters and a simulator, neuralsbi trains a conditional neural density estimator (mixture density networks, masked autoregressive flows, or neural spline flows) to approximate the Bayesian posterior, enabling amortized, likelihood-free inference with no likelihood function required. It mirrors the workflow of the Python sbi package but runs natively on the torch R package (libtorch), with built-in posterior diagnostics including simulation-based calibration, expected coverage, TARP, and posterior predictive checks.