Multi-View Robust Graph Representation Learning for Graph Classification
Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence. Main Track. Pages 4037-4045.
https://doi.org/10.24963/ijcai.2023/449
Keywords
- Machine Learning: ML: Representation learning
- Machine Learning: ML: Robustness
Abstract
The robustness of graph classification models plays an essential role in providing highly reliable applications. Previous studies along this line primarily focus on seeking the stability of the model in terms of overall data metrics (e.g., accuracy) when facing data perturbations, such as removing edges. Empirically, we find that these graph classification models also suffer from semantic bias and confidence collapse issues, which substantially hinder their applicability in real-world scenarios. To address these issues, we present MGRL, a multi-view representation learning model for graph classification tasks that achieves robust results. Firstly, we proposes an instance-view consistency representation learning method, which utilizes multi-granularity contrastive learning technique to perform semantic constraints on instance representations at both the node and graph levels, thus alleviating the semantic bias issue. Secondly, we proposes a class-view discriminative representation learning method, which employs the prototype-driven class distance optimization technique to adjust intra- and inter-class distances, thereby mitigating the confidence collapse issue.Finally, extensive experiments and visualizations on eight benchmark dataset demonstrate the effectiveness of MGRL.
- [Chu et al., 2021] Guanyi Chu, Xiao Wang, Chuan Shi, and Xunqiang Jiang. Cuco: Graph representation with cur- riculum contrastive learning. In Zhi-Hua Zhou, editor, Proceedings of the Thirtieth International Joint Confer- ence on Artificial Intelligence, IJCAI 2021, Virtual Event / Montreal, Canada, 19-27 August 2021, pages 2300-2306. IJCAI
- [Gao et al., 2021] Tianyu Gao, Xingcheng Yao, and Danqi Chen. Simcse: Simple contrastive learning of sentence embeddings. In Marie-Francine Moens, Xuanjing Huang, Lucia Specia, and Scott Wen-tau Yih, editors, Proceedings of the 2021 Conference on Empirical Methods in Natu- ral Language Processing, EMNLP 2021, Virtual Event / Punta Cana, Dominican Republic, 7-11 November, 2021, pages 6894-6910. Association for Computational Linguis- tics, 2021.
- [Ge et al., 2023] Ling Ge, Chunming Hu, Guanghui Ma, Hong Zhang, and Jihong Liu. Prokd: An unsuper- vised prototypical knowledge distillation network for zero- resource cross-lingual named entity recognition. CoRR, abs/2301.08855, 2023.
- [Geisler et al., 2021] Simon Geisler, Tobias Schmidt, Hakan Sirin, Daniel Zügner, Aleksandar Bojchevski, and Stephan Günnemann. Robustness of graph neural networks at scale. In Marc'Aurelio Ranzato, Alina Beygelzimer, Yann N. Dauphin, Percy Liang, and Jennifer Wortman Vaughan, editors, Advances in Neural Information Pro- cessing Systems 34: Annual Conference on Neural Infor- mation Processing Systems 2021, NeurIPS 2021, Decem- ber 6-14, 2021, virtual, pages 7637-7649, 2021.
- [Han et al., 2022] Xiaotian Han, Zhimeng Jiang, Ninghao Liu, and Xia Hu. G-mixup: Graph data augmentation for graph classification. In Kamalika Chaudhuri, Ste- fanie Jegelka, Le Song, Csaba Szepesvári, Gang Niu, and Sivan Sabato, editors, International Conference on Ma- chine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, volume 162 of Proceedings of Machine Learning Research, pages 8230-8248. PMLR, 2022.
- [Hassani and Ahmadi, 2020] Kaveh Hassani and Amir Ho- sein Khas Ahmadi. Contrastive multi-view representation learning on graphs. In Proceedings of the 37th Interna- tional Conference on Machine Learning, ICML 2020, 13- 18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research. PMLR, 2020.
- [Kingma and Ba, 2015] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Yoshua Bengio and Yann LeCun, editors, 3rd International Con- ference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Pro- ceedings, 2015.
- [Kipf and Welling, 2017] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net, 2017.
- [Li et al., 2022a] Kuan Li, Yang Liu, Xiang Ao, Jianfeng Chi, Jinghua Feng, Hao Yang, and Qing He. Reliable representations make A stronger defender: Unsupervised structure refinement for robust GNN. In Aidong Zhang and Huzefa Rangwala, editors, KDD '22: The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, August 14 -18, 2022, pages 925-935. ACM, 2022.
- [Li et al., 2022b] Sihang Li, Xiang Wang, An Zhang, Yingxin Wu, Xiangnan He, and Tat-Seng Chua. Let in- variant rationale discovery inspire graph contrastive learn- ing. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvári, Gang Niu, and Sivan Sabato, editors, International Conference on Machine Learning, ICML 2022, 17-23 July 2022, Baltimore, Maryland, USA, vol- ume 162 of Proceedings of Machine Learning Research, pages 13052-13065. PMLR, 2022.
- [Luo et al., 2021] Dongsheng Luo, Wei Cheng, Wenchao Yu, Bo Zong, Jingchao Ni, Haifeng Chen, and Xiang Zhang. Learning to drop: Robust graph neural network via topological denoising. In Liane Lewin-Eytan, David Carmel, Elad Yom-Tov, Eugene Agichtein, and Evgeniy Gabrilovich, editors, WSDM '21, The Fourteenth ACM In- ternational Conference on Web Search and Data Mining, Virtual Event, Israel, March 8-12, 2021, pages 779-787. ACM, 2021.
- [Ma et al., 2022a] Guanghui Ma, Chunming Hu, Ling Ge, Junfan Chen, Hong Zhang, and Richong Zhang. To- wards robust false information detection on social net- works with contrastive learning. In Mohammad Al Hasan and Li Xiong, editors, Proceedings of the 31st ACM Inter- national Conference on Information & Knowledge Man- agement, Atlanta, GA, USA, October 17-21, 2022, pages 1441-1450. ACM, 2022.
- [Ma et al., 2022b] Guanghui Ma, Chunming Hu, Ling Ge, and Hong Zhang. Open-topic false information detection on social networks with contrastive adversarial learning. In Yoav Goldberg, Zornitsa Kozareva, and Yue Zhang, ed- itors, Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, EMNLP 2022, Abu Dhabi, United Arab Emirates, December 7-11, 2022, pages 2911-2923. Association for Computational Linguis- tics, 2022.
- [Morris et al., 2020] Christopher Morris, Nils M. Kriege, Franka Bause, Kristian Kersting, Petra Mutzel, and Mar- ion Neumann. Tudataset: A collection of benchmark datasets for learning with graphs. In ICML 2020 Workshop on Graph Representation Learning and Beyond (GRL+ 2020), 2020.
- [Song et al., 2022] Zixing Song, Yifei Zhang, and Irwin King. Towards an optimal asymmetric graph structure for robust semi-supervised node classification. In Aidong Zhang and Huzefa Rangwala, editors, KDD '22: The 28th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Washington, DC, USA, August 14 -18, 2022, pages 1656-1665. ACM, 2022.
- [Sui et al., 2022] Yongduo Sui, Xiang Wang, Jiancan Wu, Min Lin, Xiangnan He, and Tat-Seng Chua. Causal at- tention for interpretable and generalizable graph classifi- cation. In Aidong Zhang and Huzefa Rangwala, editors, KDD '22: The 28th ACM SIGKDD Conference on Knowl- edge Discovery and Data Mining, Washington, DC, USA, August 14 -18, 2022, pages 1696-1705. ACM, 2022.
- [Sun et al., 2020] Fan-Yun Sun, Jordan Hoffmann, Vikas Verma, and Jian Tang. Infograph: Unsupervised and semi-supervised graph-level representation learning via mutual information maximization. In 8th International Conference on Learning Representations, ICLR 2020, Ad- dis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
- [Sun et al., 2022] Qingyun Sun, Jianxin Li, Hao Peng, Jia Wu, Xingcheng Fu, Cheng Ji, and Philip S. Yu. Graph structure learning with variational information bottleneck. In Proc. of AAAI, 2022.
- [Wang et al., 2021] Yiwei Wang, Wei Wang, Yuxuan Liang, Yujun Cai, and Bryan Hooi. Mixup for node and graph classification. In Jure Leskovec, Marko Grobelnik, Marc Najork, Jie Tang, and Leila Zia, editors, WWW '21: The Web Conference 2021, Virtual Event / Ljubljana, Slove- nia, April 19-23, 2021, pages 3663-3674. ACM / IW3C2, 2021.
- [Wang et al., 2022] Yanling Wang, Jing Zhang, Haoyang Li, Yuxiao Dong, Hongzhi Yin, Cuiping Li, and Hong Chen. Clusterscl: Cluster-aware supervised contrastive learning on graphs. In Frédérique Laforest, Raphaël Troncy, Elena Simperl, Deepak Agarwal, Aristides Gionis, Ivan Herman, and Lionel Médini, editors, WWW '22: The ACM Web Conference 2022, Virtual Event, Lyon, France, April 25 -29, 2022, pages 1611-1621. ACM, 2022.
- [Xia et al., 2022] Jun Xia, Lirong Wu, Jintao Chen, Bozhen Hu, and Stan Z. Li. Simgrace: A simple framework for graph contrastive learning without data augmentation. In Frédérique Laforest, Raphaël Troncy, Elena Simperl, Deepak Agarwal, Aristides Gionis, Ivan Herman, and Li- onel Médini, editors, WWW '22: The ACM Web Confer- ence 2022, Virtual Event, Lyon, France, April 25 -29, 2022, pages 1070-1079. ACM, 2022.
- [Xu et al., 2021] Minghao Xu, Hang Wang, Bingbing Ni, Hongyu Guo, and Jian Tang. Self-supervised graph-level representation learning with local and global structure. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learn- ing, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pages 11548-11558. PMLR, 2021.
- [Xu et al., 2022] Jiarong Xu, Yang Yang, Junru Chen, Xin Jiang, Chunping Wang, Jiangang Lu, and Yizhou Sun. Un- supervised adversarially robust representation learning on graphs. In Proc. of AAAI, 2022.
- [Yoo et al., 2022] Jaemin Yoo, Sooyeon Shim, and U Kang. Model-agnostic augmentation for accurate graph classifi- cation. In Frédérique Laforest, Raphaël Troncy, Elena Simperl, Deepak Agarwal, Aristides Gionis, Ivan Herman, and Lionel Médini, editors, WWW '22: The ACM Web Conference 2022, Virtual Event, Lyon, France, April 25 -29, 2022, pages 1281-1291. ACM, 2022.
- [You et al., 2020] Yuning You, Tianlong Chen, Yongduo Sui, Ting Chen, Zhangyang Wang, and Yang Shen. Graph con- trastive learning with augmentations. In Hugo Larochelle, Marc'Aurelio Ranzato, Raia Hadsell, Maria-Florina Bal- can, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
- [Zeng and Xie, 2021] Jiaqi Zeng and Pengtao Xie. Con- trastive self-supervised learning for graph classification. In Proc. of AAAI, 2021.
- [Zhang and Zitnik, 2020] Xiang Zhang and Marinka Zitnik. Gnnguard: Defending graph neural networks against ad- versarial attacks. In Hugo Larochelle, Marc'Aurelio Ran- zato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
- [Zhang et al., 2022] Mengmei Zhang, Xiao Wang, Meiqi Zhu, Chuan Shi, Zhiqiang Zhang, and Jun Zhou. Robust heterogeneous graph neural networks against adversarial attacks. In Proc. of AAAI, 2022.
- [Zheng et al., 2020] Cheng Zheng, Bo Zong, Wei Cheng, Dongjin Song, Jingchao Ni, Wenchao Yu, Haifeng Chen, and Wei Wang. Robust graph representation learning via neural sparsification. In Proceedings of the 37th Interna- tional Conference on Machine Learning, ICML 2020, 13- 18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 11458-11468. PMLR, 2020.
- [Zhu et al., 2020] Yanqiao Zhu, Yichen Xu, Feng Yu, Qiang Liu, Shu Wu, and Liang Wang. Deep graph contrastive representation learning. CoRR, abs/2006.04131, 2020.
- [Zhu et al., 2021] Yanqiao Zhu, Weizhi Xu, Jinghao Zhang, Qiang Liu, Shu Wu, and Liang Wang. Deep graph struc- ture learning for robust representations: A survey. CoRR, abs/2103.03036, 2021.
References were extracted automatically from the PDF and may contain errors.
Full text extracted automatically from the PDF; figures, tables and equations may differ. The PDF is the version of record.
1 Introduction
Graph classification models represented by graph neural networks (GNN), which aggregate graph nodes information using the graph topology for representation learning, have demonstrated remarkable performance in various graph classification tasks [Wang et al., 2022; Ma et al., 2022a]. However, this learning mechanism is susceptible to cascade effects, making graph classification models highly sensitive to the graph-structure input [Zhu et al., 2021]. This results in extremely poor robustness of graph classification models against noisy data, severely hindering their implementation in real-world scenarios.
∗Corresponding author

