加一层归一化就能让神经网络外推更稳定
Just One Layer Norm Guarantees Stable Extrapolation
- 用神经正切核理论证明,仅需一层归一化即可改变核函数特性
- 含归一化的网络在远离训练数据时输出保持有界,而无归一化的网络可能输出爆炸
- 对蛋白质大小预测和少数族裔年龄估计等真实场景有重要应用价值
尽管神经网络广泛应用,其在远离训练分布时的外推行为仍不明确,现有研究多局限于特定情况。本文首次通过神经正切核(NTK)理论分析无限宽神经网络在收敛后的表现,证明仅引入一层归一化(Layer Norm, LN)即可根本性改变诱导的NTK,使其变为方差有界的核函数。结果表明,即使输入远超训练数据范围,含至少一层LN的无限宽网络输出依然有界;而无LN的广泛网络在某些输入下会产生病态的极大输出。我们通过有限宽度网络的实证实验验证了这一理论:标准网络在外推区域常出现失控增长,而单层LN能有效抑制该不稳定性。最后,我们探讨了这种外推稳定性在实际中的意义,包括预测训练中未见的更大蛋白质残基尺寸、以及对训练集缺失的少数族裔面部图像进行年龄估计。
原文摘要 · Abstract (English)
In spite of their prevalence, the behaviour of Neural Networks when extrapolating far from the training distribution remains poorly understood, with existing results limited to specific cases. In this work, we prove general results -- the first of their kind -- by applying Neural Tangent Kernel (NTK) theory to analyse infinitely-wide neural networks trained until convergence and prove that the inclusion of just one Layer Norm (LN) fundamentally alters the induced NTK, transforming it into a bounded-variance kernel. As a result, the output of an infinitely wide network with at least one LN remains bounded, even on inputs far from the training data. In contrast, we show that a broad class of networks without LN can produce pathologically large outputs for certain inputs. We support these theoretical findings with empirical experiments on finite-width networks, demonstrating that while standard NNs often exhibit uncontrolled growth outside the training domain, a single LN layer effectively mitigates this instability. Finally, we explore real-world implications of this extrapolatory stability, including applications to predicting residue sizes in proteins larger than those seen during training and estimating age from facial images of underrepresented ethnicities absent from the training set.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。