Exploration with limited memory: streaming algorithms for coin tossing, noisy comparisons, and multi-armed bandits

Sepehr Assadi, Chen Wang

TL;DR

This paper proves a surprising result in theoretical computer science: you can find the most biased coin in a stream of $n$ coins using the absolute minimum amount of memory (just one extra coin) without sacrificing "sample complexity" (the total number of tosses). The authors extend this "budgeting" strategy to solve complex problems like finding the top-$k$ elements and identifying the best "arms" in multi-armed bandit scenarios.

What Problem Does This Paper Address?

Imagine you are presented with a massive stream of $n$ coins, each with a different, unknown probability of coming up heads. Your goal is to find the coin with the highest bias (the "best" coin). Traditionally, this is a "pure exploration" problem.

The challenge lies in the constraints:

  1. Sample Complexity: Tossing coins is expensive. You want to minimize the total number of tosses across all coins.
  2. Space Complexity (The Streaming Model): In many modern applications (like processing web traffic or massive sensor data), you can't store all the coins. They arrive one by one. If you discard a coin to make room for a new one, it's gone forever—you can't go back and toss it again.

Previously, algorithms that were optimal in terms of tosses (using only $O(n)$ tosses) required storing many coins simultaneously to perform "elimination rounds." This paper asks: Is there a fundamental tradeoff between how much memory you use and how many samples you need?

Methods

The authors introduce a series of algorithms, culminating in a novel approach called GAME-OF-COINS.

The "King" and the "Budget"

Instead of the traditional "round-based elimination," the algorithm maintains a single candidate in memory, dubbed the king.

  • Budgeting: Every time a new coin arrives in the stream, the king's "budget" (allowance for tosses) increases by a constant amount.
  • The Challenge: The new coin "challenges" the king. They are tossed against each other in a "lazy" multi-level process.
  • Lazy Rules: They start with a few tosses. If the king wins, the challenger is discarded immediately. If the challenger wins, they move to a higher level with more tosses to be sure.
  • Overthrow: If the king loses a high-stakes challenge or exhausts its accumulated budget, it is "overthrown," and the challenger becomes the new king.

Mathematical Innovation

The core technical difficulty is proving that the "true" best coin won't accidentally run out of budget due to a string of bad luck. The authors analyze this using a Random Walk with Flexible Step Size. They prove that because their challenging rules are "conservative," the king's budget behaves like a sub-exponential random walk that is highly unlikely to hit zero once the best coin is found.

Datasets

As a theoretical paper focused on algorithmic bounds and proofs, no empirical datasets were used. The results are proven mathematically for any set of $n$ coins with a known gap $\Delta$ between the best and second-best biases.

Key Insights and Ideas

  • No Tradeoff: The most significant "aha moment" is that there is almost no tradeoff between space and samples. You can be perfectly efficient in both simultaneously.
  • Amortization over Elimination: Moving away from rigid "rounds" to an amortized "budget" allows the algorithm to handle the uncertainty of a stream where the best coin might appear at the very beginning or the very end.
  • Ordinal vs. Cardinal Information: Interestingly, the algorithms work even if you only know which coin "won" a set of tosses (ordinal) rather than the exact empirical bias (cardinal). This allows the technique to be applied to "noisy comparisons," where you compare two items but get the wrong answer occasionally.

Key Results

  • The Power of One: For finding the single most biased coin, the algorithm achieves the optimal sample complexity of $O(\frac{n}{\Delta^2} \log \frac{1}{\delta})$ while using only one extra coin of memory.
  • Top-$k$ Selection: They extend this to finding the $k$ most biased coins using $O(k)$ memory and $O(\frac{n}{\Delta^2} \log \frac{k}{\delta})$ samples, which is also optimal.
  • Multi-Armed Bandits: They provide the first streaming algorithm for $\epsilon$-best arm identification in stochastic multi-armed bandits that uses $O(1)$ or $O(\log^* n)$ memory while remaining sample-optimal. (Note: $\log^* n$ is the "iterated logarithm," which is effectively constant—less than 5 for any number of atoms in the observable universe).

Limitations and Future Work

  • Knowledge of the Gap: The current algorithms assume the user knows (or can lower-bound) the "gap" $\Delta$ between the best and second-best coins. A follow-up work mentioned by the authors suggests that without this knowledge, the problem becomes significantly harder in a single pass.
  • Multi-pass Algorithms: The authors suggest that if we allow the algorithm to look at the stream more than once (multi-pass), we might be able to achieve instance-optimal sample complexity without knowing the gap $\Delta$ beforehand.
  • Small $\epsilon$ in MAB: For the Multi-Armed Bandit results, the $O(1)$ memory algorithm has a slight sample complexity penalty when the approximation factor $\epsilon$ is extremely small (specifically $\epsilon < n^{-0.999}$). Refining this for all ranges of $\epsilon$ remains an open area.

Summary updated

BibTeX
@inproceedings{assadi2020exploration,
  author = {Sepehr Assadi and Chen Wang},
  title = {{Exploration with limited memory: streaming algorithms for coin tossing, noisy comparisons, and multi-armed bandits}},
  booktitle = {STOC},
  year = {2020},
  doi = {10.1145/3357713.3384341},
}

Loading related content...

Figure