Abstract
Contrastive learning has emerged as a powerful tool for graph representation learning. However, most contrastive learning methods learn features of graphs with fixed coarse-grained scale, which might underestimate either local or global information. To capture more hierarchical and richer representation, we propose a novel Hierarchical Contrastive Learning (HCL) framework that explicitly learns graph representation in a hierarchical manner. Specifically, HCL includes two key components: a novel adaptive Learning to Pool (L2Pool) method to construct more reasonable multi-scale graph topology for more comprehensive contrastive objective, a novel multi-channel pseudo-siamese network to further enable more expressive learning of mutual information within each scale. Comprehensive experimental results show HCL achieves competitive performance on 12 datasets involving node classification, node clustering and graph classification. In addition, the visualization of learned representation reveals that HCL successfully captures meaningful characteristics of graphs.
The Challenge of Scale in Graph Contrastive Learning
Graph Contrastive Learning (GCL) has become a cornerstone of unsupervised learning on graph-structured data. By maximizing mutual information between different views of a graph, GCL models learn robust node and graph-level embeddings. However, a significant limitation persists: most existing methods operate at a fixed, typically fine-grained (node-level) scale.
Graphs are inherently hierarchical. Nodes aggregate into motifs, which form subgraphs or communities, eventually constituting the global topology. A model restricted to node-level views risks missing the "big picture" of global structure. Conversely, focusing solely on global summaries can ignore critical local nuances. Furthermore, many GCL methods rely heavily on negative sampling to prevent representation collapse, which introduces significant computational overhead and hyperparameter sensitivity.
The Hierarchical Contrastive Learning (HCL) Framework
To address these issues, we introduce the Hierarchical Contrastive Learning (HCL) framework. HCL is designed to "see both the forest and the trees" by explicitly learning representations across multiple scales simultaneously.
The framework utilizes a multi-scale graph hierarchy where the input graph is progressively coarsened. At each level of the hierarchy, a Multi-channel Pseudo-Siamese Network is employed. Unlike standard Siamese networks that share weights between branches, the Pseudo-Siamese approach uses independent weights. This added flexibility allows the model to capture more complex mutual information (MI) within each scale, effectively "bootstrapping" features more efficiently.
Adaptive Learning to Pool (L2Pool)
A critical component of HCL is the method used to transition between hierarchical levels. Traditional pooling methods, such as simple mean-pooling, are often "topology-blind," ignoring the structural relationships between nodes.
HCL introduces Learning to Pool (L2Pool), an adaptive coarsening mechanism. L2Pool leverages Transformer-style multi-head self-attention, but with a crucial enhancement: it incorporates topological information via GCNII. GCNII is a GNN variant capable of handling deep layers without the common pitfall of "over-smoothing." By integrating GCNII, L2Pool ensures that node selection for the next hierarchical level is informed by both feature similarity and structural importance. This results in a more representative and structurally sound multi-scale topology.
Experimental Evaluation and Key Insights
The HCL framework was rigorously tested across 12 benchmark datasets, covering node classification, node clustering, and graph classification. These included citation networks (Cora, Citeseer, Pubmed), co-purchase networks (Amazon-Computers, Amazon-Photo), social networks (IMDB-B, REDDIT-B), and bioinformatics datasets (MUTAG).
Performance Highlights
- Node Classification: HCL demonstrated superior performance, particularly on the Amazon-Computers dataset, achieving 84.0% accuracy—a 3.1% relative improvement over previous state-of-the-art unsupervised methods.
- Graph Classification: On the REDDIT-B dataset, HCL reached 91.9% accuracy, outperforming several supervised baselines and highlighting the power of hierarchical features.
- Clustering: The model showed significant gains in Adjusted Rand Index (ARI). For instance, on Cora, HCL achieved an ARI of 0.536, compared to 0.495 for MVGRL, indicating the learning of more distinct and separable clusters.
Key Insights
The success of HCL stems from two main ideas. First, hierarchy is a feature: intermediate scales (subgraphs) contain unique structural information not present in the raw nodes or the global summary. Second, topology-aware attention ensures that the coarsening process preserves the essential shape and functional roles within the graph.
Conclusion
HCL provides a robust framework for capturing the multi-faceted nature of graph data. By combining adaptive pooling with a flexible multi-channel architecture, it sets new benchmarks for unsupervised graph representation learning. While the computational complexity of recursive pooling remains a consideration for massive graphs, HCL's ability to capture hierarchical patterns opens new avenues for more expressive and generalizable graph models.
Summary updated