Generative Reversible Networks

Robin Tibor Schirrmeister, Patryk Chrabaszcz, Frank Hutter, Tonio BallarXiv 2018

In the landscape of generative modeling, autoencoders are foundational. Traditionally, these systems consist of two distinct components: an encoder that compresses data into a latent "code" and a decoder that reconstructs the original data. Training these models is often a delicate balancing act, requiring researchers to force two separate networks to behave as inverses of each other. This paper explores a more elegant alternative: Reversible Neural Networks (RevNets). By utilizing architectures that are invertible by design, a single model can function as both encoder and decoder, simplifying the training pipeline and offering unique properties for latent space exploration.

The Core Mechanism: Reversible Blocks

Standard generative autoencoders (like VAEs or AAEs) must explicitly learn to minimize reconstruction error because the decoder is not mathematically guaranteed to undo the encoder's work. RevNets bypass this "reciprocity" problem through their architecture. They are composed of invertible blocks where the input is split into two streams, $x_1$ and $x_2$. These streams are transformed using functions $F$ and $G$ in a way that allows the operation to be perfectly reversed without needing to invert the internal functions themselves.

The architecture of a reversible block, showing how the forward pass (top) can be mathematically inverted (bottom) to recover original inputs.

Because the network is bijective, the reconstruction loss is effectively zero by design if the latent space is not restricted. The challenge in training then shifts from ensuring reconstruction accuracy to regularizing the latent space to make it useful for generation.

Methodology and Training Phases

The authors implement these networks within an Adversarial Autoencoder (AAE) framework, using a discriminator to shape the latent space to match a target prior distribution (e.g., a 64-dimensional Gaussian). The training process involves two primary phases:

  1. Reconstruction Phase: Encodings are clipped to a prior, and the network is trained to minimize L1 reconstruction loss.
  2. Adversarial Phase: A discriminator ensures the latent encodings match the target distribution.

To handle high-resolution images, the model utilizes a modified checkerboard subsampling technique. This ensures that early layers maintain a "global" view of the image, preventing the pixel-level artifacts often seen in standard downsampling.

Experimental Results and Insights

The approach was evaluated on the CelebA and MNIST datasets. On CelebA, the RevNet achieved a Fréchet Inception Distance (FID) of 65. While this lags behind state-of-the-art non-reversible models like WAE-GAN (FID 42), it is remarkably close to standard Variational Autoencoders (FID 63).

Generated face samples from the RevNet trained on the CelebA dataset. The images are globally coherent but exhibit some characteristic blurriness.

One of the most significant findings occurred during MNIST experiments. When allowed to use the full input dimensionality for the latent space, the RevNet naturally "shut down" unnecessary dimensions. It discovered a minimal set of 3–4 dimensions per class to encode features like tilt, thickness, and size, effectively performing latent dimension discovery without manual bottlenecking.

Conclusion and Future Directions

Generative RevNets offer a stable and mathematically rigorous alternative to traditional autoencoders. Their inherent bijectivity ensures near-perfect numerical stability, with mean L1 reconstruction errors as low as $9 \times 10^{-7}$.

However, a performance gap remains compared to specialized non-reversible models. This may be due to the constraints of bijectivity, which prevent the use of common techniques like sigmoid nonlinearities at the output. Future work will focus on automated architecture searches tailored for reversible structures and exploring hierarchical latent dimensions to improve the sharpness of generated images.

Summary updated

BibTeX
@misc{schirrmeister2018generative,
  author = {Robin Tibor Schirrmeister and Patryk Chrabaszcz and Frank Hutter and Tonio Ball},
  title = {{Generative Reversible Networks}},
  year = {2018},
  eprint = {1806.01610},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1806.01610},
}
Figure