Demystifying Inter-Class Disentanglement

Aviv Gabbay, Yedid Hoshen

Learning to disentangle the hidden factors of variation within a set of observations is a fundamental challenge in artificial intelligence. The authors of this paper introduce LORD (Latent Optimization for Representation Disentanglement), a non-adversarial method that achieves state-of-the-art disentanglement. By ditching traditional encoders during training in favor of direct latent optimization, and combining shared class embeddings with a unique asymmetric noise regularization, LORD prevents the "information leakage" that typically plagues generative models.

The Problem: Information Leakage in Disentanglement

Disentanglement is the AI equivalent of separating the signal from the noise—specifically, separating permanent attributes (like the identity of a person) from transitory ones (like their pose or facial expression).

While humans do this effortlessly, machine learning models struggle with information leakage. In many current models, the "identity" code accidentally captures some "pose" information, and vice versa. Existing solutions usually rely on adversarial training (which is notoriously unstable) or amortized inference (using encoders to predict codes). The authors argue that encoders are often "too smart" for their own good: they find shortcuts to sneak information between representations, leading to blurry results or identity shifts during image editing.

The LORD Approach: Methods and Architecture

To combat these issues, the authors propose a two-stage approach:

1. Shared Latent Optimization (Stage 1) Instead of training an encoder to guess the latent codes, LORD treats the codes themselves as learnable parameters.

  • Class Codes: Every image in a specific class (e.g., all photos of a specific person) is forced to share the exact same latent vector. This creates a hard mathematical barrier: it is impossible for the class code to contain image-specific pose information because it must represent the entire group.
  • Asymmetric Noise Regularization: To prevent the "content" code from stealing identity information, fixed Gaussian noise is added to the content latent during training. This acts as a bottleneck, forcing the model to only store the most essential, non-identity information in the content vector.
LORD Architecture Diagram

2. Amortization for Inference (Stage 2) Because latent optimization is slow and only works for images seen during training, the authors train a standard feed-forward encoder after the first stage. This encoder learns to map images to the high-quality codes discovered in Stage 1, enabling fast processing of new, unseen images.

Key Insights

  • Encoders are the Leak: The paper suggests that amortized inference (using an encoder during training) is a primary cause of poor disentanglement. Direct optimization is slower but results in much cleaner latent spaces.
  • The Failure of KL-Divergence: In Variational Autoencoders (VAEs), KL-divergence is used to regularize the latent space. The authors show this often leads to "partial posterior collapse," where the model ignores most latent dimensions, effectively creating a narrow bottleneck rather than true disentanglement.
  • Noise as a Better Barrier: Using fixed-variance noise (Asymmetric Noise Regularization) is more effective than KL-divergence because it applies a uniform penalty across all dimensions, preventing the model from finding low-variance loopholes to leak information.

Datasets and Key Results

The model was evaluated on a wide variety of benchmarks, including Cars3D, SmallNorb, CelebA (over 200,000 celebrity faces), KTH (human action videos), RaFD, and Edges2Shoes. Notably, LORD successfully scaled to disentangle identities across 10,000 different classes in the CelebA dataset.

  • Quantitative Superiority: LORD achieved the lowest LPIPS (Perceptual Similarity) error in content transfer tasks compared to leading models like DrNet and ML-VAE. On Cars3D, LORD achieved an error of 0.078, significantly beating DrNet's 0.095.
  • Near-Perfect Separation: In classification tests (trying to guess the class from the content code), LORD's content codes yielded random chance accuracy. This proves that the content codes contained virtually zero identity information.
  • Qualitative Fidelity: Visual results show that LORD can change the pose of a car or the expression of a face while keeping the underlying identity much more consistent than previous methods, which often morph the identity slightly during the transition.
Qualitative comparison on CelebA dataset

Limitations and Future Work

While highly effective, LORD has limitations. Because latent optimization requires optimizing parameters for every single image in the training set, it is computationally more expensive and slower to train than purely encoder-based models. Furthermore, the core assumption is that inter-class variation is larger than intra-class variation. If a "class" is too broad, the model struggles, though the authors propose a clustering-based extension to handle this.

Ultimately, the principles of latent optimization and asymmetric noise introduced by LORD offer a robust new path forward, with potential extensions beyond images to audio or text disentanglement.

Summary updated

BibTeX
@inproceedings{gabbay2020demystifying,
  author = {Aviv Gabbay and Yedid Hoshen},
  title = {{Demystifying Inter-Class Disentanglement}},
  booktitle = {International Conference on Learning Representations},
  year = {2020},
  url = {https://openreview.net/forum?id=NwWoGVnMp5NF},
}
Figure