Abstract
Graph-level contrastive learning, aiming to learn the representations for each graph by contrasting two augmented graphs, has attracted considerable attention. Previous studies usually simply assume that a graph and its augmented graph as a positive pair, otherwise as a negative pair. However, it is well known that graph structure is always complex and multi-scale, which gives rise to a fundamental question: after graph augmentation, will the previous assumption still hold in reality? By an experimental analysis, we discover the semantic information of an augmented graph structure may be not consistent as original graph structure, and whether two augmented graphs are positive or negative pairs is highly related with the multi-scale structures. Based on this finding, we propose a multi-scale subgraph contrastive learning architecture which is able to characterize the fine-grained semantic information. Specifically, we generate global and local views at different scales based on subgraph sampling, and construct multiple contrastive relationships according to their semantic associations to provide richer self-supervised signals. Extensive experiments and parametric analyzes on eight graph classification real-world datasets well demonstrate the effectiveness of the proposed method.
Introduction
Graph Contrastive Learning (GCL) has emerged as a powerful paradigm for self-supervised representation learning on graphs. The standard approach involves creating two augmented views of a graph—through methods like node dropping or subgraph sampling—and training a model to maximize the similarity between these views (positive pairs) while minimizing similarity with views from other graphs (negative pairs).
However, this approach relies on a critical assumption borrowed from computer vision: that an augmentation preserves the semantic identity of the original object. While a cropped image of a dog is typically still recognizable as a dog, graphs are fundamentally different. In chemical or social networks, a small subgraph (a "crop") might represent a functional group or a community with entirely different properties than the global structure. Multi-Scale Subgraph Contrastive Learning (MSSGCL) addresses this "one-size-fits-all" fallacy by recognizing that semantic consistency is inherently tied to the scale of the subgraph.
The Semantic Inconsistency of Subgraphs
To validate their hypothesis, the authors conducted an experimental analysis measuring the semantic similarity between subgraphs of varying sizes and their parent graphs.
As shown in the figure above, semantic similarity is positively correlated with subgraph size. Large subgraphs (global views) maintain high similarity to the original graph with low variance. Conversely, small subgraphs (local views) exhibit lower average similarity and significantly higher variance, indicating they capture diverse, fine-grained features that may not represent the global graph's semantics. This finding suggests that treating all subgraphs as identical positive pairs introduces noise into the learning process.
Methodology: MSSGCL
MSSGCL introduces a hierarchical contrastive strategy that treats augmentations differently based on their scale:
- Multi-Scale Sampling: The model generates Global Views (large subgraphs, ~80-90% of nodes) and Local Views (small subgraphs, ~10-20% of nodes).
- Hierarchical Contrastive Loss: Three distinct relationships are optimized:
- Global-to-Global ($L_{gg}$): Large subgraphs are treated as traditional positive pairs, as they retain global context.
- Global-to-Local ($L_{gl}$): Local views are pulled toward their parent global views, teaching the model that the local feature is a constituent part of the global whole.
- Local-to-Local ($L_{ll}$): Crucially, the model encourages dissimilarity between two small subgraphs from the same graph. This forces the model to learn the unique, diverse substructures (e.g., different functional groups in a molecule) rather than averaging them.
- Learnable Similarity Regressor: Instead of relying solely on fixed metrics like cosine similarity, MSSGCL employs a learnable regressor to provide a more flexible signal for measuring local-view associations.
Experimental Results
The model was evaluated on eight datasets from the TUDataset benchmark, including biochemical molecules (MUTAG, NCI1, PROTEINS, DD) and social networks (IMDB-B, COLLAB, Reddit).
Unsupervised and Semi-Supervised Performance
MSSGCL achieved state-of-the-art results across both settings:
- Unsupervised Learning: Outperformed 10 competitive baselines (e.g., GraphCL, SimGRACE) on all datasets, reaching an average accuracy of 77.52%.
- Semi-Supervised Learning: In scenarios with limited labels (1% or 10%), MSSGCL consistently surpassed other pre-training methods. At 10% labeling, it showed a 2% average accuracy improvement over GraphCL.
Ablation Studies
Ablation tests confirmed that the "Local-to-Local" dissimilarity term is vital. Removing it led to a performance drop, proving that embracing local diversity is key to learning robust graph-level representations.
Conclusion
MSSGCL demonstrates that graph augmentations are not semantically invariant across scales. By moving beyond the simple "positive pair" assumption and adopting a scale-aware, hierarchical contrastive strategy, the model captures both global context and fine-grained local diversity. Future work may involve refining the definitions of "local" and "global" using domain-specific knowledge, such as chemical motifs, to further enhance the sampling process.
Summary updated