Learning a Restricted Boltzmann Machine using biased Monte Carlo sampling
Restricted Boltzmann Machines are simple and powerful generative models
capable of encoding any complex dataset. Despite all their advantages, in
practice, trainings are often unstable, and it is hard to assess their quality
because dynamics are hampered by extremely slow time-dependencies. This
situation becomes critical when dealing with low-dimensional clustered
datasets, where the time needed to sample ergodically the trained models
becomes computationally prohibitive. In this work, we show that this divergence
of Monte Carlo mixing times is related to a phase coexistence phenomenon,
similar to that encountered in Physics in the vicinity of a first order phase
transition. We show that sampling the equilibrium distribution via Markov Chain
Monte Carlo can be dramatically accelerated using biased sampling techniques,
in particular, the Tethered Monte Carlo method (TMC). This sampling technique
solves efficiently the problem of evaluating the quality of a given trained
model and the generation of new samples in reasonable times. In addition, we
show that this sampling technique can be exploited to improve the computation
of the log-likelihood gradient during the training too, which produces dramatic
improvements when training RBMs with artificial clustered datasets. When
dealing with real low-dimensional datasets, this new training procedure fits
RBM models with significantly faster relaxational dynamics than those obtained
with standard PCD recipes. We also show that TMC sampling can be used to
recover free-energy profile of the RBM, which turns out to be extremely useful
to compute the probability distribution of a given model and to improve the
generation of new decorrelated samples on slow PCD trained models.