Online Dynamic Programming

Holakou Rahmanian, Manfred K. Warmuth

This paper by Holakou Rahmanian and Manfred K. Warmuth introduces a framework for solving dynamic programming (DP) problems in an "online" setting. In this context, the costs associated with decisions change over time, and the learner must adapt continuously to minimize regret.

The Challenge of Volatile Environments

In traditional dynamic programming, the goal is to find an optimal solution—such as the shortest path or the best search tree—for a fixed set of costs. But what happens when the environment is volatile? Consider maintaining a Binary Search Tree (BST) where the frequency of searches for different keys changes daily. To minimize the total search cost over a year, an online algorithm is required.

The standard tool for online learning is the Hedge algorithm, which treats every possible solution as an "expert." However, for a BST with $n$ keys, the number of possible trees is the $n$-th Catalan number, which grows exponentially (roughly $4^n$). Maintaining a weight for every possible tree is computationally intractable. While previous research successfully handled "path" problems (where a solution is a single sequence of edges in a graph), many DP problems involve branching, where one problem breaks into $k$ sub-problems. This paper bridges that gap.

Methodology: k-DAGs and k-multipaths

To handle branching DP problems efficiently, the authors introduce a new abstraction called the k-DAG and k-multipaths.

  1. k-DAGs and k-multipaths: The DP state space is represented as a Directed Acyclic Graph. In this graph, a "decision" isn't just picking a single edge; it involves picking a "k-multiedge" that connects a parent problem to $k$ child sub-problems. A complete solution, like a full BST, is represented as a k-multipath.
k-DAG representation of Binary Search Trees
  1. Expanded Hedge (EH) for k-multipaths: The authors generalize the "weight pushing" technique. Instead of tracking every possible tree, they maintain weights on the multiedges. Their "Generalized Weight Pushing" algorithm ensures these weights stay locally normalized across the branching structure, allowing for the efficient sampling of solutions.
  2. Component Hedge (CH) for k-multipaths: This approach operates in the "weight space" (the convex hull of all possible solutions). The authors define a k-flow polytope and use iterative Bregman projections to update the learner's strategy. This handles cases where the loss is linear over the components of the object.

Key Insights

  • Branching as Flow: A profound insight of this work is treating recursive DP structures as a generalized "flow" through a graph. Just as a standard path is a flow of 1 unit, a BST can be viewed as a flow that "splits" at every internal node.
  • Polynomial vs. Exponential: By shifting the focus from the set of all possible objects (which is exponential) to the set of sub-problems and transitions (which is polynomial, usually $\mathcal{O}(n^2)$ or $\mathcal{O}(n^3)$), the authors make online DP computationally tractable.
  • Linearity is the Bridge: The framework relies on the fact that the total loss of a combinatorial object is the sum of the losses of its components. This linearity allows the mathematics of the Hedge algorithm to be decomposed across the edges of the k-DAG.

Benchmarks and Key Results

The framework is evaluated against several classic combinatorial optimization problems: Optimal Binary Search Trees, Matrix-Chain Multiplication, the Knapsack Problem, Rod Cutting, and Weighted Interval Scheduling.

The authors prove that their algorithms achieve "low regret," meaning the learner performs almost as well as the single best fixed solution chosen in hindsight.

Regret bounds for various DP problems
  • Efficiency and Regret: For a BST, while there are exponentially many trees, the CH algorithm only needs to deal with $\mathcal{O}(n^3)$ facets in the polytope. This turns an impossible task into one that runs in polynomial time, achieving a regret bound of $\mathcal{O}(n \sqrt{\log n} \sqrt{T})$, where $n$ is the number of keys and $T$ is the number of trials.
  • Generality: The paper provides a comprehensive recipe to turn almost any "min-sum" dynamic programming recurrence into an online learning algorithm.

Limitations and Future Work

While powerful, the framework has a few limitations:

  • Min-Sum Constraint: It is specifically designed for "min-sum" problems and does not naturally handle "min-max" problems or more complex objective functions.
  • Overlapping Subproblems: The primary focus is on tree-like decompositions where sub-problems are disjoint. Generalizing this to arbitrary overlapping sub-problems remains a challenge.
  • Unbounded Losses: Algorithms like Viterbi or CYK parsing involve taking logs of probabilities, which can lead to unbounded losses. The current framework requires losses to be bounded (e.g., in $[0, 1]$) to guarantee the stated regret bounds.

Summary updated

BibTeX
@inproceedings{rahmanian2017online,
  author = {Holakou Rahmanian and Manfred K. Warmuth},
  title = {{Online Dynamic Programming}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2017},
}
Figure