Efficient and Optimal Fixed-Time Regret with Two Experts

Laura Greenstreet, Nicholas J. A. Harvey, Victor Sanches Portella

Abstract

Prediction with expert advice is a foundational problem in online learning. In instances with $T$ rounds and $n$ experts, the classical Multiplicative Weights Update (MWU) method is a standard approach, yet it is only asymptotically optimal as both $n$ and $T$ approach infinity. For a small, fixed number of experts—specifically the two-expert case—MWU is suboptimal. This paper introduces a new, computationally efficient algorithm for the "prediction with two experts" problem that achieves the theoretical minimum regret. By bridging discrete online learning with continuous-time stochastic calculus, the authors provide an algorithm that runs in $O(1)$ time per round and works for general costs in the $[0, 1]$ interval, improving upon decades-old dynamic programming approaches.

The Challenge of Optimal Regret

In the foundational experts problem, a player chooses between $n$ experts in each round. After the choice is made, the costs for all experts are revealed, and the player suffers the cost of their chosen expert. The goal is to minimize regret: the difference between the player's cumulative loss and the loss of the best expert in hindsight.

While Thomas Cover showed in 1967 that an optimal strategy exists for two experts, his solution suffered from two major drawbacks:

  1. Complexity: It required $O(T^2)$ pre-processing time via dynamic programming.
  2. Scope: It was designed only for binary costs $\{0, 1\}$, requiring randomized rounding to handle general costs in $[0, 1]$, which only guarantees regret in expectation.

The authors seek an algorithm that is both optimal (achieving the best possible constant in the regret bound) and efficient (running in constant time per round).

Methodology: From Continuous Heat to Discrete Decisions

The authors utilize a sophisticated continuous-time approach to design their discrete algorithm, centered on the following pillars:

  • Stochastic Calculus Mapping: They model the expert problem as a continuous stochastic process, relating the expert "gap" (the difference in their cumulative losses) to Brownian motion.
  • Potential Functions and the Heat Equation: The most profound insight is that optimal regret in online learning behaves like heat diffusion. They derive a potential function $Q(t, g)$ based on the complementary error function (erfc). This function is chosen because it satisfies the Backwards Heat Equation (BHE), a partial differential equation that describes how "regret" diffuses backward from the end of the game ($T$) to the start. By "inverting time," the authors use the Heat Equation to find the exact probability distribution that balances current loss against future risk.
  • Discrete Itô’s Formula: To bring the continuous solution back to the discrete world of rounds and turns, they use a discrete version of Itô’s formula. This allows them to bound the "discretization error"—the gap between the idealized continuous regret and the actual discrete regret. While discretization often leads to negative error (which helps the player) in other contexts, in the fixed-time setting, the error is positive. The paper’s technical triumph is proving that this accumulated error is small—specifically $O(1)$—and does not grow with $T$.

The Algorithm

The resulting algorithm is computationally elegant. In each round, the player calculates the probability of picking the "lagging" expert based on the discrete derivative of their potential function. This calculation involves only basic arithmetic and the evaluation of the erfc function, which is standard in most math libraries. This ensures the algorithm requires only $O(1)$ processing time per turn and $O(T)$ total time.

Key Results

  • Optimal Regret: The algorithm achieves a regret of at most $\sqrt{T/2\pi} + 1.24$. This matches the known lower bound of $\sqrt{T/2\pi} - O(1)$, making it essentially optimal.
  • Fixed-Time Precision: Previous work addressed the "anytime" setting where $T$ is unknown. This paper shows that knowing $T$ allows for a much tighter regret bound ($\sqrt{T/2\pi} \approx 0.4 \sqrt{T}$ vs $\approx 1.3 \sqrt{T}$) because the player can "spend" their regret budget more precisely as the horizon approaches.
  • Robustness: Unlike previous optimal solutions, this algorithm handles arbitrary costs in $[0, 1]$ directly without needing randomized rounding.

Limitations and Future Work

The primary limitation of this approach is scaling to $n > 2$. The "gap" parameterization used here is specific to the two-expert case. When $n=3$ or more, the gaps between experts are no longer independent, and the continuous-time mapping becomes significantly more complex, requiring higher-dimensional partial differential equations. Finding similar computationally efficient potential functions for $n$ experts remains a major open problem in the field of online learning.

Summary updated

BibTeX
@inproceedings{greenstreet2022efficient,
  author = {Laura Greenstreet and Nicholas J. A. Harvey and Victor Sanches Portella},
  title = {{Efficient and Optimal Fixed-Time Regret with Two Experts}},
  booktitle = {ALT},
  year = {2022},
  url = {https://openreview.net/forum?id=b7rxySYd9yU},
}
Figure