Abstract
Hypergraph Neural Networks (HGNNs) have been significantly successful in higher-order tasks. However, recent study have shown that they are also vulnerable to adversarial attacks like Graph Neural Networks. Attackers fool HGNNs by modifying node links in hypergraphs. Existing adversarial attacks on HGNNs only consider feasibility in the targeted attack, and there is no discussion on the untargeted attack with higher practicality. To close this gap, we propose a derivative graph-based hypergraph attack, namely DGHSA, which focuses on reducing the global performance of HGNNs. Specifically, DGHSA consists of two models: candidate set generation and evaluation. The gradients of the incidence matrix are obtained by training HGNNs, and then the candidate set is obtained by modifying the hypergraph structure with the gradient rules. In the candidate set evaluation module, DGHSA uses the derivative graph metric to assess the impact of attacks on the similarity of candidate hypergraphs, and finally selects the candidate hypergraph with the worst node similarity as the optimal perturbation hypergraph. We have conducted extensive experiments on four commonly used datasets, and the results show that DGHSA can significantly degrade the performance of HGNNs on node classification tasks.
Similar content being viewed by others
Introduction
Graphs can represent the relationships between real world factors and play an important role in many fields1,2. Graph Neural Networks (GNNs) have shown outstanding performance in citation network3, social networks4, and recommendation systems5. However, graphs cannot describe the relationships between elements for some higher-order complex systems6, which makes GNNs inefficient in learning system’s higher-order information. Therefore, researchers have proposed a method that can describe higher-order relationships, i.e., the hypergraph7. Numerous works have shown that the hypergraph is more advantageous than the common graph in modeling complex relationships. Specifically, the graph represent only binary relationships, i.e., each edge connects two nodes. Hypergraphs are able to represent multivariate relationships, allowing a single hyperedge to connect multiple nodes, which enables hypergraphs to more naturally model complex relationships in the real world, such as groups in social networks8 and multiple user-item interactions in item recommendation systems9. For example, in a collaborative network of scientists, where nodes represent scientists, a graph can only represent a collaborative relationship between two scientists and cannot represent a relationship between multiple scientists. In hypergraphs, the relationships of multiple collaborators in a paper can be represented using hyperedges (edges in a hypergraph are called hyperedges), i.e., a paper that is a collaboration of K scientists can be represented by a hypergraph containing K nodes. In addition, the topology of hypergraphs is more flexible and can accommodate complex data relationships and hierarchical structures. For datasets with multi-level or multi-dimensional relationships (e.g., biological networks10, knowledge graphs11, etc.), hypergraphs can better capture these complex relationships.
In recent years, Hypergraph Neural Networks(HGNNs) based on the hypergraph have also emerged12,13. HGNNs have achieved remarkable results in node classification14, graph classification and link prediction tasks, in addition to satisfactory results in computer vision15, biology16 and chemistry17.
In addition to traditional deep models that are easy to fail under attacks18,19,20,21, deep models based on graph are also fragile22,23. For example, in a fraud detection system, a fraudulent user can escape system detection by adding connections to other high-credit users, which can lead to serious consequences. Therefore, researchers have proposed many graph adversarial attacks to study the robustness of GNNs24,25. Graph adversarial attacks can be classified into targeted and untargeted attacks based on the goal of the attack26. In the targeted attack, the attacker focuses on the classification of some test nodes27. The attack misclassifies the target nodes into the specified label indicating the success of the attack. In the untargeted attack, the attacker usually focuses on global test nodes classification and the attack succeeds when the test nodes are misclassified28. In the untargeted attack, the attacker does not need to know the target label in advance and can categorize to any wrong label, which makes the attack more flexible and adaptable. Targeted attacks are aimed at a specific label, which are more stringent and require more attack resources. In addition, the untargeted attack make it more difficult for the model to establish detection and defense mechanisms against the attack, thus increasing the likelihood of a successful attack. The targeted attack makes the attack tend to operate on users with higher privileges, which can be easily detected by the defense model. Therefore, the untargeted attack are more practical in real attacks and have attracted the attention of many researchers.
Almost all of the research on graph adversarial attacks has focused on GNNs and less on HGNNs. Hu et al.29 demonstrated that HGNNs are also vulnerable to adversarial attacks. Specifically, they proposed the first attack model for HGNNs( HyperAttack), which uses gradients to modify node links to achieve the attack. However, HyperAttack is set as the target attack. From the above introduction, we know that the target attack has many limitations and is difficult to apply to real attacks. In this paper, our aim is to try to minimize the research gap in adversarial attacks on HGNNs.
The results of GNNs adversarial attacks show that the attacks make the similarity between nodes decrease by adding/deleting malicious links. Inspired by this, we propose a Derivative Graph-based Hypergraph Structure Attack(DGHSA). In graphs, the cosine or Jaccard is usually used to measure node similarity30,31. Derivative graph is utilized to analyze and quantify the similarity of nodes in hypergraphs, which is applied in the study of language networks based on hypergraph modeling32. The smaller the value of the derivative graph indicates that the nodes are more similar in the hypergraph. Thus, DGHSA uses the derivative graph to select the optimal perturbation. Specifically, DGHSA consists of two modules: candidate set generation and evaluation. DGHSA first calculates the training gradients of HGNNs and generates candidate sets by modifying the hypergraph structure according to the gradient rules. Subsequently, DGHSA calculates the derivative graph values of each candidate set. Our aim is to maximize the similarity of the nodes. In other words, DGHAS selects the candidate with the largest derivative graph value as the current optimal perturbation hypergraph. DGHSA can be used to cause harm in many real-world application scenarios, for example, citation networks, transportation networks, and bioinformatics. Taking bioinformatics as an example, HGNNs can be used for gene association analysis discovery by modeling complex relationships between genes to infer potential genetic causes of disease. DGHSA alters the correlation data between certain genes and generates some noisy data, leading to erroneous disease associations in disease prediction models and affecting clinical decisions and treatment options. Studying untargeted attacks on HGNNs can help us gain a deeper understanding of the vulnerabilities and security risks of HGNNs. By analyzing how attackers can corrupt the performance of models without specific targets, potential weaknesses in the structure and learning mechanisms of HGNNs can be revealed.
Finally, we summarize our contributions as follows:
-
We propose the untargeted attack against HGNNs, namely DGHSA. DGHSA implements the attack by modifying the hypergraph structure.
-
DGHSA uses the derivative graph metric to select the optimal perturbation hypergraph, which has never been used in previous work on graph adversarial attacks.
-
A number of experiments have demonstrated the effectiveness of DGHSA.
The rest of this work is organized as follows. In Section Related work, we first review the work related to the hypergraph learning and graph adversarial attack. In Section Preliminary, we introduce some fundamentals of the HGNNs and untargeted attack. In Section Attack model, we introduce DGHAS in detail, including candidate set generation and evaluation. Section Experiments presents the experimental dataset, parameters and experimental results. We conclude our work in Section Conclusion. In Appendix Examples of derivative graph, we demonstrate that the derivative graph is applicable in hypergraph attacks.
Related work
Hypergraph learning
Influenced by the advantages of GNNs, researchers started to focus on how to extend GNNs to hypergraphs and proposed many hypergraph-based neural networks. Feng et al.12 proposed the earliest hypergraph neural network(HGNN) by extending GNNs spectral methods to hypergraphs. Yadati et al.13 proposed a model based on hypergraph spectral theory(HyperGCN), which addresses semi-supervised problems on hypergraphs. Ding et al.33 proposed HyperGAT, which captures higher-order action relations between objects. HyperGAT shows efficient learning ability on a hypergraph-based text classification task. Huang et al.34 proposed MultiHGNN, a multigraph neural network, which showed excellent results on multimodal feature datasets. Sun et al.35 proposed HWNN using polynomial approximation wavelet transform instead of Fourier transform, which has lower running time than traditional HGNNs and is applied to heterogeneous hypergraph. The literature36 proposed a hypergraph convolutional network(HNGN) incorporating nonlinear activation function and normalization operation, which consists of four stages including normalized node, updated hyperedge, normalized hyperedge and updated node. The literature37 proposed a hypergraph line graph based convolutional neural network(LHCN), which maps the hypergraph into a line graph, and then uses graph convolution operations in the line graph to implement downstream tasks. The literature38 proposed a hypergraph attention homogeneous network(HAIN), which generates line graphs in an implicit way to solve the problem of high computational cost when LHCN converts hypergraphs to line graphs. Yu et al.39 proposed a multichannel hypergraph convolutional network(MHCN) for social recommendation systems, which uses multiple higher-order user relationships in a multichannel setting to improve the performance of the model in social recommendation tasks. Li et al.14 proposed an end-to-end hypergraph transformation neural network(HGTN), which uses attention mechanisms to find important semantic information in the hypergraph.
Graph adversarial attack
With the interest in the security of GNNs, graph adversarial attacks continue to make new works. Nettack is the first work to study graph adversarial attacks on attribute graphs, which iteratively generates adversarial samples based on GCN gradients with greedy strategies22. Sun et al.40 introduced projected gradient descent(PGD) to graph adversarial attack to the unsupervised node embedding algorithm for the poisoning attack and proved the effectiveness of the attack in a downstream link prediction task. The literature41 proposed a meta-learning attack(Mettack), which implements the attack by training the original graph structure as hyperparameters. Dai et al.42 proposed an adaptive trigger-based backdoor attack with a strict perturbation budget limit to ensure the invisibility of the attack. In addition, Chen et al.43 proposed a feature-based trigger backdoor attack(NFTA) which achieves an effective attack without the knowledge of GNNs. Wang et al.44 proposed an attack using node attributes based on certification robustness, which attacks nodes with large certification perturbations. The results showed that the larger the certification perturbation of a node, the more important that node is for maintaining graph robustness. Li et al.45 proposed an attribute obfuscation attack (AttrOBF) for social networks, which misleads GNNs for misclassification by fuzzy optimal training of user attribute values. The literature25 proposed a method to maximize the spectral distance to achieve the attack(SPAC), which uses an efficient approximation to reduce the time complexity of feature decomposition. Ju et al.46 proposed a black-box attack method using a reinforcement learning framework, where the attacker is not using a surrogate model to query model parameters or training labels to achieve advanced performance. The literature28 proposed a fake node injection attack(NICKI), which learns the node representation and then generates fake node features and edges to achieve misclassification of target nodes into different labels. The literature27 degrades GNNs performance by injecting adversarial links between nodes with different labels.
Preliminary
For convenience, Table 1 gives the frequently used notations.
Hypergraph neural network
Given a hypergraph \(G = (V,E,W)\), where \(V = \{ {v_1},{v_2},...{v_{|V|}}\}\) represents the set of nodes, \(E = \{ {e_1},{e_2},...,{e_{|E|}}\}\) denotes the set of hyperedges, and W is the weight matrix of hyperedges. The incidence matrix H denotes the adjacency of the hypergraph, where the rows denote the nodes and the columns denote the hyperedges. If the hyperedge e contains node v can be denoted as \(H(v,e) = 1\), otherwise \(H(v,e) = 0\).
Our work uses HGNNs to predict the labels of nodes. The core of HGNNs is a message passing mechanism in which each node gets a representation in a rich potential space by aggregating information from its neighbors. The general formulation of this representation learning mechanism takes the following recursive formulation12.
where \(X^{(l)}\) represents the signal of the hypergraph at l-th layer, \(\sigma (\cdot )\) denotes the nonlinear activation function, W is the weight of the hyperedges, \(D_e\) is the diagonal matrix representing the hyperedge degree (hyperedge degree is the number of nodes contained in the hyperedges), \(D_v\) is the diagonal matrix representing the node degree (node degree is the number of hyperedges containing nodes), and \(\Theta ^{(l)}\) denotes the training parameters at l-th layer.
The two-layer hypergraph convolutional network can be represented as:
where \(\widehat{H} = D_v^{ - \frac{1}{2}}HWD_e^{ - 1}{H^T}D_v^{ - \frac{1}{2}}\), \(\Theta ^{(1)}\) and \(\Theta ^{(2)}\) are denoted as the training parameters of the first and second layers, respectively. The optimal classifier \({f_{{\Theta ^*}}}( \cdot )\) is obtained for the semi-supervised problem by minimizing the cross-entropy loss of all labeled nodes:
where \({V_L}\) denotes the set of labeled nodes, i.e., the training set. \({Y_v}\) represents the true label of node v. \({Z_{v,{Y_v}}}\) denotes the probability that node v is predicted as \({Y_v}\).
Problem definition
The attacker achieves the attack by adding/deleting malicious link perturbations to the original hypergraph to maximize the loss of node predicted labels and true labels. The above process can be described as
where \({V_T}\) represents the node test set, \({\Theta ^*} = \{ {\Theta ^1},{\Theta ^2}\}\) represents the optimal training parameters, \(H^{\prime }\) and represents the perturbation hypergraph. Note that we only modify the node adjacency, rather than the node features. The attack needs to ensure not only the feasibility of the attack, but also the invisibility, so we use a budget \(\Delta\) to limit the attacker’s attack bound.
Targeted attack and untargeted attack
In graph adversarial attacks, targeted and untargeted attacks are two different types of attacks that have different goals and forms of expression. The following is a detailed explanation of these two attacks and a comparison of their expressions.
The targeted attack typically uses a loss function that causes the model to output a specific target label on the adversarial sample, which can be formally represented as follows:
where \(\mathbb {I}(x)\) is the indicator function. If x is true, \(\mathbb {I}(x)\) returns 1, otherwise \(\mathbb {I}(x)\) returns 0. \(Y_v\) is the predicted label and \(C_{tar}\) is the label specified by the attacker. \(V_S\) is a set of partial nodes in the test set.
The purpose of an untargeted attack is to cause the input samples to be misclassified into any label without specifying the target label. The attacker simply ensures that the output of the model is not the correct label. The training objective of the untargeted attack can be expressed as:
where C is the true label of nodes.
Attack model
In this section, we describe the DGHSA building blocks in detail, and the overall framework of DGHSA is illustrated in Fig. 1. Overall, DGHSA contains two main components, the candidate set generation and the evaluation candidate set modules. To obtain the optimal candidate set at t iterations, we first train using HGNNs to obtain the gradient matrix of the incidence matrix H, and then use different strategies to add or remove links to obtain the candidate sets, as shown in Fig. 1a–c. How does an attacker select the candidate sets to achieve an effective attack? To solve this question, we introduce the derivative graph to help the attacker make a decision. The derivative graph can measure the similarity between nodes and is often used in the classification task. Smaller derivative graph values indicate more similar nodes in the hyperedges. We calculate the derivative graph value of each candidate hypergraph and select the candidate hypergraph with the largest derivative value as the perturbed hypergraph at moment t, as shown in Fig. 1d and e.
Candidate set generation
Traditional gradient attacks tend to fall into local optima and thus do not get the best perturbation. The aim of DGHSA is to generate multiple candidate sets and select the best perturbation from them to improve the efficiency of the attack. In this section, our aim is to generate a candidate set \({C^{(t)}} = \{ H_1^{(t)},H_2^{(t)},\ldots ,H_n^{(t)}\}\) containing n hypergraphs, where t represents the t-th iteration and \(H_i^{(t)}\) represents the i-th candidate. Please note that DGHSA only attacks the hypergraph structure without any modification to the features, so the feature information is the same in each candidate set.
To obtain the gradient information of the incidence matrix H, DGHSA is first trained with HGNNs. Then, calculating the derivative of the training loss with respect to the incidence matrix H obtains the gradient matrix:
The gradient reflects the sensitivity of the model to changes in the inputs, and attacking entity with larger absolute values of the gradient causes a larger impact, thus enabling better attacks. DGHSA utilizes this rule to sort \({|g^{{H^{(t)}}}|}\) from largest to smallest, and select the node with the largest gradient. Modify the node link according to the graph gradient algorithm experience.
Entity (i, j) is added to the candidate set \({C^{(t)}}\) if it satisfies Eq. (8). The above process is repeated until the end of \(||{C^{(t)}}|| = n\). Note that the added candidate set is not repeated and the entity (i, j) is modified at most once. In addition, the advantage of building the candidate set is that it can avoid the gradient attack to be trapped in the optimal value situation.
Candidate set evaluation
Graph attack studies show that attacks tend to remove links between nodes with high similarity or add links between nodes with large similarity differences. Inspired by this, we use the derivative graph to evaluate candidate sets. The derivative graph is a measure of node similarity within a hyperedge. It considers node dissimilarity and can represent node similarity and difference in the hypergraph. The definition of the derivative graph \(D \in {\mathbb {R}^{N \times N}}\) is as follows:
The smaller \({D_{i,j}}\) means that node i and node j are more similar. Node i and node j never appear together in a hyperedge, we set \({D_{i,j}} = 0\). In addition, the diagonal values of D are set to 0.
In Eq. (9), \(F \in {\mathbb {R}^{N \times N}}\) represents the frequency matrix of the hypergraph, which is defined as:
The diagonal elements of the frequency matrix F are the hyperdegrees of node i. The remaining elements are the number of nodes i and j that are on the same hyperedge at the same time.
In the Appendix Examples of derivative graph, we use simple examples to demonstrate that the derivative graph can be effectively applied in our attacks. The purpose of DGHSA is to modify the node links so that the derivative graph value of the hypergraph increases, i.e., the worse the similarity of the nodes within the hyperedges. The derivative value of each candidate hypergraph is calculated.
The larger \(DH_k^{(t)}\) indicates that modifying the links can make the similarity difference between the nodes before increasing, the more advantageous to the attack.
Finally, we obtain the optimal perturbation map by filtering the candidate set \({C^{(t)}}\).
Algorithm and time complexity
Algorithm 1 summarizes the specific attack process of DGHSA.
We analyzed the time complexity of DGHSA. First, HGNNs are used as pre-trained models with time complexity \(\mathscr {O}({T_{pre}}||H|| \cdot ||X||)\), where \({T_{pre}}\) is the number of HGNNs pre-trained. DGHSA contains two modules for generating and evaluating candidate sets. In the module of generating candidate sets, the time complexity of computing the loss function of the incidence matrix is the same as the time complexity of training HGNNs, i.e., \(\mathscr {O}({T_{pre}}||H|| \cdot ||X||)\). The time complexity for filtering the generated candidate sets is very low, and we ignore it here. Therefore, the above module time complexity is \(\mathscr {O}(T \cdot {T_{pre}}||H|| \cdot ||X||)\), where T is the number of attack iterations. When evaluating the candidate set, both the time consumption of the computation frequency and the derivative graph matrix are \(\mathscr {O}(|V|\log |V|)\) . The other operations (e.g., sorting the derivative graph values) have low complexity and are neglected. Therefore, the candidate set evaluation module time complexity is \(\mathscr {O}(T \cdot |V|\log |V|)\). The final time complexity of DGHSA can be expressed as \(\mathscr {O}(T({T_{pre}}||H|| \cdot ||X|| + |V|\log |V|)).\)
Experiments
Datasets
Four common datasets ( Cora-ML, ACM, Citeseer and NTU) are used in our experiments, which are often used to evaluate the performance of HGNNs. These four types of datasets have different network characteristics, where the ACM and Citeseer datasets are featured discretely, and Cora-ML and NTU are datasets with continuous features. In addition, we validate the effectiveness of DGHSA from node classification and visual object classification tasks, respectively. Cora-ML and Citeseer are citation networks, where nodes represent papers and hyperedges represent citation relationships among papers. ACM is a collaboration network, where nodes represent papers and hyperedges represent the collaboration relationships of papers. NTU is a visual object classified dataset where the features represent the shape of the object. The statistics of these four datasets are in Table 2. It is worth noting that we use only the node features and labels. The adjacency relations between nodes are generated using some common methods, which will be described in detail in later sections.
Baselines
Currently, there are few works on HGNNs adversarial attacks and the number of comparable models is less. The literature29 is the most relevant work to this paper. Equations (5) and (6) show that targeted and untargeted attack optimization goals are different. In addition, the code from literature29 is unpublished and more difficult to reproduce, so we cannot extend it to untargeted attacks. We have selected several representative models. Their details are described below.
Random: Random is a simple attack method that randomly modifies the adjacency of the nodes. In many works, Random is often used as a comparison model.
HyperDegree: Common GNNs adversarial attacks have shown that nodes with larger degrees of attack can degrade the performance of GNNs. Extending to hypergraphs, HyperDegree is a method to attack nodes with larger hyperdegree.
Fast gradient attack (FGA): FGA extracts the adjacency gradient in HGNNS training, and then modifies the link with the largest absolute gradient to update the perturbation hypergraph.
Victim model
In the experiments of this paper, we use two HGNNs models as victim models, HGNN-KNN and HGNN-\(\varepsilon\)47. They are both distance-based HGNNs, which are described in detail as follows.
HGNN-KNN: HGNN-KNN first finds the nodes of K nearest neighbors in the feature space and then generates a hyperedge to connect these nodes. The hyperedges contain nodes that are uniformly all K.
HGNN-\(\varepsilon\): HGNN-\(\varepsilon\) connects the nearest neighbor nodes within the range \(\varepsilon\) in the feature space using a hyperedge. The number of nodes within the hyperedge is not uniform.
Parameters and metrics
Parameters. The parameters related to HGNNs are set as follows: HGNN-KNN nearest neighbor parameter K is set to 10, HGNN-\(\varepsilon\) range parameter \(\varepsilon\) is set to 0.5. The number of layers is set to 2, the hidden layer unit is 64. The number of training times is set to 300, and the learning rate of Adam optimizer is \({10^{ - 3}}\). The datasets are set in the ratio of 0.2 and 0.8 for the training and test sets. The budget \(\Delta = \lambda N\), \(\lambda\) set by default to 0.05. The candidate set size n is set to 5.
Metrics. For a comprehensive evaluation of DGHSA, we use the classification success rate and the derivative graph ratio to measure the attack effectiveness. It is worth noting that the derivative graph ratio is proposed by us for the first time to evaluate the attack performance.
Classification Success Rate(CSR): CSR indicates the classification accuracy of HGNNs in the test set, and a lower rate indicates a better attack effectiveness.
Derivative Graph Ratio(DGR): The derivative graph reflects the similarity of the nodes in the hypergraph. DGR is defined as the perturbed hypergraph derivative graph value over the clean hypergraph derivative graph value, which can be described by a mathematical expression as:
\(DH^{\prime }\) is the perturbed hypergraph derivative graph value. Larger DGR indicates less similarity of nodes, i.e., better attack performance.
Main experiment
In this section, we validate the effectiveness of DGHSA, and the results are shown in Table 3. We observe that all attack achieve well performance on all datasets, which indicates that attacking the structure of the hypergraph can effectively reduce the accuracy of HGNNs.
Attack effectiveness. We analyze the performance of DGHSA in terms of CSR and DGR, respectively. CSR: Table 3 shows the node classification accuracies of various models with different datasets. When the victim model is taken as HGNN-KNN, the best attack performance is achieved by DGHSA in Citeseer. Specifically, the CSR of Random, HyperDegree, and FGA, DGHSA are 63.60\(\%\), 63.12\(\%\), 61.67\(\%\) and 58.10\(\%\), respectively. The lower CSR indicates the better attack performance. The CSR decrease indicates that the performance of HGNNs depends on the structural information of the graph. The attacker changes the topology of the hypergraph by modifying the entity relationships, which affects the information propagation and feature learning process. The same results in other datasets, DGHSA shows better performance in reducing the CSR of HGNNs. DGR: It is observed from Table 3 that each attack is able to raise the derivative graph value. The derivative graph value can reflect the similarity of nodes within the hypergraph, and a higher DGR indicates a poorer similarity of nodes, i.e., a greater damage caused by the attack. Since the original hypergraph derivative graph value is large, we keep 4 decimal places when counting the derivative graph value of the hypergraph. When the victim model is HGNN-KNN, DGHSA has the highest derivative graph ratio after the attack, which is 0.0339, 0.0317 and 0.0076 higher than the DGR of Random, HyperDegree, and FGA in NTU, respectively. This indicates that DGHSA causes higher damage relative to other attacks with the same budget, i.e., the attack is more effective. In addition, the above results indicate that attacks usually lead to a decrease in node similarity, which is the same as the conclusion obtained in GNNs adversarial attacks. Finally, the small change of DGR indicates that the hypergraph still maintains its original structural characteristics after the attack, which at the same time reflects the invisibility of the attack.
Attack transferability. We used two HGNNs models to verify the transferability of DGHSA. The results demonstrate that DGHSA achieves optimal attacks under both victim models, which indicates that DGHSA has better transferability. In the ACM dataset, the DGHSA reduces the classification accuracy of HGNN-KNN and HGNN-\(\varepsilon\) 3.50\(\%\) and 3.38\(\%\), and improves graph derivative values by 0.0815 and 0.0820 respectively, which achieves excellent results in all the compared models. Intuitively, both HGNN-KNN and HGNN-\(\varepsilon\) utilize similar information propagation mechanisms that share commonalities in dealing with node features and hypergraph structures, and the same attack methods can effectively interfere with information propagation, thus affect the performance of multiple HGNNs.
Impact of budget on attack performance
Since the DGR changes are not as obvious as the CSR, we use the CSR to verify the performance of the DGHSA in this and later sections. In this section, we investigate the performance of various attacks with different budgets. Figure 2 shows CSR of HGNNs for budget factors \(\lambda\) of 0.04–0.09.
In all cases, our proposed model achieves the best performance, i.e., HGNNs have the lowest CSR after being attacked by DGHSA. For example, Fig. 2d shows that the classification accuracy of Random, HyperDegree, FGA and DGHSA are \(\{\)74.81\(\%\), 73.01\(\%\) \(\}\), \(\{\)74.12\(\%\), 72.02\(\%\) \(\}\), \(\{\)72.15\(\%\), 69.20\(\%\) \(\}\) and \(\{\)71.05\(\%\), 67.14\(\%\) \(\}\) when the budget factor \(\lambda\) are \(\{\)0.04, 0.09\(\}\), respectively. As the budget factor \(\lambda\) increases, the attacker can make modifications to more nodes or edges. This means that the attacker can implement more sophisticated strategies, such as destroying multiple key nodes or edges at the same time, thus significantly affecting the propagation and aggregation process of information. Since the effects of an attack tend to be cumulative, multiple small structural modifications may act in conjunction, leading to a significant performance degradation of HGNNs in classification tasks. In addition, the topological attribute attack (HyperDegree) can reduce the accuracy of HGNNs, but its attack performance is limited only to be better than the Random attack. Therefore, this attack is difficult to be applied in practical attacks.
Impact of HGNNs parameters on DGHSA performance
In this section, we investigate the effect of HGNNs parameters K and \(\varepsilon\) on DGHSA performance as follows.
Figure 3 shows the CSR of HGNN-KNN with different parameters K. We observe that DGHSA effectively reduces the accuracy of HGNN-KNN regardless of the value of K. For example, when K are \(\{\)5, 10, 15\(\}\), the CSR of DGHSA are \(\{\)73.65\(\%\), 74.89\(\%\), 74.67\(\%\) \(\}\) in Fig. 3b, respectively. In other datasets, the results are the same(as shown in Fig. 3a, c and d). We observe that the classification accuracy of clean hypergraphs also changes under different parameter K, but the fluctuation is not large, so it is normal for DGHSA to have fluctuations under different K. In other words, the parameter K does not affect the performance of DGHSA.
Similarly, we also investigated the effect on DGHSA and the results are shown in Fig. 4. DGHSA has good metastability and thus achieves good performance in HGNN-\(\varepsilon\) as well. Observing Fig. 4a–d, it can be seen that DGHSA reduces the accuracy in Cora-ML, ACM, Citeseer and NTU by an average of 4.6\(\%\), 3.3\(\%\), 5.0\(\%\) and 4.25\(\%\) in different parameters \(\varepsilon\), respectively. As in the case of parameter K, parameter \(\varepsilon\) does not affect the performance of DGHSA.
The above results illustrate that our proposed model can be equally effective under various HGNNs parameters, i.e., DGHSA has good stability.
Impact of the number of candidate sets on the performance of DGHSA
Figure 5 shows the effect of the number of candidate sets n on the performance of DGHSA. Observing the Fig. 5a–d, we can find that the candidate set sampling mechanism can improve the performance of DGHSA. For example, in Fig. 5a, CSR of HGNN-KNN and HGNN-\(\varepsilon\) are \(\{\)65.78\(\%\), 63.70\(\%\) \(\}\) and \(\{\)65.26\(\%\), 63.27\(\%\) \(\}\) when n=\(\{\)2, 12\(\}\), respectively. In the other datasets, the performance of DGHSA improves as n increases. This is because when the number of candidate sets n is large, the less likely the attack is to fall into a local optimum. It is worth noting that the performance of DGHSA does not improve significantly when n is larger. In Citeseer, the classification accuracy of HGNN-KNN experiences a decrease of 3.56 percent when n ranges from 2 to 6, and a decrease of 0.19 percent as n increases from 6 to 12. Intuitively, the best perturbation found by the attack when n is larger is the same as the perturbation found when n is less further.
Further, we study the DGHSA runtime at different n. Here we take Cora-ML as an example, and the results are shown in Table 4. When the victim model is HGNN-KNN the time spent by DGHSA is 0.89 and 2.23 with n of 2 and 12, which is very satisfying. Since DGHSA computes the derivative graph and evaluates the candidate sets more times when there are more candidate sets, the running time increases. The above results demonstrate that DGHSA can achieve better performance with less time spent. In addition, combining Table 4 and Fig. 5a shows that n is positively proportional to the performance of DGHSA.
Conclusion
In this paper, we propose a modified hypergraph structure attack (DGHSA), which focuses on reducing the classification accuracy of the global nodes. To obtain the optimal perturbation graph at each moment, we first use a gradient algorithm to obtain the set of perturbation hypergraph candidates. Previous studies have shown that adversarial attacks tend to make the node similarity worse. Therefore, we use the derivative graph to measure the similarity of each perturbation hypergraph and select the hypergraph with the larger derivative graph value as the optimal perturbation hypergraph. We validated the effectiveness of DGHSA on four commonly used datasets.
However, DGHSA is a white-box attack algorithm that relies on gradient information and node labels to accomplish the attack, and perhaps the attack is not effective in some large-scale hypergraphs. In the future, we consider bypassing the computation of gradient, and adopt a heuristic-based approach to generate perturbations. Alternatively, using comparative learning, an unsupervised attack can be designed which can be achieved without knowing the node labels is the attack. For large-scale hypergraphs, the attack can be optimized by converting the full hypergraph to a subhypergraph. In this paper, our experiments focus on classification tasks, and in future work we can design attacks oriented to link prediction or association detection tasks. Moreover, according to the conclusions of this paper, when attacking temporal or dynamic hypergraph neural networks, we aim to achieve the attack by reducing the node similarity.
Data availability
The processed data required to reproduce these fndings cannot be shared at this time as the data also form part of an on going study. In future, the processed data that support the fndings of this study are available from the corresponding author upon reasonable request.
References
Li, R. et al. Graph signal processing, graph neural network and graph learning on biological data: A systematic review. IEEE Rev. Biomed. Eng. 16, 109–135. https://doi.org/10.1109/RBME.2021.3122522 (2023).
Zhang, R., Zhang, Y., Lu, C. & Li, X. Unsupervised graph embedding via adaptive graph learning. IEEE Trans. Pattern Anal. Mach. Intell. 45, 5329–5336. https://doi.org/10.1109/TPAMI.2022.3202158 (2023).
Ji, J., Jia, H., Ren, Y. & Lei, M. Supervised contrastive learning with structure inference for graph classification. IEEE Trans. Netw. Sci. Eng. 10, 1684–1695. https://doi.org/10.1109/TNSE.2022.3233479 (2023).
Wang, K. et al. Minority-weighted graph neural network for imbalanced node classification in social networks of internet of people. IEEE Internet Things J. 10, 330–340. https://doi.org/10.1109/JIOT.2022.3200964 (2023).
Lyu, Z. et al. Knowledge enhanced graph neural networks for explainable recommendation. IEEE Trans. Knowl. Data Eng. 35, 4954–4968 (2023).
Han, Y., Zhou, B., Pei, J. & Jia, Y. Understanding importance of collaborations in co-authorship networks: A supportiveness analysis approach. In Proceedings of the SIAM International Conference on Data Mining, 1111–1122 (2009).
Wang, J.-W., Rong, L.-L., Deng, Q.-H. & Zhang, J.-Y. Evolving hypernetwork model. Eur. Phys. J. B 77, 493–498. https://doi.org/10.1140/epjb/e2010-00297-8 (2010).
Suo, Q., Sun, S., Hajli, N. & Love, P. E. D. User ratings analysis in social networks through a hypernetwork method. Expert Syst. Appl. 42, 7317–7325. https://doi.org/10.1016/j.eswa.2015.05.054 (2015).
Xu, J., Wu, T. & Li, J. An R &D partner recommendation framework based on a knowledge context hypernetwork for engineering technological innovation. IEEE Trans. Eng. Manag. 71, 9938–9952. https://doi.org/10.1109/TEM.2023.3295951 (2024).
Segovia-Juarez, J. & Conrad, M. Learning with the molecular-bad hypernetwork model. In Proceedings of the 2001 Congress on Evolutionary Computation, Vols. 1 and 2, 1177–1182 (2001).
Le, T., Nguyen, D. & Le, B. Learning embedding for knowledge graph completion with hypernetwork. In Nguyen, N., Iliadis, L., Maglogiannis, I. & Trawinski, B. (eds.) Computational Collective Intelligence (ICCCI 2021), vol. 12876 of Lecture Notes in Artificial Intelligence, 16–28 (2021).
Feng, Y., You, H., Zhang, Z., Ji, R. & Gao, Y. Hypergraph neural networks. In Proc. AAAI Conf. Artif. Intell. 33, 3558–3565 (2019).
Yadati, N. et al. Hypergcn: A new method for training graph convolutional networks on hypergraphs. Advances in Neural Information Processing Systems 32 (2019).
Li, M., Zhang, Y., Li, X., Zhang, Y. & Yin, B. Hypergraph transformer neural networks. ACM Trans. Knowl. Discov. Data 17, 1–22. https://doi.org/10.1145/3565028 (2023).
Wang, X., Wang, J., Lian, Z. & Yang, N. Semi-supervised tree species classification for multi-source remote sensing images based on a graph convolutional neural network. Forests 14, 1211. https://doi.org/10.3390/f14061211 (2023).
Di, D. et al. Generating hypergraph-based high-order representations of whole-slide histopathological images for survival prediction. IEEE Trans. Pattern Anal. Mach. Intell. 45, 5800–5815. https://doi.org/10.1109/TPAMI.2022.3209652 (2023).
Jiang, Y. et al. Explainable deep hypergraph learning modeling the peptide secondary structure prediction. Adv. Sci. 10, 2206151. https://doi.org/10.1002/advs.202206151 (2023).
Yin, W., Che, Y. & Xinsheng, L. Physics-informed deep learning for fringe pattern analysis. Opto-Electron. Adv. 7, 2300341 (2024).
Li, T., Li, Y., Xia, T. & Hui, P. Finding spatiotemporal patterns of mobile application usage. IEEE Trans. Netw. Sci. Eng.[SPACE]https://doi.org/10.1109/TNSE.2021.3131194 (2021).
Sun, G., Li, Y., Liao, D. & Chang, V. Service function chain orchestration across multiple domains: A full mesh aggregation approach. IEEE Trans. Netw. Serv. Manag. 15, 1175–1191. https://doi.org/10.1109/TNSM.2018.2861717 (2018).
Sun, G. et al. Cost-efficient service function chain orchestration for low-latency applications in nfv networks. IEEE Syst. J. 13, 3877–3888. https://doi.org/10.1109/JSYST.2018.2879883 (2019).
Zügner, D., Akbarnejad, A. & Günnemann, S. Adversarial attacks on neural networks for graph data. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining 2847–2856 (2018).
Chen, Y. et al. Understanding and improving graph injection attack by promoting unnoticeability. In International Conference on Learning Representations (2022).
Tao, S. et al. Adversarial camouflage for node injection attack on graphs. https://doi.org/10.48550/arXiv.2208.01819 (2022).
Lin, L., Blaser, E. & Wang, H. Graph structural attack by perturbing spectral distance. In The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, 989–998, https://doi.org/10.1145/3534678.3539435 (2022).
Sun, L. et al. Adversarial attack and defense on graph data: A survey. IEEE Transactions on Knowledge and Data Engineering (2022).
Dai, J., Zhu, W. & Luo, X. A targeted universal attack on graph convolutional network by using fake nodes. Neural Process. Lett. 54, 3321–3337 (2022).
Sharma, A. K., Kukreja, R., Kharbanda, M. & Chakraborty, T. Node injection for class-specific network poisoning. arXiv:2301.12277 (2023).
Hu, C. et al. Hyperattack: Multi-gradient-guided white-box adversarial structure attack of hypergraph neural networks (2023). arXiv:2302.12407.
Wu, H. et al. Adversarial examples on graph data: Deep insights into attack and defense. arXiv:1903.01610 (2019).
Jin, W. et al. Graph structure learning for robust graph neural networks. arXiv:2005.10203 (2020).
Criado-Alonso, Á., Aleja, D., Romance, M. & Criado, R. Derivative of a hypergraph as a tool for linguistic pattern analysis. Chaos Solitons Fract. 163, 112604 (2022).
Ding, K., Wang, J., Li, J., Li, D. & Liu, H. Be more with less: Hypergraph attention networks for inductive text classification. arXiv:2011.00387 (2020).
Huang, J., Huang, X. & Yang, J. Residual enhanced multi-hypergraph neural network. In 2021 IEEE International Conference on Image Processing, 3657–3661 (2021).
Sun, X. et al. Heterogeneous hypergraph embedding for graph classification. In Proceedings of the 14th ACM International Conference on Web Search and Data Mining, 725–733 (2021).
Dong, Y., Sawin, W. & Bengio, Y. Hnhn: Hypergraph networks with hyperedge neurons. arXiv:2006.12278 (2020).
Bandyopadhyay, S., Das, K. & Narasimha Murty, M. Line hypergraph convolution network: Applying graph convolution for hypergraphs. arXiv:2002.03392 (2020).
Bandyopadhyay, S., Das, K. & Murty, M. N. Hypergraph attention isomorphism network by learning line graph expansion. In 2020 IEEE International Conference on Big Data (Big Data), 669–678. https://doi.org/10.1109/BigData50022.2020.9378335 (2020).
Yu, J. et al. Self-supervised multi-channel hypergraph convolutional network for social recommendation. In WWW ’21: The Web Conference 2021, Virtual Event / Ljubljana, Slovenia, April 19-23, 2021, 413–424. https://doi.org/10.1145/3442381.3449844 (2021).
Xu, K. et al. Topology attack and defense for graph neural networks: An optimization perspective. arXiv:1906.04214 (2019).
Zügner, D. & Günnemann, S. Adversarial attacks on graph neural networks via meta learning. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019 (OpenReview.net, 2019).
Dai, E., Lin, M., Zhang, X. & Wang, S. Unnoticeable backdoor attacks on graph neural networks. https://doi.org/10.48550/arXiv.2303.01263 (2023).
Chen, Y., Ye, Z., Zhao, H. & Wang, Y. Feature-based graph backdoor attack in the node classification task. International Journal of Intelligent Systems (2023).
Wang, B., Pang, M. & Dong, Y. Turning strengths into weaknesses: A certified robustness inspired attack framework against graph neural networks. arXiv:2303.06199 (2023).
Li, X., Chen, L. & Wu, D. Adversary for social good: Leveraging attribute-obfuscating attack to protect user privacy on social networks. Security and Privacy in Communication Networks 710–728 (2022).
Ju, M., Fan, Y., Zhang, C. & Ye, Y. Let graph be the go board: Gradient-free node injection attack for graph neural networks via reinforcement learning. arXiv:2211.10782 (2022).
Huang, Y., Liu, Q. & Metaxas, D. Video object segmentation by hypergraph cut. In 2009 IEEE Conference on Computer Vision and Pattern Recognition, 1738–1745 (IEEE, 2009).
Acknowledgements
This work was supported by Project of Scientific Research Initiation Fund of Shandong Technology and Business University (No.BS202454) and Construction Project for Innovation Platform of Qinghai Province (No.2022ZJT02).
Author information
Authors and Affiliations
Contributions
Y.C.: Conceptualization, Methodology, Writing, Funding acquisition. Z.Y.: Investigation, Visualization. and Z.W. and J.L.: Investigation. H.Z.: Validation, Supervision, Funding acquisition.
Corresponding authors
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
A Examples of derivative graph
A Examples of derivative graph
In this section, we use a simple example to verify that the modification of a hypergraph’s hyperedge adjacency (adding or deleting nodes in a hyperedge) may result in an increase or decrease in the derivative graph value. The above conjecture is verified by comparing the derivative graph values before and after the attack.
Figure 6a shows a clean hypergraph and its derivative graph matrix is
The derivative graph value of hypergraph a is 23. Two operations are done for one of the hypergraphs in this hypergraph as follows.
-
(1)
Adding nodes.
-
(i)
Figure 6b is obtained by adding node \(V_6\) in the hyperedge \(e_1\), whose derivative graph matrix is
$$\begin{aligned} {D_b} = \left[ {\begin{array}{*{20}{c}} 0& {0.5}& 3& 1& 0& 2\\ {0.5}& 0& 1& 2& 0& 3\\ 3& 1& 0& 0& 2& 3\\ 1& 2& 0& 0& 0& 1\\ 0& 0& 2& 0& 0& 1\\ 2& 3& 3& 1& 1& 0 \end{array}} \right] . \end{aligned}$$(16)Its derivative graph value is 39, which is obviously an increase in the derivative graph value compared to the original hypergraph a.
-
(ii)
Figure 6c is the addition of node \(V_1\) in the hyperedge \(e_2\), whose derivative graph matrix is
$$\begin{aligned} {D_c} = \left[ {\begin{array}{*{20}{c}} 0& 0& 1& 2& 0& 0\\ 0& 0& 1& 2& 0& 0\\ 1& 1& 0& 0& 2& 2\\ 2& 2& 0& 0& 0& 0\\ 0& 0& 2& 0& 0& 0\\ 0& 0& 2& 0& 0& 0 \end{array}} \right] . \end{aligned}$$(17)The derivative graph value of the hypergraph c is 20, which is reduced compared to the original hypergraph a.
-
(i)
-
(2)
Deleting nodes.
-
(i)
Figure 6d is obtained by deleting node \(V_2\) in the hyperedge \(e_3\), whose derivative graph matrix is
$$\begin{aligned} {D_d} = \left[ {\begin{array}{*{20}{c}} 0& 2& 3& 1& 0& 0\\ 2& 0& 3& 1& 0& 0\\ 3& 3& 0& 0& 2& 2\\ 1& 1& 0& 0& 0& 0\\ 0& 0& 2& 0& 0& 0\\ 0& 0& 2& 0& 0& 0 \end{array}} \right] . \end{aligned}$$(18)Its derivative graph value is 28, which is obviously an increase in the derivative graph value compared to the original hypergraph a.
-
(ii)
Figure 6e is the deletion of node \(V_3\) in the hyperedge \(e_3\), whose derivative graph matrix is
$$\begin{aligned} {D_e} = \left[ {\begin{array}{*{20}{c}} 0& 2& 0& 0& 0& 0\\ 2& 0& 1& 2& 0& 0\\ 0& 1& 0& 0& 2& 2\\ 0& 2& 0& 0& 0& 0\\ 0& 0& 2& 0& 0& 0\\ 0& 0& 2& 0& 0& 0 \end{array}} \right] . \end{aligned}$$(19)The derivative graph value of the hypergraph e is 18, which is reduced compared to the original hypergraph a.
-
(i)
In summary, it can be seen that the derivative graph does not appear to add nodes only to rise or remove nodes only to decrease, and therefore can be applied in HGNNs to adversarial attacks.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Chen, Y., Ye, Z., Wang, Z. et al. DGHSA: derivative graph-based hypergraph structure attack. Sci Rep 14, 30222 (2024). https://doi.org/10.1038/s41598-024-79824-y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-024-79824-y