Sign-based algorithms (e.g. SIGNSGD) have been proposed as a biased gradient compression technique to alleviate the communication bottleneck in training large neural networks across multiple workers. We show simple convex counter-examples where signSGD does not converge to the optimum. Further, even when it does converge, signSGD may generalize poorly when compared with SGD. These issues arise because of the biased nature of the sign compression operator.We then show that using error-feedback, i.e. incorporating the error made by the compression operator into the next step, overcomes these issues. We prove that our algorithm (EF-SGD) with arbitrary compression operator achieves the same rate of convergence as SGD without any additional assumptions. Thus EF-SGD achieves gradient compression for free. Our experiments thoroughly substantiate the theory and show that error-feedback improves both convergence and generalization. Code can be found at https://github.com/epfml/error-feedback-SGD.
translated by 谷歌翻译
在过去的几年中,各种通信压缩技术已经出现为一个不可或缺的工具,有助于缓解分布式学习中的通信瓶颈。然而,尽管{\ em偏见}压缩机经常在实践中显示出卓越的性能,但与更多的研究和理解的{\ EM无偏见}压缩机相比,非常少见。在这项工作中,我们研究了三类偏置压缩操作员,其中两个是新的,并且它们在施加到(随机)梯度下降和分布(随机)梯度下降时的性能。我们首次展示偏置压缩机可以在单个节点和分布式设置中导致线性收敛速率。我们证明了具有错误反馈机制的分布式压缩SGD方法,享受ergodic速率$ \ mathcal {o} \ left(\ delta l \ exp [ - \ frac {\ mu k} {\ delta l}] + \ frac {(c + \ delta d)} {k \ mu} \右)$,其中$ \ delta \ ge1 $是一个压缩参数,它在应用更多压缩时增长,$ l $和$ \ mu $是平滑性和强凸常数,$ C $捕获随机渐变噪声(如果在每个节点上计算完整渐变,则$ C = 0 $如果在每个节点上计算),则$ D $以最佳($ d = 0 $ for over参数化模型)捕获渐变的方差)。此外,通过对若干合成和经验的通信梯度分布的理论研究,我们阐明了为什么和通过多少偏置压缩机优于其无偏的变体。最后,我们提出了几种具有有希望理论担保和实际表现的新型偏置压缩机。
translated by 谷歌翻译
Training large neural networks requires distributing learning across multiple workers, where the cost of communicating gradients can be a significant bottleneck. SIGNSGD alleviates this problem by transmitting just the sign of each minibatch stochastic gradient. We prove that it can get the best of both worlds: compressed gradients and SGD-level convergence rate. The relative 1 / 2 geometry of gradients, noise and curvature informs whether SIGNSGD or SGD is theoretically better suited to a particular problem. On the practical side we find that the momentum counterpart of SIGNSGD is able to match the accuracy and convergence speed of ADAM on deep Imagenet models. We extend our theory to the distributed setting, where the parameter server uses majority vote to aggregate gradient signs from each worker enabling 1-bit compression of worker-server communication in both directions. Using a theorem by Gauss (1823) we prove that majority vote can achieve the same reduction in variance as full precision distributed SGD. Thus, there is great promise for sign-based optimisation schemes to achieve fast communication and fast convergence. Code to reproduce experiments is to be found at https://github.com/jxbz/signSGD.
translated by 谷歌翻译
Huge scale machine learning problems are nowadays tackled by distributed optimization algorithms, i.e. algorithms that leverage the compute power of many devices for training. The communication overhead is a key bottleneck that hinders perfect scalability. Various recent works proposed to use quantization or sparsification techniques to reduce the amount of data that needs to be communicated, for instance by only sending the most significant entries of the stochastic gradient (top-k sparsification). Whilst such schemes showed very promising performance in practice, they have eluded theoretical analysis so far. In this work we analyze Stochastic Gradient Descent (SGD) with k-sparsification or compression (for instance top-k or random-k) and show that this scheme converges at the same rate as vanilla SGD when equipped with error compensation (keeping track of accumulated errors in memory). That is, communication can be reduced by a factor of the dimension of the problem (sometimes even more) whilst still converging at the same rate. We present numerical experiments to illustrate the theoretical findings and the good scalability for distributed applications.
translated by 谷歌翻译
现代深度学习模型通常在分布式机器集合中并行培训,以减少训练时间。在这种情况下,机器之间模型更新的通信变成了一个重要的性能瓶颈,并且已经提出了各种有损的压缩技术来减轻此问题。在这项工作中,我们介绍了一种新的,简单但理论上和实践上有效的压缩技术:自然压缩(NC)。我们的技术分别应用于要进行压缩的更新向量的所有条目,并通过随机舍入到两个的(负或正)两种功能,可以通过忽略Mantissa来以“自然”方式计算。我们表明,与没有压缩相比,NC将压缩向量的第二刻增加不超过微小因子$ \ frac {9} {8} $,这意味着NC对流行训练算法的收敛速度的影响,例如分布式SGD,可以忽略不计。但是,NC启用的通信节省是可观的,导致$ 3 $ - $ 4 \ times $ $改善整体理论运行时间。对于需要更具侵略性压缩的应用,我们将NC推广到自然抖动,我们证明这比常见的随机抖动技术要好得多。我们的压缩操作员可以自行使用,也可以与现有操作员结合使用,从而产生更具侵略性的结合效果,并在理论和实践中提供新的最先进。
translated by 谷歌翻译
Parallel implementations of stochastic gradient descent (SGD) have received significant research attention, thanks to its excellent scalability properties. A fundamental barrier when parallelizing SGD is the high bandwidth cost of communicating gradient updates between nodes; consequently, several lossy compresion heuristics have been proposed, by which nodes only communicate quantized gradients. Although effective in practice, these heuristics do not always converge. In this paper, we propose Quantized SGD (QSGD), a family of compression schemes with convergence guarantees and good practical performance. QSGD allows the user to smoothly trade off communication bandwidth and convergence time: nodes can adjust the number of bits sent per iteration, at the cost of possibly higher variance. We show that this trade-off is inherent, in the sense that improving it past some threshold would violate information-theoretic lower bounds. QSGD guarantees convergence for convex and non-convex objectives, under asynchrony, and can be extended to stochastic variance-reduced techniques. When applied to training deep neural networks for image classification and automated speech recognition, QSGD leads to significant reductions in end-to-end training time. For instance, on 16GPUs, we can train the ResNet-152 network to full accuracy on ImageNet 1.8× faster than the full-precision variant. time to the same target accuracy is 2.7×. Further, even computationally-heavy architectures such as Inception and ResNet can benefit from the reduction in communication: on 16GPUs, QSGD reduces the end-to-end convergence time of ResNet152 by approximately 2×. Networks trained with QSGD can converge to virtually the same accuracy as full-precision variants, and that gradient quantization may even slightly improve accuracy in some settings. Related Work. One line of related research studies the communication complexity of convex optimization. In particular, [40] studied two-processor convex minimization in the same model, provided a lower bound of Ω(n(log n + log(1/ ))) bits on the communication cost of n-dimensional convex problems, and proposed a non-stochastic algorithm for strongly convex problems, whose communication cost is within a log factor of the lower bound. By contrast, our focus is on stochastic gradient methods. Recent work [5] focused on round complexity lower bounds on the number of communication rounds necessary for convex learning.Buckwild! [10] was the first to consider the convergence guarantees of low-precision SGD. It gave upper bounds on the error probability of SGD, assuming unbiased stochastic quantization, convexity, and gradient sparsity, and showed significant speedup when solving convex problems on CPUs. QSGD refines these results by focusing on the trade-off between communication and convergence. We view quantization as an independent source of variance for SGD, which allows us to employ standard convergence results [7]. The main differences from Buckw
translated by 谷歌翻译
最近,随机梯度下降(SGD)及其变体已成为机器学习(ML)问题大规模优化的主要方法。已经提出了各种策略来调整步骤尺寸,从自适应步骤大小到启发式方法,以更改每次迭代中的步骤大小。此外,动力已被广泛用于ML任务以加速训练过程。然而,我们对它们的理论理解存在差距。在这项工作中,我们开始通过为一些启发式优化方法提供正式保证并提出改进的算法来缩小这一差距。首先,我们分析了凸面和非凸口设置的Adagrad(延迟Adagrad)步骤大小的广义版本,这表明这些步骤尺寸允许算法自动适应随机梯度的噪声水平。我们首次显示延迟Adagrad的足够条件,以确保梯度几乎融合到零。此外,我们对延迟的Adagrad及其在非凸面设置中的动量变体进行了高概率分析。其次,我们用指数级和余弦的步骤分析了SGD,在经验上取得了成功,但缺乏理论支持。我们在平滑和非凸的设置中为它们提供了最初的收敛保证,有或没有polyak-{\ l} ojasiewicz(pl)条件。我们还显示了它们在PL条件下适应噪声的良好特性。第三,我们研究动量方法的最后迭代。我们证明了SGD的最后一个迭代的凸设置中的第一个下限,并以恒定的动量。此外,我们研究了一类跟随基于领先的领导者的动量算法,并随着动量和收缩的更新而增加。我们表明,他们的最后一个迭代具有最佳的收敛性,用于无约束的凸随机优化问题。
translated by 谷歌翻译
Mini-batch stochastic gradient descent (SGD) is state of the art in large scale distributed training. The scheme can reach a linear speedup with respect to the number of workers, but this is rarely seen in practice as the scheme often suffers from large network delays and bandwidth limits. To overcome this communication bottleneck recent works propose to reduce the communication frequency. An algorithm of this type is local SGD that runs SGD independently in parallel on different workers and averages the sequences only once in a while. This scheme shows promising results in practice, but eluded thorough theoretical analysis.We prove concise convergence rates for local SGD on convex problems and show that it converges at the same rate as mini-batch SGD in terms of number of evaluated gradients, that is, the scheme achieves linear speedup in the number of workers and mini-batch size. The number of communication rounds can be reduced up to a factor of T 1/2 -where T denotes the number of total steps-compared to mini-batch SGD. This also holds for asynchronous implementations.Local SGD can also be used for large scale training of deep learning models. The results shown here aim serving as a guideline to further explore the theoretical and practical aspects of local SGD in these applications.
translated by 谷歌翻译
最近已经提出了压缩的随机梯度下降(SGD)算法,以解决分布式和分散的优化问题(例如在联合机器学习中出现的问题)中的通信瓶颈。现有的压缩SGD算法假定使用非自适应的阶梯尺寸(恒定或减小)来提供理论收敛保证。通常,在实践中对数据集和学习算法进行微调,以提供良好的经验性能。在许多学习方案中,这种微调可能是不切实际的,因此,使用自适应阶梯尺寸研究压缩SGD是很感兴趣的。由SGD在未压缩环境中有效训练神经网络的自适应阶梯尺寸方法的先前工作的激励,我们为压缩SGD开发了一种自适应阶梯尺寸方法。特别是,我们在压缩SGD中引入了一种缩放技术,我们用来在插值条件下为凸 - 平滑和强凸 - 平滑目标建立订单 - 最佳收敛速率,并在强烈的增长下为健康)状况。我们还通过仿真示例显示,如果没有这种缩放,算法就无法收敛。我们介绍了现实世界数据集的深神经网络的实验结果,并将我们提出的算法的性能与先前提出的文献压缩SGD方法进行比较,并在Resnet-18,Resnet-34和Densenet架构上的CIFAR-100架构上的性能提高了和CIFAR-10数据集的各种压缩级别。
translated by 谷歌翻译
自适应梯度方法对解决许多机器学习问题的性能具有出色的性能。尽管最近研究了多种自适应方法,它们主要专注于经验或理论方面,并且还通过使用一些特定的自适应学习率来解决特定问题。希望为解决一般问题的理论保证来设计一种普遍的自适应梯度算法框架。为了填补这一差距,我们通过引入包括大多数现有自适应梯度形式的通用自适应矩阵提出了一种更快和普遍的自适应梯度框架(即,Super-Adam)。此外,我们的框架可以灵活地集成了减少技术的势头和方差。特别是,我们的小说框架为非透露设置下的自适应梯度方法提供了收敛分析支持。在理论分析中,我们证明我们的超亚当算法可以实现$ \ tilde {o}(\ epsilon ^ { - 3})$的最着名的复杂性,用于查找$ \ epsilon $ -stationary points的非核心优化,这匹配随机平滑非渗透优化的下限。在数值实验中,我们采用各种深度学习任务来验证我们的算法始终如一地优于现有的自适应算法。代码可在https://github.com/lijunyi95/superadam获得
translated by 谷歌翻译
在本文中,我们提出了具有能量和动量的随机梯度的SGEM,以基于起源于工作[AEGD:适应性梯度下降的能量下降的AEGD方法,以解决一大批一般的非凸随机优化问题。ARXIV:2010.05109]。SGEM同时结合了能量和动量,以继承其双重优势。我们表明,SGEM具有无条件的能量稳定性,并在一般的非convex随机设置中得出能量依赖性收敛速率,以及在线凸台设置中的遗憾。还提供了能量变量的较低阈值。我们的实验结果表明,SGEM的收敛速度比AEGD快,并且至少在训练某些深层神经网络方面概述了SGDM。
translated by 谷歌翻译
由于培训数据集的大小爆炸,分布式学习近年来受到了日益增长的兴趣。其中一个主要瓶颈是中央服务器和本地工人之间的沟通成本。虽然已经证明错误反馈压缩以通过随机梯度下降(SGD)降低通信成本,但在培训大规模机器学习方面广泛用于培训的通信有效的适应性梯度方法楷模。在本文中,我们提出了一种新的通信 - 压缩AMSGRAD,用于分布式非透明的优化问题,可提供有效的效率。我们所提出的分布式学习框架具有有效的渐变压缩策略和工人侧模型更新设计。我们证明所提出的通信有效的分布式自适应梯度方法会聚到具有与随机非凸化优化设置中的未压缩的vanilla amsgrad相同的迭代复杂度的一阶静止点。关于各种基准备份我们理论的实验。
translated by 谷歌翻译
Federated Averaging (FEDAVG) has emerged as the algorithm of choice for federated learning due to its simplicity and low communication cost. However, in spite of recent research efforts, its performance is not fully understood. We obtain tight convergence rates for FEDAVG and prove that it suffers from 'client-drift' when the data is heterogeneous (non-iid), resulting in unstable and slow convergence.As a solution, we propose a new algorithm (SCAFFOLD) which uses control variates (variance reduction) to correct for the 'client-drift' in its local updates. We prove that SCAFFOLD requires significantly fewer communication rounds and is not affected by data heterogeneity or client sampling. Further, we show that (for quadratics) SCAFFOLD can take advantage of similarity in the client's data yielding even faster convergence. The latter is the first result to quantify the usefulness of local-steps in distributed optimization.
translated by 谷歌翻译
在机器学习模型的数据并行优化中,工人协作以改善对模型的估计:更准确的梯度使他们可以使用更大的学习率并更快地优化。我们考虑所有工人从同一数据集进行采样的设置,并通过稀疏图(分散)进行通信。在这种情况下,当前的理论无法捕获现实世界行为的重要方面。首先,通信图的“光谱差距”不能预测其(深)学习中的经验表现。其次,当前的理论并不能解释合作可以比单独培训更大的学习率。实际上,它规定了较小的学习率,随着图表的变化而进一步降低,无法解释无限图中的收敛性。本文旨在在工人共享相同的数据分布时绘制出稀疏连接的分布式优化的准确图片。我们量化图形拓扑如何影响二次玩具问题中的收敛性,并为一般平滑和(强烈)凸目标提供理论结果。我们的理论与深度学习中的经验观察相匹配,并准确地描述了不同图形拓扑的相对优点。
translated by 谷歌翻译
我们使用高斯过程扰动模型在高维二次上的真实和批量风险表面之间的高斯过程扰动模型分析和解释迭代平均的泛化性能。我们从我们的理论结果中获得了三个现象\姓名:}(1)将迭代平均值(ia)与大型学习率和正则化进行了改进的正规化的重要性。 (2)对较少频繁平均的理由。 (3)我们预计自适应梯度方法同样地工作,或者更好,而不是其非自适应对应物的迭代平均值。灵感来自这些结果\姓据{,一起与}对迭代解决方案多样性的适当正则化的重要性,我们提出了两个具有迭代平均的自适应算法。与随机梯度下降(SGD)相比,这些结果具有明显更好的结果,需要较少调谐并且不需要早期停止或验证设定监视。我们在各种现代和古典网络架构上展示了我们对CiFar-10/100,Imagenet和Penn TreeBank数据集的方法的疗效。
translated by 谷歌翻译
Several recently proposed stochastic optimization methods that have been successfully used in training deep networks such as RMSPROP, ADAM, ADADELTA, NADAM are based on using gradient updates scaled by square roots of exponential moving averages of squared past gradients. In many applications, e.g. learning with large output spaces, it has been empirically observed that these algorithms fail to converge to an optimal solution (or a critical point in nonconvex settings). We show that one cause for such failures is the exponential moving average used in the algorithms. We provide an explicit example of a simple convex optimization setting where ADAM does not converge to the optimal solution, and describe the precise problems with the previous analysis of ADAM algorithm. Our analysis suggests that the convergence issues can be fixed by endowing such algorithms with "long-term memory" of past gradients, and propose new variants of the ADAM algorithm which not only fix the convergence issues but often also lead to improved empirical performance.
translated by 谷歌翻译
在本文中,我们提出了Nesterov加速改组梯度(NASG),这是一种用于凸有限和最小化问题的新算法。我们的方法将传统的Nesterov的加速动量与不同的改组抽样方案相结合。我们证明,我们的算法使用统一的改组方案提高了$ \ Mathcal {o}(1/t)$的速率,其中$ t $是时代的数量。该速率比凸状制度中的任何其他改组梯度方法要好。我们的收敛分析不需要对有限域或有界梯度条件的假设。对于随机洗牌方案,我们进一步改善了收敛性。在采用某种初始条件时,我们表明我们的方法在解决方案的小社区附近收敛得更快。数值模拟证明了我们算法的效率。
translated by 谷歌翻译
亚当是训练深神经网络的最具影响力的自适应随机算法之一,即使在简单的凸面设置中,它也被指出是不同的。许多尝试,例如降低自适应学习率,采用较大的批量大小,结合了时间去相关技术,寻求类似的替代物,\ textit {etc。},以促进Adam-type算法融合。与现有方法相反,我们引入了另一种易于检查的替代条件,这仅取决于基础学习率的参数和历史二阶时刻的组合,以确保通用ADAM的全球融合以解决大型融合。缩放非凸随机优化。这种观察结果以及这种足够的条件,对亚当的差异产生了更深刻的解释。另一方面,在实践中,无需任何理论保证,广泛使用了迷你ADAM和分布式ADAM。我们进一步分析了分布式系统中的批次大小或节点的数量如何影响亚当的收敛性,从理论上讲,这表明迷你批次和分布式亚当可以通过使用较大的迷你批量或较大的大小来线性地加速节点的数量。最后,我们应用了通用的Adam和Mini Batch Adam,具有足够条件来求解反例并在各种真实世界数据集上训练多个神经网络。实验结果完全符合我们的理论分析。
translated by 谷歌翻译
这项工作研究了基于梯度的算法的现有理论分析与训练深神经网络的实践之间的深刻断开。具体而言,我们提供了数值证据,表明在大规模神经网络训练(例如Imagenet + Resnet101和WT103 + Transformerxl模型)中,神经网络的权重不会融合到损失的梯度为零的固定点。然而,值得注意的是,我们观察到,即使权重不融合到固定点,最小化损耗函数的进展和训练损失稳定下来。受到这一观察的启发,我们提出了一种基于动力学系统的千古理论来解释它的新观点。我们没有研究权重演化,而是研究权重分布的演变。我们证明了权重分布到近似不变的度量,从而解释了训练损失如何稳定而无需重合到固定点。我们进一步讨论了这种观点如何更好地调整优化理论与机器学习实践中的经验观察。
translated by 谷歌翻译
深度学习在广泛的AI应用方面取得了有希望的结果。较大的数据集和模型一致地产生更好的性能。但是,我们一般花费更长的培训时间,以更多的计算和沟通。在本调查中,我们的目标是在模型精度和模型效率方面提供关于大规模深度学习优化的清晰草图。我们调查最常用于优化的算法,详细阐述了大批量培训中出现的泛化差距的可辩论主题,并审查了解决通信开销并减少内存足迹的SOTA策略。
translated by 谷歌翻译