Abstract
Auto-encoders are among the most popular neural network architecture for dimension reduction. They are composed of two parts: the encoder which maps the model distribution to a latent manifold and the decoder which maps the latent manifold to a reconstructed distribution. However, auto-encoders are known to provoke chaotically scattered data distribution in the latent manifold resulting in an incomplete reconstructed distribution. Current distance measures fail to detect this problem because they are not able to acknowledge the shape of the data manifolds, i.e. their topological features, and the scale at which the manifolds should be analyzed. We propose Persistent Homology for Wasserstein Auto-Encoders, called PHom-WAE, a new methodology to assess and measure the data distribution of a generative model. PHom-WAE minimizes the Wasserstein distance between the true distribution and the reconstructed distribution and uses persistent homology, the study of the topological features of a space at different spatial resolutions, to compare the nature of the latent manifold and the reconstructed distribution. Our experiments underline the potential of persistent homology for Wasserstein Auto-Encoders in comparison to Variational Auto-Encoders, another type of generative model. The experiments are conducted on a real-world data set particularly challenging for traditional distance measures and auto-encoders. PHom-WAE is the first methodology to propose a topological distance measure, the bottleneck distance, for Wasserstein Auto-Encoders used to compare decoded samples of high quality in the context of credit card transactions.
Introduction
Auto-encoders are fundamental tools for dimensionality reduction, yet they frequently suffer from a significant drawback: the generation of "chaotically scattered" latent spaces. When an encoder maps high-dimensional data into a lower-dimensional manifold, it often disrupts the underlying geometric and topological structure of the data.
Traditional evaluation metrics, such as Mean Squared Error (MSE) or Kullback–Leibler (KL) divergence, are primarily point-wise or distribution-based. They remain "blind" to the global shape or connectivity of the data manifold. A model might achieve low MSE while simultaneously destroying essential topological features like loops or clusters. PHom-WAE addresses this by introducing a quantitative topological distance measure—the bottleneck distance—to ensure that generative models preserve the "shape" of the data.
Methodology: PHom-WAE
The PHom-WAE framework combines the stability of Wasserstein Auto-Encoders (WAE) with the structural insights of Topological Data Analysis (TDA).
Wasserstein Auto-Encoder Training
Unlike standard Variational Auto-Encoders (VAEs) that use KL-divergence, WAEs minimize the Optimal Transport (Wasserstein) distance between the true data distribution and the reconstructed distribution. This approach typically leads to more stable training and a more coherent latent space.
Persistent Homology Analysis
To evaluate the quality of the manifolds, the authors apply Persistent Homology (PH) across the original, latent, and reconstructed spaces. The process involves:
- Filtration: Growing disks of radius $\epsilon$ around each data point. As $\epsilon$ increases, overlapping disks form simplicial complexes (networks of points, edges, and higher-dimensional faces).
- Topological Summaries: Tracking the "birth" and "death" of topological features, such as connected components ($H_0$) and loops ($H_1$), as the scale $\epsilon$ varies. These are visualized as barcodes or persistence diagrams.
- Bottleneck Distance: Calculating the distance between persistence diagrams to provide a single metric of topological similarity between two datasets.
Experimental Setup and Results
The methodology was tested on the Kaggle Credit Card Fraud Detection dataset, characterized by extreme class imbalance (492 frauds out of 284,807 transactions) and complex non-linear structures.
Key Findings
- Topological Fidelity: PHom-WAE demonstrated superior preservation of manifold structure compared to VAE-based models. The bottleneck distance between original and reconstructed samples was 0.0788 for WAE, a 10% improvement over VAE's 0.0878.
- Latent Space Coherence: WAEs produced significantly less "topological noise" in the latent space. The bottleneck distance measuring latent scatter was 0.0984 for WAE versus 0.1372 for VAE—a 28% improvement.
- Scale Invariance: Because persistent homology analyzes data across all spatial resolutions, the evaluation is robust and insensitive to the specific scale of analysis.
Conclusion and Future Work
PHom-WAE proves that matching the homology of a distribution is as critical as matching its statistical moments. While the current implementation uses persistent homology as an evaluation tool, future work aims to integrate the bottleneck distance directly into the neural network's loss function. This would allow models to actively learn and preserve topological features during the training phase. Additionally, while this study focused on $H_0$ and $H_1$, exploring higher-order homologies ($H_2$ and beyond) could offer even more granular insights into complex data manifolds, albeit at a higher computational cost.
Summary updated