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 算法通常没有差异性, 这阻碍了它们作为神经网络中一个层的使用, 而这些神经网络则通过反向反向分析来培训 。 为了解决这个问题, 我们提议用一个强大的 convex 常规化器来平滑动态编程循环操作员。 这样可以放松原始组合问题的最佳价值和解决方案, 并将广泛的DP 算法转换为不同的操作员 。 从理论上讲, 我们提供了一个新的关于通过这些 DP 操作员进行反向转换的概率视角, 并将它们与图形模型中的推断联系起来 。 我们从我们的框架中得出了两个特殊的瞬间点, 一种是平滑的 Viterbi 算法, 一种是序列预测的平滑的 Viterbi 算法, 一种是时间序列校准的光滑的 DTW 算法。 我们用两种结构化的预测任务来展示这些即时序转换, 以及结构化和微的神经机转换的注意 。