Graph Kernels based on High Order Graphlet Parsing and Hashing

Anjan Dutta, Hichem Sahbi

Abstract

Representing complex graph structures in a format suitable for machine learning remains a significant challenge due to the computational complexity of graph isomorphism. We introduce Stochastic Graphlet Embedding (SGE), a method that transforms graphs into fixed-length vectors by stochastically sampling high-order graphlets. By utilizing topological hashing instead of exact matching, SGE achieves state-of-the-art classification accuracy while significantly reducing computational overhead.

Introduction

Machine learning algorithms typically operate on vector-based data. However, many real-world datasets, such as molecular structures, social networks, and image skeletons, are inherently graph-based. Comparing these structures is difficult; graph isomorphism is GI-complete, and subgraph isomorphism is NP-complete. Existing graph kernels often decompose graphs into small "graphlets" (subgraphs of 3-5 nodes) to maintain tractability, but this approach loses the rich information contained in larger, more complex structures.

Methodology: Stochastic Graphlet Embedding (SGE)

The SGE framework addresses these limitations through a two-step process: stochastic parsing and topological hashing.

Stochastic Parsing

Instead of exhaustive subgraph enumeration, SGE employs a stochastic depth-first search (DFS) to sample a representative set of graphlets. This allows for the extraction of "unlimitedly" high-order graphlets—subgraphs with many edges—that capture complex local interactions within the graph.

The SGE pipeline: from stochastic sampling of graphlets to the final histogram-based embedding.

Topological Hashing

To efficiently compare sampled graphlets without performing expensive isomorphism checks, SGE uses hash functions based on topological properties such as betweenness centrality, core numbers, and node degrees. If two graphlets are isomorphic, they are guaranteed to produce the same hash code. While non-isomorphic graphs could theoretically collide, the authors demonstrate that using betweenness centrality—a measure of a node's role as a bridge in shortest paths—makes such collisions extremely rare.

Illustration of isomorphic graphlets mapping to identical hash codes based on topological features.

The final representation of a graph is a histogram (vector) of these hash codes, which can be used with standard classifiers like Support Vector Machines (SVMs).

Experimental Results

SGE was evaluated across diverse benchmarks, including bioinformatics (MUTAG, NCI1), computer vision (COIL, MNIST skeletons), and document analysis.

Performance and Efficiency

SGE consistently matched or outperformed state-of-the-art kernels such as Random Walk (RW) and Shortest Path (SP). Notably, the hashing approach proved to be 120x to 370x faster than exact isomorphism-based partitioning. On the MNIST dataset, SGE achieved an accuracy of 99.20%, demonstrating that graph-based representations can be highly competitive with traditional image features when processed efficiently.

Robustness to Noise

The method showed remarkable resilience to structural noise (random edge additions or deletions). Unlike other kernels that rely on specific paths, SGE's stochastic sampling captures the overall structural distribution, maintaining high accuracy even in degraded data.

Conclusion

Stochastic Graphlet Embedding provides a scalable and robust solution for graph classification. By bypassing the computational bottleneck of exact graph matching through topological hashing and high-order sampling, it enables the use of complex structural information in large-scale machine learning tasks. Future work may involve refining hash functions to further minimize collisions and integrating continuous node/edge attributes.

Summary updated

BibTeX
@misc{dutta2018graph,
  author = {Anjan Dutta and Hichem Sahbi},
  title = {{Graph Kernels based on High Order Graphlet Parsing and Hashing}},
  year = {2018},
  eprint = {1803.00425},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1803.00425},
}
Figure