Attention based models have become the new state-of-the-art in natural language understanding tasks such as question-answering and sentence similarity. Recent 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 such as dot product or cosine similarity. In this paper, we introduce a sentence embedding method that is based on knowledge distillation from cross-attentive models, focusing on sentence-pair tasks. The outline of the proposed method 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 our distillation method on five GLUE sentence-pair tasks. Our method 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.


翻译:以关注为基础的模型已成为自然语言理解性(如问答和句子相似性)任务中新的最先进艺术。 BERT 和 XLNet 等最新模型使用多个交叉注意操作来评分一对句子( A和 B), 这一过程使A 句中的每个词都包含B句中的所有词, 反之亦然。 因此, 计算一个查询句子和一组候选句子之间的相似性, 需要在一组交叉注意层中传播所有查询访问感知句子。 这个详尽的过程在候选命令数量大时就变得无法计算。 相比之下, 嵌入判决技术会学习一个从句子到变量的绘图, 通过简单的初级操作( 如 dot med 产品或 Cosine 相似性等) 来计算句子矢量的相似性。 因此, 我们引入一个基于从交叉注意模式中提取知识的嵌入式方法, 侧重于句子。 拟议方法的大纲如下: 鉴于一个跨惯性教师模型模型模型, 和 相对递增性判法, 将我们演示了一种升级方法, 我们的实验性排序方法 。

3
下载
关闭预览

相关内容

ACM/IEEE第23届模型驱动工程语言和系统国际会议,是模型驱动软件和系统工程的首要会议系列,由ACM-SIGSOFT和IEEE-TCSE支持组织。自1998年以来,模型涵盖了建模的各个方面,从语言和方法到工具和应用程序。模特的参加者来自不同的背景,包括研究人员、学者、工程师和工业专业人士。MODELS 2019是一个论坛,参与者可以围绕建模和模型驱动的软件和系统交流前沿研究成果和创新实践经验。今年的版本将为建模社区提供进一步推进建模基础的机会,并在网络物理系统、嵌入式系统、社会技术系统、云计算、大数据、机器学习、安全、开源等新兴领域提出建模的创新应用以及可持续性。 官网链接:http://www.modelsconference.org/
【ICLR2020-Facebook AI】张量分解的时序知识图谱补全
专知会员服务
58+阅读 · 2020年4月14日
Transformer文本分类代码
专知会员服务
116+阅读 · 2020年2月3日
注意力机制介绍,Attention Mechanism
专知会员服务
165+阅读 · 2019年10月13日
【新书】Python编程基础,669页pdf
专知会员服务
186+阅读 · 2019年10月10日
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
ICLR2019最佳论文出炉
专知
11+阅读 · 2019年5月6日
论文浅尝 | Global Relation Embedding for Relation Extraction
开放知识图谱
12+阅读 · 2019年3月3日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
从Seq2seq到Attention模型到Self Attention(二)
量化投资与机器学习
22+阅读 · 2018年10月9日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Linguistically Regularized LSTMs for Sentiment Classification
黑龙江大学自然语言处理实验室
8+阅读 · 2018年5月4日
Talking-Heads Attention
Arxiv
15+阅读 · 2020年3月5日
dynnode2vec: Scalable Dynamic Network Embedding
Arxiv
13+阅读 · 2018年12月6日
VIP会员
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
23+阅读 · 2019年5月22日
Transferring Knowledge across Learning Processes
CreateAMind
25+阅读 · 2019年5月18日
ICLR2019最佳论文出炉
专知
11+阅读 · 2019年5月6日
论文浅尝 | Global Relation Embedding for Relation Extraction
开放知识图谱
12+阅读 · 2019年3月3日
Unsupervised Learning via Meta-Learning
CreateAMind
41+阅读 · 2019年1月3日
从Seq2seq到Attention模型到Self Attention(二)
量化投资与机器学习
22+阅读 · 2018年10月9日
disentangled-representation-papers
CreateAMind
26+阅读 · 2018年9月12日
Linguistically Regularized LSTMs for Sentiment Classification
黑龙江大学自然语言处理实验室
8+阅读 · 2018年5月4日
Top
微信扫码咨询专知VIP会员