salesforce / PCL

PyTorch code for "Prototypical Contrastive Learning of Unsupervised Representations"
MIT License
570 stars 83 forks source link

Imbalanced datasets #15

Closed millanp95 closed 2 years ago

millanp95 commented 2 years ago

Hi,

Thank you for this implementation. It is my understanding that some contrastive frameworks build upon entropy maximization which leads to inapplicability in the contexts of imbalanced datasets. I don't see the direct connection between the ProtoNCE loss and the entropy so I was wondering, does this method support imbalanced datasets?

Thanks

LiJunnan1992 commented 2 years ago

Hi, thanks for your question.

ProtoNCE should be able to support imbalanced datasets, since it is an unsupervised learning method which is unaware of the class distribution.