Persistence Codebooks for Topological Data Analysis

Bartosz Zielinski, Mateusz Juda, Matthias ZeppelzauerarXiv 2018

Abstract

Persistent homology (PH) is a rigorous mathematical theory that provides a robust descriptor of data in the form of persistence diagrams (PDs) which are 2D multisets of points. Their variable size makes them, however, difficult to combine with typical machine learning workflows. In this paper we introduce persistence codebooks, a novel expressive and discriminative fixed-size vectorized representation of PDs. To this end, we adapt bag-of-words (BoW), vectors of locally aggregated descriptors (VLAD) and Fischer vectors (FV) for the quantization of PDs. Persistence codebooks represent PDs in a convenient way for machine learning and statistical analysis and have a number of favorable practical and theoretical properties including 1-Wasserstein stability. We evaluate the presented representations on several heterogeneous datasets and show their (high) discriminative power. Our approach achieves state-of-the-art performance and beyond in much less time than alternative approaches.

Introduction

Persistent Homology (PH) is a powerful mathematical tool that identifies structural features in data—like connected components, loops, and voids. It outputs a Persistence Diagram (PD), which is a 2D scatterplot where each point represents the "birth" and "death" of a topological feature.

However, PDs are variable in size, making them difficult to integrate with standard machine learning models (like SVMs or neural networks) that require fixed-size input vectors. Historically, researchers used kernel methods, which are computationally expensive ($O(N^2)$), or rigid vectorized representations like Persistence Images, which often struggle with the sparse nature of topological data. This paper introduces "persistence codebooks," a fast, adaptive, and fixed-size vector representation for PDs.

Methods

The authors adapt dictionary-based quantization methods—originally used in NLP and image retrieval—to topological data. The core pipeline involves consolidating training PDs, sub-sampling points (often weighted by persistence to filter noise), and clustering them to create a "codebook" of topological visual words.

Overview of the persistence codebook pipeline, illustrating the transition from raw data to quantized histograms.

Variants and Stability

Several variants are proposed based on different quantization strategies:

  • PBoW (Persistence Bag of Words): A simple histogram of cluster assignments.
  • PVLAD (Persistence Vector of Locally Aggregated Descriptors): Accumulates distance residuals from points to cluster centers.
  • PFV (Persistence Fisher Vector): Captures higher-order moments using Gaussian Mixture Model gradients.
Summary of persistence codebook variants, including sampling strategies, assignment methods, and corresponding equations.

Crucially, the authors prove that soft-assignment versions of these methods are stable with respect to the 1-Wasserstein distance, ensuring that small input noise does not lead to large changes in the feature vector.

Key Results

The methods were evaluated across diverse domains, including 3D point clouds (GeoMat, PetroSurf3D), social network graphs (Reddit), and motion capture trajectories.

  • Accuracy: Persistence codebooks achieve state-of-the-art or highly competitive performance, frequently outperforming Persistence Images (PI) and complex kernel methods.
  • Efficiency: The approach offers massive speedups. On the PetroSurf3D dataset, PBoW was over 400x faster than Persistence Images and over 2,000x faster than traditional kernel methods. This efficiency stems from the linear scaling of codebook generation and assignment.
  • Adaptivity: Unlike rigid grids, codebooks cluster the actual data. This allows them to ignore empty space in the PD, resulting in dense, informative features even with small codebook sizes (e.g., 20-50 words).

Conclusion

Persistence codebooks provide a mathematically stable and computationally efficient bridge between topological data analysis and machine learning. By offering significant speedups without sacrificing accuracy, this approach enables the application of TDA to massive, real-world datasets and real-time processing pipelines.

Summary updated

BibTeX
@misc{zielinski2018persistence,
  author = {Bartosz Zielinski and Mateusz Juda and Matthias Zeppelzauer},
  title = {{Persistence Codebooks for Topological Data Analysis}},
  year = {2018},
  eprint = {1802.04852},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1802.04852},
}
Figure