arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2309.03004cs.LG

通过平坦极小值与对抗鲁棒性对激活稀疏性的理论解释

A Theoretical Explanation of Activation Sparsity through Flat Minima and Adversarial Robustness

State Key Laboratory for Novel Software Technology(计算机软件新技术全国重点实验室);Nanjing University(南京大学);School of Computer Science and Engineering(计算机科学与工程学院);Southeast University(东南大学)

Ze Peng, Lei Qi, Yinghuan Shi, Yang Gao

AI总结:

本文提出梯度稀疏性概念,从平坦极小值与对抗鲁棒性角度理论解释深度网络激活稀疏性,并设计即插即用模块在ImageNet-1k和C4上实现50%稀疏性提升。

摘要:

最近在MLP模块中观察到的激活稀疏性现象(Li et al., 2022b)为大幅降低计算成本提供了机会。尽管已有工作将其归因于训练动态,但现有的激活稀疏性理论解释仅限于浅层网络、少量训练步数和特殊训练方式,而激活稀疏性实际上出现在经过大量步数标准训练的深度模型中。为填补这些空白,我们提出梯度稀疏性的概念,将其作为激活稀疏性的一个来源,并基于此给出理论解释:稀疏性被视为相对于隐藏特征和参数实现对抗鲁棒性的必要步骤,而这种鲁棒性近似于学习良好模型的极小值平坦性。该理论适用于经过标准训练的带有LayerNorm的MLP,并进一步适用于Transformer或其他使用权重噪声训练的架构。在排除除稀疏性之外的其他平坦性来源后,我们发现权重矩阵的最大与最小非零奇异值之比很小的现象。在讨论这种谱集中现象的出现时,我们使用随机矩阵理论(RMT)作为分析随机梯度噪声的有力工具。我们进行了验证性实验来检验基于梯度稀疏性的解释。我们提出了两个即插即用模块,分别用于训练和微调以促进稀疏性。在ImageNet-1k和C4上的实验表明它们实现了50%的稀疏性提升,表明在训练和推理中进一步降低成本的潜力。

英文摘要:

A recent empirical observation (Li et al., 2022b) of activation sparsity in MLP blocks offers an opportunity to drastically reduce computation costs for free. Although having attributed it to training dynamics, existing theoretical explanations of activation sparsity are restricted to shallow networks, small training steps and special training, despite its emergence in deep models standardly trained for a large number of steps. To fill these gaps, we propose the notion of gradient sparsity as one source of activation sparsity and a theoretical explanation based on it that sees sparsity a necessary step to adversarial robustness w.r.t. hidden features and parameters, which is approximately the flatness of minima for well-learned models. The theory applies to standardly trained LayerNorm-ed MLPs, and further to Transformers or other architectures trained with weight noises. Eliminating other sources of flatness except for sparsity, we discover the phenomenon that the ratio between the largest and smallest non-zero singular values of weight matrices is small. When discussing the emergence of this spectral concentration, we use random matrix theory (RMT) as a powerful tool to analyze stochastic gradient noises. Validational experiments are conducted to verify our gradient-sparsity-based explanation. We propose two plug-and-play modules for both training and finetuning for sparsity. Experiments on ImageNet-1k and C4 demonstrate their 50% sparsity improvements, indicating further potential cost reduction in both training and inference.

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

↑