Contraction Clustering (RASTER): A Very Fast Big Data Algorithm for Sequential and Parallel Density-Based Clustering in Linear Time, Constant Memory, and a Single Pass
Gregor Ulm, Simon Smith, Adrian Nilsson, Emil Gustavsson, Mats Jirstrand
TL;DR
RASTER introduces a grid-based, density-based clustering framework designed for big data, achieving $O(n)$ time and constant memory for a fixed grid by projecting points onto tiles and clustering significant tiles. It addresses hub identification in GPS-like data and provides a parallel variant (P-RASTER) and an input-retaining variant (RASTER$'$). The work offers formal complexity analysis, extensive experiments against standard clustering methods, and demonstrates strong single-threaded and multicore performance, including near-linear scaling on multicore CPUs. Overall, RASTER provides a practical, scalable solution for fast density-based clustering suitable for terabytes-scale data and hub-detection tasks.
Abstract
Clustering is an essential data mining tool for analyzing and grouping similar objects. In big data applications, however, many clustering algorithms are infeasible due to their high memory requirements and/or unfavorable runtime complexity. In contrast, Contraction Clustering (RASTER) is a single-pass algorithm for identifying density-based clusters with linear time complexity. Due to its favorable runtime and the fact that its memory requirements are constant, this algorithm is highly suitable for big data applications where the amount of data to be processed is huge. It consists of two steps: (1) a contraction step which projects objects onto tiles and (2) an agglomeration step which groups tiles into clusters. This algorithm is extremely fast in both sequential and parallel execution. Our quantitative evaluation shows that a sequential implementation of RASTER performs significantly better than various standard clustering algorithms. Furthermore, the parallel speedup is significant: on a contemporary workstation, an implementation in Rust processes a batch of 500 million points with 1 million clusters in less than 50 seconds on one core. With 8 cores, the algorithm is about four times faster.
