C HARACTERIZING THE I NFLUENCE OF G RAPH E LEMENTS
A BSTRACT
Influence function, a method from robust statistics, measures the changes of model parameters or some functions about model parameters concerning the removal or modification of training instances.
It is an efficient and useful post-hoc method for studying the interpretability of machine learning models without the need for expensive model re-training.
Recently, graph convolution networks (GCNs), which operate on graph data, have attracted a great deal of attention.
However, there is no preceding research on the influence functions of GCNs to shed light on the effects of removing training nodes/edges from an input graph.
Since the nodes/edges in a graph are interdependent in GCNs, it is challenging to derive influence functions for GCNs.
To fill this gap, we started with the simple graph convolution (SGC) model that operates on an attributed graph and formulated an influence function to approximate the changes of model parameters when a node or an edge is removed from an attributed graph.
Moreover, we theoretically analyzed the error bound of the estimated influence of removing an edge.
We experimentally validated the accuracy and effectiveness of our influence estimation function.
In addition, we showed that the influence function of a SGC model could be used to estimate the impact of removing training nodes/edges on the test performance of the SGC without re-training the model.
Finally, we demonstrated how to use influence functions to guide the adversarial attacks on GCNs effectively.
I NTRODUCTION
Graph data is pervasive in real-world applications, such as, online recommendations (Shalaby et al., 2017; Huang et al., 2021), drug discovery (Takigawa & Mamitsuka, 2013;
Li et al., 2017), and knowledge management (Rizun, 2019; Wang et al., 2018), to name a few.
The growing need to analyze huge amounts of graph data has inspired work that combines Graph Neural Networks with deep learning (Gori et al., 2005;
Scarselli et al., 2005; Li et al., 2016; Hamilton et al., 2017; Xu et al., 2019b).
Graph Convolutional Networks (GCNs) (Kipf & Welling, 2017; Zhang & Chen, 2018; Fan et al., 2019), the most cited GNN architecture, adopts convolution and message-passing mechanisms.
To better understand GCNs from a data-centric perspective, we consider the following question:
Without model retraining, how can we estimate the changes of parameters in GCNs when the graph used for learning is perturbed by edge- or node-removals?
This question proposes to estimate counterfactual effects on the parameters of a well-trained model when there is a manipulation in the basic elements in a graph, where the ground truth of such an effect should be obtained from model retraining.
With a computational tool as the answer, we can efficiently manipulate edges or nodes in a graph to control the change of model parameters of trained
GCNs.
The solution would provide further extensions like graph data rectification, improving model generalization, and graph data poison attacks through a pure data modeling way.
Yet, current methods for training GCNs offer limited interpretability of the interactions between the training graph and the GCN model.
More specifically, we fall short of understanding the influence of the input graph elements on both the changes in model parameters and the generalizability of a trained model (Ying et al., 2019; Huang et al., 2022; Yuan et al., 2021; Xu et al., 2019a; Zheng et al., 2021).
In the regime of robust statistics, an analyzing tool called influence functions (Hampel, 1974; Koh & Liang, 2017) is proposed to study the counterfactual effect between training data and model performance.
For independent and identically distributed (i.i.d.) data, influence functions offer an approximate estimation of the model’s change when there is an infinitesimal perturbation added to the training distribution, e .
g ., a reweighing on some training instances.
However, unlike i.i.d.
data, manipulation on a graph would incur a knock-on effect through GCNs.
For example, an edge removal will break down all message passing that is supposed to pass through this edge and consequentially change node representations and affect the final model optimization.
Therefore, introducing influence functions to graph data and GCNs is non-trivial work and requires extra considerations.
In this work, we aim to derive influence functions for GCNs.
As the first attempt in this direction, we focused on Simple Graph Convolution (Wu et al., 2019).
Our contributions are three-fold:
• We derived influence functions for Simple Graph Convolution.
Based on influence functions, we developed computational approaches to estimate the changes in model parameters caused by two basic perturbations: edge removal and node removal.
• We derived the theoretical error bounds to characterize the gap between the estimated changes and the actual changes in model parameters in terms of both edge and node removal.
• We show that our influence analysis on the graph can be utilized to (1) rectify the training graph to improve model testing performance, and (2) guide adversarial attacks to SGC or conduct grey-box attacks on GCNs via a surrogate SGC.
P RELIMINARIES
In the following sections, we use a lowercase x for a scalar or an entity, an uppercase X for a constant or a set, a bolder lowercase x for a vector, and a bolder uppercase X for a matrix.
Influence Functions Influence functions (Hampel, 1974) estimate the change in model parameters when the empirical weight distribution of i.i.d.
training samples is perturbed infinitesimally.
Such estimations are computationally efficient compared to learn-one-out retraining iterating every training sample.
For N training instances x and label y , consider empirical risk minimization (ERM) ˆ θ =
arg min θ ∈ Θ 1 N (cid:80) x ,y ℓ ( x , y ) + λ 2 ∥ θ ∥ 22 for some loss function ℓ ( · , · ) through a parameterized model θ and with a regularization term.
When down weighing a training sample ( x i , y i ) by an infinitely small fraction ϵ , the substitutional ERM can be expressed as ˆ θ ( x i ; − ϵ ) =
arg min θ ∈ Θ 1 N (cid:80) x ,y ℓ ( x , y )
− ϵℓ ( x i , y i ) + λ 2 ∥ θ ∥ 22 .
Influence functions estimate the actual change I ∗ ( x i ; − ϵ )
=
ˆ θ ( x i ; − ϵ ) − ˆ θ for a strictly convex and twice differentiable ℓ ( · , · ) :
[Equation]
where H ˆ θ := 1 N (cid:80)
Ni
=1 ∇ 2ˆ θ ℓ ( x i , y i )
+ λ
I is the Hessian matrix with regularization at parameter ˆ θ .
For some differentiable model evaluation function f : Θ → R like calculating total model loss over a test set, the change from down weighing ϵ → ( x i , y i ) to the evaluative results can be approximated by ∇ ˆ θ f
(ˆ θ ) H − 1 ˆ θ ∇ ˆ θ ℓ ( x i , y i ) .
When N the size of the training data is large, by setting ϵ = 1 N , we can approximate the change of ˆ θ incurred by removing an entire training sample I ( x i ; − 1 N )
=
I ( − x i ) via linear extrapolations 1 N → 0 .
Obviously, in terms of the estimated influence I , removing a training sample has the opposite value of adding the same training sample I ( − x i )
=
−I (+ x i ) .
In our work, we shall assume an additivity of influence functions in computations when several samples are removed, e .
g ., when removing two samples: I ( − x i , − x j ) =
I ( − x i )
+ I ( − x j ) .
Though efficient, as a drawback, influence functions on non-convex models suffer from estimation errors due to the variant local minima and usually a computational approximation to H − 1 ˆ θ for a noninvertible Hessian matrix.
To introduce influence functions from i.i.d.
data to graphs and precisely characterize the influence of graph elements to model parameters’ changes, we consider a convex model called Simple Graph Convolution from the GCNs family.
Simple Graph Convolution By removing non-linear activations between layers from typical
Graph Convolutional Networks, Simple Graph Convolution (SGC) (Wu et al., 2019) formulates a linear simplification of GCNs with competitive performance on various tasks (He et al., 2020;
Rakhimberdina & Murata, 2019).
Let G =
( V, E ) denote an undirected attributed graph, where
V = { v } contains vertices with corresponding feature X ∈ R | V |× D with D the feature dimension, and E = { e ij } 1 ≤ i<
j ≤| V | is the set of edges.
Let Γ v denote the set of neighborhood nodes around v , and d v the node degrees of v .
We use A denote the adjacency matrix where A ij =
A ji =if e ij ∈ E , and 0 elsewhere.
D = diag ( d v ) denotes the degree matrix.
When the context is clear, we simplify the notation Γ v i → Γ i , and the same manner for other symbols.
For multi-layer
GNNs, let z ( k ) v denote the hidden representation of node v in the k -th layer, and with z (0) v = [Equation] v the initial node features.
Simple Graph Convolution processes node representations as: z ( k ) v
[Equation]
+ b ( k ) , where W ( k ) and b ( k ) are trainable parameters in k -th layer.
In transductive node classification, let V train ⊂
V denote the set of N training nodes associated with labels y .
ERM of SGC in this task is ˆ
[Equation]
= arg
[Equation]
[Equation]
Due to the linearity of SGC, parameters W ( k ) and b ( k ) in each layer can be unified, and predictions after k layers can be simplified as y = arg max( ˜ D − 12 ˜
A ˜ D − 12 ) k XW + b with ˜ A
=
A + I and ˜ D
the degree matrix of ˜ A .
Therefore, for node representations Z ( k ) = ( ˜ D − 12 ˜
A ˜ D − 12 ) k X with y and cross-entropy loss, ℓ ( · , · ) is convex.
The parameters θ in ℓ consist of matrix W ∈ R D ×| Class | and vector b ∈ R | Class | with | Class | the number of class, and can be solved via logistic regression.
Additional Notations
In what follows, we shall build our influence analysis upon SGC.
For notational simplification, we omit ( k ) in Z ( k ) and use Z to denote the last-layer node representations from SGC.
We use I ∗ ( − e ij )
=
ˆ θ ( − e ij ) − ˆ θ to denote the actual model parameters’ change where ˆ θ ( − e ij ) is obtained through ERM when e ij is removed from E .
Likewise, I ∗ ( − v i ) denotes the change from v
i ’s removal from graph G .
I ( − e ij ) and I ( − v i ) are the corresponding estimated influence for I ∗ ( − e ij ) and I ∗ ( − v i ) based on influence functions, respectively.
M ODELING THE I NFLUENCE OF E LEMENTS IN G RAPHS
We mainly consider the use of influence functions of two fundamental operations over an attributed graph: removing an edge (in Section 3.1) and removing a complete node (in Section 3.2).
3. I NFLUENCE OF E DGE R EMOVAL
With message passing through edges in graph convolution, removing an edge will incur representational changes in Z .
When e ij is removed, the changes come from two aspects: (1) The message passing for node features via the removed edge will be blocked, and all the representations of k -hop neighboring nodes of the removed edge will be affected.
(2) Due to the normalization operation over A , the degree of all adjacent edges e jk , ∀ k ∈ Γ i and e ik , ∀ k ∈
Γ j will be changed, and these edges will have a larger value in ˜ D − 12 ˜
A ˜ D − 12 .
We have the following expression to describe the representational changes ∆( − e ij ) of node representations Z in SGC incurred by removing e ij .
[Equation]
A ( − e ij ) is the modified adjacency matrix with A ( − e ij ) ij/ji =
and A ( − e ij ) =
A elsewhere.
˜ A ( − e ij ) =
A ( − e ij )
+ I and ˜ D ( − e ij ) the degree matrix of ˜ A ( − e ij ) .
By having ∆( − e ij ) , we can access the change in every node.
Let δ k ( − e ij ) denotes the k -th row in ∆( − e ij ) .
δ k = 0 implies no change in k -th node from removing e ij , and δ k ̸ = 0 indicates a change in z k .
We proceed to use influence functions to characterize the counterfactual effect of removing e ij .
Our high-level idea is, from an influence functions perspective, representational changes in nodes
z → z + δ is equivalent to removing training instances with feature z , and adding new training instances with feature z + δ and with the same labels.
The problem thus turns back to an instance reweighing problem developed by influence functions.
In this case, we have the lemma below to prove the influence functions’ linearity.
Lemma 3.1.
Consider empirical risk minimization ˆ θ = arg min θ ∈ Θ (cid:80) i ℓ ( x i , y i ) and ˆ θ ( x j → x j + δ ) =
arg min θ ∈ Θ (cid:80) i ̸
=
j ℓ ( x i , y i ) + ℓ ( x j + δ, y j ) with some twice-differentiable and strictly convex ℓ , let I ∗ ( x j → x j + δ )
=
ˆ θ ( x j → x j + δ ) − ˆ θ , the estimated influence satisfies linearity:
[Equation]
By having Lemma 3.1, we are ready to derive a proposition from characterizing edge removal.
Proposition 3.2.
Let δ k ( − e ij ) denote the k -th row of ∆( − e ij ) .
The influence of removing an edge e ij ∈ E from graph G can be estimated by:
[Equation]
Proof.
The second equality comes from Lemma 3.1, and the third equality comes from Equation (1).
Realize that removing two representations I ( − z i , − z j )
=
I ( − z i )
+ I ( − z j ) completing the proof.
Proposition 3.2 offers an approach to calculate the estimated influence of removing e ij .
In practice, having the inverse hessian matrix, a removal only requires users to compute the updated gradients ∇ ˆ θ ℓ ( z k + δ k ( − e ij ) , y k ) and its original gradients for all affected nodes in ( k +1)-hop neighbors.
3. I NFLUENCE OF N ODE R EMOVAL
We address the case of node removal.
The impact from removing a node v i from graph G to parameters’ change are two-folds: (1) The loss term ℓ ( x i , y i ) will no longer involved in ERM if v i ∈ V train .
(2) All edges link to this node { e ij } , ∀ j ∈ Γ i will be removed either.
The first aspect can be deemed as a regular training instance removal similar to an i.i.d. case, and the second aspect be can an incremental extension from edge removal in Proposition 3.2.
The representational changes from removing node v i can be expressed as: [Equation] [Equation] i
[Equation]
−
[Equation] ] X , [Equation] with A ( − v i ) jk/kj =
A jk/kj , ∀ j, k :
j ̸ = i
∧ k / ∈ Γ i , and A ( − v i )
= 0 elsewhere.
Similarly, ˜ A ( − v i ) =
A ( − v i )
+ I and ˜ D ( − v i ) is the corresponding degree matrix of ˜ A ( − v i ) .
Having ∆( − v i ) , Lemma 3.1 and Proposition 3.2, we state the estimated influence of removing v i .
Proposition 3.3.
Let δ j ( − v i ) denote the j -th row of ∆( − v i ) .
The influence of removing node v i from graph G can be estimated by:
[Equation]
where 1 is an indicator function.
Proof.
Combining Lemma 3.1 and Equation (1) completes the proof.
T HEORETICAL E RROR B OUNDS
In the above section, we show how to estimate the changes of model parameters due to edge removal: ˆ θ → ˆ θ ( − e ij ) and node removals: ˆ θ → ˆ θ ( − v i ) .
In this section, we study the error between the estimated influence given by influence functions I and the actual influence I ∗ obtained by model retraining.
We give upper error bounds on edge removal ∥I ∗ ( − e ij ) − I ( − e ij ) ∥ 2 (see Theorem 4.1) and node removal ∥I ∗ ( − v i ) − I ( − v i )
∥ 2 (see Corollary A.1).
In what follows, we shall assume the second derivative of ℓ ( · , · ) is Lipschitz continuous at θ with constant C based on the convergence theory of Newton’s method.
To simplify the notations, we use z ′ i
=
z i + δ i to denote the new representation of v i obtained after removing an edge or a node, where δ i is the row vector of ∆( − e ij ) or ∆( − v i ) depending on the context.
Theorem 4.1.
Let σ min ≥ 0 denote the smallest eigenvalue of all eigenvalues of Hessian matrices ∇ 2ˆ θ ℓ ( z i , y i ) ,
∀ v i ∈ V train of the original model ˆ θ .
Let σ ′ min ≥ 0 denote the smallest eigenvalue of all eigenvalues of Hessian matrices ∇ 2ˆ θ ( − e ij ) ℓ
( z i , y i ) , ∀ v i ∈ V train of the retrained model ˆ θ ( − e ij ) with e ij removed from graph G .
Use L denote the set { v :
z ′ ̸ = z } containing affected nodes from the edge removal, and Err ( − e ij ) =
∥I ∗ ( − e ij )
− I ( − e ij ) ∥ 2 .
Recall λ is the ℓ 2 regularization strength, we have an upper bound on the estimated error of model parameters’ change:
[Equation]
Proof sketch.
We use the one-step Newton approximation (Pregibon, 1981) as an intermediate step to derive the bound.
The first term is the difference between the actual change I ∗ ( − e ij ) and its
Newton approximation, and the second term is the difference between the Newton approximation and the estimated influence I ( − e ij ) .
Combining these two parts result the bound.
Remark 4.2.
We have the following main observations from Theorem 4.1.
(1) The estimation error of influence function is controlled by the ℓ 2 regularization strength within a factor of O (1 /λ ) .
A stronger regularization will likely produce a better approximation.
The error is controlled by the inherent property of a model.
A smoother model in terms of its hessian matrix will help lower the upper bound.
The upper bound is controlled by the norm of the changed gradient from z → z ′ .
Intuitively, if removing e ij incurs smaller changes in node representations, the approximation of the actual influence would be more accurate.
Also, a smaller Err ( − v i ) is expected if the model is less prone to changes in training samples.
(4) There are no significant correlations between the bound and the number of training nodes N .
As a special case, if σ min = σ ′ min = 0 , the bound is irrelevant to N .
We attach empirical verification for our bound in Appendix D.
Similar to Theorem 4.1, we have Corollary A.1 to derive an upper bound on ∥I ∗ ( − v i )
− I ( − v i ) ∥for removing a node v i from graph presented in Appendix A.
E XPERIMENTS
We conducted three major experiments: (1) Validate the estimation accuracy of our influence functions on graph in Section 5.2; (2) Utilize the estimated edge influence to carry out adversarial attacks and graph rectification for increasing model performance in Section 5.3; and (3) Utilize the estimated node influence to carry out adversarial attacks on GCN (Kipf & Welling, 2017) in Section 5.4.
5. S ETUP
We choose six real-world graph datasets: Cora , PubMed , CiteSeer (Sen et al., 2008), WiKiCS (Mernyei & Cangea, 2020), Amazon Computers , and Amazon Photos (Shchur et al., 2018) in our experiments.
Statistics of these datasets are outlined in Appendix B Table 4.
For the Cora ,
PubMed , and CiteSeer datasets, we used their public train/val/test splits.
For the Wiki-CS datasets, we took a random single train/val/test split provided by Mernyei & Cangea (2020).
For the Amazon datasets, we randomly selected 20 nodes from each class for training, 30 nodes from each class for validation and used the rest nodes in the test set.
All the experiments are conducted under the transductive node classification settings.
We only use the last three datasets for influence validation.
5. V ALIDATING I NFLUENCE F UNCTIONS ON G RAPHS
Validating Estimated Influence
We compared the estimated influence of removing a node/edge with its corresponding ground truth effect.
The actual influence is obtained by re-training the model after removing a node/edge and calculating the change in the total cross-entropy loss.
We also validated the estimated influence of removing node embeddings, for example, removing ℓ ( z i , y i ) of node v i from the ERM objective while keeping the embeddings of other nodes intact.
Figure shows that the estimated influence correlates highly with the actual influence (Spearman correlation coefficients range from 0.847 to 0.981).
More results are included in Figure 4 in the appendix.
Visualization Figure 1 visualizes the estimated influence of edge and node removals on the validation loss for the Cora dataset.
This visualization hints at opportunities for improving the test performance of a model or attacking a model by removing nodes/edges with noticeable influences (see experiments in Sections 5.3 and 5.4)
[Table]
5. A PPLICATIONS OF THE E STIMATED E DGE I NFLUENCE
The estimated influence of edge removals on the validation set can be utilized to improve the test performance of SGC or carry out adversarial attacks on SGC/GCN.
[Table]
Graph Rectification via Edge Removals We begin by investigating the impact of edges with negative influences.
Based on our influence analysis, removing negative influence edges from the original will decrease validation loss.
Thus the classification accuracy on the test set is expected to increase correspondingly.
We sort the edges by their estimated influences in descending order, then cumulatively remove edges starting from the one with the lowest negative influence.
We train the SGC model, fine-tune it on the public split validation set and select the number of negative influence edges to be removed by validation accuracy.
For a fair comparison, we fix the test set remaining unchanged regarding the removal of the edges.
The results are derived based on Figure 8 and displayed in
Table 1, where we also report the performance of several classical and state-of-the-art GNN models on the original whole set as references, including GCN (Kipf & Welling, 2017), GAT (Veliˇckovi´c et al., 2018), FGCN (Chen et al., 2018), GIN (Xu et al., 2019b), DGI (Velickovic et al., 2019) with a nonlinear activation function and SGC (Wu et al., 2019).
We demonstrate that our proposed method can marginally improve the accuracy of SGC from the data perspective and without any change to the original model structure of SGC, which validates
[Table]
the impacts of edges with negative influences.
In addition, the performance of the SGC model with eliminating the negative influence edges can outperform other GNN-based methods in most cases.
Attacking SGC via Edge Removals We investigated how to use edge removals to deteriorate
SGC performance.
Based on the influence analysis, removing an edge with a positive estimated influence can increase the model loss and decrease the model performance on the validation set.
Thus, our attack is carried out in the following way.
We first calculated the estimated influence of all edges and cumulatively removed edges with the highest positive influence one at a time.
Every time we remove a new edge, we retrain the model to obtain the current model performance.
We remove 100 edges in total for each experiment.
[Table]
We present our results in Figure 3.
Apparently, in general, the accuracy of SGC on node classification drops significantly.
We notice the influence of edges is approximately power-law distributed, where only a small proportion of edges has a relatively significant influence.
The performance worsens with increasingly cumulative edge removals on both validation and test sets.
The empirical results verify our expectations of edges with a positive estimated influence.
Attacking GCN via Surrogate SGC We further explored the impact of removing positive influences edges under adversarial grey-box attack settings.
Here, we followed Z ¨ ugner & G ¨ unnemann (2019) to interpret SGC as a surrogate model for attacking the GCN (Kipf & Welling, 2017) as a victim model, where the assumption lays under that the increase of loss on SGC can implicitly drop the performance of GCN.
We eliminated positive influence edges at different rates 1% , 3% , 5% among all edges.
The drop in accuracy was compared against DICE (Z¨ugner et al., 2018), GraphPoison (Bojchevski & G¨unnemann, 2019), MetaAttack (Z¨ugner et al., 2018).
For a fair comparison, we restrict the compared method can only perturb graph structures via edge removals.
Our results are presented in Table 2.
Our attack strategy achieves the best performance in all the scenarios of edge eliminations, especially on Pubmed with 1% edge elimination rate.
Our attack model outperforms others by over 10% in accuracy drop.
Since we directly estimate the impact of edges on the model parameter change, our attack strategy is more effective in seeking the most vulnerable edges to the victim model.
These indicate that our proposed influence on edges can guide the construction of grey-box adversarial attacks on graph structures.
5. I NFLUENCE OF N ODE R EMOVAL
Attacking GCN via Node Removals In this section, we study the impact of training nodes with a positive influence on transductive node classification tasks.
Again, we assume that eliminating the positive influence nodes derived from SGC may implicitly harm the GCN model.
We sort the nodes by our estimated influence in descending order and cumulatively remove the nodes from the training set.
We built two baseline methods, Random and Degree, to compare the accuracy drop in different node removal ratios: 5% , 10% , 15% .
For the Random baseline, we randomly remove the nodes from the training sets.
For Degree baseline, we remove nodes by their degree in descending order.
According to Table Table 3, the model performance on GCN drops by a large margin in all three citation network datasets as the selected positive influence node is removed, especially on the Cora dataset.
The model outperforms the baseline over 20% on 15% removing ratio.
These results indicate that our estimation of node influence can be used to guide the adversarial attack on GCN in the settings of node removal.
R ELATED W ORKS
Influence Functions
Recently, more efforts have been dedicated to investigating influence functions (Koh et al., 2019; Giordano et al., 2019; Ting & Brochu, 2018) in various applications, such as,computer vision (Koh & Liang, 2017), natural language processing (Han et al., 2020), tabular data (Wang et al., 2020b), causal inference (Alaa & Van Der Schaar, 2019), data poisoning attack (Fang et al., 2020; Wang et al., 2020a), and algorithmic fairness (Li & Liu, 2022).
In this work, we propose a major extension of influence functions to graph-structured data and systemically study how we can estimate the influence of nodes and edges in terms of different editing operations on graphs.
We believe our work complements the big picture of influence functions in machine learning applications.
Understanding Graph Data Besides influence functions, there are many other approaches to exploring the underlying patterns in graph data and its elements.
Explanation models for graphs (Ying et al., 2019; Huang et al., 2022; Yuan et al., 2021; Bajaj et al., 2021; Abrate & Bonchi, 2021) provide an accessible relationship between the model’s predictions and corresponding elements in graphs or subgraphs.
They show how the graph’s local structure or node features impact the decisions from
GNNs.
As a major difference, these approaches tackle model inference with fixed parameters, while we focus on a counterfactual effect and investigate the contributions from the presence of nodes and edges in training data to decisions of GNN models in the inference stage.
Adversarial Attacks on Graph The adversarial attack on an attributed graph is usually conducted by adding perturbations on the graphic structure or node features (Z¨ugner & G¨unnemann, 2019;
Zheng et al., 2021).
In addition, Zhang et al.
(2020) introduces an adversarial attack setting by flipping a small fraction of node labels in the training set that causes a significant drop in model performance.
A majority of the attacker models (Z ¨ ugner et al., 2018; Xu et al., 2019a) on graph structure are constructed based on the gradient information on both edges and node features and achieved costly but effective attacking results.
These attacker models rely mainly on greedy-based methods to find the graph structure’s optimal perturbations.
We only focus on the perturbations resulting from eliminating edges and directly estimate the change of loss in response to the removal effect guided by the proposed influence-based approach.
C ONCLUSIONS
We have developed a novel influence analysis to understand the effects of graph elements on the parameter changes of GCNs without needing to retrain the GCNs.
We chose Simple Graph Convolution due to its convexity and its competitive performance to non-linear GNNs on a variety of tasks.
Our influence functions can be used to approximate the changes in model parameters caused by edge or node removals from an attributed graph.
Moreover, we provided theoretical bounds on the estimation error of the edge and node influence on model parameters.
We experimentally validated the accuracy and effectiveness of our influence functions by comparing its estimation with the actual influence obtained by model retraining.
We showed in our experiments that our influence functions could be used to reliably identify edge and node with negative and positive influences on model performance.
Finally, we demonstrated that our influence function could be applied to graph rectification and model attacks.
A CKNOWLEDGEMENT
We would like to thank the three anonymous reviewers for their constructive questions and invaluable suggestions.
This work is partially supported by NSF MDR 1933525 and NSF OAC 1920147.
Any opinions or conclusions in this paper are those of the authors and do not reflect the views of the funding agencies
B D ATASET S TATISTICS
We present the data statistic on our experiments below.
We choose only small and medium-sized data.
Because, each time we validate the influence of the elements in a graph, we need to retrain the model.
[Table]
C V ALIDATING I NFLUENCE OF ELEMENTS : EXTRA DATASETS
For the Wiki-CS dataset, we randomly select one of the train/val/test split as described in Mernyei &
Cangea (2020) to explore the effect of training nodes/edges influence.
For the Amazon Computers and Amazon Photo dataset, we follow the implementation of Shchur et al.
To set random splits, On each dataset, we use 20 ∗ C nodes as training set, 30 ∗ C nodes as validating set and the rest nodes as testing set, where C is the number of classes..
Because for validating every edge’s influence, we need to retrain the model and compare the change on loss, the computation cost is exceptionally high.
We randomly choose 10000 edges of each datasets and validate their influence.
We observe that even for medium-size datasets, our estimated influence is of high correlation to the actual influence.
D E MPIRICAL V ERIFICATION OF T HEOREM 4.
As the value of l 2 regularization term decreases, the accuracy of our estimation of the influence of edges drops, and the Spearman correlation coefficient decrease correspondingly.
This trend is consistent with the interpretations of the error bound on Theorem 4.1 that the estimation error of an influence function is inversely related with the l 2 regularization term.
We also notice that the edges that connects high-degree nodes have overall less influence.
Their estimation points lies relatively close to the y = x line and thus could have relative small estimation error.
E G ROUP EFFECT OF REMOVING MULTIPLE EDGES
We study the group effect of influence estimation on removing multiple edges.
On dataset Cora , we randomly sample k edges from the attributed graph, where k ’s values were chosen increasingly as 2 , 10 , 50 , 100 , 200 , 350 .
Every time, we remove k edges simultaneously and validate their estimated influence.
We observe: though with high correlation, our influence plots tend to move downward as more edges are removed at the same time.
In this case, our method tends to be less accurate and underestimates the influence of a simultaneously removed group of edges.
F V ALIDATING INFLUENCE FOR ARTIFICIALLY ADDED EDGES
In this section, we validate our influence estimation for artificially added edges on dataset Cora ,
Pubmed and Citeseer .
On each dataset we randomly select 10000 unconnected node pairs, add an artificial edge between them and validate its influence estimation.
Figure 7 shows that the estimated influence correlates highly with the actual influence.
This demonstrates that our proposed method can successfully evaluate the influence of artificially added edges.
G S TUDY OF EDGES WITH NEGATIVE INFLUENCE
Here we demonstrate the performance via cumulatively removing edges with negative influence in
Figure 8.
The detailed implementation has been discussed in Section 5.3.
Due to that the inaccurate influence estimation with more edges removed, we consider a maximum of 50 edges to be removed for each dataset.
We observe an overall increase in model performance as we cumulatively remove edges predicted as a negative influence.
This again demonstrates the usefulness of our influence estimation on edges.
H E XTEND INFLUENCE METHOD TO OTHER GNN MODELS
Theoretically, our current pipeline can be extended to other nonlinear GNNs under some violation of assumption.
According to Propositions Proposition 3.2 and Proposition 3.3, we require the existence of the inverse of the Hessian matrix, which is based on the assumption that the loss function on model parameters is strictly convex.
Under the context of some GNN models with nonlinear activation functions, we can use the pseudo-inverse of the hessian matrix instead.
(2) For non-convex loss functions of most GNN, our proposed error bound in Theorem Theorem 4.1 does not hold unless a large regularization term is applied to make the hessian matrix positive definite.
From the implementation purpose, (1) From the implementation perspective, the non-linear models usually have more parameters than the linear ones, which require more space to store the Hessian matrix.
Accordingly, the calculation of the inverse of the Hessian matrix might be out of memory.
It needs to reformulate the gradient calculation and apply optimization methods like Conjugate gradient for approximation.
(2) Our current pipeline is constructed based on mathematical, hands-on derived gradients adopted from Koh et al.
Existing packages like PyTorch use automatic differentiation to get the gradients on model parameters.
It could be inaccurate for second-order gradients calculation.
Extending the current pipeline to other GNNs may require extensive first and second-order gradient formulations.
We will explore more GNN influence in the future.
I R UNNING TIME COMPARISON
We present the running time comparison between calculating the edge influence via the influencebased method and retrieving the actual edge influence via retraining.
We conduct our experiment on dataset Cora , Pubmed , and Citeseer .
We demonstrate our method is 15-25 faster than the retrained method.
Notably, for tasks like improving model performance or carrying out adversarial attacks via edge removal, it could save a considerable amount of time in finding the edge to be removed with the lowest/largest influence.
[Table]