TL;DR
This paper introduces a novel framework that applies Flow Matching to disentangled representation learning by modeling data generation as factor-conditioned deterministic flows in a compact latent space. By incorporating an output-attention mechanism and an orthogonality regularizer, the method enforces explicit semantic alignment and prevents information leakage between distinct factors of variation. The resulting model consistently outperforms existing VAE, GAN, and diffusion-based baselines in both disentanglement quality and downstream sample efficiency.
What Problem Does This Paper Address?
Disentangled representation learning aims to break down high-dimensional data into independent, interpretable latent factors (such as an object's shape, color, or size). While classical methods like VAEs and GANs struggle with a trade-off between reconstruction quality and factor separation, recent attention has turned to diffusion models.
However, existing diffusion-based approaches suffer from a major flaw: they focus heavily on statistical independence but lack strong semantic alignment. This means latent dimensions might be statistically decorrelated yet still mix multiple semantic attributes together. Furthermore, the stochastic nature of diffusion trajectories makes precise, factor-wise geometric control difficult and computationally expensive.
Methods
The authors propose casting disentanglement as learning a factor-conditioned flow within a compact latent space.
[Input Image I] ──> [VQ-GAN Encoder] ──> Latent Target z₁
│
└──> [Factor Encoder T_γ] ──> N Factor Embeddings S_γ(I)
- Latent Space Flow Matching: Instead of operating directly on pixels, the model uses a pretrained VQ-GAN encoder to map images into a stable, compact latent space ($z_1$). It then learns continuous-time generative dynamics to transport a simple Gaussian prior ($z_0$) to $z_1$ via an Ordinary Differential Equation (ODE).
- Factorized Velocity via Output Attention: To achieve factor-level control, the aggregate velocity field ($v_\theta$) predicted by a U-Net backbone is explicitly decomposed into $N$ factor-specific components ($v_\theta^{(i)}$). This is implemented using an output-attention routing mask that distributes the velocity across factors at each spatial location while guaranteeing mass conservation (the components sum up exactly to the total velocity).
- Orthogonality Regularization ($L_{orth}$): To prevent different factors from redundantly explaining the same transport dynamics, the authors introduce a regularizer that penalizes the pairwise cosine similarity between the flattened factor-specific velocity vectors. This forces each factor to govern a distinct, non-overlapping trajectory in the latent space.
Datasets
The framework was evaluated on three standard synthetic benchmarks and one real-world dataset:
- Cars3D: 3D-rendered car images with viewpoint-related factors.
- Shapes3D: Procedurally rendered 3D objects with controlled attributes (shape, size, color, orientation).
- MPI3D-toy: Images rendered in a controlled physical environment containing seven distinct generative factors.
- CelebA: A large-scale, real-world face dataset with attribute annotations used to test generalization to complex data distributions.
Key Insights and Ideas
- Deterministic vs. Stochastic Paths: The core "aha moment" is that the straight, deterministic trajectories of flow matching provide a cleaner geometric foundation for semantic alignment than the noisy, stochastic paths inherent to diffusion models.
- Decomposing the Vector Field: Rather than trying to force independence purely at the representation level, this method forces independence at the dynamics level. By making the velocity fields orthogonal, changing one factor physically moves the latent state in a direction that the other factors completely ignore.
- Mass Conservation via Softmax Gating: Gating the aggregate velocity field using a simplex constraint ($\sum \text{Attn}_i = 1$) ensures that the model preserves the exact flow-matching objective while seamlessly distributing attribution among factors with minimal computational overhead.
Key Results
The proposed method achieves state-of-the-art performance across multiple metrics:
- Disentanglement Scores: On the challenging MPI3D-toy dataset, the model achieves a FactorVAE score of 0.907 and a DCI score of 0.649, drastically outperforming the strongest VAE baseline (DAVA: 0.410 / 0.300) and leading diffusion baselines like DyGA.
- Real-World Performance (CelebA): The model achieves the highest attribute-level controllability (TAD score of 1.154) alongside superior image generation quality (FID of 8.1).
- Downstream Efficiency: When the learned representations were used to train Gradient Boosted Trees under data-scarce conditions (using only 100 or 1,000 samples), the model consistently yielded higher classification accuracy than all baselines, proving that the learned factors are highly informative and sample-efficient.
Limitations and Future Work
- Sensitivity to the Number of Factors ($N$): The authors note that model performance degrades if $N$ is set too small, as it forces distinct semantic attributes to entangle. Aligning model capacity with the true intrinsic dimensionality of the data remains crucial.
- Dependence on Pretrained Latent Spaces: The framework relies on a frozen, pretrained VQ-GAN to provide the compact latent space, meaning any limitations or artifacts in the VQ-GAN's reconstruction capabilities could propagate to the generation phase.
- Future Directions: Promising avenues include extending this framework to fully unsupervised settings where the number of factors $N$ can be discovered dynamically during training.
Summary updated