Neural models that estimate graph edit distance have a data problem. Graph edit distance is the minimum cost of node and edge insertions, deletions and relabelings needed to turn one graph into another. Computing it is NP-hard, and exact solvers stop being practical at about 20 nodes. Every training label therefore comes from an expensive exact solver on small graphs. The benchmarks built this way are badly contaminated: up to 94.8% of train–test pairs involve isomorphic graphs, and when that leakage is removed ISONET's error on LINUX rises from 0.323 to 5.146 mean squared error (Position: Graph Matching Systems Deserve Better Benchmarks; Graph Edit Distance Evaluation Datasets: Pitfalls and Mitigation). Current models may be memorizing graphs, or matching histograms of node labels and degrees, rather than learning to align structure.
Back-translation in machine translation handles a similar shortage with an asymmetry. The hard direction lacks data, so a model runs the easy direction to produce synthetic inputs whose outputs are known to be real. Graph edit distance has a sharper version of the same asymmetry. Finding the cheapest edit path is NP-hard. Applying a chosen edit script to a real graph is trivial, and it gives a guaranteed upper bound on the distance at once. This proposal turns that into a training-data generator. We start from a real graph, apply an edit script to get a partner, and keep the pair's label only when a cheap lower bound, a threshold-bounded exact search, or the model's own reverse-direction path either confirms the label or tightens it. We also build adversarial "scrambled" partners, modeled on the PAWS dataset of paraphrase adversaries, that share a graph's exact label and degree histograms but are wired differently. These pairs target the shortcut that current matchers are suspected of using.
Core Claim
Training graph edit distance models on round-trip pairs, whose labels are certified or tightened rather than assumed, will improve accuracy on leakage-free splits and on graphs larger than the exact-solver regime. This matters most under non-uniform edit costs and on histogram-matched adversarial pairs. The ingredient we claim is new is certification. The naive version labels a script of $k$ random edits with distance $k$. That label is only an upper bound, and it can be badly wrong when edits cancel or when a cheaper path exists. We expect this error to be worst under non-uniform costs, where a cheap substitution can replace an expensive delete-and-insert.
A label is certified exact whenever
$$L(G, G') = c(\sigma) \quad\text{where } c(\sigma) \ge \text{GED}(G, G') \ge L(G, G'),$$
with $c(\sigma)$ the cost of the applied edit script $\sigma$ and $L$ any valid cheap lower bound, such as one computed from label and degree multisets. Pairs where the two bounds disagree go to a search that only asks whether any path cheaper than $c(\sigma)$ exists. Having the upper bound in hand prunes this search heavily, so its cost is driven by the script size more than by the graph size; we will measure this rather than assume it. Pairs too large even for that search are labeled with an interval, not a point.
Relation to Prior Work
Two works come closest, and both leave training-set generation open. EPIC interpolates along edit paths between two existing labeled graphs, using learned costs and a Sinkhorn (soft, differentiable) matching. It augments graph classifiers, not edit distance models, and it never needs a verified distance. Our pairs are anchored on a single real graph, and their labels are verified distances. MAGG builds known-relation "mutants" of a problem instance at test time and aggregates a frozen model's predictions over them with a second network. It improves GREED's RMSE on LINUX by 42% but gives no improvement on labeled AIDS graphs, because random edits to labeled molecules change distances unpredictably. That negative result constrains our design: it is the reason we certify labels instead of trusting edit counts. It also leaves room for us, since MAGG never changes what the base model learns.
CLUM enforces round-trip consistency of hard permutations across image keypoint triplets. It supplies the idea that a round trip should close, but it has no insertions or deletions and generates no data. BBRT feeds a molecule translator's outputs back into itself to optimize chemical properties. That loop runs one way and never tests whether structure is preserved.
On the language side, PAWS combines word scrambling with back-translation. BERT falls to 33–40% on the resulting high-overlap pairs, and 12,000 such training pairs raise it to 85%. This motivates our scrambled partners. Wieting et al. found that back-translated pairs are cleaner for short sentences because decoding errors accumulate on long ones. We expect the graph analogue: certification will succeed less often as edit scripts grow, and we report certification rate against script size.
The matchers we would train come from SimGNN, GELATO and DiffGED. SimGNN's use of a pairwise-similarity histogram is exactly the kind of summary a scramble should fool. GELATO is an autoregressive node-by-node matcher, and DiffGED is a diffusion-based matcher that denoises candidate matchings. Both output explicit edit paths, which our tightening step needs.
Research Program
The generator has three modes, all applied to training-split graphs from the leakage-free suites. Test graphs are never used as seeds, so no new leakage enters.
The first mode is round-trip edits. We sample edit scripts of size $k$ from a cost-aware proposal distribution, apply them, and certify each pair by the bound check above. If that fails, we run the threshold-bounded exact search, capped by a per-pair time budget. The second mode is scrambles. We apply $s$ degree-preserving double edge swaps, restricted to preserve node-label multisets. Every label or degree histogram is then identical between the two graphs, so histogram lower bounds collapse to zero and give no certificate. Under uniform costs the distance is at most $4s$, since each swap deletes two edges and inserts two. We label small scrambles exactly with MIP-F2, the exact integer-programming solver used by the benchmark papers, and label large ones by interval. The third mode is back-translation-style tightening. For uncertified pairs, the current matcher decodes an edit path from $G'$ back to $G$. Any path cheaper than $c(\sigma)$ replaces the label, because every decoded path is a valid upper bound. Tightening can therefore only improve labels, never corrupt them. We iterate this, in the spirit of iterative back-translation.
For interval-labeled pairs, the training loss penalizes predictions only when they fall outside the interval. Every mode runs under all four cost regimes in the benchmark suite: uniform, non-uniform, label-substitution and edge-only. We will analyze three things: certification rate as a function of $k$, graph size and cost regime; how far naive $k$-labels sit from certified labels; and the compute spent per certified pair compared with MIP-F2 on real pairs.
Baselines
The naive reference point is each matcher trained only on the leakage-free training split, with no augmentation.
The strongest existing methods are DiffGED and GELATO trained this way. The file reports DiffGED at "approximately 95% accuracy" across datasets and nearly double the accuracy of GEDGNN and GEDIOT on AIDS700 (Towards Generative Graph Matching for Graph Edit Distance Computation). It is unclear whether that figure is on leakage-free splits, and I found no reported result on Lacuna for DiffGED or GELATO under the four-cost leakage-free protocol. We will therefore rerun both ourselves with their published configurations. Beating them means lower mean absolute error and higher exact-hit rate on the leakage-free test split, averaged over three seeds with non-overlapping intervals, at matched gradient steps and matched hyperparameter search budgets. We count every synthetic pair against the step budget.
The key ablation is the naive round trip: identical scripts labeled by edit count $k$, with no certification or tightening. This isolates whether certification matters. A second ablation removes the scramble mode.
The test-time competitor is MAGG applied to GREED. It reported a 42% relative RMSE improvement on LINUX and no improvement on AIDS (Extending Test-Time Augmentation with Metamorphic Relations for Combinatorial Problems). We run it on the same splits to compare fixing training against fixing inference, and we try the two together.
The structural-augmentation competitors are DropEdge and EPIC-style interpolation. For these, pair labels are recomputed with MIP-F2 where feasible, and the same number of synthetic pairs is used.
Why not just…?
Why not just label $k$ random edits with $k$? This is the real threat. For small $k$ under uniform costs, the edit count is probably often exact, and if so certification adds cost without benefit. The naive-round-trip ablation settles it. We also report the fraction of naive labels that are wrong, and by how much, in each cost regime. If certified and naive training tie everywhere, we will say so. The contribution would then shrink to the scramble test set and the finding that label error does not matter.
Why not just spend the compute on more exact MIP-F2 labels for real pairs? Real training pairs are limited by the number of unique graphs, since the benchmark suites deduplicate by isomorphism. Exact labels also stop at about 20 nodes (Gelato). We match wall-clock labeling budgets: exhaustive MIP-F2 labeling of all train-graph pairs against our generator. We then compare in-size and larger-size test accuracy. If exact real pairs win in-size, our claim narrows to the larger-graph regime.
Why not just use DropEdge or EPIC? DropEdge leaves pair labels undefined for edit distance training. EPIC was designed for classifiers and assigns interpolated labels, not verified distances. MAGG's failure on AIDS shows that label-agnostic perturbations hurt on labeled graphs (MAGG). The matched-budget comparison in the baselines tests this directly.
Proposed Experiments
We use the leakage-free suites from the benchmark critiques: AIDS, LINUX, IMDB, Mutagenicity, molhiv, code2 and Yeast. We split 60:20:20 after isomorphism filtering and use all four cost regimes, with MIP-F2 ground truth. Metrics are mean absolute error, exact-hit rate and Kendall tau.
Three checks decide the outcome. The first is a PAWS-style scramble test set built only from test-split graphs and labeled exactly by MIP-F2. On it, we expect every baseline, SimGNN above all, to degrade sharply relative to its performance on standard pairs, and scramble-trained models to recover much of the gap. If baselines do not degrade, the shortcut hypothesis is false and we report that. The second is a size-generalization test on graphs beyond 20 nodes. There we evaluate against interval labels built from the tightest known upper bound and a cheap lower bound, and report both interval violations and upper-bound improvements. The third is the certified-versus-naive comparison under non-uniform and label-substitution costs, where we predict the largest gap.
References
- Position: Graph Matching Systems Deserve Better Benchmarks
- Graph Edit Distance Evaluation Datasets: Pitfalls and Mitigation
- EPIC: Graph Augmentation with Edit Path Interpolation via Learnable Cost
- Extending Test-Time Augmentation with Metamorphic Relations for Combinatorial Problems
- Discrete Cycle-Consistency Based Unsupervised Deep Graph Matching
- Black Box Recursive Translations for Molecular Optimization
- PAWS: Paraphrase Adversaries from Word Scrambling
- Learning Paraphrastic Sentence Embeddings from Back-Translated Bitext
- SimGNN: A Neural Network Approach to Fast Graph Similarity Computation
- Gelato: Graph Edit Distance via Autoregressive Neural Combinatorial Optimization
- Towards Generative Graph Matching for Graph Edit Distance Computation