BERT (Devlin et al., 2018) and RoBERTa (Liu et al., 2019) has set a new state-of-the-art performance on sentence-pair regression tasks like semantic textual similarity (STS). However, it requires that both sentences are fed into the network, which causes a massive computational overhead: Finding the most similar pair in a collection of 10,000 sentences requires about 50 million inference computations (~65 hours) with BERT. The construction of BERT makes it unsuitable for semantic similarity search as well as for unsupervised tasks like clustering. In this publication, we present Sentence-BERT (SBERT), a modification of the pretrained BERT network that use siamese and triplet network structures to derive semantically meaningful sentence embeddings that can be compared using cosine-similarity. This reduces the effort for finding the most similar pair from 65 hours with BERT / RoBERTa to about 5 seconds with SBERT, while maintaining the accuracy from BERT. We evaluate SBERT and SRoBERTa on common STS tasks and transfer learning tasks, where it outperforms other state-of-the-art sentence embeddings methods.
翻译:BERT (Devlin et al., 2018) 和 RoBERTA (Liu et al., 2019) 和 RoBERTA (Liu et al., 2019) 在句式回归任务上设定了新的最新表现,例如语义文字相似(STS) 。 但是,它要求将这两个句子输入网络,从而导致巨大的计算间接费用: 在10,000个判决汇编中找到最相似的对等词需要大约5,000万个与BERT的推论计算(~ 65小时) 。 建造 BERT 使得它不适合进行语义相似的搜索以及群集等不受监督的任务。 在此出版物中,我们介绍了对预先训练的BERT网络(SBERT) 的修改, 使用 siamese 和 三重网络结构来生成具有意义的句子嵌入, 能够与 Cosine 相似的句子进行比较。 这减少了寻找最相似的对子从65小时与 BERT/ RobERTTA到与SERT大约5秒, 同时保持 BERT的准确性。 我们评估了SBERT 和 SROBERTADOERTADOD 在普通ST- 格式上的其他任务和学习任务中学习任务。