To improve the robustness of graph classification models, researchers have proposed various approaches, such as adversarial attacks based approaches [Zhang et al., 2022; Xu et al., 2022], graph representation learning based approaches [You et al., 2020; Zheng et al., 2020], graph structure learning based approaches [Luo et al., 2021; Song et al., 2022] and data augmentation based approaches [Wang et al., 2021; Han et al., 2022], etc. These approaches all rely on driving the model to converge on the prediction of original and perturbed graphs. In consequence, when confronted with noisy inputs, models trained using the above approaches do not jitter as much in predictive metrics (e.g., accuracy) as models learned using vanilla graph classification models.
Despite the outstanding performance, we empirically find that the existing graph classification approaches cannot guarantee semantic consistency across perturbed and original graphs, which we call the semantic bias issue. In detail, for a robust graph classification model, the semantic embedding of the perturbed and original graphs should be as close as possible while maintaining the stability of the metrics. This is crucial for applying graph classification models in some critical scenarios, such as bioinformatics and healthcare. As shown in Figure 1 (a), when we add 30% perturbations (adding edges) to the input graphs of the G-Mixup model [Han et al., 2022], as observed, the semantic representations of the perturbed graphs deviates significantly from that of the original graphs.
To deal with the above semantic bias issue, we propose an instance-view consistency representation learning method that performs semantic constraints through multi-granularity contrastive learning. Specifically, we rely on dropouts in the neural network to acquire multiple perturbed representations from the same original graph. Then, we employ unsupervised contrastive learning [Gao et al., 2021] to maximise the semantic consistency of the multiple perturbed representations at both the node- and graph-level. Moreover, we introduce an instance weighting method to avoid semantic damage caused by false-negative representations in contrastive learning.
Another empirical finding is that the prediction confidence (i.e. prediction probability) of existing graph classification models can vary dramatically in response to data perturbations, even leading to a collapse of the prediction results, which we call the confidence collapse issue. Existing methods usually simulate perturbation scenarios to evaluate the robustness of graph classification models. The fact is that simulations of perturbation scenarios are restricted, and the overall metrics stability of the dataset does not guarantee that the confidence in the data would remain constant. When experiencing complex or varied disturbances in practical circumstances, predicting confidence in graph classification models collapses. As shown in Figure 1 (b), when we remove 30% edges to the input graphs, for the G-Mix model [Han et al., 2022] , the prediction confidence changes by up to 60%.
To alleviate the confidence collapse issue, we propose a class-view discriminative representation learning method that adjusts intra- and inter-class distances utilizing the prototypedriven class distance optimization technique. Specifically, we employ class prototypes, i.e. class centres, as targets to drive graph representations closer to the class prototype of the same class and away from other class prototypes. In addition, we design prototype centre loss to further increase interclass spacing by adjusting the distance between prototypes. In this way, the model can obtain discriminative representations, thereby increasing its tolerance to perturbed data and mitigating changes in prediction confidence.
Based upon the above, we effectively integrate these two solutions into a unified model, resulting in our approach, Multi-View Graph Representation Learning (MGRL), where both solutions share the common goal: to learn a robust graph representation. The motivation behind this model is that a better representation can lead to more efficient and robust prediction results. We choose several relevant baselines from graph classification robustness studies for comparison on eight benchmark datasets, and the experimental results validate the effectiveness of MGRL.
Summarily, we make the following contributions: (1) We empirically discover that existing graph classification models suffer from semantic bias and confidence collapse issues when facing data perturbations. (2) We propose a novel model, MGRL, which alleviates the semantic bias issue via instance-view consistency representation learning, and mitigates the confidence collapse issue via class-view discriminative representation learning, respectively. (3) We demonstrate the effectiveness of our model through comparison, ablation, and visualization experiments on eight benchmark graph classification datasets.
2 RelatedWork
The recent advances in deep learning have enabled graph classification models to achieve superior performance on various graph classification tasks [You et al., 2020; Sun et al., 2020; Hassani and Ahmadi, 2020; Xu et al., 2021; Chu et al., 2021; Li et al., 2022b; Ma et al., 2022a; Wang et al., 2022; Ma et al., 2022b]. These approaches typically rely on a well-designed model architecture to understand the semantics of graph data. However, the message aggregation mechanism of graph classification models makes them highly sensitive to the structure of graph data [Zhang and Zitnik, 2020; Zhu et al., 2021], resulting in severe challenges to the robustness of graph classification models
Based on the above considerations, researchers have proposed various methods to address the robustness of these graph models [Geisler et al., 2021; Luo et al., 2021; Wang et al., 2021; Li et al., 2022a; Xu et al., 2022; Han et al., 2022]. For example, [Zheng et al., 2020] and [Luo et al., 2021] enhances the robustness of graph classification models by removing task-irrelevant edges from graph data. However, these previous approaches simply sought to maintain the overall data metric when facing data perturbations. Different from previous work, we experimentally verify that existing graph robust classification models are suffering from semantic bias and confidence collapse problems. Then, we explore the robustness of graph classification models for the first time from these two perspectives .
3 Methodology
3.1 ProblemFormulation
Given a graph G = {V, E}, we denote the node set and edge set as V = {v1, · · · , vN} and E ⊆ V × V respectively. The associated node feature matrix is represented as X = {xv|v ∈ V} ∈ R|V|×d , where xv denotes feature for node v and d is the dimension of input feature. Also, we leverage A ∈ {0, 1}|V|×|V| to denote the adjacency matrix, where Ai,j = 1 if (vi, vj) ∈ E. In this paper, we aim to learn a graph neural encoder F(·) to obtain more robust representations for downstream graph-level classification task, which can be formalized as : ˆ y = F(G(X, A)).
3.2 Overview
This paper proposes a multi-view graph representation learning model (named MGRL), which utilizes the instance-view consistency representation learning method and class-view discriminative representation learning method to alleviate the semantic bias and confidence collapse problems, thereby enhancing the effectiveness and robustness of graph classification models. As illustrated in Figure 2, our model primarily contains a perturbed graph encoder and two representation learning modules with different views.
3.3 Perturbed Graph Encoder
In this part, we employ the perturbed graph encoder to obtain different perturbed representations. For graph data perturbations, most existing works rely on human priors or expert knowledge [You et al., 2020] to design some specific perturbation strategies. Due to the diversity of data distribution and downstream tasks, these methods are not always effective and may even destroy the graph's semantics [Xia et al., 2022]. To circumvent this difficulty, we introduce the standard dropout as perturbations to obtain different graph embeddings. We refer to these embeddings as perturbed representations, which share the same gold label. This operation is the effective data perturbation method capable of preserving the samples' semantics [Gao et al., 2021].

