Parallel D2-Clustering: Large-Scale Clustering of Discrete Distributions

Yu Zhang, James Z. Wang, Jia Li · DOI

Abstract

The discrete distribution clustering algorithm, namely D2-clustering, has demonstrated its usefulness in image classification and annotation where each object is represented by a bag of weighed vectors. The high computational complexity of the algorithm, however, limits its applications to large-scale problems. We present a parallel D2-clustering algorithm with substantially improved scalability. A hierarchical structure for parallel computing is devised to achieve a balance between the individual-node computation and the integration process of the algorithm. Additionally, it is shown that even with a single CPU, the hierarchical structure results in significant speed-up. Experiments on real-world large-scale image data, Youtube video data, and protein sequence data demonstrate the efficiency and wide applicability of the parallel D2-clustering algorithm. The loss in clustering accuracy is minor in comparison with the original sequential algorithm.

Introduction

Standard clustering algorithms like K-means typically operate in Euclidean space, assuming data points are simple vectors. However, in complex domains such as image retrieval, video analysis, or bioinformatics, objects are often better described as discrete distributions. For instance, an image can be represented as a collection of distinct color and texture regions, each assigned a specific weight.

To cluster these distributions, researchers employ D2-clustering, which utilizes the Mallows distance (also known as the Earth Mover’s Distance or EMD). While highly accurate, D2-clustering is computationally intensive because updating a cluster centroid requires solving a large-scale linear programming (LP) problem. As the number of objects in a cluster increases, the complexity of the LP grows polynomially, rendering the algorithm impractical for "Big Data" applications.

Methodology: Parallel Hierarchical Framework

To overcome these limitations, we propose a parallel, hierarchical version of the D2-clustering algorithm. This approach replaces a single, massive LP bottleneck with a recursive "divide-and-conquer" structure, shifting computational complexity from polynomial to linearithmic ($O(N \log N)$).

Hierarchical Structure

The dataset is partitioned into small, manageable segments. Instead of clustering the entire dataset simultaneously, the algorithm clusters each segment in parallel across multiple "slave" processors. The resulting centroids are then propagated up the hierarchy.

Hierarchical structure of the parallel D2-clustering algorithm across three levels.

Crucially, these centroids are treated as new data points for the next level, but they are weighted based on the number of original objects they represent. This "centroids as data" approach allows the algorithm to summarize information effectively as it moves up the tree.

Master-Slave Architecture

The implementation follows a master-slave model to coordinate the parallel tasks:

  1. Step 1 (Segmentation): The master processor segments the data and distributes it to slave processors.
  2. Step 2 (Local Clustering): Slave processors perform intensive D2-clustering on their assigned data chunks and send results back.
  3. Step 3 (Integration): The master updates global labels and centroids, determining whether to iterate or terminate.
The three-step parallel processing workflow involving a master and multiple slave nodes.

By maintaining a constant segment size ($\tau$), the individual LP problems remain small, ensuring the overall time complexity remains manageable.

Experimental Evaluation

The algorithm was evaluated across four diverse domains to test its versatility and efficiency:

  • Flickr Images: Used for comparing sequential and parallel versions, including a visualization of 1,488 "mountain" images.
  • YouTube Videos: 450 videos across 6 genres, represented by bags of visual features.
  • SwissProt Protein Sequences: 1,500 sequences represented by amino acid frequency histograms.
  • Synthetic Data: Used to verify the algorithm's ability to recover ground-truth clusters.

Key Results and Insights

  • Massive Speedup: In a test with 6,400 images, the parallel algorithm using 16 slave CPUs completed in 88 minutes. The original sequential algorithm was so slow it required nearly 8 hours just to process 200 images.
  • Hierarchical Efficiency: Surprisingly, the hierarchical structure provides significant speedup even on a single CPU. Breaking one large LP problem into many small ones reduces total computation time because the polynomial cost of LP is much higher on large inputs than the sum of costs on many small inputs.
  • Scalability and Accuracy: The algorithm scales almost linearly with dataset size. While there is a minor trade-off in cluster "tightness" compared to the global sequential version, the loss in accuracy is negligible. In terms of the Davies-Bouldin Index, Parallel D2-clustering significantly outperformed standard K-means.

Conclusion

Parallel D2-clustering enables the clustering of thousands of complex discrete distributions in minutes rather than days. By leveraging a hierarchical structure and weighted centroids, the algorithm achieves a dramatic reduction in complexity without sacrificing significant accuracy. This framework opens new possibilities for large-scale unsupervised learning in fields ranging from multimedia retrieval to bioinformatics.

Summary updated

Abstract

The discrete distribution clustering algorithm, namely D2-clustering, has demonstrated its usefulness in image classification and annotation where each object is represented by a bag of weighed vectors. The high computational complexity of the algorithm, however, limits its applications to large-scale problems. We present a parallel D2-clustering algorithm with substantially improved scalability. A hierarchical structure for parallel computing is devised to achieve a balance between the individual-node computation and the integration process of the algorithm. Additionally, it is shown that even with a single CPU, the hierarchical structure results in significant speed-up. Experiments on real-world large-scale image data, Youtube video data, and protein sequence data demonstrate the efficiency and wide applicability of the parallel D2-clustering algorithm. The loss in clustering accuracy is minor in comparison with the original sequential algorithm.
BibTeX
@misc{zhang2013parallel,
  author = {Yu Zhang and James Z. Wang and Jia Li},
  title = {{Parallel D2-Clustering: Large-Scale Clustering of Discrete Distributions}},
  year = {2013},
  eprint = {1302.0435},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1302.0435},
}
Figure