This paper presents a new data augmentation algorithm for natural understanding tasks, called RPN:Random Position Noise algorithm.Due to the relative paucity of current text augmentation methods. Few of the extant methods apply to natural language understanding tasks for all sentence-level tasks.RPN applies the traditional augmentation on the original text to the word vector level. The RPN algorithm makes a substitution in one or several dimensions of some word vectors. As a result, the RPN can introduce a certain degree of perturbation to the sample and can adjust the range of perturbation on different tasks. The augmented samples are then used to give the model training.This makes the model more robust. In subsequent experiments, we found that adding RPN to the training or fine-tuning model resulted in a stable boost on all 8 natural language processing tasks, including TweetEval, CoLA, and SST-2 datasets, and more significant improvements than other data augmentation algorithms.The RPN algorithm applies to all sentence-level tasks for language understanding and is used in any deep learning model with a word embedding layer.
translated by 谷歌翻译
数据增强是通过转换为机器学习的人工创建数据的人工创建,是一个跨机器学习学科的研究领域。尽管它对于增加模型的概括功能很有用,但它还可以解决许多其他挑战和问题,从克服有限的培训数据到正规化目标到限制用于保护隐私的数据的数量。基于对数据扩展的目标和应用的精确描述以及现有作品的分类法,该调查涉及用于文本分类的数据增强方法,并旨在为研究人员和从业者提供简洁而全面的概述。我们将100多种方法划分为12种不同的分组,并提供最先进的参考文献来阐述哪种方法可以通过将它们相互关联,从而阐述了哪种方法。最后,提供可能构成未来工作的基础的研究观点。
translated by 谷歌翻译
作为世界上第四大语言家庭,Dravidian语言已成为自然语言处理(NLP)的研究热点。虽然Dravidian语言包含大量语言,但有相对较少的公众可用资源。此外,文本分类任务是自然语言处理的基本任务,如何将其与Dravidian语言中的多种语言相结合,仍然是Dravidian自然语言处理的主要困难。因此,为了解决这些问题,我们为Dravidian语言提出了一个多语言文本分类框架。一方面,该框架使用Labse预先训练的模型作为基础模型。针对多任务学习中文本信息偏见的问题,我们建议使用MLM策略选择语言特定的单词,并使用对抗训练来扰乱它们。另一方面,鉴于模型无法识别和利用语言之间的相关性的问题,我们进一步提出了一种特定于语言的表示模块,以丰富模型的语义信息。实验结果表明,我们提出的框架在多语言文本分类任务中具有重要性能,每个策略实现某些改进。
translated by 谷歌翻译
Adversarial training is widely acknowledged as the most effective defense against adversarial attacks. However, it is also well established that achieving both robustness and generalization in adversarially trained models involves a trade-off. The goal of this work is to provide an in depth comparison of different approaches for adversarial training in language models. Specifically, we study the effect of pre-training data augmentation as well as training time input perturbations vs. embedding space perturbations on the robustness and generalization of BERT-like language models. Our findings suggest that better robustness can be achieved by pre-training data augmentation or by training with input space perturbation. However, training with embedding space perturbation significantly improves generalization. A linguistic correlation analysis of neurons of the learned models reveal that the improved generalization is due to `more specialized' neurons. To the best of our knowledge, this is the first work to carry out a deep qualitative analysis of different methods of generating adversarial examples in adversarial training of language models.
translated by 谷歌翻译
作为有效的策略,数据增强(DA)减轻了深度学习技术可能失败的数据稀缺方案。它广泛应用于计算机视觉,然后引入自然语言处理并实现了许多任务的改进。DA方法的主要重点之一是提高培训数据的多样性,从而帮助模型更好地推广到看不见的测试数据。在本调查中,我们根据增强数据的多样性,将DA方法框架为三类,包括释义,注释和采样。我们的论文根据上述类别,详细分析了DA方法。此外,我们还在NLP任务中介绍了他们的应用以及挑战。
translated by 谷歌翻译
对策培训提供了一种规范的监督学习算法的方法,而虚拟对手训练能够将监督的学习算法扩展到半监督设置。然而,两种方法都需要对输入向量的许多条目进行小扰动,这是不适合稀疏的高维输入,例如单个热词表示。我们通过将扰动应用于经常性神经网络中的单词嵌入而不是原始输入本身来扩展对文本领域的对抗和虚拟对抗训练。所提出的方法实现了最新的状态,导致多个基准半监督和纯粹监督任务。我们提供可视化和分析,表明学习的单词嵌入品质的质量有所提高,而且训练时,该模型易于过度装备。代码可在https://github.com/tensorflow/models/tree/master/research/addersarial_text中获得。
translated by 谷歌翻译
自我监督的学习方法,如对比学习,在自然语言处理中非常重视。它使用对培训数据增强对具有良好表示能力的编码器构建分类任务。然而,在对比学习的学习成对的构建在NLP任务中更难。以前的作品生成单词级更改以形成对,但小变换可能会导致句子含义的显着变化作为自然语言的离散和稀疏性质。在本文中,对对抗的训练在NLP的嵌入空间中产生了挑战性和更难的学习对抗性示例作为学习对。使用对比学学习提高了对抗性培训的泛化能力,因为对比损失可以使样品分布均匀。同时,对抗性培训也提高了对比学习的稳健性。提出了两种小说框架,监督对比对抗学习(SCAS)和无监督的SCAS(USCAL),通过利用对比学习的对抗性培训来产生学习成对。利用基于标签的监督任务丢失,以产生对抗性示例,而无监督的任务会带来对比损失。为了验证所提出的框架的有效性,我们将其雇用到基于变换器的模型,用于自然语言理解,句子语义文本相似性和对抗学习任务。胶水基准任务的实验结果表明,我们的微调监督方法优于BERT $ _ {基础} $超过1.75 \%。我们还评估我们对语义文本相似性(STS)任务的无监督方法,并且我们的方法获得77.29 \%with bert $ _ {base} $。我们方法的稳健性在NLI任务的多个对抗性数据集下进行最先进的结果。
translated by 谷歌翻译
Recent progress in pre-trained neural language models has significantly improved the performance of many natural language processing (NLP) tasks. In this paper we propose a new model architecture DeBERTa (Decoding-enhanced BERT with disentangled attention) that improves the BERT and RoBERTa models using two novel techniques. The first is the disentangled attention mechanism, where each word is represented using two vectors that encode its content and position, respectively, and the attention weights among words are computed using disentangled matrices on their contents and relative positions, respectively. Second, an enhanced mask decoder is used to incorporate absolute positions in the decoding layer to predict the masked tokens in model pre-training. In addition, a new virtual adversarial training method is used for fine-tuning to improve models' generalization. We show that these techniques significantly improve the efficiency of model pre-training and the performance of both natural language understand (NLU) and natural langauge generation (NLG) downstream tasks. Compared to RoBERTa-Large, a DeBERTa model trained on half of the training data performs consistently better on a wide range of NLP tasks, achieving improvements on MNLI by +0.9% (90.2% vs. 91.1%), on SQuAD v2.0 by +2.3% (88.4% vs. 90.7%) and RACE by +3.6% (83.2% vs. 86.8%). Notably, we scale up DeBERTa by training a larger version that consists of 48 Transform layers with 1.5 billion parameters. The significant performance boost makes the single DeBERTa model surpass the human performance on the SuperGLUE benchmark (Wang et al., 2019a) for the first time in terms of macro-average score (89.9 versus 89.8), and the ensemble DeBERTa model sits atop the SuperGLUE leaderboard as of January 6, 2021, outperforming the human baseline by a decent margin (90.3 versus 89.8). The pre-trained DeBERTa models and the source code were released at: https://github.com/microsoft/DeBERTa 1 .
translated by 谷歌翻译
Although attention mechanisms have become fundamental components of deep learning models, they are vulnerable to perturbations, which may degrade the prediction performance and model interpretability. Adversarial training (AT) for attention mechanisms has successfully reduced such drawbacks by considering adversarial perturbations. However, this technique requires label information, and thus, its use is limited to supervised settings. In this study, we explore the concept of incorporating virtual AT (VAT) into the attention mechanisms, by which adversarial perturbations can be computed even from unlabeled data. To realize this approach, we propose two general training techniques, namely VAT for attention mechanisms (Attention VAT) and "interpretable" VAT for attention mechanisms (Attention iVAT), which extend AT for attention mechanisms to a semi-supervised setting. In particular, Attention iVAT focuses on the differences in attention; thus, it can efficiently learn clearer attention and improve model interpretability, even with unlabeled data. Empirical experiments based on six public datasets revealed that our techniques provide better prediction performance than conventional AT-based as well as VAT-based techniques, and stronger agreement with evidence that is provided by humans in detecting important words in sentences. Moreover, our proposal offers these advantages without needing to add the careful selection of unlabeled data. That is, even if the model using our VAT-based technique is trained on unlabeled data from a source other than the target task, both the prediction performance and model interpretability can be improved.
translated by 谷歌翻译
了解用户的意图并从句子中识别出语义实体,即自然语言理解(NLU),是许多自然语言处理任务的上游任务。主要挑战之一是收集足够数量的注释数据来培训模型。现有有关文本增强的研究并没有充分考虑实体,因此对于NLU任务的表现不佳。为了解决这个问题,我们提出了一种新型的NLP数据增强技术,实体意识数据增强(EADA),该技术应用了树结构,实体意识到语法树(EAST),以表示句子与对实体的注意相结合。我们的EADA技术会自动从少量注释的数据中构造东方,然后生成大量的培训实例,以进行意图检测和插槽填充。四个数据集的实验结果表明,该技术在准确性和泛化能力方面显着优于现有数据增强方法。
translated by 谷歌翻译
最近的作品表明了解释性和鲁棒性是值得信赖和可靠的文本分类的两个关键成分。然而,以前的作品通常是解决了两个方面的一个:i)如何提取准确的理由,以便在有利于预测的同时解释; ii)如何使预测模型对不同类型的对抗性攻击稳健。直观地,一种产生有用的解释的模型应该对对抗性攻击更加强大,因为我们无法信任输出解释的模型,而是在小扰动下改变其预测。为此,我们提出了一个名为-BMC的联合分类和理由提取模型。它包括两个关键机制:混合的对手训练(AT)旨在在离散和嵌入空间中使用各种扰动,以改善模型的鲁棒性,边界匹配约束(BMC)有助于利用边界信息的引导来定位理由。基准数据集的性能表明,所提出的AT-BMC优于分类和基本原子的基础,由大边距提取。鲁棒性分析表明,建议的AT-BMC将攻击成功率降低了高达69%。经验结果表明,强大的模型与更好的解释之间存在连接。
translated by 谷歌翻译
数据增强是解决过度合适的有效方法。许多以前的作品提出了针对NLP的不同数据增强策略,例如注入噪声,单词更换,反向翻译等。虽然有效,但它们错过了语言的一个重要特征 - 复杂性,复杂表达的含义是由其子构建的部分。在此激励的情况下,我们提出了一种称为Treemix的自然语言理解的组成数据增强方法。具体而言,Treemix利用选区解析树将句子分解为组成型子结构和混合数据增强技术以重组它们以生成新的句子。与以前的方法相比,Treemix引入了更大的多样性,并鼓励模型学习NLP数据的组成性。关于文本分类和扫描的广泛实验表明,Treemix优于当前最新数据增强方法。
translated by 谷歌翻译
现有的研究表明,对抗性示例可以直接归因于具有高度预测性的非稳态特征的存在,但很容易被对手对愚弄NLP模型进行操纵。在这项研究中,我们探讨了捕获特定于任务的鲁棒特征的可行性,同时使用信息瓶颈理论消除了非舒适的特征。通过广泛的实验,我们表明,通过我们的信息基于瓶颈的方法训练的模型能够在稳健的精度上取得显着提高,超过了所有先前报道的防御方法的性能,而在SST-2上几乎没有遭受清洁准确性的表现下降,Agnews和IMDB数据集。
translated by 谷歌翻译
我们从任务特定的BERT基教师模型执行知识蒸馏(KD)基准到各种学生模型:Bilstm,CNN,Bert-Tiny,Bert-Mini和Bert-small。我们的实验涉及在两个任务中分组的12个数据集:印度尼西亚语言中的文本分类和序列标记。我们还比较蒸馏的各个方面,包括使用Word Embeddings和未标记的数据增强的使用。我们的实验表明,尽管基于变压器的模型的普及程度不断上升,但是使用Bilstm和CNN学生模型,与修剪的BERT模型相比,使用Bilstm和CNN学生模型提供了性能和计算资源(CPU,RAM和存储)之间的最佳权衡。我们进一步提出了一些快速胜利,通过涉及涉及丢失功能,Word Embeddings和未标记的数据准备的简单选择的高效KD培训机制来生产小型NLP模型。
translated by 谷歌翻译
本文介绍了一种新的数据增强方法,用于神经机器翻译,该方法可以在语言内部和跨语言内部实施更强的语义一致性。我们的方法基于条件掩盖语言模型(CMLM),该模型是双向的,可以在左右上下文以及标签上有条件。我们证明CMLM是生成上下文依赖性单词分布的好技术。特别是,我们表明CMLM能够通过在替换过程中对源和目标进行调节来实现语义一致性。此外,为了增强多样性,我们将软词替换的想法纳入了数据增强,该概念用词汇上的概率分布代替了一个单词。在不同量表的四个翻译数据集上进行的实验表明,总体解决方案会导致更现实的数据增强和更好的翻译质量。与最新作品相比,我们的方法始终取得了最佳性能,并且在基线上的提高了1.90个BLEU点。
translated by 谷歌翻译
本文提出了一种简单但有效的基于插值的数据增强方法,称为Doublemix,以改善模型在文本分类中的鲁棒性。 Doublemix首先利用几个简单的增强操作来为每个培训数据生成几个扰动的样本,然后使用扰动的数据和原始数据在神经模型的隐藏空间中进行两步插值。具体而言,它首先将扰动的数据混合到合成样本中,然后混合原始数据和合成的扰动数据。 Doublemix通过学习隐藏空间中的“转移”功能来增强模型的鲁棒性。在六个文本分类基准数据集上,我们的方法优于几种流行的文本增强方法,包括令牌级别,句子级别和隐藏级数据增强技术。此外,低资源设置中的实验表明,当培训数据稀缺时,我们的方法一致地改善了模型的性能。广泛的消融研究和案例研究证实,我们方法的每个组成部分都有助于最终表现,并表明我们的方法在具有挑战性的反例中表现出卓越的表现。此外,视觉分析表明,我们方法生成的文本特征是高度可解释的。我们的本文代码可以在https://github.com/declare-lab/doublemix.git上找到。
translated by 谷歌翻译
最终的语言系统旨在在适应各种情况时具有高度的概括和鲁棒性。不幸的是,最近的怀特希望预训练的语言模型(PRLMS)几乎没有从堆叠过多的参数逃脱到过度参数化的变压器体系结构,以实现更高的性能。因此,本文提出了\ textIt {对抗自我注意力}机制(ASA),该机制在对抗性上重建了变压器的注意力,并促进了从受污染的模型结构中进行模型培训,并结合了快速,简单的实现,以实现更好的PRLM构建。我们在预训练和微调阶段进行各种任务进行全面评估。对于预训练,与常规培训相比,ASA会展现出显着的性能增长。为了进行微调,考虑到概括和鲁棒性,ASA授权模型始终超过了天真的模型。
translated by 谷歌翻译
转移学习已通过深度审慎的语言模型广泛用于自然语言处理,例如来自变形金刚和通用句子编码器的双向编码器表示。尽管取得了巨大的成功,但语言模型应用于小型数据集时会过多地适合,并且很容易忘记与分类器进行微调时。为了解决这个忘记将深入的语言模型从一个域转移到另一个领域的问题,现有的努力探索了微调方法,以减少忘记。我们建议DeepeMotex是一种有效的顺序转移学习方法,以检测文本中的情绪。为了避免忘记问题,通过从Twitter收集的大量情绪标记的数据来仪器进行微调步骤。我们使用策划的Twitter数据集和基准数据集进行了一项实验研究。 DeepeMotex模型在测试数据集上实现多级情绪分类的精度超过91%。我们评估了微调DeepeMotex模型在分类Emoint和刺激基准数据集中的情绪时的性能。这些模型在基准数据集中的73%的实例中正确分类了情绪。所提出的DeepeMotex-Bert模型优于BI-LSTM在基准数据集上的BI-LSTM增长23%。我们还研究了微调数据集的大小对模型准确性的影响。我们的评估结果表明,通过大量情绪标记的数据进行微调提高了最终目标任务模型的鲁棒性和有效性。
translated by 谷歌翻译
对比学习一直吸引着学习无监督的句子嵌入。当前的最新无监督方法是无监督的SIMCSE(UNSUP-SIMCSE)。 Unsup-Simcse将辍学作为最小数据增强方法,并将相同的输入句子传递给预训练的变压器编码器(带有掉落的掉落)两次,以获取两个相应的嵌入式以构建正对。由于句子的长度信息通常会由于使用嵌入变压器中的位置嵌入而编码到句子嵌入中,因此Unsup-Simcse中的每个正对实际上包含相同的长度信息。因此,接受这些正面对训练的Unsup-Simcse可能是有偏见的,这往往会考虑到语义上相同长度或相似长度的句子更相似。通过统计观察,我们发现Unsup-Simcse确实存在这样的问题。为了减轻它,我们应用了一个简单的重复操作来修改输入句子,然后分别将输入句子及其修改后的对应物传递给预训练的变压器编码器,以获取阳性对。此外,我们从计算机视觉社区中汲取灵感,并引入动量对比度,从而扩大了负面对的数量,而没有其他计算。提出的两种修改分别应用于正和负对,并构建一种新的句子嵌入方法,称为增强的Unsup-Simcse(ESIMCSE)。我们在几个基准数据集W.R.T上评估了所提出的ESIMCSE,语义文本相似性(STS)任务。实验结果表明,ESIMCSE的表现优于最先进的undup-Simcse,而Bert基碱的平均长矛相关性为2.02%。
translated by 谷歌翻译
We introduce a new language representation model called BERT, which stands for Bidirectional Encoder Representations from Transformers. Unlike recent language representation models (Peters et al., 2018a;Radford et al., 2018), BERT is designed to pretrain deep bidirectional representations from unlabeled text by jointly conditioning on both left and right context in all layers. As a result, the pre-trained BERT model can be finetuned with just one additional output layer to create state-of-the-art models for a wide range of tasks, such as question answering and language inference, without substantial taskspecific architecture modifications.BERT is conceptually simple and empirically powerful. It obtains new state-of-the-art results on eleven natural language processing tasks, including pushing the GLUE score to 80.5% (7.7% point absolute improvement), MultiNLI accuracy to 86.7% (4.6% absolute improvement), SQuAD v1.1 question answering Test F1 to 93.2 (1.5 point absolute improvement) and SQuAD v2.0 Test F1 to 83.1 (5.1 point absolute improvement).
translated by 谷歌翻译