Specifically, given a graph G with N nodes, we pass it to the graph neural encoder and forward propagate K times. Since the dropout in the neural network can randomly discard different neurons, the K perturbed representations we obtain have some differences. The process can be formalized as:
where hk = {hnk ∈ Rd1 }Nn=0 denotes the node representations set of the kth perturbation, hnk denotes one node representation from hk, d1 denotes the dimension of node representation and K denotes the number of perturbation.
3.4 Instance-ViewConsistency Representation Learning
In this section, we elaborate on our instance-view consistency representation learning approach. It employs a multigranularity contrastive learning technique to perform semantic consistency learning at both node and graph levels, alleviating the semantic bias issue in graph classification models.
Node-Level Semantic Consistency Learning. We argue that a node representation obtained by a robust graph classification model possesses the following qualities: On the one hand, each node ought to maintain its semantic stability. That is, its semantic representation should not change significantly in response to data perturbations. On the other hand, each node representation should keep its semantic identity, meaning that different node representations are required to retain a specific semantic distance in the embedding space.
To achieve the above purpose, inspired by deep graph contrastive representation learning [Zhu et al., 2020; Hassani and Ahmadi, 2020], we introduce the prevalent unsupervised contrastive learning [Gao et al., 2021] to constrain node representation semantics. In detail, we select a node representation hnk from the node representation set hk as an anchor. Accordingly, the corresponding node representations from other K - 1 perturbed representation set are employed as positive representations, denoted as hj . Also, we regard the node representations other than hnk and hj among {hk}Kk=0 as negative node representations, denoted as hneg. Note that our negative representations contain intra- and inter-graph node representations simultaneously.
We aim to maximize the semantic consistency between the anchor and positive node representations while minimizing the semantic consistency between the anchor and negative node representations. Therefore, the node-level consistency representation learning loss is defined as follows:
where s(, ) is a metric function to measure the semantic similarity between different node representations, the I indicates an indicator function and τ1 is a temperature parameter. In this paper, we choose cosine similarity as the metric function following the previous works [Zhu et al., 2020].
Graph-Level Semantic Consistency Learning. With the help of node representations, we can employ a READOUT function to obtain perturbed graph representations:
where the Hk ∈ Rd2 represents the graph representation for the kth perturbation. We adopt global average pooling as the READOUT function.
To maintain the semantic consistency of the model at the graph level, we can directly adopt a similar learning approach to the node level (Equation 2) for our purpose. Differently, the anchor is represented as a graph representation Hk, and the positive representations are the other K - 1 perturbed graph representations from the same original graph, marked as Hj . In addition, we refer to all perturbed graphs from other original graph representations within the mini-batch as negative representations, marked as Hneg. We can derive the optimisation objective of the graph-level semantic consistency:
where M indicates the number of graph in a mini-batch .
As observed in Equation 4, the unsupervised contrastive learning adopted can push away all other negative graph representations, regardless of whether they have the same gold label as the anchor representation. We refer to these incorrectly pushed-away representations as false negative representations. We argue that this indiscriminate learning mechanism would disrupt the semantic representation learning of the graph encoder. Note that, the above case exists only for graph-level consistency representation learning. The negative representations of the anchor representation come from one mini-batch, which may contain graph representations with the same label as the anchor. In contrast, the negative representations of a node all come from an original graph and share the same label. Considering this, we introduce an instance weighting method to avoid the detriment caused by false negative representations for graph-level consistency learning.
More specifically, given an anchor graph representation Hk, and its label yk, one of anchor's negative graph representations hneg, the negative representation's label yneg, we can depend on their gold labels to generate the weight of this negative representation:
This way, if a graph representation is the anchor's false negative representation, its weight will be set to 0. Conversely, the weight is set to 1. To this point, the Equation 4 can be rewritten as follows:
where wneg represents the weights of negative representations.
| Datasets | Graphs | Avg.Nodes | Avg.Edges | Classes |
|---|---|---|---|---|
| IB | 1000 | 19.22 | 96.53 | 2 |
| IM | 1500 | 65.94 | 89 | 3 |
| RB | 2000 | 497.63 | 497.75 | 2 |
| CO | 5000 | 2475.78 | 74.49 | 3 |
| PR | 1113 | 72.82 | 39.06 | 2 |
| DD | 1178 | 715.66 | 284.32 | 2 |
| NC | 4110 | 32.30 | 29.87 | 2 |
| MUT | 4337 | 30.77 | 30.32 | 2 |
Eventually, our instance-view consistency representation learning loss can be defined as follows:
3.5 Class-ViewDiscriminative Representation Learning
In this section, we describe our class-view discriminative representation learning approach. It utilizes a prototype-driven class distance optimization technique to adjust intra- and inter-class distances, thereby mitigating the confidence collapse issue of graph classification models.
To be specific, given K perturbed graph representations {Hk}Kk=0 , we first map these representations to the class space through a nonlinear projection network, a one-layer MLP followed by an activation function:
where the zk ∈ Rd3 represents the class space embedding for the kth perturbed graph representation and d3 denotes the dimension of the representation.
Then, with the help of the gold label, we can directly obtain the class prototypes by averaging the representation vectors with the same label, which can be denoted as:
where yi and Ni denote the label and number belonging to class i respectively. yk denotes the gold label of zk.
Since the calculation of class prototypes involves all graph representations, resulting in huge computational expense. Therefore, we introduce a moving average method [Ge et al., 2023] to update the class prototypes. This method can reduce the computational cost while stabilising training:
where ci,t denotes the prototype of class i in the t step and the λ ∈ (0, 1) is the moving average coefficient.
To optimize intra- and inter-class distances, we urge graph representations from the same class to approach the class prototype and move away from other class prototypes. We can learn a more compact class representation by reducing intraclass distances and increasing inter-class distances. The loss function can be defined as follows:
| Methods | IB | IM | RB | CO | PR | DD | NC | MUT |
|---|---|---|---|---|---|---|---|---|
| MVGRL [2020] InfoGraph [2020] GraphCL [2020] CSSL [2021] VIB-GSL [2022] CAL [2022] NodeSam [2022] G-Mixup [2022] MGRL (Ours) | 72.20±1.86 70.20±2.56 73.20±2.03 72.40±1.85 72.60±1.85 72.02±1.72 72.40±2.87 73.00±1.28 73.79±2.19 | 53.73±1.61 52.93±1.61 54.00±2.34 52.79±2.71 53.33±1.43 53.73±2.65 53.46±0.97 51.33±2.14 55.20±2.28 | - 74.40±2.35 75.59±2.35 75.40±3.12 - 73.60±1.93 74.20±2.11 74.70±0.74 75.80±1.53 | 79.24±1.32 79.00±0.66 79.12±1.18 80.48±0.95 79.12±1.00 81.04±0.46 80.80±1.17 78.36±0.40 81.96±0.85 | 62.14±1.20 61.78±1.18 61.96±3.41 60.71±1.59 61.60±0.89 60.53±2.21 61.78±1.04 60.71±1.95 62.85±1.33 | 65.71±4.09 69.91±3.58 69.55±3.62 70.58±2.60 70.15±1.91 70.92±2.52 70.42±3.37 70.50±1.97 72.60±0.85 | 69.24±1.26 67.25±1.96 66.71±1.46 67.29±0.56 65.10±2.00 70.41±0.71 66.08±1.31 66.87±0.54 68.32±0.23 | 74.38±0.86 76.09±1.32 77.10±1.14 76.78±1.22 69.63±1.88 76.91±0.47 75.67±1.34 76.32±1.72 77.56±0.47 |
where zi belongs to class i, ci,t is the class prototype of class i, co,t denotes a class prototype of other class, d(·) denotes the distance measure function, |C| is the number of class and τ3 denotes the distance scaling factor.
Intuitively, we can adjust the class distances for discriminative representation learning via Equation 11, where the denominator represents the distance between class representations zi and its corresponding class prototype ci,t, and the numerator represents the distance between class representations zi and other class prototypes co,t. Generally, the distance between the zi and co,t is much larger than the distance between the zi and ci,t, resulting in ed(zi,co,t) (denominator) being significantly smaller than ed(ci,t,zi) (numerator). In particular, as training proceeds, the former keep decreasing and the latter keep increasing to approach e. This causes the gradient signal produced by Equation 11 to maintain decreasing, slowing or even ending training.
To handle this issue, we design prototype centres, the average vector of the two class prototypes, as virtual representations. The prototype centre is closer to the class representations than other class prototypes co,t, so it can provide more gradient signal for class distance optimisation.
Intuitively, we can directly replace the co,t in Equation 11 by the prototype centre. However, we experimentally find that utilizing the prototype centre to adjust the prototype distance can achieve better results. Therefore, we further adjust the inter-class distance by the following prototype centre loss:
where ci,j cen denotes the prototype centre of class prototype ci,t and class prototype cj,t Since the cosine function is used as the distance metric function, we minimize the Equation 12 equivalent to maximizing the distance between the prototype centre ci,j cen and the prototype ci,t.
Eventually, our loss for class-view discriminative representation learning can be defined as follows:
where α3 and α4 are trade-off parameters.
3.6 Training Objective
To the end, we obtain prediction results for the graph classification task employing a forward propagation network, which consists of a layer of perceptrons, and the standard crossentropy loss can be defined as:
where the y denotes the gold label.
Finally, the whole objective training loss for our model can be expressed as follows:
where θ denotes the parameters of the model.
4 Experiment
4.1 Datasets
We evaluate our approach on eight benchmark datasets from TUDataset [Morris et al., 2020], including four social networks datasets, such as IMDB-BINARY (IB), IMDBMULTI (IM), COLLAB (CO) and REDDIT-BINARY (RB), and four bioinformatics datasets, such as PROTEINS (PR), DD, NCI1 (NC) and Mutagenicity (MUT). The details of the statistical results of the datasets are shown in Table 1.
4.2 Implementation Details
We adopt accuracy as an evaluation metric for the graph classification task and employ GCN [Kipf and Welling, 2017] as the graph encoder. We randomly select 80% of the data for the training set, 10% for the validation set, and the remaining 10% for the test set. During the practical implementation, the batch size is set to 32, the dropout is set to 0.5, the moving average coefficient λ is set to 0.0001, and the α1, α2, α3, α4 are set to 0.001, 1, 1, 1, respectively. We utilize a grid search technique to select the other best hyper-parameters with the learning rate selected from {0.01, 0.05, 0.001, 0.005}, the temperature parameter τ1, τ2 and τ3 selected from {0.07, 0.1, 0.3, 0.5, 0.7, 0.9} and the K selected from {2,4,6,8,10}. We train our model using the Adam optimizer [Kingma and Ba, 2015] and adopt the validation set to perform model tuning. For comparison with related works, we leverage the opensource implementation of their original papers. We use PyTorch to implement our model on a Linux machine with a GPU device Tesla V100 SXM2 32 GB. All experimental results are from an average of five runs.


