  Forward modeling approaches in cosmology have made it possible to reconstruct
the initial conditions at the beginning of the Universe from the observed
survey data. However the high dimensionality of the parameter space still poses
a challenge to explore the full posterior, with traditional algorithms such as
Hamiltonian Monte Carlo (HMC) being computationally inefficient due to
generating correlated samples and the performance of variational inference
being highly dependent on the choice of divergence (loss) function. Here we
develop a hybrid scheme, called variational self-boosted sampling (VBS) to
mitigate the drawbacks of both these algorithms by learning a variational
approximation for the proposal distribution of Monte Carlo sampling and combine
it with HMC. The variational distribution is parameterized as a normalizing
flow and learnt with samples generated on the fly, while proposals drawn from
it reduce auto-correlation length in MCMC chains. Our normalizing flow uses
Fourier space convolutions and element-wise operations to scale to high
dimensions. We show that after a short initial warm-up and training phase, VBS
generates better quality of samples than simple VI approaches and reduces the
correlation length in the sampling phase by a factor of 10-50 over using only
HMC to explore the posterior of initial conditions in 64$^3$ and 128$^3$
dimensional problems, with larger gains for high signal-to-noise data
observations.
