Node Copying for Protection Against Graph Neural Network Topology Attacks

Florence Regol, Soumyasundar Pal, Mark Coates

TL;DR

Graph Neural Networks (GNNs) are highly vulnerable to adversarial attacks that alter graph topology (adding or removing edges). This paper introduces a lightweight, post-training "node copying" technique that recovers the classification accuracy of attacked nodes by temporarily moving their features to similar, uncorrupted neighborhoods in the graph and averaging the resulting predictions.

What Problem Does This Paper Address?

Graph-based machine learning models rely heavily on the assumption that connected nodes are similar. Adversaries can exploit this by launching "topology attacks"—maliciously adding edges between dissimilar nodes or deleting edges between similar ones—to force a Graph Convolutional Network (GCN) to misclassify specific target nodes.

While recent research has developed methods to detect which nodes have been attacked, there is a gap in how to correct the downstream predictions for those nodes once an attack is flagged. If we know a node's local neighborhood has been poisoned, how can we accurately classify it without throwing away the graph structure entirely and falling back on a standard, graph-agnostic neural network?

Methods

The authors propose a Node Copying procedure applied during the inference stage, after the base GCN has already been trained on the corrupted graph.

  1. Generate Embeddings: First, they train a Graph Variational Auto-Encoder (GVAE) on the corrupted graph to generate low-dimensional embeddings for all nodes. This summarizes both node features and graph connectivity.
  2. Find Similar Nodes: For a known attacked node $v$, the algorithm uses the GVAE embeddings to find a set of $p$ similar nodes (its nearest neighbors in the embedding space).
  3. Node Copying: The features of the attacked node $v$ are temporarily "copied" into the positions of these $p$ similar nodes in the graph.
  4. Re-evaluate and Average: The existing GCN model predicts the class of $v$'s features at these $p$ new locations. The final corrected prediction for $v$ is the average of the softmax outputs from these $p$ locations.

Because a standard GCN only looks at an $L$-hop neighborhood to make a prediction, this copying and re-evaluating process is highly localized and computationally cheap, scaling well to large graphs.

Datasets

The authors evaluate their method on three standard citation network benchmarks:

  • Cora (2,708 nodes, 7 classes)
  • Citeseer (3,327 nodes, 6 classes)
  • Pubmed (19,717 nodes, 3 classes)

To simulate the adversarial environment, they use the DICE (Delete Internally Connect Externally) attack, which randomly deletes edges between nodes of the same class and inserts edges between nodes of different classes.

Key Insights and Ideas

  • Neighborhoods matter more than original position: If an attacker ruins the local topology around a node, the node's intrinsic features still hold value. Transplanting those features to a healthy, similar neighborhood allows the GCN to leverage uncorrupted graph structure to make a correct classification.
  • Softmax averaging beats majority voting: Averaging the continuous softmax probabilities across the $p$ copied locations yields better recovery than taking a hard majority vote. If a node is copied into a "wrong" neighborhood, the model struggles to classify it, resulting in low-confidence (flatter) softmax scores. In a "good" neighborhood, the model outputs high-confidence scores. Averaging naturally weights the decision toward the high-confidence, correct neighborhoods.
  • Copying is essential: An ablation study revealed that simply averaging the predictions of the $p$ similar nodes—without explicitly copying the attacked node's features into those spots—performs poorly. The specific combination of the target node's features interacting with a clean neighborhood is what drives the recovery.

Key Results

  • Accuracy Recovery: The node copying procedure improved the classification accuracy of attacked nodes by 5% to 11.6% across the datasets compared to the baseline GCN on the corrupted graph.
  • Concrete Numbers: On the Cora dataset (with 10 labels per class and a 50% attack severity), accuracy on the attacked nodes jumped from 51.2% to 56.2%. On Pubmed, it improved from 51.7% to 63.3%.
  • Graph vs. No Graph: The copying method consistently outperformed a graph-agnostic Neural Network baseline, proving that even when a graph is under attack, salvaging the topological information is better than ignoring it entirely.

Limitations and Future Work

  • Oracle Assumption: The current methodology assumes perfect knowledge of which nodes have been attacked. In a real-world scenario, this pipeline relies entirely on the accuracy of a preceding attack-detection algorithm.
  • Future Directions: The authors suggest combining this recovery method directly with an attack detection technique to create an end-to-end robust pipeline. Additionally, they plan to investigate how the recovery performance depends on the specific choice of the embedding technique (e.g., swapping GVAE for something else) and the downstream graph-based classifier.

Summary updated

BibTeX
@inproceedings{regol2019node,
  author = {Florence Regol and Soumyasundar Pal and Mark Coates},
  title = {{Node Copying for Protection Against Graph Neural Network Topology Attacks}},
  booktitle = {CAMSAP},
  year = {2019},
  doi = {10.1109/camsap45676.2019.9022508},
}
Figure