no. 22 · Wednesday 25 November 2026
The Anatomy of Piecewise-Linear Learned Indexes
Abstract
Piecewise-linear approximation (PLA) learned indexes (PGM-index, FITing-Tree, RadixSpline, PLEX, PLIN) compress sorted keys into $\pm\varepsilon$ segments, yet prior theory stops at coarse $Θ(\varepsilon^2)$ single-segment bounds. At the bottom layer, optimal greedy PLA covers $κ_{\rm opt}\varepsilon^2/v_0 \approx 3.54\,\varepsilon^2/v_0$ keys per segment on independent gaps and $κ_{\rm opt}\varepsilon^2$ under any smooth density ($v_0=1$), while anchored and chord fitters retain $Θ(\varepsilon^2/v_0)$ coverage. Across recursive layers, a law-of-large-numbers heuristic–invoked to claim $O(\log\log n)$ height for the PGM-index–suggests summing $Θ(\varepsilon^2)$ gaps averages out fluctuations. We prove this fails under Endpoint Promotion (EP): stopping-time fluctuations reset relative gap variance at every depth, locking fanout at $C_\varepsilon \approx 19.861\,\varepsilon^2$, expected height at $\log n/\log C_\varepsilon + O(1)$, and lookup at $Θ(\log n)$. To break this barrier, Rank-Equispaced Promotion (RE) samples pivots at equal rank strides. Each stride sums a fixed number of base gaps, so relative variance decays across layers and cumulative coverage squares at each step. Expected height drops to $\log_2\log_\varepsilon n + O(1)$ on independent gaps and $\log_2\log_\varepsilon n + \log_2^+(\log n/\log(\varepsilon/δ)) + O(1)$ on smooth densities with curvature $δ$. A compact bucket directory routes across unaligned RE pivots with $<1$ extra comparison per layer on average, giving RE-PGM $O(\log\varepsilon \cdot \log\log_\varepsilon n)$ expected lookup in $Θ(n/\varepsilon^2)$ space and $O(n)$ build time without radix skew sensitivity. Our constants match empirical fanout within $0.3\%$ down to $\varepsilon=2$, and all core theorems are formalized in Lean 4.
- comments
- 14 pages, 4 figures, 4 tables; core theorems machine-checked in Lean 4
- fields
- Probability