Comparison among graphs is ubiquitous in graph analytics. However, it is a hard task in terms of the expressiveness of the employed similarity measure and the efficiency of its computation. Ideally, graph comparison should be invariant to the order of nodes and the sizes of compared graphs, adaptive to the scale of graph patterns, and scalable. Unfortunately, these properties have not been addressed together. Graph comparisons still rely on direct approaches, graph kernels, or representation-based methods, which are all inefficient and impractical for large graph collections.
In this paper, we propose the Network Laplacian Spectral Descriptor (NetLSD): the first, to our knowledge, permutation- and size-invariant, scale-adaptive, and efficiently computable graph representation method that allows for straightforward comparisons of large graphs. NetLSD extracts a compact signature that inherits the formal properties of the Laplacian spectrum, specifically its heat or wave kernel; thus, it hears the shape of a graph. Our evaluation on a variety of real-world graphs demonstrates that it outperforms previous works in both expressiveness and efficiency.
In this paper:
- We take the geometrical perspective for computing the descriptors.
- We show how to compute them fast for million-scale graphs.
- We demonstrate how NetLSD is the only representation that preserves the multi-scale structure of graphs.
- We show that NetLSD lower bounds theoretically powerful metrics.
- We propose novel evaluation tasks (detection of graphs with communities, clustering) for graph representations.
- We provide easy-to-use Python package to compute the signatures with interfaces to popular graph libraries.