TExcelTAD
Home › Online Algorithms & Competitive Analysis › Randomized k-Server: Polylog Bounds and the 2023 Refutation

Randomized k-Server: Polylog Bounds and the 2023 Refutation

For paging, randomization improves the competitive ratio from kk to Hk≈ln⁡kH_k \approx \ln k. Since paging is the kk-server problem on the uniform metric, it was natural to conjecture the same for every metric. This randomized kk-server conjecture shaped the field for three decades and led to new techniques (tree embeddings, online primal-dual rounding, online mirror descent), and then, in 2023, Bubeck, Coester and Rabani refuted it. This lesson tells that story with every bound stated with its conditions, and illustrates two of its ingredients with programs: randomization on a small metric, and embeddings into trees.

Everything here is against an oblivious adversary; against adaptive adversaries randomization cannot beat the deterministic lower bound kk by much (Oblivious and Adaptive Adversaries).

The conjecture

Randomized kk-server conjecture (folklore, from the late 1980s). On every metric space with at least k+1k + 1 points, there is a randomized kk-server algorithm that is O(log⁡k)O(\log k)-competitive against an oblivious adversary.

The evidence was strong. The uniform metric has ratio exactly HkH_k (The Harmonic Lower Bound). Weighted paging (star metrics) has an O(log⁡k)O(\log k)-competitive randomized algorithm (Bansal, Buchbinder and Naor, 2007, with the online primal-dual method of the last section). And on every metric, no randomized algorithm beats roughly log⁡k\log k: the universal lower bound was Ω(log⁡k/log⁡log⁡k)\Omega(\log k / \log\log k) (Bartal, Bollobás and Mendel, 2006, and Bartal, Linial, Mendel and Naor, 2005, via metric Ramsey theory).

Randomization on a small metric

On k+1k + 1 points with all distances equal, the kk-server problem is paging with k+1k + 1 pages, so its randomized ratio is HkH_k while the deterministic ratio is kk. The program runs the cruel adversary against deterministic LRU (it requests the point LRU lacks) and an oblivious sequence of uniformly random requests against the marking algorithm, on 3 points with k=2k = 2, where H2=1.5H_2 = 1.5.

python · try it yourself
import random

def opt(reqs, k, start):
    n = len(reqs)
    nxt, seen = [0] * n, {}
    for t in range(n - 1, -1, -1):
        nxt[t] = seen.get(reqs[t], n + reqs[t])
        seen[reqs[t]] = t
    cache, misses = {p: seen.get(p, n + p) for p in start}, 0
    for t, p in enumerate(reqs):
        if p not in cache:
            misses += 1
            del cache[max(cache, key=cache.get)]
        cache[p] = nxt[t]
    return misses

def lru_cruel(k, n):
    cache, last, reqs = list(range(k)), {p: p for p in range(k)}, []
    for t in range(n):
        r = next(p for p in range(k + 1) if p not in cache)
        reqs.append(r)
        victim = min(cache, key=lambda p: last[p])
        cache[cache.index(victim)] = r
        last[r] = k + t
    return reqs

def mark_cost(reqs, k, rng):
    cache, marked, cost = set(range(k)), set(), 0
    for p in reqs:
        if p not in cache:
            cost += 1
            if marked >= cache:
                marked = set()
            cache.remove(rng.choice(sorted(cache - marked)))
            cache.add(p)
        marked.add(p)
    return cost

k, n = 2, 30000
cruel = lru_cruel(k, n)
print(f"deterministic LRU vs cruel adversary: ratio {n / opt(cruel, k, range(k)):.3f} (k = {k})")
rng = random.Random(23)
uniform = [rng.randrange(k + 1) for _ in range(n)]
print(f"MARK on uniform random requests:     ratio {mark_cost(uniform, k, rng) / opt(uniform, k, range(k)):.3f} (H_k = {1 + 1 / 2})")
deterministic LRU vs cruel adversary: ratio 2.000 (k = 2)
MARK on uniform random requests:     ratio 1.508 (H_k = 1.5)

Upper bounds: trees first

General metrics are hard to work with online; trees are much easier, and hierarchically separated trees (HSTs) easier still: rooted trees in which edge lengths shrink by a fixed factor at every level. Two ideas turn tree algorithms into general ones:

  • Probabilistic tree embeddings. Every nn-point metric embeds into a random HST so that distances never shrink and expand by O(log⁡n)O(\log n) in expectation (Bartal, 1996; optimal O(log⁡n)O(\log n) by Fakcharoenphol, Rao and Talwar, 2003). An α\alpha-competitive algorithm on HSTs becomes O(αlog⁡n)O(\alpha \log n)-competitive on the original metric against an oblivious adversary.
  • Fractional algorithms plus online rounding. On an HST one maintains a fractional server distribution (how much "server mass" sits in each subtree) and rounds it online to integral servers with only a constant-factor loss.

Results along this route:

Result Setting Ratio Reference
first polylogarithmic bound every nn-point metric polylogarithmic in kk and nn Bansal, Buchbinder, Mądry and Naor, 2011 (journal 2015)
multiscale entropic regularization HSTs O(log⁡2k)O(\log^2 k) Bubeck, Cohen, Lee, Lee and Mądry, 2018
the same, via tree embeddings every nn-point metric O(log⁡2k⋅log⁡n)O(\log^2 k \cdot \log n) same paper

