Bandage: bidirectional and nested defense algorithm for graph adversarial attack
Graph neural networks (GNNs) have achieved remarkable success in various tasks. However, recent studies have demonstrated the vulnerability of GNNs to attacks, particularly well-designed adversarial perturbations. Existing studies focus only on addressing edge perturbations to reconstruct graphs, while overlooking the defense of the kernel of GNNs (i.e., message passing). When the attack budget decreases, the robustness of their models usually declines, a phenomenon known as over-defense. We propose a novel defense algorithm called Bandage to solve these two problems, which operates independently of specific GNN architectures. Specifically, we propose a kernel defense mechanism consisting of two purifiers designed to safeguard both the input and output of the message passing. The first purifier utilizes the non-extreme neighbor set to purify the graph at the feature and topology levels, while the second purifier resolves the inconsistency between the graph structure and node embeddings to purify the graph at the embedding level. To implement the defense of message passing while mitigating over-defense, we design a bidirectional and nested structure that captures the intrinsic relationship between inputs and outputs in two opposite directions. Extensive experiments demonstrate that Bandage significantly enhances the robustness of GNNs. Compared with existing state-of-the-art defense methods, Bandage improves performance by an average of 4.2% and 1.7% on two victim models.