A Property Testing Framework for the Theoretical Expressivity of Graph Kernels

Nils M. Kriege, Christopher Morris, Anja Rey, Christian Sohler

TL;DR

This paper introduces a formal theoretical framework, inspired by property testing, to measure how well graph kernels can actually "see" structural properties like connectivity or planarity. The authors prove that many popular kernels (like Weisfeiler-Lehman and Random Walk) fail to distinguish basic global properties, and they propose a $k$-disc frequency kernel as a theoretically superior alternative with provable learning guarantees.

The Problem: Beyond Leaderboard-Chasing

Graph kernels are the workhorse of graph classification, used to turn complex structures into vectors for machine learning. However, the field has historically relied almost entirely on "leaderboard-chasing"—comparing kernels based on experimental accuracy on a few benchmark datasets.

There has been little theoretical justification for why one kernel should be better than another. A practitioner has no way of knowing if a specific kernel can even "detect" the property they are trying to classify (e.g., "is this molecule toxic?" might depend on a specific structural cycle). This paper fills that gap by providing a mathematical framework to analyze the expressivity of kernels—their ability to distinguish between graphs that have a property and those that are "far" from having it.

Methodology: Bridging ML and Property Testing

The authors bridge the gap between machine learning and Property Testing, a field of computer science that asks: "Can we decide if an object has a property by looking at only a small part of it?"

They introduce two key definitions for a kernel $\kappa$:

  1. Identification: A kernel identifies a property if it never maps a graph with the property and a graph without it to the same normalized feature vector.
  2. Distinguishability: A stronger condition. A kernel distinguishes a property if there is a constant minimum angle (independent of graph size) between the feature vectors of a graph with the property and any graph that is "$\epsilon$-far" from having it.
Graphs G and H ($K_{3,3}$) illustrating structural properties that kernels must distinguish.

The authors then analyze four standard kernels: Weisfeiler-Lehman (WL) subtree, Random Walk, Shortest Path, and Graphlet kernels. Finally, they propose the $k$-disc kernel, which counts the frequencies of local neighborhoods (discs of radius $k$) and show it succeeds where others fail.

  • The "Regular Graph" Problem: Many popular kernels (WL, Random Walk) rely on local degree information. Because all nodes in a $d$-regular graph look identical locally, these kernels map very different global structures (like one big component vs. ten small ones) to the exact same vector.
  • Identification $\neq$ Learning: Just because a kernel can identify a property doesn't mean a model can learn it. If the angle between "Property A" and "Not Property A" shrinks to zero as the graph gets larger, a classifier will eventually fail due to numerical instability or lack of margin. This is why "Distinguishability" (requiring a constant angle) is the more important metric.
  • Local to Global: A surprising insight from property testing is that for bounded-degree graphs, local features (like $k$-discs) are actually sufficient to derive global properties like planarity or connectivity.
  • The Failure of Graphlets: While graphlets seem expressive, in sparse graphs, most $k$-node subgraphs are just collections of isolated vertices. This "washes out" the signal, making it impossible for standard graphlet kernels to distinguish properties with a constant margin.

Key Results

The paper’s findings are summarized in a "report card" for common kernels, highlighting the superior expressivity of the $k$-disc approach across several fundamental graph properties.

Comparative expressivity of various graph kernels across structural properties.

Learning Guarantees: The authors prove that if a kernel distinguishes a property, a simple 1-Nearest Neighbor (1-NN) classifier can learn that property with high probability, provided the training set is large enough (though the required size depends on the dimension of the feature space).

Limitations and Future Work

  • Unlabeled Graphs: The current framework focuses on unlabeled, undirected graphs. Extending this theory to labeled graphs (atoms/bonds) is a logical next step.
  • Dimensionality: The $k$-disc kernel requires a feature space proportional to the number of possible isomorphism types of $k$-discs, which grows extremely fast.
  • Beyond Bounded Degree: The proofs rely on the "bounded-degree graph model." It remains to be seen how these results hold for scale-free networks or very dense graphs.

Summary updated

BibTeX
@inproceedings{kriege2018property,
  author = {Nils M. Kriege and Christopher Morris and Anja Rey and Christian Sohler},
  title = {{A Property Testing Framework for the Theoretical Expressivity of Graph Kernels}},
  booktitle = {International Joint Conference on Artificial Intelligence},
  year = {2018},
  doi = {10.24963/ijcai.2018/325},
}
Figure