Constructing VAE Latent Spaces with Prescribed Topology

Jilles S. van Hulst, Jakub M. Tomczak, W. P. M. H. Heemels, Duarte J. Antunes
6/5/2026
1 citation
cs.LGcs.CVmath.AT

Official code: JvHulst/VAE-Topology (0 stars, Python, last commit 2026-08-14).

Abstract

Variational autoencoders (VAEs) learn low-dimensional latent representations of high-dimensional data. When the data lies on a manifold with non-Euclidean topology, the standard Gaussian prior introduces a topological mismatch that degrades reconstruction quality and prevents faithful representation.

Show full abstract

We present a constructive mathematical framework that resolves this mismatch for all manifolds that admit a product covering space. These are manifolds expressible as products of elementary factors (circles, intervals, or lines) or as quotients of such products by a finite symmetry group. The class includes cylinders, tori, Möbius strips, Klein bottles, and real projective spaces. Factorized distributions over the elementary factors yield product topologies with closed-form, decoupled KL divergences, so that each latent factor can be shaped independently while keeping training tractable. We catalogue reparametrizable encoder-prior pairs for periodic, bounded, and unbounded supports, and provide coordinate transformations that allow standard neural networks to output non-Euclidean parameters with smooth gradients. For quotient manifolds, the decoder receives group-invariant features of the covering-space coordinates, so that identified points produce identical outputs. Anchor constraints fix the coordinate system relative to the data or create soft topological holes. Experiments on synthetic manifolds and real-image datasets (rotated and cyclically shifted MNIST) confirm that a topology-matched prior aligns KL regularization with the data manifold. The resulting topology-aware models outperform the Gaussian baseline at all practically relevant regularization strengths. The code is available at https://github.com/JvHulst/VAE-Topology.

View on arXivView PDF

Code Implementations(1)

00PythonAug 14, 20263 months ago

Similar Papers

Cite this paper

@article{hulst2026constructing,
  title  = {Constructing VAE Latent Spaces with Prescribed Topology},
  author = {Jilles S. van Hulst and Jakub M. Tomczak and W. P. M. H. Heemels and Duarte J. Antunes},
  year   = {2026},
  eprint = {2606.07058},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2606.07058v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2606.07058.svg)](https://codeofpaper.com/paper/2606.07058)

Discussion