Disentangled representations via score-based variational autoencoders

Benjamin Lyo, Eero P. Simoncelli, Cristina SavinarXiv 2025 · OpenReview

Abstract: We present the Score-based Autoencoder for Multiscale Inference (SAMI), a method for unsupervised representation learning that combines the theoretical frameworks of diffusion models and VAEs. By unifying their respective evidence lower bounds, SAMI formulates a principled objective that learns representations through score-based guidance of the underlying diffusion process. The resulting representations automatically capture meaningful structure in the data: it recovers ground truth generative factors in our synthetic dataset, learns factorized, semantic latent dimensions from complex natural images, and encodes video sequences into latent trajectories that are straighter than those of alternative encoders, despite training exclusively on static images. Furthermore, SAMI can extract useful representations from pre-trained diffusion models with minimal additional training. Finally, the explicitly probabilistic formulation provides new ways to identify semantically meaningful axes in the absence of supervised labels, and its mathematical exactness allows us to make formal statements about the nature of the learned representation. Overall, these results indicate that implicit structural information in diffusion models can be made explicit and interpretable through synergistic combination with a variational autoencoder.

Introduction

Representation learning aims to uncover the underlying structure of data, ideally separating independent factors of variation into distinct latent variables—a property known as disentanglement. While Variational Autoencoders (VAEs) provide structured latent spaces, they often struggle with a trade-off between disentanglement and reconstruction quality. Conversely, diffusion models generate high-fidelity images but lack an explicit, interpretable latent space for principled manipulation. We introduce the Score-based Autoencoder for Multiscale Inference (SAMI), a framework that unifies these two paradigms to learn high-quality, disentangled representations without supervised labels.

Methods

SAMI treats a conditional diffusion process as the generative component of a VAE. By deriving a mathematically exact Evidence Lower Bound (ELBO), the model combines the VAE's latent regularization with the diffusion model's denoising objective.

The SAMI framework unifies VAEs and diffusion models. (A) Graphical models showing the relationship between SAMI, VAEs, and diffusion. (B) The architecture uses an inference network to provide a guidance score to a denoiser. (C) Geometric interpretation of the latent and image space mappings.

A key innovation is Score-Based Guidance. Instead of requiring a separate classifier, SAMI reuses its own inference network (encoder) to provide a "guidance score." This score directs the denoiser in image space to satisfy a specific latent code. Furthermore, a dual encoding strategy maps both clean and noisy images into the same latent space, regularizing the space and ensuring coherence across noise scales. This probabilistic formulation allows for the unsupervised discovery of semantically meaningful axes via posterior covariance analysis.

Datasets and Evaluation

The model's performance was evaluated across diverse data types, ranging from controlled synthetic environments to high-resolution natural images and video sequences.

Graphical model for the synthetic disks dataset, illustrating the independent factors of variation: x-position ($c_x$), y-position ($c_y$), and background intensity ($I_{bg}$).
  • Synthetic Disks: A controlled environment used to verify the recovery of ground-truth generative factors.
  • CelebA & CelebA-HQ: Standard benchmarks for face disentanglement and high-resolution image generation.
  • CelebV: A video dataset used to analyze the temporal coherence of learned representations.

Key Insights

Multiscale Disentanglement

Diffusion models naturally process data from coarse to fine scales. SAMI leverages this hierarchy: global features like face shape are captured at high noise levels, while fine details like eye color emerge at lower noise levels. This multiscale approach naturally encourages the separation of features.

Latent Space Smoothing

The authors demonstrate that training on noisy images implicitly minimizes the curvature (Hessian) of the latent space. This prevents "latent holes"—regions of the latent space that produce nonsensical outputs—which are a common issue in traditional VAEs.

Video Trajectory Straightening

Remarkably, despite being trained only on static images, SAMI "straightens" video trajectories in its latent space. Natural movements, such as a mouth opening, map to nearly straight lines in the 512-dimensional latent space, suggesting the model captures the underlying semantic "physics" of the data.

Results

SAMI demonstrates state-of-the-art performance in disentanglement and image quality:

  • Disentanglement: On CelebA, SAMI achieved a Total AUROC Difference (TAD) score of 0.583, significantly outperforming diffusion-based baselines like DiffAE (0.155) and InfoDiffusion (0.299).
  • Image Quality: The model achieved a Fréchet Inception Distance (FID) of 16.3, maintaining high interpretability without sacrificing fidelity.
  • Flexibility: SAMI can be applied to pre-trained diffusion models. By freezing a generative model and training only the inference network, users can extract controllable latent variables with minimal additional training.

Conclusion and Future Work

SAMI provides a principled way to make the implicit structural information in diffusion models explicit and interpretable. While the model achieves impressive results, challenges remain in ensuring that all latent axes are "globally" interpretable across all data points. Future work will explore the theoretical links between guidance scores and information theory to further refine the foundations of unsupervised representation learning.

Summary updated

BibTeX
@misc{lyo2025disentangled,
  author = {Benjamin Lyo and Eero P. Simoncelli and Cristina Savin},
  title = {{Disentangled representations via score-based variational autoencoders}},
  year = {2025},
  eprint = {2512.17127},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2512.17127},
}
Figure