Adversarial attacks on Graph Neural Networks (GNNs) pose a significant threat to their deployment in critical domains. By subtly adding or removing edges—a process known as "graph poisoning"—attackers can induce high-confidence misclassifications. While traditional defenses focus on robustifying the GNN models themselves, a novel approach treats the graph structure as a message requiring error correction. This paper proposes a model-agnostic, pre-processing defense using repetition coding and majority voting to protect graph integrity.
Methodology: Graph Structure as a Message
The proposed defense mechanism leverages classic information theory principles to "clean" a graph before it reaches a GNN. The process involves three main stages:
- Encoding (Sender): The sender flattens the graph's adjacency matrix into a vector $s$. To protect against attackers who might identify identical copies, the sender generates $K$ versions of this vector, each perturbed with a small amount of "sender-assigned noise" (random bit flips).
- Transmission and Attack: These $K$ copies are transmitted. An attacker may intercept and further perturb them by adding or removing edges.
- Decoding (Receiver): The receiver collects the $K$ perturbed copies and performs a majority vote for every potential edge. An edge is included in the final reconstructed graph only if it appears in more than half of the received copies.
The mathematical foundation of this approach relies on McDiarmid’s inequality to derive a theoretical bound for $K$, ensuring the reconstructed graph remains within a robustness threshold $\rho$ with high statistical confidence.
Key Insights: The Large Graph Paradox
A pivotal finding of this research is that larger graphs are inherently easier to protect using this method. As the number of nodes $N$ increases, the number of repetitions $K$ required to achieve a specific error tolerance actually decreases. This "Large Graph Paradox" occurs because the law of large numbers more effectively stabilizes the majority vote when errors are averaged over a larger set of elements.
Furthermore, the study highlights that graph topology significantly impacts defense efficacy. Random Erdős-Rényi (ER) graphs are more resilient to this method than scale-free Barabási-Albert (BA) graphs. In BA graphs, the high importance of "hub" nodes means that even a few edge flips can cause significant structural damage that simple majority voting may struggle to rectify without a high $K$.
Experimental Results
The effectiveness of the repetition code approach was validated using synthetic graph models under both random and targeted centrality-based attacks:
- Scalability: For large ER graphs ($N=1000$), near-perfect reconstruction (error $\approx 0.003$) was achieved with as few as $K=4$ repetitions.
- Small Graph Volatility: Smaller networks ($N=50$) proved more difficult to defend, often requiring $K > 14$ to stabilize.
- Robustness Targets: The method consistently maintained reconstruction errors below the 5% threshold ($\rho = 0.05$), a level typically manageable for robust GNNs.
- Conservative Bounds: The derived theoretical bounds for $K$ serve as a safe, albeit conservative, upper limit for defenders in practical scenarios.
Conclusion and Future Directions
Treating graph structures as error-prone messages provides a powerful, model-agnostic defense against adversarial poisoning. While effective, the current majority voting scheme is "topology-blind," treating all edges with equal weight. Future research could enhance this by incorporating network centrality measures into the voting process, potentially improving performance on scale-free networks. Additionally, optimizing the computational complexity for massive real-world datasets remains an open challenge.
Summary updated