M-tree: An Efficient Access Method for Similarity Search in Metric Spaces
Paolo CiacciaMarco PatellaPavel Zezula
Presents the M-tree, a dynamic and balanced indexing structure designed for metric spaces that optimizes both disk I/O and distance computations during range and k-nearest neighbor similarity searches.
Modern database systems increasingly manage complex multimedia formats, such as audio, images, video, and text sequences, that require similarity search based on intricate distance functions. Existing spatial access methods rely heavily on vector representations and standard coordinate metrics, failing when features cannot be mapped to vector spaces or when distance evaluations are computationally expensive. Conversely, traditional metric trees handle general distance metrics but remain static, requiring costly periodic reorganizations and ignoring disk access costs. The article introduces and evaluates the M-tree, a dynamic, balanced access method designed to support similarity search across generic metric spaces while optimizing both computational distance operations and disk input-output costs.
To evaluate the system, the authors implemented the M-tree within the Generalized Search Tree framework and conducted extensive experiments on synthetic clustered datasets ranging up to fifty dimensions and up to 100,000 objects. They evaluated range and nearest neighbor search algorithms, tested various node-split strategies, and benchmarked performance against standard R*-trees.
Key findings show that the M-tree scales logarithmically during similarity searches as datasets grow from 10,000 to 100,000 objects, maintaining balance dynamically without structural degradation. In contrast to balanced node partitioning, unbalanced generalized hyperplane partitioning produced significantly smaller tree volumes and reduced processing costs, avoiding volume inflation of up to 4.6 times seen in low dimensions. Implementing triangle inequality pruning optimizations saved up to 40% of distance computations during range and nearest neighbor queries. Non-confirmed split policies, which re-evaluate parent routing objects during node splits, outperformed confirmed policies by saving up to 25% of disk reads in high dimensions. Finally, comparative evaluations demonstrated that the M-tree achieved lower disk access costs and fewer distance computations than the established R*-tree, even in traditional vector environments.
These results establish that multimedia databases can support fast similarity searching without sacrificing dynamic insertions or database scalability. System architects can select node-split policies based on specific workload constraints, trading off build-time computational complexity for runtime query speed. For high-capacity nodes and computationally expensive distance functions, sophisticated split policies minimize query overhead, whereas cheaper random or sampling policies minimize initial construction costs.
Organizations developing multimedia retrieval platforms should adopt the M-tree framework to enable dynamic indexing of non-vector data. Future implementations should explore variable-size node designs, load parallelization across processors and storage, and testing on real-world applications such as protein matching and biometric identification. While findings demonstrate high confidence under the evaluated synthetic distributions, practitioners should note that node size was held constant at 4 kilobytes and real-world performance will depend on the computational intensity and overlap characteristics of domain-specific distance metrics.
- Paper: R-trees: a dynamic index structure for spatial searching, Antonin Guttman (1984). Introduces the foundational dynamic, height-balanced spatial index tree that M-tree directly adapts and generalizes to non-vector metric spaces.
- Paper: The R*-tree: an efficient and robust access method for points and rectangles, Norbert Beckmann et al. (1990). Provides key principles of dynamic node splitting and overflow management that inspired the balancing heuristics in M-tree.
- Paper: Comparing Images Using the Hausdorff Distance, Daniel P. Huttenlocher et al. (1993). Presents a classic complex metric space distance function that motivates the need for general metric indexing structures like the M-tree.
- Paper: Similarity Search in High Dimensions via Hashing, A. Gionis et al. (1999). Introduces locality-sensitive hashing to overcome performance limitations and the curse of dimensionality inherent in tree-based high-dimensional similarity search.
- Paper: Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs, Yu. A. Malkov et al. (2016). Advances metric and high-dimensional nearest neighbor search beyond tree structures using hierarchical navigable small-world graphs for scalable approximate queries.
- Paper: The Earth Mover's Distance as a Metric for Image Retrieval, YOSSI RUBNER et al. (2000). Formulates the Earth Mover's Distance for image retrieval, providing a prominent non-vector metric space application directly suited for metric indexing structures.
- Paper: DiskANN: Fast Accurate Billion-point Nearest Neighbor Search on a Single Node, Suhas Jayaram Subramanya et al. (2019). Extends scalable disk-resident nearest neighbor indexing architectures to billion-scale datasets using graph-based representations.
- Paper: Efficient algorithms for mining outliers from large data sets, S. Ramaswamy et al. (2000). Applies multi-dimensional and metric nearest-neighbor search mechanisms to the problem of scalable distance-based outlier detection.
