diff --git a/docs/source/methods.rst b/docs/source/methods.rst index 560eaeae..95ad5962 100644 --- a/docs/source/methods.rst +++ b/docs/source/methods.rst @@ -29,12 +29,16 @@ Posterior approximation methods taken by averaging checkpoints over the stochastic optimization trajectory. The covariance is also estimated empirically along the trajectory, and it is made of a diagonal component and a low-rank non-diagonal one. +- **Hamiltonian Monte Carlo (HMC)** `[Neal, 2010] `_ + HMC approximates the posterior as a steady-state distribution of a Monte Carlo Markov chain with Hamiltonian dynamics. + After the initial "burn-in" phase, each step of the chain generates a sample from the posterior. HMC is typically applied + in the full-batch scenario. + - **Stochastic Gradient Hamiltonian Monte Carlo (SGHMC)** `[Chen et al., 2014] `_ - SGHMC approximates the posterior as a steady-state distribution of a Monte Carlo Markov chain with Hamiltonian dynamics. - After the initial "burn-in" phase, each step of the chain generates samples from the posterior. + SGHMC implements a variant of HMC algorithm that expects noisy gradient estimate computed on mini-batches of data. - **Cyclical Stochastic Gradient Langevin Dynamics (Cyclical SGLD)** `[Zhang et al., 2020] `_ - Cyclical SGLD adapts the cyclical cosine step size schedule, and alternates between *exploration* and *sampling* stages to better + Cyclical SGLD adopts the cyclical cosine step size schedule, and alternates between *exploration* and *sampling* stages to better explore the multimodal posteriors for deep neural networks. Parametric calibration methods diff --git a/docs/source/references/prob_model/posterior/sgmcmc.rst b/docs/source/references/prob_model/posterior/sgmcmc.rst index 2ab3ce31..c4391486 100644 --- a/docs/source/references/prob_model/posterior/sgmcmc.rst +++ b/docs/source/references/prob_model/posterior/sgmcmc.rst @@ -4,12 +4,37 @@ SG-MCMC procedures approximate the posterior as a steady-state distribution of a Monte Carlo Markov chain, that utilizes noisy estimates of the gradient computed on minibatches of data. +Hamiltonian Monte Carlo (HMC) +============================= + +HMC `[Neal, 2010] `_ is a MCMC sampling +algorithm that simulates a Hamiltonian dynamical system to rapidly explores +the posterior. + +.. autoclass:: fortuna.prob_model.posterior.sgmcmc.hmc.hmc_approximator.HMCPosteriorApproximator + +.. autoclass:: fortuna.prob_model.posterior.sgmcmc.hmc.hmc_posterior.HMCPosterior + :show-inheritance: + :no-inherited-members: + :exclude-members: state + :members: fit, sample, load_state, save_state + +.. autoclass:: fortuna.prob_model.posterior.sgmcmc.hmc.hmc_state.HMCState + :show-inheritance: + :no-inherited-members: + :inherited-members: init, init_from_dict + :members: convert_from_map_state + :exclude-members: params, mutable, calib_params, calib_mutable, replace, apply_gradients, encoded_name, create + :no-undoc-members: + :no-special-members: + + Stochastic Gradient Hamiltonian Monte Carlo (SGHMC) =================================================== SGHMC `[Chen T. et al., 2014] `_ is a popular MCMC algorithm that uses stochastic gradient estimates to scale -to large datasets. +HMC to large datasets. .. autoclass:: fortuna.prob_model.posterior.sgmcmc.sghmc.sghmc_approximator.SGHMCPosteriorApproximator