No-Regret Caching via Online Mirror Descent

Tareq Si Salem, Giovanni Neglia, Stratis Ioannidis

Introduction

Caches are fundamental components of modern computer systems, designed to reduce latency and bandwidth consumption by storing frequently accessed data locally. Traditional caching policies, such as Least Recently Used (LRU) or Least Frequently Used (LFU), typically rely on the assumption that request patterns follow predictable stochastic distributions. However, real-world network traffic is often unpredictable or even adversarial, rendering these heuristics suboptimal.

This paper addresses the challenge of online caching under adversarial requests by framing it as an Online Convex Optimization (OCO) problem. The authors—Tareq Si Salem, Giovanni Neglia, and Stratis Ioannidis—generalize previous gradient-based approaches into a broader family of Online Mirror Descent (OMD) algorithms, providing a robust framework for achieving "no-regret" performance guarantees.

The Diversity Ratio and Algorithm Selection

A key contribution of this work is the insight that the optimal caching strategy depends heavily on the diversity of incoming request batches. The authors introduce the diversity ratio ($R/h$), where $R$ is the batch size and $h$ is the maximum multiplicity of any single file within that batch.

Optimal $q$ as a function of the diversity ratio $R/h$. As diversity increases, the optimal algorithm shifts from standard OGD ($q=2$) toward OMD with lower $q$ values.

As shown in Figure 1, the choice of the mirror map (parameterized by $q$) is sensitive to this ratio. When requests are highly concentrated (low diversity), standard Online Gradient Descent (OGD, corresponding to $q=2$) is optimal. Conversely, when requests are spread across many different files (high diversity), algorithms like OMD with negative entropy (OMD$_{NE}$) provide superior mathematical bounds and empirical performance.

Methods: Online Mirror Descent Framework

The proposed framework extends caching to handle both request batches and integral file storage. The core of the approach is the OMD algorithm, which maps primal points to a dual space to perform gradient steps before projecting back onto the feasible region.

The general Online Mirror Descent algorithm for caching.

The authors specifically analyze two main variants:

  1. Online Gradient Descent (OGD): Uses additive updates.
  2. OMD with Neg-Entropy (OMD$_{NE}$): Uses multiplicative updates, which are significantly more computationally efficient. OMD$_{NE}$'s projection step scales at $O(N + k \log k)$, making it over 15 times faster than OGD in large-scale scenarios.

From Fractional to Integral Caching

While OCO algorithms naturally produce fractional cache states (storing parts of files), real systems require integral caching (storing whole files). Naive rounding of fractional states at each time step leads to "cache thrashing," where files are constantly swapped in and out, incurring massive update costs.

To solve this, the authors introduce Online Coupled Rounding. By coupling the randomness used for rounding across time steps (e.g., using a consistent random seed), the physical cache only updates when the underlying fractional state changes significantly. This technique ensures that the "extended regret"—which accounts for both service and update costs—remains sublinear ($O(\sqrt{T})$).

Key Results and Evaluation

The algorithms were evaluated using synthetic traces and a massive real-world trace from the Akamai Content Delivery Network (CDN), involving 85 million requests.

  • Performance: Both OGD and OMD$_{NE}$ achieved the theoretical $O(\sqrt{T})$ regret bound, meaning their average penalty compared to the optimal static cache vanishes over time.
  • Efficiency: OMD$_{NE}$ demonstrated a drastic computational advantage, proving suitable for high-throughput systems.
  • Robustness: In scenarios with transient popularity (where file interests shift abruptly), OMD-based strategies consistently outperformed traditional heuristics like LRU and W-LFU.

Conclusion

By leveraging the Online Mirror Descent framework and introducing the diversity ratio, this research provides a principled way to select caching algorithms based on traffic characteristics. The development of Online Coupled Rounding further bridges the gap between theoretical continuous optimization and the practical constraints of integral file storage, offering a high-performance, no-regret solution for modern data delivery networks.

Summary updated

BibTeX
@article{salem2023no,
  author = {Tareq Si Salem and Giovanni Neglia and Stratis Ioannidis},
  title = {{No-Regret Caching via Online Mirror Descent}},
  journal = {ACM Trans. Model. Perform. Evaluation Comput. Syst.},
  year = {2023},
  doi = {10.1145/3605209},
}
Figure