NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Kernel-Complexity Edge Sanitization for Training-Free Defense against Structural Graph Attacks

Yaning Jia, Shenyang Deng, Yaoqing Yang, Chiyu Ma, Wenxuan Xu, Soroush VosoughiarXiv 2026 · DOI

TL;DR

Graph Neural Networks (GNNs) are notoriously sensitive to adversarial edge manipulations, but existing defenses are often computationally heavy or heuristic-driven. This paper introduces Kernel-Complexity Edge Sanitization (KCES), a training-free, model-agnostic preprocessing method that prunes malicious edges by measuring their impact on a theoretically grounded Graph Kernel Complexity metric. It achieves state-of-the-art robustness while scaling effortlessly to massive graphs with millions of edges.

What Problem Does This Paper Address?

GNNs rely heavily on message-passing mechanisms to aggregate information from neighboring nodes. While highly effective, this makes them incredibly vulnerable to structural topology attacks—where an adversary adds or removes a few strategic edges to corrupt the information flow.

Current defense strategies generally fall into two camps, both with major drawbacks:

  1. Heuristic-based purification: Methods that remove edges based on local features (like feature similarity) but lack a rigorous connection to the model's actual generalization performance.
  2. Optimization-based defenses: Methods like adversarial training or joint graph-learning that require expensive retraining loops. These introduce massive computational overhead, making them completely impractical for large-scale, real-world production graphs.

The authors bridge this gap by proposing a defense that is mathematically principled, requires zero model retraining, and runs fast enough to handle massive datasets.

Methods

The authors introduce Kernel-Complexity Edge Sanitization (KCES), which acts as a lightweight, plug-and-play preprocessing step before training any standard GNN.

Figure 1: Defense Framework against Structural Perturba- tions with KCES. Adversarial attacks tend to increase the KC scores of perturbed edges; KCES enhances robustness by pruning edges with high KC scores.

The pipeline consists of three main steps:

  1. Pseudo-Label Generation: To keep the framework entirely unsupervised and training-free, KCES applies K-Means clustering to the graph's aggregated node features to generate pseudo-labels ($\hat{y}$).
  2. Edge KC Score Estimation: The core innovation relies on Graph Kernel Complexity (GKC), a metric derived from the graph's kernel Gram matrix that mathematically upper-bounds GNN test error. For every edge, KCES computes a Kernel Complexity (KC) score, defined as the absolute change in GKC when that specific edge is removed.
  3. Edge Sanitization: Because adversarial structural attacks typically introduce high-influence edges that disrupt local smoothness, they drastically inflate the graph's kernel complexity. KCES identifies these anomalous spikes, sorts the edges by their KC scores, and prunes the top highest-scoring edges.

Datasets

The framework was rigorously evaluated across a wide range of graph scales:

  • Small-scale: Cora, Citeseer, Polblogs
  • Medium-scale: Pubmed
  • Large-scale: Flickr
  • Massive-scale: Ogbn-Arxiv (a benchmark containing over 1 million edges)

The models were tested against standard structural attacks, including Metattack, Nettack, DICE, MINMAX, and the highly scalable PRBCD gradient attack.

Key Insights and Ideas

  • Attacks leave a mathematical footprint: Adversarial structural attacks systematically distort the graph's underlying geometry. This shifts the distribution of KC scores, creating a distinct, heavy tail of high-KC edges. Pruning these edges effectively shifts the graph's geometry back to its clean state.
  • Robustness via Generalization Theory: Instead of guessing which edges are bad using local heuristics, KCES uses a global generalization bound. It targets edges that disproportionately force the GNN to overfit or increase its structural complexity.
  • Structural Regularization: On certain clean datasets (like Flickr), applying KCES actually boosted accuracy beyond the original clean graph baseline. This reveals that real-world graphs often contain inherent structural noise or redundant edges; by pruning them, KCES doubles as a structural regularizer.
  • Insensitivity to Cluster Granularity: Surprisingly, the defense is highly robust to the choice of $K$ in K-Means. Whether clustering into 2 or 30 groups, the relative ranking of malicious edges remains stable because adversarial edges inherently bridge distinct structural communities.
Figure 2: Mechanism of KC scores under structural attacks. (a) KC-score distributions on clean, Metattack-perturbed, and KCES-pruned graphs. (b) Test accuracy under different prun- ing strategies on Metattack-perturbed graphs.

Key Results

  • State-of-the-Art Defense: KCES consistently outperformed robust baselines. For example, on the Pubmed dataset under a Metattack perturbation, a vanilla GCN drops to 46.08% accuracy, and the robust ProGNN reaches 72.08%. KCES achieves a striking 86.45% accuracy—effectively neutralizing the attack.
  • Massive Speedups: On Pubmed, heavy optimization-based defenses like ProGNN required 7,340.23 seconds to run. KCES completed its preprocessing and training in just 6.40 seconds, representing orders-of-magnitude faster execution.
  • Unmatched Scalability: On the massive Ogbn-Arxiv dataset, complex defenses like ProGNN completely failed due to Out-Of-Memory (OOM) errors. KCES scaled seamlessly, delivering a state-of-the-art robust accuracy of 58.62% under PRBCD attack.
  • Plug-and-Play Compatibility: KCES can be stacked directly in front of other robust architectures (like RGCN or GNNGuard), consistently boosting or maintaining their performance across clean and attacked graphs alike.
Figure 3: Plug-and-play compatibility of KCES on Cora. “(K)” denotes applying KCES before the corresponding defense. KCES generally improves robustness under structural attacks while preserving clean accuracy.

Limitations and Future Work

  • Structural Focus Only: KCES is strictly designed to counter structural perturbations (edge additions/deletions). It does not directly defend against node- or feature-level adversarial attacks.
  • Heterophily Challenges: Because the method relies on pseudo-labels derived from local feature aggregation, its performance may be less pronounced on heterophilous graphs (graphs where connected nodes naturally belong to different classes).
  • Future Directions: The authors suggest that future iterations could transition from hard edge-pruning to soft edge-reweighting schemes, allowing the framework to better preserve useful information under highly complex attack patterns.

Summary updated

BibTeX
@misc{jia2026kernel,
  author = {Yaning Jia and Shenyang Deng and Yaoqing Yang and Chiyu Ma and Wenxuan Xu and Soroush Vosoughi},
  title = {{Kernel-Complexity Edge Sanitization for Training-Free Defense against Structural Graph Attacks}},
  year = {2026},
  eprint = {2609.09698},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2609.09698},
}
Figure