已经提出了各种归一化层来帮助培训神经网络。组归一化(GN)是在视觉识别任务中实现出色表现的有效和有吸引力的研究之一。尽管取得了巨大的成功,但GN仍然存在几个问题,可能会对神经网络培训产生负面影响。在本文中,我们介绍了一个分析框架,并讨论了GN在影响神经网络训练过程时的工作原理。从实验结果中,我们得出结论GN对批处理标准化(BN)的较低性能的真正原因:1)\ TextBf {不稳定的训练性能},2)\ TextBf {更敏感}对失真,无论是来自外部噪声还是扰动。通过正规化。此外,我们发现GN只能在某个特定时期内帮助神经网络培训,而BN可以帮助整个培训中的网络。为了解决这些问题,我们提出了一个新的归一化层,该层是通过合并BN的优势在GN顶部构建的。图像分类任务的实验结果表明,所提出的归一化层优于官方GN,以提高识别精度,无论批次大小如何,并稳定网络训练。
translated by 谷歌翻译
Batch Normalization (BatchNorm) is a widely adopted technique that enables faster and more stable training of deep neural networks (DNNs). Despite its pervasiveness, the exact reasons for BatchNorm's effectiveness are still poorly understood. The popular belief is that this effectiveness stems from controlling the change of the layers' input distributions during training to reduce the so-called "internal covariate shift". In this work, we demonstrate that such distributional stability of layer inputs has little to do with the success of BatchNorm. Instead, we uncover a more fundamental impact of BatchNorm on the training process: it makes the optimization landscape significantly smoother. This smoothness induces a more predictive and stable behavior of the gradients, allowing for faster training.
translated by 谷歌翻译
重量衰减通常用于确保具有批归归量的深神经网络的训练实践中的良好概括(BN-DNNS),在该训练中,由于归一化,某些卷积层对于重量重新恢复是不变的。在本文中,我们证明了重量衰减的实际用法仍然存在一些未解决的问题,尽管现有的理论工作在解释BN-DNNS中体重衰减的影响方面。一方面,当非自适应学习率例如使用动量的SGD,即使在初始训练阶段,有效学习率也会继续增加,从而导致许多神经体系结构的过度拟合效果。另一方面,在SGDM和自适应学习率优化器中,例如亚当,体重衰减对概括的影响对超参数非常敏感。因此,找到最佳的重量衰减参数需要广泛的参数搜索。为了解决这些弱点,我们建议使用简单而有效的重量重新缩放(WRS)方案来规范重量规范,以替代体重衰减。 WRS通过将重量标准明确地重新定为单位规范来控制重量规范,从而防止梯度增加,但也确保了足够大的有效学习率以提高概括。在各种计算机视觉应用程序中,包括图像分类,对象检测,语义细分和人群计数,我们与重量衰减,隐含重量重新缩放(重量标准化)和梯度投影(ADAMP)相比,显示了WR的有效性和鲁棒性。
translated by 谷歌翻译
Deep residual networks were shown to be able to scale up to thousands of layers and still have improving performance. However, each fraction of a percent of improved accuracy costs nearly doubling the number of layers, and so training very deep residual networks has a problem of diminishing feature reuse, which makes these networks very slow to train. To tackle these problems, in this paper we conduct a detailed experimental study on the architecture of ResNet blocks, based on which we propose a novel architecture where we decrease depth and increase width of residual networks. We call the resulting network structures wide residual networks (WRNs) and show that these are far superior over their commonly used thin and very deep counterparts. For example, we demonstrate that even a simple 16-layer-deep wide residual network outperforms in accuracy and efficiency all previous deep residual networks, including thousand-layerdeep networks, achieving new state-of-the-art results on CIFAR, SVHN, COCO, and significant improvements on ImageNet. Our code and models are available at https: //github.com/szagoruyko/wide-residual-networks.
translated by 谷歌翻译
Group Normalization
Yuxin Wu , Kaiming He
分类:
2018-03-22
Batch Normalization (BN) is a milestone technique in the development of deep learning, enabling various networks to train. However, normalizing along the batch dimension introduces problems -BN's error increases rapidly when the batch size becomes smaller, caused by inaccurate batch statistics estimation. This limits BN's usage for training larger models and transferring features to computer vision tasks including detection, segmentation, and video, which require small batches constrained by memory consumption. In this paper, we present Group Normalization (GN) as a simple alternative to BN. GN divides the channels into groups and computes within each group the mean and variance for normalization. GN's computation is independent of batch sizes, and its accuracy is stable in a wide range of batch sizes. On ResNet-50 trained in ImageNet, GN has 10.6% lower error than its BN counterpart when using a batch size of 2; when using typical batch sizes, GN is comparably good with BN and outperforms other normalization variants. Moreover, GN can be naturally transferred from pre-training to fine-tuning. GN can outperform its BNbased counterparts for object detection and segmentation in COCO, 1 and for video classification in Kinetics, showing that GN can effectively replace the powerful BN in a variety of tasks. GN can be easily implemented by a few lines of code in modern libraries.
translated by 谷歌翻译
神经架构的创新促进了语言建模和计算机视觉中的重大突破。不幸的是,如果网络参数未正确初始化,新颖的架构通常会导致挑战超参数选择和培训不稳定。已经提出了许多架构特定的初始化方案,但这些方案并不总是可移植到新体系结构。本文介绍了毕业,一种用于初始化神经网络的自动化和架构不可知论由方法。毕业基础是一个简单的启发式;调整每个网络层的规范,使得具有规定的超参数的SGD或ADAM的单个步骤导致可能的损耗值最小。通过在每个参数块前面引入标量乘数变量,然后使用简单的数字方案优化这些变量来完成此调整。 GradInit加速了许多卷积架构的收敛性和测试性能,无论是否有跳过连接,甚至没有归一化层。它还提高了机器翻译的原始变压器架构的稳定性,使得在广泛的学习速率和动量系数下使用ADAM或SGD来训练它而无需学习速率预热。代码可在https://github.com/zhuchen03/gradinit上获得。
translated by 谷歌翻译
Training Deep Neural Networks is complicated by the fact that the distribution of each layer's inputs changes during training, as the parameters of the previous layers change. This slows down the training by requiring lower learning rates and careful parameter initialization, and makes it notoriously hard to train models with saturating nonlinearities. We refer to this phenomenon as internal covariate shift, and address the problem by normalizing layer inputs. Our method draws its strength from making normalization a part of the model architecture and performing the normalization for each training mini-batch. Batch Normalization allows us to use much higher learning rates and be less careful about initialization. It also acts as a regularizer, in some cases eliminating the need for Dropout. Applied to a state-of-the-art image classification model, Batch Normalization achieves the same accuracy with 14 times fewer training steps, and beats the original model by a significant margin. Using an ensemble of batchnormalized networks, we improve upon the best published result on ImageNet classification: reaching 4.9% top-5 validation error (and 4.8% test error), exceeding the accuracy of human raters.
translated by 谷歌翻译
这项研究介绍了一个称为批处理层归一化(BLN)的新的归一化层,以减少深神经网络层中内部协变量转移的问题。作为批处理和层归一化的组合版本,BLN自适应地将适当的重量放在迷你批处理上,并基于迷你批次的逆尺寸,在学习过程中将输入标准化为层。它还使用微型批量统计或人口统计数据,在推理时间执行精确的计算,并在推理时间进行较小的更改。使用迷你批量或人口统计的决策过程使BLN具有在模型的超参数优化过程中发挥全面作用的能力。 BLN的关键优势是对独立于输入数据的理论分析的支持,其统计配置在很大程度上取决于执行的任务,培训数据的量和批次的大小。测试结果表明,BLN的应用潜力及其更快的收敛性在卷积和复发性神经网络中都比批处理归一化和层归一化。实验的代码在线公开可用(https://github.com/a2amir/batch-layer-normalization)。
translated by 谷歌翻译
Very deep convolutional networks with hundreds of layers have led to significant reductions in error on competitive benchmarks. Although the unmatched expressiveness of the many layers can be highly desirable at test time, training very deep networks comes with its own set of challenges. The gradients can vanish, the forward flow often diminishes, and the training time can be painfully slow. To address these problems, we propose stochastic depth, a training procedure that enables the seemingly contradictory setup to train short networks and use deep networks at test time. We start with very deep networks but during training, for each mini-batch, randomly drop a subset of layers and bypass them with the identity function. This simple approach complements the recent success of residual networks. It reduces training time substantially and improves the test error significantly on almost all data sets that we used for evaluation. With stochastic depth we can increase the depth of residual networks even beyond 1200 layers and still yield meaningful improvements in test error (4.91% on CIFAR-10).
translated by 谷歌翻译
深度学习归一化技术的基本特性,例如批准归一化,正在使范围前的参数量表不变。此类参数的固有域是单位球,因此可以通过球形优化的梯度优化动力学以不同的有效学习率(ELR)来表示,这是先前研究的。在这项工作中,我们使用固定的ELR直接研究了训练量表不变的神经网络的特性。我们根据ELR值发现了这种训练的三个方案:收敛,混乱平衡和差异。我们详细研究了这些制度示例的理论检查,以及对真实规模不变深度学习模型的彻底经验分析。每个制度都有独特的特征,并反映了内在损失格局的特定特性,其中一些与先前对常规和规模不变的神经网络培训的研究相似。最后,我们证明了如何在归一化网络的常规培训以及如何利用它们以实现更好的Optima中反映发现的制度。
translated by 谷歌翻译
批次归一化被广泛用于深度学习以使中间激活归一化。深层网络臭名昭著地增加了训练的复杂性,要​​求仔细的体重初始化,需要较低的学习率等。这些问题已通过批归一化解决(\ textbf {bn})来解决,通过将激活的输入归功于零平均值和单位标准偏差。使培训过程的批归归量化部分显着加速了非常深网络的训练过程。一个新的研究领域正在进行研究\ textbf {bn}成功背后的确切理论解释。这些理论见解中的大多数试图通过将其对优化,体重量表不变性和正则化的影响来解释\ textbf {bn}的好处。尽管\ textbf {bn}在加速概括方面取得了不可否认的成功,但分析的差距将\ textbf {bn}与正则化参数的效果相关联。本文旨在通过\ textbf {bn}对正则化参数的数据依赖性自动调整,并具有分析证明。我们已将\ textbf {bn}提出为对非 - \ textbf {bn}权重的约束优化,通过该优化,我们通过它演示其数据统计信息依赖于正则化参数的自动调整。我们还为其在嘈杂的输入方案下的行为提供了分析证明,该方案揭示了正则化参数的信号与噪声调整。我们还通过MNIST数据集实验的经验结果证实了我们的主张。
translated by 谷歌翻译
Power等人报道的\ emph {grokking现象} {power2021grokking}是指一个长期过度拟合之后,似乎突然过渡到完美的概括。在本文中,我们试图通过一系列经验研究来揭示Grokking的基础。具体而言,我们在极端的训练阶段(称为\ emph {slingshot机构)发现了一个优化的异常缺陷自适应优化器。可以通过稳定和不稳定的训练方案之间的循环过渡来测量弹弓机制的突出伪像,并且可以通过最后一层重量的规范的循环行为轻松监测。我们从经验上观察到,在\ cite {power2021grokking}中报道的无明确正规化,几乎完全发生在\ emph {slingshots}的开始时,并且没有它。虽然在更一般的环境中常见且容易复制,但弹弓机制并不遵循我们所知道的任何已知优化理论,并且可以轻松地忽略而无需深入研究。我们的工作表明,在培训的后期阶段,适应性梯度优化器的令人惊讶且有用的归纳偏见,要求对其起源进行修订。
translated by 谷歌翻译
分布式深度学习(DDL)对于大型深度学习(DL)培训至关重要。同步随机梯度下降(SSGD)1是事实上的DDL优化方法。使用足够大的批量大小对于实现DDL运行时加速至关重要。在大量批量设置中,必须增加学习速率以补偿减少的参数更新数量。然而,大型学习率可能会损害SSGD和培训可以很容易地分歧。最近,已经提出了分散的平行SGD(DPSGD)以改善分布式训练速度。在本文中,我们发现DPSGD不仅具有系统明智的运行时效,而且在大批量设置中对SSGD的显着收敛性有益。基于对DPSGD学习动态的详细分析,我们发现DPSGD引入了额外的横向依赖性噪声,可自动调整有效的学习率以提高收敛。此外,我们理论上表明这种噪音平滑了损失景观,因此允许更大的学习率。我们在18个最先进的DL模型/任务中进行广泛的研究,并证明DPSGD通常会收敛于SSGD在大批批量设置中大的学习速率的情况下融合。我们的发现一致地遍布两个不同的应用领域:计算机视觉(CIFAR10和Imagenet-1K)和自动语音识别(SWB300和SWB2000),以及两种不同类型的神经网络模型:卷积神经网络和长短期内存经常性神经网络。
translated by 谷歌翻译
在本文中,我们表明样品的欧几里得规范的差异可以在空间翻译和划分归一化之后对语义差异甚至混乱做出贡献。为了解决这个问题,我们提出了一种直观但有效的方法,以均衡样品向量的欧几里得规范。具体来说,我们$ l_2 $ - 在批准之前将每个样品向量归一化,因此样品向量的幅度相同。由于所提出的方法结合了$ L_2 $归一化和批量归一化,因此我们将我们的方法称为$ L_2 $ bn。 $ l_2 $ bn可以增强阶层内特征的紧凑性,并扩大阶层间特征的差异。此外,它可以帮助梯度收敛到稳定的量表。 $ l_2 $ bn易于实现,并且可以在没有任何其他参数和超参数的情况下发挥其效果。因此,它可以用作神经网络的基本归一化方法。我们通过对图像分类和声学场景分类任务进行各种模型的广泛实验来评估$ L_2 $亿美元的有效性。实验结果表明,$ L_2 $ bn能够提高各种神经网络模型的概括能力,并取得了可观的性能改进。
translated by 谷歌翻译
使用卷积神经网络(CNN)已经显着改善了几种图像处理任务,例如图像分类和对象检测。与Reset和Abseralnet一样,许多架构在创建时至少在一个数据集中实现了出色的结果。培训的一个关键因素涉及网络的正规化,这可以防止结构过度装备。这项工作分析了在过去几年中开发的几种正规化方法,显示了不同CNN模型的显着改进。该作品分为三个主要区域:第一个称为“数据增强”,其中所有技术都侧重于执行输入数据的更改。第二个,命名为“内部更改”,旨在描述修改神经网络或内核生成的特征映射的过程。最后一个称为“标签”,涉及转换给定输入的标签。这项工作提出了与关于正则化的其他可用调查相比的两个主要差异:(i)第一个涉及在稿件中收集的论文并非超过五年,并第二个区别是关于可重复性,即所有作品此处推荐在公共存储库中可用的代码,或者它们已直接在某些框架中实现,例如Tensorflow或Torch。
translated by 谷歌翻译
分批归一化(BN)由归一化组成部分,然后是仿射转化,并且对于训练深神经网络至关重要。网络中每个BN的标准初始化分别设置了仿射变换量表,并将其转移到1和0。但是,经过训练,我们观察到这些参数从初始化中并没有太大变化。此外,我们注意到归一化过程仍然可以产生过多的值,这对于训练是不可能的。我们重新审视BN公式,并为BN提出了一种新的初始化方法和更新方法,以解决上述问题。实验旨在强调和证明适当的BN规模初始化对性能的积极影响,并使用严格的统计显着性测试进行评估。该方法可以与现有实施方式一起使用,没有额外的计算成本。源代码可在https://github.com/osu-cvl/revisiting-bninit上获得。
translated by 谷歌翻译
培训具有批量标准化和重量衰减的神经网络已成为近年来的常见做法。在这项工作中,我们表明它们的结合使用可能导致优化动态的令人惊讶的周期性行为:培训过程定期表现出稳定,然而,不会导致完全发散但导致新的培训期。我们严格研究了从经验和理论观点的发现的定期行为基础的机制,并分析了实践中发生的条件。我们还证明,周期性行为可以被视为在批量归一化和体重衰减的训练中进行两种先前反对的视角的概括,即平衡推定和不稳定的推定。
translated by 谷歌翻译
我们介绍Softmax梯度篡改,一种用于修改神经网络后向通过的梯度的技术,以提高其准确性。我们的方法使用基于功率的概率变换来改变预测的概率值,然后将梯度重新计算在后向通过。这种修改导致更平滑的渐变简介,我们在经验和理论上展示。我们对剩余网络进行了转换参数进行了网格搜索。我们证明修改CUMMNET中的软MAX梯度可能导致培训准确性提高,从而增加训练数据的适合,并最大限度地利用神经网络的学习能力。当与标签平滑等正则化技术相结合时,我们获得更好的测试度量和更低的泛化间隙。 Softmax渐变篡改在ImageNet DataSet上的基线上以0.52 \%$ 0.52 \%$ 0.52 \%$ 0.52 \%。我们的方法非常通用,可以跨各种不同的网络架构和数据集使用。
translated by 谷歌翻译
批量白化是一种通过转换输入特征来加速和稳定训练的技术,以具有零平均(居中)和单位方差(缩放),并且通过去除信道(去相关)之间的线性相关性。在常用的结构中,通过批量归一化经验优化,归一化层出现在卷积和激活功能之间。在批量白化研究中采用相同的结构而无需进一步分析;甚至分析了批次白化的前提,即线性层的输入变白。为了弥补差距,我们提出了一种新的卷积单元,符合该理论,我们的方法通常提高批量美白的性能。此外,我们通过调查特征的等级和相关性来展示原始卷积单元的效率。由于我们的方法是可采用的现成增白模块,我们使用迭代标准化(Iternorm),最先进的美白模块,并在五个图像分类数据集中获得显着提高的性能:CiFar-10,CiFar-100 ,幼崽200-2011,斯坦福狗和想象。值得注意的是,我们验证了我们的方法在使用大型学习率,组大小和迭代号时,提高了白化的稳定性和性能。
translated by 谷歌翻译
Large pre-trained models, such as Bert, GPT, and Wav2Vec, have demonstrated great potential for learning representations that are transferable to a wide variety of downstream tasks . It is difficult to obtain a large quantity of supervised data due to the limited availability of resources and time. In light of this, a significant amount of research has been conducted in the area of adopting large pre-trained datasets for diverse downstream tasks via fine tuning, linear probing, or prompt tuning in low resource settings. Normalization techniques are essential for accelerating training and improving the generalization of deep neural networks and have been successfully used in a wide variety of applications. A lot of normalization techniques have been proposed but the success of normalization in low resource downstream NLP and speech tasks is limited. One of the reasons is the inability to capture expressiveness by rescaling parameters of normalization. We propose KullbackLeibler(KL) Regularized normalization (KL-Norm) which make the normalized data well behaved and helps in better generalization as it reduces over-fitting, generalises well on out of domain distributions and removes irrelevant biases and features with negligible increase in model parameters and memory overheads. Detailed experimental evaluation on multiple low resource NLP and speech tasks, demonstrates the superior performance of KL-Norm as compared to other popular normalization and regularization techniques.
translated by 谷歌翻译