NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

No Representation without Transformation

Giorgio Giannone, Jonathan Masci, Christian Osendorfer

Abstract

We extend the framework of variational autoencoders to represent transformations explicitly in the latent space. In the family of hierarchical graphical models that emerges, the latent space is populated by higher order objects that are inferred jointly with the latent representations they act on. To explicitly demonstrate the effect of these higher order objects, we show that the inferred latent transformations reflect interpretable properties in the observation space. Furthermore, the model is structured in such a way that in the absence of transformations, we can run inference and obtain generative capabilities comparable with standard variational autoencoders. Finally, utilizing the trained encoder, we outperform the baselines by a wide margin on a challenging out-of-distribution classification task.

Introduction

Standard Variational Autoencoders (VAEs) are powerful tools for learning compressed data representations. However, they often fail to distinguish between an object's "content" (its identity) and its "transformation" (pose, scale, or orientation). This lack of structural disentanglement makes them vulnerable to domain shifts; for instance, a model trained on upright digits may struggle to recognize rotated ones.

While group theory provides an elegant mathematical language for transformations, real-world data is often too noisy for direct application. We propose Transformation-aware Variational Autoencoders (TVAE) to bridge this gap by integrating group-theoretic principles into the probabilistic VAE framework, allowing the model to explicitly infer and apply transformations within its latent space.

Methodology

The TVAE architecture introduces a structured latent space where transformations are treated as higher-order objects. Unlike standard VAEs that map an input to a single latent vector, the TVAE is trained on "triplets" $(x_0, x_1, x_2)$. Here, $x_1$ is a version of $x_0$ transformed by some operation $g$, and $x_2$ is transformed by its inverse $g^{-1}$.

Graphical model comparison: (a) Standard VAE, (b) VAE with identity, (c) TVAE with explicit latent transformations.

Key technical innovations include:

  • Latent Transformation Variable ($\tau$): A latent variable inferred jointly with the representation $z$ that represents the transformation itself.
  • Latent Algebra: The model enforces the group property of inverses directly in the latent space: $z_1 = \tau(z)$ and $z_2 = \tau^{-1}(z)$. This "hard-codes" the group property directly into the architecture.
  • Parameterization: The authors explore additive (translation), matrix (rotation), and neural network-based parameterizations for $\tau$.
  • MMD-based Loss: Maximum Mean Discrepancy (MMD) is utilized instead of standard KL-divergence for certain terms to handle deterministic constraints effectively.

Experiments and Results

We evaluated TVAE on image datasets including MNIST, Fashion-MNIST (F-MNIST), and Omniglot, augmented with transformations like rotation and shear.

Examples of training triplets from MNIST, F-MNIST, and Omniglot. The center image is the original; left and right are transformed by approximately inverse operations.

Out-of-Distribution (OOD) Performance

The model's robustness was tested on AffNIST, a variant of MNIST designed for affine transformation challenges. Utilizing the trained encoder with a simple K-Nearest Neighbor (KNN) classifier, TVAE achieved significant gains:

  • MNIST to AffNIST: TVAE achieved 85% accuracy, significantly outperforming the standard VAE (64%) and data-augmented VAE+ (75%).
  • Extreme Shift (F-MNIST to AffNIST): TVAE maintained 80% accuracy, while the standard VAE performance plummeted to 33%.

TVAE also demonstrated superior sample efficiency and more stable training compared to baselines, while maintaining generative quality comparable to standard VAEs on in-distribution data.

Discussion and Conclusion

The philosophy "No Representation without Transformation" posits that an object's identity is fundamentally defined by its behavior under transformation. By using algebra as a regularizer, TVAE learns an interpretable latent space where transformations capture semantic properties.

While the current model requires manual specification of the transformation type and assumes bijectivity, it represents a significant step toward more robust and structured generative models. Future work will explore automatic learning of these structural properties and potential applications to time-series data.

Summary updated

BibTeX
@misc{giannone2019no,
  author = {Giorgio Giannone and Jonathan Masci and Christian Osendorfer},
  title = {{No Representation without Transformation}},
  year = {2019},
  eprint = {1912.03845},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1912.03845},
}
Figure