OneBatchPAM: A Fast and Frugal K-Medoids Algorithm

Antoine de Mathelin, Nicolas Enrique Cecchi, François Deheeger, Mathilde Mougeot, Nicolas Vayatis
1/31/2025
cs.LG

No official code found. Best implementation: antoinedemathelin/obpam (0 stars, last commit 2025-08-05).

Abstract

This paper proposes a novel k-medoids approximation algorithm to handle large-scale datasets with reasonable computational time and memory complexity. We develop a local-search algorithm that iteratively improves the medoid selection based on the estimation of the k-medoids objective. A single batch of size m << n provides the estimation, which reduces the required memory size and the number of pairwise dissimilarities computations to O(mn), instead of O(n^2) compared to most k-medoids baselines. We obtain theoretical results highlighting that a batch of size m = O(log(n)) is sufficient to guarantee, with strong probability, the same performance as the original local-search algorithm. Multiple experiments conducted on real datasets of various sizes and dimensions show that our algorithm provides similar performances as state-of-the-art methods such as FasterPAM and BanditPAM++ with a drastically reduced running time.

View on arXivView PDF

Code Implementations(1)

onebatchpam

00Cython, PythonJan 16, 20251 years ago

Similar Papers

Cite this paper

@article{mathelin2025onebatchpam,
  title  = {OneBatchPAM: A Fast and Frugal K-Medoids Algorithm},
  author = {Antoine de Mathelin and Nicolas Enrique Cecchi and François Deheeger and Mathilde Mougeot and Nicolas Vayatis},
  year   = {2025},
  eprint = {2501.19285},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.19285v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2501.19285.svg)](https://codeofpaper.com/paper/2501.19285)

Discussion