Regret-Optimal Online Caching for Adversarial and Stochastic Arrivals

Fathima Zarin Faizal, Nikhil Karamchandani, Sharayu MoharirValuetools Conference 2026

TL;DR

This paper introduces a new caching policy, "Wait then FTPL" (W-FTPL), that achieves optimal regret for online caching under both adversarial and stochastic file request patterns, even when considering the cost of switching cached items. This policy offers a significant improvement in handling switching costs for stochastic arrivals compared to existing methods.

What Problem Does This Paper Address?

Caching is a fundamental technique for improving data access speed and reducing network load. In online caching, a system must decide which files to keep in a limited-size cache as users request files one by one, without knowing future requests. The challenge lies in minimizing "regret," which is the difference between the reward obtained by the caching policy and the reward of an optimal policy that knows all future requests. This problem becomes more complex when:

  1. Arrivals are unpredictable: File requests can follow either an adversarial pattern (an adversary chooses requests to maximize the cache's regret) or a stochastic pattern (requests are random but their distribution might be unknown). A robust policy should perform well in both scenarios.
  2. Switching costs exist: Fetching a file from a back-end server to the cache incurs a cost (latency, bandwidth). Policies that frequently change cached items can incur high switching costs, impacting overall performance.
  3. Updates are restricted: In some systems, cache updates can only happen at specific intervals, adding another layer of complexity.

Existing policies often excel in one scenario (e.g., adversarial) but perform poorly in others, or they don't adequately account for switching costs. This paper aims to bridge this gap by developing a single, unified policy that is regret-optimal across these diverse conditions.

Methods

The core of this work revolves around analyzing and extending the Follow the Perturbed Leader (FTPL) algorithm. FTPL is a popular online learning algorithm that works by adding a small random perturbation to the "scores" of items (in this case, files) and choosing the item with the highest perturbed score.

The authors introduce a novel variant called Wait then FTPL (W-FTPL). The key idea behind W-FTPL is to initially "wait" for a certain period before applying the standard FTPL algorithm. This waiting period allows the policy to gather more information about the request patterns, especially in stochastic settings, thereby reducing the initial high switching costs that FTPL might incur.

The paper rigorously analyzes the regret of FTPL and W-FTPL under various settings:

  • Unrestricted switching: Cache can be updated at any time.
  • Restricted switching: Cache updates are limited to specific time slots.
  • Adversarial arrivals: Requests are chosen by an adversary.
  • Stochastic arrivals: Requests follow an i.i.d. process.

They employ techniques like potential functions, concentration inequalities (e.g., Hoeffding's inequality), and information-theoretic bounds to derive theoretical guarantees on the regret.

Datasets

  • Synthetic datasets: The paper uses synthetic request sequences, including round-robin patterns and dyadic distributions, to test policies under controlled conditions.
  • Real-world traces: The MovieLens 1M dataset is used to evaluate the policies on realistic user request patterns.

Key Insights and Ideas

  • FTPL's dual optimality: The paper demonstrates that a carefully tuned FTPL policy can achieve order-optimal regret for both adversarial and stochastic arrivals simultaneously, a significant theoretical achievement.
  • The cost of early switching: For stochastic arrivals, FTPL's tendency to switch frequently early on can lead to high switching costs, even if its long-term regret is good.
  • W-FTPL: A smarter start: The W-FTPL policy cleverly addresses the switching cost issue by delaying updates. This "wait" period allows it to build a better understanding of the request distribution before committing to caching decisions, leading to significantly lower switching costs in stochastic scenarios without sacrificing adversarial performance.
  • Restricted switching complexity: The paper shows that even with restricted updates, FTPL can still achieve near-optimal regret, but the analysis becomes more intricate.

Key Results

  • Order-optimal regret: FTPL(α√t) is shown to be order-optimal for both adversarial and stochastic arrivals in the unrestricted switching setting.
  • Improved switching cost performance: W-FTPL(α√t) achieves order-optimal regret and demonstrates significantly better performance in terms of switching costs for stochastic arrivals compared to FTPL. Specifically, its regret grows sublinearly with the switching cost D, whereas FTPL's grows linearly.
  • Restricted switching analysis: The paper provides theoretical bounds for FTPL and W-FTPL under restricted cache updates, showing order-optimal regret in certain cases.
  • FTPL(η) limitations: The paper proves that FTPL with a constant learning rate (FTPL(η)) cannot simultaneously achieve order-optimal regret for both adversarial and stochastic arrivals.

Limitations and Future Work

  • General restricted switching: While the paper analyzes restricted switching, achieving tight bounds for all cases, especially under adversarial arrivals with switching costs, remains an open area.
  • Switching cost in restricted settings: The analysis of restricted switching primarily focuses on regret without switching costs. Incorporating switching costs into these scenarios would provide a more complete picture.
  • Practical deployment: While theoretical guarantees are strong, real-world performance can depend on factors like cache size, catalog size, and the specific nature of the request distribution, which might require further empirical validation.

Summary updated

BibTeX
@inproceedings{faizal2026regret,
  author = {Fathima Zarin Faizal and Nikhil Karamchandani and Sharayu Moharir},
  title = {{Regret-Optimal Online Caching for Adversarial and Stochastic Arrivals}},
  booktitle = {Valuetools Conference},
  year = {2026},
  url = {https://openreview.net/forum?id=XqFyhX70Os},
}
Figure