Elmo NAACl 2018

Elmo NAACl 2018 

Deep contextualized word representations

 在AllenNLP的主页上有个单独的菜单(http://allennlp.org/elmo),一直不太了解为何将它单列出来,主要在AllenNLP的许多任务中如文本蕴含里面等已经用到了这个模型所产生的词向量。

  1、论文原理

  从其主页上的介绍可知,该论文来自NAACL2018的论文。

 

Introduction

ELMo is a deep contextualized word representation that models both (1) complex characteristics of word use (e.g., syntax and semantics), and (2) how these uses vary across linguistic contexts (i.e., to model polysemy). These word vectors are learned functions of the internal states of a deep bidirectional language model (biLM), which is pre-trained on a large text corpus. They can be easily added to existing models and significantly improve the state of the art across a broad range of challenging NLP problems, including question answering, textual entailment and sentiment analysis.

即ELMO(Embeddings from Language Models) ,来自于语言模型的词向量表示,也是利用了深度上下文单词表征,该模型的好处:

(1)能够处理单词用法中的复杂特性(比如句法和语义)

(2)这些用法在不同的语言上下文中如何变化(比如为词的多义性建模)。

  它首先在大文本语料库上预训练了一个深度双向语言模型(biLM),然后把根据它的内部状态学到的函数作为词向量。实验表明,这些学到的词表征可以轻易地加入到现有的模型中,并在回答问题、文本蕴含、情感分析等 6 个不同的有难度的 NLP 问题中大幅提高最佳表现。实验表明显露出预训练模型的深度内部状态这一做法非常重要,这使得后续的模型可以混合不同种类的半监督信号。

 

该模型的显著特征:

 

Salient features

ELMo representations are:

  • Contextual: The representation for each word depends on the entire context in which it is used. (即词向量不是一成不变的,而是根据上下文而随时变化,这与word2vec或者glove具有很大的区别)
  • Deep: The word representations combine all layers of a deep pre-trained neural network. (采用了较深的网络来实现,如文中采用了双向的LSTM)
  • Character based: ELMo representations are purely character based, allowing the network to use morphological clues to form robust representations for out-of-vocabulary tokens unseen in training. (基于字符的,所以具有更好的鲁棒性)

  效果上:ELMo虽然看起来很简单,非常有效。但在论文的6项句法语义实验中,使用ELMo显著提高了强基线模型的性能,取得了相对值5%到25%的提升。除了ELMo模型方面的贡献,ELMo的获得的词向量进一步分析:ELMo的第一层输出包含更多的句法信息,而第二层输出包含更多语义信息。所以总体来看,该模型具有更好的泛化能力。

2、实验

  AllenNLp中集成了该模型的测试方法,倒是非常的简单,输入一个句子,就可以得到一个词向量列表。具体的评测得需要看具体的任务来。从前面的几篇涉及AllenNLP的几大任务相关文章中大多采用了ELMO的词向量结果。

--------------------- 本文来自 sparkexpert 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/sparkexpert/article/details/80076796?utm_source=copy

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值