# \[ANN\] NeuralEstimators.jl: Efficient simulation-based inference (SBI) using neural networks

**URL:** <https://discourse.julialang.org/t/ann-neuralestimators-jl-efficient-simulation-based-inference-sbi-using-neural-networks/136917>\
**Category:** Package Announcements\
**Tags:** statistics, machine-learning, bayesian-inference, neural-network\
**Created:** [April 29, 2026, 9:33am UTC](https://discourse.julialang.org/t/ann-neuralestimators-jl-efficient-simulation-based-inference-sbi-using-neural-networks/136917 "2026-04-29T09:33:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MattSainsbury-Dale](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mattsainsbury-dale/32/221714_2.png) [@MattSainsbury-Dale](https://discourse.julialang.org/u/MattSainsbury-Dale)\
**Post date:** [April 29, 2026, 9:33am UTC](https://discourse.julialang.org/t/ann-neuralestimators-jl-efficient-simulation-based-inference-sbi-using-neural-networks/136917/1 "2026-04-29T09:33:58Z")

</div>

[NeuralEstimators.jl](https://github.com/msainsburydale/NeuralEstimators.jl) uses neural networks for fast simulation-based inference (SBI) for any model for which simulation is feasible. It supports:

- Neural posterior estimation (NPE): directly learn the posterior distribution
- Neural ratio estimation (NRE): approximate likelihood ratios for flexible frequentist or Bayesian inference
- Neural Bayes estimation (NBE): efficiently estimate posterior functionals (e.g., point summaries)

These methods are likelihood-free (do not require the evaluation of the likelihood function) and they are amortized: once the neural networks are trained on simulated data, they enable rapid inference across arbitrarily many observed data sets orders of magnitude faster than conventional approaches like MCMC.

The package supports the use of both Flux.jl and Lux.jl.

Happy to hear any feedback! If you’d like to contribute, please see [here](https://github.com/msainsburydale/NeuralEstimators.jl?tab=contributing-ov-file). If you’d like to show support, please consider starring the [repo](https://github.com/msainsburydale/NeuralEstimators.jl).

---

<div class="post-metadata">

**Author:** ![cgeoga](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/cgeoga/32/216186_2.png) [@cgeoga](https://discourse.julialang.org/u/cgeoga)\
**Post date:** [April 29, 2026, 4:28pm UTC](https://discourse.julialang.org/t/ann-neuralestimators-jl-efficient-simulation-based-inference-sbi-using-neural-networks/136917/2 "2026-04-29T16:28:12Z")

</div>

Very cool work! Thanks for sharing and offering such a polished and easy-to-use package.

---

<div class="post-metadata">

**Author:** ![juliohm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/juliohm/32/215266_2.png) [@juliohm](https://discourse.julialang.org/u/juliohm)\
**Post date:** [April 29, 2026, 6:45pm UTC](https://discourse.julialang.org/t/ann-neuralestimators-jl-efficient-simulation-based-inference-sbi-using-neural-networks/136917/3 "2026-04-29T18:45:36Z")

</div>

Nice work! 🎉 As a small suggestion, consider replacing SpecialFunctions.jl by a native Julia implementation if you can. See Gamma.jl, Bessels.jl and similar packages.

---

<div class="post-metadata">

**Author:** ![MattSainsbury-Dale](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mattsainsbury-dale/32/221714_2.png) [@MattSainsbury-Dale](https://discourse.julialang.org/u/MattSainsbury-Dale)\
**Post date:** [April 30, 2026, 11:47am UTC](https://discourse.julialang.org/t/ann-neuralestimators-jl-efficient-simulation-based-inference-sbi-using-neural-networks/136917/4 "2026-04-30T11:47:20Z")

</div>

Thanks for the feedback! SpecialFunctions.jl is actually a dependency for a deprecated function that I’ve been planning to remove for a while. I just pulled the trigger and removed it (and the dependency on SpecialFunctions.jl).
