Invariant-Equivariant Representation Learning for Multi-Class Data

Ilya FeigeICML 2019

Deep neural networks are incredibly powerful at learning representations, but those representations are often "opaque"—tangled messes of information where it's impossible to tell where "identity" ends and "style" begins. For example, in a dataset of faces, a standard model might mix up the person's identity with their head tilt or the lighting.

Existing attempts to "disentangle" these features usually fall into two camps: tweaking objective functions (like in $\beta$-VAE) to force neurons to specialize, which often hurts overall performance, or hard-coding specific mathematical symmetries (like rotations) into the architecture, which requires prior knowledge of the data's symmetries.

The EQUIVAE (Equivariant Variational Autoencoder) approach offers a conceptually transparent middle ground. It is a novel VAE architecture that disentangles data into two distinct representations: an invariant latent (the "what"—class identity) and an equivariant latent (the "how"—style or pose). By strategically routing multiple data points from the same class during training, the model learns to separate global class information from individual variations naturally, without requiring complex penalty terms or pre-defined symmetry groups.

The EQUIVAE Architecture: Strategic Data Routing

EQUIVAE's "secret sauce" isn't a fancy new loss function, but rather its strategic data routing. The model separates the latent space into two distinct components:

  • The Invariant Latent ($r$): This is a deterministic representation of the class. To ensure $r$ only learns class-wide information, the model calculates it by averaging the embeddings of other members of the same class, explicitly excluding the specific data point being reconstructed. This forces the model to find the "common denominator" of the class.
  • The Equivariant Latent ($v$): This is a stochastic (probabilistic) latent that captures the specific instantiation of the data point (e.g., the specific slant of a handwritten digit). It is inferred from both the target image and the invariant latent $r$.
EQUIVAE architecture showing the calculation of the invariant latent from multiple class examples and its use in deriving the equivariant latent.

To reconstruct the original image, the decoder receives both $r$ (the "template" for the class) and $v$ (the "instructions" on how to modify that template). This approach is flexible, working in both supervised settings (where all labels are known) and semi-supervised settings (where only some labels are known) by marginalizing over possible labels for unlabeled data.

Key Insights and Disentanglement Results

The most elegant insight of EQUIVAE is that routing acts as regularization. By simply withholding the target image from the class-latent calculation, the architecture creates a bottleneck that forces the model to learn generalizable class features. Furthermore, using a deterministic latent for the class ($r$) and a stochastic one for the variation ($v$) prevents the "competition" often seen in standard VAEs, where one latent variable tries to explain all the variance while the other remains empty.

The paper evaluates EQUIVAE on classic computer vision benchmarks like MNIST and SVHN (Street View House Numbers). On MNIST, EQUIVAE achieved a highly competitive supervised error rate of 0.82%, matching or beating more complex models. In semi-supervised scenarios with only 100 labeled MNIST examples, it achieved an error rate of 8.90%, significantly outperforming the benchmark classifier's 21.91%.

Because the invariant latent $r$ is so effective at capturing class identity, new images can be classified simply by finding the nearest class cluster in the latent space—a "zero-parameter" classification that performs nearly as well as a dedicated neural network.

Latent space visualizations demonstrating clear clustering in the invariant space and uniform distribution in the equivariant space.

The success of this disentanglement is most obvious in the latent space visualizations. The invariant space perfectly clusters by class identity, while the equivariant space forms a uniform distribution, indicating it has successfully stripped away class identity to focus purely on style. This allows the model to perform "style transfers"—taking the specific slant and thickness of one digit and applying it to the identity of another—and generate smooth interpolations across different styles.

Limitations and Future Directions

While powerful, EQUIVAE has limitations. The primary constraint is the "label tax": it requires some labeled data to define the concept of a "class" and cannot currently discover classes in a purely unsupervised manner. Additionally, the model assumes that each class lives on a "smooth manifold." While this holds true for digits or simple objects, it remains unclear how well this scales to highly discontinuous or multi-modal data.

Future work could explore different ways to aggregate information for the invariant latent beyond simple averaging, and test the model's capabilities on more complex, high-dimensional datasets beyond standard digit benchmarks.

Summary updated

BibTeX
@inproceedings{feige2019invariant,
  author = {Ilya Feige},
  title = {{Invariant-Equivariant Representation Learning for Multi-Class Data}},
  booktitle = {International Conference on Machine Learning},
  year = {2019},
}
Figure