Abstract
Learning disentangled representations with variational autoencoders (VAEs) is often attributed to the regularisation component of the loss. In this work, we highlight the interaction between data and the reconstruction term of the loss as the main contributor to disentanglement in VAEs. We show that standard benchmark datasets have unintended correlations between their subjective ground-truth factors and perceived axes in the data according to typical VAE reconstruction losses. Our work exploits this relationship to provide a theory for what constitutes an adversarial dataset under a given reconstruction loss. We verify this by constructing an example dataset that prevents disentanglement in state-of-the-art frameworks while maintaining human-intuitive ground-truth factors. Finally, we re-enable disentanglement by designing an example reconstruction loss that is once again able to perceive the ground-truth factors. Our findings demonstrate the subjective nature of disentanglement and the importance of considering the interaction between the ground-truth factors, data and notably, the reconstruction loss, which is under-recognised in the literature.
Introduction
In the field of representation learning, "disentanglement" refers to the ability of a model to learn latent variables that each correspond to a single, human-interpretable factor of variation, such as an object's position, color, or scale. Traditionally, researchers have credited the regularization term of the Variational Autoencoder (VAE) loss—the part that forces the latent space to follow a simple prior—for this behavior.
However, this perspective leaves a critical question unanswered: why do VAEs align their latent variables with human-intuitive factors specifically? This paper addresses this gap by investigating the role of the reconstruction loss and how its perception of distance in the data space drives the organization of the latent space.
Perceived Distance Theory
The authors introduce the concept of perceived distance, defining the distance between two observations as the reconstruction loss between them: $d_{pcv}(x^{(a)}, x^{(b)}) = \mathcal{L}_{rec}(x^{(a)}, x^{(b)})$. In a VAE, the model organizes its latent space based on these distances; if a loss like Mean Squared Error (MSE) perceives a small difference between two images, the VAE will attempt to place them close together in the latent space.
This theory suggests that disentanglement in standard benchmarks is often an "accident" of the data structure. In datasets like dSprites, ground-truth factors (like x-position) naturally correlate with pixel-wise MSE. The VAE disentangles because the loss function happens to "perceive" the factors we care about.
The Adversarial Challenge: XYSquares
To prove the importance of the reconstruction loss, the authors created an adversarial dataset called XYSquares. It consists of three colored squares moving on a grid, sized such that they never overlap. To a pixel-wise loss like MSE, moving a square one pixel looks identical to moving it across the entire screen—the loss is constant because there is no overlap between the original and shifted positions. This "constant overlap" problem blinds the VAE to spatial transitions, causing state-of-the-art models like $\beta$-VAE to fail completely at disentanglement.
Datasets and Benchmarks
The paper evaluates its findings across several standard benchmarks, demonstrating that these datasets possess the specific correlations between factors and pixel-wise distances that facilitate unsupervised learning.
Key Results and the "Blur" Fix
The authors demonstrate that disentanglement can be restored on adversarial data by making the reconstruction loss "spatially aware." By applying a simple box-blur to images before calculating the MSE, the loss begins to perceive overlaps between objects that do not physically overlap in raw pixel space. This provides the necessary signal for the model to learn spatial relationships, restoring high disentanglement scores (MIG and DCI).
Conclusion
The study concludes that disentanglement is inherently subjective and dependent on the choice of reconstruction loss. Truly unsupervised disentanglement may be impossible for arbitrary data without providing some form of inductive bias or weak supervision to define which distances in the data space actually matter. Future work should focus on identifying reconstruction losses that naturally align with human-interpretable factors for complex, real-world data.
Summary updated