Abstract
The online caching problem aims to minimize cache misses when serving a sequence of requests under a limited cache size. While naive learning-augmented caching algorithms achieve ideal $1$-consistency, they lack robustness guarantees. Existing robustification methods either sacrifice $1$-consistency or introduce excessive computational overhead. In this paper, we introduce Guard, a lightweight robustification framework that enhances the robustness of a broad class of learning-augmented caching algorithms to $2H_{k-1} + 2$, while preserving their $1$-consistency. Guard achieves the current best-known trade-off between consistency and robustness, with only O(1) additional per-request overhead, thereby maintaining the original time complexity of the base algorithm. Extensive experiments across multiple real-world datasets and prediction models validate the effectiveness of Guard in practice.
Introduction
Online caching is a fundamental problem in computer science, where the goal is to manage a small, fast memory (the cache) to minimize misses when serving a sequence of data requests. Traditional algorithms like Least Recently Used (LRU) offer safety but often fall short of optimal performance. Recently, the field has shifted toward "learning-augmented" algorithms that leverage machine learning (ML) to predict future request patterns.
These algorithms are evaluated on two primary axes: Consistency (performance with perfect predictions) and Robustness (performance with adversarial or incorrect predictions). Ideally, an algorithm should be "1-consistent," matching the theoretical optimal offline algorithm when predictions are accurate. However, naive ML-based policies often have unbounded robustness—a single bad prediction can lead to catastrophic performance. Existing attempts to robustify these policies often degrade consistency or introduce significant computational latency. This paper introduces GUARD, a framework that provides strong robustness guarantees while maintaining perfect 1-consistency and minimal overhead.
The GUARD Framework
GUARD is designed as a lightweight wrapper that can be applied to any 1-consistent learning-augmented caching algorithm. Unlike previous methods that rely on expensive real-time re-computations, GUARD utilizes a phase-based mechanism to detect prediction errors efficiently.
Phase-Based Error Detection
GUARD divides the request sequence into phases. At the start of each phase, all pages currently in the cache are marked as "old." The framework monitors for a specific logical contradiction: if a cache miss occurs for a page that was already evicted during the current phase, GUARD identifies a prediction error. This is based on the insight that an optimal algorithm would never evict a page it needs again within the same phase while still holding onto unrequested "old" pages.
Intervention and Protection
When an error is detected, GUARD overrides the base ML algorithm. It evicts a random unrequested "old" page instead of following the ML suggestion and "guards" the newly requested page, preventing its eviction until the next phase. This selective protection ensures that the algorithm remains robust against hallucinations without prematurely protecting pages in a way that would ruin 1-consistency.
Theoretical Guarantees and Complexity
GUARD achieves a robustness bound of $2H_{k-1} + 2$, where $H_k$ is the $k$-th harmonic number. This scales logarithmically with the cache size $k$, providing a significant safety net compared to unbounded naive models. Crucially, GUARD maintains the $O(1)$ per-request overhead, ensuring that the total time complexity of the augmented algorithm remains identical to its base version.
As shown in the table above, GUARD can be applied to various base algorithms like BLINDORACLE, LRB, and PARROT, consistently providing the same robustness and consistency guarantees while preserving the underlying time complexity.
Empirical Evaluation
The authors evaluated GUARD across several real-world datasets, including BrightKite, Citi, and 13 SPEC CPU2006 memory traces. To facilitate future research, they also introduced Cache-Coliseum, an open-source benchmark framework.
In practical tests using the PLECO predictor on SPEC CPU2006 traces, GUARD&BLINDORACLE achieved a cost ratio of 1.226, significantly outperforming standard LRU (1.478). The experiments confirmed that GUARD effectively bridges the gap between theoretical safety and practical performance, outperforming other robustification methods that either sacrifice peak performance or suffer from high computational costs.
Conclusion
GUARD represents a significant step forward in learning-augmented caching. By decoupling safety from computational complexity, it allows system designers to deploy powerful ML models with the confidence that performance will never degrade beyond a logarithmic factor of the optimal, even if the model fails. Future work will explore closing the small remaining gap to the theoretical lower bound of $H_k$ and extending the framework to more complex caching models, such as those with variable page sizes or weighted costs.
Summary updated