4.3 Performance Comparison
To evaluate the effectiveness and robustness of our model, we select some related works for comparison, including three graph representation learning approaches: MVGRL [Hassani and Ahmadi, 2020], InfoGraph [Sun et al., 2020], GraphCL [You et al., 2020], one graph structure learning approach VIB-GSL [Sun et al., 2022], one graph causal learning approach CAL [Sui et al., 2022] and three graph data augmentation approaches CSSL [Zeng and Xie, 2021], NodeSam [Yoo et al., 2022] and G-Mixup [Han et al., 2022].
As observed in Table 2, our MGRL shows the best results on most datasets, e.g. 2.84% higher accuracy than the competitive method GraphCL on the CO dataset and 2.14% higher accuracy than the model G-Mixup on the PR dataset, respectively. GraphCL develops four graph-specific data perturbation strategies to improve the model's semantic encoding capability. Unfortunately, these perturbation strategies may corrupt the original semantic structure of the graph. GMixup employs a mixup method for data expansion but ignores class-level representation learning. In contrast, our approach not only maintains the semantic integrity of the graph data but also learns the class discriminative representations through a prototype-driven distance optimisation technology.
4.4 Robustness Studies
Robustness to semantic consistency. As shown in Figure 3, our model MGRL demonstrates a strong advantage in semantic consistency under various perturbation scenarios. For instance, when removing edges, the perturbed graph representations of the NodeSam and G-Mixup models completely deviate from the original samples since they only focus on the overall metric of the data. In contrast, our MGRL utilises multi-granularity contrastive learning to obtain a consistent representation from the instance perspective.

