Differentiable Mapper for Topological Optimization of Data Representation

Ziyad Oulhaj, Mathieu Carrière, Bertrand Michel

Introduction

The Mapper algorithm is a fundamental tool in Topological Data Analysis (TDA) for visualizing high-dimensional data as a graph. By capturing structures such as clusters, branches, and loops, Mapper provides insights often missed by standard dimensionality reduction techniques like PCA or t-SNE. However, its effectiveness is highly sensitive to the choice of parameters, particularly the "filter function." Traditionally, selecting an optimal filter has been a manual, brute-force process. This work introduces Soft Mapper, a differentiable framework that enables the automatic optimization of filter functions using gradient descent.

Methodology

To make the Mapper pipeline differentiable, the authors introduce several key innovations:

  1. Soft Mapper Construction: Unlike the standard "hard" assignment of points to intervals, Soft Mapper treats these assignments as Bernoulli random variables. This transforms the discrete graph into a probability distribution over graphs.
  2. Smooth Relaxation: Hard interval assignments are replaced with smooth, sigmoid-like functions, ensuring that small perturbations in filter parameters result in predictable changes in the soft graph structure.
  3. Topological Loss Functions: The framework utilizes Total Persistence as a loss function. This objective rewards filter functions that emphasize significant, "long-lived" topological features while suppressing noise.
  4. Theoretical Convergence: Leveraging o-minimal geometry, the authors prove that stochastic gradient descent (SGD) on this objective converges to a stable solution.

Experimental Evaluation

The method was evaluated on synthetic geometric data and complex biological datasets. The synthetic datasets include 3D point clouds of a human, an octopus, and a table, which serve as "ground truth" for skeletonization.

3D mesh datasets (human, octopus, table) used to evaluate the algorithm's ability to find intuitive skeletonizing directions.

Additionally, the framework was applied to single-cell RNA-sequencing (scRNA-seq) data, including a human preimplantation embryo dataset (1,529 cells) and a large-scale mouse embryonic fibroblast (MEF) dataset (over 250,000 cells).

Results and Discussion

The optimization process demonstrates robust convergence across different datasets.

Loss curves illustrating the minimization of topological loss over 200 epochs for the three 3D mesh datasets.

Key Findings

  • Topology vs. Variance: In the "Table" dataset, PCA typically identifies the flat surface (maximum variance). In contrast, the Differentiable Mapper identifies the vertical direction, capturing the topology of the legs. This highlights that TDA captures structural information distinct from variance-based methods.
  • Automated Skeletonization: The model successfully aligns filters with natural axes, such as the vertical axis for the human model and the tentacles for the octopus, achieving correlations of >0.99 with ideal directions.
  • Biological Discovery: In scRNA-seq analysis, the optimized filter showed a significantly higher correlation with biological time (improving from 0.13 to -0.75 in the human embryo dataset). The resulting graphs provided clearer separation of cell differentiation phases compared to unoptimized versions.

Conclusion and Future Work

Soft Mapper shifts TDA from manual parameter tuning toward automated, data-driven representation learning. While the current implementation is computationally intensive due to Monte Carlo sampling and primarily focuses on linear filters, it opens the door for integrating topological priors into deep learning architectures. Future research may explore using neural networks as non-linear filter functions or employing Soft Mapper as a topological regularizer for latent space optimization.

Summary updated

BibTeX
@inproceedings{oulhaj2024differentiable,
  author = {Ziyad Oulhaj and Mathieu Carrière and Bertrand Michel},
  title = {{Differentiable Mapper for Topological Optimization of Data Representation}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=QZ1DVzr6N9},
}
Figure