From Overfitting to Robustness: Quantity, Quality, and Variety Oriented Negative Sample Selection in Graph Contrastive Learning
Adnan Ali, Jinlong Li, Huanhuan Chen, Ali Kashif Bashir
TL;DR
This work tackles overfitting in graph contrastive learning caused by negative sampling by introducing NegAmplify and its Cumulative Sample Selection (CSS). NegAmplify partitions negatives into easy, medium, and hard pools and uses a decision agent to adaptively adjust sampling quantity across training epochs, balancing quality, quantity, and diversity. Empirical results across nine graph datasets show NegAmplify improves seven datasets' node classification accuracy (up to 2.86% on CiteSeer) and generally outperforms many SOTA baselines, with CSS outperforming alternative sampling strategies. The findings reveal that dataset density influences optimal negative-sample quantity, highlighting the practical importance of controlled negative sampling in GCL.
Abstract
Graph contrastive learning (GCL) aims to contrast positive-negative counterparts to learn the node embeddings, whereas graph data augmentation methods are employed to generate these positive-negative samples. The variation, quantity, and quality of negative samples compared to positive samples play crucial roles in learning meaningful embeddings for node classification downstream tasks. Less variation, excessive quantity, and low-quality negative samples cause the model to be overfitted for particular nodes, resulting in less robust models. To solve the overfitting problem in the GCL paradigm, this study proposes a novel Cumulative Sample Selection (CSS) algorithm by comprehensively considering negative samples' quality, variations, and quantity. Initially, three negative sample pools are constructed: easy, medium, and hard negative samples, which contain 25%, 50%, and 25% of the total available negative samples, respectively. Then, 10% negative samples are selected from each of these three negative sample pools for training the model. After that, a decision agent module evaluates model training results and decides whether to explore more negative samples from three negative sample pools by increasing the ratio or keep exploiting the current sampling ratio. The proposed algorithm is integrated into a proposed graph contrastive learning framework named NegAmplify. NegAmplify is compared with the SOTA methods on nine graph node classification datasets, with seven achieving better node classification accuracy with up to 2.86% improvement.
