[论文解读] Stabilizing Gradients for Deep Neural Networks via Efficient SVD Parameterization
本文提出 Spectral-RNN,一种基于 SVD 的高效权重矩阵参数化方法,明确控制奇异值以稳定 RNN 的梯度(并推广到非方阵矩阵),提高训练速度和泛化能力。
Vanishing and exploding gradients are two of the main obstacles in training deep neural networks, especially in capturing long range dependencies in recurrent neural networks~(RNNs). In this paper, we present an efficient parametrization of the transition matrix of an RNN that allows us to stabilize the gradients that arise in its training. Specifically, we parameterize the transition matrix by its singular value decomposition(SVD), which allows us to explicitly track and control its singular values. We attain efficiency by using tools that are common in numerical linear algebra, namely Householder reflectors for representing the orthogonal matrices that arise in the SVD. By explicitly controlling the singular values, our proposed Spectral-RNN method allows us to easily solve the exploding gradient problem and we observe that it empirically solves the vanishing gradient issue to a large extent. We note that the SVD parameterization can be used for any rectangular weight matrix, hence it can be easily extended to any deep neural network, such as a multi-layer perceptron. Theoretically, we demonstrate that our parameterization does not lose any expressive power, and show how it controls generalization of RNN for the classification task. %, and show how it potentially makes the optimization process easier. Our extensive experimental results also demonstrate that the proposed framework converges faster, and has good generalization, especially in capturing long range dependencies, as shown on the synthetic addition and copy tasks, as well as on MNIST and Penn Tree Bank data sets.
研究动机与目标
- 激发并解决深度网络,尤其是 RNNs 中的梯度消失与梯度爆炸问题。
- 提出一种基于 SVD 的权重参数化,在保持表达能力的同时实现谱控制。
- 开发 Spectral-RNN,通过约束奇异值来提升梯度稳定性且不增加复杂度。
- 将 SVD 参数化扩展到非方阵权重矩阵,以用于 MLP 和残差网络。
- 在谱约束下提供理论泛化见解,并在多任务上进行实证验证。
提出的方法
- 通过 SVD W = U Σ V^T 将权重矩阵 W 参数化,并使用 Householder 反射的乘积紧凑地表示 U 和 V。
- 在训练过程中使 W 保持在 SVD 形式,以明确跟踪并约束奇异值。
- 通过一种参数化将奇异值约束在接近 1 的范围内,使用基于 sigmoid 的 σ 更新方案。
- 高效地将前向和反向传播计算为 Householder 反射的乘积,保持每层 O(n) 或接近线性复杂度。
- 通过用降维的 SVD 和紧凑的 Householder 表示来表达 W,从而将参数化扩展到非方阵的 W 以用于 MLP。
- 将该框架应用于 Spectral-RNN、非方阵权重矩阵,并探索与原生 RNN 相当的计算成本。
实验结果
研究问题
- RQ1在不牺牲网络表达能力的前提下,是否可以缓解梯度消失/梯度爆炸?
- RQ2通过 SVD 参数化的显式谱控制是否改善优化、泛化以及建模长程依赖的能力?
- RQ3是否可以将基于 SVD 的参数化高效应用于 MLP 和其他架构中的非方阵权重矩阵?
- RQ4在 RNN 中,关于谱约束与泛化之间存在何种理论保证?
- RQ5与基线如 RNN、oRNN 和 LSTM 相比,Spectral-RNN 在合成任务和标准数据集上的实证表现如何?
主要发现
- Spectral-RNN 相较于 Vanilla RNN、IRNN、oRNN 和 LSTM,在合成的加法和复制任务上显示出更好的梯度稳定性和更快的收敛,尤其在深度增加时。
- Spectral-RNN 在 pixel-MNIST(128 个隐藏单元时 97.7%)上取得更高的准确率,在 permuted-MNIST 上表现具有竞争力,优于若干基线。
- 在 Penn Tree Bank 上,Spectral-RNN 的 1 层和 2 层配置在训练困惑度更低,测试困惑度与 LSTM 相当或更好且参数更少。
- 理论结果:在边际损失下,RNN 的泛化差距受转移矩阵的谱范数影响并随之扩大,约束奇异值可以改善泛化。
- 扩展到非方阵矩阵时,SVD 参数化保持表达能力,使其可应用于 MLP 和残差网络,同时保持类似的计算成本。
- 实证结果表明 Spectral-RNN 在长程依赖建模方面优于基线,并且在整个训练过程中的梯度更加健壮。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。