Graph GOSPA metric: a metric to measure the discrepancy between graphs of different sizes
Jinhao Gu, Ángel F. García-Fernández, Robert E. Firth, Lennart Svensson
TL;DR
The paper introduces the graph GOSPA metric, a principled distance between graphs of different sizes that incorporates both node attributes and edge structure by optimizing node assignments and penalising edge mismatches. It extends the generalised optimal sub-pattern assignment framework from sets to graphs and provides a polynomial-time computable LP lower bound, while handling undirected, weighted, and directed graphs. A decomposable objective separates localisation, missed, and false-node costs from the edge-mismatch term, enabling interpretable diagnostics. Validation on simulated graphs and molecular datasets demonstrates the metric’s interpretability, computational feasibility, and competitive performance against existing graph distances such as GED, MCS, and GCD.
Abstract
This paper proposes a metric to measure the dissimilarity between graphs that may have a different number of nodes. The proposed metric extends the generalised optimal subpattern assignment (GOSPA) metric, which is a metric for sets, to graphs. The proposed graph GOSPA metric includes costs associated with node attribute errors for properly assigned nodes, missed and false nodes and edge mismatches between graphs. The computation of this metric is based on finding the optimal assignments between nodes in the two graphs, with the possibility of leaving some of the nodes unassigned. We also propose a lower bound for the metric, which is also a metric for graphs and is computable in polynomial time using linear programming. The metric is first derived for undirected unweighted graphs and it is then extended to directed and weighted graphs. The properties of the metric are demonstrated via simulated and empirical datasets.
