Abstract
Existing graph contrastive learning (GCL) techniques typically require two forward passes for a single instance to construct the contrastive loss, which is effective for capturing the low-frequency signals of node features. Such a dual-pass design has shown empirical success on homophilic graphs, but its effectiveness on heterophilic graphs, where directly connected nodes typically have different labels, is unknown. In addition, existing GCL approaches fail to provide strong performance guarantees. Coupled with the unpredictability of GCL approaches on heterophilic graphs, their applicability in real-world contexts is limited. Then, a natural question arises: Can we design a GCL method that works for both homophilic and heterophilic graphs with a performance guarantee? To answer this question, we theoretically study the concentration property of features obtained by neighborhood aggregation on homophilic and heterophilic graphs, introduce the single-pass graph contrastive learning loss based on the property, and provide performance guarantees for the minimizer of the loss on downstream tasks. As a direct consequence of our analysis, we implement the Single-Pass Graph Contrastive Learning method (SP-GCL). Empirically, on 14 benchmark datasets with varying degrees of homophily, the features learned by the SP-GCL can match or outperform existing strong baselines with significantly less computational overhead, which demonstrates the usefulness of our findings in real-world cases.
Introduction
Graph Contrastive Learning (GCL) has emerged as a powerful paradigm for learning node representations without manual labels. However, standard GCL frameworks suffer from two significant "hidden costs." First is the Dual-Pass Requirement: most methods necessitate two forward passes through a neural network to compare different "views" of the same graph, effectively doubling the computational load. Second is the Homophily Bias: traditional GCL assumes that connected nodes share the same label. In many real-world scenarios, such as fraud detection or chemical interaction networks, graphs exhibit heterophily, where connected nodes are often dissimilar. Existing GCL methods frequently underperform or lack theoretical guarantees in these "opposites attract" scenarios.
Methodology: SP-GCL
To address these limitations, the authors introduce SP-GCL, a method that is both single-pass and augmentation-free. The core innovation lies in the Concentration Property: the researchers proved that neighborhood aggregation—the fundamental mechanism of Graph Neural Networks (GNNs)—causes node representations of the same class to concentrate in the embedding space, regardless of whether the graph is homophilic or heterophilic.
Instead of comparing a node to an augmented version of itself, SP-GCL identifies the $K$ nearest nodes in the current embedding space as "positive pairs" and random nodes as "negative pairs." This approach eliminates the need for manual augmentation design, which typically requires significant domain expertise.
Theoretical Insights: The Transformed Graph
A key theoretical contribution is the bridge between the contrastive loss and Matrix Factorization (MF) on a conceptual "transformed graph." The authors demonstrate that SP-GCL effectively learns by constructing a graph where edges represent feature similarity rather than raw connectivity. This transformed graph naturally exhibits higher homophily than the original, significantly simplifying downstream classification tasks.
Empirical Results
The study evaluated SP-GCL across 14 benchmark datasets, including 8 homophilic graphs (e.g., Cora, CiteSeer) and 6 heterophilic graphs (e.g., Chameleon, Squirrel).
- Performance: SP-GCL outperformed state-of-the-art GCL baselines on all 6 heterophilic datasets and remained highly competitive on homophilic graphs.
- Efficiency: By removing the second forward pass and graph augmentations, SP-GCL achieved massive speedups and memory savings. For instance, on the Coauthor CS dataset, SP-GCL required only 2.07 GB of GPU memory, compared to 13.21 GB for the popular GRACE method.
- Versatility: The method proved to be backbone-agnostic, working effectively with various GNN architectures like GCN, GAT, and GIN.
Conclusion
SP-GCL demonstrates that efficient, single-pass contrastive learning is not only possible but superior for diverse graph structures. While the theoretical framework currently relies on a contextual stochastic block model assumption, the empirical success across 14 datasets suggests broad applicability. Future work may involve integrating specialized heterophilic GNN backbones to further push the performance boundaries of this efficient framework.
Summary updated