Taming VAEs
Danilo Jimenez Rezende, Fabio Viola
TL;DR
This work addresses the instability of training high-capacity VAEs by introducing GECO, a constrained optimization framework that uses an augmented Lagrangian to enforce interpretable reconstruction constraints. The authors provide a theoretical treatment of constrained VAEs, connect β-VAEs to spectral clustering and phase transitions, and show that GECO yields robust, constraint-driven control over reconstruction versus compression. Empirically, GECO improves latent-space coverage (lower marginal KL) and maintains reconstruction quality across large-scale models and datasets without extensive hyperparameter sweeps. The approach offers a practical workflow for tuning VAEs in a data-space–oriented manner with broad applicability to complex generative models.
Abstract
In spite of remarkable progress in deep latent variable generative modeling, training still remains a challenge due to a combination of optimization and generalization issues. In practice, a combination of heuristic algorithms (such as hand-crafted annealing of KL-terms) is often used in order to achieve the desired results, but such solutions are not robust to changes in model architecture or dataset. The best settings can often vary dramatically from one problem to another, which requires doing expensive parameter sweeps for each new case. Here we develop on the idea of training VAEs with additional constraints as a way to control their behaviour. We first present a detailed theoretical analysis of constrained VAEs, expanding our understanding of how these models work. We then introduce and analyze a practical algorithm termed Generalized ELBO with Constrained Optimization, GECO. The main advantage of GECO for the machine learning practitioner is a more intuitive, yet principled, process of tuning the loss. This involves defining of a set of constraints, which typically have an explicit relation to the desired model performance, in contrast to tweaking abstract hyper-parameters which implicitly affect the model behavior. Encouraging experimental results in several standard datasets indicate that GECO is a very robust and effective tool to balance reconstruction and compression constraints.
