Abstract
Machine learning has been successfully applied to complex network analysis in various areas, and graph neural networks (GNNs) based methods outperform others. Recently, adversarial attack on networks has attracted special attention since carefully crafted adversarial networks with slight perturbations on clean network may invalid lots of network applications, such as node classification, link prediction, and community detection etc. Such attacks are easily constructed with serious security threat to various analyze methods, including traditional methods and deep models. To the best of our knowledge, it is the first time that defense method against network adversarial attack is discussed. In this paper, we are interested in the possibility of defense against adversarial attack on network, and propose defense strategies for GNNs against attacks. First, we propose novel adversarial training strategies to improve GNNs' defensibility against attacks. Then, we analytically investigate the robustness properties for GNNs granted by the use of smooth defense, and propose two special smooth defense strategies: smoothing distillation and smoothing cross-entropy loss function. Both of them are capable of smoothing gradient of GNNs, and consequently reduce the amplitude of adversarial gradients, which benefits gradient masking from attackers. The comprehensive experiments show that our proposed strategies have great defensibility against different adversarial attacks on four real-world networks in different network analyze tasks.
What Problem Does This Paper Address?
Graph Neural Networks (GNNs) have become the gold standard for analyzing networked data, from social media circles to biological protein interactions. However, they possess a "glass jaw": they are incredibly sensitive to adversarial attacks. By adding or removing just a few strategic edges (perturbations), an attacker can completely flip a GNN’s prediction for a target node.
While many researchers have focused on how to attack these networks, very little work has been done on how to defend them. Existing defenses, like randomly dropping edges during training, are often too "cheap" and fail against sophisticated attackers who use the model's own gradients to find the most damaging perturbations. This paper seeks to fill that gap by providing robust, principled defense mechanisms.
Methods
The authors introduce two main categories of defense:
- Adversarial Training (AT):
- Global-AT: The model is trained on a mixture of clean data and adversarial examples generated for every node in the network.
- Target-AT: Recognizing that defending an entire graph is computationally expensive, this method focuses defense efforts specifically on the nodes the user cares most about (the labeled/target nodes).
- Smooth Defense:
- Smoothing Distillation (SD): Inspired by model distillation, this involves training a "teacher" model with a high "temperature" in its softmax layer to produce "soft" labels. A "student" model is then trained on these soft labels. This process smooths the model’s output surface, making it harder for attackers to find useful gradients.
- Smoothing Cross-Entropy Loss (SCEL): This modifies the standard loss function to prevent the model from becoming "overconfident" in its predictions. By encouraging a smoother probability distribution across labels, it reduces the sensitivity of the model to small structural changes.
An Ensemble approach combining these strategies is also proposed for maximum robustness.
Datasets and Evaluation
The researchers evaluated their methods on five well-known real-world datasets across two different tasks:
- Node Classification: Polblogs (political blogs), Cora, and Citeseer (citation networks).
- Community Detection: PloBook (US politics books) and Dolphins (social network of dolphin associations).
Key Insights and Ideas
- Gradient Masking is Key: Most powerful attacks (like FGA or NETTACK) rely on calculating the gradient of the loss function to decide which edge to flip. By "smoothing" the model via Distillation or SCEL, the defender effectively "masks" these gradients, leaving the attacker "blind" and unable to find effective perturbations.
- The Efficiency of Targeted Defense: One of the "aha" moments is that you don't need to harden the entire graph to protect specific results. Target-AT proved to be remarkably effective and more efficient than global approaches.
- Randomness is Not Enough: The paper demonstrates that the previously proposed "random edge dropping" defense is insufficient. Against a calculated adversarial attack, a calculated defense is required.
Key Results
The authors used two primary metrics: Average Defense Rate (ADR)—the percentage of attacks successfully thwarted—and Average Confidence Difference (ACD).
- Superiority of Proposed Methods: In almost every test case, the proposed strategies (especially Target-AT and Ensemble) outperformed standard adversarial training. On the Cora dataset under a Fast Gradient Attack (FGA), the standard defense had a 0% ADR, while the Target-AT strategy achieved an ADR of 76.26%.
- Stability in Embeddings: Visualization shows that while an attack normally "shoves" a node's representation into the wrong cluster, the proposed defense strategies keep the node's embedding stable and correctly categorized even under attack.
Limitations and Future Work
- Computational Overhead: Adversarial training requires generating attacks during the training loop, which is significantly more time-consuming than standard training.
- The Accuracy Trade-off: Some smoothing techniques (like SD) can lead to a slight dip in accuracy on "clean" (non-attacked) data. Finding the perfect balance between robustness and raw performance remains an open challenge.
- Future Directions: The authors suggest exploring more efficient ways to generate adversarial examples for training and extending these defenses to even more complex graph types, such as heterogeneous or dynamic networks.
Summary updated