The Effects of Invertibility on the Representational Complexity of Encoders in Variational Autoencoders

Divyansh Pareek, Andrej Risteski

Abstract

Training and using modern neural-network based latent-variable generative models (like Variational Autoencoders) often require simultaneously training a generative direction along with an inferential (encoding) direction, which approximates the posterior distribution over the latent variables. Thus, the question arises: how complex does the inferential model need to be, in order to be able to accurately model the posterior distribution of a given generative model? In this paper, we identify an important property of the generative map impacting the required size of the encoder. We show that if the generative map is "strongly invertible" (in a sense we suitably formalize), the inferential model need not be much more complex. Conversely, we prove that there exist non-invertible generative maps, for which the encoding direction needs to be exponentially larger (under standard assumptions in computational complexity). Importantly, we do not require the generative model to be layerwise invertible, which a lot of the related literature assumes and isn't satisfied by many architectures used in practice (e.g. convolution and pooling based networks). Thus, we provide theoretical support for the empirical wisdom that learning deep generative models is harder when data lies on a low-dimensional manifold.

Introduction

In the framework of Variational Autoencoders (VAEs), the model simultaneously learns a generator (decoder) to map latent codes to data and an inference model (encoder) to approximate the posterior distribution of latent codes given the data. A fundamental question for practitioners and theorists alike is: How complex must the encoder be relative to the decoder?

If the encoder lacks sufficient capacity, it cannot accurately represent the posterior, leading to the "blurry" samples or poor latent representations often seen in suboptimal VAEs. This paper moves beyond empirical trial-and-error to provide a mathematical framework determining when inference (encoding) is significantly harder than generation (decoding).

The Invertibility Dichotomy

The authors establish a theoretical "dichotomy" for VAEs based on the geometric properties of the decoder. The core finding is that invertibility is the primary factor governing encoder complexity.

1. The "Easy" Case: Strong Invertibility

The authors prove that if a generator $G$ is "strongly invertible"—meaning it is bijective and its Jacobian singular values are bounded away from zero—and smooth, a "Deep Latent Gaussian" encoder of polynomial size exists.

To prove this upper bound, the authors demonstrate that a neural network can "simulate" a two-stage optimization process. The network weights can be configured to perform Gradient Descent to find the most likely latent code (the mode) and then execute Langevin Diffusion (a stochastic random walk) to sample from the distribution around that mode. This suggests that for well-behaved, invertible mappings, the inference task is only polynomially more complex than the generative task.

2. The "Hard" Case: Non-Invertibility

Conversely, for non-invertible generators, the authors identify a "complexity explosion." Using a reduction from cryptography, they show that if one could always find a small encoder for a non-invertible generator, it would be possible to invert "one-way functions"—functions that are easy to compute but computationally impossible to reverse. Since the existence of one-way functions is a foundational assumption in modern security, it follows that some decoders must require exponentially large encoders to accurately capture their posterior distributions.

Key Insights and Theoretical Contributions

  • Layerwise Invertibility is Not Required: Unlike previous literature that assumed every individual layer of a network must be invertible (a condition violated by common operations like max-pooling), this paper only requires the overall mapping to be invertible. This makes the theory applicable to standard architectures like Convolutional Neural Networks (CNNs).
  • Support for the Manifold Hypothesis: Practitioners often find that VAEs struggle when data lies on a low-dimensional manifold. This paper provides a formal explanation: such mappings are often non-invertible or collapsing, which forces the required encoder to be impossibly complex (exponentially large).
  • Bridging ML and Cryptography: The application of computational complexity conjectures (like the existence of one-way permutations) to prove limits on neural network size represents a novel bridge between generative modeling and theoretical computer science.

Results and Implications

  • Polynomial Growth: For a strongly invertible generator with $N$ parameters, an encoder exists with size $O(N \cdot \text{poly}(d, 1/\beta, 1/\epsilon))$, where $d$ is dimension, $\beta$ is noise, and $\epsilon$ is error. The encoder remains computationally manageable.
  • Exponential Explosion: For certain non-invertible generators, the encoder must be of size exponential in $d$ to approximate the posterior, assuming standard complexity conjectures hold.
  • Causal Inference: The authors suggest this complexity gap could be used to determine causality. If a model is simple in the direction $A \to B$ but requires an exponentially complex model for $B o A$, it provides a theoretical basis for concluding that $A$ is the true cause of $B$.

Conclusion

This research provides a rigorous foundation for understanding the asymmetry between encoding and decoding. By identifying invertibility as the pivot point for representational complexity, the authors offer a theoretical explanation for why certain generative models are notoriously difficult to train and provide a path forward for designing more efficient inference models.

Summary updated

BibTeX
@inproceedings{pareek2022effects,
  author = {Divyansh Pareek and Andrej Risteski},
  title = {{The Effects of Invertibility on the Representational Complexity of Encoders in Variational Autoencoders}},
  booktitle = {International Conference on Learning Representations},
  year = {2022},
  url = {https://openreview.net/forum?id=7_JR7WpwKV1},
}
Figure