Jiseon Min, Yuxin Ning, Nathaniel S. Pope, Franz Baumdicker, Andrew D. Kern
Simulation-based inference methods are increasingly being used in population genetics due to their flexibility and ability to be applied in settings where likelihood-based methods are intractable. Perhaps the best known such method is Approximate Bayesian Computation (ABC); however, its popularity is offset by its shortcomings which include computational expense and an unfortunate inability to fit models to high-dimensional summaries of the data. An alternative approach that solves these issues is supervised machine learning (ML); however, ML methods generally do not yield Bayesian uncertainty estimates of the quantities they predict. Here, we apply a recently introduced method, neural posterior estimation (NPE), that combines the best facets of ABC and supervised ML by training a neural network to estimate the posterior distribution of a population genetics model. We first compare neural posterior estimation with other inference methods for a variety of population genetic tasks, and show that neural posterior estimators yield posterior distributions with high accuracy and efficiency. We compare learned posterior distributions given raw genotypes and various summary statistics as input data. Additionally, we apply neural posterior estimation for demographic inference for simple and more complex models to highlight its application. Finally, we provide a user friendly workflow that enables others to perform neural posterior estimation to their own genetic data.