
摘要
BERT(Devlin等人,2018年)和RoBERTa(Liu等人,2019年)在诸如语义文本相似度(STS)等句子对回归任务中取得了新的最先进性能。然而,这些模型需要将两个句子同时输入网络,导致巨大的计算开销:使用BERT在包含10,000个句子的集合中找到最相似的一对句子大约需要5,000万次推理计算(约65小时)。由于BERT的构建方式,它不适合用于语义相似度搜索以及无监督任务如聚类。在本文中,我们介绍了Sentence-BERT(SBERT),这是预训练的BERT网络的一种改进版本,通过使用孪生网络和三元组网络结构来生成具有语义意义的句子嵌入向量,这些向量可以通过余弦相似度进行比较。这将寻找最相似句对的时间从使用BERT/RoBERTa所需的65小时减少到使用SBERT的大约5秒,同时保持了BERT的准确性。我们在常见的STS任务和迁移学习任务上评估了SBERT和SRoBERTa的表现,结果表明它们优于其他最先进的句子嵌入方法。
代码仓库
aneesha/SiameseBERT-Notebook
GitHub 中提及
p208p2002/Sentence-BERT-mean-operation
GitHub 中提及
datcancode/sentence-transformers
pytorch
GitHub 中提及
rafaljanwojcik/SentenceBERT_vs_SiameseLSTM
pytorch
GitHub 中提及
projeto-de-algoritmos/Grafos1_Joao_Lucas_Leonardo_Miranda
pytorch
GitHub 中提及
BM-K/KoSentenceBERT_ETRI
pytorch
GitHub 中提及
sjtu-lit/syncse
pytorch
GitHub 中提及
reoneo97/wutr-buildon-2021
pytorch
GitHub 中提及
BM-K/KoSentenceBERT
pytorch
GitHub 中提及
princeton-nlp/SimCSE
pytorch
GitHub 中提及
fangrouli/Document-embedding-generation-models
pytorch
GitHub 中提及
asgaardlab/test-case-similarity-technique
tf
GitHub 中提及
OctopusMind/longBert
pytorch
oto-labs/librarian
GitHub 中提及
Walid-Rahman2/modified_sentence_transfomers
pytorch
GitHub 中提及
kihohan/NLP_Reference
pytorch
GitHub 中提及
zhihaillm/wisdominterrogatory
pytorch
GitHub 中提及
RaviTejaMaddhini/SBERT-Tensorflow-implementation
tf
GitHub 中提及
FreddeFrallan/Contrastive-Tension
tf
GitHub 中提及
jcyk/mse-amr
pytorch
GitHub 中提及
imperialite/BERT-Embeddings-For-ARA
GitHub 中提及
yjiangcm/dcpcse
pytorch
GitHub 中提及
croitorualin/reverse-stable-diffusion
pytorch
GitHub 中提及
rmslick/SummarySearch
pytorch
GitHub 中提及
eric11eca/NeuralLog
GitHub 中提及
gmcgoldr/theissues
pytorch
GitHub 中提及
brightjade/CS492E-CiteRec
pytorch
GitHub 中提及
Siamul/NLP-Project
pytorch
GitHub 中提及
lambert-x/prolab
pytorch
GitHub 中提及
idiap/analogy_learning
pytorch
GitHub 中提及
dmmiller612/bert-extractive-summarizer
pytorch
GitHub 中提及
puerrrr/focal-infonce
pytorch
GitHub 中提及
yjiangcm/promcse
pytorch
GitHub 中提及
hkust-nlp/syncse
pytorch
GitHub 中提及
Alexey-Borisov/3_course_diary
GitHub 中提及
nuochenpku/sscl
pytorch
GitHub 中提及
thisisclement/STS-Benchmark-SentEval
GitHub 中提及
BinWang28/SBERT-WK-Sentence-Embedding
pytorch
GitHub 中提及
saulhazelius/transformer-clustering
GitHub 中提及
Danqi7/584-final
pytorch
GitHub 中提及
BinWang28/BERT_Sentence_Embedding
pytorch
GitHub 中提及
law-ai/summarization
pytorch
GitHub 中提及
max-planck-innovation-competition/sentence-transformers
pytorch
GitHub 中提及
UKPLab/sentence-transformers
官方
pytorch
GitHub 中提及
BM-K/KoSentenceBERT_SKT
pytorch
GitHub 中提及
valdecy/pybibx
tf
GitHub 中提及
BM-K/KoSentenceBERT_SKTBERT
pytorch
GitHub 中提及
hhzrd/BEFAQ
GitHub 中提及
Susheel-1999/Sentence_Similarity
GitHub 中提及
yur7nd/ptss
pytorch
GitHub 中提及
TheNeuromancer/SentEmb
pytorch
GitHub 中提及
eelenadelolmo/WordVectors
pytorch
GitHub 中提及
bm-k/kosentencebert-skt
pytorch
GitHub 中提及
martinomensio/spacy-sentence-bert
pytorch
GitHub 中提及
InsaneLife/dssm
tf
GitHub 中提及
xiaoouwang/frenchnlp
pytorch
GitHub 中提及
基准测试
| 基准 | 方法 | 指标 |
|---|---|---|
| semantic-textual-similarity-on-sick | SRoBERTa-NLI-large | Spearman Correlation: 0.7429 |
| semantic-textual-similarity-on-sick | SRoBERTa-NLI-base | Spearman Correlation: 0.7446 |
| semantic-textual-similarity-on-sick | SBERT-NLI-base | Spearman Correlation: 0.7291 |
| semantic-textual-similarity-on-sick | SBERT-NLI-large | Spearman Correlation: 0.7375 |
| semantic-textual-similarity-on-sick | SentenceBERT | Spearman Correlation: 0.7462 |
| semantic-textual-similarity-on-sts-benchmark | SRoBERTa-NLI-STSb-large | Spearman Correlation: 0.8615 |
| semantic-textual-similarity-on-sts-benchmark | SBERT-NLI-base | Spearman Correlation: 0.7703 |
| semantic-textual-similarity-on-sts-benchmark | SRoBERTa-NLI-base | Spearman Correlation: 0.7777 |
| semantic-textual-similarity-on-sts-benchmark | SBERT-NLI-large | Spearman Correlation: 0.79 |
| semantic-textual-similarity-on-sts-benchmark | SBERT-STSb-base | Spearman Correlation: 0.8479 |
| semantic-textual-similarity-on-sts-benchmark | SBERT-STSb-large | Spearman Correlation: 0.8445 |
| semantic-textual-similarity-on-sts12 | SRoBERTa-NLI-large | Spearman Correlation: 0.7453 |
| semantic-textual-similarity-on-sts13 | SBERT-NLI-large | Spearman Correlation: 0.7846 |
| semantic-textual-similarity-on-sts14 | SBERT-NLI-large | Spearman Correlation: 0.7490000000000001 |
| semantic-textual-similarity-on-sts15 | SRoBERTa-NLI-large | Spearman Correlation: 0.8185 |
| semantic-textual-similarity-on-sts16 | SRoBERTa-NLI-large | Spearman Correlation: 0.7682 |