While Graph Neural Networks (GNNs) have proven highly effective across diverse applications, they remain notoriously vulnerable to adversarial attacks. However, previous research exploring these vulnerabilities has been largely limited to tiny "toy" graphs due to massive memory requirements. This paper bridges that gap, introducing memory-efficient attack algorithms and a scalable, robust defense mechanism that operate on massive graphs with up to 111 million nodes. The findings prove that real-world, large-scale GNNs are just as fragile—and defendable—as their smaller counterparts.
The Memory Bottleneck in Adversarial Attacks
To understand the adversarial robustness of a GNN, researchers typically use gradient-based attacks that optimize a dense $n \times n$ adjacency matrix to find the most damaging edge additions or deletions. Because this requires $O(n^2)$ memory, prior robustness studies were bottlenecked at graphs with roughly 20,000 nodes (e.g., PubMed), requiring about 20 GB of VRAM.
For real-world graphs with millions of nodes, this traditional approach is mathematically and computationally intractable, requiring petabytes or even exabytes of memory.
Overcoming Optimization Hurdles
To tackle the scalability and optimization bottlenecks of massive graphs, the authors propose novel approaches to both how the graph is perturbed and how the attack's success is measured.
Scalable Attacks via PR-BCD
Instead of optimizing the entire dense adjacency matrix, the authors introduce Projected Randomized Block Coordinate Descent (PR-BCD). In each training epoch, the attack only optimizes a small, randomly sampled block of potential edges. It keeps the most "promising" adversarial edges and resamples the rest. This reduces the space complexity from $O(n^2)$ to $O(b)$, where $b$ is the block size.
The success of PR-BCD demonstrates a crucial insight: an attacker does not need to evaluate every possible edge combination to find devastating adversarial perturbations. Optimizing random, sparse blocks of the adjacency matrix is sufficient to shatter a GNN's accuracy. By adapting this for scalable GNN architectures like PPRGo, the attack achieves constant time complexity relative to the number of nodes.
Why Cross-Entropy Fails for Global Attacks
The authors also identify that standard surrogate losses—like Cross-Entropy (CE) or the Carlini-Wagner (CW) loss—are fundamentally flawed when applied to global attacks (attacks aiming to degrade the overall accuracy of the entire graph).
Cross-Entropy naturally biases gradient updates toward nodes with very low confidence scores. In a global attack with a limited perturbation budget, CE wastes modifications on nodes the model already gets wrong, rather than pushing vulnerable, correctly classified nodes over the decision boundary. To fix this, the authors introduce Masked Cross Entropy (MCE) and tanh margin losses, which specifically target "fragile" nodes close to the decision boundary.
Scalable Defense: The Soft Median Aggregator
Large graphs are not inherently robust; perturbing just ~2% of the edges on a 2.5 million node graph can drop a standard GNN's accuracy below 60%. To defend massive graphs, the authors designed a robust message-passing aggregation function called Soft Median.
Soft Median acts as a continuous, differentiable relaxation of the median, effectively filtering out extreme values (such as those introduced by adversarial edges) in a node's neighborhood. Crucially, it scales linearly with neighborhood size, unlike previous robust aggregators (like Soft Medoid) that scale quadratically, making it uniquely suited for large-scale deployments.
Key Results and Impact
The authors evaluated their methods across a massive spectrum of graph sizes, from traditional benchmarks like Cora ML (2.8k nodes) to the massive OGB Papers 100M dataset (111.1M nodes).
- Massive Memory Reduction: Extrapolating traditional dense attacks (like PGD) to the Papers 100M dataset would require roughly 1 exabyte of memory. The proposed PR-BCD attack requires just 11 GB, allowing it to run on a standard consumer GPU.
- Doubled Attack Strength: Using the proposed MCE or tanh margin losses instead of standard Cross-Entropy doubles the drop in adversarial accuracy on common datasets.
- State-of-the-Art Defense: On the massive Papers 100M dataset, a local attack succeeds ~90% of the time against a standard scalable GNN (Vanilla PPRGo). When equipped with the Soft Median defense, the attack success rate plummets to just ~30%. On the Products dataset, Soft Median PPRGo loses only 5% accuracy under attack, compared to a 20% drop for a Vanilla GCN.
Limitations and Future Directions
While PR-BCD is highly effective, it relies on block coordinate descent and continuous relaxation, meaning it provides an upper bound on robustness (it is an approximate attack, not a guaranteed optimal one). Furthermore, these attacks require the victim model to be at least approximately differentiable.
On the defense side, while Soft Median has a provably optimal theoretical breakdown point, it does not currently provide certified adversarial robustness guarantees for specific inputs. Developing certified defenses at this scale, while managing the slight computational overhead introduced by robust aggregators, remains a vital area for future work.
Summary updated