[论文解读] Differentiable Dynamic Programming for Structured Prediction and Attention
本文提出一个框架,通过用强凸正则化项平滑最大算子,使动态规划可微,从而实现可微的 DP 层和端到端训练,并给出平滑 Viterbi 与平滑 DTW 的实例化。它将 DP 的导数与推断出的路径分布联系起来,并应用于结构化预测和注意力。
Dynamic programming (DP) solves a variety of structured combinatorial problems by iteratively breaking them down into smaller subproblems. In spite of their versatility, DP algorithms are usually non-differentiable, which hampers their use as a layer in neural networks trained by backpropagation. To address this issue, we propose to smooth the max operator in the dynamic programming recursion, using a strongly convex regularizer. This allows to relax both the optimal value and solution of the original combinatorial problem, and turns a broad class of DP algorithms into differentiable operators. Theoretically, we provide a new probabilistic perspective on backpropagating through these DP operators, and relate them to inference in graphical models. We derive two particular instantiations of our framework, a smoothed Viterbi algorithm for sequence prediction and a smoothed DTW algorithm for time-series alignment. We showcase these instantiations on two structured prediction tasks and on structured and sparse attention for neural machine translation.
研究动机与目标
- 提供一种统一方法,将广泛的动态规划问题转化为可微算子。
- 证明平滑后的 DP 运算符是原始 DP 的凸松弛,并推导可解释的梯度为期望路径。
- 推导两种实例化:一个用于序列预测的平滑 Viterbi 算法,以及一个用于时间序列对齐的平滑 DTW 算法。
- 展示在神经网络中用于结构化预测与结构化注意力的可微 DP 层。
提出的方法
- 用强凸正则化项 Omega,在概率简极上将 max Omega 定义为平滑的最大值。
- 通过在类 Bellman 递推中用 max_Omega 替换 max,形成平滑的 DP 递推 DP_Omega,得到一个可微且凸的算子。
- 证明 DP_Omega 是 LP 的一个放松,并分析 LP 与 DP_Omega 之间的界限,在 Omega 对应熵正则化或平方 L2 正则化的特殊情形下。
- 给出反向传播方案,在 DP 图上以 O(|E|) 时间高效计算梯度 ∇DP_Omega 和海森向量积 ∇^2 DP_Omega Z。
- 将 ∇DP_Omega 解释为在 DP 图上一种特定随机游走下的期望路径,提供概率视角并在使用 negentropy 时与类 CRF 的分布相关。
- 详细说明如何对 DP_Omega 和 ∇DP_Omega 同时进行反向传播,以实现神经网络中可微分层。
实验结果
研究问题
- RQ1如何在保持结构的同时,使一大类动态规划算法具备可微性?
- RQ2在 DP 中对 max 运算符进行平滑处理的理论与实践含义是什么?这与图模型推断有何关联?
- RQ3如何将该框架实例化为具体问题,如序列预测(Viterbi)和时间序列对齐(DTW)?
- RQ4是否可以对 DP 值及其梯度同时进行反向传播,以实现对所有组件的端到端学习?
- RQ5正则化项的作用(如 negentropy 与平方 L2)在塑造解的形态以及梯度的稀疏性方面起什么作用?
主要发现
- DP_Omega 提供了原始动态规划的平滑、凸放松,便于实现可微分层。
- 梯度 ∇DP_Omega 等于在 DP 图上的局部随机游走所定义分布下的期望路径。
- 当正则化强度 gamma 收敛到零时,∇DP_{gamma Omega} 收敛到原始 LP 的子梯度,并在适当情况下恢复原始 DP 的硬解。
- 使用 negentropy 正则化可恢复 CRF 风格的行为,而使用平方 L2 正则化则产生更稀疏的梯度分布。
- 该框架给出两个具体实例:Vit_Omega(平滑 Viterbi)用于序列标注,DTW_Omega 用于时间序列对齐,且对值和梯度均可反向传播。
- 所提出的可微分 DP 层支持结构化预测任务和神经机器翻译中的结构化注意力机制的端到端学习。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。