Theoretical Explanation of Activation Sparsity through Flat Minima and Adversarial Robustness

要約

MLP 層における活性化の希薄性に関する最近の経験的観察により、計算コストを無料で大幅に削減する機会が得られました。
活性化スパーシティの発生をトレーニングダイナミクスに帰するいくつかの研究にもかかわらず、活性化スパーシティの出現の理論的説明は、たとえスパーシティが大きなステップに対してバニラプロトコルによってトレーニングされた深いモデルで発見されたとしても、浅いネットワーク、小さなトレーニングステップ、および修正されたトレーニングに限定されています。
3 つのギャップを埋めるために、活性化スパース性の源としての勾配スパース性の概念と、これに基づいた理論的説明を提案します。これは、敵対的ロバスト性への必要なステップとして、勾配スパース性とその後の活性化スパース性を説明します。
隠れた特徴とパラメータ。これは、十分に学習されたモデルの最小値のほぼ平坦度です。
この理論は、標準的にトレーニングされた LayerNorm による純粋な MLP に適用され、さらにトレーニング中に重みにノイズが追加された場合にはトランスフォーマーやその他のアーキテクチャにも適用されます。
スパーシティの必要性を議論する際に他の平坦性の原因を排除するために、スペクトル集中の現象、つまり重み行列の最大と最小の非ゼロ特異値の比が小さいことを発見しました。
確率的勾配ノイズを分析し、スペクトル集中の出現について議論するための強力な理論ツールとしてランダム行列理論 (RMT) を利用します。
これらの洞察をもとに、スクラッチからのトレーニングとスパース性の微調整の両方に対応する 2 つのプラグアンドプレイ モジュールと、スクラッチからのトレーニングにのみ適用される 1 つの根本的な変更を提案します。
スパース性とフラット性の両方についてテストが不十分なもう 1 つのモジュールも、私たちの理論からすぐに得られます。
私たちの説明を検証するために検証実験が行われます。
生産性に関する実験では、変更によるスパース性の向上が実証されており、トレーニングと推論の両方における理論上のコストがさらに削減されることが示されています。

要約(オリジナル)

A recent empirical observation of activation sparsity in MLP layers offers an opportunity to drastically reduce computation costs for free. Despite several works attributing it to training dynamics, the theoretical explanation of activation sparsity’s emergence is restricted to shallow networks, small training steps well as modified training, even though the sparsity has been found in deep models trained by vanilla protocols for large steps. To fill the three gaps, we propose the notion of gradient sparsity as the source of activation sparsity and a theoretical explanation based on it that explains gradient sparsity and then activation sparsity as necessary steps 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 pure MLPs, and further to Transformers or other architectures if noises are added to weights during training. To eliminate other sources of flatness when arguing sparsities’ necessity, we discover the phenomenon of spectral concentration, i.e., the ratio between the largest and the smallest non-zero singular values of weight matrices is small. We utilize random matrix theory (RMT) as a powerful theoretical tool to analyze stochastic gradient noises and discuss the emergence of spectral concentration. With these insights, we propose two plug-and-play modules for both training from scratch and sparsity finetuning, as well as one radical modification that only applies to from-scratch training. Another under-testing module for both sparsity and flatness is also immediate from our theories. Validational experiments are conducted to verify our explanation. Experiments for productivity demonstrate modifications’ improvement in sparsity, indicating further theoretical cost reduction in both training and inference.

arxiv情報

著者 Ze Peng,Lei Qi,Yinghuan Shi,Yang Gao
発行日 2023-09-06 13:48:40+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.LG パーマリンク