A 2018 claim of an O(log⁡6k)O(\log^6 k) bound on every metric, independent of nn (Lee, using "fusible" HSTs built dynamically), was later found to have a gap. Whether a ratio polylogarithmic in kk alone is possible on every metric is, to this course's knowledge, open.

The program illustrates the embedding idea on 64 points of a line. A random dyadic partition with a random shift cuts the line into blocks of size 32, 16, ..., 1; the tree distance between two points is determined by the largest block size at which they are separated. Distances never shrink, and the average expansion, measured over 200 random shifts, is only logarithmic.

python · try it yourself
import random

def tree_distance(a, b, shift, levels):
    """2-HST from shifted dyadic blocks: separated at block size 2^j -> tree distance 4 * 2^j."""
    for j in range(levels, -1, -1):
        if (a + shift) >> j != (b + shift) >> j:
            return 4 * 2 ** j                     # path up to the level of size 2^(j+1) and down again
    return 0

rng = random.Random(24)
levels, n = 6, 64
shifts = [rng.randrange(2 ** levels) for _ in range(200)]
print(" true distance   min tree/true   mean tree/true")
for gap in [1, 2, 4, 8, 16, 32]:
    pairs = [(a, a + gap) for a in range(0, n - gap)]
    ratios = [tree_distance(a, b, s, levels) / gap for a, b in pairs for s in shifts]
    print(f"{gap:13}   {min(ratios):13.2f}   {sum(ratios) / len(ratios):14.2f}")
 true distance   min tree/true   mean tree/true
            1            4.00            16.05
            2            4.00            14.03
            4            4.00            12.04
            8            4.00            10.04
           16            4.00             8.04
           32            4.00             6.14

Every ratio is at least 1 (the tree never shortens a distance; with this scaling, never below 4), and the mean expansion is about 4+2log⁡2(64/distance)4 + 2\log_2(64/\text{distance}): two points at distance gg are separated by a block boundary of size 2j2^j with probability about g/2jg/2^j, so each of the log⁡2(64/g)\log_2(64/g) coarser levels adds only a constant to the expected expansion. The worst case is logarithmic in the number of points, as the theory promises. Real constructions (Bartal; Fakcharoenphol, Rao and Talwar) do this for arbitrary metrics with expected expansion O(log⁡n)O(\log n).

The refutation

Theorem (Bubeck, Coester and Rabani, 2023). There exist metric spaces with k+1k + 1 points on which every randomized kk-server algorithm has competitive ratio Ω(log⁡2k)\Omega(\log^2 k) against an oblivious adversary.

This refutes the randomized kk-server conjecture. The same paper proves several matching statements:

  • for metrical task systems, some nn-point metrics require Ω(log⁡2n)\Omega(\log^2 n), matching the O(log⁡2n)O(\log^2 n) upper bound that holds on all metrics, so the worst case of randomized MTS is settled (Metrical Task Systems);
  • on every metric with more than kk points, every randomized kk-server algorithm has ratio Ω(log⁡k)\Omega(\log k), improving the universal Ω(log⁡k/log⁡log⁡k)\Omega(\log k / \log\log k); for MTS, Ω(log⁡n)\Omega(\log n) on every nn-point metric;
  • related lower bounds for layered graph traversal and metrical service systems.

The construction is recursive: it builds metrics in which an adversary can force the algorithm to pay Ω(log⁡k)\Omega(\log k) at each of Ω(log⁡k)\Omega(\log k) scales, in a way that the algorithm cannot amortize across scales. On HSTs, by contrast, the O(log⁡2k)O(\log^2 k) upper bound shows that two logarithmic factors are enough.

What remains open

Question Status (as far as this course knows)
deterministic kk-server: kk on every metric? open; best general bound 2k−12k - 1 (WFA)
randomized kk-server: O(log⁡k)O(\log k) on every metric? false (Bubeck, Coester and Rabani, 2023)
randomized kk-server: polylog(k)(k) on every metric, independent of nn? open

When you read papers in this area, check the adversary model, whether the bound depends on nn or only on kk, and whether it holds on all metrics, on some metrics, or on a class such as HSTs: the results differ in exactly these details.

Test yourself

What did the randomized kk-server conjecture claim?

  1. A deterministic kk-competitive algorithm on every metric
  2. An O(log⁡k)O(\log k)-competitive randomized algorithm against an oblivious adversary on every metric
  3. That randomization never helps
  4. An O(1)O(1)-competitive randomized algorithm

What did Bubeck, Coester and Rabani prove in 2023?

  1. The deterministic kk-server conjecture
  2. Some (k+1)(k+1)-point metrics force every randomized algorithm to ratio Ω(log⁡2k)\Omega(\log^2 k)
  3. An O(log⁡k)O(\log k) algorithm for every metric
  4. That WFA is kk-competitive

Why are hierarchically separated trees useful for randomized kk-server?

  1. Every metric is a tree
  2. Algorithms are easier to design on HSTs, and every nn-point metric embeds into random HSTs with O(log⁡n)O(\log n) expected distortion
  3. They remove the need for randomness
  4. They make OPT computable

An HST-based algorithm gives ratio O(log⁡2k⋅log⁡n)O(\log^2 k \cdot \log n) on general metrics. What does this bound depend on?

  1. Only on kk
  2. On both kk and the number of points nn
  3. Only on nn
  4. On the adversary's strategy