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步往往难以处理。我们提出利用GFlowNet(一种通过学习顺序构建样本的随机策略从未归一化密度中采样的算法)来处理这一棘手的E步。通过训练GFlowNet从潜变量后验中采样,我们利用了其作为针对离散结构复杂分布的摊销变分推断算法的优势。我们的方法GFlowNet-EM能够训练具有离散组合式潜变量的表达性LVM,实验表明该方法可在非上下文无关文法归纳任务以及无需在编码器中强制执行条件独立性的离散变分自编码器(VAE)图像任务中取得良好效果。