User:Creolesleepr/Graph Kernels

Graph Kernels are used in machine learning algorithms that can employ the kernel trick. Often, we wish to perform classification tasks on graph structured data, such as social networks, program flows, and gene regulation networks. Classifiers such as the support vector machine are general-purpose: they can be used on any data structures as long as there is a kernel function to measure distance between points encoded in the data structure. Thus, graph kernels are functions that take two graphs as input and output a "distance" between the two graphs, making it possible to tell when graphs have similar structures.

Types of Graph Kernels

 * 1) Graph Kernels based on walks
 * 2) Graph Kernels based on limited-size subgraphs
 * 3) Graph kernels based on subtree patterns

Weisfeiler-Lehman Graph Kernels
Based on the Weisfeiler-Lehman isomorphism test of graphs, Weisfeiler-Lehman graph kernels can accept graphs with discrete node labels as input. These kernels have linear runtime in the number of edges in the graph and the length of the Weisfeiler-Lehman sequence. The 1-dimensional Weisfeiler-Lehman algorithm, used by this graph kernel, iteratively refines the node labels of two input graphs, G and G'. Eventually, the label set of G and G' will differ, or the algorithm will terminate, having assigned each node in G and G' a unique label. This labeling gives a straightforward isomorphism between G and G', or a pointer to where the two graphs differ, or the algorithm is sometimes unable to determine that the two graphs are non-isomorphic, though it will successfully discern if almost all graphs are isomorphic or not.

The labels that the Weisfeiler-Lehman algorithm generates correspond to subtrees rooted at each labeled node. Essentially, we define the kernel on G and G' by counting how many times the Weisfeiler-Lehman successfully completes an iteration when run on these two graphs. In practice, this can be computed efficiently, because the Weisfeiler-Lehman isomorphism test runs in linear time in the size of the graph, and by cleverly arranging the subtrees defined by the algorithm, the paper can compute the kernel on N graphs simultaneously in linear time.