[Paper Review] A Learned Index for Exact Similarity Search in Metric Spaces
This paper proposes LIMS, a learned index for exact similarity search in metric spaces that uses data clustering and pivot-based transformation to organize data into uniformly distributed clusters with total ordering. By training machine learning models to predict data record positions, LIMS achieves faster query processing with lower index size and better scalability than traditional and state-of-the-art learned indexes, especially under high-dimensional and dynamic workloads.
Indexing is an effective way to support efficient query processing in large databases. Recently the concept of learned index, which replaces or complements traditional index structures with machine learning models, has been actively explored to reduce storage and search costs. However, accurate and efficient similarity query processing in high-dimensional metric spaces remains to be an open challenge. In this paper, we propose a novel indexing approach called LIMS that uses data clustering, pivot-based data transformation techniques and learned indexes to support efficient similarity query processing in metric spaces. In LIMS, the underlying data is partitioned into clusters such that each cluster follows a relatively uniform data distribution. Data redistribution is achieved by utilizing a small number of pivots for each cluster. Similar data are mapped into compact regions and the mapped values are totally ordinal. Machine learning models are developed to approximate the position of each data record on disk. Efficient algorithms are designed for processing range queries and nearest neighbor queries based on LIMS, and for index maintenance with dynamic updates. Extensive experiments on real-world and synthetic datasets demonstrate the superiority of LIMS compared with traditional indexes and state-of-the-art learned indexes.
Motivation & Objective
- To address the limitations of existing learned indexes in high-dimensional metric spaces, including lack of support for exact similarity search and performance degradation due to the curse of dimensionality.
- To design a disk-based learned index structure that supports exact point, range, and k-NN queries in metric spaces without relying on coordinate-based partitioning.
- To reduce storage overhead and improve query efficiency by leveraging data clustering, pivot-based transformation, and learned models for position prediction.
- To enable efficient index maintenance under dynamic updates through incremental retraining and partial rebuilds.
- To achieve high performance and scalability while maintaining exactness, avoiding false negatives common in approximate learned indexes.
Proposed method
- LIMS partitions metric space data into clusters using distance-based clustering to ensure uniform data distribution within each cluster.
- For each cluster, a small set of pivots is selected, and data objects are transformed into distance vectors from these pivots, reducing dimensionality to the number of pivots.
- The pivot-based transformation maps similar data into compact, ordered regions, enabling total ordering of data records for efficient lookup.
- Machine learning models (rank prediction models) are trained to predict the relative position of each data record on disk, allowing O(1) function-based lookups instead of tree traversals.
- Range and k-NN queries are processed using exponential search on the learned model outputs, minimizing distance computations and I/O operations.
- Index maintenance is supported via incremental retraining of models for affected clusters after insertions, with average retraining time of 0.5 seconds per cluster.
Experimental results
Research questions
- RQ1Can a learned index be effectively designed for exact similarity search in metric spaces, where no coordinate structure or dimensionality exists?
- RQ2How can pivot-based data transformation and clustering mitigate the curse of dimensionality in learned indexing for high-dimensional metric spaces?
- RQ3To what extent can learned models reduce I/O and CPU costs in similarity query processing compared to B+ -trees and traditional indexes?
- RQ4How does LIMS maintain performance under dynamic data updates, and what is the cost of incremental index maintenance?
- RQ5Can the learned model-based approach achieve both high accuracy and low storage overhead in metric spaces?
Key findings
- LIMS achieves up to 3.4× faster query performance than the second-best index (28.05ms vs. 94.68ms) even after 40K insertions into a 10M-object dataset, with slow and steady performance degradation.
- LIMS reduces index size to 1/3 that of R*-tree on GaussMix and 1/23 that of ML on Signature, demonstrating significant storage efficiency.
- The learned model-based lookup in LIMS reduces CPU time by avoiding O(log n) tree traversals, achieving O(1) function invocation per query, with performance advantage growing with data size.
- Retraining a single cluster takes only 0.5 seconds on average, enabling efficient dynamic maintenance with minimal overhead.
- LIMS outperforms N-LIMS (which uses B+ -trees instead of learned models) in both CPU time and total query time, confirming the effectiveness of machine learning in position prediction.
- LIMS maintains exactness with no false negatives, unlike approximate learned indexes, while achieving superior speed and storage efficiency.
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.