Graph Edit Distance in the exact context

Mostafa Darwiche, Romain Raveaux, Donatello Conte, Vincent t'KindtS+SSPR 2018

TL;DR

This paper introduces a new Mixed Integer Linear Program (MILP) formulation (F3) for the Graph Edit Distance (GED) problem, aiming to provide an exact solution. F3 improves upon existing methods by developing constraints that are independent of the number of edges in the graphs, leading to better performance, especially on dense graphs.

What Problem Does This Paper Address?

Comparing graphs is a fundamental task in many fields, from pattern recognition to cheminformatics. Graph Edit Distance (GED) is a popular metric for quantifying the dissimilarity between two graphs by calculating the minimum cost to transform one into the other using edit operations like vertex/edge insertion, deletion, and substitution. While heuristic methods can find approximate solutions quickly, obtaining exact GED values is computationally challenging (NP-hard). Existing exact methods, primarily MILP formulations, struggle with performance, especially as graph density increases. This paper addresses the need for a more efficient and scalable exact method for GED computation.

Methods

The core contribution is a novel MILP formulation, dubbed F3, designed to compute the exact Graph Edit Distance. F3 builds upon a previous state-of-the-art formulation (F2) but introduces a key innovation: its constraints are independent of the number of edges in the graphs. This is achieved by reformulating the edge-matching constraints. While F3 uses more variables than F2 (specifically, more variables related to edge matching), the independence of its constraints from edge count offers a significant advantage, particularly for dense graphs where F2's constraints can become numerous and computationally burdensome. The paper also provides a detailed review of the F2 formulation and its components, including the definition of attributed graphs, GED, MILP formulation structure, and the specific data, variables, objective function, and constraints of F2.

Datasets

The authors evaluate their proposed F3 formulation against the existing F2 formulation using two publicly available graph databases:

  • MUTA: This database consists of graphs modeling chemical molecules. It's a common benchmark for GED methods and includes subsets of graphs with similar sizes and subsets with mixed sizes. The graphs in MUTA are characterized by very low density (D = 7%).
  • CMUHOUSE: This database comprises graphs representing 3D house images, with each graph having 30 vertices. It's designed to test graph matching robustness by using rotated versions of the same house. CMUHOUSE graphs are denser than MUTA graphs (D = 18%). Two versions are used: CMUHOUSE-NA (attributes ignored) and CMUHOUSE-A (attributes considered).

Key Insights and Ideas

  • Edge-Independent Constraints are Key: The most significant insight is that decoupling constraints from the number of edges in the graph can dramatically improve performance for dense graphs. This is because the complexity of F2's edge-related constraints grows with the number of edges, whereas F3's constraints remain constant in number regardless of edge count.
  • Trade-off in Variables for Constraint Simplicity: F3 introduces more variables than F2, specifically for edge matching. However, this increase in variables is a worthwhile trade-off for the substantial reduction in the complexity and number of constraints, especially for dense graphs.
  • GED as a Vertex-Vertex Matching Problem: The paper reinforces the idea that edge matching in GED is fundamentally driven by vertex-vertex matching. This perspective guides the formulation of constraints that ensure topological consistency.
  • Performance Gains on Dense Graphs: The experimental results strongly support the hypothesis that F3 outperforms F2 on denser datasets, demonstrating the practical benefit of its edge-independent constraint design.

Key Results

The experimental results, summarized in Tables 2 and 3, highlight the effectiveness of F3:

  • MUTA (Non-Dense Graphs): For the low-density MUTA dataset, F3 and F2 show comparable performance in terms of average computation time (tavg) and deviation from the best solution (davg). Both formulations achieve near-optimal solutions for a high percentage of instances. This aligns with the first assumption that F3 is as good as F2 on non-dense graphs.
  • CMUHOUSE (Dense Graphs): On the denser CMUHOUSE dataset, F3 significantly outperforms F2.
  • In the CMUHOUSE-NA version (no attributes), F3 achieves a much lower average deviation (0.70% vs. 604.11% for F2) and computes optimal solutions for a substantially higher number of instances (365 for F3 vs. 25 for F2).
  • In the CMUHOUSE-A version (with attributes), F3 also shows superior performance with a lower average deviation (0.22% vs. 4.68% for F2) and more optimal solutions (652 for F3 vs. 505 for F2).
  • These results validate the second assumption that F3 performs better on dense graphs due to its edge-independent constraints.

Limitations and Future Work

  • Limitations:
    • The paper focuses on undirected graphs. While it mentions how to adapt for directed graphs, the primary formulation and experimental validation are for undirected cases.
  • For very large or extremely dense graphs, both formulations can still reach the time limit (900 seconds), indicating that exact methods, even improved ones, have inherent scalability limits.
  • Future Work:
    • The authors suggest evaluating the new formulation against more graph databases with varying settings, particularly focusing on graphs with high and very high densities.
  • Further investigation into optimizing the formulation for directed graphs and exploring its performance on even larger-scale problems would be valuable.

Summary updated

BibTeX
@inproceedings{darwiche2018graph,
  author = {Mostafa Darwiche and Romain Raveaux and Donatello Conte and Vincent t'Kindt},
  title = {{Graph Edit Distance in the exact context}},
  booktitle = {S+SSPR},
  year = {2018},
  doi = {10.1007/978-3-319-97785-0\_29},
}
Figure