Exploring the Impact of Negative Samples of Contrastive Learning: A Case Study of Sentence Embedding

02/26/2022
by   Rui Cao, et al.
0

Contrastive learning is emerging as a powerful technique for extracting knowledge from unlabeled data. This technique requires a balanced mixture of two ingredients: positive (similar) and negative (dissimilar) samples. This is typically achieved by maintaining a queue of negative samples during training. Prior works in the area typically uses a fixed-length negative sample queue, but how the negative sample size affects the model performance remains unclear. The opaque impact of the number of negative samples on performance when employing contrastive learning aroused our in-depth exploration. This paper presents a momentum contrastive learning model with negative sample queue for sentence embedding, namely MoCoSE. We add the prediction layer to the online branch to make the model asymmetric and together with EMA update mechanism of the target branch to prevent model from collapsing. We define a maximum traceable distance metric, through which we learn to what extent the text contrastive learning benefits from the historical information of negative samples. Our experiments find that the best results are obtained when the maximum traceable distance is at a certain range, demonstrating that there is an optimal range of historical information for a negative sample queue. We evaluate the proposed unsupervised MoCoSE on the semantic text similarity (STS) task and obtain an average Spearman's correlation of 77.27%. Source code is available at https://github.com/xbdxwyh/mocose

READ FULL TEXT

page 1

page 2

page 3

page 4

research
11/07/2022

Contrastive Learning with Prompt-derived Virtual Semantic Prototypes for Unsupervised Sentence Embedding

Contrastive learning has become a new paradigm for unsupervised sentence...
research
10/08/2022

InfoCSE: Information-aggregated Contrastive Learning of Sentence Embeddings

Contrastive learning has been extensively studied in sentence embedding ...
research
07/12/2023

Contrastive Learning for Conversion Rate Prediction

Conversion rate (CVR) prediction plays an important role in advertising ...
research
03/30/2022

Dual Temperature Helps Contrastive Learning Without Many Negative Samples: Towards Understanding and Simplifying MoCo

Contrastive learning (CL) is widely known to require many negative sampl...
research
03/17/2022

Modulated Contrast for Versatile Image Synthesis

Perceiving the similarity between images has been a long-standing and fu...
research
02/09/2023

Detecting Contextomized Quotes in News Headlines by Contrastive Learning

Quotes are critical for establishing credibility in news articles. A dir...
research
09/09/2021

Smoothed Contrastive Learning for Unsupervised Sentence Embedding

Contrastive learning has been gradually applied to learn high-quality un...

Please sign up or login with your details

Forgot password? Click here to reset