Spatial Broadcast Decoder: A Simple Architecture for Learning Disentangled Representations in VAEs.

Nicholas Watters, Loïc Matthey, Christopher P. Burgess, Alexander LerchnerarXiv 2019

Abstract

We present a simple neural rendering architecture that helps variational autoencoders (VAEs) learn disentangled representations. Instead of the deconvolutional network typically used in the decoder of VAEs, we tile (broadcast) the latent vector across space, concatenate fixed X- and Y-"coordinate" channels, and apply a fully convolutional network with 1x1 stride. This provides an architectural prior for dissociating positional from non-positional features in the latent distribution of VAEs, yet without providing any explicit supervision to this effect. We show that this architecture, which we term the Spatial Broadcast decoder, improves disentangling, reconstruction accuracy, and generalization to held-out regions in data space. It provides a particularly dramatic benefit when applied to datasets with small objects. We also emphasize a method for visualizing learned latent spaces that helped us diagnose our models and may prove useful for others aiming to assess data representations. Finally, we show the Spatial Broadcast Decoder is complementary to state-of-the-art (SOTA) disentangling techniques and when incorporated improves their performance.

Introduction

Disentangled representation learning—the quest to have a model learn independent, interpretable factors like "object color" and "X-position" without explicit supervision—is a central goal of unsupervised learning. While Variational Autoencoders (VAEs) are the standard tool for this, they often struggle to cleanly separate these factors.

Standard VAE decoders typically use "deconvolutional" (transposed convolutional) layers to transform a flat latent vector into an image. However, convolutional filters are spatially invariant; they do not inherently "know" their location in the image. To render an object at a specific $(x, y)$ coordinate, the network must learn to propagate spatial information from the edges of the feature maps. This lack of spatial awareness leads to entanglement, where positional information "leaks" into other latent dimensions, causing visual artifacts or discontinuous latent spaces. This is especially problematic for datasets with small objects, where minimal pixel overlap between positions provides little guidance for the learning process.

The Spatial Broadcast Decoder

To address these limitations, we introduce the Spatial Broadcast Decoder (SBD). This architecture provides a powerful "spatial inductive bias" by replacing standard upsampling deconvolutions with a simple "tile-and-coordinate" approach.

The Spatial Broadcast Decoder architecture and associated algorithm.

As illustrated in the architecture diagram, the mechanism follows three steps:

  1. Broadcast (Tile): The latent vector $z$ (of size $k$) is tiled across the desired height $h$ and width $w$, creating a tensor of shape $h \times w \times k$.
  2. Coordinate Channels: Two fixed channels containing normalized $x$ and $y$ coordinates (ranging from -1 to 1) are appended. The final input to the decoder is $h \times w \times (k+2)$.
  3. Fully Convolutional Network: This tensor is passed through a series of standard, unstrided ($1 \times 1$) convolutional layers.

This architecture ensures that every pixel's computation has direct access to both the global latent information and its own absolute position. It turns the complex task of learning to render at a position into a much simpler local filtering operation.

Experimental Results

We evaluated the SBD on several benchmarks, including Colored Sprites and custom "Circles" datasets designed with "holes" (e.g., no objects in the center) to test generalization to unseen regions of the factor space.

Latent traversals showing disentangled factors of variation (position, size, color, shape) achieved by the Spatial Broadcast Decoder.

Our results show that SBD consistently achieves higher Mutual Information Gap (MIG) scores than standard deconvolutional decoders. Visual traversals demonstrate a clean separation of factors. In generalization tests, SBD was able to perfectly interpolate and extrapolate, rendering objects in positions never seen during training because it learned a linear relationship between the latent variables and the coordinate channels.

Conclusion

The Spatial Broadcast Decoder demonstrates that simple architectural changes can be more effective than complex loss functions for improving disentanglement. By providing the model with an explicit "map" to work with, SBD significantly improves reconstruction accuracy for small objects and enhances generalization. Furthermore, SBD is complementary to state-of-the-art methods like $\beta$-VAE or FactorVAE, serving as an architectural upgrade that improves their performance and robustness to hyperparameter tuning.

Summary updated

BibTeX
@misc{watters2019spatial,
  author = {Nicholas Watters and Loïc Matthey and Christopher P. Burgess and Alexander Lerchner},
  title = {{Spatial Broadcast Decoder: A Simple Architecture for Learning Disentangled Representations in VAEs.}},
  year = {2019},
  eprint = {1901.07017},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1901.07017},
}
Figure