[Paper Review] Computing Optimal Assignments in Linear Time for Approximate Graph Matching
This paper proposes a linear-time algorithm for computing optimal assignments when the cost function is a tree distance, enabling efficient approximation of graph edit distance. By leveraging tree metrics for discrete and continuous vertex labels, the method achieves near-optimal performance with drastically reduced runtime compared to cubic-time Hungarian algorithms.
Finding an optimal assignment between two sets of objects is a fundamental problem arising in many applications, including the matching of `bag-of-words' representations in natural language processing and computer vision. Solving the assignment problem typically requires cubic time and its pairwise computation is expensive on large datasets. In this paper, we develop an algorithm which can find an optimal assignment in linear time when the cost function between objects is represented by a tree distance. We employ the method to approximate the edit distance between two graphs by matching their vertices in linear time. To this end, we propose two tree distances, the first of which reflects discrete and structural differences between vertices, and the second of which can be used to compare continuous labels. We verify the effectiveness and efficiency of our methods using synthetic and real-world datasets.
Motivation & Objective
- Address the computational bottleneck of optimal assignment in graph matching, which typically requires O(n³) time.
- Develop a method to compute optimal assignments in linear time under specific cost functions.
- Enable practical application of optimal assignment in large-scale graph comparison tasks.
- Design tree-based distance metrics that capture structural and continuous label differences in graphs.
- Provide a scalable alternative to exact graph edit distance computation, which is NP-hard.
Proposed method
- Represent the cost between graph vertices using a tree distance metric, enabling linear-time optimal assignment via dynamic programming.
- Introduce two tree distance functions: one for discrete, structural differences between vertices, and another for continuous labels.
- Apply the tree distance to approximate the graph edit distance by matching vertices in linear time.
- Use the Weisfeiler-Lehman subtree kernel to generate tree-structured representations of graphs for cost computation.
- Embed optimal assignment costs in an ℓ₁ space to support efficient nearest neighbor search in graph databases.
- Leverage the fact that tree metrics allow for efficient computation of minimum-cost assignments using dynamic programming on trees.
Experimental results
Research questions
- RQ1Can optimal assignments be computed in linear time when the cost function is a tree distance?
- RQ2How well does the proposed method approximate the exact graph edit distance on real-world and synthetic datasets?
- RQ3What is the trade-off between accuracy and runtime when using tree-based costs versus exact or greedy methods?
- RQ4Can tree distances effectively model both discrete and continuous vertex labels in graph matching?
- RQ5Does the linear-time approach maintain competitive classification accuracy in graph-based machine learning tasks?
Key findings
- The proposed method computes optimal assignments in O(n) time when costs are derived from tree distances, a significant improvement over the standard O(n³) Hungarian algorithm.
- On the Mutagenicity dataset, the Linear method achieved higher classification accuracy (81.5%) than BP (78.1%), Greedy (79.2%), and GraphHopper (73.5%).
- For the Letter datasets, the Linear method matched or slightly outperformed other methods in low-distortion settings, with classification accuracy of 98.8% (Letter L) and 93.6% (Letter M).
- Runtime performance was dramatically superior: the Linear method completed on average in 13 seconds on the NCI1 dataset, while the exact method timed out after 100 seconds on hard instances.
- The method showed a clear divergence from the exact graph edit distance on high-edit-distance pairs, but this did not degrade performance in nearest-neighbor classification.
- The Weisfeiler-Lehman tree representation enabled better exploitation of graph structure than BP, contributing to higher accuracy on molecular datasets.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.