Rethinking Controllable Variational Autoencoders

Huajie Shao, Yifei Yang, Haohong Lin, Longzhong Lin, Yizhuo Chen, Qinmin Yang, Han Zhao

Abstract

DynamicVAE improves disentangled representation learning by treating the Variational Autoencoder (VAE) training process as a controlled dynamical system. By employing a non-linear incremental PI controller and information-theoretic "set points," it successfully decouples latent factor learning from reconstruction optimization, achieving superior clarity in latent representations without sacrificing image quality.

Introduction

In the field of Variational Autoencoders (VAEs), a fundamental trade-off exists between reconstruction quality (how well the model recreates the input) and disentanglement (how well the model separates independent features, such as an object's scale versus its rotation).

Standard models like $\beta$-VAE use a fixed weight ($\beta$) to penalize the KL-divergence term, but finding the optimal value is notoriously difficult. Previous attempts, such as ControlVAE, utilized basic control theory to dynamically tune $\beta$ toward a specific KL-divergence target. However, these methods often lacked a theoretical foundation, suffered from stability issues like overshooting, and provided little guidance on selecting appropriate KL targets.

Methodology: The DynamicVAE Framework

DynamicVAE refines the control-theory approach through several key innovations designed to stabilize the noisy, non-linear optimization landscape of deep learning.

Figure 1: Block diagram of the DynamicVAE control system, featuring an incremental PI controller to regulate KL-divergence.

Key Innovations

  1. Incremental PI Controller: Instead of a standard positional controller, DynamicVAE uses a non-linear incremental Proportional-Integral (PI) controller. This approach is more stable for neural network training.
  2. Moving Average Feedback: To prevent the controller from overreacting to the noise of individual mini-batches, the model uses a moving average of the KL-divergence as its feedback signal.
  3. Hybrid Annealing: Rather than jumping abruptly between KL targets, DynamicVAE uses a "ramp" function. This gradually increases the capacity of the information bottleneck, preventing "overshoot" where too many latent factors try to emerge at once and become entangled.
  4. Information Bottleneck Theory: The authors prove that KL-divergence is an upper bound on the mutual information between inputs and latents. By controlling the KL target, they effectively manage the "bandwidth" of the information bottleneck.

Key Insights and Ideas

  • The "One Bit" Rule: The authors provide a mathematical guideline for the KL set point ($C$), suggesting $C \geq \log_2 N_x$ (where $N_x$ is the number of samples) to ensure the model has enough information to reconstruct the dataset.
  • Sequential Disentanglement: By slowly increasing the KL target, the model learns latent factors one by one. Simple, high-variance factors (like position) are captured first, followed by more subtle ones (like shape).
  • Stability Analysis: The paper provides the first formal stability analysis for a PI-controlled VAE, offering necessary and sufficient conditions for the hyperparameters ($K_p, K_i$) to ensure training does not diverge.

Experimental Results

The model was evaluated on standard benchmarks including dSprites, MNIST, smallNORB, and 3D Chairs.

Figure 3: Comparison of DynamicVAE against baselines across (a) Reconstruction loss, (b) Hyperparameter stability, and (c) KL-divergence convergence.

Performance and Stability

  • Superior Trade-offs: On the dSprites dataset, DynamicVAE achieved a reconstruction error of ~11.8, significantly lower than $\beta$-VAE and FactorVAE, while maintaining higher disentanglement scores (RMIG of 0.4781).
  • Reliable Convergence: As shown in Figure 3, DynamicVAE's KL-divergence curves are smooth and hit their targets reliably, unlike the Lagrange Multiplier method, which often oscillates or violates constraints.
  • Qualitative Clarity: Latent traversals show that DynamicVAE cleanly separates features like "leg height" and "azimuth" in the 3D Chairs dataset, whereas other models often conflate them.

Conclusion

DynamicVAE successfully bridges control theory and deep generative modeling. By treating training as a dynamical system, it offers a principled way to manage the information bottleneck. While currently tested on synthetic benchmarks, future work could involve automatically tuning the KL set point in an unsupervised manner and applying this controlled-bottleneck approach to architectures like GANs or Diffusion Models.

Summary updated

BibTeX
@inproceedings{shao2022rethinking,
  author = {Huajie Shao and Yifei Yang and Haohong Lin and Longzhong Lin and Yizhuo Chen and Qinmin Yang and Han Zhao},
  title = {{Rethinking Controllable Variational Autoencoders}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2022},
  doi = {10.1109/cvpr52688.2022.01865},
}
Figure