4 个月前

Sentence-BERT:使用Siamese BERT网络的句子嵌入

Sentence-BERT:使用Siamese BERT网络的句子嵌入

摘要

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的表现,结果表明它们优于其他最先进的句子嵌入方法。

代码仓库

datcancode/sentence-transformers
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 中提及
oto-labs/librarian
GitHub 中提及
kihohan/NLP_Reference
pytorch
GitHub 中提及
zhihaillm/wisdominterrogatory
pytorch
GitHub 中提及
jcyk/mse-amr
pytorch
GitHub 中提及
yjiangcm/dcpcse
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 中提及
puerrrr/focal-infonce
pytorch
GitHub 中提及
yjiangcm/promcse
pytorch
GitHub 中提及
hkust-nlp/syncse
pytorch
GitHub 中提及
nuochenpku/sscl
pytorch
GitHub 中提及
Danqi7/584-final
pytorch
GitHub 中提及
BinWang28/BERT_Sentence_Embedding
pytorch
GitHub 中提及
law-ai/summarization
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 中提及
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-sickSRoBERTa-NLI-large
Spearman Correlation: 0.7429
semantic-textual-similarity-on-sickSRoBERTa-NLI-base
Spearman Correlation: 0.7446
semantic-textual-similarity-on-sickSBERT-NLI-base
Spearman Correlation: 0.7291
semantic-textual-similarity-on-sickSBERT-NLI-large
Spearman Correlation: 0.7375
semantic-textual-similarity-on-sickSentenceBERT
Spearman Correlation: 0.7462
semantic-textual-similarity-on-sts-benchmarkSRoBERTa-NLI-STSb-large
Spearman Correlation: 0.8615
semantic-textual-similarity-on-sts-benchmarkSBERT-NLI-base
Spearman Correlation: 0.7703
semantic-textual-similarity-on-sts-benchmarkSRoBERTa-NLI-base
Spearman Correlation: 0.7777
semantic-textual-similarity-on-sts-benchmarkSBERT-NLI-large
Spearman Correlation: 0.79
semantic-textual-similarity-on-sts-benchmarkSBERT-STSb-base
Spearman Correlation: 0.8479
semantic-textual-similarity-on-sts-benchmarkSBERT-STSb-large
Spearman Correlation: 0.8445
semantic-textual-similarity-on-sts12SRoBERTa-NLI-large
Spearman Correlation: 0.7453
semantic-textual-similarity-on-sts13SBERT-NLI-large
Spearman Correlation: 0.7846
semantic-textual-similarity-on-sts14SBERT-NLI-large
Spearman Correlation: 0.7490000000000001
semantic-textual-similarity-on-sts15SRoBERTa-NLI-large
Spearman Correlation: 0.8185
semantic-textual-similarity-on-sts16SRoBERTa-NLI-large
Spearman Correlation: 0.7682

用 AI 构建 AI

从想法到上线——通过免费 AI 协同编程、开箱即用的环境和市场最优价格的 GPU 加速您的 AI 开发

AI 协同编程
即用型 GPU
最优价格
立即开始

Hyper Newsletters

订阅我们的最新资讯
我们会在北京时间 每周一的上午九点 向您的邮箱投递本周内的最新更新
邮件发送服务由 MailChimp 提供
Sentence-BERT:使用Siamese BERT网络的句子嵌入 | 论文 | HyperAI超神经