[Paper Review] RadixSpline: A Single-Pass Learned Index
RadixSpline (RS) is a single-pass learned index that builds efficiently in one pass over sorted data using a two-stage approach: fitting linear splines to the cumulative distribution function (CDF) with bounded error and using a radix table for fast lookup routing. It achieves competitive size and lookup performance versus state-of-the-art learned indexes like RMI, with only two tunable hyperparameters and minimal implementation complexity.
Recent research has shown that learned models can outperform state-of-the-art index structures in size and lookup performance. While this is a very promising result, existing learned structures are often cumbersome to implement and are slow to build. In fact, most approaches that we are aware of require multiple training passes over the data. We introduce RadixSpline (RS), a learned index that can be built in a single pass over the data and is competitive with state-of-the-art learned index models, like RMI, in size and lookup performance. We evaluate RS using the SOSD benchmark and show that it achieves competitive results on all datasets, despite the fact that it only has two parameters.
Motivation & Objective
- To design a learned index structure that can be built in a single pass over sorted data, overcoming the multi-pass training bottleneck of existing learned indexes.
- To support efficient equality and range queries (e.g., lower-bound lookups) with minimal memory footprint and low latency.
- To simplify hyperparameter tuning by reducing the number of parameters to just two: spline error and radix table size.
- To evaluate applicability in real-world systems, particularly LSM-trees, where index rebuilds occur during merge operations.
Proposed method
- Fit a piecewise linear spline to the CDF of sorted data, ensuring maximum error per segment is bounded by a user-defined spline error parameter.
- Construct a flat radix table using the most significant bits (e.g., 20 bits) of the key, excluding common prefix bits, to enable fast routing to the relevant spline segment.
- Perform both spline fitting and radix table construction in a single pass over the sorted data, enabling constant-time work per element.
- Use binary search within the selected spline segment to locate the exact key, minimizing lookup latency.
- Use a stride-based indexing strategy (e.g., every 32nd key) for comparison with traditional B+tree and ART indexes.
- Evaluate performance using the SOSD benchmark with real-world datasets, measuring build time, lookup latency, and index size.
Experimental results
Research questions
- RQ1Can a learned index be constructed in a single pass over sorted data while maintaining competitive size and lookup performance?
- RQ2How does the performance of a single-pass learned index compare to multi-pass learned indexes like RMI in terms of index size and query latency?
- RQ3To what extent can the two hyperparameters (spline error and radix size) be used to tune the trade-off between memory usage and lookup speed?
- RQ4Can RadixSpline be effectively integrated into LSM-tree architectures to improve read performance with minimal write overhead?
- RQ5How does RadixSpline perform under data skew or outlier-heavy distributions compared to other learned index structures?
Key findings
- RadixSpline achieves lookup latency competitive with state-of-the-art RMI models, with average latencies below 800ns across all datasets.
- The index size of RadixSpline is approximately 6.6% of the uncompressed key size (100 MiB for 200M 64-bit keys), comparable to RMI and significantly smaller than traditional indexes.
- Build time for RadixSpline is nearly as fast as ART and B+tree, and substantially faster than RMI, which requires multiple training passes.
- In an LSM-tree experiment with RocksDB, replacing the B+tree with RadixSpline reduced average read time by over 20% and total execution time from 712s to 521s, with 45% less memory usage.
- By tuning the spline error from 2 to 16 and radix bits from 25 to 20, RadixSpline reduced memory usage by 99.9% (from ~650 MiB to ~200 MiB) with only a 11.5% performance degradation on the face dataset.
- The single-pass construction enables efficient integration into LSM-tree merge processes, where rebuilds are already performed and latency overhead is negligible.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.