GFlowNet-EM for Learning Compositional Latent Variable Models
Edward J. HuNikolay MalkinMoksh JainKatie E. EverettAlexandros GraikosYoshua Bengio
Proposes GFlowNet-EM, a framework that replaces the intractable expectation-maximization E-step with an amortized GFlowNet sampler to train expressive latent variable models over discrete compositional structures without imposing restrictive independence assumptions.
Real-world data such as natural language and visual scenes often rely on hidden, structured components—like parse trees in sentences or object arrangements in images. Latent variable models aim to capture these hidden structures; however, standard maximum-likelihood learning using the Expectation-Maximization (EM) framework becomes mathematically intractable when evaluating combinatorially large discrete spaces. Traditional approaches either enforce rigid independence assumptions, which severely limit the expressiveness of the model, or use slow Markov Chain Monte Carlo sampling, which scales poorly. Consequently, machine learning practitioners have struggled to train expressive models that accurately capture complex, interdependent latent structures without computational bottlenecks.
The article introduces and evaluates GFlowNet-EM, a novel training framework that incorporates Generative Flow Networks (GFlowNets) into the EM algorithm to learn expressive latent variable models with discrete compositional hidden states. The objective is to demonstrate that GFlowNets can act as flexible, amortized samplers for the intractable inference step (E-step) without relying on artificial conditional independence assumptions.
The authors assess the proposed approach across synthetic and real-world benchmark tasks, including hierarchical Gaussian mixtures, grammar induction on the Penn Treebank dataset (under standard context-free, energy-guided, and non-context-free grammars), and discrete image representation learning using the static MNIST dataset. To make joint optimization stable and prevent the learned posterior from collapsing into a single mode, the approach incorporates several stabilizing mechanisms, including adaptive thresholding to schedule updates, off-policy exploration, a sleep-phase hallucination step, and short refinement chains.
The empirical findings demonstrate clear performance gains over standard baselines. First, in grammar induction, GFlowNet-EM matches exact baseline methods on standard context-free grammars and enables tractable learning on more complex non-context-free grammars, achieving a superior test negative log-likelihood (at or below 5.46) where exact methods are computationally prohibitive. Second, when augmented with an energy-based prior to guide grammatical tree structures, GFlowNet-EM improves human-annotated constituent alignment from a 39.51 F1 score (standard marginalization) to 48.41. Third, in discrete image modeling, GFlowNet-EM consistently outperforms standard vector-quantized variational autoencoders (VQ-VAEs) across dictionary sizes, lowering test negative log-likelihood on MNIST from 80.84 to 70.74 for an eight-token dictionary while enabling simultaneous learning of the latent prior.
These findings indicate that machine learning models do not need to sacrifice representational richness to remain computationally viable. By eliminating restrictive factorization and conditional independence requirements, GFlowNet-EM unlocks the training of more sophisticated generative architectures for language and vision, offering better alignment with structured human knowledge and domain rules. Although the method reduces asymptotic theoretical complexity on complex grammars from quintic to quadratic in sequence length, it introduces practical computational overhead during training due to sequential autoregressive sampling and decoupled optimization alternating between network updates.
Organizations and research teams developing generative systems for highly structured data should consider GFlowNet-EM as an alternative to restrictive variational approximations when modeling complex discrete dependencies. When deploying this method, teams must factor in the trade-off between higher training time and enhanced expressiveness, and they should leverage stabilization techniques like sleep-phase exploration to prevent posterior collapse. Future work should focus on software and algorithmic optimizations to reduce training overhead and expand the framework to continuous or hybrid continuous-discrete latent representations.
- Paper: GFlowNet Foundations, Yoshua Bengio et al. (2023). Read this for the flow-conservation objectives and amortized-sampling theory that GFlowNet-EM uses to approximate its intractable E-step.
- Paper: Generative Flow Networks for Discrete Probabilistic Modeling, Dinghuai Zhang et al. (2022). Its energy-based GFlowNet setup makes the discrete-space sampling machinery behind GFlowNet-EM concrete before the method combines it with EM.
No sufficiently relevant recommendations were found.
