Equivariant Neural Primal-Dual Assignment for Maximum Common Edge Subgraphs
Organizations: Fudan University · Shanghai AI Lab · Shanghai Innovation Institute · Nanjing University ·
Abstract
Maximum common edge subgraph (MCES) matching finds a partial vertex correspondence between two labeled graphs that preserves as many labeled edges as possible. Molecular similarity search requires matching many graph pairs, making the cost of repeated queries important. The strongest baseline attains accurate MCES solutions but trains a separate network for each pair. We introduce Equivariant Neural Primal-Dual Assignment (ENPDA), which learns a shared matching policy and applies it to new pairs without further training, answering queries roughly three orders of magnitude faster and recovering its training cost after a few dozen queries. The policy recomputes exact objective marginals for candidate matches and learns corrections and step sizes that update their scores. Target prices respond to competition when several source vertices favor the same target. Four update rounds and a Hungarian projection produce a partial one-to-one matching. We prove per-pair guarantees that hold for any network parameters. In exact arithmetic, reordering either graph permutes the assignment and price states, the projected matching is one-to-one, and repaired prices give a valid MCES upper bound. Subtracting the preserved-edge count bounds the optimality gap; combined with structural caps, these certificates prove global optimality for 60 of 291 native test pairs. On three molecular benchmarks with disjoint train/validation/test splits, ENPDA improves over an analytic counterpart with the same update and projection budget by 7.4-8.6 accuracy points; after one second of refinement search, 2.5-3 points of the gain remain. Transferred without fine-tuning to edge-deletion tasks from social and protein graphs, the policy gains 9.1-17.6 points over the analytic counterpart. When output matchings must keep aromatic rings intact, ENPDA recovers more reference bonds than the baselines on all three datasets.
Figures & tables
| Method | AIDS | MOLHIV | MCF-7 |
|---|---|---|---|
| No search | |||
| Analytic Core | 49.78 | 55.36 | 59.19 |
| ENPDA-Core | 58.29 | 62.77 | 67.81 |
| Nominal 60s | |||
| RASCAL | 99.05 | 99.47 | 98.92 |
| ENPDA | 98.82 | 99.50 | 98.49 |
| Arm | AIDS | MOLHIV | MCF-7 |
|---|---|---|---|
| Analytic | 50.18 | 55.06 | 59.04 |
| Initializer only | 54.15 | 57.66 | 59.94 |
| Dynamics only | 55.84 | 60.10 | 64.88 |
| Full without prices | 56.60 | 62.31 | 68.26 |
| ENPDA (full) | 57.93 | 62.39 | 68.00 |
| Dataset | Pairs | RASCAL | NGA | ENPDA-Solver |
|---|---|---|---|---|
| AIDS | 100 | 86.85 | 78.46 | 89.73 |
| MOLHIV | 91 | 92.71 | 88.79 | 95.00 |
| MCF-7 | 100 | 86.27 | 82.10 | 89.04 |
Appendix figures & tables36 assets
Supplementary material from the paper’s appendix.
Appendix
| Graphs and auction state | Network, training, and theory | ||
|---|---|---|---|
| labeled source graph ( analogously): vertices , edges , node labels , edge labels | , | frozen network parameters; hidden width | |
| , | source and target vertex counts, | , , , | neural correction; primal and dual multipliers; unmatched update |
| , , | partial injective map; unmatched marker; preserved-edge set | , | clipping projection; positive part |
| , | label-compatible node pairs; association-common-graph edges | , , | all-ones vector; indicator function; row stacking |
| sparse symmetric ACG adjacency on the grid | , , | teacher mapping; active source rows; round- negative log likelihood | |
| , | soft assignment; hard partial-injection matrix | , , | trajectory imitation, analytic-relative, and total losses |
| Dataset | Train | Validation | Test | Test clusters |
|---|---|---|---|---|
| AIDS | 19 | 11 | 100 | 21 |
| MOLHIV | 628 | 76 | 91 | 90 |
| MCF-7 | 696 | 85 | 100 | 82 |
| Seed | Retrained no-price | ENPDA (full) |
|---|---|---|
| 0 | 10 | 4 |
| 1 | 12 | 12 |
| 2 | 12 | 6 |
| Arm / contrast | AIDS | MOLHIV | MCF-7 |
|---|---|---|---|
| Sinkhorn | 45.82 | 47.53 | 45.60 |
| Gumbel–Sinkhorn (10) | 39.51 | 44.83 | 46.30 |
| ENPDA-Core | 58.29 | 62.77 | 67.81 |
| Full Sinkhorn | +12.47 [9.04, 15.42] | +15.24 [12.05, 18.39] | +22.21 [19.19, 25.42] |
| Full Gumbel–Sinkhorn | +18.77 [15.95, 21.33] | +17.94 [14.39, 21.68] | +21.52 [18.01, 24.91] |
| Sinkhorn time (s) | 0.253 | 0.151 | 0.169 |
| Arm / contrast | AIDS | MOLHIV | MCF-7 |
|---|---|---|---|
| Analytic | 49.78 | 55.36 | 59.19 |
| Retrained no-price | 58.81 | 62.45 | 67.73 |
| Full, prices removed | 56.70 | 63.25 | 67.98 |
| Analytic, no prices | 48.32 | 54.16 | 55.96 |
| ENPDA-Core | 58.29 | 62.77 | 67.81 |
| : full analytic | +8.50 [5.89, 12.31] | +7.41 [4.32, 10.51] | +8.62 [5.83, 11.43] |
| Arm / contrast | AIDS | MOLHIV | MCF-7 |
|---|---|---|---|
| Analytic | 48.53 | 55.31 | 59.61 |
| Retrained no-price | 58.79 | 62.47 | 68.98 |
| Full, prices removed | 57.86 | 62.06 | 68.39 |
| Analytic, no prices | 47.18 | 54.57 | 55.89 |
| Full | 59.15 | 62.15 | 67.96 |
| Full analytic | +10.62 [7.06, 14.63] | +6.84 [3.76, 9.83] | +8.35 [5.34, 11.46] |
| Arm / contrast | AIDS | MOLHIV | MCF-7 |
|---|---|---|---|
| Analytic | 50.18 | 55.06 | 59.04 |
| Initializer only | 54.15 | 57.66 | 59.94 |
| Dynamics only | 55.84 | 60.10 | 64.88 |
| Full without prices | 56.60 | 62.31 | 68.26 |
| Full | 57.93 | 62.39 | 68.00 |
| Initializer analytic | +3.96 [1.72, 6.47] | +2.60 [0.03, 5.16] | +0.89 [-1.93, 3.71] |
| Dataset | Rounds | Difference [95% CI] | Analytic | ENPDA |
|---|---|---|---|---|
| AIDS | 1 | +1.83 [-1.41, 5.89] | 41.33 | 43.16 |
| AIDS | 2 | +2.87 [-0.39, 6.68] | 46.15 | 49.02 |
| AIDS | 4 | +9.05 [5.83, 13.10] | 49.23 | 58.28 |
| AIDS | 8 | +10.98 [8.47, 15.19] | 60.68 | 71.65 |
| AIDS | +13.37 [9.89, 17.73] | — | — | |
| MOLHIV | 1 | +3.96 [1.16, 6.79] | 43.40 | 47.36 |
| Dataset | Rounds | Build | Trajectory | Projection | Total |
|---|---|---|---|---|---|
| AIDS | 4 | 0.0204 | 0.2349 | 0.0005 | 0.2558 |
| AIDS | 8 | 0.0204 | 0.2396 | 0.0005 | 0.2606 |
| MOLHIV | 4 | 0.0140 | 0.1370 | 0.0004 | 0.1515 |
| MOLHIV | 8 | 0.0140 | 0.1420 | 0.0005 | 0.1565 |
| MCF-7 | 4 | 0.0161 | 0.1503 | 0.0005 | 0.1669 |
| MCF-7 | 8 | 0.0161 | 0.1551 | 0.0005 | 0.1716 |
| Arm / metric | AIDS | MOLHIV | MCF-7 |
|---|---|---|---|
| Analytic Core accuracy | 49.69 | 54.90 | 59.09 |
| Analytic Core mean s | 0.25 | 0.15 | 0.16 |
| Analytic Core P95 s | 0.42 | 0.27 | 0.36 |
| ENPDA-Core accuracy | 57.97 | 61.80 | 67.87 |
| ENPDA-Core mean s | 0.26 | 0.16 | 0.17 |
| ENPDA-Core P95 s | 0.44 | 0.27 | 0.36 |
| Method | AIDS | MOLHIV | MCF-7 |
|---|---|---|---|
| NeuroMatch | 13.92 | 19.17 | 17.34 |
| SimGNN | 15.42 | 14.38 | 20.29 |
| GMN | 39.38 | 29.77 | 24.03 |
| XMCS | 36.42 | 21.47 | 32.22 |
| INFMCS | 25.18 | 16.39 | 31.12 |
| NGA (literature) | 1.13 | 0.66 | 0.99 |
| Dataset | Search s | Difference [95% CI] | Analytic | ENPDA |
|---|---|---|---|---|
| AIDS | 0 | +8.78 [5.68, 13.37] | 49.53 | 58.32 |
| AIDS | 1 | +2.66 [0.16, 6.59] | 83.79 | 86.44 |
| AIDS | 5 | +0.24 [-0.47, 0.74] | 96.21 | 96.45 |
| AIDS | 30 | +0.29 [-0.07, 0.64] | 98.39 | 98.69 |
| MOLHIV | 0 | +7.08 [3.52, 10.60] | 55.18 | 62.26 |
| MOLHIV | 1 | +2.46 [0.64, 4.66] | 91.29 | 93.76 |
| Dataset | Analytic | Neural 0 | Neural 1 | Neural 2 |
|---|---|---|---|---|
| AIDS | 15 | 228 | 38 | 19 |
| MOLHIV | 5 | 228 | 27 | 13 |
| MCF-7 | 16 | 225 | 34 | 25 |
| Method | AIDS | MOLHIV | MCF-7 |
|---|---|---|---|
| Analytic-Core | 49.97 / 252.8 | 55.46 / 148.8 | 58.86 / 164.0 |
| FMCS-0.10s | 44.48 / 22.7 | 46.62 / 7.5 | 47.19 / 15.1 |
| FMCS-0.16s | 44.54 / 28.3 | 46.62 / 7.5 | 47.22 / 17.4 |
| FMCS-0.60s | 44.56 / 52.9 | 46.62 / 7.6 | 47.22 / 35.4 |
| FMCS-matched | 44.54 / 38.4 | 46.62 / 7.3 | 47.22 / 27.4 |
| McSplit-0.10s | 56.32 / 93.4 | 63.32 / 88.8 | 60.09 / 90.5 |
| Dataset | Reference | Gain [95% CI] | P95 ms | Overrun ms | Over % |
|---|---|---|---|---|---|
| AIDS | FMCS | 13.10 [8.59, 19.89] | 252.9 | 0.56 | 6.0 |
| AIDS | McSplit | 1.00 [-4.67, 6.00] | 418.1 | 0.34 | 1.0 |
| MOLHIV | FMCS | 15.42 [10.42, 20.06] | 17.0 | 0.00 | 0.0 |
| MOLHIV | McSplit | -1.51 [-7.09, 4.04] | 269.0 | 0.22 | 0.0 |
| MCF-7 | FMCS | 20.82 [16.54, 24.79] | 77.2 | 0.14 | 4.0 |
| MCF-7 | McSplit | 7.24 [3.30, 11.18] | 348.9 | 0.23 | 0.0 |
| Dataset | Pairs | Difference [95% CI] | Analytic | ENPDA |
|---|---|---|---|---|
| IMDB-BINARY | 100 | +9.07 [7.18, 11.07] | 68.06 | 77.14 |
| Dataset | Pairs | Difference [95% CI] | Analytic | ENPDA |
|---|---|---|---|---|
| PROTEINS | 200 | +17.65 [16.36, 18.93] | 38.33 | 55.98 |
| ENZYMES | 200 | +17.55 [16.36, 18.74] | 37.98 | 55.53 |
| Method | Accuracy range (%) | Mean ms | P95 ms | Gain 95% CI |
|---|---|---|---|---|
| Analytic-Core | [83.94, 89.63] | 520.2 | 2663.3 | [0.99, 4.66] |
| McSplit-0.10s | [77.79, 83.42] | 45.3 | 100.5 | [1.03, 13.44] |
| McSplit-0.16s | [77.82, 83.47] | 69.8 | 160.6 | [0.97, 13.38] |
| McSplit-0.60s | [78.23, 83.95] | 221.3 | 600.6 | [0.20, 12.95] |
| McSplit-matched | [78.04, 83.73] | 198.3 | 390.8 | [0.60, 13.12] |
| ENPDA-Core | [86.28, 92.18] | 526.9 | 2800.7 | — |
| Nodes | Grid (k) | Compat. (k) | Build s | Forward s | Peak GiB | |
|---|---|---|---|---|---|---|
| 63.5 | 4.0 | 0.2 | 0.19 | 0.88 | 0.045 | 0.171 |
| 111.0 | 12.3 | 0.6 | 0.58 | 2.58 | 0.073 | 0.183 |
| 188.5 | 35.1 | 2.3 | 2.15 | 8.49 | 0.152 | 0.215 |
| 310.5 | 95.8 | 5.2 | 5.71 | 25.15 | 0.360 | 0.211 |
| 501.0 | 249.0 | 13.9 | 14.59 | 62.48 | 0.886 | 0.242 |
| Dataset | Difference [95% CI] | Mean seconds | RASCAL | ENPDA |
|---|---|---|---|---|
| AIDS | -0.23 [-0.65, 0.34] | 16.52 / 60.27 | 99.05 | 98.82 |
| MOLHIV | +0.03 [-0.43, 0.55] | 9.94 / 60.15 | 99.47 | 99.50 |
| MCF-7 | -0.43 [-0.95, 0.11] | 11.78 / 60.15 | 98.92 | 98.49 |
| All | -0.22 [-0.50, 0.09] | 12.83 / 60.19 | 99.14 | 98.92 |
| Cap s | Dataset | Pairs | Difference [95% CI] | RASCAL | ENPDA |
|---|---|---|---|---|---|
| 60 | AIDS | 21 | +3.32 [2.02, 4.33] | 95.49 | 98.82 |
| 60 | MOLHIV | 11 | +4.24 [1.88, 6.67] | 95.64 | 99.87 |
| 60 | MCF-7 | 18 | +3.58 [0.10, 7.04] | 94.00 | 97.58 |
| 60 | All | 50 | +3.62 [2.21, 5.06] | 94.99 | 98.60 |
| 900 | AIDS | 12 | +1.34 [-0.79, 3.17] | 96.83 | 98.16 |
| 900 | MOLHIV | 6 | +2.24 [0.00, 5.17] | 97.74 | 99.98 |
| RASCAL cap | Dataset | RASCAL | ENPDA |
|---|---|---|---|
| 60 | AIDS | 63.22 / 71.45 | 339.66 / 510.65 |
| 60 | MOLHIV | 65.24 / 73.26 | 176.88 / 256.90 |
| 60 | MCF-7 | 61.01 / 61.03 | 281.55 / 443.14 |
| 60 | All | 62.87 / 71.72 | 282.93 / 497.95 |
| 900 | AIDS | 903.87 / 913.36 | 344.23 / 504.04 |
| 900 | MOLHIV | 903.54 / 908.22 | 183.29 / 245.54 |
| Method | AIDS (100) | MOLHIV (91) | MCF-7 (100) |
|---|---|---|---|
| RASCAL, internal filter off | 23.04 / 16.48 | 18.92 / 8.75 | 16.78 / 12.26 |
| RASCAL, internal filter on | 17.63 / 10.06 | 18.16 / 6.57 | 15.49 / 10.72 |
| NGA, one fit | 20.36 / 19.11 | 18.09 / 17.45 | 16.17 / 16.75 |
| ENPDA-Solver | 24.12 / 60.36 | 19.38 / 59.56 | 17.63 / 59.79 |
| ENPDA minus RASCAL (off), 95% CI | |||
| ENPDA minus NGA, 95% CI |
| Stage | Seed 0 s | Seed 1 s | Seed 2 s | Mean GPUh |
|---|---|---|---|---|
| Reference pretraining | 5728.86 | 5297.39 | 5381.80 | 1.5193 |
| Teacher generation | 466.28 | 466.05 | 441.52 | 0.1272 |
| Student optimization | 696.99 | 712.68 | 673.19 | 0.1929 |
| Setup overhead | 0.74 | 0.83 | 0.67 | 0.0002 |
| Complete startup | 6892.87 | 6476.96 | 6497.19 | 1.8395 |
| Dataset | Prices | Mean gap | Median gap | Closed |
|---|---|---|---|---|
| AIDS | Zero | 27.14 | 23.26 | 20/300 |
| AIDS | Analytic | 21.19 | 16.92 | 23/300 |
| AIDS | Neural | 16.67 | 15.34 | 31/300 |
| MOLHIV | Zero | 23.11 | 23.08 | 3/273 |
| MOLHIV | Analytic | 20.10 | 19.23 | 6/273 |
| MOLHIV | Neural | 18.70 | 18.87 | 17/273 |
| Dataset | Neural analytic | Neural zero |
|---|---|---|
| AIDS | -4.51 [-6.78, -1.36] | -10.47 [-14.64, -5.92] |
| MOLHIV | -1.40 [-2.43, -0.51] | -4.41 [-6.10, -2.92] |
| MCF-7 | -2.59 [-4.11, -1.32] | -7.44 [-10.14, -5.19] |
| Dataset | Pairs | Price gap | Closed | Combined gap | Closed |
|---|---|---|---|---|---|
| AIDS | 100 | 15.04 | 11 | 7.93 | 28 |
| MOLHIV | 91 | 18.28 | 5 | 10.34 | 10 |
| MCF-7 | 100 | 21.85 | 9 | 9.84 | 22 |
| Budget s | Dataset | Pairs | Closed | Median gap | Mean gap |
|---|---|---|---|---|---|
| 10 | AIDS | 25 | 5 | 33.67 | 28.63 |
| 10 | MOLHIV | 25 | 1 | 30.56 | 31.75 |
| 10 | MCF-7 | 25 | 3 | 30.30 | 30.72 |
| 10 | All | 75 | 9 | 32.26 | 30.37 |
| 300 | AIDS | 25 | 14 | 0.00 | 13.81 |
| 300 | MOLHIV | 25 | 13 | 0.00 | 13.48 |
| Dataset | Method | MRR [bounds] | P@10 [bounds] | MAP [bounds] |
|---|---|---|---|---|
| MOLHIV | Size | 0.026 [0.026, 0.026] | 0.392 [0.392, 0.402] | 0.345 [0.345, 0.356] |
| MOLHIV | WL | 0.375 [0.375, 0.375] | 0.980 [0.980, 0.980] | 0.704 [0.695, 0.709] |
| MOLHIV | SimGNN | 0.020 [0.020, 0.020] | 0.442 [0.442, 0.455] | 0.485 [0.484, 0.500] |
| MOLHIV | GMN | 0.152 [0.152, 0.152] | 0.688 [0.688, 0.705] | 0.569 [0.563, 0.588] |
| MOLHIV | NeuroMatch | 0.233 [0.233, 0.233] | 0.763 [0.763, 0.778] | 0.657 [0.651, 0.680] |
| MOLHIV | ENPDA-Fast | 0.975 [0.975, 0.975] | 0.998 [0.998, 0.998] | 0.957 [0.940, 0.962] |
| Dataset | Method | MRR [bounds] | P@10 [bounds] | MAP [bounds] |
|---|---|---|---|---|
| MOLHIV | Size | 0.015 [0.014, 0.026] | 0.305 [0.305, 0.325] | 0.316 [0.316, 0.329] |
| MOLHIV | WL | 0.414 [0.405, 0.418] | 0.842 [0.842, 0.847] | 0.630 [0.623, 0.638] |
| MOLHIV | SimGNN | 0.015 [0.015, 0.029] | 0.442 [0.442, 0.455] | 0.474 [0.473, 0.490] |
| MOLHIV | GMN | 0.146 [0.145, 0.149] | 0.632 [0.632, 0.648] | 0.537 [0.531, 0.557] |
| MOLHIV | NeuroMatch | 0.147 [0.143, 0.158] | 0.665 [0.665, 0.682] | 0.606 [0.600, 0.632] |
| MOLHIV | ENPDA-Fast | 0.776 [0.709, 0.788] | 0.962 [0.962, 0.970] | 0.946 [0.928, 0.954] |
| Dataset | Seed | Timeouts / 10k | Wall s/query | Worker s/query |
|---|---|---|---|---|
| MOLHIV | 0 | 106 | 57.78 | 456.55 |
| MOLHIV | 1 | 222 | 64.96 | 513.90 |
| MOLHIV | 2 | 78 | 65.22 | 515.30 |
| MCF-7 | 0 | 1448 | — | 974.44 |
| MCF-7 | 1 | 1831 | 132.90 | 1057.14 |
| MCF-7 | 2 | 2060 | 148.17 | 1179.59 |
Graph Matching
Graph matching finds correspondences between nodes and edges to compare, align, or locate related structures in graphs.
See all 35 papers