Linear Dynamic Programming and the Training of Sequence Estimators with Application to Musical Harmonic Analysis Christopher Raphael and Eric Nichols Abstract We consider the problem of finding an optimal path through a trellis graph when the arc costs are linear functions of an unknown parameter. In this con- text we develop an algorithm, Linear Dynamic Programming (LDP), that simulta- neously computes the optimal path for all values of the parameter. We show how the LDP algorithm can be used for supervised learning of the arc costs for a dynamic- programming-based sequence estimator by minimizing empirical risk. We present an application to musical harmonic analysis in which we optimize the performance of our estimator by seeking the parameter value generating the sequence best agree- ing with hand-labeled data. 1 Introduction Dynamic programming (DP) is a well-established technique for finding the optimal path through a trellis graph in which the score of the path is represented as a sum of arc scores traversed along the path. The history of DP goes back at least to Bellman, [1], though perhaps much further. In this work we introduce an extension of the DP algorithm, we call linear dynamic programming (LDP). LDP also addresses a situation in which we seek the best scoring path through a trellis. However, in the LDP case the arc scores are known linear functions of an unknown parameter. In this context, LDP finds the optimal path simultaneously for all values of the parameter. LDP mirrors regular DP by recursively constructing the score of the best possible path to each intermediate trellis node. The score of this path, as a function of the parameter, is shown to be the maximum of a finite collection of linear functions. This form can be carried through the DP iteration exactly. While meaningful complexity Christopher Raphael School of Informatics, Indiana Univ., e-mail: craphael@indiana.edu Eric Nichols School of Informatics, Indiana Univ., e-mail: epnichols@gmail.com 1