arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2006.10540stat.MLcs.LG
收藏

无限注意力:深度注意力网络的NNGP和NTK

Infinite attention: NNGP and NTK for deep attention networks

University of Cambridge(剑桥大学);Google Brain(谷歌大脑)

Jiri Hron, Yasaman Bahri, Jascha Sohl-Dickstein, Roman Novak

摘要:

关于宽神经网络(NN)和高斯过程(GP)之间的关系,有越来越多的文献,为各种NN架构确定了两者之间的等价性。例如,这种等价性使得能够在没有MCMC或变分近似的情况下精确近似宽贝叶斯NN的行为,或者在没有运行优化器的情况下通过梯度下降优化随机初始化宽NN的分布。我们提供了一个严格的扩展,这些结果涉及注意层的神经网络,表明不像单头注意,这会导致非高斯行为,多头注意架构的行为作为GP的头的数量趋于无穷大。我们进一步讨论了位置编码和层规范化的影响,并提出修改的注意机制,导致有限和无限宽NN的结果得到改善。我们根据经验评估注意力内核,从而在没有可训练内核和高级数据预处理的情况下对CIFAR-10的先前最先进的GP进行适度改进。最后,我们向神经切线库(Novak等人,2020年)允许应用NNGP/NTK模型,有或没有注意,可变长度序列,在IMDb评论数据集上的一个例子。

英文摘要:

There is a growing amount of literature on the relationship between wide neural networks (NNs) and Gaussian processes (GPs), identifying an equivalence between the two for a variety of NN architectures. This equivalence enables, for instance, accurate approximation of the behaviour of wide Bayesian NNs without MCMC or variational approximations, or characterisation of the distribution of randomly initialised wide NNs optimised by gradient descent without ever running an optimiser. We provide a rigorous extension of these results to NNs involving attention layers, showing that unlike single-head attention, which induces non-Gaussian behaviour, multi-head attention architectures behave as GPs as the number of heads tends to infinity. We further discuss the effects of positional encodings and layer normalisation, and propose modifications of the attention mechanism which lead to improved results for both finite and infinitely wide NNs. We evaluate attention kernels empirically, leading to a moderate improvement upon the previous state-of-the-art on CIFAR-10 for GPs without trainable kernels and advanced data preprocessing. Finally, we introduce new features to the Neural Tangents library (Novak et al., 2020) allowing applications of NNGP/NTK models, with and without attention, to variable-length sequences, with an example on the IMDb reviews dataset.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