  Posterior inference with an intractable likelihood is becoming an
increasingly common task in scientific domains which rely on sophisticated
computer simulations. Typically, these forward models do not admit tractable
densities forcing practitioners to make use of approximations. This work
introduces a novel approach to address the intractability of the likelihood and
the marginal model. We achieve this by learning a flexible amortized estimator
which approximates the likelihood-to-evidence ratio. We demonstrate that the
learned ratio estimator can be embedded in MCMC samplers to approximate
likelihood-ratios between consecutive states in the Markov chain, allowing us
to draw samples from the intractable posterior. Techniques are presented to
improve the numerical stability and to measure the quality of an approximation.
The accuracy of our approach is demonstrated on a variety of benchmarks against
well-established techniques. Scientific applications in physics show its
applicability.
