Tree-Based Kernel for Graphs With Continuous Attributes

Giovanni Da San Martino, Nicolò Navarin, Alessandro Sperduti · DOI

Abstract

This paper presents ODDCL_ST, a novel graph kernel designed to effectively compare graphs where nodes contain real-valued, continuous attributes alongside discrete labels. By integrating structural decomposition into Directed Acyclic Graphs (DAGs) with a hybrid kernel function and efficient RBF approximation, the proposed method overcomes the limitations of traditional discrete kernels and the high computational costs of existing continuous kernels. Empirical evaluations on bioinformatics and chemoinformatics datasets demonstrate that ODDCL_ST achieves state-of-the-art classification accuracy while significantly reducing runtime.

Introduction

In graph-structured data, nodes often carry rich information beyond simple labels, such as chemical properties or 3D coordinates. Traditional graph kernels, like the Weisfeiler-Lehman kernel, typically rely on "hard matches" of discrete labels, failing to capture the similarity between continuous values (e.g., treating 0.99 and 1.00 as entirely different). While kernels for continuous data exist, they often suffer from high computational complexity ($O(n^3)$ or higher) or lose information through discretization. The authors propose ODDCL_ST (Ordered Decomposition DAG Kernel for Continuous Labels) to bridge this gap, providing an expressive similarity measure that remains computationally efficient.

Methodology

The ODDCL_ST framework follows a three-step process to transform complex graphs into a format suitable for efficient comparison:

  1. Decomposition: The input graph is broken down into a multiset of Directed Acyclic Graphs (DAGs) based on shortest-path visits from each node. This simplifies the graph's complex topology into tree-like structures.
  2. Hybrid Kernel Function: The authors extend the standard Subtree (ST) kernel. When comparing two tree features, the kernel first checks for structural matching of discrete labels. If the structures match, a continuous kernel (specifically a Gaussian/RBF kernel) is applied to the node attributes. This ensures continuous information is only compared when structurally relevant.
  3. Approximation for Speed: To address the quadratic bottleneck of node-pair comparisons, the authors utilize a Monte Carlo approximation of the RBF kernel. By mapping continuous attributes into a low-dimensional explicit feature space using Fourier transforms, expensive kernel evaluations are converted into fast dot products.
Overview of the ODDCL_ST framework: from input graph to feature map.

Experimental Results

The authors evaluated ODDCL_ST on six real-world datasets from biological and chemical domains, including ENZYMES, PROTEINS, COX2, BZR, and DHFR.

Superior Accuracy

As shown in the experimental results, ODDCL_ST achieved the highest classification accuracy on the majority of datasets. It was particularly effective on chemical datasets like COX2, BZR, and DHFR, where 3D coordinates serve as vital continuous attributes. On these datasets, ODDCL_ST significantly outperformed kernels that ignore continuous information.

Classification accuracy comparison across multiple datasets.

Efficiency and Scalability

Beyond accuracy, the method demonstrated substantial efficiency gains. On the PROTEINS dataset, the exact ODDCL_ST kernel was eight times faster than the GraphHopper (GH) kernel. The approximated version, ODDCL_Approx*, proved even more scalable, reducing the runtime on the ENZYMES dataset from 35 minutes to just 1.8 minutes while maintaining comparable accuracy levels.

Conclusion

ODDCL_ST provides a robust and efficient solution for graph classification with continuous attributes. By using discrete structures as a filter for continuous comparisons and leveraging kernel approximations, the method achieves a state-of-the-art balance between expressivity and speed. Future work may involve adapting other tree kernels, such as the Partial Tree kernel, into this framework to capture even more complex structural patterns.

Summary updated

Abstract

The availability of graph data with node attributes that can be either discrete or real-valued is constantly increasing. While existing Kernel methods are effective techniques for dealing with graphs having discrete node labels, their adaptation to nondiscrete or continuous node attributes has been limited, mainly for computational issues. Recently, a few kernels especially tailored for this domain, and that trade predictive performance for computational efficiency, have been proposed. In this brief, we propose a graph kernel for complex and continuous nodes' attributes, whose features are tree structures extracted from specific graph visits. The kernel manages to keep the same complexity of the state-of-the-art kernels while implicitly using a larger feature space. We further present an approximated variant of the kernel, which reduces its complexity significantly. Experimental results obtained on six real-world data sets show that the kernel is the best performing one on most of them. Moreover, in most cases, the approximated version reaches comparable performances to the current state-of-the-art kernels in terms of classification accuracy while greatly shortening the running times.
BibTeX
@article{martino2018tree,
  author = {Giovanni Da San Martino and Nicolò Navarin and Alessandro Sperduti},
  title = {{Tree-Based Kernel for Graphs With Continuous Attributes}},
  journal = {IEEE Trans. Neural Networks Learn. Syst.},
  year = {2018},
  doi = {10.1109/tnnls.2017.2705694},
}
Figure