Online Weighted Paging with Unknown Weights

Orin Levy, Noam Touitou, Aviv Rosenberg

Introduction

The classic Online Weighted Paging (OWP) problem is a cornerstone of online algorithm design. In this setup, a system maintains a cache of size $k$ to serve a stream of page requests. If a requested page is not in the cache (a "miss"), it must be fetched at a specific cost $w_p$, often requiring the eviction of another page. Decades of research have culminated in algorithms that are $O(\log k)$-competitive, meaning their performance is within a logarithmic factor of an omniscient offline optimal solution.

However, these traditional models rely on a strong assumption: the fetching cost $w_p$ of every page is known upfront. In modern, complex systems—such as multi-core processors utilizing L1, L2, and main memory architectures—the "cost" of fetching a memory block is rarely static. Instead, it is an expected value based on stochastic factors, like whether the block resides in a shared mid-level cache. This cost is fundamentally unknown in advance and can only be learned by "sampling" it (i.e., fetching or evicting the page) multiple times.

This paper introduces the first algorithm for Online Weighted Paging with Unknown Weights (OWP-UW), successfully bridging classical competitive analysis with multi-armed bandit (MAB) learning techniques to solve a long-standing theoretical gap.

A Dual-Layered Algorithmic Framework

To tackle the OWP-UW problem, the authors propose a sophisticated framework that balances exploration (learning the unknown page weights) with exploitation (maintaining an efficient cache). This is achieved through a delicate interplay between a fractional solver and a randomized rounding scheme.

1. The Optimistic Fractional Solver

The algorithm first addresses a "fractional" version of the problem, allowing it to store fractions of pages in the cache. To handle the unknown weights, the solver employs the Optimism Under Uncertainty principle. It maintains a Lower Confidence Bound (LCB) for each page's weight. By assuming pages are as cheap as statistically plausible, the solver is naturally incentivized to explore pages with high uncertainty, ensuring that potentially low-cost pages are not prematurely discarded.

2. The Pessimistic Rounding Scheme

Fractional cache states must ultimately be converted into actual, integral cache states (a page is either fully in the cache or fully evicted). The authors utilize a randomized rounding scheme for this translation.

Visualization of the randomized rounding scheme and weight class boundaries.

Interestingly, while the fractional solver is optimistic, the rounding scheme takes a pessimistic approach. It uses Upper Confidence Bounds (UCBs) to group pages into discrete "weight classes." This pessimistic view ensures that the distribution of pages in the cache remains balanced and stable, even as the algorithm's estimates of the page weights fluctuate over time.

3. The Sampling Interface

A major technical hurdle in this dual-layered approach is feeding the cost samples obtained from the randomized rounding process back into the deterministic fractional solver without breaking its determinism.

Progression of the fractional solver state and the sampling interface.

The authors solve this by introducing a "sampling queue." This interface triggers a new sample request for the solver only when a page has been "fractionally evicted" by a full integer amount. This decouples the continuous fractional updates from the discrete sampling events, maintaining the theoretical integrity of both layers.

Key Insights and Theoretical Results

One of the paper's most elegant contributions is the Optimistic-Pessimistic Split. Realizing that the fractional solver requires optimism to explore, while the rounding scheme requires pessimism to maintain a valid cache state, is a critical breakthrough for combining caching with bandit learning.

The primary theoretical result states that their algorithm achieves an expected cost bounded by: $$\mathbb{E}[\text{ON}(Q)] \leq O(\log k) \cdot \text{OPT}(Q) + \tilde{O}(\sqrt{nT})$$

  • $O(\log k)$ Competitive Ratio: The algorithm matches the optimal performance of the best existing algorithms that do know the weights in advance.
  • $\tilde{O}(\sqrt{nT})$ Regret: This sublinear term represents the "cost of learning." As the number of requests ($T$) grows, the average extra cost per request approaches zero, indicating that the algorithm eventually learns the true weights.
  • Asymptotic Tightness: Because OWP-UW generalizes both standard OWP and the Multi-Armed Bandit problem, this bound is essentially the best possible. One cannot beat the $O(\log k)$ competitive ratio of paging, nor the $\sqrt{T}$ regret inherent to bandit problems.

Limitations and Future Directions

As a purely theoretical work, the paper relies on mathematical proofs rather than empirical benchmarks. A key limitation of the current model is the assumption of stationary weights—that the distribution of a page's fetching cost does not change over time. In real-world systems, factors like cache contention can cause non-stationary behavior. The authors suggest that integrating "non-stationary bandit" techniques is a promising direction for future research.

Furthermore, while the asymptotic bounds are optimal, the constants hidden within the regret term may be large for small-scale practical applications. Finally, the model assumes feedback (sampling) only occurs upon eviction; exploring alternative feedback loops, such as sampling upon every request, could yield different algorithmic trade-offs.

Summary updated

BibTeX
@inproceedings{levy2024online,
  author = {Orin Levy and Noam Touitou and Aviv Rosenberg},
  title = {{Online Weighted Paging with Unknown Weights}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=ctxtY3VGGq},
}
Figure