On the Impact of Topological Regularization on Geometrical and Topological Alignment in Autoencoders: An Empirical Study

Samuel Graepler, Nico Scherf, Anna Wienhard, Diaaeldin TahaUniReps @ NeurIPS 2025

TL;DR

This paper investigates how topological regularization impacts the quality of latent representations learned by autoencoders (AEs) and variational autoencoders (VAEs). They discover that topological regularization can significantly improve the geometric alignment of these representations, even when reconstruction quality is de-emphasized, suggesting a more direct path to learning meaningful data structures.

What Problem Does This Paper Address?

Learning meaningful representations from high-dimensional data is a cornerstone of modern machine learning. The "manifold hypothesis" suggests that real-world data often resides on low-dimensional manifolds, and an ideal representation should preserve both the topology (connectivity, holes) and geometry (distances, angles) of these manifolds. However, many existing manifold learning techniques and standard autoencoders struggle to achieve this, often failing to preserve global topological structures or accurately represent local geometric properties. This paper aims to empirically evaluate how topological regularization, a technique designed to enforce topological consistency, affects both the topological and geometric alignment of latent representations learned by AEs and VAEs.

Methods

The authors employ a comparative empirical study using autoencoders (AEs) and variational autoencoders (VAEs). They introduce a topological regularization term ($L_t$) into the training objective. This term aims to align the topology of the latent space with the input data by matching the lengths of topologically relevant edges. For AEs, the total loss is $L = L_{recon} + L_t$. For VAEs, the loss is $L = \alpha L_{recon} + \beta L_{KL} + \gamma L_t$, where $\alpha$, $\beta$, and $\gamma$ are hyperparameters controlling the contribution of reconstruction, KL divergence, and topological loss, respectively.

Geometric alignment is quantified by estimating the mean extrinsic curvature of the latent embedding. This is done by fitting local quadrics to the k-nearest neighbors in the latent space and computing the curvature from the Hessian of these quadrics, a method adapted from previous work. Topological alignment is assessed visually by comparing the learned structure to the ground truth.

Datasets

The study uses six synthetic datasets specifically designed to have known topologies and curvatures. These datasets are generated by embedding smoothly deformed one- and two-dimensional manifolds (homeomorphic to circles $S^1$, spheres $S^2$, or tori $T^2$) into a 10-dimensional space ($R^{10}$). The datasets are categorized into "low-deformation" and "high-deformation" variants, where the latter involves more bending across ambient dimensions. Random rotations and small Gaussian noise are applied to all datasets.

Key Insights and Ideas

  • Topological regularization can improve geometric alignment: Surprisingly, enforcing topological consistency can lead to better preservation of local geometric properties (curvature) in the latent space, even when the reconstruction loss is minimal or absent.
  • Decoder might be redundant for topological alignment: When the reconstruction loss is omitted in AEs, the decoder becomes unconstrained, yet topological regularization still improves geometric alignment. This hints that a simpler architecture, perhaps without a decoder, might suffice for learning topologically and geometrically aligned representations.
  • VAE's KL-divergence is a hurdle: The KL-divergence term in VAEs, which encourages latent distributions to be Gaussian, actively disrupts both topological and geometric preservation. Topological regularization can partially counteract this, but the latent geometry remains noisy.
  • Choice of topological features matters: The effectiveness of topological regularization is sensitive to the choice of the topological feature dimension ($dim_t$). Inappropriate settings can even degrade topological alignment, and there's no monotonic improvement with increasing feature dimension.

Key Results

  • AEs with topological regularization: Significantly improved geometric alignment, as measured by Mean Squared Error (MSE) between input and latent curvature estimates. For instance, on the Spherehigh dataset, MSE dropped from 0.38 to 0.20 with topological regularization of dimension 1 (Figure 1). Table 1 provides detailed MSE values across various datasets and regularization settings, showing substantial reductions in error for many configurations.
  • VAEs without topological regularization: The KL-loss term disrupts topology and geometry. Topological regularization offers some improvement but doesn't fully resolve the issues.
  • Topological regularization alone: Even when the reconstruction loss was set to zero ($\alpha=0$), topological regularization could substantially improve geometric alignment.

Limitations and Future Work

  • Indirect topological assessment: Topological alignment was primarily assessed visually. A more robust quantitative measure using similarity scores based on persistent homology is suggested.
  • Limited dataset scope: The study used synthetic datasets. Future work should explore more diverse and real-world datasets.
  • Extrinsic vs. Intrinsic Curvature: The current analysis focuses on extrinsic curvature. Investigating intrinsic curvature, which is independent of the ambient space, is a promising direction.
  • Architectural implications: The observation that a decoder might be redundant for topological alignment warrants further investigation into architectures that optimize solely for topological alignment.
  • Reproducibility: Further experiments are needed to confirm the consistency of these findings across multiple runs.

Summary updated

BibTeX
@inproceedings{graepler2025impact,
  author = {Samuel Graepler and Nico Scherf and Anna Wienhard and Diaaeldin Taha},
  title = {{On the Impact of Topological Regularization on Geometrical and Topological Alignment in Autoencoders: An Empirical Study}},
  booktitle = {UniReps @ NeurIPS},
  year = {2025},
  url = {https://openreview.net/forum?id=5i6cA8XS3T},
}
Figure