HNCSE: Advancing Sentence Embeddings via Hybrid Contrastive Learning with Hard Negatives

Wenxiao Liu, Zihong Yang, Chaozhuo Li, Zijin Hong, Jianfeng Ma +3 more
11/19/2024
cs.CLcs.AI

No confident code implementation found for this paper.

Abstract

Unsupervised sentence representation learning remains a critical challenge in modern natural language processing (NLP) research. Recently, contrastive learning techniques have achieved significant success in addressing this issue by effectively capturing textual semantics. Many such approaches prioritize the optimization using negative samples. In fields such as computer vision, hard negative samples (samples that are close to the decision boundary and thus more difficult to distinguish) have been shown to enhance representation learning. However, adapting hard negatives to contrastive sentence learning is complex due to the intricate syntactic and semantic details of text. To address this problem, we propose HNCSE, a novel contrastive learning framework that extends the leading SimCSE approach. The hallmark of HNCSE is its innovative use of hard negative samples to enhance the learning of both positive and negative samples, thereby achieving a deeper semantic understanding. Empirical tests on semantic textual similarity and transfer task datasets validate the superiority of HNCSE.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{liu2024hncse,
  title  = {HNCSE: Advancing Sentence Embeddings via Hybrid Contrastive Learning with Hard Negatives},
  author = {Wenxiao Liu and Zihong Yang and Chaozhuo Li and Zijin Hong and Jianfeng Ma and Zhiquan Liu and Litian Zhang and Feiran Huang},
  year   = {2024},
  eprint = {2411.12156},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2411.12156v1}
}

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

Discussion