A Secure GNN Training Framework for Partially Observable Graph
Abstract
:1. Introduction
- To address the challenges posed by unknown attackers and the need to defend all nodes, we model graph security as a POMDP to aptly manage the unpredictable nature of adversarial threats and uncertain system conditions, offering a robust defense mechanism for all nodes.
- To address the difficulties in solving a POMDP, we utilize Graph Convolutional Memory (GCM) to transform the observations of a POMDP into states with temporal memory and ultimately use reinforcement learning algorithms to solve for the optimal strategy.
- We introduce a mask layer positioned before the convolutional layers, which offers a list of masks capable of setting mask values for all edges. Guided by an optimal strategy, this allows for controlling the scope of convolution, thereby achieving a secure GNN.
- We evaluate our method on four citations and one social network dataset and compare it with adversarial defense methods such as MedianGCN, RobustGCN, and AirGCN. The experimental results show that our method can effectively improve the security of GNN models against adversarial injection attacks. After employing our defense method, an accuracy of 74% to 86.7% was achieved, which is an improvement of approximately 5.09% to 100.26% compared with the accuracy after the attack.
2. Related Works
2.1. Adversarial Graph Neural Networks
2.2. Partially Observable Models
2.3. Safety of Neural Network Training Processes
3. Preliminary
3.1. Adversarial Graph Neural Networks
- Adversarial Attacks: Adversarial injection attacks on graph neural networks mainly include two types: node-level attacks and graph-level attacks. Node-level attacks aim to perturb the features of one or multiple nodes, affecting the model’s node classification or link prediction performance. Graph-level attacks focus on modifying the structure or attributes of the entire graph to mislead the model’s judgment in tasks such as graph classification.
- Adversarial Defense: In response to adversarial attacks, researchers have proposed various defensive strategies to enhance the robustness of GNNs, including adversarial training, defense based on graph structure, preprocessing of graph data, and detection and repair of adversarial samples. Adversarial training involves introducing adversarial samples into the training process to improve the model’s resistance. Defense strategies based on a graph structure use the inherent structural properties of graphs to block attacks, while preprocessing methods clean input data to reduce adversarial disturbances. In addition, adversarial sample detection strives to identify and handle malicious disturbances in the model’s inputs.
3.2. Reinforcement Learning
- Environment: The external world where the agent learns and makes decisions, with interactions between the agent and the environment involving information such as state, action, and reward.
- Agent: The main body of learning and decision making, choosing the appropriate action based on the current state and obtaining reward signals through interactions with the environment.
- State: Describes the observational information of the environment and is the basis for the agent’s decision making.
- Action: The operations or decisions that an agent can perform in a specific state.
- Reward: The immediate feedback signal given by the environment, used to evaluate the quality of an action.
- Policy: The goal of the agent’s learning, which is the mapping rule from state to action, determining the actions the agent should take in different states.
3.3. Partially Observable Markov Decision Process
4. Method
4.1. Definition of Problem
4.2. POMDP Modeling
- An observation space , where each signifies the set of inter-node edges within the graph;
- A state space , representing the subset of edges clandestinely injected by adversarial nodes, which remain unobservable;
- An action space , delineating the permissible modifications to the graph’s topology;
- A transition probability , which is instantiated by the classification accuracy ACC, corresponding to the graph’s current state, postulating that actions leading to an enhancement in ACC are associated with a higher transition probability to the resultant state;
- An observation probability Z is set unequivocally to 1, ensuring that any action taken results in a deterministic observational outcome;
- A reward function R that aligns with the reward parameter derived from the Actor–Critic (A2C) reinforcement learning algorithm, quantifying the reward obtained upon transitioning from the state s to the state via the action a;
- A discount factor , ascribed from the A2C algorithm, employed to calibrate the significance accorded to immediate versus prospective rewards. A value of proximal to 1 () signifies a predilection for long-term strategies and the consequential future rewards.
4.3. Determining the Optimal Strategy
Algorithm 1: Optimal strategy solving algorithm. |
4.4. Mask Layer
Algorithm 2: Convolutional range control algorithm. |
5. Experiments
- Data Preparation: We evaluated our experiments on the following seven datasets: CiteSeer, Cora, Cora_ML, PubMed, football, Dolphins, and the Karate Club dataset. The information of the dataset is shown in the Table 2. CiteSeer is a computer science literature database; Cora is a dataset for literature classification, containing information on machine learning papers; Cora_ML is a literature classification dataset that is smaller than Cora; PubMed is a biomedical literature database covering literature in biomedical and life sciences; the football dataset is a network of American football games between Division IA colleges during the 2000 fall regular season. The Dolphins dataset represents the social interactions among bottlenose dolphins in Doubtful Sound, New Zealand, with nodes indicating individual dolphins and edges representing their observed associations. The Karate Club dataset details the social network of a university karate club, including friendships between members and the eventual split into two factions due to a conflict. Due to the large volume of data, we extracted subgraphs for the 800 most important nodes in Cora and PubMed; for CiteSeer, Cora_ML, football, Dolphins, and the Karate Club dataset, we used all the data.
- Model Preparation: We divided the models into three categories: original models, attack models, and defense models.
- (a)
- For the original model, we used the most common GCN to measure the performance of the original model on the clean dataset. The GCN (Graph Convolutional Network) is one of the most representative graph neural networks, learning hidden representations by encoding local graph structures and node features.
- (b)
- For the attack model, we used a commonly used adversarial injection attack method, Adv Injection (ADV), which is a gradient-based injection attack method with good attack performance for adding disturbances to the dataset.
- (c)
- For the defense model, we used Robust GCN [28], Median GCN [29], and AirGNN [30] as comparative experiments to contrast with our method.
- Robust GCN is a defense method based on adversarial training, which defends against adversarial injection attacks by injecting adversarial examples into the model and learning from them.
- Median GCN enhances the robustness of the GCN against structural attacks by adopting an aggregation scheme with high breakpoints (median or trimmed mean).
- AirGNN proposes and derives a simple, efficient, interpretable, and adaptive message passing scheme, resulting in a novel GNN with adaptive residuals that has stronger recovery capabilities for anomalous features.
- Evaluation Metrics: For each dataset, we randomly select 60% of the nodes for the training set, 20% for the validation set, and the remaining nodes for the test set. To assess the effectiveness of the models, we statistically evaluate them based on model accuracy. Additionally, to compare the effectiveness of different defense methods, we calculate the accuracy before and after defense, as follows:In addition, to compare the performance losses of the model on the original (unattacked) dataset after defense, we calculate the difference between the accuracy of the clean dataset and the accuracy after defense, as follows:
6. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Li, X.; Sun, L.; Ling, M.; Peng, Y. A survey of graph neural network based recommendation in social networks. Neurocomputing 2023, 549, 126441. [Google Scholar] [CrossRef]
- Gao, C.; Zheng, Y.; Li, N.; Li, Y.; Qin, Y.; Piao, J.; Quan, Y.; Chang, J.; Jin, D.; He, X.; et al. A survey of graph neural networks for recommender systems: Challenges, methods, and directions. ACM Trans. Recomm. Syst. 2023, 1, 1–51. [Google Scholar] [CrossRef]
- Gao, C.; Wang, X.; He, X.; Li, Y. Graph neural networks for recommender system. In Proceedings of the Fifteenth ACM International Conference on Web Search and Data Mining, Tempe, AZ, USA, 21–25 February 2022; pp. 1623–1625. [Google Scholar]
- Li, R.; Yuan, X.; Radfar, M.; Marendy, P.; Ni, W.; O’Brien, T.J.; Casillas-Espinosa, P.M. Graph signal processing, graph neural network and graph learning on biological data: A systematic review. IEEE Rev. Biomed. Eng. 2021, 16, 109–135. [Google Scholar] [CrossRef] [PubMed]
- 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, London, UK, 19–23 August 2018; pp. 2847–2856. [Google Scholar]
- Sun, Y.; Wang, S.; Tang, X.; Hsieh, T.Y.; Honavar, V. Adversarial attacks on graph neural networks via node injections: A hierarchical reinforcement learning approach. In Proceedings of the Web Conference 2020, Taipei, Taiwan, 20–24 April 2020; pp. 673–683. [Google Scholar]
- Santos, A.; Rente, D.; Seabra, R.; Moura, J.M. Inferring the Graph of Networked Dynamical Systems under Partial Observability and Spatially Colored Noise. In Proceedings of the ICASSP 2024-2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Seoul, Republic of Korea, 14–19 April 2024; pp. 13156–13160. [Google Scholar]
- Machado, S.; Sridhar, A.; Gil, P.; Henriques, J.; Moura, J.M.; Santos, A. Recovering the graph underlying networked dynamical systems under partial observability: A deep learning approach. In Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 20–27 February 2023; Volume 37, pp. 9038–9046. [Google Scholar]
- Ioannidis, V.N.; Chen, S.; Giannakis, G.B. Efficient and stable graph scattering transforms via pruning. IEEE Trans. Pattern Anal. Mach. Intell. 2020, 44, 1232–1246. [Google Scholar] [CrossRef] [PubMed]
- Ioannidis, V.N.; Marques, A.G.; Giannakis, G.B. Tensor graph convolutional networks for multi-relational and robust learning. IEEE Trans. Signal Process. 2020, 68, 6535–6546. [Google Scholar] [CrossRef]
- Dai, H.; Li, H.; Tian, T.; Huang, X.; Wang, L.; Zhu, J.; Song, L. Adversarial attack on graph structured data. In Proceedings of the International Conference on Machine Learning, PMLR, Stockholm, Sweden, 10–15 July 2018; pp. 1115–1124. [Google Scholar]
- Xu, K.; Chen, H.; Liu, S.; Chen, P.Y.; Weng, T.W.; Hong, M.; Lin, X. Topology attack and defense for graph neural networks: An optimization perspective. arXiv 2019, arXiv:1906.04214. [Google Scholar]
- Abusnaina, A.; Wu, Y.; Arora, S.; Wang, Y.; Wang, F.; Yang, H.; Mohaisen, D. Adversarial example detection using latent neighborhood graph. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Virtual, 11–17 October 2021; pp. 7687–7696. [Google Scholar]
- Angne, H.; Atkari, A.; Dhargalkar, N.; Kale, D. Unravelling SAT: Discussion on the Suitability and Implementation of Graph Convolutional Networks for Solving SAT. In Proceedings of the Information and Communication Technology for Intelligent Systems: Proceedings of ICTIS 2020; Springer: Berlin/Heidelberg, Germany, 2021; Volume 2, pp. 251–258. [Google Scholar]
- Bunel, R.R.; Turkaslan, I.; Torr, P.; Kohli, P.; Mudigonda, P.K. A unified view of piecewise linear neural network verification. Adv. Neural Inf. Process. Syst. 2018, 31, 4795–4804. [Google Scholar]
- Wang, B.; Jia, J.; Cao, X.; Gong, N.Z. Certified robustness of graph neural networks against adversarial structural perturbation. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, Singapore, 14–18 August 2021; pp. 1645–1653. [Google Scholar]
- Zhang, X.; Zitnik, M. Gnnguard: Defending graph neural networks against adversarial attacks. Adv. Neural Inf. Process. Syst. 2020, 33, 9263–9275. [Google Scholar]
- Hoerger, M.; Kurniawati, H. An on-line POMDP solver for continuous observation spaces. In Proceedings of the 2021 IEEE International Conference on Robotics and Automation (ICRA), Xian, China, 30 May–5 June 2021; pp. 7643–7649. [Google Scholar]
- Helmeczi, R.K.; Kavaklioglu, C.; Cevik, M. Linear programming-based solution methods for constrained partially observable Markov decision processes. Appl. Intell. 2023, 53, 21743–21769. [Google Scholar] [CrossRef]
- Morad, S.; Liwicki, S.; Kortvelesy, R.; Mecca, R.; Prorok, A. Modeling Partially Observable Systems using Graph-Based Memory and Topological Priors. In Proceedings of the Learning for Dynamics and Control Conference. PMLR, Stanford, CA, USA, 23–24 June 2022; pp. 59–73. [Google Scholar]
- Kissel, M.; Gottwald, M.; Diepold, K. Neural network training with safe regularization in the null space of batch activations. In Proceedings of the Artificial Neural Networks and Machine Learning–ICANN 2020: 29th International Conference on Artificial Neural Networks, Bratislava, Slovakia, 15–18 September 2020; Proceedings, Part II 29. Springer: Berlin/Heidelberg, Germany, 2020; pp. 217–228. [Google Scholar]
- Zhao, H.; Zeng, X.; Chen, T.; Liu, Z.; Woodcock, J. Learning safe neural network controllers with barrier certificates. Form. Asp. Comput. 2021, 33, 437–455. [Google Scholar] [CrossRef]
- Pauli, P.; Koch, A.; Berberich, J.; Kohler, P.; Allgöwer, F. Training robust neural networks using Lipschitz bounds. IEEE Control Syst. Lett. 2021, 6, 121–126. [Google Scholar] [CrossRef]
- Wu, Z.; Pan, S.; Chen, F.; Long, G.; Zhang, C.; Philip, S.Y. A comprehensive survey on graph neural networks. IEEE Trans. Neural Netw. Learn. Syst. 2020, 32, 4–24. [Google Scholar] [CrossRef]
- Zhou, J.; Cui, G.; Hu, S.; Zhang, Z.; Yang, C.; Liu, Z.; Wang, L.; Li, C.; Sun, M. Graph neural networks: A review of methods and applications. AI Open 2020, 1, 57–81. [Google Scholar] [CrossRef]
- Kurakin, A.; Goodfellow, I.; Bengio, S.; Dong, Y.; Liao, F.; Liang, M.; Pang, T.; Zhu, J.; Hu, X.; Xie, C.; et al. Adversarial attacks and defences competition. In Proceedings of the The NIPS’17 Competition: Building Intelligent Systems; Springer: Berlin/Heidelberg, Germany, 2018; pp. 195–231. [Google Scholar]
- Mnih, V.; Badia, A.P.; Mirza, M.; Graves, A.; Lillicrap, T.; Harley, T.; Silver, D.; Kavukcuoglu, K. Asynchronous methods for deep reinforcement learning. In Proceedings of the International Conference on Machine Learning. PMLR, New York, NY, USA, 20–22 June 2016; pp. 1928–1937. [Google Scholar]
- Zhu, D.; Zhang, Z.; Cui, P.; Zhu, W. Robust graph convolutional networks against adversarial attacks. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, Anchorage, AK, USA, 4–8 August 2019; pp. 1399–1407. [Google Scholar]
- Chen, L.; Li, J.; Peng, Q.; Liu, Y.; Zheng, Z.; Yang, C. Understanding structural vulnerability in graph convolutional networks. arXiv 2021, arXiv:2108.06280. [Google Scholar]
- Liu, X.; Ding, J.; Jin, W.; Xu, H.; Ma, Y.; Liu, Z.; Tang, J. Graph neural networks with adaptive residual. Adv. Neural Inf. Process. Syst. 2021, 34, 9720–9733. [Google Scholar]
Attribute | Value |
---|---|
O | E |
S | E(ATK) |
Action | {add E[i], remove E[i]} |
T | ACC |
Z | 1 |
R | A2C(Reward) |
A2C() |
Dataset | Number of Nodes | Number of Edges | Number of Classes | Number of Features | Node Features | Description |
---|---|---|---|---|---|---|
CiteSeer | 3327 | 4732 | 6 | 3703 | 3703-dimensional sparse vector | A scientific publication citation network with papers categorized into 6 fields. |
PubMed | 19,717 | 44,338 | 3 | 500 | 500-dimensional sparse vector | A scientific publication citation network with papers categorized into 3 fields. |
Cora | 2708 | 5429 | 7 | 1433 | 1433-dimensional sparse vector | A scientific publication citation network with papers categorized into 7 fields. |
Football | 115 | 613 | 11 | 1 | 1-dimensional feature | A network representing football matches between teams. |
Karate Club | 34 | 78 | 2 | 34 | 34-dimensional feature | A social network of a karate club, categorized into 2 groups. |
Dolphins | 62 | 159 | 2 | 0 | 0-dimensional feature | A social network of dolphins, with interaction data. |
Model/Data | CiteSeer | Cora_ML | Football | Cora | PubMed | Dolphins | Karate Club |
---|---|---|---|---|---|---|---|
ACC (%) | |||||||
CLN | 0.75 | 0.875 | 0.87 | 0.835 | 0.9 | 1 | 0.886 |
ATK | 0.669 | 0.806 | 0.391 | 0.681 | 0.825 | 0.692 | 0.629 |
RobustGCN | 0.732 | 0.85 | 0.696 | 0.781 | 0.853 | 0.938 | 0.771 |
MedianGCN | 0.72 | 0.812 | 0.478 | 0.763 | 0.834 | 0.831 | 0.714 |
AirGNN | 0.729 | 0.856 | 0.391 | 0.798 | 0.838 | 0.692 | - |
Ours | 0.74 | 0.863 | 0.783 | 0.827 | 0.867 | 0.978 | 0.857 |
R (%) | |||||||
RobustGCN | 0.063 | 0.044 | 0.305 | 0.100 | 0.028 | 0.246 | 0.142 |
MedianGCN | 0.051 | 0.006 | 0.087 | 0.082 | 0.009 | 0.139 | 0.085 |
AirGNN | 0.060 | 0.050 | 0.000 | 0.117 | 0.013 | 0 | - |
Ours | 0.071 | 0.057 | 0.392 | 0.146 | 0.042 | 0.286 | 0.228 |
C (%) | |||||||
RobustGCN | 0.018 | 0.025 | 0.174 | 0.054 | 0.047 | 0.062 | 0.115 |
MedianGCN | 0.030 | 0.063 | 0.392 | 0.072 | 0.066 | 0.169 | 0.172 |
AirGNN | 0.021 | 0.019 | 0.479 | 0.037 | 0.062 | 0.308 | - |
Ours | 0.010 | 0.012 | 0.087 | 0.008 | 0.033 | 0.022 | 0.029 |
Data | Train Time | Inference Time |
---|---|---|
CiteSeer | 0 h 59 m 37 s | 0 h 6 m 14 s |
Cora_ML | 0 h 44 m 12 s | 0 h 2 m 40 s |
football | 0 h 9 m 25 s | 0 h 0 m 30 s |
Cora | 0 h 30 m 23 s | 0 h 0 m 57 s |
PubMed | 1 h 21 m 58 s | 0 h 1 m 10 s |
dolphins | 0 h 4 m 12 s | 0 h 0 m 11 s |
karate | 0 h 2 m 11 s | 0 h 0 m 16 s |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2024 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
An, D.; Yang, Y.; Liu, W.; Zhao, Q.; Liu, J.; Qi, H.; Lian, J. A Secure GNN Training Framework for Partially Observable Graph. Electronics 2024, 13, 2721. https://doi.org/10.3390/electronics13142721
An D, Yang Y, Liu W, Zhao Q, Liu J, Qi H, Lian J. A Secure GNN Training Framework for Partially Observable Graph. Electronics. 2024; 13(14):2721. https://doi.org/10.3390/electronics13142721
Chicago/Turabian StyleAn, Dongdong, Yi Yang, Wenyan Liu, Qin Zhao, Jing Liu, Hongda Qi, and Jie Lian. 2024. "A Secure GNN Training Framework for Partially Observable Graph" Electronics 13, no. 14: 2721. https://doi.org/10.3390/electronics13142721
APA StyleAn, D., Yang, Y., Liu, W., Zhao, Q., Liu, J., Qi, H., & Lian, J. (2024). A Secure GNN Training Framework for Partially Observable Graph. Electronics, 13(14), 2721. https://doi.org/10.3390/electronics13142721