使用数以万计的表情来学习任何领域的用于检测情绪,感情和讽刺的表示外文翻译资料

 2022-08-08 11:08

Bjarke Felbo1, Alan Mislove2, Anders Soslash;gaard3, Iyad Rahwan1, Sune Lehmann4 1Media Lab, Massachusetts Institute of Technology

2College of Computer and Information Science, Northeastern University

3Department of Computer Science, University of Copenhagen

4DTU Compute, Technical University of Denmark

Abstract

NLP tasks are often limited by scarcity of manually annotated data. In social me- dia sentiment analysis and related tasks, researchers have therefore used binarized emoticons and specific hashtags as forms of distant supervision. Our paper shows that by extending the distant supervision to a more diverse set of noisy labels, the models can learn richer representations. Through emoji prediction on a dataset of 1246 million tweets containing one of 64

ing the distant supervision to a more diverse set of noisy labels enables the models to learn richer rep- resentations of emotional content in text, thereby obtaining better performance on benchmarks for detecting sentiment, emotions and sarcasm. We show that the learned representation of a single pretrained model generalizes across 5 domains.

Table 1: Example sentences scored by our model. For each text the top five most likely emojis are shown with the modelrsquo;s probability estimates.

I love moms cooking

common emojis we obtain state-of-the- art performance on 8 benchmark datasets within sentiment, emotion and sarcasm de- tection using a single pretrained model. Our analyses confirm that the diversity of our emotional labels yield a performance improvement over previous distant super- vision approaches.

Introduction

I love how you never reply back.. I love cruising with my homies

I love messing with yo mind!!

I love you and now youre just gone.. This is shit

This is the shit

49.1% 8.8% 3.1% 3.0% 2.9%

14.0%

8.3%

6.3%

5.4%

5.1%

34.0%

6.6%

5.7%

4.1%

3.8%

17.2%

11.8%

8.0%

6.4%

5.3%

39.1%

11.0%

7.3%

5.3%

4.5%

7.0%

6.4%

6.0%

6.0%

5.8%

10.9%

9.7%

6.5%

5.7%

4.8%

A variety of NLP tasks are limited by scarcity of manually annotated data. Therefore, co-occurring emotional expressions have been used for dis- tant supervision in social media sentiment anal- ysis and related tasks to make the models learn useful text representations before modeling these tasks directly. For instance, the state-of-the-art ap- proaches within sentiment analysis of social me- dia data use positive/negative emoticons for train- ing their models (Deriu et al., 2016; Tang et al., 2014). Similarly, hashtags such as #anger, #joy, #happytweet, #ugh, #yuck and #fml have in pre- vious research been mapped into emotional cate- gories for emotion analysis (Mohammad, 2012).

Distant supervision on noisy labels often en- ables a model to obtain better performance on the target task. In this paper, we show that extend-

Emojis are not always a direct labeling of emo- tional content. For instance, a positive emoji may serve to disambiguate an ambiguous sentence or to complement an otherwise relatively negative text. Kunneman et al. (2014) discuss a similar duality in the use of emotional hashtags such as #nice and #lame. Nevertheless, our work shows that emo- jis can be used to classify the emotional content of texts accurately in many cases. For instance, our DeepMoji model captures varied usages of the word lsquo;loversquo; as well as slang such as lsquo;this is the shitrsquo; being a positive statement (see Table 1). We provide an online demo at deepmoji.mit.edu to al- low others to explore the predictions of our model.

Contributions We show how millions of read- ily available emoji occurrences on Twitter can be used to pretrain models to learn a richer emotional

representation than traditionally obtained through distant supervision. We transfer this knowledge to the target tasks using a new layer-wise fine-tuning method, obtaining improvements over the state- of-the-art within a range of tasks: emotion, sar- casm and sentiment detection. We present multi- ple analyses on the effect of pretraining, including results that show that the diversity of our emoji set is important for the transfer learning potential of our model. Our pretrained DeepMoji model is re- leased with the hope that other researchers can use it for various NLP tasks1.

Related work

Text

1 x C

1 x 2304

Embedding

BiLSTM

BiLSTM

Attention

Softmax

T x 1024

T x 1024

T x 256

Using emotional expressions as noisy labels in text to counter scarcity of labels is not a new idea (Read, 2005; Go et al., 2009). Originally, bi- narized emoticons were used as noisy labels, but later also hashtags and emojis have been used. To our knowledge, previous research has always manually specified which emotional category each emotional expression belong to. Prior work has used theories of emotion such as Ekmanrsquo;s

剩余内容已隐藏,支付完成后下载完整资料


文件出处:Felbo, Bjarke, Alan Mislove, Anders Soslash;gaard, Iyad Rahwan, and Sune Lehmann. 'Using millions of emoji occurrences to learn any-domain representations for detecting sentiment, emotion and sarcasm.' arXiv preprint arXiv:1708.00524(2017)

使用数以万计的表情来学习任何领域的用于检测情绪,感情和讽刺的表示

1.麻省理工学院媒体实验室。

2.东北大学计算机与信息科学学院。

