Robust GNN Watermarking via Implicit Perception of Topological Invariants
Organizations: Department of Electrical and Computer Engineering, University of California, Davis, Davis, CA 95616, USA · Department of Electrical Engineering and Computer Science, University of California, Irvine, Irvine, CA 92697, USA
Abstract
Graph Neural Networks (GNNs) represent valuable intellectual property, yet watermarks based on out-of-distribution triggers can weaken under pruning, fine-tuning, and distillation. We present InvGNN-WM, which links ownership verification to graph-invariant prediction. By supervising a shared GNN backbone to predict normalized algebraic connectivity on owner-private carrier graphs, InvGNN-WM enables calibrated multi-bit black-box verification through either an auxiliary scalar endpoint or a fixed owner-side decoder of ordinary task logits. We provide conditional guarantees for task-loss control, decision preservation, and key separation, and prove NP-completeness of the exact-removal decision problem for a restricted class of monotone separable decoders. Experiments on node- and graph-classification benchmarks demonstrate high watermark fidelity with small changes in task performance. The task-logit deployment achieves higher detection rates than PreGIP-adapted in matched comparisons and retains detection under the evaluated extraction and retraining budgets. Watermark-assisted distillation further enables owner-side recovery using private verification material.
Figures & tables
| Variant | WM-ACC | Probe | Fresh-head WM-ACC |
| Full InvGNN-WM | |||
| Stop-gradient | |||
| Separate WM encoder | |||
| Task-only |
| Dataset–backbone | Method | Task ACC | AUROC | TPR: clean / FT-100 / KD |
| PROTEINS–GIN | PreGIP-adapted | 0.989 | 0.84 / 0.76 / 0.61 | |
| InvGNN-WM, auxiliary | 0.998 | 0.99 / 0.88 / – | ||
| InvGNN-WM, task-logit | 0.997 | 0.98 / 0.92 / 0.74 | ||
| NCI1–GIN | PreGIP-adapted | 0.993 | 0.90 / 0.83 / 0.67 | |
| InvGNN-WM, auxiliary | 0.999 | 1.00 / 0.96 / – | ||
| InvGNN-WM, task-logit | 0.999 | 1.00 / 0.97 / 0.82 |
| Interface | Attack | Task ACC (%) | WM-ACC (%) | Match count |
| Auxiliary | None | |||
| Literal endpoint deletion | Unavailable | |||
| Random head reset | 72.5 | 49.2 | 63 | |
| Head-only randomization, 100 epochs | 72.4 | 51.6 | 66 | |
| Pseudo-carrier attack | 100 | |||
| Output-only KD, 100 epochs | 72.1 | Unavailable | ||
| Backbone | Method | Task ROC-AUC (%) | WM-ACC / TPR | Train (min) | Memory (GB) | Audit (ms) |
| GIN | Task-only | – | 37.3 | 4.8 | – | |
| GIN | Task-logit | 88.3 / 0.96 | 42.8 | 5.3 | 81 | |
| GPS | Task-only | – | 66.3 | 9.1 | – | |
| GPS | Task-logit | 91.1 / 0.98 | 75.3 | 9.9 | 118 |
Appendix figures & tables21 assets
Supplementary material from the paper’s appendix.
Appendix
| Edit | Task ACC (%) | WM-ACC (%) |
| None | ||
| Pruning (40%) | ||
| Fine-tuning (20 epochs) | ||
| KD (temperature ) | ||
| Quantization (4-bit) |
| Match count | ||||
| 64 | 0.171 | 54 | ||
| 96 | 0.231 | 74 | ||
| 128 | 0.267 | 94 | ||
| 192 | 0.310 | 133 |
| Swap cap | KS | Task ACC (%) | WM-ACC (%) | Measured ( trials) | |
| 5 | 0.05 | 72.6 2.6 | 88.0 12.3 | ||
| 25 | 0.10 | 72.5 2.6 | 89.6 1.1 | ||
| 50 | 0.10 | 72.5 2.6 | 89.8 0.0 | ||
| 50 | 0.20 | 72.4 2.7 | 89.1 0.0 |
| Method | Task ACC (%) | WM-ACC (%) | Time / carrier (ms) | |
| Exact eigensolver | ||||
| Iterative approximation ( ) |
| Dataset–Backbone | Edit | Metric | TRIG | NAT | EXPL | InvGNN-WM |
| Cora–GCN | None | Task | ||||
| W-A | ||||||
| Pruning 40% | Task | |||||
| W-A | ||||||
| Fine-tuning | Task | |||||
| W-A |
| Method | Before adaptive attack | After adaptive attack | ||
| Task ACC | WM-ACC | Task ACC | WM-ACC | |
| TRIG | ||||
| NAT | ||||
| EXPL | ||||
| InvGNN-WM | ||||
| Model | ACC (%) | Prec (%) | Rec (%) |
| GCN classifier |
| Invariant | Task ACC (%) | WM-ACC (%) | |
| (ours) | |||
| Spectral radius (normalized) | |||
| Triangle count (normalized) |
| Dataset–Backbone | SS | COS | TRIG | NAT | EXPL | OURS |
| Cora GCN | 87.2 0.8 49.5 1.1 | 85.5 1.2 86.2 1.1 | 86.8 0.9 97.7 3.4 | 86.9 0.9 96.4 1.1 | 86.7 1.0 93.0 0.0 | 87.0 0.8 99.0 1.1 |
| Cora GraphSAGE | 84.0 1.0 50.0 0.0 | 82.1 1.5 83.9 1.1 | 83.9 1.1 97.1 1.1 | 83.8 1.2 96.9 0.0 | 83.7 1.1 92.4 1.1 | 83.8 1.0 98.4 3.4 |
| Cora SGC | 87.0 0.9 51.3 1.1 | 85.2 1.3 85.9 0.0 | 86.5 1.0 96.9 0.0 | 86.6 1.0 96.4 1.1 | 86.7 1.1 92.7 1.1 | 86.2 1.0 98.7 1.1 |
| PubMed GCN | 88.6 0.9 49.7 4.5 | 86.4 1.4 87.5 0.0 | 87.9 1.0 96.9 0.0 | 87.8 1.1 96.6 1.1 | 85.7 1.5 94.3 10.7 | 88.1 1.0 98.7 1.1 |
| PubMed GraphSAGE | 91.2 0.8 51.3 1.1 | 89.0 1.0 88.0 12.3 | 90.1 0.8 96.4 1.1 | 90.0 0.9 96.1 0.0 | 91.3 0.9 94.0 1.1 | 90.7 0.8 98.2 1.1 |
| PubMed SGC | 88.8 0.9 50.3 1.1 | 86.7 1.3 87.0 1.1 | 88.1 1.0 96.9 0.0 | 88.0 1.1 96.4 1.1 | 85.3 1.6 93.8 0.0 | 87.7 1.1 98.7 1.1 |
| Method | PROTEINS–GIN | PROTEINS–GraphSAGE | NCI1–GIN | NCI1–GraphSAGE |
| SS | 73.1 2.5 W-A: 50.0 0.0 | 72.8 2.6 W-A: 51.0 3.0 | 78.7 1.5 W-A: 50.5 1.1 | 75.5 1.8 W-A: 49.5 1.1 |
| COS | 71.0 3.0 W-A: 82.0 0.0 | 70.5 3.1 W-A: 81.5 1.1 | 76.2 2.1 W-A: 83.6 0.0 | 73.1 2.4 W-A: 84.1 1.1 |
| TRIG | 72.8 2.6 W-A: 95.1 3.0 | 71.9 2.8 W-A: 94.5 0.0 | 77.8 1.8 W-A: 94.8 1.1 | 74.8 2.0 W-A: 97.4 1.1 |
| NAT | 72.6 2.7 W-A: 94.8 1.1 | 71.8 2.9 W-A: 94.0 1.1 | 77.6 1.9 W-A: 94.3 1.1 | 74.7 2.1 W-A: 96.9 0.0 |
| EXPL | 72.4 2.8 W-A: 90.6 0.0 | 71.7 3.0 W-A: 89.8 0.0 | 77.9 1.9 W-A: 91.4 0.0 | 74.9 2.0 W-A: 92.2 0.0 |
| OURS | 72.5 2.6 W-A: 89.8 0.0 | 72.6 2.6 W-A: 95.8 4.5 | 78.3 1.6 W-A: 97.7 0.0 | 75.2 1.8 W-A: 98.2 1.1 |
| Dataset–Backbone | SS | COS | TRIG | NAT | EXPL | OURS |
| Cora–GCN | 87.2 0.8 W-A: 49.5 1.1 | 85.5 1.2 W-A: 86.2 1.1 | 86.8 0.9 W-A: 97.7 3.4 | 86.9 0.9 W-A: 96.4 1.1 | 86.7 1.0 W-A: 93.0 0.0 | 87.0 0.8 W-A: 99.0 1.1 |
| PubMed–GCN | 88.6 0.9 W-A: 49.7 4.5 | 86.4 1.4 W-A: 87.5 0.0 | 87.9 1.0 W-A: 96.9 0.0 | 87.8 1.1 W-A: 96.6 1.1 | 85.7 1.5 W-A: 94.3 10.7 | 88.1 1.0 W-A: 98.7 1.1 |
| AmazonPhoto–GCN | 91.3 0.6 W-A: 49.2 0.0 | 89.5 1.1 W-A: 88.3 0.0 | 90.8 0.7 W-A: 97.9 1.1 | 90.7 0.8 W-A: 97.4 1.1 | 90.9 0.8 W-A: 94.8 1.1 | 91.1 0.6 W-A: 99.2 0.0 |
| PROTEINS–GIN | 73.1 2.5 W-A: 50.0 0.0 | 71.0 3.0 W-A: 82.0 0.0 | 72.8 2.6 W-A: 95.1 3.0 | 72.6 2.7 W-A: 94.8 1.1 | 72.4 2.8 W-A: 90.6 0.0 | 72.5 2.6 W-A: 89.8 0.0 |
| NCI1–GIN | 78.7 1.5 W-A: 50.5 1.1 | 76.2 2.1 W-A: 83.6 0.0 | 77.8 1.8 W-A: 94.8 1.1 | 77.6 1.9 W-A: 94.3 1.1 | 77.9 1.9 W-A: 91.4 0.0 | 78.3 1.6 W-A: 97.7 0.0 |
| Dataset–backbone | Match count | Threshold | Mean gap |
| PROTEINS–GIN | 94 | ||
| NCI1–GIN | 94 | ||
| Cora–GCN | 94 |
| Layers / Res. / epochs / | Ratio | Bound | Task / WM-ACC | ||
| 4 / no / 100 / 0.8 | 0.42 | 0.61 | 0.0128 | 0.009 | 72.5 / 89.8 |
| 8 / no / 100 / 0.8 | 0.16 | 1.09 | – | 0.026 | 70.9 / 85.2 |
| 8 / yes / 100 / 0.8 | 0.30 | 0.78 | 0.0128 | 0.012 | 72.0 / 88.5 |
| 4 / yes / 300 / 0.8 | 0.31 | 1.02 | – | 0.018 | 71.7 / 84.9 |
| 4 / yes / 100 / 2.0 | 0.39 | 1.34 | – | 0.061 | 69.8 / 96.1 |
| Construction | Carrier-vs-task ACC (%) | Key balance | Empirical FPR | Time (s) |
| Full WL + local KS + spectral KS | 51.3 | 0.49 | 52.4 | |
| Without WL | 54.9 | 0.50 | 35.4 | |
| Without degree/clustering KS | 69.8 | 0.57 | 21.7 | |
| Without spectral-radius KS | 60.7 | 0.55 | 28.9 | |
| Erdos–Renyi carriers | 99.1 | 0.79 | 1.4 | |
| Full protocol without size cap | 52.6 | 0.50 | 176.3 |
| Software / source record | Recorded version | Stated license |
| PyTorch | 2.2.2 | BSD-3-Clause |
| PyTorch Geometric | 2.5.3 | MIT |
| torch-scatter | 2.1.2 | MIT |
| torch-sparse | 0.6.18 | MIT |
| torch-cluster | 1.6.3 | MIT |
| torch-spline-conv | 1.2.2 | MIT |
| Dataset | Method | Clean | FT-100 | KD |
| PROTEINS | PreGIP-adapted | |||
| InvGNN-WM, auxiliary | – | |||
| InvGNN-WM, task-logit | ||||
| NCI1 | PreGIP-adapted | |||
| InvGNN-WM, auxiliary | – | |||
| InvGNN-WM, task-logit |
| Dataset | Method | AUROC | CI |
| PROTEINS | PreGIP-adapted | ||
| InvGNN-WM, auxiliary | |||
| InvGNN-WM, task-logit | |||
| NCI1 | PreGIP-adapted | ||
| InvGNN-WM, auxiliary | |||
| InvGNN-WM, task-logit |
Robust Watermarking
Robust watermarking embeds or verifies ownership and provenance signals that survive editing, compression, model changes, and deliberate removal.
See all 207 papers