Abstract
A learned multi-dimensional index is a data structure that efficiently answers multi-dimensional orthogonal queries by understanding the data distribution using machine learning models. One of the existing problems is that the search performance significantly decreases when the distribution of data stored in the data structure becomes skewed due to update operations. To overcome this problem, we propose FlexFlood, a flexible variant of Flood. FlexFlood partially reconstructs the internal structure when the data distribution becomes skewed. Moreover, FlexFlood is the first learned multi-dimensional index that guarantees the time complexity of the update operation. Through experiments using both artificial and real-world data, we demonstrate that the search performance when the data distribution becomes skewed is up to 10 times faster than existing methods. We also found that partial reconstruction takes only about twice as much time as naive data updating.
Introduction
"Learned indexes" have emerged as a significant advancement in database research, leveraging machine learning models to "learn" data distributions for accelerated lookups. However, multi-dimensional learned indexes like the original "Flood" often struggle with dynamic datasets. As data is inserted or deleted, the underlying distribution shifts, causing the pre-optimized ML model to become "skewed" and inaccurate. This leads to a substantial degradation in search performance—sometimes up to 10x slower than the initial state. Furthermore, prior learned multi-dimensional indexes lacked theoretical guarantees on update time complexity.
Methods: Adaptive Re-partitioning
FlexFlood addresses these challenges through two primary innovations. First, it replaces the static sorted arrays used in Flood's grid cells with B-trees. While sorted arrays offer fast searches, they are inefficient for updates ($O(N)$); B-trees provide a more balanced approach for dynamic environments.
Second, FlexFlood introduces Adaptive Re-partitioning. The system monitors the density of its grid cells. When a cell's density exceeds a specific threshold, FlexFlood performs a local "split." Conversely, if a cell becomes too sparse, it is merged or equalized with a neighbor.
These local maintenance operations avoid the high cost of a full index rebuild. This approach allows FlexFlood to provide the first formal amortized time complexity guarantee for updates in this field: $O(D \log N)$, where $D$ is the dimensionality and $N$ is the number of points.
Experimental Evaluation
The researchers evaluated FlexFlood against classical structures (R-trees, Kd-trees) and the original Flood using three datasets: a synthetic 3D Normal Distribution, a 4D Stock Price dataset, and a 5D Open Street Map (OSM) dataset.
Key Results
FlexFlood demonstrated superior stability and performance across all scenarios. In skewed data distributions, FlexFlood maintained high search speeds while the original Flood's performance plummeted. Specifically, FlexFlood was up to 10x faster than existing methods in these scenarios.
Regarding update efficiency, FlexFlood processed queries 1.1 to 2.9 times faster than classical structures like Self-Balancing Kd-trees and R-trees. The experiments also revealed that the overhead of partial reconstruction is manageable, taking only about twice as long as a naive update.
Discussion and Future Work
A key insight from this research is that local maintenance is often "good enough" to sustain high performance without the need for frequent global model retraining. However, the results from the Open Street Map dataset serve as a reminder that learned indexes are most effective when there is a clear local structure to exploit; in highly unpredictable datasets, classical structures like R-trees remain competitive.
Future work may explore hybrid approaches that combine FlexFlood's local updates with periodic global "re-learning" to maintain optimal parameters (like the sort dimension) over long periods. Additionally, investigating performance under highly volatile, "bursty" data patterns remains an open area for research.
Summary updated