[Paper Review] Medoids in almost linear time via multi-armed bandits
This paper proposes Med-dit, a novel algorithm that computes the exact medoid of high-dimensional datasets in O(n log n) distance evaluations using a multi-armed bandit framework. By treating each point as an arm and adaptively sampling distances based on confidence intervals, Med-dit achieves up to 10x faster performance than state-of-the-art methods like RAND and TOPRANK on large-scale datasets such as single-cell RNA-Seq and Netflix, without requiring distance symmetry or triangle inequality.
Computing the medoid of a large number of points in high-dimensional space is an increasingly common operation in many data science problems. We present an algorithm Med-dit which uses O(n log n) distance evaluations to compute the medoid with high probability. Med-dit is based on a connection with the multi-armed bandit problem. We evaluate the performance of Med-dit empirically on the Netflix-prize and the single-cell RNA-Seq datasets, containing hundreds of thousands of points living in tens of thousands of dimensions, and observe a 5-10x improvement in performance over the current state of the art. Med-dit is available at https://github.com/bagavi/Meddit
Motivation & Objective
- To address the computational infeasibility of exact medoid computation in high-dimensional datasets with hundreds of thousands of points.
- To develop a method that finds the exact medoid with high probability using significantly fewer distance evaluations than naive or sampling-based approaches.
- To design an algorithm that is robust to arbitrary distance measures, including non-symmetric or non-triangle-inequality-satisfying metrics.
- To achieve near-linear time complexity independent of dimensionality, making it scalable to high-dimensional data such as gene expression or recommendation systems.
- To provide a practical, efficient alternative to existing methods like trimed and TOPRANK, especially in high-dimensional settings where they become infeasible.
Proposed method
- Med-dit models the medoid problem as a multi-armed bandit (MAB) problem, where each data point is an arm with an unknown mean distance to all others.
- It uses upper and lower confidence bounds (UCB) to dynamically maintain a set of candidate points under consideration, pruning those whose confidence intervals cannot yield the medoid.
- The algorithm adaptively samples distances for points whose lower confidence bound is below the smallest upper confidence bound among all points, ensuring efficient exploration.
- It stops when the confidence intervals of all but one point exclude the true medoid, guaranteeing high-probability correctness.
- The theoretical analysis assumes sub-Gaussianity of distance estimates, justified by the central limit theorem in high dimensions.
- The method is agnostic to distance metric properties, requiring no symmetry or triangle inequality.
Experimental results
Research questions
- RQ1Can the medoid computation problem be reformulated as a multi-armed bandit problem to enable efficient, adaptive sampling?
- RQ2Does a bandit-based approach achieve O(n log n) distance evaluations for exact medoid computation under realistic data assumptions?
- RQ3How does Med-dit's performance scale with dimensionality compared to existing methods like trimed and TOPRANK?
- RQ4To what extent does the algorithm reduce distance evaluations on real-world high-dimensional datasets such as single-cell RNA-Seq?
- RQ5Can the algorithm be tuned to balance speed and accuracy via confidence level δ without sacrificing correctness?
Key findings
- Med-dit achieves O(n log n) distance evaluations to compute the exact medoid with high probability, significantly improving upon the O(n log n / ε) complexity of RAND.
- On the 109,140-cell single-cell RNA-Seq dataset, Med-dit evaluates approximately 10 times fewer distances than RAND to achieve comparable performance.
- In high-dimensional settings (e.g., MNIST with 784 dimensions), Med-dit outperforms trimed, which suffers from exponential dependence on dimensionality.
- Empirically, Med-dit uses only 80 average distance evaluations per point over 1,000 trials, significantly fewer than the theoretical 266 estimate, indicating strong practical efficiency.
- The algorithm correctly identifies the medoid with 99.99% confidence, and in 9 out of 150 top candidates, it computes the mean distance to all other points exactly.
- The confidence intervals of the medoid’s mean distance lie strictly below those of all other points, ensuring correctness at termination.
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.