Skip to main content
QUICK REVIEW

[论文解读] Adaptively Truncating Backpropagation Through Time to Control Gradient Bias

Christopher Aicher, Nicholas J. Foti|arXiv (Cornell University)|May 17, 2019
Sparse and Compressive Sensing Techniques参考文献 22被引用 21
一句话总结

本文提出了一种用于循环神经网络中截断时间反向传播(TBPTT)的自适应截断方案,通过基于估计的梯度偏差而非固定延迟动态调整截断长度。在假设梯度期望下呈几何衰减的前提下,该方法控制相对偏差并确保随机梯度下降(SGD)的非渐近收敛,其在语言建模任务中的表现优于固定K的TBPTT,同时保持了偏差控制。

ABSTRACT

Truncated backpropagation through time (TBPTT) is a popular method for learning in recurrent neural networks (RNNs) that saves computation and memory at the cost of bias by truncating backpropagation after a fixed number of lags. In practice, choosing the optimal truncation length is difficult: TBPTT will not converge if the truncation length is too small, or will converge slowly if it is too large. We propose an adaptive TBPTT scheme that converts the problem from choosing a temporal lag to one of choosing a tolerable amount of gradient bias. For many realistic RNNs, the TBPTT gradients decay geometrically in expectation for large lags; under this condition, we can control the bias by varying the truncation length adaptively. For RNNs with smooth activation functions, we prove that this bias controls the convergence rate of SGD with biased gradients for our non-convex loss. Using this theory, we develop a practical method for adaptively estimating the truncation length during training. We evaluate our adaptive TBPTT method on synthetic data and language modeling tasks and find that our adaptive TBPTT ameliorates the computational pitfalls of fixed TBPTT.

研究动机与目标

  • 为解决TBPTT中选择最优固定截断长度的挑战,该挑战可能导致因梯度偏差导致的收敛缓慢或不收敛。
  • 形式化一个条件,使TBPTT中的梯度偏差呈几何衰减,从而通过自适应截断实现偏差控制。
  • 开发一种实用算法,在训练过程中实时估计梯度偏差,并据此调整截断长度。
  • 证明当相对偏差有界时,使用有偏梯度的SGD具有非渐近收敛速率。
  • 在合成任务和语言建模基准上实证验证该方法,显示其在偏差控制下具有竞争力的性能。

提出的方法

  • 提出一个理论框架,其中梯度范数在超过某一延迟后呈期望下的几何衰减,从而实现偏差控制。
  • 引入一个相对偏差度量δ,用于量化有偏梯度与精确梯度的比值,δ < 1可确保收敛。
  • 在训练过程中利用小批量梯度开发δ的估计器,实现实时自适应。
  • 设计一种自适应TBPTT算法(算法1),根据估计的δ和用户定义的目标偏差水平调整截断长度K。
  • 采用马氏距离型范数或加权范数以改善高维隐藏状态下的偏差估计,尽管这留待未来工作。
  • 将该方法应用于合成复制任务和真实世界语言建模(PTB、Wiki2),使用LSTM并保持固定超参数。

实验结果

研究问题

  • RQ1能否通过基于估计偏差而非固定延迟来调整截断长度,实现对TBPTT中梯度偏差的有效控制?
  • RQ2在何种条件下,梯度范数在期望下呈几何衰减,从而实现TBPTT中的偏差控制?
  • RQ3基于相对偏差估计的自适应截断是否能带来比固定截断更快的收敛速度和更好的性能?
  • RQ4当相对偏差有界时,能否为使用有偏梯度的SGD建立非渐近收敛保证?
  • RQ5与最优固定K的TBPTT相比,该方法在真实世界语言建模任务中的实际表现如何?

主要发现

  • 所提出的自适应TBPTT方法能有效控制梯度偏差,而固定K的TBPTT在训练过程中无法维持偏差控制。
  • 在合成复制任务和语言建模(PTB和Wiki2)中,自适应方法均实现了与最佳固定K-TBPTT配置相当或更优的测试困惑度。
  • 估计的截断长度K在训练过程中迅速稳定到一个常数值,表明自适应有效。
  • 实证结果证实,即使单个梯度存在噪声,梯度范数在期望下仍呈几何衰减(如假设所述)。
  • 在高维设置下,欧氏范数可能导致过于保守的偏差估计;未来工作应考虑如马氏距离等维度加权范数。
  • 理论分析表明,当δ < 1时,使用有偏梯度的SGD收敛速率相对于无偏SGD为(1−δ)−1,提供了收敛保证。

更好的研究,从现在开始

从论文设计到论文写作,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。