Supervised Contrastive Learning with Structure Inference for Graph Classification
Abstract
Advanced graph neural networks have shown great potentials in graph classification tasks recently. Different from node classification where node embeddings aggregated from local neighbors can be directly used to learn node labels, graph classification requires a hierarchical accumulation of different levels of topological information to generate discriminative graph embeddings. Still, how to fully explore graph structures and formulate an effective graph classification pipeline remains rudimentary. In this paper, we propose a novel graph neural network based on supervised contrastive learning with structure inference for graph classification. First, we propose a data-driven graph augmentation strategy that can discover additional connections to enhance the existing edge set. Concretely, we resort to a structure inference stage based on diffusion cascades to recover possible connections with high node similarities. Second, to improve the contrastive power of graph neural networks, we propose to use a supervised contrastive loss for graph classification. With the integration of label information, the one-vs-many contrastive learning can be extended to a many-vs-many setting, so that the graph-level embeddings with higher topological similarities will be pulled closer. The supervised contrastive loss and structure inference can be naturally incorporated within the hierarchical graph neural networks where the topological patterns can be fully explored to produce discriminative graph embeddings. Experiment results show the effectiveness of the proposed method compared with recent state-of-the-art methods.
Benchmark Results
Tested on 1 dataset 1 baseline value reported too low
Tables show presented results in global context (best 3 papers + GCN + MLP).
TU Dortmund
| # | Model | Accuracy ↑ | Paper |
|---|---|---|---|
| 1 | MSH-GNN | 0.9910
±0.0030 | |
| 3 | SupCosine | 0.9830
±0.0250 | This paper |
| 2 | ID-GNN+BEC | 0.9830
±0.0360 | |
| 7 | SUGAR | 0.9674
±0.0455 best reported | best at pub: SUGAR: Subgraph Neural Network with Reinforcement Pooling and Self-Supervised Mutual Information Mechanism (WWW 2021) Difference within reported uncertainty; not counted as underperformance. |
| 28 | sGIN | 0.9410
±0.0270 | This paper |
| 39 | GIN | 0.9330
±0.0290 best reported | best at pub: ProtGNN: Towards Self-Explaining Graph Neural Networks (AAAI 2021) Difference within reported uncertainty; not counted as underperformance. |
| 63 | GCN | 0.9220
±0.0440 | |
| 140 | PPGN | 0.9060
±0.0870 | This paper |
| 159 | WL | 0.9040
±0.0570 best reported | best at pub: Understanding Isomorphism Bias in Graph Data Sets (2019) best today: How Powerful are $K$-hop Message Passing Graph Neural Networks (NeurIPS 2022) |
| 158 | GraphSAGE | 0.9040
±0.0780 best reported | best at pub: Graph Neural Networks With Convolutional ARMA Filters (2019) best today: Asynchronous Neural Networks for Learning in Graphs (2022) Difference within reported uncertainty; not counted as underperformance. |
| 175 | RetGK | 0.9030
±0.0110 | This paper |
| 202 | GMT | 0.8990
±0.0420 best reported | best today: Graph Classification via Reference Distribution Learning: Theory and Practice (NeurIPS 2024) |
| 216 | M-GCL | 0.8970
±0.0110 | This paper |
| 230 | SGN | 0.8950
±0.0740 | This paper |
| 257 | InfoGraph | 0.8930
±0.0514 best reported | best at pub: Graph Contrastive Learning Automated (ICML 2021) best today: Improving Expressivity of GNNs with Subgraph-specific Factor Embedded Normalization (KDD 2023) Difference within reported uncertainty; not counted as underperformance. |
| 301 | CapsGNN | 0.8867
±0.0688 best reported | best at pub: Molecular Representation Learning via Heterogeneous Motif Graph Neural Networks (ICML 2022) best today: Towards Better Graph Representation Learning with Parameterized Decomposition & Filtering (ICML 2023) Difference within reported uncertainty; not counted as underperformance. |
| 335 | ndp | 0.8790
±0.0570 | This paper |
| 354 | GraphCL | 0.8766
±0.0103 best reported | best at pub: Graph Masked Autoencoders with Transformers (2022) Difference within reported uncertainty; not counted as underperformance. |
| 365 | DGK | 0.8744
±0.0272 best reported | best at pub: Provably Powerful Graph Networks (NeurIPS 2019) best today: Model-Driven Graph Contrastive Learning (2025) Difference within reported uncertainty; not counted as underperformance. |
| 382 | DAGCN | 0.8720
±0.0610 | This paper |
| 403 | MLP | 0.8660
±0.0495 | |
| 419 | GXN | 0.8610
±0.0830 | prev best: Multi-grained Semantics-aware Graph Neural Networks (2020) Improvement within reported uncertainty; not highlighted. |
| 506 | GK | 0.8350
±0.0060 | prev best: Contrastive Multi-View Representation Learning on Graphs (ICML 2020) Improvement within reported uncertainty; not highlighted. |
| 623 | SAGPool | 0.7986
±0.0236 best reported | best at pub: Graph Neural Networks in TensorFlow and Keras with Spektral (2020) best today: Embedding Graphs on Grassmann Manifold (2022) Difference within reported uncertainty; not counted as underperformance. |
