GRIL: A $2$-parameter Persistence Based Vectorization for Machine Learning

Cheng Xin, Soham Mukherjee, Shreyas N. Samaga, Tamal K. Dey

Abstract

$1$-parameter persistent homology, a cornerstone in Topological Data Analysis (TDA), studies the evolution of topological features such as connected components and cycles hidden in data. It has been applied to enhance the representation power of deep learning models, such as Graph Neural Networks (GNNs). To enrich the representations of topological features, here we propose to study $2$-parameter persistence modules induced by bi-filtration functions. In order to incorporate these representations into machine learning models, we introduce a novel vector representation called Generalized Rank Invariant Landscape (GRIL) for $2$-parameter persistence modules. We show that this vector representation is $1$-Lipschitz stable and differentiable with respect to underlying filtration functions and can be easily integrated into machine learning models to augment encoding topological features. We present an algorithm to compute the vector representation efficiently. We also test our methods on synthetic and benchmark graph datasets, and compare the results with previous vector representations of $1$-parameter and $2$-parameter persistence modules. Further, we augment GNNs with GRIL features and observe an increase in performance indicating that GRIL can capture additional features enriching GNNs.

Introduction

Topological Data Analysis (TDA) provides a framework for machine learning models to interpret the "shape" of data by identifying features like connected components, loops, and voids. Standard 1-parameter persistent homology tracks these features across a single threshold. However, many real-world datasets are characterized by multiple simultaneous parameters, such as density and distance. While multiparameter persistence offers greater descriptive power, it is challenging to use in machine learning because it lacks a simple, complete summary like the "barcodes" used in the 1-parameter case.

This paper introduces GRIL (Generalized Rank Invariant Landscape), a novel method for converting complex 2-parameter topological data into fixed-length vectors. GRIL is mathematically stable and differentiable, allowing it to capture richer structural information than standard methods and significantly boost the performance of Graph Neural Networks (GNNs).

Methodology

The core innovation of GRIL lies in its approach to probing the 2D parameter space. Unlike previous methods that might only consider rectangular regions, GRIL utilizes "worms"—unions of squares centered along off-diagonal line segments. This geometric flexibility allows the method to capture topological features persisting across complex paths in the 2D space.

The GRIL representation calculates the "width" of the largest worm that maintains a specific number of independent topological features (rank). The authors prove that this representation is 1-Lipschitz stable, ensuring robustness against input noise. Furthermore, GRIL is differentiable, enabling "filtration learning" where input functions are optimized via backpropagation to better highlight relevant topological features.

The overall pipeline from a simplicial complex to the GRIL vector representation.

Experimental Results

The researchers evaluated GRIL on synthetic and real-world datasets, including graph benchmarks (PROTEINS, MUTAG, IMDB-BINARY) and social networks (REDDIT-BINARY).

Topological Discrimination

GRIL demonstrates a superior ability to distinguish between topological structures that appear identical to 1-parameter methods. For instance, it can differentiate between one large circle and two smaller ones by analyzing how features persist across the 2D grid.

GRIL acting as a topological discriminator for various point cloud configurations.

Performance Gains

  • Synthetic Data: On the HourGlass dataset, GRIL achieved 100% accuracy, significantly outperforming standard GNNs and 1-parameter persistence methods which often scored below 90%.
  • GNN Augmentation: Integrating GRIL features with standard GNNs (GCN, GIN, GAT) led to consistent performance improvements. On the MUTAG dataset, a GIN model augmented with GRIL improved accuracy from 83.97% to 89.32%.
  • Comparative Benchmarks: GRIL outperformed other recent 2-parameter vectorization methods (e.g., MP-I, MP-L) in 13 out of 20 tested cases.

Discussion and Conclusion

GRIL provides a global structural perspective that complements the local neighborhood focus of standard GNNs. While computationally more intensive than 1-parameter TDA, optimizations like binary search and fast zigzag persistence make it practical for real-world applications. Future work will explore more diverse bi-filtration functions and further algorithmic optimizations for larger-scale datasets.

Complete code for the proposed method is available at https://github.com/soham0209/mpml-graph.

Summary updated

BibTeX
@inproceedings{xin2023gril,
  author = {Cheng Xin and Soham Mukherjee and Shreyas N. Samaga and Tamal K. Dey},
  title = {{GRIL: A $2$-parameter Persistence Based Vectorization for Machine Learning}},
  booktitle = {TAGML @ ICML},
  year = {2023},
  url = {https://openreview.net/forum?id=t4uavrCJvD},
}
Figure