Divergence-Based Similarity Function for Multi-View Contrastive Learning

Jaeheyoung Jeon, Cheolsu Lim, Myungjoo KangarXiv 2025 · DOI

Introduction

Contrastive learning has emerged as a powerful paradigm for self-supervised representation learning. Traditionally, these methods rely on comparing pairs of data "views" (augmentations) using cosine similarity. However, as researchers move toward multi-view setups (using three or more augmentations), standard pairwise approaches struggle to capture the collective geometric relationships between all views simultaneously. This paper introduces the Divergence-based Similarity Function (DSF), a novel approach that models a set of augmented views as a probability distribution on a hypersphere, leading to faster convergence and improved accuracy.

The Limitations of Pairwise Similarity

In standard self-supervised learning, models like SimCLR or MoCo bring representations of different views of the same image closer together. Current multi-view methods typically adopt one of two "pairwise-centric" strategies:

  1. Loss Averaging: Calculating the loss between every possible pair of views and averaging the results.
  2. Feature Averaging: Averaging the feature vectors themselves before calculating a single loss.

The authors argue that these methods fail to capture the joint structure of the data. Furthermore, standard cosine similarity is highly sensitive to the "temperature" hyperparameter ($\tau$), requiring extensive manual tuning to balance the model's focus on hard versus easy negative samples.

Proposed Method: Divergence-based Similarity Function (DSF)

Instead of point-to-point comparison, DSF shifts to distribution-to-distribution comparison.

Comparison of multi-view contrastive learning strategies: Loss Averaging, Feature Averaging, and the proposed Divergence-based Similarity Function (DSF).

1. Distribution Modeling

The core idea is to treat a group of $m$ views as samples from a von Mises-Fisher (vMF) distribution. A vMF distribution is essentially the hyperspherical equivalent of a Gaussian distribution, defined by a mean direction ($\mu$) and a concentration parameter ($\kappa$).

2. Similarity via KL Divergence

Similarity is defined as the negative Kullback–Leibler (KL) divergence between two estimated vMF distributions. If two sets of views originate from the same image, their distributions should overlap significantly, resulting in low divergence.

3. Temperature-Free Learning

Mathematically, the authors demonstrate that DSF inherently handles the scaling typically provided by the temperature parameter $\tau$. This makes the loss "temperature-free," allowing it to work effectively with a default setting of 1 and removing a significant hurdle in hyperparameter optimization.

Key Results and Performance

The researchers evaluated DSF across standard benchmarks including CIFAR-10, ImageNet-100, and several transfer learning tasks.

Performance comparison showing kNN and Linear Evaluation accuracy versus training time. DSF achieves higher accuracy in significantly less time than baselines.
  • Accuracy Boost: On ImageNet-100, DSF achieved 79.00% kNN accuracy, significantly outperforming the MoCo v3 baseline (74.08%) and other multi-view strategies like Loss Averaging (76.62%).
  • Rapid Convergence: DSF achieves similar accuracy to baselines in roughly 20% of the training time. In kNN settings, it reached convergence 2x faster, and for linear evaluation, the speedup was 3x.
  • Robustness: DSF showed superior resilience to image corruptions (noise, blur, etc.), achieving a Mean Corruption Error (mCE) of 33.15 on ImageNet-100-C, compared to the baseline's 36.67.
  • Generalization: The method consistently outperformed baselines across downstream tasks like Food-101 and Oxford-IIIT Pets, indicating that the learned features are more robust and general-purpose.

Conclusion

By modeling augmented features as a distribution rather than isolated points, DSF provides a richer gradient signal that captures the joint structure of data views. This approach not only eliminates the need for temperature tuning but also provides a significant leap in training efficiency and representation quality. Future work may explore other types of $f$-divergences and deeper theoretical behaviors in extremely high-dimensional regimes.

Summary updated

BibTeX
@misc{jeon2025divergence,
  author = {Jaeheyoung Jeon and Cheolsu Lim and Myungjoo Kang},
  title = {{Divergence-Based Similarity Function for Multi-View Contrastive Learning}},
  year = {2025},
  eprint = {2507.06560},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2507.06560},
}
Figure