Heterogeneous graph contrastive learning based on positive and negative sample selection
Contrastive learning applied to heterogeneous graph can effectively avoid dependency on labeled data during the training process.Even without relying on a large number of labeled samples,it can still extract complex structures and rich semantics from heterogeneous graph,demonstrating superior performance in tasks such as node classification and node clustering.Existing heterogeneous graph contrastive models directly construct contrastive views based on meta-paths to capture the semantics and sequential relationships between objects.However,such approaches often ignore the local structure of the network,and the target node does not fully integrate information from all first-order neighbor nodes.Moreover,limited to a single positive sample,they can't distinguish the correctness of negative samples,leading to gradient vanishing or incomplete learning content.To address these issues,this paper proposes a heterogeneous graph contrastive learning model based on the selection of positive and negative samples.Firstly,the model constructs network pattern views and meta-path views to preserve the local structure and higher-order structure of the heterogeneous graph.Secondly,using nodes in the network pattern view as anchor nodes,positive and negative samples are constructed in the meta-path view,and the weights of negative samples are learned based on the similarity of the samples.Finally,extensive experiments are conducted to demonstrate that the proposed model outperforms the current state-of-the-art methods.