PyGCL / PyGCL

PyGCL: A PyTorch Library for Graph Contrastive Learning

Home Page:https://PyGCL.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

label leakage

zhandand opened this issue · comments

z, _, _ = encoder_model(data)

In the supervised contrastive learning, the nodes with the same labels are collected as the postive pairs. So in my opinion, in the constrative pretraining stage, we can't utilize all the data, otherwise the labels are leaked in the tuning stage

Sorry, my mistake. It seems that you have dealt with this problem

extra_pos_mask[~data.train_mask][:, ~data.train_mask] = False