Offline to Online Conversion

Marcus Hutter

Abstract

This paper investigates the theoretical feasibility of converting "batch" (offline) probability estimators into sequential (online) predictors. While Bayesian mixture approaches provide near-optimal performance in terms of regret, we demonstrate that such conversions often encounter significant computational barriers. We analyze various conversion methods, including naive normalization and the limit approach, and establish lower bounds on the computational complexity of achieving low regret. Our results reveal a fundamental trade-off between prediction accuracy and algorithmic efficiency in online learning.

1. Introduction

In machine learning, a common distinction exists between "offline" estimators—models trained on a fixed batch of data to estimate the probability of a sequence of length $n$—and "online" predictors, which must predict the next data point $x_{n+1}$ given the history $x_{1:n}$. Many real-world applications, such as data compression and weather forecasting, inherently require online prediction. However, a sequence of offline estimators ($q_1, q_2, q_3, \dots$) is often "time-inconsistent." Simply taking the ratio of probabilities for sequences of length $n+1$ and $n$ may not yield a valid probability distribution or may lead to excessive "regret"—the performance gap between the online predictor and the best offline batch model. This paper explores whether a fast, online version of an offline estimator can always be found without sacrificing performance.

2. Conversion Methods

The author evaluates four primary strategies for converting offline estimators into online predictors:

  1. Naive Ratio: Calculating $q_{n+1}/q_n$. This approach typically fails as it rarely produces a valid probability distribution.
  2. Naive Normalization: Forcing the ratio to sum to 1 by dividing by a normalization constant.
  3. The Limit Approach: Utilizing marginals of the offline estimator for very large sequence lengths.
  4. The Mixture ($\tilde{q}^{mix}$): A Bayesian mixture that combines all offline estimators into a single measure over infinite sequences. While this is the "gold standard" for minimizing regret, it is mathematically and computationally complex.

3. The Good-Turing Connection and Normalization

A significant contribution of this work is the novel combinatorial derivation of the famous Good-Turing estimator. By applying naive normalization to a "triple uniform" distribution, the author shows that Good-Turing—often treated as a heuristic—emerges naturally.

However, the effectiveness of normalization varies significantly. For Ristad’s quadruple uniform estimator, naive normalization is highly effective, achieving $O(\ln n)$ regret. Conversely, for the triple uniform model, it results in linear $O(n)$ regret, demonstrating that normalization is not a universal solution.

4. Computational Complexity and the "Complexity Wall"

The paper employs Computational Complexity Theory to establish lower bounds on online prediction. By constructing "quasi-random" sequences, the author proves that there is no "free lunch": there exist offline estimators that are easy to compute (polynomial time), yet any online version attempting to maintain low (logarithmic) regret requires at least exponential, and sometimes double-exponential, time.

Specifically, the optimal mixture $\tilde{q}^{mix}$ is shown to have a complexity of $O(|X|^{4|X|^n/\epsilon})$ to reach a relative accuracy $\epsilon$. This confirms that while $\tilde{q}^{mix}$ is a theoretical benchmark for regret, it is often practically inaccessible.

5. Key Results

  • Theorem 1: Naive normalization of the triple uniform estimator leads to the Good-Turing estimator but suffers from high regret ($O(n)$).
  • Theorem 2: Naive normalization of Ristad’s estimator is highly effective, yielding small regret ($2 \ln n$).
  • Hardness Result: For certain polynomial-time offline estimators, the fastest online predictor with good regret guarantees is at least exponential in time.

6. Discussion and Future Work

The "hard" cases used to prove these complexity results are currently somewhat artificial, involving specifically constructed quasi-random sequences. A key open question remains: do these computational barriers exist for practically relevant offline estimators?

Future research directions include:

  • Determining if every polynomial-time offline estimator can be converted to an online one with $\sqrt{n}$ regret in polynomial time.
  • Investigating "smarter" smoothing functions for the Good-Turing estimator to bridge the gap between tractability and performance.
  • Shifting the focus from "worst-case" regret to "expected" regret to better align with practical applications.

Summary updated

BibTeX
@inproceedings{hutter2014offline,
  author = {Marcus Hutter},
  title = {{Offline to Online Conversion}},
  booktitle = {ALT},
  year = {2014},
  url = {https://openreview.net/forum?id=Ju8ew1Cfr87},
}
Figure