大规模预训练的语言模型的出现为自然语言处理的最新进展做出了巨大贡献。许多最先进的语言模型首先在大型文本语料库上进行培训,然后在下游任务上进行微调。尽管它最近获得了成功和广泛的采用,但对预训练的语言模型的微调通常会遭受过度拟合,这会导致由于模型的复杂性极高的复杂性和下游任务的有限培训样本而导致的普遍性差。为了解决这个问题,我们提出了一个新颖有效的微调框架,称为Layerwise噪声稳定性正则化(LNSR)。具体而言,我们建议注入标准的高斯噪声或势内噪声,并将微调模型的隐藏表示形式定向。我们首先提供理论分析以支持我们方法的功效。然后,我们证明了所提出的方法的优势,而不是其他最先进的算法,包括L2-SP,MixOut和Smart。尽管这些先前的作品仅验证其方法对相对简单的文本分类任务的有效性,但我们还验证了方法对问题答案任务的有效性,而目标问题更加困难,并且可以使用更多的培训示例。此外,广泛的实验结果表明,所提出的算法不仅可以提高语言模型的内域性能,而且还可以改善域外数据的域概括性能。
translated by 谷歌翻译
The success of machine learning algorithms generally depends on data representation, and we hypothesize that this is because different representations can entangle and hide more or less the different explanatory factors of variation behind the data. Although specific domain knowledge can be used to help design representations, learning with generic priors can also be used, and the quest for AI is motivating the design of more powerful representation-learning algorithms implementing such priors. This paper reviews recent work in the area of unsupervised feature learning and deep learning, covering advances in probabilistic models, auto-encoders, manifold learning, and deep networks. This motivates longer-term unanswered questions about the appropriate objectives for learning good representations, for computing representations (i.e., inference), and the geometrical connections between representation learning, density estimation and manifold learning.
translated by 谷歌翻译
在基于变压器的模型中通常观察到令牌均匀性,在经过变压器中经过堆叠的多个自我发场层后,不同的令牌共享大量相似信息。在本文中,我们建议使用每个变压器层的输出的奇异值的分布来表征令牌均匀性的现象,并从经验上说明,偏斜的奇异值分布可以减轻“令牌均匀性”问题。基于我们的观察结果,我们定义了奇异值分布的几种理想特性,并提出了一种新的转换函数,以更新奇异值。我们表明,除了减轻令牌均匀性外,转换功能还应保留原始嵌入空间中的当地邻域结构。我们提出的奇异价值变换函数应用于伯特,阿尔伯特,罗伯塔和德文尔特等一系列基于变压器的语言模型,并且在语义文本相似性评估和一系列胶水任务中观察到了改善的性能。我们的源代码可在https://github.com/hanqi-qi/tokenuni.git上找到。
translated by 谷歌翻译
我们介绍了嘈杂的特征混音(NFM),这是一个廉价但有效的数据增强方法,这些方法结合了基于插值的训练和噪声注入方案。不是用凸面的示例和它们的标签的凸面组合训练,而不是在输入和特征空间中使用对数据点对的噪声扰动凸组合。该方法包括混合和歧管混合作为特殊情况,但它具有额外的优点,包括更好地平滑决策边界并实现改进的模型鲁棒性。我们提供理论要理解这一点以及NFM的隐式正则化效果。与混合和歧管混合相比,我们的理论得到了经验结果的支持,展示了NFM的优势。我们表明,在一系列计算机视觉基准数据集中,使用NFM培训的剩余网络和视觉变压器在清洁数据的预测准确性和鲁棒性之间具有有利的权衡。
translated by 谷歌翻译
具有许多预训练模型(PTM)的模型中心已经是深度学习的基石。尽管以高成本建造,但它们仍然保持\ emph {探索}:从业人员通常会通过普及从提供的模型中心中选择一个PTM,然后对PTM进行微调以解决目标任务。这种na \“我的但共同的实践构成了两个障碍,以充分利用预训练的模型中心:(1)通过受欢迎程度选择的PTM选择没有最佳保证;(2)仅使用一个PTM,而其余的PTM则被忽略。理想情况下。理想情况下。 ,为了最大程度地利用预训练的模型枢纽,需要尝试所有PTM的所有组合和广泛的微调每个PTM组合,这会产生指数组合和不可偿还的计算预算。在本文中,我们提出了一种新的范围排名和调整预训练的模型:(1)我们的会议论文〜\ citep {you_logme:_2021}提出的logMe,以估算预先训练模型提取的标签证据的最大值,该标签证据可以在模型中排名所有PTMS用于各种类型的PTM和任务的枢纽\ Emph {微调之前}。(2)如果我们不偏爱模型的体系结构,则可以对排名最佳的PTM进行微调和部署,或者可以通过TOPE调整目标PTM -k通过t排名PTM他提出了b-tuning算法。排名部分基于会议论文,我们在本文中完成了其理论分析,包括启发式证据最大化程序的收敛证明和特征维度的影响。调整零件引入了一种用于调整多个PTM的新型贝叶斯调整(B-Tuning)方法,该方法超过了专门的方法,该方法旨在调整均匀的PTMS,并为调整异质PTMS设置了一种新的技术。利用PTM枢纽的新范式对于整个机器学习社区的大量受众来说可能会很有趣。
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 谷歌翻译
Language models with the Transformers structure have shown great performance in natural language processing. However, there still poses problems when fine-tuning pre-trained language models on downstream tasks, such as over-fitting or representation collapse. In this work, we propose HyPe, a simple yet effective fine-tuning technique to alleviate such problems by perturbing hidden representations of Transformers layers. Unlike previous works that only add noise to inputs or parameters, we argue that the hidden representations of Transformers layers convey more diverse and meaningful language information. Therefore, making the Transformers layers more robust to hidden representation perturbations can further benefit the fine-tuning of PLMs en bloc. We conduct extensive experiments and analyses on GLUE and other natural language inference datasets. Results demonstrate that HyPe outperforms vanilla fine-tuning and enhances generalization of hidden representations from different layers. In addition, HyPe acquires negligible computational overheads, and is better than and compatible with previous state-of-the-art fine-tuning techniques.
translated by 谷歌翻译
无需进行任何架构更改的微调审计语言模型(LMS)已成为学习下游任务各种语言的规范。但是,对于非语言下游任务,一种常见的做法是使用特定于任务的设计来进行输入,输出层和损失功能。例如,可以通过用图像补丁嵌入层替换单词嵌入层,带有10向输出层的单词图表输出层以及单词预测丢失,将LM微调为MNIST分类器。 - 分别分类损失。出现一个自然的问题:LM微调可以在不更改模型架构或损失功能的情况下解决非语言的下游任务吗?为了回答这一点,我们提出了语言交织的微调(LIFT),并通过对非语言分类和回归任务的套件进行广泛的经验研究来研究其功效和局限性。 Lift不会对模型体系结构或损失功能进行任何更改,它仅依赖于自然语言界面,从而使“使用LMS进行无代码机”学习。我们发现,在各种低维分类和回归任务中,LIFT的性能相对较好,在许多情况下匹配了最佳基线的性能,尤其是对于分类任务。我们报告了有关升力的基本特性的实验结果,包括其电感偏差,样品效率,推断出外推能力,对异常值的鲁棒性和标签噪声以及概括。我们还分析了一些特定于提升的属性/技术,例如,通过适当提示,预测不确定性量化和两阶段微调,上下文感知学习。我们的代码可从https://github.com/uw-madison-lee-lab/languageinterfacefacefacefinetuning获得。
translated by 谷歌翻译
本文提出了一项新的统计分析,旨在解释自然语言处理(NLP)中训练技术的最新成就。我们证明,当预训练任务的类(例如,蒙版语言模型任务中的不同单词)的类别足够多样化,从某种意义上说,最后一个线性层的最小奇异值在预训练中(表示为$ \ \ \ \ \ Tilde {\ nu} $)很大,然后预训练可以显着提高下游任务的样本效率。特别是,我们显示转移学习过量风险享受$ o \ left(\ frac {1} {\ tilde {\ nu} \ sqrt {n}} \ right)$ rate,与$ o \ left相比(\)标准监督学习中的frac {1} {\ sqrt {m}} \ right)$ rate。在这里,$ n $是预训练数据的数量,$ m $是下游任务中的数据数,通常是$ n \ gg m $。我们的证明依赖于矢量形式的rademacher复杂性链规则来拆卸复合函数类别和修改的自我符合条件。这些技术可能具有独立的兴趣。
translated by 谷歌翻译
Accurate uncertainty quantification is a major challenge in deep learning, as neural networks can make overconfident errors and assign high confidence predictions to out-of-distribution (OOD) inputs. The most popular approaches to estimate predictive uncertainty in deep learning are methods that combine predictions from multiple neural networks, such as Bayesian neural networks (BNNs) and deep ensembles. However their practicality in real-time, industrial-scale applications are limited due to the high memory and computational cost. Furthermore, ensembles and BNNs do not necessarily fix all the issues with the underlying member networks. In this work, we study principled approaches to improve uncertainty property of a single network, based on a single, deterministic representation. By formalizing the uncertainty quantification as a minimax learning problem, we first identify distance awareness, i.e., the model's ability to quantify the distance of a testing example from the training data, as a necessary condition for a DNN to achieve high-quality (i.e., minimax optimal) uncertainty estimation. We then propose Spectral-normalized Neural Gaussian Process (SNGP), a simple method that improves the distance-awareness ability of modern DNNs with two simple changes: (1) applying spectral normalization to hidden weights to enforce bi-Lipschitz smoothness in representations and (2) replacing the last output layer with a Gaussian process layer. On a suite of vision and language understanding benchmarks, SNGP outperforms other single-model approaches in prediction, calibration and out-of-domain detection. Furthermore, SNGP provides complementary benefits to popular techniques such as deep ensembles and data augmentation, making it a simple and scalable building block for probabilistic deep learning. Code is open-sourced at https://github.com/google/uncertainty-baselines
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 谷歌翻译
We propose a new regularization method based on virtual adversarial loss: a new measure of local smoothness of the conditional label distribution given input. Virtual adversarial loss is defined as the robustness of the conditional label distribution around each input data point against local perturbation. Unlike adversarial training, our method defines the adversarial direction without label information and is hence applicable to semi-supervised learning. Because the directions in which we smooth the model are only "virtually" adversarial, we call our method virtual adversarial training (VAT). The computational cost of VAT is relatively low. For neural networks, the approximated gradient of virtual adversarial loss can be computed with no more than two pairs of forward-and back-propagations. In our experiments, we applied VAT to supervised and semi-supervised learning tasks on multiple benchmark datasets. With a simple enhancement of the algorithm based on the entropy minimization principle, our VAT achieves state-of-the-art performance for semi-supervised learning tasks on SVHN and CIFAR-10.
translated by 谷歌翻译
机器学习(ML)鲁棒性和域的概括从根本上相关:它们基本上涉及对抗和自然设置下的数据分布变化。一方面,最近的研究表明,更健壮的(受对抗训练)模型更为普遍。另一方面,缺乏对其基本联系的理论理解。在本文中,我们探讨了考虑到不同因素(例如规范正规化和数据增强)(DA)等不同因素的正则化和域转移性之间的关系。我们提出了一个一般的理论框架,证明涉及模型函数类正则化的因素是相对域可传递性的足够条件。我们的分析意味着``鲁棒性''既不必需,也不足以使其可转移性;而正规化是理解域可转移性的更基本的观点。然后,我们讨论流行的DA协议(包括对抗性培训),并显示何时可以将其视为功能在某些条件下进行类正则化并因此改善了概括。我们进行了广泛的实验以验证我们的理论发现,并显示了几个反例,其中鲁棒性和概括在不同的数据集上呈负相关。
translated by 谷歌翻译
我们为研究通过将噪声注入隐藏状态而训练的经常性神经网络(RNN)提供了一般框架。具体地,我们考虑RNN,其可以被视为由输入数据驱动的随机微分方程的离散化。该框架允许我们通过在小噪声制度中导出近似显式规范器来研究一般噪声注入方案的隐式正则化效果。我们发现,在合理的假设下,这种隐含的正规化促进了更平坦的最小值;它偏向具有更稳定动态的模型;并且,在分类任务中,它有利于具有较大分类余量的模型。获得了全局稳定性的充分条件,突出了随机稳定的现象,其中噪音注入可以在训练期间提高稳定性。我们的理论得到了经验结果支持,证明RNN对各种输入扰动具有改善的鲁棒性。
translated by 谷歌翻译
数据增强是通过转换为机器学习的人工创建数据的人工创建,是一个跨机器学习学科的研究领域。尽管它对于增加模型的概括功能很有用,但它还可以解决许多其他挑战和问题,从克服有限的培训数据到正规化目标到限制用于保护隐私的数据的数量。基于对数据扩展的目标和应用的精确描述以及现有作品的分类法,该调查涉及用于文本分类的数据增强方法,并旨在为研究人员和从业者提供简洁而全面的概述。我们将100多种方法划分为12种不同的分组,并提供最先进的参考文献来阐述哪种方法可以通过将它们相互关联,从而阐述了哪种方法。最后,提供可能构成未来工作的基础的研究观点。
translated by 谷歌翻译
机器学习中的终身学习范式是一个有吸引力的替代方案,不仅是由于其与生物学学习的相似之处,而且它通过避免过度模型重新训练来减少能量浪费的可能性。对此范式的关键挑战是灾难性遗忘的现象。随着在机器学习中训练有素的模型的越来越受欢迎和成功,我们提出了问题:终身学习中的训练前比赛,特别是关于灾难性的遗忘?我们在大型预先训练模型的上下文中调查现有方法,并在各种文本和图像分类任务中评估其性能,包括使用15个不同的NLP任务的新型数据集进行大规模研究。在所有设置中,我们观察到,通用预训练隐含地减轻了在与随机初始化模型相比依次学习多个任务时灾难性忘记的影响。然后,我们进一步调查为什么预先训练缓解在这个环境中忘记。我们通过分析损失景观来研究这种现象,发现预先训练的重量似乎可以通过导致更宽的最小值来缓解遗忘。基于这一洞察力,我们提出了对当前任务损失和损失盆地锐利的共同优化,以便在连续微调期间明确鼓励更广泛的盆地。我们表明,这种优化方法导致与跨多个设置的任务顺序持续学习的性能相当,而无需保留具有任务数量的大小的内存。
translated by 谷歌翻译
Explainability has been widely stated as a cornerstone of the responsible and trustworthy use of machine learning models. With the ubiquitous use of Deep Neural Network (DNN) models expanding to risk-sensitive and safety-critical domains, many methods have been proposed to explain the decisions of these models. Recent years have also seen concerted efforts that have shown how such explanations can be distorted (attacked) by minor input perturbations. While there have been many surveys that review explainability methods themselves, there has been no effort hitherto to assimilate the different methods and metrics proposed to study the robustness of explanations of DNN models. In this work, we present a comprehensive survey of methods that study, understand, attack, and defend explanations of DNN models. We also present a detailed review of different metrics used to evaluate explanation methods, as well as describe attributional attack and defense methods. We conclude with lessons and take-aways for the community towards ensuring robust explanations of DNN model predictions.
translated by 谷歌翻译
大量的数据和创新算法使数据驱动的建模成为现代行业的流行技术。在各种数据驱动方法中,潜在变量模型(LVM)及其对应物占主要份额,并在许多工业建模领域中起着至关重要的作用。 LVM通常可以分为基于统计学习的经典LVM和基于神经网络的深层LVM(DLVM)。我们首先讨论经典LVM的定义,理论和应用,该定义和应用既是综合教程,又是对经典LVM的简短申请调查。然后,我们对当前主流DLVM进行了彻底的介绍,重点是其理论和模型体系结构,此后不久就提供了有关DLVM的工业应用的详细调查。上述两种类型的LVM具有明显的优势和缺点。具体而言,经典的LVM具有简洁的原理和良好的解释性,但是它们的模型能力无法解决复杂的任务。基于神经网络的DLVM具有足够的模型能力,可以在复杂的场景中实现令人满意的性能,但它以模型的解释性和效率为例。旨在结合美德并减轻这两种类型的LVM的缺点,并探索非神经网络的举止以建立深层模型,我们提出了一个新颖的概念,称为“轻量级Deep LVM(LDLVM)”。在提出了这个新想法之后,该文章首先阐述了LDLVM的动机和内涵,然后提供了两个新颖的LDLVM,并详尽地描述了其原理,建筑和优点。最后,讨论了前景和机会,包括重要的开放问题和可能的研究方向。
translated by 谷歌翻译
最近有一项激烈的活动在嵌入非常高维和非线性数据结构的嵌入中,其中大部分在数据科学和机器学习文献中。我们分四部分调查这项活动。在第一部分中,我们涵盖了非线性方法,例如主曲线,多维缩放,局部线性方法,ISOMAP,基于图形的方法和扩散映射,基于内核的方法和随机投影。第二部分与拓扑嵌入方法有关,特别是将拓扑特性映射到持久图和映射器算法中。具有巨大增长的另一种类型的数据集是非常高维网络数据。第三部分中考虑的任务是如何将此类数据嵌入中等维度的向量空间中,以使数据适合传统技术,例如群集和分类技术。可以说,这是算法机器学习方法与统计建模(所谓的随机块建模)之间的对比度。在论文中,我们讨论了两种方法的利弊。调查的最后一部分涉及嵌入$ \ mathbb {r}^ 2 $,即可视化中。提出了三种方法:基于第一部分,第二和第三部分中的方法,$ t $ -sne,UMAP和大节。在两个模拟数据集上进行了说明和比较。一个由嘈杂的ranunculoid曲线组成的三胞胎,另一个由随机块模型和两种类型的节点产生的复杂性的网络组成。
translated by 谷歌翻译
一种广泛使用的传输学习算法是微调的,其中预先接受的模型在具有少量标记数据的目标任务上进行微调。当预训练模型的容量大于目标数据集的大小时,微调容易过度,并“记忆”训练标签。因此,一个重要的问题是规范微调,并确保其对噪声的鲁棒性。为了解决这个问题,我们首先分析微调的泛化属性。我们介绍了PAC-Bayes泛化界定,这取决于在微调和微调模型的噪声稳定期间在每层中行进的距离。我们经验衡量这些数量。根据分析,我们建议正规化的自我标签 - 正规化和自我标记方法之间的插值,包括(i)层明智的正则化,以限制在每层中行进的距离; (ii)自我标记 - 纠正和标签重新重复纠正错误标记的数据点(模型是自信的)和重新重复的自信数据点。我们在使用多个预先训练的模型体系结构上验证我们的方法和文本数据集的广泛集合和文本数据集。我们的方法将基线方法提高了1.76%(平均),可实现七种图像分类任务和0.75%,为几次拍摄的分类任务。当目标数据集包括嘈杂的标签时,我们的方法在两个嘈杂的设置中平均优于基线方法3.56%。
translated by 谷歌翻译