Adversarial Training for Graph Neural Networks: Pitfalls, Solutions, and
  New Directions
Despite its success in the image domain, adversarial training did not (yet)
stand out as an effective defense for Graph Neural Networks (GNNs) against
graph structure perturbations. In the pursuit of fixing adversarial training
(1) we show and overcome fundamental theoretical as well as practical
limitations of the adopted graph learning setting in prior work; (2) we reveal
that more flexible GNNs based on learnable graph diffusion are able to adjust
to adversarial perturbations, while the learned message passing scheme is
naturally interpretable; (3) we introduce the first attack for structure
perturbations that, while targeting multiple nodes at once, is capable of
handling global (graph-level) as well as local (node-level) constraints.
Including these contributions, we demonstrate that adversarial training is a
state-of-the-art defense against adversarial structure perturbations.
Lukas Gosch, Simon Geisler, Daniel Sturm, Bertrand Charpentier, Daniel Zügner, Stephan Günnemann
# Adversarial Training for Graph Neural Networks

###### Abstract

Despite its success in the image domain, adversarial training does not (yet) stand out as an effective defense for Graph Neural Networks (GNNs) against graph structure perturbations. In the pursuit of fixing adversarial training _(1)_ we show and overcome fundamental theoretical as well as practical limitations of the adopted graph learning setting in prior work; _(2)_ we reveal that more flexible GNNs based on learnable graph diffusion are able to adjust to adversarial perturbations, while the learned message passing scheme is naturally interpretable; _(3)_ we introduce the first attack for structure perturbations that, while targeting multiple nodes at once, is capable of handling global (graph-level) as well as local (node-level) constraints. Including these contributions, we demonstrate that adversarial training is a state-of-the-art defense against adversarial structure perturbations.1