3.哥本哈根大学,计算机科学系。

4.DTU Compute,丹麦技术大学。

摘要

NLP任务通常受限于人工标注数据的稀缺性。因此,在社交媒体情感分析和相关任务中,研究人员已经使用二值化表情符号和特定标签作为远端监督的形式。我们的论文表明,通过将远端监督扩展到更多样化的噪声标签集,模型可以学习更丰富的表征。通过对包含64种表情符号之一的12.46亿条推文的数据集进行表情符号预测。我们在8个基准数据集上获得了最先进的性能,其中包括使用单一的预训练模型进行情感、情绪和讽刺的检测。我们的分析表明,我们的情感标签的多样性比之前的远距离超视觉方法有了性能上的提升。

1 介绍

各种NLP任务受限于人工标注数据的稀缺性。因此,在社交媒体情感分析和相关任务中, 共现的情感表达已经被用来进行干扰监督, 以使模型在直接对这些任务进行建模之前学习有用的文本表达。例如,在社交媒体数据的情感分析中最先进的方法,就是使用积极/ 消极的表情符号来训练他们的模型(Deriu et al. , 2016; Tang et al., 2014)。同样, 在 前 期 的 研 究 中 , #anger 、 #joy 、#happytweet、#ugh、#yuck和#fml等标签已经被 映 射 到 情 感 猫 腻 中 用 于 情 感 分 析(Mohammad,2012)。

噪声标签上的远距离监督往往能使模型在目标任务上获得更好的性能。在本文中,我们表明,扩展远端监督到更多样化的噪声标签集,使模型能够学习到更丰富的文本中情感内容的表征,从而在检测情感、情绪和讽刺的基准上获得更好的性能。我们表明,单个预训练模型的学习表示可以泛化到5个领域。

表1:由我们的模型打分的例子句子。对于每个文本,前五名最有可能的表情符号与模型的概率估计一起显示。

我喜欢妈妈做的菜

49.1%

8.8%

3.1%

3.0%

2.9%

我喜欢你从不回复的样子..

14.0%

8.3%

6.3%

5.4%

5.1%

我喜欢和我的朋友们一起巡航

34.0%

6.6%

5.7%

4.1%

3.8%

我喜欢搞乱你的思想!

17.2%

11.8%

8.0%

6.4%

5.3%

我爱你,而现在你却离开了

39.1%

11.0%

7.3%

5.3%

4.5%

这是狗屎

7.0%

6.4%

6.0%

6.0%

5.8%

这是狗屎

10.9%

9.7%

6.5%

5.7%

4.8%

表情符号并不总能直接标示出表情内容, 例如,一个积极的表情符号可以用来消除含糊不清的句子,或者补充相对消极的文字。例如,一个积极的表情符号可能会用来消除一个含糊不清的句子,或者补充一个原本相对消极的文本。Kunneman等人(2014)讨论了情绪化标签(如#nice#lame)的使用中类似的双重性。尽管如此,我们的工作表明,在许多情况下,表情可以用来准确地分类文本的情感内容。例如,我们的DeepMoji模型捕捉到了'爱'这个词的不同用法,以及俚语,如'这是狗屎'是一个积极的声明(见表1)。我们在Deepmoji.mit.edu 上提供了一个在线演示,以允许其他人探索我们模型的预测。

贡献 我们展示了如何利用Twitter上数以百万计的可读表情符号的出现来预训练模型,以学习更丰富的情感。比传统上通过远端监督获得的表征。我们将这些知识转移到目标任务中,使用了一种新的layer-wise的微调方法,在一系列任务中获得了比目前状态更好的改进:情感、讽刺和情感检测。我们提出了关于预训练效果的多项分析,包括结果表明,我们表情符号集的多样性对于我们模型的转移学习潜力非常重要。我们的预训练DeepMoji模型被重新租赁, 希望其他研究人员可以将其用于各种NLP任务[1]

在文本中使用情感表达作为嘈杂的标签来对抗标签的稀缺性并不是一个新的想法(Read, 2005; Go et al. , 2009)。最初,双述表情符号被用作嘈杂标签,但后来也使用了标签和表情符号。据我们所知,以往的研究总是手动确定每个情感表达属于哪个情感类别。之前的工作使用了情感的理论,如Ekman的六种基本情感和 Plutchik的八种基本情感(Mohammad,2012;Suttles和Ide,2013)。这样的人工分类需要对每一种表达方式的情感内容进行了解,而对于复杂的情感内容组合来说,这是很困难的,也是很耗时的。此外, 任何人工选择和分类都容易产生误解,并可能遗漏有关使用的重要细节。相比之下,我们的方法不需要事先了解语料,并且可以捕捉64种表情符号的不同用法(见表1中的例子和图3中模型如何隐含地对表情符号进行分组)。

另一种自动解释表情符号的情感内容的方法是,从描述表情符号的词中学习表情符号嵌入语义的官方表情表( Eisner et al.,2016)。在我们的语境中,这种方法有两个严重的局限性:a)它需要在测试时使用表情符号,而有许多领域的表情符号的使用是有限的或没有的:b)表格没有捕捉到表情符号使用的动态,即随着时间的推移,表情符号的预期意义的漂移。

