Important data mining problems such as nearest-neighbor search and clustering admit theoretical guarantees when restricted to objects embedded in a metric space. Graphs are ubiquitous, and clustering and classification over graphs arise in diverse areas, including, e.g., image processing and social networks. Unfortunately, popular distance scores used in these applications, that scale over large graphs, are not metrics and thus come with no guarantees. Classic graph distances such as, e.g., the chemical and the Chartrand-Kubiki-Shultz (CKS) distance are arguably natural and intuitive, and are indeed also metrics, but they are intractable: as such, their computation does not scale to large graphs. We define a broad family of graph distances, that includes both the chemical and= the CKS distance, and prove that these are all metrics. Crucially, we show that our family includes metrics that are tractable. We demonstrate the scalability of our metrics by parallelizing their computation over Apache Spark: we can compute distances between graphs having 0.5M nodes and 3M edges over 400 CPUs within a few hours.
This is joint work with Jose Bento, Armin Moharrer, Shinkun Wang, and Jasmine Gao.