With the recent rise in the amount of structured data available, there has been considerable interest in methods for machine learning with graphs. Many of these approaches have been kernel methods, which focus on measuring the similarity between graphs. These generally involving measuring the similarity of structural elements such as walks or paths. Borgwardt and Kriegel proposed the all-paths kernel but emphasized that it is NP-hard to compute and infeasible in practice, favouring instead the shortest-path kernel. In this paper, we introduce a new algorithm for computing the all-paths kernel which is very efficient and enrich it further by including the simple cycles as well. We demonstrate how it is feasible even on large datasets to compute all the paths and simple cycles up to a moderate length. We show how to count labelled paths simple cycles between vertices of a graph and evaluate a labelled path and simple cycles kernel. Extensive evaluations on a variety of graph datasets demonstrate that the all-paths and cycles kernel has superior performance to the shortest-path kernel and state-of-the-art performance overall.
The kernel which we implement in this work is an extension of the all-paths kernel which includes the simple cycles as well. Recall that a simple cycle is a cycle @math such that all @math are distinct. Denoting by @math the set of all paths and simple cycles on @math , we defined the All-Paths and Cycles (APC) kernel to be Just as for the paths, counting simple cycles is a @math P-complete problem, and the problem of counting paths and simple cycles of length at most @math parametrised by @math is a @math W[1]-complete @cite_8 , so the APC kernel is, in principle, hard to compute.
@cite_8
2108136433
We develop a parameterized complexity theory for counting problems. As the basis of this theory, we introduce a hierarchy of parameterized counting complexity classes #W[t], for t spl ges 1, that corresponds to Downey and Fellows' (1999) W-hierarchy and show that a few central W-completeness results for decision problems translate to #W-completeness results for the corresponding counting problems. Counting complexity gets interesting with problems whose decision version is tractable, but whose counting version is hard. Our main result states that counting cycles and paths of length k in both directed and undirected graphs, parameterized by k, are #W[1]-complete. This makes it highly unlikely that any of these problems is fixed-parameter tractable, even though their decision versions are. More explicitly, our result shows that most likely there is no f(k) spl middot n sup c -algorithm for counting cycles or paths of length k in a graph of size n for any computable function f: spl Nopf spl rarr spl Nopf and constant c, even though there is a 2 sup O(k) spl middot n sup 2.376 algorithm for finding a cycle or path of length k (2).