Papers › Improved Universal Sentence Embeddings with Prompt-based Contrastive Learning and...

Improved Universal Sentence Embeddings with Prompt-based Contrastive Learning and Energy-based Learning

14 Mar 2022arXiv:2203.06875archive 2025-07-28

Yuxin Jiang, Linhan Zhang, Wei Wang

Contrastive learning has been demonstrated to be effective in enhancing pre-trained language models (PLMs) to derive superior universal sentence embeddings. However, existing contrastive methods still have two limitations. Firstly, previous works may acquire poor performance under domain shift settings, thus hindering the application of sentence representations in practice. We attribute this low performance to the over-parameterization of PLMs with millions of parameters. To alleviate it, we propose PromCSE (Prompt-based Contrastive Learning for Sentence Embeddings), which only trains small-scale Soft Prompt (i.e., a set of trainable vectors) while keeping PLMs fixed. Secondly, the commonly used NT-Xent loss function of contrastive learning does not fully exploit hard negatives in supervised learning settings. To this end, we propose to integrate an Energy-based Hinge loss to enhance the pairwise discriminative power, inspired by the connection between the NT-Xent loss and the Energy-based Learning paradigm. Empirical results on seven standard semantic textual similarity (STS) tasks and a domain-shifted STS task both show the effectiveness of our method compared with the current state-of-the-art sentence embedding models. Our code is publicly avaliable at https://github.com/YJiangcm/PromCSE

PaperPDFCode

In Syntology View this paper on Syntology, its page in Syntology's graph. That page lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

yjiangcm/promcse officialmentioned in papermentioned on GitHubpytorchSyntology: no sample linked to this paper (harvested for another paper). Syntology's graph links these samples to Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks (arXiv:1908.10084; that paper's own run record: 33 ran (of which 9 constructed an object rather than computing a result; 30 with no instrument failure: 1 honoured, 0 violated, 29 with no contract checked; 3 where Syntology's instrument failed) · 25 unverified); nothing checks that they implement this paper's method. report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

A paper named beside a repository with no sample linked to this paper is shown with that paper's own run record, not this paper's: “ran” means executed on a synthesized input, not that the code is correct, and “where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Papers are listed in arXiv-id order, at most three per repository.

Code Syntology ran Syntology

Not run by Syntology. Nothing on this page verifies that the listed code works.

Tasks

AttributeContrastive LearningSTSSemantic Textual SimilaritySentenceSentence Embeddings

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Semantic Textual Similarity CxC PromCSE-RoBERTa-large (0.355B) avg ± std 74.8± 1.0 #1 of 4 Archive leaderboard report
Semantic Textual Similarity SICK PromCSE-RoBERTa-large (0.355B) Spearman Correlation 0.8243 #1 of 22 Archive leaderboard report
Semantic Textual Similarity STS Benchmark PromCSE-RoBERTa-large (0.355B) Spearman Correlation 0.8787 #38 of 66 Archive leaderboard report
Semantic Textual Similarity STS12 PromCSE-RoBERTa-large (0.355B) Spearman Correlation 0.7956 #3 of 20 Archive leaderboard report
Semantic Textual Similarity STS13 PromCSE-RoBERTa-large (0.355B) Spearman Correlation 0.8897 #6 of 22 Archive leaderboard report
Semantic Textual Similarity STS14 PromCSE-RoBERTa-large (0.355B) Spearman Correlation 0.8381 #7 of 21 Archive leaderboard report
Semantic Textual Similarity STS15 PromCSE-RoBERTa-large (0.355B) Spearman Correlation 0.8808 #8 of 20 Archive leaderboard report
Semantic Textual Similarity STS16 PromCSE-RoBERTa-large (0.355B) Spearman Correlation 0.8496 #8 of 20 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Contrastive LearningNT-XentSimCSE

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections