Skip to content

Commit

Permalink
first draft of BayesHEP talk
Browse files Browse the repository at this point in the history
  • Loading branch information
darrenjw committed May 22, 2022
1 parent 2205764 commit 5b3d28c
Showing 1 changed file with 57 additions and 30 deletions.
87 changes: 57 additions & 30 deletions latex/smfsb-talk/smfsb.tex
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@

\begin{document}

\title[Markov process simulation and Bayesian inference]{Modular algorithms for Markov process simulation and Bayesian parameter inference}
\author[Darren Wilkinson --- Stuttgart, 26/11/20]{\textbf{\large Darren Wilkinson} \\
\title{Fully Bayesian parameter inference for Markov processes}
\author[Darren Wilkinson --- Durham, 26/5/22]{\textbf{\large Darren Wilkinson} \\
\url{@darrenjw}\\
\alert{\url{darrenjw.github.io}}\\
Newcastle University, U.K.\\ and\\
The Alan Turing Institute, U.K.}
\date{Stuttgart Research Center Systems Biology Seminar\\Online\\26th November 2020}
Durham University, U.K.}
\date{Bayesian inference in HEP\\Durham\\26th May 2022\\\alert{\url{github.com/darrenjw/talks}}}

\frame{\titlepage}

Expand All @@ -61,7 +60,7 @@
%\item Stochastic reaction networks: Modelling, simulation and inference
\item Stochastic reaction networks, stochastic simulation and partially observed Markov process (POMP) models
\item Modularity: separating model representation from simulation algorithm
\item Well-mixed versus reaction--diffusion
% \item Well-mixed versus reaction--diffusion
\item Likelihood-free MCMC for POMP models: separating simulation from inference
\item Likelihood-free PMMH pMCMC, ABC and ABC--SMC
%\item Likelihood-free (PMMH) pMCMC --- exact fully Bayesian joint inference for the model state and static parameters
Expand All @@ -70,7 +69,8 @@
%\item (Adaptive) ABC(--SMC)
%\item Comparing pMCMC and ABC
%\item Hybrid ABC/pMCMC approaches
\item Functional programming approaches for scalable scientific and statistical computing
%\item Functional programming approaches for scalable scientific and statistical computing
\item Programming languages and libraries for MCMC-based fully Bayesian inference
\end{itemize}
}

Expand Down Expand Up @@ -105,8 +105,6 @@
\end{itemize}
}

\end{comment}

%\subsection{Modularity}

\frame{
Expand Down Expand Up @@ -171,7 +169,6 @@
\end{itemize}
}

\begin{comment}

\frame{
\frametitle{Discrete stochastic diffusion on a 1d lattice}
Expand All @@ -182,7 +179,6 @@
\end{itemize}
}

\end{comment}

\frame{
\frametitle{Stochastic kinetics of diffusion}
Expand All @@ -198,8 +194,6 @@
\end{itemize}
}

\begin{comment}

\frame{
\frametitle{Finite differences}
\begin{itemize}
Expand Down Expand Up @@ -230,8 +224,6 @@
\end{itemize}
}

\end{comment}

\frame{
\frametitle{Discrete stochastic diffusion on a 2d lattice}
\centerline{\includegraphics[height=0.4\textheight]{2d}}
Expand All @@ -253,7 +245,6 @@
\end{center}
}

\begin{comment}

\frame{
\frametitle{Spatial CLE approximation}
Expand All @@ -272,8 +263,6 @@
\end{center}
}

\end{comment}

\frame{
\frametitle{Lotka--Volterra SPDE dynamics (via the spatial CLE)}
\begin{center}
Expand All @@ -282,8 +271,6 @@
\end{center}
}

\begin{comment}

\frame{
\frametitle{Lotka--Volterra SPDE dynamics (3 seeds)}
\begin{center}
Expand All @@ -293,13 +280,14 @@
\end{center}
}

\end{comment}

\frame{
\frametitle{Lotka--Volterra reaction--diffusion SPDE}
\vspace*{-5cm}\centerline{\includegraphics[width=1.2\textwidth]{figs/ch09scle2dex2}}
}

\end{comment}



