Analytical Probability Distributions and EM-Learning for Deep Generative Networks

Randall Balestriero, Sébastien Paris, Richard G. BaraniukarXiv 2020

Abstract

Deep Generative Networks (DGNs) typically rely on Variational Autoencoders (VAEs) for training, which utilize approximations like amortized inference and Monte-Carlo sampling. This paper demonstrates that for networks with Continuous Piecewise Affine (CPA) activations (e.g., ReLU), the underlying probability distributions can be calculated analytically. We present an exact Expectation-Maximization (EM) algorithm that achieves higher likelihoods and faster convergence than standard VAEs by leveraging the geometric structure of the latent space.

Introduction

Training Deep Generative Networks—the engines behind image synthesis and anomaly detection—usually relies on Variational Autoencoders (VAEs). However, VAEs are built on a "house of approximations." Because the true mathematical relationship between the latent space (the hidden "code") and the generated data is unknown, VAEs use amortized inference to guess latent variables, Monte-Carlo sampling to estimate loss functions, and iterative gradient descent for weight updates. These approximations often lead to training instabilities, blurry results, and sub-optimal models. This research addresses a fundamental question: Can we solve the underlying mathematics of DGNs exactly instead of relying on approximations?

Methodology: Exploiting CPA Geometry

The core innovation lies in exploiting the Continuous Piecewise Affine (CPA) behavior of modern neural networks. Networks using activations like ReLU, Leaky-ReLU, or Max-Pooling divide the latent space into a complex arrangement of polyhedral regions. Within each region, the network behaves as a simple linear transformation ($g(z) = Az + b$).

Analytical Distributions and EM Algorithm

The authors derived exact closed-form equations for the marginal and posterior distributions of these networks, proving the posterior is a mixture of truncated Gaussians. Based on this, they developed a gradient-free training method:

  1. E-Step: Exactly calculates the expected latent representation of an input.
  2. M-Step: Updates network weights and biases using closed-form statistical equations, providing a "statistical backpropagation" interpretation.
  3. Recursive Partition Discovery: An algorithm maps every polyhedral region created by the network's architecture in the latent space.
Triangulation of a polytopal region in the latent space, illustrating how the network partitions the space into simplices for analytical calculation.

Experimental Validation

The theory was validated using three primary benchmarks:

  • Toy Circle: 2D data points with Gaussian noise to visualize manifold fitting.
  • Wave Dataset: A synthetic 2D dataset with non-linear shapes to test the capture of complex curves.
  • MNIST (Digit 4): Demonstrating that the EM approach learns realistic data distributions even with small latent dimensions.

Key Insights and Results

  • Higher Likelihood and Faster Convergence: In all experiments, EM-trained models achieved lower negative log-likelihood (better fit) and reached optimal states in significantly fewer steps than VAEs.
  • Qualitative Superiority: Samples from EM-trained models were sharper and more accurately reflected the true data distribution compared to the often-blurry outputs of VAEs.
  • The "Why" of VAE Failure: The research reveals that VAEs struggle because they assume the posterior is a single Gaussian, whereas it is actually a complex mixture. This mismatch is a primary source of instability.

Limitations and Future Work

The primary limitation is the "Curse of Dimensionality." Finding every polyhedral region is computationally expensive; as latent dimensions and network depth increase, the number of regions grows exponentially. Currently, this method is feasible for smaller "bottleneck" networks but lacks the scalability for massive models like Stable Diffusion.

Future work suggests creating "hybrid" VAEs that use these exact analytical forms to guide the encoder's approximations, combining the speed of VAEs with the accuracy of the analytical EM approach.

Summary updated

BibTeX
@misc{balestriero2020analytical,
  author = {Randall Balestriero and Sébastien Paris and Richard G. Baraniuk},
  title = {{Analytical Probability Distributions and EM-Learning for Deep Generative Networks}},
  year = {2020},
  eprint = {2006.10023},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.10023},
}
Figure