GRAIL: Graph Edit Distance and Node Alignment using LLM-Generated Code
Samidha Verma, Arushi Goyal, Ananya Mathur, Ankit Anand, Sayan Ranu
Abstract
Graph Edit Distance (GED) is a widely used metric for measuring similarity between two graphs. Computing the optimal GED is NP-hard, leading to the development of various neural and non-neural heuristics. While neural methods have achieved improved approximation quality compared to non-neural approaches, they face significant challenges: (1) They require large amounts of ground truth data, which is itself NP-hard to compute. (2) They operate as black boxes, offering limited interpretability. (3) They lack cross-domain generalization, necessitating expensive retraining for each new dataset. We address these limitations with GRAIL, introducing a paradigm shift in this domain. Instead of training a neural model to predict GED, GRAIL employs a novel combination of large language models (LLMs) and automated prompt tuning to generate a program that is used to compute GED. This shift from predicting GED to generating programs imparts various advantages, including end-to-end interpretability and an autonomous selfevolutionary learning mechanism without ground-truth supervision. Extensive experiments on seven datasets confirm that GRAIL not only surpasses state-ofthe-art GED approximation methods in prediction quality but also achieves robust cross-domain generalization across diverse graph distributions. To appear at the ICLR 2025 Workshop on Deep Learning For Code (DL4C) Name End-to-end interpretable Cross-domain generalization Non-reliant on NP-hard supervision Accurate
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext afab604e-2b5f-41de-9027-9387be80ae3bCited by top-tier papers1
Ask how each one uses itBuilds on12
- Open Graph Benchmark: Datasets for Machine Learning on GraphsWeihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong et al.NeurIPS 2020 · 3,935 citations
- Learning-Based Efficient Graph Similarity Computation via Multi-Scale Convolutional Set MatchingYunsheng Bai, Hao Ding, Ken Gu, Yizhou Sun et al.AAAI 2020 · 130 citations
- GREED: A Neural Framework for Learning Graph Distance FunctionsRishabh Ranjan, Siddharth Grover, Sourav Medya, Venkatesan T. Chakaravarthy et al.NeurIPS 2022 · 70 citations
- Spectral Graph Matching and Regularized Quadratic Relaxations: Algorithm and TheoryZhou Fan, Cheng Mao, Yihong Wu, Jiaming XuICML 2020 · 58 citations
- Computing Graph Edit Distance via Neural Graph MatchingChengzhi Piao, Tingyang Xu, Xiangguo Sun, Yu Rong et al.VLDB 2023 · 49 citations
Related papers
- Graph Edit Distance Estimation: A New Heuristic and A Holistic Evaluation of Learning-based MethodsMouyi Xu, Lijun ChangSIGMOD 2025 · 1 citation
- Noah: Neural-optimized A* Search Algorithm for Graph Edit Distance ComputationLei Yang, Lei ZouICDE 2021 · 20 citations
- Towards Generative Graph Matching for Graph Edit Distance ComputationWei Huang, Hanchen Wang, Dong Wen, Wenjie Zhang et al.ICML 2026
- Towards Unsupervised Training of Matching-based Graph Edit Distance Solver via Preference-aware GANWei Huang, Hanchen Wang, Dong Wen, Shaozhen Ma et al.NeurIPS 2025 · 4 citations
- TaGSim: Type-aware Graph Similarity Learning and ComputationJiyang Bai, Peixiang ZhaoVLDB 2022 · 29 citations
