Structural Autoencoders Improve Representations for Generation and Transfer

Felix Leeb, Yashas Annadani, Stefan Bauer, Bernhard Schölkopf · OpenReview

Abstract

We study the problem of self-supervised structured representation learning using autoencoders for generative modeling. Unlike most methods which rely on matching an arbitrary, relatively unstructured, prior distribution for sampling, we propose a sampling technique that relies solely on the independence of latent variables, thereby avoiding the trade-off between reconstruction quality and generative performance inherent to VAEs. We design a novel autoencoder architecture capable of learning a structured representation without the need for aggressive regularization. Our structural decoders learn a hierarchy of latent variables, akin to structural causal models, thereby ordering the information without any additional regularization. We demonstrate how these models learn a representation that improves results in a variety of downstream tasks including generation, disentanglement, and extrapolation using several challenging and natural image datasets.

Introduction

A central goal in deep representation learning is to achieve "disentanglement," where individual dimensions of a latent vector correspond to distinct, interpretable factors of variation, such as shape, color, or rotation. Traditionally, this has been pursued through Variational Autoencoders (VAEs) using heavy mathematical regularization (e.g., $\beta$-VAE) to force latent variables toward an independent prior. However, this often introduces a trade-off: aggressive regularization can lead to blurry reconstructions and "holes" in the latent space where the model fails to generate coherent data.

This research proposes a shift from mathematical regularization to architectural inductive bias. By mimicking the logic of structural causal models within the network itself, the proposed Structural Autoencoders (SAEs) learn organized, hierarchical representations that reflect the generative process of the real world.

Methodology

The authors introduce two primary architectural innovations and a novel sampling strategy designed to leverage structural constraints.

Structural Autoencoder (SAE)

The SAE decoder is designed to emulate a Structural Causal Model (SCM). It processes latent variables in a specific hierarchical order, where high-level abstract features (like object shape) are processed in deeper layers, while low-level features (like pixel-wise color) are integrated later. This "causal ordering" forces the model to separate global factors from local ones without explicit loss-based constraints.

Attention-Structural Autoencoder (ASAE)

The ASAE equips the encoder with a self-attention mechanism. It decomposes the input image into patches and utilizes multiple attention heads to determine which image regions inform specific parts of the latent representation. This enhances interpretability, as attention maps reveal which heads focus on objects versus backgrounds.

Architecture of the Attention-Structural Autoencoder (ASAE) and Structural Decoder.

Hybrid Sampling

To generate new samples without relying on a standard Gaussian prior, the authors propose Hybrid Sampling. This technique involves taking a small set of latent vectors from the training data and randomly mixing dimensions across different stored vectors. This approach respects the independence of learned factors and avoids the sampling gaps common in VAEs.

Experimental Setup

The models were evaluated on several standard benchmarks for representation learning:

  • 3D-Shapes: Simple geometric objects with controlled factors (shape, scale, rotation, color).
  • MPI3D (Toy and Real): A robotic arm moving objects, tested in both simulated and real-world environments.
  • Celeb-A: Complex natural images of facial attributes.

Results and Analysis

Reconstruction and Generation Quality

The 12-SAE model consistently outperformed VAE and VLAE (Variational Ladder Autoencoder) baselines in terms of Fréchet Inception Distance (FID). As shown in the results, the structured architecture produces significantly sharper and more realistic reconstructions across various datasets.

Reconstruction quality (FID Score) across 3D-Shapes, MPI3D Toy, and MPI3D Real datasets.

Disentanglement and Interpretability

On the DCI (Disentanglement, Completeness, Informativeness) metric, SAE models frequently achieved top performance. Notably, the architecture allowed the model to discover natural properties of the data without supervision. For instance, on the 3D-Shapes dataset, the 12-SAE naturally embedded object hue into a 2D circular space, discovering the periodic nature of color.

In the ASAE, attention heads specialized naturally. One head might focus on object outlines while another focuses on the background. Because the attention is non-competitive, multiple heads can attend to the same informative regions if necessary, leading to a more robust representation.

Robustness and Fairness

The SAE demonstrated superior performance in "stage-based" learning, where it successfully learned new objects without forgetting how to reconstruct previous ones. Furthermore, the structured representations were found to be significantly more "fair," showing a higher ability to predict attributes without being biased by protected variables compared to standard baselines.

Conclusion

Structural Autoencoders demonstrate that architectural inductive bias can be a powerful alternative to explicit regularization for learning disentangled representations. While challenges remain—such as scaling to hundreds of latent factors and refining the interaction between attention mechanisms and structural decoders—this work provides a strong foundation for building models that inherently understand the hierarchical and causal nature of the data they process.

Summary updated

BibTeX
@misc{leeb2020structural,
  author = {Felix Leeb and Yashas Annadani and Stefan Bauer and Bernhard Schölkopf},
  title = {{Structural Autoencoders Improve Representations for Generation and Transfer}},
  year = {2020},
  eprint = {2006.07796},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2006.07796},
}
Figure