Abstract
Representation learning aims to uncover the underlying factors of variation in data, such as object identity, pose, or lighting. Traditional approaches often struggle to balance the statistical independence of disentanglement with the mathematical structure of equivariance. We propose Flow Factorized Representation Learning, a generative framework that models transformations as distinct probabilistic paths in a latent space. By integrating dynamic Optimal Transport and potential fields, our model learns to represent complex data transformations as velocity fields, enabling superior disentanglement, equivariance, and cross-domain generalization.
Introduction
A central goal in artificial intelligence is to learn representations where the generative factors of a scene are neatly separated. Historically, this has been pursued through two primary lenses: disentanglement, which seeks statistical independence between latent dimensions, and equivariance, which ensures that data transformations correspond to predictable operations in latent space. However, disentanglement methods often suffer from topological defects on complex data, while equivariant networks are frequently limited to rigid, pre-defined symmetries.
In "Flow Factorized Representation Learning," we introduce a middle ground. By treating transformations as "flows" guided by the physics of Optimal Transport, we create a model that is both flexible enough for real-world complexity and mathematically grounded.
Methodology
The core of our approach is a Variational Autoencoder (VAE) where the latent space is dynamic rather than static. We model the time evolution of latent variables through several key components:
- Latent Flows: We define $k$ distinct potential functions, modeled by multi-layer perceptrons (MLPs). The gradient of these potentials, $\nabla u^k$, creates a velocity field that drives a latent point along a specific trajectory.
- Dynamic Optimal Transport (OT): To ensure these paths are efficient and physically plausible, we enforce the continuity equation and the Hamilton-Jacobi (HJ) equation, borrowing principles from fluid mechanics.
- Physics-Informed Neural Networks (PINNs): We utilize PINN loss terms to encourage the learned potentials to satisfy the partial differential equations (PDEs) of Optimal Transport.
The model operates in both supervised and weakly-supervised modes. In the latter, the model must infer which transformation is occurring within a sequence of observations.
Experimental Results
We evaluated our model on four benchmarks: Modified MNIST, Shapes3D, and the high-resolution Falcol3D and Isaac3D datasets.
Performance and Generalization
Our model significantly outperformed existing baselines. On the MNIST benchmark, it reduced equivariance error by approximately 70 points compared to state-of-the-art methods like PoFlow and TVAE. Furthermore, it achieved higher log-likelihoods, indicating a more accurate generative model of the data.
A key strength of our approach is the ability to "mix and match" learned transformations. Because transformations are represented as vector fields, they can be superposed. For instance, a model can simultaneously apply "rotation" and "scaling" to an image, even if that specific combination was never seen during training.
Cross-Dataset Robustness
In a notable test of generalization, a model trained on MNIST digits successfully applied its learned rotation and scaling flows to the dSprites dataset (geometric shapes). This demonstrates that the model learns the nature of the transformation rather than just memorizing dataset-specific features.
Discussion and Conclusion
Flow Factorized Representation Learning offers a robust framework for learning structured latent spaces. By viewing disentanglement as distinct tangent directions (velocity vectors) at every point in latent space, we overcome many of the limitations of axis-aligned disentanglement.
While the use of PINNs provides a flexible way to incorporate physical constraints, these constraints are approximate. Future work may explore more rigorous PDE solvers or more efficient posterior inference that considers entire sequences. Despite the increased computational cost of training multiple potential fields, the gains in equivariance and generalization represent a significant step forward in representation learning.
Reference: Song, Y., Keller, T. A., Sebe, N., & Welling, M. (2023). Flow Factorized Representation Learning. 37th Conference on Neural Information Processing Systems (NeurIPS 2023).
Summary updated