Bayesian Gated Non-Negative Contrastive Learning

Peng Cui, Jiahao Zhang, Lijie Hu
5/27/2026
cs.CVcs.AI
contrastive-sslbayesian

Official code: Cui-Peng-624/BayesNCL (2 stars, Python, last commit 2026-05-25).

Abstract

While Contrastive Learning (CL) has revolutionized self-supervised representation learning, its latent representations remain highly entangled and opaque, limiting their interpretability in safety-critical applications. We identify that a fundamental cause of this entanglement is the reliance on deterministic similarity measures, which treat all feature dimensions equally.

Show full abstract

In compositional scenes, this creates an Optimization Conflict: common background features, such as, "blue sky", are encouraged to align in positive pairs but simultaneously repelled in negative pairs, causing gradient oscillations that hinder precise semantic disentanglement. To address this, we propose BayesNCL (Bayesian Gated Non-Negative Contrastive Learning). Unlike standard approaches, BayesNCL introduces a probabilistic gating mechanism that dynamically filters out task-irrelevant, high-frequency common features while selectively retaining discriminative semantics. By formalizing feature selection as a variational inference problem with a sparse Bernoulli prior, our method effectively resolves the optimization conflict. Empirical experimental results on Imagenet-100 demonstrate that BayesNCL achieves a remarkable 142.1% improvement in semantic consistency compared to state-of-the-art baselines, yielding highly interpretable representations without compromising downstream task performance. Code is available at https://github.com/Cui-Peng-624/BayesNCL.

View on arXivView PDF

Code Implementations(1)

Official Code for ICML 2026 Paper: Bayesian Gated Non-Negative Contrastive Learning

20PythonMay 25, 20266 months ago

Similar Papers

Cite this paper

@article{cui2026bayesian,
  title  = {Bayesian Gated Non-Negative Contrastive Learning},
  author = {Peng Cui and Jiahao Zhang and Lijie Hu},
  year   = {2026},
  eprint = {2605.28441},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2605.28441v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2605.28441.svg)](https://codeofpaper.com/paper/2605.28441)

Discussion