\frame{
\frametitle{Modularity and simulation algorithms}
Expand Down Expand Up @@ -550,6 +538,8 @@
}


\begin{comment}

%\subsection{ABC approaches}


Expand Down Expand Up @@ -589,8 +579,6 @@
\end{itemize}
}

\begin{comment}

\frame{
\frametitle{Summary statistics for POMP models}
\begin{itemize}
Expand All @@ -602,8 +590,6 @@
\end{itemize}
}

\end{comment}

\frame{
\frametitle{Issues with simple rejection ABC}
\begin{itemize}
Expand Down Expand Up @@ -639,7 +625,6 @@
\end{itemize}
}

\begin{comment}

\frame{
\frametitle{ABC--SMC algorithm}
Expand Down Expand Up @@ -689,7 +674,6 @@
\end{itemize}
}

\end{comment}



Expand All @@ -712,6 +696,8 @@
\end{itemize}
}

\end{comment}

\frame{
\frametitle{Pros and cons of pMCMC}
\begin{itemize}
Expand Down Expand Up @@ -769,8 +755,6 @@
\end{itemize}
}

\end{comment}

%\section{Functional approaches to computation}


Expand Down Expand Up @@ -841,6 +825,49 @@
\centerline{\alert{\url{https://github.com/darrenjw/smfsb}}}
}

\end{comment}

\frame{
\frametitle{Languages and libraries for MCMC}
\begin{itemize}
\item Various approaches to creating MCMC algorithms for particular problems:
\begin{itemize}
\item Use a stand-alone probabilistic programming language (PPL)
\item Use a PPL embedded in a general purpose programming language (eg. Python or R)
\item Write a custom sampler in an appropriate programming language (using scientific libraries, tensor computation frameworks, auto-diff frameworks, etc.)
\end{itemize}
\item Stand-alone PPLs:
\begin{itemize}
\item \alert{JAGS} is old, but quite general and widely used. It can be very inefficient for large, complex models. There are interfaces, \texttt{rjags} and \texttt{PyJAGS}, for using it from R and Python.
\item \alert{Stan} is now probably the most popular PPL. It is typically much more efficient than JAGS for complex models, but uses gradients, so can't (directly) handle discrete parameters. There are interfaces such as \texttt{rstan} and \texttt{PyStan} for using it from R and Python.
\end{itemize}
\end{itemize}
}

\frame{
\frametitle{Python ecosystem for Bayesian inference and MCMC}
\begin{itemize}
\item \alert{PyMC3} is probably the most popular PPL embedded in Python. It uses Theano for a backend. PyMC4 was going to use TensorFlow, but this was abandoned. PyMC3 is currenly moving to a JAX backend (currently experimental, via NumPyro), but will eventually support multiple backends, via Aesara (a fork of Theano)
\item \alert{Pyro} uses PyTorch as a back-end, but the popular \alert{NumPyro} fork uses JAX
\item \alert{JAX} is a pure functional eDSL for tensor/array computation and automatic differentiation. It can JIT-compile to run very fast on (multiple) CPU and GPU. It turns out to be extremely well-suited to sampling applications such as MCMC. If you are doing any kind of ML in Python, it's worth spending some time learning about JAX. \alert{BlackJAX} is a library of samplers for log-posteriors described using JAX.
\end{itemize}
}

\frame{
\frametitle{Functional languages for scalable Bayesian computation}
\begin{itemize}
\item JAX is a pure functional DSL embedded in Python
\item Functional languages are easier to analyse, optimise, compile, parallelise, distribute, automatically differentiate, etc., than imperative languages
\item MCMC for logistic regression using multiple languages and libraries: \alert{\url{github.com/darrenjw/logreg}}
\item \alert{DEX} is a new experimental stand-alone language for array processing and automatic differentiation (written in Haskell)
\item \alert{Scala} is a general-purpose language well-suited to building scalable samplers
\item \alert{Apache Spark} is a Scala framework for distributing big data ML workloads over a cluster
\end{itemize}



\mbox{}\hfill \alert{\url{github.com/darrenjw/talks}}
}


\end{document}
Expand Down

0 comments on commit 5b3d28c

Please sign in to comment.