Papers
Topics
Authors
Recent
Gemini 2.5 Flash
Gemini 2.5 Flash
41 tokens/sec
GPT-4o
59 tokens/sec
Gemini 2.5 Pro Pro
41 tokens/sec
o3 Pro
7 tokens/sec
GPT-4.1 Pro
50 tokens/sec
DeepSeek R1 via Azure Pro
28 tokens/sec
2000 character limit reached

Batch-Softmax Contrastive Loss for Pairwise Sentence Scoring Tasks (2110.15725v1)

Published 10 Oct 2021 in cs.CL, cs.AI, cs.IR, cs.LG, and cs.NE

Abstract: The use of contrastive loss for representation learning has become prominent in computer vision, and it is now getting attention in NLP. Here, we explore the idea of using a batch-softmax contrastive loss when fine-tuning large-scale pre-trained transformer models to learn better task-specific sentence embeddings for pairwise sentence scoring tasks. We introduce and study a number of variations in the calculation of the loss as well as in the overall training procedure; in particular, we find that data shuffling can be quite important. Our experimental results show sizable improvements on a number of datasets and pairwise sentence scoring tasks including classification, ranking, and regression. Finally, we offer detailed analysis and discussion, which should be useful for researchers aiming to explore the utility of contrastive loss in NLP.

User Edit Pencil Streamline Icon: https://streamlinehq.com
Authors (4)
  1. Anton Chernyavskiy (5 papers)
  2. Dmitry Ilvovsky (7 papers)
  3. Pavel Kalinin (2 papers)
  4. Preslav Nakov (253 papers)
Citations (7)