Robust Learning-Augmented Dictionaries

Ali Zeynali, Shahin Kamali, Mohammad Hajiesmaili

Abstract

This paper introduces RobustSL, a novel data structure that integrates machine learning predictions into the classic dictionary problem. By augmenting a skip list with frequency predictions, RobustSL achieves "static optimality" when predictions are accurate while maintaining a strict logarithmic guarantee when predictions fail. This approach resolves a critical vulnerability in existing learned data structures, which can degrade to linear-time performance under inaccurate or adversarial predictions.

Introduction

In computer science, dictionaries are fundamental data structures for searching, inserting, and deleting items. While standard structures like Skip Lists provide reliable $O(\log n)$ performance, they do not adapt to specific access patterns. Recent research into "learning-augmented" data structures attempts to use machine learning to predict frequently accessed items and place them for faster retrieval. However, many such structures, like learned treaps, are brittle; poor predictions can lead to catastrophic performance degradation ($O(n)$). RobustSL is designed to provide the benefits of ML-driven speed without sacrificing worst-case safety.

Methodology: The Robust Skip List

The authors utilize the Skip List as a foundation, introducing a hybrid replication process for each item. This process consists of two primary components:

  1. Deterministic Classification: Items are categorized into classes based on their predicted access frequency. Each class is assigned a "class-base"—a guaranteed minimum number of layers the item will occupy in the skip list. This ensures that high-frequency items remain near the top for rapid access.
  2. Stochastic Augmentation: Beyond the deterministic base, a randomized number of layers is added following a geometric distribution, consistent with standard skip list logic.
Figure 1: Visualization of the deterministic classification mechanism in RobustSL. Items are assigned to different 'class-bases' based on predicted frequency, ensuring a minimum height in the skip list structure.

This dual approach provides consistency (performance proportional to prediction accuracy) and robustness (a safety net against poor predictions).

Experimental Evaluation

The performance of RobustSL was evaluated using synthetic Zipfian distributions, real-world BBC News article data, and adversarial setups designed to simulate worst-case prediction errors.

Key Results

  • Consistency: With perfect predictions, RobustSL achieves static optimality, performing comparably to state-of-the-art learned structures. Its cost is mathematically proven to be proportional to the Shannon Entropy ($H(f)$) of the access sequence.
  • Robustness: In adversarial tests where predictions were intentionally swapped, existing learned treaps became up to 404.7x slower than RobustSL. While other structures collapsed into linear search times, RobustSL maintained efficient $O(\log n)$ performance.
  • Update Efficiency: The structure supports dynamic updates (insertions and deletions) with an amortized cost of $O(\log n)$.

Conclusion

RobustSL demonstrates that it is possible to decouple performance gains from prediction accuracy. By mixing deterministic ML-driven placement with classic randomized logic, the structure remains "smart" when predictions are reliable and "safe" when they are not. Future work may explore temporal locality (recency-based optimization) and the application of these principles to Binary Search Trees.

Summary updated

BibTeX
@inproceedings{zeynali2024robust,
  author = {Ali Zeynali and Shahin Kamali and Mohammad Hajiesmaili},
  title = {{Robust Learning-Augmented Dictionaries}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=XyhgssAo5b},
}
Figure