Saved in:
Bibliographic Details
Main Authors: Chen, Jingbang, Cao, Xinyuan, Stepin, Alicia, Chen, Li
Format: Preprint
Published: 2022
Subjects:
Online Access:https://arxiv.org/abs/2211.09251
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866918020649058304
author Chen, Jingbang
Cao, Xinyuan
Stepin, Alicia
Chen, Li
author_facet Chen, Jingbang
Cao, Xinyuan
Stepin, Alicia
Chen, Li
contents We study learning-augmented binary search trees (BSTs) via Treaps with carefully designed priorities. The result is a simple search tree in which the depth of each item $x$ is determined by its predicted weight $w_x$. Specifically, each item $x$ is assigned a composite priority of $-\lfloor\log\log(1/w_x)\rfloor + U(0, 1)$ where $U(0, 1)$ is the uniform random variable. By choosing $w_x$ as the relative frequency of $x$, the resulting search trees achieve static optimality. This approach generalizes the recent learning-augmented BSTs [Lin-Luo-Woodruff ICML '22], which only work for Zipfian distributions, by extending them to arbitrary input distributions. Furthermore, we demonstrate that our method can be generalized to a B-Tree data structure using the B-Treap approach [Golovin ICALP '09]. Our search trees are also capable of leveraging localities in the access sequence through online self-reorganization, thereby achieving the working-set property. Additionally, they are robust to prediction errors and support dynamic operations, such as insertions, deletions, and prediction updates. We complement our analysis with an empirical study, demonstrating that our method outperforms prior work and classic data structures.
format Preprint
id arxiv_https___arxiv_org_abs_2211_09251
institution arXiv
publishDate 2022
record_format arxiv
spellingShingle On the Power of Learning-Augmented Search Trees
Chen, Jingbang
Cao, Xinyuan
Stepin, Alicia
Chen, Li
Data Structures and Algorithms
Machine Learning
We study learning-augmented binary search trees (BSTs) via Treaps with carefully designed priorities. The result is a simple search tree in which the depth of each item $x$ is determined by its predicted weight $w_x$. Specifically, each item $x$ is assigned a composite priority of $-\lfloor\log\log(1/w_x)\rfloor + U(0, 1)$ where $U(0, 1)$ is the uniform random variable. By choosing $w_x$ as the relative frequency of $x$, the resulting search trees achieve static optimality. This approach generalizes the recent learning-augmented BSTs [Lin-Luo-Woodruff ICML '22], which only work for Zipfian distributions, by extending them to arbitrary input distributions. Furthermore, we demonstrate that our method can be generalized to a B-Tree data structure using the B-Treap approach [Golovin ICALP '09]. Our search trees are also capable of leveraging localities in the access sequence through online self-reorganization, thereby achieving the working-set property. Additionally, they are robust to prediction errors and support dynamic operations, such as insertions, deletions, and prediction updates. We complement our analysis with an empirical study, demonstrating that our method outperforms prior work and classic data structures.
title On the Power of Learning-Augmented Search Trees
topic Data Structures and Algorithms
Machine Learning
url https://arxiv.org/abs/2211.09251