Abstract
Persistence Diagrams (PDs) are fundamental summaries in Topological Data Analysis (TDA), yet their variable size poses challenges for integration with standard machine learning pipelines. This paper introduces persistence codebooks, a framework that quantizes PDs into fixed-size vectors using techniques adapted from computer vision, such as Bag-of-Words, VLAD, and Fisher Vectors. By employing data-driven quantization and soft-assignment for stability, the proposed methods achieve state-of-the-art performance with significant computational speedups—up to three orders of magnitude—over traditional kernel-based approaches.
Introduction
Topological Data Analysis (TDA) captures the "shape" of data by identifying features like holes and voids across multiple scales. The primary output, the Persistence Diagram (PD), is a multiset of points representing the birth and death of these features. While powerful, PDs are difficult to use in modern AI because their size varies based on the complexity of the input data. Most machine learning algorithms, such as Support Vector Machines (SVMs) or Neural Networks, require fixed-length vector inputs.
Existing solutions often rely on computationally expensive kernels, which scale quadratically with the number of samples, or rigid vectorizations like Persistence Images that may not adapt well to the sparse nature of topological data. Persistence codebooks address these limitations by transforming PDs into fixed-size vectors through adaptive quantization.
Methodology
The authors propose three primary quantization techniques to create persistence codebooks:
- Persistence Bag-of-Words (PBoW): This method treats topological features as "words." By clustering features from a training set (typically via k-means), a "vocabulary" or codebook is created. Each PD is then represented as a histogram of its features' occurrences across these clusters.
- Persistence VLAD (PVLAD): Vector of Locally Aggregated Descriptors (VLAD) stores the residual (the difference) between a feature and its assigned cluster center, capturing finer geometric details than simple counts.
- Persistence Fisher Vectors (PFV): The most sophisticated approach, PFV uses a Gaussian Mixture Model (GMM) to describe the distribution of features, capturing both first-order (mean) and second-order (variance) information.
A critical requirement in TDA is stability, ensuring that small changes in input data do not cause drastic changes in the output vector. The authors prove that by using "soft assignment"—where a point is partially assigned to multiple clusters based on distance—their sPBoW, sPVLAD, and PFV methods are theoretically stable with respect to the 1-Wasserstein distance.
Experimental Results
The framework was evaluated across seven diverse benchmarks, including synthetic shapes, 3D surface textures (GeoMat), social media discussion graphs (Reddit), and human activity recognition (Motion Capture).
Key Insights
- Adaptive Quantization: Unlike fixed-grid methods, codebooks are data-driven. They place "codewords" only where topological features actually exist, making them highly efficient for sparse diagrams.
- Speed and Scalability: The most dramatic result was efficiency. On the PetroSurf3D dataset, the persistence codebook approach was three orders of magnitude faster than the state-of-the-art 2-Wasserstein kernel (seconds versus hours).
- Accuracy: Despite the speedup, accuracy remained comparable to or better than existing methods. On the GeoMat dataset, PBoW outperformed Persistence Images and Riemannian Manifold approaches significantly. While PFV generally achieved the highest peak performance, PBoW offered the best balance of simplicity and speed.
Conclusion and Future Work
Persistence codebooks bridge the gap between complex topological summaries and standard machine learning tools. While "hard" assignment variants are often faster in practice, the "soft" variants provide the theoretical stability necessary for robust TDA. Future research may explore integrating these codebook layers directly into end-to-end deep learning architectures to further automate feature extraction from topological data.
Summary updated