Robust Graph Learning Against Adversarial Evasion Attacks via Prior-Free Diffusion-Based Structure Purification

Jiayi Luo, Qingyun Sun, Haonan Yuan, Xingcheng Fu, Jianxin Li

Abstract

Graph Neural Networks (GNNs) are highly effective for modeling relational data but remain notoriously vulnerable to adversarial evasion attacks. Existing defense mechanisms often rely on rigid, dataset-specific priors—such as homophily or low-rank assumptions—which fail when the underlying data distribution deviates from these heuristics. This paper introduces DiffSP, a novel framework that utilizes graph diffusion models to purify adversarial perturbations without requiring prior knowledge of the attack or dataset. By integrating Local Intrinsic Dimensionality (LID) for non-isotropic noise injection and Graph Transfer Entropy for guided denoising, DiffSP restores the original graph structure and significantly enhances GNN robustness across diverse tasks.

Introduction

Adversarial evasion attacks pose a significant threat to the deployment of Graph Neural Networks. By making subtle, often unnoticeable modifications to a graph's structure—such as adding or deleting specific edges during the testing phase—adversaries can cause a GNN's predictive performance to collapse.

Traditional defense strategies typically attempt to "clean" the graph by enforcing heuristic assumptions. For instance, many models assume homophily (the tendency of connected nodes to share labels) or a low-rank matrix structure. However, these assumptions are not universal; when a graph does not conform to these priors, the defense becomes ineffective. DiffSP addresses this limitation by asking a fundamental question: Can we build a universal, prior-free defense that learns the intrinsic distribution of clean graphs and purifies adversarial perturbations automatically?

The DiffSP Framework

DiffSP repurposes the generative power of Graph Diffusion Models for the purpose of adversarial purification. While diffusion models are typically used to generate new data by reversing a noise-injection process, DiffSP uses this pipeline to drown out adversarial "signals" and reconstruct the underlying clean graph. The framework introduces two primary innovations to adapt diffusion for robust defense.

1. LID-Driven Non-Isotropic Diffusion

Standard diffusion models apply noise uniformly (isotropically) across the entire data structure. In a graph defense context, this is counterproductive as it destroys legitimate, clean edges along with adversarial ones. DiffSP utilizes Local Intrinsic Dimensionality (LID) to estimate the "adversarial degree" of specific nodes, identifying those that deviate from the natural data manifold.

Instead of a complex custom noise model, the authors provide a mathematical proof (Proposition 1) showing that non-isotropic noise can be simulated by adjusting the diffusion time per edge. By stopping the "noise clock" early for edges connected to clean nodes and allowing it to run longer for suspected adversarial edges, DiffSP selectively targets perturbations while preserving the graph's essential structure.

2. Graph Transfer Entropy Guided Denoising

Diffusion models are inherently stochastic, designed to produce diverse outputs. For purification, however, the goal is high-fidelity reconstruction of the original target graph rather than creative generation. To constrain this randomness, DiffSP introduces a Graph Transfer Entropy metric. By maximizing the transfer entropy between successive denoising steps, the model ensures that the purified graph remains semantically and structurally aligned with the original input, preventing the loss of critical information during the cleaning process.

Experimental Evaluation

The authors evaluated DiffSP across a comprehensive suite of datasets and attack scenarios:

  • Graph Classification: MUTAG, IMDB-BINARY, IMDB-MULTI, REDDIT-BINARY, and COLLAB.
  • Node Classification: Cora, CiteSeer, PolBlogs, and Photo.
  • Attack Vectors: The model was tested against 9 distinct evasion attacks, including targeted (PR-BCD, Nettack, GR-BCD), non-targeted (MinMax, DICE, Random), and graph-level attacks (GradArgmax, CAMA-Subgraph).

Key Insights and Results

DiffSP demonstrates that prior-free robustness is not only possible but superior to traditional heuristic-based methods. Key findings include:

  • State-of-the-Art Performance: DiffSP consistently outperformed 12 graph classification baselines and 11 node classification baselines. On the IMDB-BINARY dataset, it achieved a 4.80% average accuracy improvement over the next best baseline.
  • Stability and Generalization: Unlike many baselines that excel against specific attacks but fail under others, DiffSP maintained stable performance across all 9 attack types. Furthermore, the model showed strong cross-dataset generalization; a model trained on IMDB-BINARY successfully purified graphs from IMDB-MULTI with minimal performance loss.
  • Ablation Validation: Experiments confirmed that both the LID-driven diffusion and the entropy-guided denoising are essential. Removing either component led to a significant decrease in purification efficacy.

Conclusion and Future Work

DiffSP represents a significant shift in graph defense by moving away from rigid priors toward a generative, distribution-learning approach. By treating adversarial defense as a targeted denoising problem, it provides a robust and adaptable framework for securing GNNs.

While highly effective against structural attacks, the current framework does not yet address perturbations to node features. Future research will focus on extending DiffSP to handle multi-modal attacks and optimizing the $O(N^2)$ computational complexity to make the framework more scalable for massive, industry-scale relational networks. Additionally, the authors intend to explore the utility of their graph entropy estimation tool for broader applications in graph property analysis.

Summary updated

BibTeX
@inproceedings{luo2025robust,
  author = {Jiayi Luo and Qingyun Sun and Haonan Yuan and Xingcheng Fu and Jianxin Li},
  title = {{Robust Graph Learning Against Adversarial Evasion Attacks via Prior-Free Diffusion-Based Structure Purification}},
  booktitle = {The Web Conference},
  year = {2025},
}
Figure