Learning metrics for persistence-based summaries and applications for graph classification

Qi Zhao, Yusu Wang

TL;DR

This paper introduces a novel framework for learning data-specific metrics for topological summaries. By developing a Weighted Kernel for Persistence Images (WKPI) and an optimization framework to "learn" which topological features matter most for a given task, the authors achieve state-of-the-art results in graph classification. Notably, this approach often outperforms complex graph neural networks using only structural topological features.

What Problem Does This Paper Address?

Topological Data Analysis (TDA) has become a popular tool for summarizing the "shape" of data through persistent homology. This process generates a persistence diagram—a multiset of points representing the birth and death of topological features (like holes or connected components) across different scales.

The standard pipeline for applying topological data analysis to graph classification.

To use these diagrams in machine learning, researchers usually map them to vectors or kernels. However, these mappings typically rely on a pre-set "weight function" to decide which features are important. Usually, "long-lived" features (high persistence) are weighted heavily, while "short-lived" ones are treated as noise.

The authors argue this is a major limitation: in some data (like molecular structures), tiny, short-lived features might actually be the most critical patterns. This paper addresses the need to learn the best weight function directly from labeled data rather than relying on human intuition or heuristics.

Methods

The authors propose a two-part solution to dynamically learn feature importance:

  1. Weighted Persistence Image Kernel (WKPI): They build upon "Persistence Images"—a method that turns topological diagrams into pixels. The WKPI introduces a weight function $\omega$ that scales the importance of different regions in the birth-death plane. Crucially, they prove this kernel is positive semi-definite and stable, meaning small changes in the input data won't cause wild swings in the kernel's output.
  2. Metric Learning Framework: Instead of picking $\omega$ by hand, they model it as a mixture of 2D Gaussians. They then formulate an optimization problem to find the parameters of these Gaussians that minimize a specific cost function.
Transformation from a 1D function to a persistence diagram, followed by the application of a learned 2D Gaussian weight function to generate a weighted persistence image.
  1. Matrix Reformulation: A key technical contribution is showing that their cost function can be rewritten in a matrix trace form (similar to spectral clustering). This allows them to use efficient stochastic gradient descent to learn the weights, making the approach scalable to large datasets.

Once the optimal weights are learned, the resulting kernel is plugged into a standard classifier, like a Support Vector Machine (SVM).

Key Insights and Ideas

  • Context is King: The "importance" of a topological feature is task-dependent. By learning the weights, the model can automatically decide to focus on "noise" if that noise actually contains a discriminative signal for a specific dataset.
  • Decoupling Learning from Classification: Unlike end-to-end deep learning models that can act as "black boxes," this framework decouples the representation learning (finding the right metric) from the downstream task (classification). This provides more interpretability, as researchers can visualize the learned weight function to see which parts of the persistence diagram the model is prioritizing.
  • Topology vs. Attributes: Surprisingly, the WKPI framework often beats Graph Neural Networks (GNNs) even though the TDA approach used here ignores node attributes (like atom types) and focuses purely on graph structure. This suggests that structural "shape" is a much more powerful signal than previously realized.

Key Results

The framework was evaluated on a diverse range of benchmarks, including neuron datasets (modeling the tree-like morphology of brain cells), bio/chemical graphs (representing molecules and proteins), and social networks. The authors compared their WKPI-classification framework against a wide array of state-of-the-art graph kernels and GNNs.

  • Neuron Classification: On the NEURON-BINARY task, WKPI achieved 89.6% accuracy, significantly outperforming other persistence-based methods like Sliced Wasserstein (85.3%) and Persistence Weighted Gaussian Kernels (80.5%).
  • Graph Benchmarks: In almost all cases, WKPI matched or exceeded the best-performing previous methods. Notably, on the REDDIT-5K dataset, it achieved 59.5%, outperforming the Graph Isomorphism Network (GIN) at 57.5%.
  • Consistency: While some older kernels work well on chemical graphs but fail on social graphs (or vice versa), WKPI showed robust, high performance across both categories.

Limitations and Future Work

The authors identify a few areas for improvement:

  • Single Descriptors: Currently, the framework uses only one "view" (descriptor function) of the graph at a time to build the persistence diagram. Combining multiple descriptors could capture even richer information.
  • Categorical Data: TDA naturally handles continuous, real-valued data. Incorporating categorical node attributes (like "color" or "label") into a topological summary remains a challenge.
  • Multidimensional Persistence: The current work focuses on 1D persistence. Moving to multidimensional persistence could offer even more descriptive power, though it is computationally much more complex.

Summary updated

BibTeX
@inproceedings{zhao2019learning,
  author = {Qi Zhao and Yusu Wang},
  title = {{Learning metrics for persistence-based summaries and applications for graph classification}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2019},
  url = {https://openreview.net/forum?id=wFvvRhwd7L},
}
Figure