Disentangled Representation Learning with the Gromov-Monge Gap

Théo Uscidda, Luca Eyring, Karsten Roth, Fabian J Theis, Zeynep Akata, marco cuturi

TL;DR

This paper introduces the Gromov-Monge Gap (GMG), a novel regularizer for unsupervised disentangled representation learning based on quadratic optimal transport. By seeking the "best possible compromise" between matching a latent prior and preserving the data's intrinsic geometry, GMG achieves state-of-the-art disentanglement performance across several standard benchmarks.

What Problem Does This Paper Address?

In unsupervised learning, disentanglement is the holy grail: we want a model to automatically discover independent factors of variation (like an object’s color, shape, or rotation) from raw data without any labels.

Most current methods, like Variational Autoencoders (VAEs), try to achieve this by "prior matching"—forcing the learned latent representations to fit a simple, factorized distribution (usually a Gaussian). Recently, researchers found that performance improves if the model also tries to preserve the geometry of the data (e.g., if two images are "close" in pixel space, their latent codes should be "close" too).

However, there is a fundamental conflict: a mapping that perfectly matches a Gaussian prior while perfectly preserving the data's geometry often does not exist. Standard geometric losses (like Distortion) over-penalize the model for this impossible task, forcing a trade-off that often hurts the quality of the learned representations.

Methods

The authors propose a solution rooted in Quadratic Optimal Transport. Instead of penalizing any geometric distortion, they propose the Gromov-Monge Gap (GMG).

The Core Idea: "Debiased" Distortion

Standard distortion losses (DST) measure how much a mapping $T$ changes the distances or angles between points. The authors argue that if the "source" (data) and "target" (prior) have different intrinsic shapes, some distortion is inevitable.

Comparison of mappings with zero and positive Gromov-Monge Gap.

The GMG is defined as: $$\text{GMG}(T) = \text{Distortion}(T) - \text{Minimal Possible Distortion}$$

By subtracting the "Minimal Possible Distortion" (calculated via the Gromov-Wasserstein distance), the GMG only penalizes the model for distortion that is unnecessary. If a map is as geometry-preserving as it can possibly be given the two distributions, the GMG is zero.

Implementation

  • Integration: The GMG is added as a regularization term to standard VAE and TCVAE objectives.
  • Computation: To make it practical, the authors use an efficient entropic solver (similar to the Sinkhorn algorithm) to estimate the gap from mini-batches during training.
  • Geometric Costs: They explore different ways to measure geometry, including squared L2 distances and Cosine Similarity (angle preservation).

Datasets

The authors evaluated their approach on four classic disentanglement benchmarks, all consisting of images with known underlying factors:

  1. Shapes3D: 3D shapes with varying colors, scales, and rotations.
  2. dSprites: 2D shapes with varying positions and orientations.
  3. SmallNORB: Images of toys from different categories and lighting conditions.
  4. Cars3D: Rendered 3D car models.

They also tested the scalability of the method on upscaled (128x128) versions of the Shapes3D dataset.

Key Insights and Ideas

  • Angles > Distances: One of the most significant findings is that preserving angles (Cosine Similarity) consistently outperforms preserving distances. The authors suggest this is because angle preservation is a "weaker" constraint, giving the latent space more flexibility to satisfy the prior matching requirement.
  • Decoder Regularization: Regularizing the decoder (mapping latents back to data) is generally more effective for disentanglement than regularizing the encoder.
  • Weak Convexity: The authors provide a theoretical proof that the GMG is "weakly convex." From a practitioner's view, this means the loss function is mathematically "well-behaved" and easier to optimize than standard distortion losses.
  • Gradient Stability: The GMG produces much more stable gradients across different batches compared to standard distortion losses, leading to more robust training.

Key Results

The primary metric used is DCI-D (Disentanglement score).

  • State-of-the-Art: Adding GMG to a $\beta$-TCVAE model (already a strong baseline) significantly boosted scores. For example, on Shapes3D, the base model scored ~90.2, while adding the GMG with angle preservation pushed it to 96.9.
  • Consistency: The GMG outperformed other geometric regularizers (like the Jacobian-based "Jac" or standard Distortion "DST") across almost all datasets and base architectures.
  • Scalability: The method maintained its performance gains even when moving to higher-resolution images (128x128), where the computational overhead remained negligible (approx. 3ms per batch).

Limitations and Future Work

  • Hyperparameters: Like most VAE variants, the method introduces a new weighting hyperparameter ($\lambda$) for the GMG term, which requires tuning.
  • Computational Cost: While the authors describe the cost as "negligible," it does require running several Sinkhorn iterations per training step, which is more expensive than a simple L2 loss.
  • Decoder-Free Learning: In the appendix, the authors explore using GMG without a decoder/reconstruction loss. Interestingly, in this specific "decoder-free" setting, standard distortion (DST) actually performed better than GMG. This suggests that the "debiasing" effect of GMG is most useful when it acts as a secondary constraint alongside a reconstruction task. Future work could investigate how to better adapt GMG for purely self-supervised, encoder-only settings.

Summary updated

BibTeX
@inproceedings{uscidda2025disentangled,
  author = {Théo Uscidda and Luca Eyring and Karsten Roth and Fabian J Theis and Zeynep Akata and marco cuturi},
  title = {{Disentangled Representation Learning with the Gromov-Monge Gap}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=ehr4oTe6XI},
}
Figure