Parsimonious Learning-Augmented Caching

Sungjin Im, Ravi Kumar, Aditya Petety, Manish Purohit

The Cost of Predictions in Online Caching

Most "learning-augmented" algorithms operate under a generous assumption: machine-learned predictions are free and always available. This paper challenges that assumption for the classic online caching problem, proving that you can achieve near-optimal performance by being "parsimonious"—querying the prediction model for only a small, sublinear number of hints rather than for every single request.

Online caching is a fundamental problem in computer science. Given a cache of size $k$, the goal is to minimize "misses" (when a requested page isn't in the cache). The gold standard for offline caching is Belady’s algorithm, which optimally evicts the page whose next request is furthest in the future. Because we cannot see the future in the real world, systems rely on heuristics like LRU (Least Recently Used).

Recently, researchers have introduced learning-augmented frameworks where an ML model predicts when a page will be requested next. If predictions are perfect, the system achieves Belady’s performance; if they are terrible, a "robust" algorithm should still perform as well as traditional randomized marking ($O(\log k)$-competitive). However, previous work assumed the system could query the ML model for every page on every request. In practice, running a complex ML model is computationally expensive. This paper asks: Can we get the benefits of ML predictions while being stingy with how often we ask for them?

The AdaptiveQuery-b Algorithm

The authors introduce AdaptiveQuery-b, a modification of the classic randomized marking algorithm designed to minimize oracle queries.

  1. Event-Driven Queries: Instead of querying the arrival time for every page in the cache continuously, the algorithm only acts when a cache miss occurs.
  2. Targeted Sampling: Upon a miss, it samples $b$ unmarked pages at random from the cache.
  3. Parsimonious Eviction: It queries the ML oracle only for those $b$ pages and evicts the one predicted to arrive furthest in the future.
  4. Robustness (The Safety Switch): To ensure the algorithm doesn't fail catastrophically if the ML model is highly inaccurate, it tracks "eviction chains." If a chain of evictions becomes too long (specifically, longer than $\log k$), the algorithm stops trusting the ML model and reverts to standard randomized marking for the rest of that phase.

Key Insights: The Power of "Good Enough"

A central takeaway from this research is that you do not need to find the absolute furthest-in-future page to beat LRU. By sampling just a few pages ($b$), you are highly likely to find at least one page that won't be needed for a long time.

Competitive ratio vs. number of queries per miss ($b$) across different noise levels ($\sigma$).

The paper proves a competitive ratio of $O(\log_{b+1} k)$. This establishes a logarithmic trade-off with diminishing returns: moving from $b=1$ (random eviction) to $b=2$ or $b=4$ provides a massive performance boost. You do not need $b$ to be anywhere near the total cache size $k$ to get near-constant performance. Furthermore, the number of queries needed to match state-of-the-art "full prediction" algorithms is proportional to the number of cache misses, not the total number of requests. Since misses are usually much rarer than hits, this yields a massive efficiency gain.

Experimental Results

The authors evaluated their approach using the 2018 CitiBike Dataset (where each "page request" is the starting point of a bike trip) and synthetic predictions with varying levels of log-normal noise ($\sigma$).

Performance comparison of AdaptiveQuery against baseline algorithms using Mean and Synthetic predictions.
  • Efficiency in Practice: In experiments on the CitiBike data, AdaptiveQuery-8 (querying just 8 pages per miss) matched or outperformed prior algorithms (like LVMarker and RohatgiMarker) that required predictions for every page.
  • Sublinear Queries: For a typical run, the algorithm achieved high performance while querying predictions for only about 11% of the total requests in the sequence.
  • Resilience to Noise: When prediction error was high, the "parsimonious" approach was actually more robust than algorithms that followed predictions blindly. Sampling limits the algorithm's exposure to "bad advice" from the ML model.
  • Theoretical Optimality: The authors also provide a lower bound showing that their trade-off between the number of queries and the competitive ratio is nearly optimal.

Limitations and Future Work

While highly effective, the current framework focuses exclusively on unweighted caching (where every page miss costs exactly "1"). In many real-world systems, different pages have different retrieval costs (weighted caching), which introduces significant complexity when queries are limited. Additionally, the model assumes the algorithm can pick any $b$ pages to query with equal cost, whereas in some systems, querying pages that are "near" each other in memory might be cheaper.

Looking forward, the authors suggest this "parsimonious" framework could be applied to other online problems—such as metric task systems or online matching—where predictions of future locations or costs are currently assumed to be free.

Summary updated

BibTeX
@inproceedings{im2022parsimonious,
  author = {Sungjin Im and Ravi Kumar and Aditya Petety and Manish Purohit},
  title = {{Parsimonious Learning-Augmented Caching}},
  booktitle = {International Conference on Machine Learning},
  year = {2022},
  url = {https://openreview.net/forum?id=m7Qy8fBsvDx},
}
Figure