低精度算术对神经网络的训练产生了变革性的影响,从而减少了计算,记忆和能量需求。然而,尽管有希望,低精确的算术对高斯流程(GPS)的关注很少,这主要是因为GPS需要在低精确度中不稳定的复杂线性代数例程。我们研究以一半精度训练GP时可能发生的不同故障模式。为了避免这些故障模式,我们提出了一种多方面的方法,该方法涉及具有重新构造,混合精度和预处理的共轭梯度。我们的方法大大提高了低精度在各种设置中的偶联梯度的数值稳定性和实践性能,从而使GPS能够在单个GPU上以10美元的$ 10 $ 10 $ 10 $ 10 $ 10的数据点进行培训,而没有任何稀疏的近似值。
translated by 谷歌翻译
Despite advances in scalable models, the inference tools used for Gaussian processes (GPs) have yet to fully capitalize on developments in computing hardware. We present an efficient and general approach to GP inference based on Blackbox Matrix-Matrix multiplication (BBMM). BBMM inference uses a modified batched version of the conjugate gradients algorithm to derive all terms for training and inference in a single call. BBMM reduces the asymptotic complexity of exact GP inference from O(n 3 ) to O(n 2 ). Adapting this algorithm to scalable approximations and complex GP models simply requires a routine for efficient matrix-matrix multiplication with the kernel and its derivative. In addition, BBMM uses a specialized preconditioner to substantially speed up convergence. In experiments we show that BBMM effectively uses GPU hardware to dramatically accelerate both exact GP inference and scalable approximations. Additionally, we provide GPyTorch, a software platform for scalable GP inference via BBMM, built on PyTorch.
translated by 谷歌翻译
虽然最近的共轭梯度方法和LanczoS分解的工作已经实现了可扩展的高斯工艺推论,但在几种实现中,这些迭代方法似乎在学习内核超参数中的数值不稳定性以及较差的测试可能性方面似乎奋斗。通过调查CG公差,预处理等级和Lanczos分解等级,我们提供了一个特别简单的处方来纠正这些问题:我们建议人们使用小的CG公差($ \ epsilon \ leq 0.01 $)和大的根分解大小($ r \ geq 5000 $)。此外,我们表明L-BFGS-B是迭代GPS的引人注目的优化器,实现了较少的渐变更新的收敛性。
translated by 谷歌翻译
高斯工艺高参数优化需要大核矩阵的线性溶解和对数确定因子。迭代数值技术依赖于线性溶液的共轭梯度方法(CG)和对数数据的随机痕迹估计的迭代数值技术变得越来越流行。这项工作介绍了用于预处理这些计算的新算法和理论见解。虽然在CG的背景下对预处理有充分的理解,但我们证明了它也可以加速收敛并减少对数数据及其衍生物的估计值的方差。我们证明了对数确定性,对数 - 界限可能性及其衍生物的预处理计算的一般概率误差界限。此外,我们得出了一系列内核 - 前提组合的特定速率,这表明可以达到指数收敛。我们的理论结果可以证明对内核超参数的有效优化,我们在大规模的基准问题上进行经验验证。我们的方法可以加速训练,最多可以达到数量级。
translated by 谷歌翻译
Low-rank matrix approximations, such as the truncated singular value decomposition and the rank-revealing QR decomposition, play a central role in data analysis and scientific computing. This work surveys and extends recent research which demonstrates that randomization offers a powerful tool for performing low-rank matrix approximation. These techniques exploit modern computational architectures more fully than classical methods and open the possibility of dealing with truly massive data sets.This paper presents a modular framework for constructing randomized algorithms that compute partial matrix decompositions. These methods use random sampling to identify a subspace that captures most of the action of a matrix. The input matrix is then compressed-either explicitly or implicitly-to this subspace, and the reduced matrix is manipulated deterministically to obtain the desired low-rank factorization. In many cases, this approach beats its classical competitors in terms of accuracy, speed, and robustness. These claims are supported by extensive numerical experiments and a detailed error analysis.The specific benefits of randomized techniques depend on the computational environment. Consider the model problem of finding the k dominant components of the singular value decomposition of an m × n matrix. (i) For a dense input matrix, randomized algorithms require O(mn log(k)) floating-point operations (flops) in contrast with O(mnk) for classical algorithms. (ii) For a sparse input matrix, the flop count matches classical Krylov subspace methods, but the randomized approach is more robust and can easily be reorganized to exploit multi-processor architectures. (iii) For a matrix that is too large to fit in fast memory, the randomized techniques require only a constant number of passes over the data, as opposed to O(k) passes for classical algorithms. In fact, it is sometimes possible to perform matrix approximation with a single pass over the data.
translated by 谷歌翻译
深度学习在广泛的AI应用方面取得了有希望的结果。较大的数据集和模型一致地产生更好的性能。但是,我们一般花费更长的培训时间,以更多的计算和沟通。在本调查中,我们的目标是在模型精度和模型效率方面提供关于大规模深度学习优化的清晰草图。我们调查最常用于优化的算法,详细阐述了大批量培训中出现的泛化差距的可辩论主题,并审查了解决通信开销并减少内存足迹的SOTA策略。
translated by 谷歌翻译
Gaussian processes scale prohibitively with the size of the dataset. In response, many approximation methods have been developed, which inevitably introduce approximation error. This additional source of uncertainty, due to limited computation, is entirely ignored when using the approximate posterior. Therefore in practice, GP models are often as much about the approximation method as they are about the data. Here, we develop a new class of methods that provides consistent estimation of the combined uncertainty arising from both the finite number of data observed and the finite amount of computation expended. The most common GP approximations map to an instance in this class, such as methods based on the Cholesky factorization, conjugate gradients, and inducing points. For any method in this class, we prove (i) convergence of its posterior mean in the associated RKHS, (ii) decomposability of its combined posterior covariance into mathematical and computational covariances, and (iii) that the combined variance is a tight worst-case bound for the squared error between the method's posterior mean and the latent function. Finally, we empirically demonstrate the consequences of ignoring computational uncertainty and show how implicitly modeling it improves generalization performance on benchmark datasets.
translated by 谷歌翻译
We propose an efficient method for approximating natural gradient descent in neural networks which we call Kronecker-factored Approximate Curvature (K-FAC). K-FAC is based on an efficiently invertible approximation of a neural network's Fisher information matrix which is neither diagonal nor low-rank, and in some cases is completely non-sparse. It is derived by approximating various large blocks of the Fisher (corresponding to entire layers) as being the Kronecker product of two much smaller matrices. While only several times more expensive to compute than the plain stochastic gradient, the updates produced by K-FAC make much more progress optimizing the objective, which results in an algorithm that can be much faster than stochastic gradient descent with momentum in practice. And unlike some previously proposed approximate natural-gradient/Newton methods which use high-quality non-diagonal curvature matrices (such as Hessian-free optimization), K-FAC works very well in highly stochastic optimization regimes. This is because the cost of storing and inverting K-FAC's approximation to the curvature matrix does not depend on the amount of data used to estimate it, which is a feature typically associated only with diagonal or low-rank approximations to the curvature matrix.
translated by 谷歌翻译
随机梯度下降(SGD)及其变体已经建立为具有独立样本的大型机器学习问题的进入算法,由于其泛化性能和内在的计算优势。然而,随机梯度是具有相关样本的全梯度的偏置估计的事实导致了对SGD在相关环境中的表现和阻碍其在这种情况下使用的理解缺乏理论理解。在本文中,我们专注于高斯过程(GP)的近似参数估计,并通过证明小纤维SGD收敛到完整日志似然丢失功能的关键点来打破屏障的一步,并恢复速率$率的模型超参数o(\ frac {1} {k})$ k $迭代,达到统计误差术语,具体取决于小靶大小。我们的理论担保仍然存在,内核功能表现出指数或多项式EIGENDECAY,这是通过GPS常用的各种核的满足。模拟和实时数据集的数值研究表明,Minibatch SGD在最先进的GP方法上具有更好的推广,同时降低了计算负担并开启了GPS的新的,先前未开发的数据大小制度。
translated by 谷歌翻译
收购用于监督学习的标签可能很昂贵。为了提高神经网络回归的样本效率,我们研究了活跃的学习方法,这些方法可以适应地选择未标记的数据进行标记。我们提出了一个框架,用于从(与网络相关的)基础内核,内核转换和选择方法中构造此类方法。我们的框架涵盖了许多基于神经网络的高斯过程近似以及非乘式方法的现有贝叶斯方法。此外,我们建议用草图的有限宽度神经切线核代替常用的最后层特征,并将它们与一种新型的聚类方法结合在一起。为了评估不同的方法,我们引入了一个由15个大型表格回归数据集组成的开源基准。我们所提出的方法的表现优于我们的基准测试上的最新方法,缩放到大数据集,并在不调整网络体系结构或培训代码的情况下开箱即用。我们提供开源代码,包括所有内核,内核转换和选择方法的有效实现,并可用于复制我们的结果。
translated by 谷歌翻译
我们开发了一个计算程序,以估计具有附加噪声的半摩托车高斯过程回归模型的协方差超参数。也就是说,提出的方法可用于有效估计相关误差的方差,以及基于最大化边际似然函数的噪声方差。我们的方法涉及适当地降低超参数空间的维度,以简化单变量的根发现问题的估计过程。此外,我们得出了边际似然函数及其衍生物的边界和渐近线,这对于缩小高参数搜索的初始范围很有用。使用数值示例,我们证明了与传统参数优化相比,提出方法的计算优势和鲁棒性。
translated by 谷歌翻译
过度分辨的神经网络概括井,但训练昂贵。理想情况下,人们希望减少其计算成本,同时保留其概括的益处。稀疏的模型培训是实现这一目标的简单和有希望的方法,但随着现有方法与准确性损失,慢速训练运行时的困难或困难,仍然存在挑战,仍然存在困难的挑战。核心问题是,在离散的一组稀疏矩阵上搜索稀疏性掩模是困难和昂贵的。为了解决此问题,我们的主要见解是通过具有称为蝴蝶矩阵产品的固定结构的固定结构来优化优化稀疏矩阵的连续超集。随着蝴蝶矩阵不是硬件效率,我们提出了简单的蝴蝶(块和平坦)的变体来利用现代硬件。我们的方法(像素化蝴蝶)使用基于扁平块蝴蝶和低秩矩阵的简单固定稀疏模式,以缩小大多数网络层(例如,注意,MLP)。我们经验验证了像素化蝴蝶比蝴蝶快3倍,加快培训,以实现有利的准确性效率权衡。在ImageNet分类和Wikitext-103语言建模任务中,我们的稀疏模型训练比致密的MLP - 混频器,视觉变压器和GPT-2媒体更快地训练高达2.5倍,没有精确下降。
translated by 谷歌翻译
We present the GPry algorithm for fast Bayesian inference of general (non-Gaussian) posteriors with a moderate number of parameters. GPry does not need any pre-training, special hardware such as GPUs, and is intended as a drop-in replacement for traditional Monte Carlo methods for Bayesian inference. Our algorithm is based on generating a Gaussian Process surrogate model of the log-posterior, aided by a Support Vector Machine classifier that excludes extreme or non-finite values. An active learning scheme allows us to reduce the number of required posterior evaluations by two orders of magnitude compared to traditional Monte Carlo inference. Our algorithm allows for parallel evaluations of the posterior at optimal locations, further reducing wall-clock times. We significantly improve performance using properties of the posterior in our active learning scheme and for the definition of the GP prior. In particular we account for the expected dynamical range of the posterior in different dimensionalities. We test our model against a number of synthetic and cosmological examples. GPry outperforms traditional Monte Carlo methods when the evaluation time of the likelihood (or the calculation of theoretical observables) is of the order of seconds; for evaluation times of over a minute it can perform inference in days that would take months using traditional methods. GPry is distributed as an open source Python package (pip install gpry) and can also be found at https://github.com/jonaselgammal/GPry.
translated by 谷歌翻译
While machine learning is traditionally a resource intensive task, embedded systems, autonomous navigation, and the vision of the Internet of Things fuel the interest in resource-efficient approaches. These approaches aim for a carefully chosen trade-off between performance and resource consumption in terms of computation and energy. The development of such approaches is among the major challenges in current machine learning research and key to ensure a smooth transition of machine learning technology from a scientific environment with virtually unlimited computing resources into everyday's applications. In this article, we provide an overview of the current state of the art of machine learning techniques facilitating these real-world requirements. In particular, we focus on deep neural networks (DNNs), the predominant machine learning models of the past decade. We give a comprehensive overview of the vast literature that can be mainly split into three non-mutually exclusive categories: (i) quantized neural networks, (ii) network pruning, and (iii) structural efficiency. These techniques can be applied during training or as post-processing, and they are widely used to reduce the computational demands in terms of memory footprint, inference speed, and energy efficiency. We also briefly discuss different concepts of embedded hardware for DNNs and their compatibility with machine learning techniques as well as potential for energy and latency reduction. We substantiate our discussion with experiments on well-known benchmark datasets using compression techniques (quantization, pruning) for a set of resource-constrained embedded systems, such as CPUs, GPUs and FPGAs. The obtained results highlight the difficulty of finding good trade-offs between resource efficiency and predictive performance.
translated by 谷歌翻译
随机旋转的Cholesky(RPCholesky)是一种用于计算N X N阳性半芬酸矩阵(PSD)矩阵的等级K近似的天然算法。RPCholesky只需几行代码就可以实现。它仅需要(k+1)n进入评估,o(k^2 n)其他算术操作。本文对其实验和理论行为进行了首次认真研究。从经验上讲,rpcholesky匹配或改善了低级别PSD近似的替代算法的性能。此外,RPCholesky可证明达到了近乎最佳的近似保证。该算法的简单性,有效性和鲁棒性强烈支持其在科学计算和机器学习应用中的使用。
translated by 谷歌翻译
我们引入了重新定性,这是一种数据依赖性的重新聚集化,将贝叶斯神经网络(BNN)转化为后部的分布,其KL对BNN对BNN的差异随着层宽度的增长而消失。重新定义图直接作用于参数,其分析简单性补充了宽BNN在功能空间中宽BNN的已知神经网络过程(NNGP)行为。利用重新定性,我们开发了马尔可夫链蒙特卡洛(MCMC)后采样算法,该算法将BNN更快地混合在一起。这与MCMC在高维度上的表现差异很差。对于完全连接和残留网络,我们观察到有效样本量高达50倍。在各个宽度上都取得了改进,并在层宽度的重新培训和标准BNN之间的边缘。
translated by 谷歌翻译
高斯过程(GP),其结合了分类和连续输入变量模型已发现使用例如在纵向数据分析和计算机实验。然而,对于这些模型标准推理具有典型的立方缩放,并且不能应用于GPS共可扩展近似方案自协方差函数是不连续的。在这项工作中,我们导出用于混合域协方差函数,其中对于观察和基函数总数的数量成线性比例的基础函数近似方案。所提出的方法自然是适用于GP贝叶斯回归任意观测模型。我们证明在纵向数据建模上下文和显示的方法,它精确地近似于确切GP模型,只需要一个比较拟合对应精确模型运行时间的几分之一。
translated by 谷歌翻译
We propose SWA-Gaussian (SWAG), a simple, scalable, and general purpose approach for uncertainty representation and calibration in deep learning. Stochastic Weight Averaging (SWA), which computes the first moment of stochastic gradient descent (SGD) iterates with a modified learning rate schedule, has recently been shown to improve generalization in deep learning. With SWAG, we fit a Gaussian using the SWA solution as the first moment and a low rank plus diagonal covariance also derived from the SGD iterates, forming an approximate posterior distribution over neural network weights; we then sample from this Gaussian distribution to perform Bayesian model averaging. We empirically find that SWAG approximates the shape of the true posterior, in accordance with results describing the stationary distribution of SGD iterates. Moreover, we demonstrate that SWAG performs well on a wide variety of tasks, including out of sample detection, calibration, and transfer learning, in comparison to many popular alternatives including MC dropout, KFAC Laplace, SGLD, and temperature scaling.
translated by 谷歌翻译
Kernel machines have sustained continuous progress in the field of quantum chemistry. In particular, they have proven to be successful in the low-data regime of force field reconstruction. This is because many physical invariances and symmetries can be incorporated into the kernel function to compensate for much larger datasets. So far, the scalability of this approach has however been hindered by its cubical runtime in the number of training points. While it is known, that iterative Krylov subspace solvers can overcome these burdens, they crucially rely on effective preconditioners, which are elusive in practice. Practical preconditioners need to be computationally efficient and numerically robust at the same time. Here, we consider the broad class of Nystr\"om-type methods to construct preconditioners based on successively more sophisticated low-rank approximations of the original kernel matrix, each of which provides a different set of computational trade-offs. All considered methods estimate the relevant subspace spanned by the kernel matrix columns using different strategies to identify a representative set of inducing points. Our comprehensive study covers the full spectrum of approaches, starting from naive random sampling to leverage score estimates and incomplete Cholesky factorizations, up to exact SVD decompositions.
translated by 谷歌翻译
机器学习算法必须能够有效地应对大量数据集。因此,他们必须在任何现代系统上进行良好的扩展,并能够利用独立于供应商的加速器的计算能力。在监督学习领域,支持向量机(SVM)被广泛使用。但是,即使是现代化和优化的实现,例如LIBSVM或ThunderSVM对于尖端硬件的大型非平凡的密集数据集也不能很好地扩展:大多数SVM实现基于顺序最小优化,这是一种优化的固有顺序算法。因此,它们不适合高度平行的GPU。此外,我们不知道支持不同供应商的CPU和GPU的性能便携式实现。我们已经开发了PLSSVM库来解决这两个问题。首先,我们将SVM的配方作为最小二乘问题。然后训练SVM沸腾以求解已知高度平行算法的线性方程系统。其次,我们提供了一个独立但高效的实现:PLSSVM使用不同的可互换后端 - openmp,cuda,opencl,sycl-支持来自多个GPU的NVIDIA,AMD或INTEL等各种供应商的现代硬件。 PLSSVM可以用作LIBSVM的倒入替换。与LIBSVM相比,与ThunderSVM相比,我们观察到高达10的CPU和GPU的加速度。我们的实施量表在多核CPU上缩放,并在多达256个CPU线程和多个GPU上平行加速为74.7,在四个GPU上的并行加速为3.71。代码,实用程序脚本和文档都可以在GitHub上获得:https://github.com/sc-sgs/plssvm。
translated by 谷歌翻译