知识可以通过多种不同的方式从表情数据集转移到目标任务中。特别是,多任务学习与同时的在多个数据集上的训练已经显示出有希望的结果(Collobert和Weston,2008)。然而,多任务学习需要访问表情符号数据集,每当分类器需要调整一个新的目标任务。 要求访问数据集在违反数据访问规定方面是有问题的。此外,从数据存储的角度来看,也有问题,因为本研究使用的数据集包含数百条微博(见表2)。相反,我们使用3.3中描述的转换学习(Bengio等人,2012),它不需要访问原始数据集,而只需要访问预训练的分类器。

Softmax

Embedding

BiLSTM

BiLSTM

Attention

Text

1xC

1 x 2304

T x 1024

T x 1024

T x 256

图1:DeepMoji模型的说明

T为文本长度,C为类数。

3 方法

3.1 预训练

在许多情况下,表情符号可以作为文本情感内容的代理。因此,对预测表情符号最初是文本的一部分的分类任务进行预训练可以提高目标任务的表现(见5.3分析为什么我们的预训练有帮助)。社交媒体中包含了大量带有表情符号的短文,这些短文可以被用作预训练的噪声标签。在这里,我们使用2013年1 月1日到2017年6月1日的Twitter数据,但任何有表情符号出现的数据集都可以使用。

只有没有地址的英文推文被用于预训练数据集。我们的假设是,从地址中获得的内容很可能是重要的,用于理解推文中文本的情感内容。因此,我们期望与这些推文相关的表情标签要比不包含地址的推特噪音更大,有地址的推文也因此被删除。

适当的标记化对于通用化非常重要。所有的推文都会逐字进行标记化。带有两个或更多重复字符的单词会被缩短为相同的标记(例如,'loool'和'looooool'被标记为相同的处理)。同样,我们对所有的地址(仅与基准数据集相关)、用户提及(例如@acl2017 和@emnlp2017因此被视为相同)和数字使用一个特殊的标记。要想被纳入训练集,推文必须包含至少1个不是标点符号、表情符号或特殊标记的标记[2]

许多推文中都包含了同一个表情符号的多次重复,或者多个不同的表情符号。在训练数据中,我们用以下方式解决这个问题。对于每个独特的表情符号类型,我们保存一个单独的为预训练的推特,以该表情类型作为标签。

我们只为预训练保存一条推特。

无论与推文相关联的表情符号数量多少,每个独特的表情符号类型都有一个标签。这种数据预处理使得预训练任务能够捕捉到多种类型的情感内容与推特相关,同时使我们的预训练任务成为单标签分类,而不是更复杂的多标签分类。

为了确保预训练鼓励模型学习对文本中情感内容的丰富理解,而不是只学习与最常用表情符号相关的情感内容,我们创建了一个平衡的预训练数据集。预训练数据被分为训练集、验证集和测试集,其中验证集和测试集的采样方式是随机的,使每个表情符号都被平等地表示。剩下的数据进行上采样,以创建一个平衡的训练数据集。

3.2 模型

有了数以百万计的表情符号的出现,我们可以训练非常有表现力的分类器,并且具有有限的过度疲劳的风险。我们使用了一个长短期记忆(LSTM)模型的变体,该模型在许多NLP 任 务 中 取 得 了 成 功 ( Hochreiter 和Schmidhuber,1997年;Sutskever等人,2014 年)。我们的DeepMoji模型使用256维的嵌入层将每个单词投射到一个矢量空间。一个双曲正切激活函数被用来实施将每个嵌入的方向约束在[1,1]内的操作。为了捕捉到这-我们使用两个双向LSTM层,每个层有1024个隐藏单元(每个方向512个)。最后,使用一个使用跳过连接将所有这些层作为输入的注意力层(见图1的说明)。

注 意 力 机 制 让 模 型 在构 建 文 本 的 特 征 时,通过权衡每个词对预测任务的重要性来决定。例如,像'amazing'这样的词很可能对文本的情感意义有很大的参考价值,因此应该对其进行相应的处理。我们使用了一种简单的方法,灵感来自于(Bahdanau et al.,2014 ; Yang et al.,2016),输入通道为单一参数pr.。

这里 ht 是单词在时间步骤t的表示,wa 是注意力层的权重矩阵。每一个时间步的注意力重要性分数,at,是通过将表征与权重矩阵相乘,然后归一化来构建单词的概率分布得到的。最后,文本的表征向量v,是通过使用注意力重要性分数作为权重,在所有时间步骤上进行加权求和而得到的。从注意力层获得的表示向量是整个文本的高级编码

剩余内容已隐藏,支付完成后下载完整资料


资料编号:[258194],资料为PDF文档或Word文档,PDF文档可免费转换为Word

原文和译文剩余内容已隐藏,您需要先支付 30元 才能查看原文和译文全部内容!立即支付

以上是毕业论文外文翻译,课题毕业论文、任务书、文献综述、开题报告、程序设计、图纸设计等资料可联系客服协助查找。