Abstract
The need to identify graphs with small structural distances from a query arises in domains such as biology, chemistry, recommender systems, and social network analysis. Among several methods for measuring inter-graph distance, Graph Edit Distance (GED) is preferred for its comprehensibility, though its computation is hindered by NP-hardness. Optimization based heuristic methods often face challenges in providing accurate approximations. State-of-the-art GED approximations predominantly utilize neural methods, which, however: (i) lack an explanatory edit path corresponding to the approximated GED; (ii) require the NP-hard generation of ground-truth GEDs for training; and (iii) necessitate separate training on each dataset. In this paper, we propose EUGENE, an efficient, algebraic, and structure-aware optimization based method that estimates GED and also provides edit paths corresponding to the estimated cost. Extensive experimental evaluation demonstrates that EUGENE achieves state-of-the-art GED estimation with superior scalability across diverse datasets and generalized cost settings.
The Challenge of Graph Similarity
Graph Edit Distance (GED) is widely considered the "gold standard" for measuring structural similarity between two graphs. It quantifies the minimum cost required to transform one graph into another through a sequence of elementary operations: node/edge insertions, deletions, and substitutions. This metric is indispensable in fields ranging from drug discovery (comparing molecular structures) to social network analysis.
However, calculating the exact GED is an NP-hard problem, making it computationally prohibitive for large-scale applications. While recent research has pivoted toward Graph Neural Networks (GNNs) for approximation, these "black-box" models suffer from significant drawbacks: they lack interpretability (failing to provide the actual edit path), require expensive ground-truth data for training, and often fail to generalize across different graph domains without costly retraining.
EUGENE: An Algebraic Optimization Approach
To address these limitations, we introduce EUGENE (Explainable Structure-aware Graph Edit Distance). EUGENE moves away from data-hungry deep learning models, returning to classical optimization but enhanced with a modern algebraic framework.
Key components of the EUGENE methodology include:
- Algebraic Reformulation: EUGENE treats GED as a generalized graph alignment problem. By utilizing adjacency matrices to represent graph topology, it seeks a permutation matrix that minimizes the structural discrepancy between two graphs.
- Convex Relaxation: To navigate the discrete search space, EUGENE relaxes the problem to search over "doubly stochastic matrices." This transformation converts a difficult discrete search into a smooth, continuous optimization problem.
- M-ADAM Optimizer: We developed a modified version of the Adam optimizer (M-ADAM) specifically tailored to handle the unique constraints of graph alignment and matrix-based optimization.
- Inverse Relabeling and Regularization: To maintain efficiency and ensure convergence, EUGENE employs an "inverse relabeling" technique that recenters the coordinate system after each iteration. Furthermore, permutation-inducing regularizers are used to nudge the soft mapping toward a valid, discrete node-to-node correspondence, ensuring the final result is a usable edit path.
Experimental Evaluation
We evaluated EUGENE against 15 state-of-the-art baselines across a diverse set of benchmarks, including biological datasets (AIDS, Mutag), software structures (Code2), and large-scale collaboration networks (Netscience). Unlike many neural models that struggle with scale, EUGENE was tested on graphs with over 300 nodes—a scale rarely reached in existing GED approximation literature.
Key Results and Performance
EUGENE consistently outperformed both supervised neural models and traditional heuristics in terms of accuracy, scalability, and interpretability.
- Superior Accuracy: As shown in the performance tables, EUGENE achieved significantly lower Mean Absolute Error (MAE) than competing methods. For instance, it demonstrated up to 72% lower MAE than the next best method on the AIDS dataset and 44% lower error on Mutag.
- Scalability and Efficiency: EUGENE maintained high accuracy on larger graphs (25–50 nodes) where neural models typically degrade. It also successfully processed graphs with over 300 nodes that caused other baselines to fail.
- Interpretability: Beyond just a distance score, EUGENE provides a valid edit path. In "Strict Interpretability" tests, which measure how often a model identifies the actual optimal transformation path, EUGENE scored significantly higher than other heuristic approaches.
- Environmental Sustainability: By operating on CPUs and eliminating the need for massive GPU-based training cycles, EUGENE is remarkably energy-efficient. On the Molhiv dataset, its carbon footprint was found to be 30 times lower than comparable neural counterparts.
Conclusion
EUGENE represents a significant step forward in graph similarity measurement by combining the interpretability of classical optimization with the efficiency of modern algebraic techniques. By being training-free and structure-aware, it offers a scalable, accurate, and "green" alternative to current neural GED approximation methods. Future work will explore GPU parallelization to further accelerate matrix operations and the integration of domain-specific cost functions for specialized applications like structural biology.
Summary updated