Graphcode: Learning from multiparameter persistent homology using graph neural networks

Florian Russold, Michael Kerber

Abstract

Graphcode is a novel topological summary that transforms complex multi-parameter persistent homology into an embedded graph structure. By representing topological features and their evolutions as nodes and edges, it allows researchers to feed multi-scale data directly into Graph Neural Networks (GNNs), achieving state-of-the-art accuracy and significant speedups over traditional vectorization methods.

The Challenge of Multi-parameter Persistence

In Topological Data Analysis (TDA), persistent homology is the gold standard for quantifying the "shape" of data across different scales. For data filtered by a single parameter (like distance), we can represent these shapes using a "barcode." However, real-world data often depends on multiple parameters—for example, analyzing an image based on both pixel intensity and local density.

The challenge is that multi-parameter persistent homology is mathematically much more complex. Unlike the single-parameter case, there is no simple, unique "barcode" for multi-parameter data. Existing solutions usually involve "vectorization"—turning topological information into a fixed-length vector—which often loses critical information, requires manual parameter tuning, or is computationally prohibitive for large datasets.

A 2D bifiltration grid showing how topological features evolve across two parameters.

The Graphcode Framework

The authors introduce Graphcodes, a combinatorial summary of two-parameter filtrations. The construction follows a multi-step pipeline designed to preserve the structural evolution of topological features:

  1. Slicing: They take a two-parameter dataset and "slice" it into a stack of one-parameter filtrations. Each slice produces a standard persistence diagram (barcode).
  2. Connecting the Dots: The core innovation is defining maps between consecutive slices. If a topological feature (like a hole) exists in one slice and persists into the next, an edge is drawn between them.
  3. The Graphcode: The result is a bipartite graph connecting the barcodes of adjacent slices. When combined, these form a layered graph embedded in $\mathbb{R}^3$, where the third dimension represents the slice index.
  4. GNN Pipeline: Because the summary is a graph, it can be processed by Graph Attention Networks (GAT). The pipeline uses GAT layers to learn feature importance, followed by local max-pooling per slice and a final dense layer for classification.
The Graphcode pipeline: from bifiltration to a layered graph structure suitable for GNNs.

Crucially, the authors developed an efficient algorithm based on "out-of-order" matrix reduction that computes these graphcodes in $O(n^3)$ worst-case time, though it performs closer to linear time on realistic datasets.

Experimental Evaluation

The researchers evaluated Graphcode across several diverse benchmarks, including TU Datasets (PROTEINS, MUTAG, etc.), synthetic shape point clouds, random point processes, and the Orbit dataset.

Key Results

  • Superior Accuracy: On the synthetic "Shape" dataset, Graphcode achieved 86.9% accuracy, far outperforming the next best multi-parameter method, MP-HSM-C (57.0%), and standard persistence images (43.6%).
  • Massive Speedups: For the Shape dataset, Graphcode computation took only 95 seconds, while competing methods like GRIL took over 92 hours (333,187 seconds).
  • Scalability: On the Orbit100k dataset, Graphcode reached 92.3% accuracy, outperforming the one-parameter PersLay architecture (89.2%) and demonstrating the ability to handle very large-scale TDA tasks.

Discussion and Future Directions

A key insight from the study is that edges are essential. An ablation study (GC-NE) removing the edges between slices showed that the "graph" structure captures vital information about how features evolve across parameters that independent slices miss. Furthermore, unlike "black-box" vectorizations, a Graphcode is an embedded graph where nodes represent specific topological features, making the model's "reasoning" more transparent.

The primary limitation is basis dependence, as the graph structure changes depending on the algebraic basis chosen for the homology groups. Future work will explore randomized bases during training to improve robustness, extending the framework to more than two parameters, and applying Graphcodes to large-scale biological or chemical datasets where multi-scale topological features are prevalent.

Summary updated

BibTeX
@inproceedings{russold2024graphcode,
  author = {Florian Russold and Michael Kerber},
  title = {{Graphcode: Learning from multiparameter persistent homology using graph neural networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=O23XfTnhWR},
}
Figure