Scalable Attentive Sentence-Pair Modeling via Distilled Sentence Embedding
By Oren Barkan, Noam Razin, Itzik Malkiel, Ori Katz, Avi Caciularu, Noam Koenigstein. 2019
38 citations recorded by the source corpus.
Recent state-of-the-art natural language understanding models, such as BERT and XLNet, score a pair of sentences (A and B) using multiple cross-attention operations - a process in which each word in sentence A attends to all words in sentence B and vice versa. As a result, computing the similarity between a query sentence and a set of candidate sentences, requires the propagation of all query-candidate sentence-pairs throughout a stack of cross-attention layers. This exhaustive process becomes computationally prohibitive when the number of candidate sentences is large. In contrast, sentence embedding techniques learn a sentence-to-vector mapping and compute the similarity between the sentence vectors via simple elementary operations. In this paper, we introduce Distilled Sentence Embedding (DSE) - a model that is based on knowledge distillation from cross-attentive models, focusing on sentence-pair tasks. The outline of DSE is as follows: Given a cross-attentive teacher model (e.g. a fine-tuned BERT), we train a sentence embedding based student model to reconstruct the sentence-pair scores obtained by the teacher model. We empirically demonstrate the effectiveness of DSE on five GLUE sentence-pair tasks. DSE significantly outperforms several ELMO variants and other sentence embedding methods, while accelerating computation of the query-candidate sentence-pairs similarities by several orders of magnitude, with an average relative degradation of 4.6% compared to BERT. Furthermore, we show that DSE produces sentence embeddings that reach state-of-the-art performance on universal sentence representation benchmarks. Our code is made publicly available at this https URL.
Subfields: Artificial Intelligence, Natural Language Processing, Representation & Self-Supervised Learning
How researchers see this paper
The researchers whose trusted networks rank it highest, strongest advocate first. Every researcher gets a different order.
In Artificial Intelligence
- Jimmy J. Lin
- Sebastian Riedel
- Wen-tau Yih
- Patrick Lewis
- Fabio Petroni
- Sheng-Chieh Lin
- Jheng-Hong Yang
- Rodrigo Nogueira
In Natural Language Processing
- Sebastian Riedel
- Jimmy J. Lin
- Wen-tau Yih
- Patrick Lewis
- Fabio Petroni
- Rodrigo Nogueira
- Sheng-Chieh Lin
- Jheng-Hong Yang
In Representation & Self-Supervised Learning
- Sebastian Riedel
- Sheng-Chieh Lin
- Jheng-Hong Yang
- Rodrigo Nogueira
- Wen-tau Yih
- Andrew Yates
- Patrick Lewis
- Jimmy J. Lin
Citations in the corpus
- Pretrained Transformers for Text Ranking: BERT and Beyond (2020, methodology): “115 Slightly later, Barkan et al. [2020] investigated how well a BERT-based s-encoder can be distilled to a BERT-based bi-encoder in the context of sentence similarity tasks.”
- In-Batch Negatives for Knowledge Distillation with Tightly-Coupled Teachers for Dense Retrieval (2021, background): “Figure 1: Illustration of the differences between pair-wise knowledge distillation and our proposed in-batch knowledge distillation. computed due to the computational costs of cross-encoders (Hofstätter et al., 2020; Gao et al., 2020a; Barkan et al., 2020).”
- Boosted Dense Retriever (2021, background): “Distillation for dense retrievers is an active area, and more complex schemes exist which could improve results further (Izacard and Grave, 2021; Qu et al., 2021; Yang and Seo, 2020; Lin et al., 2021; Hofst¨atter et al., 2021a; Barkan et al., 2020; Gao et al., 2020).”