We develop an algorithm for automatic differentiation of Metropolis-Hastings samplers, allowing us to differentiate through probabilistic inference, even if the model has discrete components within it. Our approach fuses recent advances in stochastic automatic differentiation with traditional Markov chain coupling schemes, providing an unbiased and low-variance gradient estimator. This allows us to apply gradient-based optimization to objectives expressed as expectations over intractable target densities. We demonstrate our approach by finding an ambiguous observation in a Gaussian mixture model and by maximizing the specific heat in an Ising model.
翻译:我们开发了一种针对Metropolis-Hastings采样器的自动微分算法,使得即使在模型中包含离散组件的情况下,也能对概率推断过程进行微分。该方法融合了随机自动微分领域的最新进展与传统马尔可夫链耦合方案,提供了无偏且低方差的梯度估计器。这使得我们能够将基于梯度的优化应用于表示为不可处理目标密度期望的目标函数。我们通过在混合高斯模型中寻找模糊观测值,以及在伊辛模型中最大化比热容,验证了该方法的有效性。