NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Tree++: Truncated Tree Based Graph Kernels

Wei Ye, Zhen Wang, Rachel Redberg, Ambuj K. SinghIEEE TKDE 2020 · DOI

TL;DR

This paper introduces Tree++, a novel graph kernel designed to capture similarities between graphs at multiple levels of detail, from fine-grained substructures to broader structural patterns. By combining path-based features with a new "super path" concept that incorporates truncated BFS trees, Tree++ achieves state-of-the-art classification accuracy on various real-world datasets while remaining computationally efficient.

What Problem Does This Paper Address?

Many real-world datasets, such as molecules or social networks, are naturally represented as graphs. A fundamental challenge in working with these datasets is quantifying their similarity, which is crucial for tasks like classification. Existing graph kernels often struggle with "scale-adaptivity," meaning they can only effectively compare graphs at a single level of granularity. For instance, some kernels might focus on small substructures (like individual bonds in a molecule) but miss larger patterns (like functional groups), while others do the opposite. This limitation hinders their ability to capture the full complexity of graph structures that exhibit variations at multiple scales.

Methods

The core of Tree++ is built upon two key ideas:

  • Path-Pattern Graph Kernel: This base kernel works by constructing a truncated Breadth-First Search (BFS) tree rooted at each vertex in a graph. Paths from the root to all other nodes within this truncated tree are extracted. These paths, along with their vertex label sequences, are then used as features to represent the graph. This method excels at capturing fine-grained similarities.
  • Super Path Concept: To address the limitation of capturing coarser granularities, the authors introduce the "super path." A super path is a sequence of truncated BFS trees, each rooted at a vertex within a path. By considering these trees as elements of a path, the kernel can capture more abstract structural identities and community-level patterns. The final Tree++ kernel combines similarities computed at different "levels of granularity" (defined by the depth of the BFS trees used in super paths) to provide a comprehensive similarity measure.

To ensure unique representations and consistent ordering, child vertices in BFS trees are sorted by their labels and then by their eigenvector centrality values.

Datasets

The paper evaluates Tree++ on twelve real-world datasets, categorized as follows:

  • Chemical Compound Datasets: BZR, BZR_MD, COX2, COX2_MD, DHFR, DHFR_MD, and NCI1. These datasets represent molecules where vertices are atoms and edges are chemical bonds. Some versions (e.g., BZR_MD) have explicit hydrogen atoms removed and are represented as complete graphs.
  • Molecular Compound Datasets: PROTEINS and Mutagenicity. PROTEINS represents secondary structures in proteins, and Mutagenicity classifies molecules based on their mutagenic properties.
  • Brain Network Dataset: KKI, which represents brain regions and their correlations.

The paper does not introduce new benchmark datasets but uses established ones to compare against existing methods.

Key Insights and Ideas

  • Multi-Granularity Matters: The most significant insight is that capturing graph similarity effectively requires considering multiple levels of detail simultaneously. A single-level approach is insufficient for complex, real-world graphs.
  • BFS Trees as Rich Features: Truncated BFS trees, when combined with path extraction, provide a powerful way to represent local graph structures. The sorting mechanism (label and eigenvector centrality) is crucial for making these representations consistent.
  • Super Paths Bridge the Gap: The novel "super path" concept, by treating BFS trees as elements, elegantly extends the path-based approach to capture higher-level structural identities, effectively bridging the gap between fine-grained and coarse-grained analysis.
  • Efficiency is Achievable: Despite its sophisticated approach, Tree++ demonstrates competitive or superior runtime performance compared to many existing kernels, suggesting that capturing multi-granularity doesn't necessarily come at an prohibitive computational cost.

Key Results

  • State-of-the-Art Accuracy: Tree++ achieved the highest classification accuracy on eleven out of twelve real-world datasets, outperforming established graph kernels like Weisfeiler-Lehman (WL), Shortest Path (SP), and Multiscale Laplacian Graph Kernel (MLG).
  • Competitive Runtime: Tree++ demonstrated efficient computation, often finishing in seconds or minutes on large datasets where other methods took hours (e.g., MLG). It was comparable in speed to SP and WL.
  • Parameter Sensitivity: The paper shows that Tree++'s performance is sensitive to the depth parameters d (for path patterns) and k (for super paths). Generally, increasing these depths improved accuracy, especially on datasets with more complex structures, up to a certain point.

Limitations and Future Work

  • Hash Function Choice: The paper notes that the choice of hash function for labeling BFS trees (concatenation of vertex labels) can be sensitive to vertex degrees. For graphs with many high-degree vertices, this can lead to dissimilar trees being hashed similarly, potentially hurting performance. The authors suggest exploring other centrality metrics (closeness, betweenness) for ordering vertices in BFS trees.
  • Discrete Attributes: Tree++ is currently designed for graphs with discrete vertex labels. An important future direction is extending it to handle graphs with continuous attributes.
  • Alternative Hashing/Embedding: The authors suggest exploring other hashing techniques (like Spectral Hashing) or graph embedding methods (like DeepWalk) to represent graphs, which could be combined with kernels like Maximum Mean Discrepancy (MMD) for similarity computation.

Summary updated

BibTeX
@article{ye2020tree,
  author = {Wei Ye and Zhen Wang and Rachel Redberg and Ambuj K. Singh},
  title = {{Tree++: Truncated Tree Based Graph Kernels}},
  journal = {IEEE Trans. Knowl. Data Eng.},
  year = {2020},
  doi = {10.1109/tkde.2019.2946149},
}
Figure