Footnote 1: Project page: [https://www.cs.cit.tum.de/daml/adversarial-training/](https://www.cs.cit.tum.de/daml/adversarial-training/)

## 1 Introduction

Adversarial training has weathered the test of time and stands out as one of the few effective measures against adversarial perturbations. While this is particularly true for numerical input data like images [1], it is not yet established as an effective method to defend predictions of Graph Neural Networks (GNNs) against graph structure perturbations.

Although previous work reported some robustness gains by using adversarial training in GNNs [2; 3], closer inspection highlights two main shortcomings: (i) the learning setting leads to a biased evaluation and (ii) the studied architectures seem to struggle to learn robust representations.

_(i) Learning setting._ In the previously studied transductive learning settings (see Table 2), clean validation and test nodes are known during training. Thus, _perfect robustness_ can be achieved by memorizing the training graph. This can lead to a false impression of robustness. Indeed, we find that the gains of the adversarial training approach from Xu et al. [2] largely stem from exploiting this flaw. Motivated by this finding, we revisit adversarial training for node classification under structure perturbations in a fully inductive setting (i.e., validation/test nodes are excluded during training). Thus, our results do not suffer from the same evaluation pitfall and pertain to a more challenging and realistic scenario.

_(ii) GNN architectures._ The studied GNNs like GCN [4] or APPNP [5] all seem to share the same fate as they have a limited ability to adjust their message passing to counteract adversarial perturbations.

Figure 1: Robust diffusion (GPRGNN) vs. GCN on (inductive) Cora-ML. We report adversarial training and standard training.
Instead, we propose to use flexible message-passing schemes based on _learnable diffusion_ that can approximate any spectral graph filter. An adversarially trained graph diffusion significantly improves robustness compared to previous work, while yielding an interpretable message-passing scheme.

_More realistic perturbations._ Inspecting robust diffusion indicates that previously studied perturbation sets [2; 3] are overly permissive and unrealistic. Prior work only constrained the _global_ (graph-level) number of inserted and removed edges, despite studying node classification, where predictions are inherently _local_ (node-level). As a result, commonly, an adversary has been allowed to add or remove a number of edges that exceeds the average node degree by 100 times or more, providing ample leeway for a complete change of many node neighborhoods through rewiring. E.g., on Cora-ML 5% edge-changes correspond to 798 changes, but the average degree is 5.68. To prevent such degenerate perturbations [6], we propose Locally constrained Randomized Block Coordinate Descent (LR-BCD), the first attack that, while targeting multiple nodes at once, is able to constrain _both_ local perturbations per node and global ones. Even though local constraints are well-studied for attacks targeting a single node [7], surprisingly, there was no attack incorporating these for jointly attacking a set of nodes at once. Thus, LR-BCD fills an important gap in the literature, while being efficient and effective.

Addressing the aforementioned points, we substantially boost empirical and certifiable adversarial robustness up to the level of state-of-the-art defenses for GNNs. For example, in Figure 1, we show a 4-fold increased robustness over standard training (measured in decline in accuracy after an attack).

**Contributions. (1)** We show theoretically and empirically that in the transductive learning setting, previously studied for adversarial training, one can trivially achieve perfect robustness. We show that the full inductive setting does not have this limitation and, consequently, revisit adversarial training (see Section 2). **(2)** By leveraging more flexible GNN architectures based on learnable diffusion, we significantly improve upon the robustness under adversarial training (see Section 3). **(3)** We implement more realistic adversaries for structure perturbations with a novel attack that constrains perturbations globally and locally for each node in the graph (see Section 4).

## 2 Learning Settings: Transductive vs. Inductive Adversarial Training

We first give background on adversarial training and self-training. Then, in Section 2.1, we discuss the transductive learning setting and its shortcomings in contrast to inductive learning in the context of robust generalization. Following previous work, we focus on node classification and assume we are given an undirected training graph \(\mathcal{G}=(\mathbf{X},\mathbf{A})\) consisting of \(n\) nodes of which \(m\) are labeled. By \(\mathbf{A}\in\{0,1\}^{n\times n}\) we denote the adjacency matrix, by \(\mathbf{X}\in\mathbb{R}^{n\times d}\) the feature matrix, and by \(y_{i}\in\{1,...,C\}\) the label of a node \(i\), summarized for all nodes in the vector \(\mathbf{y}\).

**Adversarial Training.** Adversarial training optimizes the parameters of a GNN \(f_{\theta}\) on an adversarially perturbed input graph with the goal to increase robustness against test-time (evasion) attacks (i.e., attacks against the test graph after training). During training the following problem is solved:

\[\operatorname*{arg\,min}_{\theta}\max_{\tilde{\mathcal{G}}\in\mathcal{B}( \mathcal{G})}\sum_{i=1}^{m}\ell(f_{\theta}(\tilde{\mathcal{G}})_{i},y_{i}) \tag{1}\]

where \(f_{\theta}(\tilde{\mathcal{G}})_{i}\) is the GNN-prediction for node \(i\) based on the perturbed graph \(\tilde{\mathcal{G}}\), \(\ell\) is a chosen loss function, and \(\mathcal{B}(\mathcal{G})\) is the set of allowed perturbed graphs given the clean graph \(\mathcal{G}\). As in previous work, we assume that an adversary maliciously changes the graph structure by inserting or deleting edges. Then, \(\mathcal{B}(\mathcal{G})\) can be defined by restricting the total number of malicious edge changes in the graph to \(\Delta\in\mathbb{N}_{\geq 0}\) (called a global constraint) and/or restricting the total number of edge changes in each neighborhood of a node \(i\) to \(\Delta_{i}\in\mathbb{N}_{\geq 0}\) (called local constraints, see Section 4). Solving Equation (1) is difficult in practice. Thus, we approximate it with alternating first-order optimization, i.e., we approximately solve Equation (1) by training \(f_{\theta}\) not on the clean graph \(\mathcal{G}\), but on a perturbed one \(\tilde{\mathcal{G}}\) that is newly crafted in each iteration through attacking the current model (see Algorithm B.2).

**Self-training** is an established semi-supervised learning strategy [8] to make optimal use of unlabeled nodes via pseudo-labeling and is applied by previous works on adversarial training for GNNs [2; 3]. For this, first a model \(f_{\theta^{\prime}}\) is trained regularly using the \(m\) labeled nodes, minimizing \(\sum_{i=1}^{m}\ell(f_{\theta}(\mathcal{G})_{i},y_{i})\). Thereafter, a new (final) model \(f_{\theta}\) is randomly initialized and trained on all nodes, using the known labels for the training nodes and pseudo-labels generated by \(f_{\theta^{\prime}}\) for the
unlabeled nodes (see Algorithm B.3). Thus, if including self-training, Equation (1) changes to

\[\operatorname*{arg\,min}_{\theta}\max_{\tilde{\mathcal{G}}\in\mathcal{B}( \mathcal{G})}\left\{\sum_{i=1}^{m}\ell(f_{\theta}(\tilde{\mathcal{G}})_{i},y_{ i})+\sum_{i=m+1}^{n}\ell(f_{\theta}(\tilde{\mathcal{G}})_{i},f_{\theta^{\prime}}( \mathcal{G})_{i})\right\} \tag{2}\]

### Transductive Setting

Transductive node classification is a common and well-studied graph learning problem [9; 4]. It aims to complete the node labeling of the given and partially labeled graph \(\mathcal{G}\). More formally, the goal at test time is to accurately label the already known \(n-m\) unlabeled nodes, i.e., to achieve minimal

\[\mathcal{L}_{0/1}(f_{\theta})=\sum_{i=m+1}^{n}\ell_{0/1}(f_{\theta}(\mathcal{ G})_{i},y_{i}) \tag{3}\]

This is in contrast to an inductive setting, where at test time a new (extended) graph \(\mathcal{G}^{\prime}\) (with labels \(\mathbf{y}^{\prime}\)) is sampled conditioned on the training graph \(\mathcal{G}\). Then, the goal is to optimally classify the newly sampled nodes \(\mathcal{I}\)_in expectation_ over possible \((\mathcal{G}^{\prime},\mathbf{y}^{\prime})\)-pairs, i.e., to minimize \(\mathbb{E}\big{[}\sum_{i\in\mathcal{I}}\ell_{0/1}(f_{\theta}(\mathcal{G}^{ \prime})_{i},y^{\prime}_{i})\big{]}\). That is, in transductive learning the \(n-m\) unlabeled nodes known during training are considered test nodes, but in an inductive setting, new unseen test nodes are sampled. For additional details on the inductive setting, see Appendix A.

Many common graph benchmark datasets such as Cora, CiteSeer, or Pubmed [10; 11], are designed for transductive learning. Naturally, this setting has been adopted as a starting point for many works on robust graph learning [7; 2; 12], including all of the adversarial training literature (see Section 6). Here, the latter is concerned with defending against test-time (evasion) attacks in transductive node classification, i.e., it is assumed that after training an adversary can select a maliciously changed graph \(\tilde{\mathcal{G}}\) out of the set of permissible perturbations \(\mathcal{B}(\mathcal{G})\), with the goal to maximize misclassification:

\[\mathcal{L}_{adv}(f_{\theta})=\max_{\tilde{\mathcal{G}}\in\mathcal{B}( \mathcal{G})}\sum_{i=m+1}^{n}\ell_{0/1}(f_{\theta}(\tilde{\mathcal{G}})_{i},y _{i}) \tag{4}\]

Since the adversary changes the graph at test time (i.e., the changes are not known during training), this, strictly speaking, corresponds to an inductive setting [9], where the only change considered is adversarial. Now, the goal of _adversarial training_ is to find parameters \(\theta\) minimizing \(\mathcal{L}_{adv}(f_{\theta})\), corresponding to the optimal (robust) classifier under attack [1].

#### 2.1.1 Theoretical Limitations

Defending against test-time (evasion) attacks in a transductive setting comes with conceptual limitations. In the case of graph learning, the test nodes are already known at training time and the only change is adversarial. Hence, we can trivially achieve _perfect robustness_ without trading off accuracy by _memorizing_ the (clean) training graph and ignoring every change.

This can be shown by choosing a slightly modified learning algorithm \(\tilde{f}_{\theta}\) corresponding to a GNN \(f_{\theta}\) with an added preprocessing routine (memory) that, during inference, replaces the perturbed graph \(\tilde{\mathcal{G}}=(\mathbf{\tilde{X}},\mathbf{\tilde{A}})\in\mathcal{B}( \mathcal{G})\) with the clean graph \(\mathcal{G}=(\mathbf{X},\mathbf{A})\) known from training, i.e., \(\tilde{f}_{\theta}(\tilde{\mathcal{G}})=f_{\theta}(\mathcal{G})\). This results in the same (clean) misclassification rate \(\mathcal{L}_{0/1}(f_{\theta})=\mathcal{L}_{0/1}(\tilde{f}_{\theta})\) because \(\tilde{f}_{\theta}\) and \(f_{\theta}\) have the same predictions on the clean graph, but also perfect robustness, i.e., \(\mathcal{L}_{0/1}(\tilde{f}_{\theta})=\mathcal{L}_{adv}(\tilde{f}_{\theta})\), as the predictions are not influenced by the adversary. Thus, we can state:

**Proposition 1**.: _For transductive node classification, we obtain a perfectly robust version \(\tilde{f}_{\theta}\) of any GNN \(f_{\theta}\), if \(\tilde{f}_{\theta}\) memorizes and uses the (clean) training graph \(\mathcal{G}\) for inference instead of the (potentially perturbed) graph \(\tilde{\mathcal{G}}\). Then, \(\mathcal{L}_{0/1}(f_{\theta})=\mathcal{L}_{0/1}(\tilde{f}_{\theta})=\mathcal{ L}_{adv}(\tilde{f}_{\theta})\)._

However, what is probably most interesting about this modified learning algorithm is that we can use it to construct an _optimal solution_ to the otherwise difficult saddle-point problem \(\min_{\theta}\mathcal{L}_{adv}(f_{\theta})=\min_{\theta}\max_{\mathcal{G}\in \mathcal{B}(\mathcal{G})}\mathcal{L}_{0/1}(f_{\theta})\) arising in adversarial training. The main idea to show this is to first train
a (normal) GNN \(f_{\theta}\) minimizing Equation (3), then robustifying it through memorization and lastly, showing that the result indeed is optimal. Formally, we state (proof see Appendix C.1):

**Proposition 2**.: _Assuming we solve the standard learning problem \(\theta^{*}=\arg\min_{\theta}\mathcal{L}_{0/1}(f_{\theta})\) and that \(\mathcal{G}\in\mathcal{B}(\mathcal{G})\). Then, the model from Proposition 1 is an optimal solution to the saddle-point problem \(\min_{\theta}\mathcal{L}_{adv}(f_{\theta})=\min_{\theta}\max_{\mathcal{G}\in B (\mathcal{G})}\mathcal{L}_{0/1}(f_{\theta})\) arising in adversarial training._

Note that in a fully inductive setting due to the expectation in the losses, neither Proposition 1 nor Proposition 2 hold, i.e., an optimal solution cannot be found through memorization (see Appendix A). Thus, inductive node classification does not suffer from the same theoretical limitations.

#### 2.1.2 Empirical Limitations

Even though prior work did not achieve perfect robustness, we show below that the reported gains from adversarial training by Xu et al. [2] actually mostly stem from self-training, i.e., the "leakage" of information on the clean test nodes through pseudo-labeling. Then, we close the gap between theory and practice and show that perfect robustness, while preserving clean accuracy, can be achieved empirically through adversarial training - effectively solving the learning setting in prior work.

**Adversarial training causes overfitting.** For transductive node classification, it is also empirically possible to achieve perfect robustness while maintaining clean test accuracy by combining self- with adversarial training and using a more flexible, learnable diffusion model (GPRGNN) as introduced in Section 3 In Figure 3, we show the test accuracy under severe perturbations for an adversarially trained GCN [2] and GPRGNN, both trained using a very strong adversary and pseudo-labels derived from self-training. The performance of the adversarially trained GCN reduces rapidly, while GPRGNN achieves (almost constant) perfect robustness. Since the pseudo-labels are derived from the clean graph, the clean graph is leaked in the training process. This allows GPRGNN to mimic the behavior of an MLP and overfit to the pseudo-labels, i.e., memorize the (node-feature, pseudo-label)-pairs it has seen during training. In other words, it finds a trivial solution to this learning setting, similar to the theoretic solution discussed in Section 2.1.1. In Appendix C.2.1 we show that we achieve perfect robustness not only if using the PGD attack as Xu et al. [2], but also for many different attacks.

These findings question how to interpret the reported robustness gains of previous work, which all evaluate transductively and usually use self-training. Conceptually, being robust against test-time (evasion) attacks is most relevant, if there can be a natural change in the existing data. Only then it is realistic to assume an adversary causing some of the change to be malicious and against which we want to be robust without losing our ability to generalize to new data. Therefore, in Section 5 we revisit adversarial training in an inductive setting avoiding the same evaluation pitfalls. Indeed, we find that using robust diffusion (see Section 3), we are not only capable of solving transductive robustness, but learn to robustly generalize to unseen nodes far better than previously studied models.
Robust Diffusion: Combining Graph Diffusion with Adversarial Training

We propose to use more flexible GNN architectures for adversarial training than previous studies. In particular, we use learnable _graph diffusion_ models in conjunction with adversarial training to obtain a _robust diffusion_. We not only show that a robust diffusion significantly outperforms other models used in previous work (see Section 5), but it also allows for increased _interpretability_ as we can gain insights into the characteristics of such robustness-enhancing models from different perspectives.

**Fixed message passing** schemes of popular GNNs like GCN or APPNP can be interpreted as the _graph convolution_\(g(\mathbf{\Lambda})\mathbin{\raisebox{-1.0pt}{\scalebox{1.0}{$\circ$}}}\mathbf{H}= \mathbf{V}g(\mathbf{\Lambda})\mathbf{V}^{\top}\mathbf{H}\) between a _fixed_ graph filter \(g(\mathbf{\Lambda})\) and the transformed node attributes are \(\mathbf{H}=f_{\theta}(\mathbf{X})\) using MLP \(f_{\theta}\). This convolution is defined w.r.t. the (diagonalized) eigenvalues \(\mathbf{\Lambda}\in\mathbb{R}^{n\times n}\) and eigenvectors \(\mathbf{V}\in\mathbb{R}^{n\times n}\) of the Laplacian \(\mathbf{L}^{\prime}=\mathbf{I}-\mathbf{D}^{-\nicefrac{{1}}{{2}}}\mathbf{\Lambda}\mathbf{D}^{- \nicefrac{{1}}{{2}}}\) with diagonal degree matrix \(\mathbf{\tilde{D}}\). Following the common parametrization, instead of \(\mathbf{L}^{\prime}\), we use \(\mathbf{L}=\mathbf{D}^{-\nicefrac{{1}}{{2}}}\mathbf{\Lambda}\mathbf{D}^{-\nicefrac{{1}}{{2}}}\) or, depending on the specific model, \(\hat{\mathbf{L}}=\hat{\mathbf{D}}^{-\nicefrac{{1}}{{2}}}\hat{\mathbf{\Lambda}}\hat{\mathbf{D} }^{-\nicefrac{{1}}{{2}}}\) where \(\hat{\mathbf{A}}=\mathbf{A}+\mathbf{I}\) with node degrees \(\hat{\mathbf{D}}\). Then, many spatial GNNs relate to the \(K\)-order polynomial approximation \(\mathbf{V}g(\mathbf{\Lambda})\mathbf{V}^{\top}\mathbf{H}\approx\sum_{k=0}^{K}\gamma_{k}\mathbf{L}^ {k}\mathbf{H}\) with the \(K+1\) diffusion coefficients \(\mathbf{\gamma}\in\mathbb{R}^{K+1}\). Models like GCN stack multiple feature transformations, convolutions, and point-wise non-linearities.

Crucially, GCN's or APPNP's graph filter \(g(\mathbf{\Lambda})\) is fixed (up to scaling). Specifically, we obtain an MLP with \(\mathbf{\gamma}=[1,0,\dots,0]\). If using \(\hat{\mathbf{L}}\), a GCN corresponds to \(\mathbf{\gamma}=[0,-1,0,\dots,0]\), and in APPNP \(\mathbf{\gamma}\) are the Personalized PageRank coefficients.

**Robust diffusion.** In contrast to prior work on robust graph learning, we do not solely use a static parametrization of \(g(\mathbf{\Lambda})\). Instead, we learn the graph filter, which corresponds to training diffusion coefficients \(\mathbf{\gamma}\). This allows the model to adapt the graph diffusion to the adversarial perturbations seen during training, i.e., we learn a _robust diffusion_.

For this, the used architectures consist of two steps: **(1)** using an MLP to preprocess the node features, i.e., \(\mathbf{H}=f_{\theta}(\mathbf{X})\) where \(\theta\) are learnable parameters; and then, **(2)** using a learnable diffusion computing the logits. For the learnable diffusion, we employ GPRGNN [13] that uses the previously introduced monomial basis: \(\operatorname{softmax}\bigl{(}\sum_{k=0}^{K}\gamma_{k}\hat{\mathbf{L}}^{k}\mathbf{H} \bigr{)}\). Additionally, we study Chebyshev polynomials (see ChebNetII [14]) that are of interest due to their beneficial theoretical properties. ChebNetII can be expressed as \(\operatorname{softmax}\bigl{(}\sum_{k=0}^{K}\gamma_{k}w_{k}T_{k}(\mathbf{L})\mathbf{H} \bigr{)}\) with extra weighting factor \(w_{k}=\nicefrac{{2}}{{K-1}}\sum_{j=0}^{K}T_{k}(x_{j})\). The Chebyshev basis is given via \(T_{0}(\mathbf{L})=\mathbf{I}\), \(T_{1}(\mathbf{L})=\mathbf{L}\), and \(T_{k}(\mathbf{L})=2\mathbf{L}T_{k-1}(\mathbf{L})-T_{k-2}(\mathbf{L})\). The Chebyshev nodes \(x_{j}=\cos\big{(}\frac{j+1/2}{K+1}\pi\big{)},j=0,\dots,K\) for \(w_{k}\) reduce the so-called Runge phenomenon [14]. Note, the resulting Chebyshev polynomial can be expressed in monomial basis (up to \(\mathbf{L}\) vs. \(\hat{\mathbf{L}}\)) via expanding the \(T_{k}(\mathbf{L})\) terms and collecting the powers \(\mathbf{L}^{k}\).

**Interpretability.** We can gain insights about the learned robust representation from the _(i)_ polynomial, _(ii)_ spectral, and _(iii)_ spatial perspective.

_(i) Polynomial perspective._ The coefficients \(\gamma_{k}\) determine the importance of the respective \(k\)-hop neighborhood for the learned representations. To visualize \(\gamma_{k}\), we can always consider \(\gamma_{0}\) to be positive, which is equivalent to flipping the sign of the processed features \(\mathbf{H}\). Additionally, we normalize the coefficients s.t. \(\sum|\gamma|=1\) since \(\mathbf{H}\) also influences the scale. In Figure 6, we give an example for the polynomial perspective (details are discussed in Section 5).

_(ii) Spectral perspective._ We solve for \(g_{\theta}(\mathbf{\Lambda})\) in the polynomial approximation \(\mathbf{V}g_{\theta}(\mathbf{\Lambda})\mathbf{V}^{\top}\mathbf{H}\approx\sum_{k=0}^{K}\gamma_{k }\hat{\mathbf{L}}^{k}\mathbf{H}\) to obtain a possible graph filter \(g_{\theta}(\mathbf{\Lambda})=\mathbf{V}^{\top}(\sum_{k=0}^{K}\gamma_{k}\hat{\mathbf{L}}^{ k})\mathbf{V}\). Following Balcilar

Figure 4: Robust diffusion (GPRGNN) on Karate Club where the edge \((u,v)\) width encodes the diffusion coefficient \(T_{u,v}\) learned during training. In (a) we show the normalized adjacency matrix. The other plots show the robust diffusion transition matrix: (b) w/o adversarial training, (c) w/ adversarial training but w/o local constraints, and (d) w/ adversarial training and w/ local constraints.
et al. [15], we study the spectral characteristics w.r.t. \(\mathbf{I}-\mathbf{D}^{-\nicefrac{{1}}{{2}}}\mathbf{\Lambda}\mathbf{D}^{-\nicefrac{{1}}{{2}}}\). Then, the diagonal entries of \(g_{\theta}(\mathbf{\Lambda})\) correspond to the (relative) magnitude of how signals of frequency \(\lambda\) are present in the filtered signal. Vice versa, a low value corresponds to suppression of this frequency. Recall, low frequencies correspond to the small eigenvalues and high to the large eigenvalues. In Figure 7, we show how adversarial training and the permissible perturbations affect the spectra of the learned graph filters.

_(iii) Spatial perspective._ Robust diffusion (monomial basis) can be summarized as \(\operatorname{softmax}\left(\mathbf{T}\mathbf{H}\right)\) where \(\mathbf{T}=\sum_{k=0}^{K}\gamma_{k}\hat{\mathbf{L}}^{k}\) is the total diffusion matrix. The coefficient \(\mathbf{T}_{uv}\) indicates the diffusion strength between node \(u\) and node \(v\). For example, we visualize the total diffusion matrix \(\mathbf{T}\) in Figure 4 on Karate Club [16] with different training strategies. Depending on the learning signal we give, GPRGNN is able to adjust its diffusion.

## 4 LR-BCD: Adversarial Attack with Local Constraints

**Motivation for local constraints.** The just-discussed interpretability of robust diffusion provides empirical evidence for the importance of local constraints. Specifically, from Figure 3(c), we see that GPRGNN adversarially trained _without_ local constraints learns a diffusion that almost ignores the graph structure. While this model is certainly very robust w.r.t. structure perturbations, it is not a very useful GNN since it cannot leverage the structure information anymore. In contrast, we show in Figure 3(d) that GPRGNN trained adversarially _with_ local constraints results in a robust model that can still incorporate the structure information.

The local predictions in node classification yield an alternative motivation. In the absence of local constraints, an adversary typically has the power to rewire the entire neighborhood of many nodes. When attacking GNNs, we empirically observe that a majority of successfully attacked nodes are perturbed beyond their degree even for moderate global attack budgets (see Figure 5). That such perturbations are not reasonable is evident in the fact that studies on local attacks [7; 17], where the adversary targets a single node's prediction, do not consider perturbations (far) beyond the node degree. However, a \(5\%\) attack budget on Cora-ML allows changing \(798\) edges while the majority of nodes have a degree less than three.

Traditionally, adversarial changes are judged by noticeability [18] since unnoticeable changes do not alter the semantics. However, for graphs a manual inspection of its content is often not feasible, and the concept of (un-)noticeability is unclear. However, using generative graph models Gosch et al. [6] revealed that perturbations beyond the node degree most often do alter the semantics. Perturbations that alter semantics can pose a problem for adversarial training. Similar observations have been done in graph contrastive learning where perturbations that do not preserve graph semantic preservation have a direct effect on the achievable error bounds [19].

**Locally constrained Randomized Block Coordinate Descent (LR-BCD).** We next introduce our LR-BCD attack; the first attack targeting multiple nodes at once while maintaining a local constraint for each node next to a global one. For this, we extend the so-called PR-BCD attack framework.

_Projected Randomized Block Coordinate Descent (PR-BCD)_[17] is a gradient-based attack framework applicable to a wide range of models. Its goals is to generate a perturbation matrix \(\mathbf{P}\in\{0,1\}^{n\times n}\) that is applied to the original adjacency matrix \(\mathbf{\Lambda}\) to construct a perturbed matrix \(\tilde{\mathbf{\Lambda}}=\mathbf{\Lambda}+(\mathbb{I}-2\mathbf{\Lambda})\odot\mathbf{P}\), where \(\mathbb{I}\) is an all-one matrix. For undirected graphs, only the upper-triangular parts of all matrices are considered. To construct \(\mathbf{P}\) in an efficient manner, PR-BCD relaxes \(\mathbf{P}\) during the attack from \(\{0,1\}^{n\times n}\) to \([0,1]^{n\times n}\) and employs an iterative process for \(T\) iterations. It consists of three repeating steps. **(1)** A random block of size \(b\) is sampled. That is, only \(b\) (non-contiguous) elements in the perturbation matrix \(\mathbf{P}_{t-1}\) are considered and all other elements set to zero. Thus, \(\mathbf{P}_{t-1}\) is sparse. **(2)** A gradient update w.r.t. the loss to compute relaxed perturbations \(\mathbf{S}_{t}\) is performed, i.e., \(\mathbf{S}_{t}\leftarrow\mathbf{P}_{t-1}+\alpha_{t-1}\nabla_{\mathbf{P}_{t-1}}\ell(\mathbf{P}_ {t-1})\), where \(\mathbf{P}_{t-1}\) are the previous perturbations, \(\alpha_{t-1}\) is the learning rate, and \(\nabla_{\mathbf{P}_{t-1}}\ell(\mathbf{P}_{t-1})\) are the perturbation gradients through the GNN. Finally, and most crucial **(3)** a projection \(\Pi_{\mathcal{B}(\mathcal{G})}\) ensures that the perturbations are _permissible_ given the set of allowed perturbations

Figure 5: Number of successfully attacked nodes by node degree and number of connected adversarial edges. We attack self-trained GCN with PR-BCD and global budgets \(10\%\) (left) and \(25\%\) (right) on Cora-ML and aggregate the results over three different data splits. We observe that a notable amount of nodes is perturbed beyond their degree.
\(\mathcal{B}(\mathcal{G})\), i.e. \(\mathbf{P}_{t}=\Pi_{\mathcal{B}(\mathcal{G})}(\mathbf{S}_{t})\). Now, the process starts again with **(1)**, but all zero-elements in the block \(b\) (or at least \(\nicefrac{{1}}{{2}}\) of the lowest-value block elements) are resampled. After \(T\) iterations, relaxed perturbations \(\mathbf{P}\) are discretized from \([0,1]^{n\times n}\) to \(\{0,1\}^{n\times n}\) to obtain the resulting \(\tilde{\mathbf{A}}\).

_Global projection._ As mentioned above, the projection \(\Pi_{\mathcal{B}(\mathcal{G})}\) of PR-BCD is the crucial step that accounts for the attack budget. Geisler et al. [17] develop an efficient projection for an adversary implementing a global perturbation constraint, i.e., for \(\mathcal{B}(\mathcal{G})=\{\tilde{\mathbf{A}}\in\{0,1\}^{n\times n}\,|\,\|\tilde{ \mathbf{A}}-\mathbf{A}\|_{0}\leq\Delta\}\) with \(\Delta\in\mathbb{N}_{\geq 0}\). This is achieved by formulating the projection as the following optimization problem

\[\Pi_{\Delta}(\mathbf{S})=\arg\min_{\mathbf{P}}\|\mathbf{P}-\mathbf{S}\|_{F}^{2}\qquad\text{s.t. }\mathbf{P}\in[0,1]^{n\times n},\quad\sum\mathbf{P}\leq\Delta \tag{5}\]

with Frobenius norm \(\|\cdot\|_{F}^{2}\) and the sum aggregating all elements of the matrix. \(\Pi_{\Delta}(\mathbf{S})\) can be solved with the bisection method [17]. After \(T\) iterations, the discretization is performed by sampling, using the elements in \(\mathbf{P}_{T}\) as defining Bernoulli distributions. However, the projection \(\Pi_{\Delta}\) does not support limiting the number of perturbations per node, i.e., \(\sum_{v=1}^{n}P_{u,v}\leq\Delta_{u}^{(l)}\) where \(\mathbf{\Delta}^{(l)}\in\mathbb{N}_{\geq 0}^{n}\) is the vector of local budgets for each node. Indeed, extending the optimization problem above to include local constraints leads to the notoriously hard problem of Euclidean projection to polyhedra [20].

_A locally constrained global projection (LR-BCD)._ With the goal of an efficient attack including local constraints, we have to develop an alternative and scaleable projection strategy for \(\mathcal{B}(\mathcal{G})=\{\tilde{\mathbf{A}}\in\{0,1\}^{n\times n}\,|\,\|\tilde{ \mathbf{A}}-\mathbf{A}\|_{0}<\Delta\wedge\|\sum_{j}(\tilde{\mathbf{A}}_{ij}-\mathbf{A}_{ij}) \|_{0}\leq\Delta_{i}^{(l)}\,\forall i\in[n]\}\). Our novel projection \(\mathbf{P}=\Pi_{\Delta}^{(l)}(\mathbf{S})=\Pi_{[0,1]}(\mathbf{S})\odot\mathbf{C}^{*}\) chooses the largest entries from the perturbation matrix \(\mathbf{S}\in\mathbb{R}^{n\times n}\) using \(\mathbf{C}^{*}\in[0,1]^{n\times n}\) and clipping operator \(\Pi_{[0,1]}(\mathbf{s})\in[0,1]\), s.t. we obey global _and_ local constraints. The optimal choices \(\mathbf{C}^{*}\) can be calculated by solving a relaxed multi-dimensional knapsack problem:

\[\mathbf{C}^{*}=\arg\max_{\mathbf{C}}\sum\mathbf{S}\odot\mathbf{C}\qquad\text{s.t. }\mathbf{C}\in[0,1]^{n\times n},\quad\sum\mathbf{P}^{\prime}\leq\Delta,\quad\mathbf{P}^{ \prime}\,\mathbf{1}\leq\mathbf{\Delta}^{(l)} \tag{6}\]

where \(\mathbf{P}^{\prime}=\Pi_{[0,1]}(\mathbf{S})\odot\mathbf{C}\), i.e., \(\Pi_{[0,1]}(\mathbf{S})\) represents the weights of the individual choices, while \(\mathbf{S}\) captures their value. The sums aggregate all elements in the matrix. In the vector-valued constraint \(\mathbf{P}^{\prime}\,\mathbf{1}\leq\mathbf{\Delta}^{(l)}\), we compare row sums \((\mathbf{P}^{\prime}\,\mathbf{1})_{u}\), capturing the perturbations in the neighborhood, with node-specific budgets \(\Delta_{u}^{(l)}\). Even though this optimization problem has no closed-form solution, it can be readily approximated with greedy approaches [21]. The key idea is to iterate the non-zero entries in \(\mathbf{S}\) in descending order and construct the resulting \(\mathbf{C}^{*}\) (or directly \(\mathbf{P}\)) as follows: For each perturbation \((u,v)\) related to \(\mathbf{S}_{uv}\), we check if the global \(\Delta\) or local budgets \(\Delta_{u}^{(l)}\) and \(\Delta_{v}^{(l)}\) are not yet exhausted. Then, \(\mathbf{C}^{*}_{uv}=1\) (i.e., \(\mathbf{P}_{u,v}=\Pi_{[0,1]}(\mathbf{S}_{uv})\)). Otherwise, \(\mathbf{C}^{*}_{uv}=\min\{\Delta,\Delta_{u}^{(l)},\Delta_{v}^{(l)}\}\). The final discretization is given by \(\mathbf{C}^{*}\) corresponding to the solution of Equation (6) for \(\mathbf{S}_{T}\), but changing the weight of each choice to 1 (i.e., \(\mathbf{P}^{\prime}=\mathbf{C}\)), guaranteeing a binary solution due to the budgets being integer. We give the pseudo-code and more details in Appendix B.4.

Our projection yields sparse solutions as it greedily selects the largest entries in \(\mathbf{S}\) until the budget is exhausted. Moreover, it is efficient. Its time complexity is \(\mathcal{O}(b\log(b))\) due to the sorting of the up to \(b\) non-zero entries in the sparse matrix \(\mathbf{S}\). Its space complexity is \(\mathcal{O}(b)\), assuming we choose the block size \(b\geq\Delta\) as well as \(b\geq n\). Thus, LR-BCD has the same asymptotic complexities as the purely global projection by Geisler et al. [17] (which we will from now on denote as PR-BCD).

**Summary.** We will now summarize our LR-BCD along the four dimensions proposed by Biggio and Roli [22]. _(1) Attacker's goal:_ Although our focus is to increase the misclassification for the target nodes in node classification, we can apply LR-BCD to different node- and graph-level tasks depending on the loss choice. _(2) Attacker's knowledge:_ We assume perfect knowledge about the model and dataset, which is reasonable for adversarial training. _(3) Attacker's capability:_ We propose to use a threat model that constrains the number of edge perturbations globally as well as locally for each node. _(4) Attacker's strategy:_ LR-BCD extends PR-BCD by a projection incorporating local constraints. Most notably, we relax the unweighted graph during the attack to continuous values and leverage randomization for an efficient attack while optimizing over all possible \(n^{2}\) edges.

## 5 Empirical Results

**Inductive learning.** All results in this section follow a fully inductive semi-supervised setting. That is, the training graph \(\mathcal{G}\) does not include validation and test nodes. For evaluation, we then successively
add the respective evaluation set. This way, we avoid the evaluation flaw of prior work since the model cannot achieve robustness via "memorizing" the predictions on the clean graph. We obtain inductive splits randomly, except for OGB arXiv [11], which comes with a split. In addition to the commonly sampled 20 nodes per class for both (labeled) training and validation, we sample a stratified test set consisting of \(10\%\) of all nodes. The remaining nodes are used as (unlabeled) training nodes.

**Setup.** We study the citation networks Cora, Cora-ML, CiteSeer [23], Pubmed [24], and OGB arXiv [11] using GPRGNN, ChebNetII, GCN, APPNP, and GAT [25]. Further, we compare to the state-of-the-art evasion defense Soft Median GDC [17]. We apply adversarial training (see Section 2 and Appendix B.5) using both PR-BCD that only constraints perturbations globally and our _LR-BCD_ that also allows for local constraints. Moreover, we use adversarial training in conjunction with self-training. Due to the inductive split, this does not bias results. We use the tanh margin attack loss of [17] and do not generate adversarial examples for the first 10 epochs (warm-up). We evaluate robust generalization on the test set using L/PR-BCD, which corresponds to _adaptive attacks_. Adaptive attacks are the gold standard in evaluating empirical robustness because they craft model-specific perturbations [26]. We use \(\epsilon\) to parametrize the global budget \(\Delta=\lfloor\epsilon\cdot\sum_{u\in\mathcal{A}}d_{u}/2\rfloor\) relative to the degree \(d_{u}\) for the set of targeted nodes \(\mathcal{A}\). We find that \(\Delta_{u}^{(l)}=\lfloor d_{u}/2\rfloor\) is a reasonable local budget for all datasets but arXiv where we use \(\Delta_{u}^{(l)}=\lfloor d_{u}/4\rfloor\). We report averaged results with the standard error of the mean over three random splits. We use GTX 1080Ti (11 Gb) GPUs for all experiments but arXiv, for which we use a V100 (40 GB). For details see Appendix B. We discuss limitations in Appendix F and provide code at [https://www.cs.cit.tum.de/daml/adversarial-training/](https://www.cs.cit.tum.de/daml/adversarial-training/).

**Certifiable robustness.** We use the model-agnostic randomized/sparse smoothing certificate of Bojchevski et al. [27] to also quantify certifiable robustness. Sparse smoothing creates a randomized ensemble given a base model \(f_{\theta}\) s.t. the majority prediction of the ensemble comes with guarantees. For the randomization, we follow Bojchevski et al. [27] and uniformly drop edges with \(p_{-}=0.6\) as well as add edges with \(p_{+}=0.01\). Sparse smoothing then returns if a node-level prediction is certified (does not change) for the desired deletion radius \(r_{-}\) or addition radius \(r_{+}\). The guarantee holds in a probabilistic sense with significance level \(\alpha\). We report the certified accuracy \(\gamma(r_{-},r_{+})\) that aggregates correct and certifiable predictions over all nodes. We choose \(\alpha=5\%\) and obtain 100,000 random samples. For simplicity, we report in the main part the certified accuracies \(\gamma(r_{-}=0,r_{+}=0)\), \(\gamma(5,0)\), and \(\gamma(0,3)\). See Appendix D.4 for more details and results.

**Finding I: Adversarial training is an effective defense against structure perturbations.** This is apparent from the results in Table 1, where we compare the empirical and certifiable robustness between the aforementioned models on Citeseer. Our adversarially trained robust diffusion models GPRGNN and ChebNetII outperform the other baselines both in empirical and certifiable robustness. This includes the state-of-the-art defense Soft Median, which we outperform with a comfortable margin. Thus, we close the gap in terms of the efficacy of adversarial training in the image domain vs. structure perturbations. Notably, the increased robustness does not imply a lower clean accuracy. For example, our LR-BCD adversarially trained GPRGNN achieves a 1.7% higher clean accuracy

\begin{table}
\begin{tabular}{c c c c c c c c c c} \hline \hline \multirow{2}{*}{**Model**} & **Adv.** & **A. eval.** & \(\sim\) & **LR-BCD** & **PR-BCD** & **LR-BCD** & **PR-BCD** & **Certifiable accuracy / sparse smoothing** \\  & **trm.** & **trm.** & **t.m.** & **cline & **conf.** & **t.m.** & **t.m.** & **t.m.** & **t.m.** & **t.m.** \\ \hline
**GCN** & \(\mathcal{K}\) & - & 72.0 \(\pm\) 2.5 & 54.7 \(\pm\) 2.8 & 51.7 \(\pm\) 2.8 & 45.3 \(\pm\) 3.4 & 38.0 \(\pm\) 3.8 & 38.3 \(\pm\) 1.5 & 1.7 \(\pm\) 0.7 & 4.8 \(\pm\) 1.5 \\ \hline
**GAT** & \(\mathcal{K}\) & - & -3.6 \(\pm\) 2.7 & -3.9 \(\pm\) 3.4 & +0.5 \(\pm\) 3.5 & -15.9 \(\pm\) 5.3 & -2.3 \(\pm\) 7.3 & -14.0 \(\pm\) 12.0 & -1.7 \(\pm\) 0.7 & 4.8 \(\pm\) 1.5 \\
**APPNP** & \(\mathcal{K}\) & - & +0.2 \(\pm\) 1.1 & -1.7 \(\pm\) 0.7 \(\pm\) 1.9 \(\pm\) 1.4 & +3.0 \(\pm\) 1.2 & +2.2 \(\pm\) 2.5 & +8.9 \(\pm\) 0.1 & +31.2 \(\pm\) 6.4 & +31.6 \(\pm\) 6.4 \\
**GPRGNN** & \(\mathcal{K}\) & - & -2.2 \(\pm\) 4.3 \(\pm\) 4.2 & +2.7 \(\pm\) 3.6 & +4.9 \(\pm\) 5.3 & +3.9 \(\pm\) 4.6 & +17.9 \(\pm\) 6.9 & +42.4 \(\pm\) 4.4 & +41.3 \(\pm\) 3.7 \\
**ChebNetII** & \(\mathcal{K}\) & - & +1.1 \(\pm\) 2.2 & +5.8 \(\pm\) 2.5 & +5.0 \(\pm\) 2.4 & +10.4 \(\pm\) 2.6 & +76.3 \(\pm\) 3.4 & +24.6 \(\pm\) 9.9 & +55.6 \(\pm\) 1.2 & +54.0 \(\pm\) 0.9 \\
**SoftMedian** & \(\mathcal{K}\) & - & +0.9 \(\pm\) 1.7 & +9.5 \(\pm\) 2.2 & +3.9 \(\pm\) 1.9 & +16.2 \(\pm\) 2.4 & +16.6 \(\pm\) 2.9 & +45.2 \(\pm\) 10.5 & +60.3 \(\pm\) 1.4 & +5.7 \(\pm\) 0.8 \\ \hline \multirow{2}{*}{**GCN**} & \(\mathcal{K}\) & **LR-BCD** & - & +0.2 \(\pm\) 1.8 & +7.8 \(\pm\) 1.6 & +6.9 \(\pm\) 1.5 & +10.9 \(\pm\) 2.1 & +8.1 \(\pm\) 2.3 & +3.0 \(\pm\) 9.4 & +10.7 \(\pm\) 4.6 & +13.1 \(\pm\) 5.1 \\  & **LR-BCD** & +0.0 \(\pm\) 1.9 & +6.9 \(\pm\) 0.9 & +5.3 \(\pm\) 1.6 & +8.6 \(\pm\) 2.3 & +5.8 \(\pm\) 2.4 & +2.4 \(\pm\) 1.6 & +10.1 \(\pm\) 5.5 & +11.4 \(\pm\) 4.5 \\  & **LR-BCD** & +0.8 \(\pm\) 1.6 & +5.9 \(\pm\) 3.7 & +9.0 \(\pm\) 3.0 & +5.4 \(\pm\) 5.1 & +13.3 \(\pm\) 3.5 & -2.0 \(\pm\) 2.0 & +4.1 \(\pm\) 1.7 & +4.0 \(\pm\) 2.1 \\
**GAT** & \(\mathcal{K}\) & **PR-BCD** & +1.1 \(\pm\) 2.2 & +8.9 \(\pm\) 2.8 & +31.2 \(\pm\) 3.7 & +10.3 \(\pm\) 2.3 & +21.8 \(\pm\) 4.8 & -10.1 \(\pm\) 1.3 & +1.7 \(\pm\) 1.2 \(\pm\) 2.0 & +2.8 \(\pm\) 1.2 \\
**APPNP** & \(\mathcal{K}\) & **LR-BCD** & -0.8 \(\pm\) 1.3 & +7.6 \(\pm\) 1.6 & +5.6 \(\pm\) 1.9 & +11.1 \(\pm\) 1.9 & +6.3 \(\pm\) 3.6 & +21.7 \(\pm\) 9.5 & +41.3 \(\pm\) 2.9 & +44.1 \(\pm\) 1.2 \\
**APPNP** & \(\mathcal{K}\) & **PR-BCD** & -0.2 \(\pm\) 2.2 & +6.2 \(\pm\) 2.3 & +5.5 \(\pm\) 3.1 & +9.0 \(\pm\) 2.9 & +6.5 \(\pm\) 3.9 & +19.3 \(\pm\) 2.7 & +41.0 \(\pm\) 3.8 & +41.9 \(\pm\) 3.0 \\ \hline
**GPRGNN** & \(\mathcal{K}\) & **LR-BCD** & +17.7 \(\pm\) 3.0 & **+15.7 \(\pm\) 3.6** & +13.6 \(\pm\) 3.5 & **+24.8 \(\pm\) 4.2** & +22.9 \(\pm\) 4.3 & **+34.0 \(\pm\) 1.5** & +67.4 \(\pm\) 1.5 & +65.0 \(\pm\) 2.5 \\  & **PR-BCD
than a GCN, while with an adaptive LR-BCD attack and \(\epsilon=25\%\) perturbed edges, we outperform a GCN by 24.8%. This amounts to a clean accuracy of 73.7% and a perturbed accuracy of 70.1%. We present comparable results for the other datasets and an ablation study in Appendix D.

**Finding II: Choose the set of permissible perturbations wisely!** As argued already in Section 4, the right set of admissible permutations can guide the learned robust diffusion. Importantly, the set of admissible perturbations is application specific. That is, depending on the choice, the resulting model might have different robustness characteristics w.r.t. different threat models. For example, in Table 1, a LR-BCD adversarially trained GPRGNN is more robust to LR-BCD attacks than to a model trained with PR-BCD, and vice versa. Importantly, the learned message passing is very different as the spectral analysis (Figure 7) reveals a striking pattern. Adversarial training with PR-BCD flipped the behavior from low-pass to high-pass if compared to a regularly trained model. However, adversarial training with LR-BCD seems to preserve the general characteristic while using a larger fraction of the spectrum to enhance robustness. Moreover, the polynomial coefficients (Figure 6) resulting from adversarial training without local constraints (Figure 6c) are very similar to coefficients that Chien et al. [13] associated with a non-informative graph structure. See Appendix D.2 for other datasets.

**Finding III: Adversarial training with local constraints is efficient and scalable.** We show in Figure 8 the results of an adversarially trained GPRGNN using LR-BCD with different relative budgets \(\epsilon\). Adversarial training on arXiv requires less than 20 GB of RAM and an epoch takes approx. 10 seconds. In contrast, the globally constrained adversarial training of Xu et al. [2] would require multiple terabytes of RAM due to \(n^{2}\) possible edge perturbations [17]. We not only show that robust diffusion with LR-BCD is scalable, but also that it improves the robustness on arXiv. That is, twice as many edge perturbations are required to push the accuracy below that of an MLP, if comparing \(\epsilon=10\%\) to standard training.

## 6 Related Work

We next relate to prior work and refer to Appendix E for more detail: _(1) Learning setting._ Conceptual problems by remembering training data are not unique to adversarial training and have been mentioned in Zheng et al. [34] for graph injection attacks and by Scholten et al. [35] for certification. _(2) Adversarial training_ for GNNs under structure perturbations have been studied in [30, 31, 2, 32, 33]. However, all prior works study a transductive setting (see Table 2) having serious shortcomings for evasion attacks (see Section 2). Note that only Xu et al. [2, 3] study adversarial training for (global) structure perturbations in its literal sense, i.e., directly work on Equation (1). Further, we are the first to study adversarial training in the inductive setting. _(3) Local constraints_ have been studied for local attacks [7, 17, 36, 12], i.e., if attacking a single node's prediction. They are also well-established for robustness certificates [37, 38, 39]. However, surprisingly, there is no global attack, i.e., attack targeting a large set of node predictions at once, that incorporates local constraints. This even led to prior work trying to naively and expensively apply local attacks for each node sequentially to generate locally constrained global perturbations [32]. With LR-BCD, we finally close this gap. _(4) GNN Architectures._ The robust GNN literature strongly focuses on GCN and variants [7, 40, 41, 42, 43, 17, 44, 32, 8]. GAT is perhaps the most flexible studied model [34]. While adversarial training improves the robustness of GAT, in our experiments, an

\begin{table}
\begin{tabular}{c c c} \hline Publication & Learning setting & Type of attack \\ \hline Deng et al. [28] & Transductive & evasion (attribute) \\ Feng et al. [29] & Transductive & evasion (attribute) \\ Jin and Zhang [30] & Transductive & evasion (structure + attribute) \\ Xu et al. [2] & Transductive & evasion (structure) \\ Xu et al. [3] & Transductive & evasion (structure) \\ Chen et al. [31] & Transductive & evasion (structure) \\ Li et al. [32] & Transductive & evasion (structure + attribute) \\ Guo et al. [33] & Transductive & evasion + poisoning (structure) \\ \hline \end{tabular}
\end{table}
Table 2: Works on adversarial training for GNNs.
adversarial trained GAT is not more robust than a GCN [4]. A novel aspect of our work is that spectral filters, in the form of polynomials [14; 13], can learn significantly more robust representations, beating a state-of-the-art graph defense. They also reveal insights about the learned robust representation.

## 7 Discussion and Conclusion

We show that the transductive learning setting in prior work on adversarial training for GNNs has fundamental limitations leading to a biased evaluation and a trivial solution through memorization. Thus, we revisit adversarial training in a fully inductive setting. We employ more flexible GNNs than before that achieve substantial robustness gains through adversarial training and are interpretable. For more realistic perturbations, we develop the first global attack able to maintain local constraints.

## Acknowledgments and Disclosure of Funding

This paper has been supported by the DAAD programme Konrad Zuse Schools of Excellence in Artificial Intelligence, sponsored by the German Federal Ministry of Education and Research.
