TL;DR
Researchers have introduced Perturb-and-max-product (PMP), a parallel and scalable framework for sampling and learning in discrete energy-based models (EBMs). By replacing slow, sequential Markov Chain Monte Carlo (MCMC) methods with a parallelizable message-passing approach, PMP achieves orders-of-magnitude speedups and successfully handles complex, "entangled" models where traditional samplers fail to mix.
The Challenge with Discrete EBMs
Energy-Based Models are powerful tools for capturing complex dependencies in data. However, they suffer from a fundamental computational bottleneck: calculating the likelihood of parameters requires computing a partition function, which is mathematically intractable for most interesting models.
To bypass this, researchers typically rely on sampling to estimate the gradients needed for learning. The standard tool—Gibbs sampling—is often too slow to "mix" (move between different modes of the distribution), especially in large, complex models.
An alternative approach, Perturb-and-MAP, offers a clever shortcut: add random noise to the model and find the most likely configuration (the Maximum-A-Posteriori, or MAP). While elegant, solving the MAP problem is itself NP-complete. Previous attempts using Linear Programming (LP) solvers were either prohibitively slow or produced "mushy," fractional results that failed to represent discrete data accurately.
Introducing Perturb-and-Max-Product (PMP)
The authors propose a novel solution: Perturb-and-max-product (PMP). The core algorithm operates in two main steps:
- Perturb: Inject random noise (specifically Gumbel-distributed noise) into the unary terms of the discrete EBM.
- Max-Product: Instead of using a slow LP solver, employ max-product message passing to find the MAP configuration.
Why Max-Product? While max-product is a classic algorithm, it has been historically under-utilized for sampling. The authors demonstrate that max-product acts as a "minimax" algorithm in the dual space, preserving the multimodality of the problem. Unlike LP solvers that "flatten" the distribution into a single average, max-product tends to find one of the many distinct modes, making it ideal for generating realistic discrete samples. Crucially, PMP is highly parallelizable, allowing it to run efficiently on modern GPUs.
Key Insights
- Parallelism is King: PMP's computational complexity per "sweep" is similar to Gibbs sampling. However, because it is inherently parallel, it runs orders of magnitude faster in practice on hardware like modern GPUs.
- Embracing the "Wrong" Model: A fascinating theoretical insight is that PMP doesn't necessarily learn the exact parameters of a Gibbs distribution. Instead, it learns parameters that compensate for its own approximate sampling. The result is a learned sampling distribution that matches the data almost perfectly, even if the underlying parameters diverge from the ground truth.
- Max-Product vs. LP: LP-based solvers are often too good at finding a global average, destroying the discrete structure needed for sampling. Max-product’s non-convex nature allows it to "pick a side" in multimodal distributions, which is exactly what is needed when generating a discrete sample.
Key Results
The authors evaluated PMP across several challenging benchmarks, including Ising models, MNIST Zeros, Restricted Boltzmann Machines (RBMs), and a massive 2D Blind Deconvolution task.
- Speed and Quality: For Ising models, PMP was orders of magnitude faster than Gibbs and the state-of-the-art Gibbs-with-Gradients (GWG) while producing samples of equal or better quality (measured by Maximum Mean Discrepancy, as seen in the figure above).
- Scalability: In a highly entangled 2D blind deconvolution task featuring over 40,000 binary variables, Gibbs and GWG failed to produce any meaningful samples in a reasonable timeframe. PMP successfully found high-quality posterior samples.
- RBM Training: PMP is the first reported Perturb-and-MAP method capable of successfully training an RBM and generating recognizable MNIST-like digits.
Limitations and Future Work
- Factor Constraints: PMP is only applicable to EBMs built from "max-marginalizable" factors (e.g., logical factors, cardinality potentials). This means standard deep neural networks cannot be easily plugged in as the energy function.
- Inexactness: PMP is an approximate sampler and is not asymptotically unbiased. While the authors show this can be compensated for during learning, it remains a drawback for applications requiring exact probabilistic inference.
- Future Directions: Extending PMP to "persistent" training regimes—where samples are evolved across training steps rather than generated from scratch—could yield even greater efficiency gains.
Summary updated