测试时间增强 - 跨测试输入示例的预测的聚合 - 是一种改善图像分类模型性能的既定技术。重要的是,TTA可用于改善事后模型性能,而无需额外的培训。尽管可以将测试时间增强(TTA)应用于任何数据模式,但它在NLP中的采用有限,部分原因是难以识别标签保护转换。在本文中,我们提出的增强政策可以通过语言模型进行大量准确的改进。一个关键发现是,增强政策设计(例如,从单个,非确定性增强产生的样本数量)对TTA的好处有很大的影响。跨二进制分类任务和数据集进行的实验表明,测试时间的增加可以对当前最新方法进行一致的改进。
translated by 谷歌翻译
不变性于广泛的图像损坏,例如翘曲,噪声或颜色移位,是在计算机视觉中建立强大模型的一个重要方面。最近,已经提出了几种新的数据增强,从而显着提高了Imagenet-C的性能,这是这种腐败的基准。但是,对数据增强和测试时间损坏之间的关系仍然缺乏基本的理解。为此,我们开发了图像变换的一个特征空间,然后在增强和损坏之间使用该空间中的新措施,称为最小示例距离,以演示相似性和性能之间的强相关性。然后,当测试时间损坏被对来自Imagenet-C中的测试时间损坏被采样时,我们调查最近的数据增强并观察腐败鲁棒性的重大退化。我们的结果表明,通过对感知同类增强的培训来提高测试错误,数据增强可能不会超出现有的基准。我们希望我们的结果和工具将允许更强大的进展,以提高对图像损坏的稳健性。我们在https://github.com/facebookresearch/augmentation - 窗子提供代码。
translated by 谷歌翻译
数据增强是通过转换为机器学习的人工创建数据的人工创建,是一个跨机器学习学科的研究领域。尽管它对于增加模型的概括功能很有用,但它还可以解决许多其他挑战和问题,从克服有限的培训数据到正规化目标到限制用于保护隐私的数据的数量。基于对数据扩展的目标和应用的精确描述以及现有作品的分类法,该调查涉及用于文本分类的数据增强方法,并旨在为研究人员和从业者提供简洁而全面的概述。我们将100多种方法划分为12种不同的分组,并提供最先进的参考文献来阐述哪种方法可以通过将它们相互关联,从而阐述了哪种方法。最后,提供可能构成未来工作的基础的研究观点。
translated by 谷歌翻译
最大化模型准确性的常规配方是(1)具有各种超参数的多个模型,以及(2)选择在固定验证集中表现最佳的单个模型,从而丢弃其余部分。在本文中,我们在微调大型预训练的模型的背景下重新审视了该过程的第二步,其中微调模型通常位于单个低误差盆地中。我们表明,平均多种模型的权重以不同的超参数配置进行了微调通常提高准确性和鲁棒性。与传统的合奏不同,我们可能会平均许多模型,而不会产生任何其他推理或记忆成本 - 我们将结果称为“模型汤”。当微调大型预训练的模型,例如夹子,Align和VIT-G在JFT上预先训练的VIT-G时,我们的汤食谱可为ImageNet上的超参数扫描中的最佳模型提供显着改进。所得的VIT-G模型在Imagenet上达到90.94%的TOP-1准确性,实现了新的最新状态。此外,我们表明,模型汤方法扩展到多个图像分类和自然语言处理任务,改善分发性能,并改善新下游任务的零局部性。最后,我们通过分析将权重平衡和与logit浓度的性能相似与预测的损失和信心的平坦度联系起来,并经过经验验证这种关系。代码可从https://github.com/mlfoundations/model-soups获得。
translated by 谷歌翻译
随着预先训练模型的巨大成功,Pretrain-Then-Finetune范式已被广泛采用下游任务,以获得源代码的理解。但是,与昂贵的培训从头开始培训,如何将预先训练的模型从划痕进行有效地调整到新任务的训练模型尚未完全探索。在本文中,我们提出了一种桥接预先训练的模型和与代码相关任务的方法。我们利用语义保留的转换来丰富下游数据分集,并帮助预先接受的模型学习语义特征不变于这些语义上等效的转换。此外,我们介绍课程学习以易于努力的方式组织转换的数据,以微调现有的预先训练的模型。我们将我们的方法应用于一系列预先训练的型号,它们在源代码理解的任务中显着优于最先进的模型,例如算法分类,代码克隆检测和代码搜索。我们的实验甚至表明,在没有重量训练的代码数据上,自然语言预先训练的模型罗伯塔微调我们的轻质方法可以优于或竞争现有的代码,在上述任务中进行微调,如Codebert和Codebert和GraphCodebert。这一发现表明,代码预训练模型中仍有很大的改进空间。
translated by 谷歌翻译
基于文本的对抗攻击变得越来越普遍,通用互联网用户可以访问。随着这些攻击的繁殖,解决模型鲁棒性中差距的需求即将变得迫在眉睫。在对抗数据上进行重新培训可能会提高性能,但这些模型在该模型中仍有一类其他角色级攻击。此外,重新培训模型的过程是时间和资源密集型,创造了对轻巧,可重复使用的防御的需求。在这项工作中,我们提出了对抗性文本标准器,这是一种新颖的方法,可恢复具有低计算开销的攻击内容上的基线性能。我们评估了标准级化合物在容易发生攻击的两个问题领域的功效,即仇恨言论和自然语言推断。我们发现,文本归一化提供了针对角色级攻击的任务不足的防御,该攻击可以对对抗性再培训解决方案进行补充,这更适合语义改变。
translated by 谷歌翻译
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 谷歌翻译
本文介绍了一种新的数据增强方法,用于神经机器翻译,该方法可以在语言内部和跨语言内部实施更强的语义一致性。我们的方法基于条件掩盖语言模型(CMLM),该模型是双向的,可以在左右上下文以及标签上有条件。我们证明CMLM是生成上下文依赖性单词分布的好技术。特别是,我们表明CMLM能够通过在替换过程中对源和目标进行调节来实现语义一致性。此外,为了增强多样性,我们将软词替换的想法纳入了数据增强,该概念用词汇上的概率分布代替了一个单词。在不同量表的四个翻译数据集上进行的实验表明,总体解决方案会导致更现实的数据增强和更好的翻译质量。与最新作品相比,我们的方法始终取得了最佳性能,并且在基线上的提高了1.90个BLEU点。
translated by 谷歌翻译
数据饥饿的深度神经网络已经将自己作为许多NLP任务的标准建立为包括传统序列标记的标准。尽管他们在高资源语言上表现最先进的表现,但它们仍然落后于低资源场景的统计计数器。一个方法来反击攻击此问题是文本增强,即,从现有数据生成新的合成训练数据点。虽然NLP最近目睹了一种文本增强技术的负载,但该领域仍然缺乏对多种语言和序列标记任务的系统性能分析。为了填补这一差距,我们调查了三类文本增强方法,其在语法(例如,裁剪子句子),令牌(例如,随机字插入)和字符(例如,字符交换)级别上执行更改。我们系统地将它们与语音标记,依赖解析和语义角色标记的分组进行了比较,用于使用各种模型的各种语言系列,包括依赖于诸如MBERT的普赖金的多语言语境化语言模型的架构。增强最显着改善了解析,然后是语音标记和语义角色标记的依赖性解析。我们发现实验技术通常在形态上丰富的语言,而不是越南语等分析语言。我们的研究结果表明,增强技术可以进一步改善基于MBERT的强基线。我们将字符级方法标识为最常见的表演者,而同义词替换和语法增强仪提供不一致的改进。最后,我们讨论了最大依赖于任务,语言对和模型类型的结果。
translated by 谷歌翻译
Transfer learning, where a model is first pre-trained on a data-rich task before being finetuned on a downstream task, has emerged as a powerful technique in natural language processing (NLP). The effectiveness of transfer learning has given rise to a diversity of approaches, methodology, and practice. In this paper, we explore the landscape of transfer learning techniques for NLP by introducing a unified framework that converts all text-based language problems into a text-to-text format. Our systematic study compares pre-training objectives, architectures, unlabeled data sets, transfer approaches, and other factors on dozens of language understanding tasks. By combining the insights from our exploration with scale and our new "Colossal Clean Crawled Corpus", we achieve state-of-the-art results on many benchmarks covering summarization, question answering, text classification, and more. To facilitate future work on transfer learning for NLP, we release our data set, pre-trained models, and code.
translated by 谷歌翻译
State-of-the-art computer vision systems are trained to predict a fixed set of predetermined object categories. This restricted form of supervision limits their generality and usability since additional labeled data is needed to specify any other visual concept. Learning directly from raw text about images is a promising alternative which leverages a much broader source of supervision. We demonstrate that the simple pre-training task of predicting which caption goes with which image is an efficient and scalable way to learn SOTA image representations from scratch on a dataset of 400 million (image, text) pairs collected from the internet. After pre-training, natural language is used to reference learned visual concepts (or describe new ones) enabling zero-shot transfer of the model to downstream tasks. We study the performance of this approach by benchmarking on over 30 different existing computer vision datasets, spanning tasks such as OCR, action recognition in videos, geo-localization, and many types of fine-grained object classification. The model transfers non-trivially to most tasks and is often competitive with a fully supervised baseline without the need for any dataset specific training. For instance, we match the accuracy of the original ResNet-50 on ImageNet zero-shot without needing to use any of the 1.28 million training examples it was trained on. We release our code and pre-trained model weights at https://github.com/OpenAI/CLIP.
translated by 谷歌翻译
State-of-the-art pre-trained language models (PLMs) outperform other models when applied to the majority of language processing tasks. However, PLMs have been found to degrade in performance under distribution shift, a phenomenon that occurs when data at test-time does not come from the same distribution as the source training set. Equally as challenging is the task of obtaining labels in real-time due to issues like long-labeling feedback loops. The lack of adequate methods that address the aforementioned challenges constitutes the need for approaches that continuously adapt the PLM to a distinct distribution. Unsupervised domain adaptation adapts a source model to an unseen as well as unlabeled target domain. While some techniques such as data augmentation can adapt models in several scenarios, they have only been sparsely studied for addressing the distribution shift problem. In this work, we present an approach (MEMO-CL) that improves the performance of PLMs at test-time under distribution shift. Our approach takes advantage of the latest unsupervised techniques in data augmentation and adaptation to minimize the entropy of the PLM's output distribution. MEMO-CL operates on a batch of augmented samples from a single observation in the test set. The technique introduced is unsupervised, domain-agnostic, easy to implement, and requires no additional data. Our experiments result in a 3% improvement over current test-time adaptation baselines.
translated by 谷歌翻译
仇恨言论是一种在线骚扰的形式,涉及使用滥用语言,并且在社交媒体帖子中通常可以看到。这种骚扰主要集中在诸如宗教,性别,种族等的特定群体特征上,如今它既有社会和经济后果。文本文章中对滥用语言的自动检测一直是一项艰巨的任务,但最近它从科学界获得了很多兴趣。本文解决了在社交媒体中辨别仇恨内容的重要问题。我们在这项工作中提出的模型是基于LSTM神经网络体系结构的现有方法的扩展,我们在短文中适当地增强和微调以检测某些形式的仇恨语言,例如种族主义或性别歧视。最重要的增强是转换为由复发性神经网络(RNN)分类器组成的两阶段方案。将第一阶段的所有一Vs式分类器(OVR)分类器的输出组合在一起,并用于训练第二阶段分类器,最终决定了骚扰的类型。我们的研究包括对在16K推文的公共语料库中评估的第二阶段提出的几种替代方法的性能比较,然后对另一个数据集进行了概括研究。报道的结果表明,与当前的最新技术相比,在仇恨言论检测任务中,所提出的方案的分类质量出色。
translated by 谷歌翻译
利用卷积层的特征,神经网络对于模式识别任务非常有效。然而,在某些情况下,他们的决定基于意外信息,导致标准基准的高性能,而且还缺乏挑战测试条件和不行性失败的普遍性。最近的工作已被称为“快捷方式学习”并解决了它在多个域中的存在。在文本识别中,我们揭示了另一个这样的快捷方式,从而识别员依赖于本地图像统计信息。由此激励,我们建议一种方法来规范依赖于局限性统计的依赖,提高文本识别性能。我们称为TextAdain的方法在特征映射中创建了本地扭曲,这阻止网络从局部统计到局部统计。它通过将每个特征映射视为一个元素序列,并且故意在迷你批处理中的元素之间故意不匹配的细粒度特征统计信息。尽管TextAdain的简单性,但与其他更复杂的方法相比,广泛的实验表明其有效性。 TextAdain在标准手写文本识别基准上实现最先进的结果。此外,它概括为多个架构和场景文本识别域。此外,我们证明整合TextAdain改善了更具挑战性测试条件的鲁棒性。
translated by 谷歌翻译
样式是自然语言文本的重要组成部分,反映了文本语调的变化,同时保持基础信息相同。即使编程语言具有严格的语法规则,它们也具有风格。代码可以使用相同的功能编写,但使用不同的语言功能。但是,编程样式很难量化,因此,作为这项工作的一部分,我们定义了专门针对Python的样式属性。为了构建样式的定义,我们利用层次聚类来捕获样式定义,而无需指定转换。除了定义样式外,我们还探索了预训练的代码语言模型的功能,以捕获有关代码样式的信息。为此,我们微调了预训练的代码语言模型,并在代码样式转移任务中评估了其性能。
translated by 谷歌翻译
Grammatical Error Correction (GEC) is the task of automatically detecting and correcting errors in text. The task not only includes the correction of grammatical errors, such as missing prepositions and mismatched subject-verb agreement, but also orthographic and semantic errors, such as misspellings and word choice errors respectively. The field has seen significant progress in the last decade, motivated in part by a series of five shared tasks, which drove the development of rule-based methods, statistical classifiers, statistical machine translation, and finally neural machine translation systems which represent the current dominant state of the art. In this survey paper, we condense the field into a single article and first outline some of the linguistic challenges of the task, introduce the most popular datasets that are available to researchers (for both English and other languages), and summarise the various methods and techniques that have been developed with a particular focus on artificial error generation. We next describe the many different approaches to evaluation as well as concerns surrounding metric reliability, especially in relation to subjective human judgements, before concluding with an overview of recent progress and suggestions for future work and remaining challenges. We hope that this survey will serve as comprehensive resource for researchers who are new to the field or who want to be kept apprised of recent developments.
translated by 谷歌翻译
数据增强技术广泛用于通过解决类别不平衡问题和数据稀疏性来增强机器学习模型的性能。已显示最先进的生成语言模型在不同的NLP任务中提供了显着的增益。但是,它们对几张拍摄设置中的文本分类任务的数据增强的适用性尚未完全探索,特别是对于专门域。在本文中,我们利用GPT-2(Radford A等,2019)来产生人工训练实例,以提高分类性能。我们的目的是分析种子训练示例的选择过程对GPT生成的样品的质量以及因此分类器性能的影响。我们使用几种种子选择策略进行实验,其中包括利用课程分层结构和域专家选择。我们的结果表明,少数标签实例中的微调GPT-2导致一致的分类改进和优于竞争性基线。最后,我们展示通过域专家选择指导这一过程可能会导致进一步的改进,这开辟了有趣的研究途径,用于结合生成模型和主动学习。
translated by 谷歌翻译
Modern neural networks are over-parameterized and thus rely on strong regularization such as data augmentation and weight decay to reduce overfitting and improve generalization. The dominant form of data augmentation applies invariant transforms, where the learning target of a sample is invariant to the transform applied to that sample. We draw inspiration from human visual classification studies and propose generalizing augmentation with invariant transforms to soft augmentation where the learning target softens non-linearly as a function of the degree of the transform applied to the sample: e.g., more aggressive image crop augmentations produce less confident learning targets. We demonstrate that soft targets allow for more aggressive data augmentation, offer more robust performance boosts, work with other augmentation policies, and interestingly, produce better calibrated models (since they are trained to be less confident on aggressively cropped/occluded examples). Combined with existing aggressive augmentation strategies, soft target 1) doubles the top-1 accuracy boost across Cifar-10, Cifar-100, ImageNet-1K, and ImageNet-V2, 2) improves model occlusion performance by up to $4\times$, and 3) halves the expected calibration error (ECE). Finally, we show that soft augmentation generalizes to self-supervised classification tasks.
translated by 谷歌翻译
发现普遍的对抗性扰动的存在对对抗性学习领域具有很大的理论和实际影响。在文本域中,大多数通用研究都集中在添加到所有文本中的对抗前缀上。但是,与视觉域不同,在不同输入中添加相同的扰动会导致明显不自然的输入。因此,我们介绍了一种新的通用对手设置 - 一种通用的对抗性政策,它具有其他普遍攻击的许多优势,但也导致有效文本 - 从而使其在实践中具有重要意义。我们通过在许多文本上学习保存文本更改的一组语义集,学习单个搜索策略来实现这一目标。这种公式是普遍的,因为该政策成功地在新文本上找到了对抗性示例。我们的方法使用文本扰动,这些扰动已被广泛显示,以在非普遍设置(特定的同义词替代品)中产生自然攻击。我们建议对使用强化学习的这种表述进行强有力的基线方法。它可以概括(从几乎没有500个培训文本)表明文本域中也存在普遍的对抗模式。
translated by 谷歌翻译
尽管对图像分类任务的表现令人印象深刻,但深网络仍然难以概括其数据的许多常见损坏。为解决此漏洞,事先作品主要专注于提高其培训管道的复杂性,以多样性的名义结合多种方法。然而,在这项工作中,我们逐步回来并遵循原则的方法来实现共同腐败的稳健性。我们提出了一个普遍的数据增强方案,包括最大熵图像变换的简单系列。我们展示了Prime优于现有技术的腐败鲁棒性,而其简单和即插即用性质使其能够与其他方法结合以进一步提升其稳健性。此外,我们分析了对综合腐败图像混合策略的重要性,并揭示了在共同腐败背景下产生的鲁棒性准确性权衡的重要性。最后,我们表明我们的方法的计算效率允许它在线和离线数据增强方案轻松使用。
translated by 谷歌翻译