Bayesian Contrastive Learning On Topological Structures