动态调整缩放系数,让归一化更适应输入数据变化。
SeeDNorm: Self-Rescaled Dynamic Normalization
- 根据输入动态调整缩放系数,保留输入范数信息
- 在语言和视觉任务中均显著优于RMSNorm等方法
- 参数极少,适合大模型零样本场景
归一化层是神经网络的核心组件。在Transformer中,主流的RMSNorm将向量约束在单位超球面上,并通过可学习的缩放系数γ进行逐维重缩放,以维持模型表示能力。然而,RMSNorm在前向传播中丢弃了输入范数信息,且静态的缩放系数γ难以应对输入数据的广泛变化和分布偏移,尤其在大语言模型常见的零样本场景下限制了性能提升。为此,我们提出SeeDNorm,通过根据当前输入动态调整缩放系数,实现数据依赖的自适应重缩放,从而保留输入范数信息并增强表示能力。反向传播中,SeeDNorm仍能根据输入范数动态调整梯度。我们对SeeDNorm的训练优化进行了详细分析,并提出了相应解决方案以应对潜在不稳定性。我们在不同规模的语言模型预训练及监督与无监督计算机视觉任务中验证了其有效性。仅引入极少量参数且对模型效率影响可忽略,SeeDNorm在各项任务中持续优于RMSNorm、LayerNorm以及如DyT等基于元素激活的归一化替代方案。
原文摘要 · Abstract (English)
Normalization layer constitutes an essential component in neural networks. In transformers, the predominantly used RMSNorm constrains vectors to a unit hypersphere, followed by dimension-wise rescaling through a learnable scaling coefficient $γ$ to maintain the representational capacity of the model. However, RMSNorm discards the input norm information in forward pass and a static scaling factor $γ$ may be insufficient to accommodate the wide variability of input data and distributional shifts, thereby limiting further performance improvements, particularly in zero-shot scenarios that large language models routinely encounter. To address this limitation, we propose SeeDNorm, which enhances the representational capability of the model by dynamically adjusting the scaling coefficient based on the current input, thereby preserving the input norm information and enabling data-dependent, self-rescaled dynamic normalization. During backpropagation, SeeDNorm retains the ability of RMSNorm to dynamically adjust gradient according to the input norm. We provide a detailed analysis of the training optimization for SeedNorm and proposed corresponding solutions to address potential instability issues that may arise when applying SeeDNorm. We validate the effectiveness of SeeDNorm across models of varying sizes in large language model pre-training as well as supervised and unsupervised computer vision tasks. By introducing a minimal number of parameters and with neglligible impact on model efficiency, SeeDNorm achieves consistently superior performance compared to previously commonly used normalization layers such as RMSNorm and LayerNorm, as well as element-wise activation alternatives to normalization layers like DyT.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。