Revisiting Positive Samples in Graph Contrastive Learning: From the Perspective of Message Passing
Abstract
Graph Contrastive Learning (GCL), which trains graph encoders by maximizing similarity between positive samples and minimizing it between negative ones, has emerged as a mainstream graph pre-training paradigm. It is widely recognized that positive samples are essential in GCLs. Ideally, maximizing the similarity of positive samples enables graph encoders to capture intrinsic semantic and patterns of graph data. However, we discover an interesting phenomenon: GCLs can achieve competitive performance even without positive samples. This motivates us to revisit the fundamental mechanism of positive samples in GCLs. From the perspective of Dirichlet energy, we theoretically finds that message passing, a key mechanism in graph encoders, trivializes the maximization of positive samples, preventing GCLs from effectively learning from positive samples. To address this, we propose SPGCL to mitigate the trivialization caused by message passing and restore the learning efficacy of positive samples. Specifically, we find that high Dirichlet energy features help positive samples provide effective learning signals while low Dirichlet energy features contribute little to positive learning signal but is useful for positive sampling. Based on this, SPGCL propagates only high Dirichlet energy features and uses low energy features to construct a probability matrix for reliable positive sampling. Extensive experiments demonstrate the effectiveness of SPGCL.
Lay Summary
Graph contrastive learning is a common pre-training approach for graph data. It usually trains a model by making positive samples more similar and negative samples less similar. Positive samples are therefore often regarded as the key source of learning signal. In this paper, we observe that graph contrastive learning can still achieve competitive results even when positive samples are removed. This motivates us to reconsider the role of positive samples. We show that message passing in graph encoders can make the similarity maximization of positive samples nearly trivial, so positive samples may provide much weaker learning signals than expected. To address this problem, we propose SPGCL. Our method uses Dirichlet energy to distinguish features that are useful for positive-sample learning from those that mainly help with positive-sample selection. Based on this, SPGCL selectively propagates features and constructs more reliable positive samples. Extensive experiments demonstrate the effectiveness of SPGCL.