| Model | 20% | 40% | 60% | 80% | |
|---|---|---|---|---|---|
| Removing Edges | NodeSam | 71.60 | 66.10 | 60.00 | 54.00 |
| G-Mixup | 72.40 | 65.69 | 56.60 | 51.29 | |
| MGRL | 73.40 | 66.50 | 60.00 | 54.49 | |
| Adding Edges | NodeSam | 71.90 | 71.20 | 70.00 | 68.30 |
| G-Mixup | 74.20 | 73.20 | 73.30 | 73.00 | |
| MGRL | 75.40 | 75.29 | 74.20 | 74.00 |
| Methods | IB | CO | PR | NC |
|---|---|---|---|---|
| MGRL | 73.79 | 81.96 | 62.85 | 68.32 |
| MGRLw/o nodel level | 72.60 | 81.40 | 61.60 | 67.88 |
| MGRLw/o graph level | 72.60 | 81.04 | 60.00 | 67.88 |
| MGRLw/o instance view | 71.60 | 80.60 | 59.57 | 67.61 |
| MGRLw/o prototype center | 72.40 | 81.24 | 61.42 | 68.12 |
| MGRLw/o class view | 71.40 | 80.16 | 60.07 | 67.13 |
Robustness to confidence variation. To assess the model's ability to stabilise confidence, we compare the absolute value of the difference in prediction confidence between the original and perturbed graphs for different models. As shown in the Figure 4, MGRL has the smallest jitter in prediction confidence for the two different perturbation scenarios compared to the other three models. The reason is that our prototype-driven class distance optimisation method learns a class-view discriminative representation, thereby improving the tolerance of the model to perturbed samples. This can effectively mitigate the confidence collapse issue.
Robustness to overall data metric. We compare the change in model performance against the perturbations to assess its robustness to the overall data metric. As shown in Table 3, our method achieves the best results when faced with different proportions of perturbations. For example, when removing 20% of the edges, our method obtains an accuracy of 73.40%, while the two different models NodeSam and GMixup yield an accuracy of 71.60% and 72.40%.
4.5 Ablation Studies
To explore the effectiveness of each model component, we design five variants of MGRL, including: (1) MGRLw/o nodel level removes the nodel-level semantic consistency learning, (2) MGRLw/o graph level cuts out the graph-level semantic consistency learning, (3) MGRLw/o instance view does not use the instance-view representational learning module, (4) MGRLw/o prototype center deletes prototype center loss and (5) MGRLw/o class view removes class-view representation learning module.
As observed in Table 4, the removal of any model component results in a decrease in model performance. For example, compared to MGRL, the accuracy of MGRLw/o nodel level and MGRLw/o graph level decrease by approximately 0.56% and 0.92% on CO dataset respectively, with MGRLw/o instance view drops even more. We observe the largest degradation for MGRLw/o class view, suggesting that class-view representation learning is more important to the classification performance of the model.
4.6 Graph-Level Representation Studies
To demonstrate that our model can learn discriminative representations, we visualize the graph embedding obtained by the graph encoders of different models on the CO dataset. As observed in Figure 5, the different class representations of CSSL, NodeSam and G-Mixup have almost no spacing, and the representations within the same class are more dispersed. In contrast, the graph representations learned via MGLR are more compact and have greater inter-class distances, indicating that our model can achieve more discriminative representations. The reason is that we use the prototype-driven class distance optimization approach to simultaneously force samples away from other class prototypes and different class prototypes away from each other.
5 Conclusion
This paper proposes the MGRL to improve the performance and robustness of graph classification models simultaneously. MGRL utilizes an instance-view consistency representation learning method and a class-view discriminative representation learning method to alleviate semantic bias and confidence collapse issues. The experiments on eight benchmark datasets illustrate the effectiveness of our MGRL.
Acknowledgements
We sincerely thank the reviewers for their insightful comments and valuable suggestions. Thanks for the computing infrastructure provided by Beijing Advanced Innovation Center for Big Data and Brain Computing.
@inproceedings{ijcai2023p449,
title = {Multi-View Robust Graph Representation Learning for Graph Classification},
author = {Ma, Guanghui and Hu, Chunming and Ge, Ling and Zhang, Hong},
booktitle = {Proceedings of the Thirty-Second International Joint Conference on
Artificial Intelligence, {IJCAI-23}},
publisher = {International Joint Conferences on Artificial Intelligence Organization},
editor = {Edith Elkind},
pages = {4037--4045},
year = {2023},
month = {8},
note = {Main Track},
doi = {10.24963/ijcai.2023/449},
url = {https://doi.org/10.24963/ijcai.2023/449},
}
TY - CPAPER TI - Multi-View Robust Graph Representation Learning for Graph Classification AU - Ma, Guanghui AU - Hu, Chunming AU - Ge, Ling AU - Zhang, Hong T2 - Proceedings of the Thirty-Second International Joint Conference on Artificial Intelligence, IJCAI-23 PB - International Joint Conferences on Artificial Intelligence Organization PY - 2023 SP - 4037 EP - 4045 DO - 10.24963/ijcai.2023/449 UR - https://doi.org/10.24963/ijcai.2023/449 ER -Copied
Machine-readable versions of this paper, for tools and AI agents: