Skip to main content
QUICK REVIEW

[Paper Review] A Sub-Quadratic Exact Medoid Algorithm

James Newling, François Fleuret|arXiv (Cornell University)|May 23, 2016
Data Management and AlgorithmsComputer Science16 references5 citations
TL;DR

This paper introduces trimed, a novel exact medoid algorithm with expected $O(N^{3/2})$ time complexity in $ dd$ under certain assumptions, making it the first sub-quadratic exact medoid algorithm for $d > 1$. It leverages the triangle inequality to eliminate non-medoid candidates efficiently, significantly reducing distance computations—often by two orders of magnitude—compared to state-of-the-art approximate methods, while enabling accelerated $K$-medoids clustering with minimal loss in cluster quality.

ABSTRACT

We present a new algorithm, trimed, for obtaining the medoid of a set, that is the element of the set which minimises the mean distance to all other elements. The algorithm is shown to have, under certain assumptions, expected run time O(N^(3/2)) in R^d where N is the set size, making it the first sub-quadratic exact medoid algorithm for d>1. Experiments show that it performs very well on spatial network data, frequently requiring two orders of magnitude fewer distance calculations than state-of-the-art approximate algorithms. As an application, we show how trimed can be used as a component in an accelerated K-medoids algorithm, and then how it can be relaxed to obtain further computational gains with only a minor loss in cluster quality.

Motivation & Objective

  • To develop an exact medoid algorithm with sub-quadratic time complexity for $d > 1$, overcoming the $\Theta(N^2)$ bottleneck of existing methods.
  • To enable significant reductions in distance computations for medoid computation in spatial and low-dimensional data.
  • To integrate the new algorithm into $K$-medoids clustering to accelerate convergence while preserving cluster quality.
  • To analyze the conditions under which the algorithm's theoretical complexity holds and its performance in high-dimensional settings.

Proposed method

  • The algorithm uses the triangle inequality to define exclusion balls around candidate elements, eliminating those that cannot be the medoid based on energy bounds.
  • It employs a randomized sampling strategy to compute energies only for candidates outside exclusion zones, dynamically expanding the exclusion region as new energies are computed.
  • Theoretical analysis shows that, under assumptions on the distribution of points and energy density, only $O(N^{1/2})$ elements remain uneliminated, leading to $O(N^{3/2})$ expected runtime.
  • The method relies on the assumption that the energy distribution around the medoid has a vanishing density at the median, which holds for $d \geq 2$ in $\mathbb{R}^d$.
  • The algorithm is integrated into the $K$-medoids Voronoi iteration (KMEDS) framework, replacing the quadratic medoid computation with trimed to break the $O(N^2)$ per-cluster dependency.
  • A relaxation of trimed is proposed to further accelerate $K$-medoids with only a minor degradation in cluster quality.

Experimental results

Research questions

  • RQ1Can an exact medoid algorithm achieve sub-quadratic expected time complexity in $\mathbb{R}^d$ for $d > 1$?
  • RQ2How effective is the triangle inequality-based elimination strategy in reducing the number of distance computations?
  • RQ3What are the conditions under which the $O(N^{3/2})$ complexity bound holds, and how do they relate to data dimensionality?
  • RQ4To what extent can trimed accelerate $K$-medoids clustering while maintaining cluster quality?
  • RQ5How does trimed compare in practice to approximate algorithms like TOPRANK in terms of distance computation and accuracy?

Key findings

  • trimed achieves an expected runtime of $O(N^{3/2})$ in $\mathbb{R}^d$ under assumptions on energy density and point distribution, marking the first sub-quadratic exact medoid algorithm for $d > 1$.
  • Experiments show trimed reduces distance computations by up to two orders of magnitude compared to state-of-the-art approximate algorithms like TOPRANK on spatial and low-dimensional data.
  • The algorithm performs particularly well on spatial network data, such as road and rail networks, where geometric structure enhances elimination efficiency.
  • When integrated into $K$-medoids (KMEDS), trimed breaks the $O(N^2)$ per-cluster complexity, significantly accelerating convergence.
  • A relaxed version of trimed enables further computational gains with only a minor loss in cluster quality, demonstrating practical trade-offs between speed and accuracy.
  • In high dimensions ($d \gg 1$), the algorithm's performance degrades due to exponential dependence on $d$, often resulting in $O(N^2)$ distance computations, highlighting a limitation in very high-dimensional spaces.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.