When Witnesses Defend: A Witness Graph Topological Layer for Adversarial Graph Learning

Naheed Anjum Arafat, Debabrota Basu, Yulia Gel, Yuzhou Chen

TL;DR

Graph Neural Networks (GNNs) are notoriously fragile against adversarial edge perturbations. This paper introduces the Witness Graph Topological Layer (WGTL), which leverages computational topology and witness complexes to capture robust, higher-order geometric features of graphs. By focusing on essential "landmark" nodes, WGTL provides strong theoretical stability guarantees and significantly boosts adversarial robustness across multiple GNN architectures with minimal computational overhead.

What Problem Does This Paper Address?

Graph Neural Networks excel at learning from structured data, but they suffer from a major security flaw: they are highly vulnerable to adversarial attacks. An attacker can inject unnoticeable changes—adding or deleting a few edges—and cause a catastrophic drop in a GNN's classification accuracy.

Current defense strategies, such as graph purification or adversarial training, mostly focus on node-level, pairwise relationships. This narrow view makes them blind to higher-order structures (like cycles, cliques, or voids) and often leads to "over-purification"—accidentally deleting clean edges, which degrades performance. While tools from computational topology like Persistent Homology (PH) can capture these global shapes, they have historically been too computationally expensive to scale to large graphs. This paper bridges that gap by introducing an efficient, topology-aware defense layer.

Methods

The authors propose WGTL (Witness Graph Topological Layer), a novel framework that integrates multi-scale topological features directly into standard GNN pipelines.

  • Witness Complexes & Landmarks: To bypass the high computational cost of standard topological methods, WGTL selects a small subset of essential nodes called landmarks (chosen via degree centrality). The remaining nodes act as witnesses that govern how higher-order structures are formed. This landmark-witness skeleton drastically reduces the size of the simplicial complexes that need to be processed.
  • Local & Global Encodings: WGTL extracts local topological features (by building an $\epsilon$-net around landmarks and processing them through a Vision Transformer) and global features (via geodesic distances and a CNN) to form a comprehensive representation of the graph's "shape."
  • Attention-Driven Aggregation: An attention mechanism adaptively merges these local and global topological priors with standard GNN node embeddings, ensuring the network prioritizes task-relevant structural features.
  • Topological Regularizer ($L_{topo}$): The authors introduce a robust topological loss function that acts as a feature selector. It forces the model to focus only on the most persistent geometric structures while filtering out low-persistence topological noise caused by adversarial edge modifications.
Figure 1: Architecture of Witness Graph Topological Layer.

Datasets

The authors evaluated WGTL across six diverse benchmark datasets, covering homophilic, heterophilic, and large-scale graphs:

  • Citation Networks: Cora-ML, Citeseer, and Pubmed
  • Political Blog Network: Polblogs (which lacks node features, relying purely on topology)
  • Large-Scale Graph: OGBN-arXiv (from the Open Graph Benchmark)
  • Heterophilic Network: Snap-patents (a utility patent citation network where connected nodes often have different labels)
Dataset statistics

Key Insights and Ideas

  • Shape is Inherently Robust: Local edge tampering easily fools node-level message passing, but it rarely alters the macro-level "shape" or global topology of a graph.
  • The Witness Shortcut: You don't need to compute the topology of the entire graph to understand its structure. Selecting a smart subset of landmark nodes preserves the critical topological signal while avoiding combinatorial explosion.
  • Denoising via Persistence: Adversarial attacks usually introduce localized, "short-lived" topological features. By penalizing low-persistence features via the $L_{topo}$ regularizer, the model naturally learns to ignore adversarial noise.

Key Results

  • Boosting Existing Defenses: When integrated with state-of-the-art defenses like Pro-GNN, GNNGuard, and SimP-GCN, WGTL provided relative accuracy improvements of up to 4.95%, 15.67%, and 5.7% respectively under global mettack poisoning.
Comparison of performances under mettack
  • Backbone Agnostic: WGTL consistently enhanced the robustness of standard backbones (GCN, GAT, GraphSAGE, ChebNet) across varying perturbation rates.
Robustness of various backbone GNNs under mettack
  • Massive Speedups: Compared to standard Vietoris-Rips topological encodings, WGTL achieved up to a 2500x speedup on Cora-ML, reducing computation times from hours to mere seconds.
  • Resilience on Poisoned Graphs: Even when topological features were computed directly on already-poisoned graphs ($WGTL_P$), the layer still provided significant defense capabilities, proving it doesn't require a perfectly clean graph to be effective.

Limitations and Future Work

  • Scalability Bottleneck: Although WGTL is orders of magnitude faster than standard topological methods, computing global features still relies on all-pairs shortest path (BFS) traversals. On massive graphs like OGBN-arXiv, this step takes around 96 seconds, which could be a bottleneck for even larger web-scale datasets.
  • Static Graphs Only: The current formulation assumes a static graph structure and does not natively support time-evolving graphs or hypergraphs.
  • Future Directions: The authors plan to extend WGTL to dynamic graph learning and explore potential "skeleton-level" attacks that specifically target landmark nodes.

Summary updated

BibTeX
@inproceedings{arafat2025when,
  author = {Naheed Anjum Arafat and Debabrota Basu and Yulia Gel and Yuzhou Chen},
  title = {{When Witnesses Defend: A Witness Graph Topological Layer for Adversarial Graph Learning}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2025},
  doi = {10.1609/aaai.v39i15.33691},
}
Figure