Optimal amortized regret in every interval

Rina Panigrahy, Preyas Popat

TL;DR

This paper introduces a randomized algorithm for bit prediction that guarantees low "regret" (loss compared to the best expert) not just over an entire sequence, but across any arbitrary partition of intervals. By moving to an amortized analysis, the authors achieve a regret bound of $O(\sqrt{x})$ for any interval of length $x$, improving upon previous bounds that included a logarithmic dependence on the total sequence length $T$.

What Problem Does This Paper Address?

In the classical "expert prediction" problem, an algorithm tries to predict the next bit in a sequence by looking at the advice of experts (e.g., one expert who always predicts 0 and another who always predicts 1). Success is measured by regret: the difference between the payoff of the best expert in hindsight and the payoff of the algorithm.

Standard algorithms like Weighted Majority provide a "global" regret guarantee of $O(\sqrt{T})$. However, these algorithms can fail miserably on sub-intervals. For example, an algorithm might perform perfectly over 1,000 steps but have terrible performance between steps 400 and 500. While some existing work addressed this by providing $O(\sqrt{x \log T})$ regret for an interval of length $x$, that $\log T$ factor means the penalty for a short interval still grows as the total experiment gets longer. The authors sought to eliminate this "global" penalty, achieving a regret that depends strictly on the local interval length.

Methods

The authors define a new Interval Payoff Function ($P_\alpha$), which calculates the maximum possible payoff an algorithm could achieve across all possible partitions of a sequence into intervals, minus a penalty of $\alpha\sqrt{x}$ for each interval of length $x$.

Key methodological components include:

  • Cover’s Observation: The authors utilize a fundamental result from Thomas Cover, which states that a payoff function is "feasible" (meaning an algorithm exists to achieve it) if and only if the expected payoff over a uniformly random sequence is non-positive.
  • Aligned Intervals: To simplify the mathematical proof, they first analyze "aligned intervals"—subsequences whose lengths are powers of two. They then prove that a guarantee on these aligned intervals translates to a guarantee on any arbitrary interval with only a small constant factor increase.
  • Randomized Prediction: The algorithm works by considering the current sequence, appending a $+1$ or $-1$, and then completing the sequence to length $T$ with random bits. By comparing the expected interval payoffs of these two completions, the algorithm determines its next prediction.
  • Dynamic Programming: They provide an $O(T^3)$ dynamic programming approach to compute the payoff function, which is essential for the prediction step.

Datasets

The paper evaluates the algorithm using two primary sources:

  1. Synthetic Random Sequences: Used to empirically estimate the optimal value of the constant $\alpha$. They tested sequences up to $T=2000$.
  2. High-Frequency Financial Data: The authors tested the algorithm on per-minute price changes for five major US stocks/ETFs: MSFT, GE, GLD, QQQ, and WMT. The experiment spanned 189 trading days, resulting in over 367,000 data points.

Key Insights and Ideas

  • Amortization is the "Cheat Code": By allowing regret to be "amortized"—meaning the algorithm can perform slightly worse in one interval if it performs much better in another—the authors successfully removed the $\log T$ factor that plagued previous research.
  • The Constant is Small: While the theoretical proof shows the constant $\alpha$ is less than 10, empirical tests on random sequences suggest it is actually much smaller, around 2.1. This makes the algorithm practically relevant, not just a theoretical curiosity.
  • Worst-Case vs. Average-Case: The algorithm is designed to handle "adversarial" sequences (the worst possible bits). However, the authors also show it can be generalized to handle real-numbered inputs where the magnitudes are random but the signs are chosen by an adversary.

Key Results

  • Theoretical Feasibility: The authors proved that there exists an absolute constant $\alpha$ (specifically $\alpha \le 2.8$ for aligned intervals) such that the interval payoff function is feasible for any sequence length.
  • Computational Efficiency: They developed a variant of the algorithm that, after an $O(T^4)$ pre-computation step, can make predictions in just $O(\log T)$ time per step.
  • Stock Market Performance: In the empirical tests on stock data, the "Interval" algorithm outperformed other regret-minimization benchmarks like the Weighted Majority algorithm and the "boundedloss" algorithm.
  • The ARIMA Comparison: Interestingly, the algorithm was outperformed by ARIMA (a standard statistical time-series model). The authors note that while ARIMA performs better on real financial data, it lacks the "provable guarantees" of their algorithm; ARIMA could fail catastrophically on a truly adversarial sequence, whereas their algorithm is guaranteed to maintain low regret.

Limitations and Future Work

  • Computational Overhead: The pre-computation requirement of $O(T^4)$ is significant. For very long sequences, this becomes a bottleneck.
  • Gap Between Theory and Finance: The fact that ARIMA outperformed the proposed algorithm suggests that financial markets are not purely adversarial. Future work could involve tuning the algorithm to better exploit the specific statistical properties of financial time series while maintaining its robust worst-case guarantees.
  • Non-Amortized Limits: The authors acknowledge (Observation 4) that it is impossible to achieve this level of regret in a non-amortized sense; there is an inherent trade-off between performance at different time scales.

Summary updated

BibTeX
@inproceedings{panigrahy2014optimal,
  author = {Rina Panigrahy and Preyas Popat},
  title = {{Optimal amortized regret in every interval}},
  booktitle = {Conference on Uncertainty in Artificial Intelligence},
  year = {2014},
}
Figure