Fast Computation of Graph Edit Distance

Fast Computation of Graph Edit Distance

Fast Computation of Graph Edit Distance Xiaoyang Cheny, Hongwei Huo∗†, Jun Huanz, Jeffrey Scott Vitter x y Dept. of Computer Science, Xidian University, [email protected], [email protected] z Dept. of Electrical Engineering and Computer Science, The University of Kansas, [email protected] x Dept. of Computer and Information Science, The University of Mississippi, [email protected] Abstract—The graph edit distance (GED) is a well-established nodes in the search tree, existing methods can be divided into distance measure widely used in many applications. However, two broad categories: vertex-based and edge-based mapping existing methods for the GED computation suffer from several methods. When generating successors of a node, the former drawbacks including oversized search space, huge memory consumption, and lots of expensive backtracking. In this paper, extends unmapped vertices of comparing graphs, while the ? we present BSS GED, a novel vertex-based mapping method for later extends unmapped edges. A -GED [5], [7] and DF- the GED computation. First, we create a small search space GED [16] are two major vertex-based mapping methods. A?- by reducing the number of invalid and redundant mappings GED adopts the best-first search paradigm A? [6], which picks involved in the GED computation. Then, we utilize beam-stack up a partial mapping with the minimum induced edit cost to search combined with two heuristics to efficiently compute GED, achieving a flexible trade-off between available memory and extend each time. The first found complete mapping induces expensive backtracking. Extensive experiments demonstrate that the GED of comparing graphs. However, DF-GED carries out BSS GED is highly efficient for the GED computation on sparse a depth-first search, which quickly reaches a leaf node. The as well as dense graphs and outperforms the state-of-the-art edit cost of a leaf node in fact is an upper bound of GED GED methods. In addition, we also apply BSS GED to the graph and hence can be used to prune nodes later to accelerate the similarity search problem and the practical results confirm its efficiency. GED computation. Different from the above two methods, CSI GED [4] is a novel edge-based mapping method based I. INTRODUCTION on common substructure isomorphism, which works well for Graphs are widely used to model various complex structured the sparse and distant graphs. Similar to DF-GED, CSI GED data, including social networks, molecular structures, etc. Due also adopts the depth-first search paradigm. to extensive applications of graph models, there has been a Even though existing methods have achieved promising considerable effort in developing techniques for effective graph preliminary results, they still suffer from several drawbacks. data management and analysis, such as graph matching [3] and Both A?-GED and DF-GED enumerate all possible mappings graph similarity search [14], [17], [19]. between two graphs. However, among these mappings, some Among these studies, similarity computation between two mappings must not be optimal, called invalid mappings, or graphs is a core and essential problem. In this paper, we focus they induce the same edit cost, called redundant mappings. on the similarity measure based on graph edit distance (GED) For invalid mappings, we do not have to generate them, and since it is applicable to virtually all types of data graphs and for redundant mappings, we only need to generate one of them can also precisely capture structural differences. Due to the so as to avoid redundancy. The search space of A?-GED and flexible and error-tolerant characteristics of GED, it has been DF-GED becomes oversized as they generate plenty of invalid successfully applied in many applications, such as molecular and redundant mappings. comparison in chemistry [8], object recognition in computer In addition, for A?-GED, it needs to store enormous vision [2] and graph clustering [9]. partial mappings, resulting in a huge memory consumption. Given two graphs G and Q, the GED between them, denoted In practice, A?-GED cannot compute the GED of graphs with arXiv:1709.10305v1 [cs.DS] 29 Sep 2017 by ged(G; Q), is defined as the minimum cost of an edit more than 12 vertices. Though DF-GED performing a depth- path that transforms one graph to another. Unfortunately, first search is efficient in memory, it is easily trapped into a unlike the classical graph matching problem, such as subgraph local (i.e., suboptimal) solution and hence produces lots of isomorphism [15], the fault tolerance of GED allows a vertex expensive backtracking. On the other hand, for CSI GED, it of one graph to be mapped to any vertex of the other graph, adopts the depth-first search paradigm, and hence also faces regardless of their labels and degrees. As a consequence, the the expensive backtracking problem. Besides, the search space complexity of the GED computation is higher than that of of CSI GED is exponential with respect to the number of subgraph isomorphism, which has been proved to be an NP- edges of comparing graphs, making it naturally be unsuitable hard [17] problem. for dense graphs. The GED computation is usually carried out by means To solve the above issues, we propose a novel vertex-based of a tree search algorithm which explores the space of all mapping method for the GED computation, named BSS GED, possible mappings of vertices and edges of comparing graphs. based on beam-stack search [11] which has shown an excellent The underlying search space can be organized as an ordered performance in AI literature. Our contributions in this paper search tree. Based on the way of generating successors of are summarized below. • We propose a novel method of generating successors of if there exists an injective function φ : VG ! VQ, such that nodes in the search tree, which reduces a large number (1) 8u 2 VG, φ(u) 2 VQ and L(u) = L(φ(u)). (2) 8e(u; v) 2 of invalid and redundant mappings involved in the GED EG, e(φ(u); φ(v)) 2 EQ and L(e(u; v)) = L(e(φ(u); φ(v))). computation. As a result, we create a small search space. If G ⊆ Q and Q ⊆ G, then G and Q are graph isomorphic Moreover, we also give a rigorous theoretical analysis of to each other, denoted by G =∼ Q. the search space. There are six edit operations can be used to transform one • Incorporating with the beam-stack search paradigm into graph to another [12], [20]: insert/delete an isolated vertex, our method to compute GED, we achieve a flexible trade- insert/delete an edge, and substitute the label of a vertex or off between available memory and the time overhead of an edge. Given two graphs G and Q, an edit path P = backtracking and gain a better performance than the best- hp1; : : : ; pki is a sequence of edit operations that transforms first and depth-first search paradigms. p p one graph to another, such as G = G0 −!1 ;:::; −!k Gk =∼ Q. • We propose two heuristics to prune the search space, The edit cost of P is defined as the sum of edit cost of all where the first heuristic produces tighter lower bound and operations in P , i.e., Pk c(p ), where c(p ) is the edit cost the second heuristic enables to fast search of tighter upper i=1 i i of the edit operation p . In this paper, we focus on the uniform bound. i cost model, i.e., c(pi) = 1 for 8i, thus the edit cost of P is its • We have conducted extensive experiments on both real length, denoted by jP j. For P , we call it is optimal if and only and synthetic datasets. The experimental results show that if it has the minimum length among all possible edit paths. BSS GED is highly efficient for the GED computation on sparse as well as dense graphs, and outperforms the Definition 2 (Graph Edit Distance). Given two graphs G state-of-the-art GED methods. and Q, the graph edit distance between them, denoted by • In addition, we also extend BSS GED as a standard graph ged(G; Q), is the length of an optimal edit path that trans- similarity search query method and the practical results forms G to Q (or vice versa). confirm its efficiency. Example 1. In Figure 1, we show an optimal edit path P that The rest of this paper is organized as follows: In Section II, transforms graph G to graph Q. The length of P is 4, where we introduce the problem definition and then give an overview we delete two edges e(u1; u2) and e(u1; u3), substitute the of the vertex-based mapping method for the GED computation. label of vertex u1 with label A and insert one edge e(u1; u4) In Section III, we create a small search space by reducing the with label a. number of invalid and redundant mappings involved in the v GED computation. In Section IV, we utilize the beam-stack u1 u2 u1 u2 u1 u2 1 b search paradigm to traverse the search space to compute GED. B A B A A A A In Section V, we propose two heuristics to prune the search b a a a a A C A C A C A a C a A space. In Section VI, we extend BSS GED as a standard graph a a a v v v u3 u4 u3 u4 u3 u4 3 4 2 similarity search query method. In Section VII, we report the G G1 Q1 Q experimental results and our analysis.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    13 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us