Recent advances in self-supervised contrastive learning approaches for computer vision including MoCo , SimCLR and SwAV have opened up new opportunities for learning visual representations without manual annotations. In natural image classification, these approaches provide comparable results to those obtained using supervised learning. Herein, we demonstrate that contrastive learning may be used to overcome the existing gap in the classification of MSI data due to the limited data size. We introduce a robust self-supervised clustering approach, which enables efficient colocalization of molecules in individual MSI data by retraining a CNN and learning representations of high-level molecular features in these data.