Latent variable models (LVMs) with discrete compositional latents are an important but challenging setting due to a combinatorially large number of possible configurations of the latents. A key tradeoff in modeling the posteriors over latents is between expressivity and tractable optimization. For algorithms based on expectation-maximization (EM), the E-step is often intractable without restrictive approximations to the posterior. We propose the use of GFlowNets, algorithms for sampling from an unnormalized density by learning a stochastic policy for sequential construction of samples, for this intractable E-step. By training GFlowNets to sample from the posterior over latents, we take advantage of their strengths as amortized variational inference algorithms for complex distributions over discrete structures. Our approach, GFlowNet-EM, enables the training of expressive LVMs with discrete compositional latents, as shown by experiments on non-context-free grammar induction and on images using discrete variational autoencoders (VAEs) without conditional independence enforced in the encoder.
翻译:具有离散组合潜在变量的潜在变量模型(LVM)是一个重要但充满挑战的领域,其难点在于潜在变量可能存在组合爆炸级别的多种配置。在建模潜在变量的后验分布时,表达性与优化可解性之间存在关键权衡。对于基于期望最大化(EM)的算法而言,E步往往因对后验分布的过度简化近似而难以处理。我们提出利用吉布斯流网络(GFlowNets)——一种通过学习样本序贯构建的随机策略来从非归一化密度中采样的算法——来解决这一棘手的E步问题。通过训练GFlowNets从潜在变量的后验分布中采样,我们充分发挥其作为针对离散结构复杂分布的摊销变分推理算法的优势。我们的方法GFlowNet-EM能够训练具有离散组合潜在变量的高表达性LVM,实验证明该方法可应用于非上下文无关文法归纳,以及在不强制编码器条件独立性的情况下对图像使用离散变分自编码器(VAE)进行建模。