Towards Better Understanding of Contrastive Sentence Representation Learning: A Unified Paradigm for Gradient

Mingxin Li, Richong Zhang, Zhijie Nie
2/28/2024
cs.CL

No official code found. Best implementation: BDBC-KG-NLP/UnderstandingCSE (3 stars, MIT, last commit 2024-06-13).

Abstract

Sentence Representation Learning (SRL) is a crucial task in Natural Language Processing (NLP), where contrastive Self-Supervised Learning (SSL) is currently a mainstream approach. However, the reasons behind its remarkable effectiveness remain unclear. Specifically, many studies have investigated the similarities between contrastive and non-contrastive SSL from a theoretical perspective. Such similarities can be verified in classification tasks, where the two approaches achieve comparable performance. But in ranking tasks (i.e., Semantic Textual Similarity (STS) in SRL), contrastive SSL significantly outperforms non-contrastive SSL. Therefore, two questions arise: First, *what commonalities enable various contrastive losses to achieve superior performance in STS?* Second, *how can we make non-contrastive SSL also effective in STS?* To address these questions, we start from the perspective of gradients and discover that four effective contrastive losses can be integrated into a unified paradigm, which depends on three components: the **Gradient Dissipation**, the **Weight**, and the **Ratio**. Then, we conduct an in-depth analysis of the roles these components play in optimization and experimentally demonstrate their significance for model performance. Finally, by adjusting these components, we enable non-contrastive SSL to achieve outstanding performance in STS.

View on arXivView PDF

Code Implementations(1)

MIT

Official Implementation of Paper *Towards Better Understanding of Contrastive Sentence Representation Learning: A Unified Paradigm for Gradient*

30Shell, PythonJun 5, 20242 years agoMIT

Similar Papers

Cite this paper

@article{li2024towards,
  title  = {Towards Better Understanding of Contrastive Sentence Representation Learning: A Unified Paradigm for Gradient},
  author = {Mingxin Li and Richong Zhang and Zhijie Nie},
  year   = {2024},
  eprint = {2402.18281},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2402.18281v2}
}

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/2402.18281.svg)](https://codeofpaper.com/paper/2402.18281)

Discussion