CURE: an efficient clustering algorithm for large databases

Sudipto GuhaRajeev RastogiKyuseok Shim

article1998SIGMOD3,345 citations

Proposes CURE, a hierarchical clustering algorithm that accurately discovers arbitrary-shaped clusters of varying sizes and resists outliers by representing clusters with multiple shrunk points, while leveraging random sampling and partitioning to scale efficiently to massive datasets.

Listen

CURE is a new hierarchical clustering algorithm designed to overcome the limitations of earlier methods that either assume compact spherical clusters of roughly equal size or become unreliable when outliers are present. The work was motivated by the growing volume of corporate data in retail, finance, and telecommunications, where effective grouping is needed to reveal meaningful patterns yet existing tools such as BIRCH and minimum-spanning-tree approaches fail on elongated shapes, widely varying cluster sizes, or noisy data.

The authors therefore set out to create a method that can represent clusters of arbitrary geometry, dampen outlier effects, and still run efficiently on data sets of hundreds of thousands of points. Their solution combines a novel cluster representation—multiple well-scattered points per cluster that are then shrunk toward the cluster mean—with random sampling and a two-pass partitioning scheme that reduces the input size before the final clustering step. Experiments were performed on synthetic two-dimensional data sets containing up to 500 000 points, comparing CURE against BIRCH and MST under controlled variations of cluster shape, size, and noise level.

The principal findings are that CURE recovers the intended non-spherical and unequal-sized clusters where both competing algorithms split or merge them incorrectly; that shrinking the representative points by a moderate factor (roughly 0.2–0.7) makes the method far less sensitive to outliers than the all-points approach while still capturing elongated geometry; that random samples of only 2–3 percent of the original data suffice to preserve cluster structure with high probability; and that the combination of sampling and partitioning yields execution times substantially lower than BIRCH’s pre-clustering pass while maintaining or improving cluster quality.

These results imply that organizations can now apply clustering to large, irregularly shaped data collections without first forcing the data into spherical assumptions or manually removing outliers, thereby lowering the risk of missed patterns and reducing the compute cost of exploratory analysis.

For immediate use, practitioners should draw a random sample of a few thousand points, set the shrink factor between 0.2 and 0.7, retain at least ten representative points per cluster, and apply the two-phase outlier filter before labeling the remaining disk-resident data. When the desired number of clusters is known in advance, partitioning the sample into roughly three to five parts further accelerates the run without harming quality. Additional work is warranted to test the algorithm on high-dimensional and real-world data, to refine automatic selection of the shrink factor, and to integrate incremental updates for streaming sources.

The reported evidence rests primarily on synthetic two-dimensional sets and analytic bounds that assume minimum cluster sizes; therefore users should verify behavior on their own data distributions before relying on the method for critical decisions.

Cover for CURE: an efficient clustering algorithm for large databases

Abstract

Clustering, in data mining, is useful for discovering groups and identifying interesting distributions in the underlying data. Traditional clustering algorithms either favor clusters with spherical shapes and similar sizes, or are very fragile in the presence of outliers. We propose a new clustering algorithm called CURE that is more robust to outliers, and identifies clusters having non-spherical shapes and wide variances in size. CURE achieves this by representing each cluster by a certain fixed number of points that are generated by selecting well scattered points from the cluster and then shrinking them toward the center of the cluster by a specified fraction. Having more than one representative point per cluster allows CURE to adjust well to the geometry of non-spherical shapes and the shrinking helps to dampen the effects of outliers. To handle large databases, CURE employs a combination of random sampling and partitioning. A random sample drawn from the data set is first partitioned and each partition is partially clustered. The partial clusters are then clustered in a second pass to yield the desired clusters. Our experimental results confirm that the quality of clusters produced by CURE is much better than those found by existing algorithms. Furthermore, they demonstrate that random sampling and partitioning enable CURE to not only outperform existing algorithms but also to scale well for large databases without sacrificing clustering quality.

Table of Contents

  • 1 Introduction
  • 1.1 Traditional Clustering Algorithms - Drawbacks
  • 1.2 Our Contributions
  • 2 Related Work
  • 3 Hierarchical Clustering Algorithm
  • 3.1 Intuition and Overview
  • 3.2 Clustering Algorithm
  • 3.3 Time and Space Complexity
  • 4 Enhancements for Large Data Sets
  • 4.1 Random Sampling
  • 4.2 Partitioning for Speedup
  • 4.3 Labeling Data on Disk
  • 4.4 Handling Outliers
  • 5 Experimental Results
  • 5.1 Algorithms
  • 5.2 Data sets
  • 5.3 Quality of Clustering
  • 5.4 Sensitivity to Parameters
  • 5.5 Comparison of Execution time to BIRCH
  • 5.6 Scale-up Experiments
  • 6 Concluding Remarks
  • Acknowledgments
  • References

Knowls

  1. Knowl 1 — CURE Cluster Representation and Inter-Cluster Distance Measure

    model/method

    In the CURE (Clustering Using REpresentatives) algorithm, each cluster uu is represented by a set u.repu.\text{rep} containing a constant number cc of well-scattered points that are shrunk toward the cluster centroid u.meanu.\text{mean} by a shrink factor α∈[0,1]\alpha \in [0, 1].

    Given a point pp chosen from the cluster, its shrunk representative position p′p' is computed as: p′=p+α(u.mean−p)=(1−α)p+αu.meanp' = p + \alpha (u.\text{mean} - p) = (1 - \alpha)p + \alpha u.\text{mean}

    The distance between two clusters uu and vv is defined as the minimum distance between any pair of their respective representative points: dist(u,v)=min⁡p∈u.rep,q∈v.repdist(p,q)\text{dist}(u, v) = \min_{p \in u.\text{rep}, q \in v.\text{rep}} \text{dist}(p, q) where dist(p,q)\text{dist}(p, q) is an LpL_p metric (such as Euclidean L2L_2 or Manhattan L1L_1) or a non-metric similarity measure.

    This representation bridges the gap between centroid-based clustering (which corresponds to α=1\alpha = 1, where clusters are represented by a single spherical center) and all-points / single-link clustering (which corresponds to α=0\alpha = 0 with large cc). By using multiple scattered points, CURE captures arbitrary non-spherical cluster geometries. By shrinking points toward the mean, CURE reduces the influence of isolated outliers located far from the cluster center.

  2. Knowl 2 — CURE Hierarchical Clustering Algorithm

    algorithm

    CURE performs agglomerative hierarchical clustering using a min-heap QQ and a spatial kk-d tree TT. The heap stores one entry per active cluster uu, keyed by the distance dist(u,u.closest)\text{dist}(u, u.\text{closest}), where u.closestu.\text{closest} is the active cluster nearest to uu. The kk-d tree TT indexes all representative points of all currently active clusters to enable efficient nearest-neighbor searches in multidimensional space.

    Input: Set of input points SS containing nn points in dd-dimensional space, target number of clusters kk, number of representatives cc, shrink factor α\alpha
    Output: A set of kk clusters
    T \leftarrow \text{build_kd_tree}(S)
    Q \leftarrow \text{build_heap}(S)
    while size(Q)>k\text{size}(Q) > k do
        u \leftarrow \text{extract_min}(Q)
        v←u.closestv \leftarrow u.\text{closest}
        delete(Q,v)\text{delete}(Q, v)
        w←merge(u,v)w \leftarrow \text{merge}(u, v)
        \text{delete_rep}(T, u)
        \text{delete_rep}(T, v)
        \text{insert_rep}(T, w)
        w.closest←an arbitrary cluster in Qw.\text{closest} \leftarrow \text{an arbitrary cluster in } Q
        for each x∈Qx \in Q do
            if dist(w,x)<dist(w,w.closest)\text{dist}(w, x) < \text{dist}(w, w.\text{closest}) then
                w.closest←xw.\text{closest} \leftarrow x
            end if
            if x.closest=u or x.closest=vx.\text{closest} = u \text{ or } x.\text{closest} = v then
                if dist(x,x.closest)<dist(x,w)\text{dist}(x, x.\text{closest}) < \text{dist}(x, w) then
                    x.\text{closest} \leftarrow \text{closest_cluster}(T, x, \text{dist}(x, w))
                else
                    x.closest←wx.\text{closest} \leftarrow w
                end if
                relocate(Q,x)\text{relocate}(Q, x)
            else if dist(x,x.closest)>dist(x,w)\text{dist}(x, x.\text{closest}) > \text{dist}(x, w) then
                x.closest←wx.\text{closest} \leftarrow w
                relocate(Q,x)\text{relocate}(Q, x)
            end if
        end for
        insert(Q,w)\text{insert}(Q, w)
    end while
    return QQ

    The algorithm requires O(n)O(n) space. The worst-case time complexity is O(n2log⁡n)O(n^2 \log n), which reduces to O(n2)O(n^2) for low-dimensional data (e.g., d=2d = 2).

  3. Knowl 3 — Constant-Time Representative Selection in Cluster Merging

    algorithm

    When two clusters uu and vv are merged into a new cluster w=u∪vw = u \cup v, identifying cc well-scattered points across all points of ww naively takes O(∣w∣)O(|w|) time. CURE optimizes this by selecting the cc new representatives exclusively from the 2c2c original scattered points of uu and vv (obtained by unshrinking u.repu.\text{rep} and v.repv.\text{rep} by α\alpha). This reduces the time complexity of the merge step to O(1)O(1).

    Input: Clusters uu and vv to be merged, number of representatives cc, shrink factor α\alpha
    Output: Merged cluster ww
    w←u∪vw \leftarrow u \cup v
    w.mean←∣u∣⋅u.mean+∣v∣⋅v.mean∣u∣+∣v∣w.\text{mean} \leftarrow \frac{|u| \cdot u.\text{mean} + |v| \cdot v.\text{mean}}{|u| + |v|}
    candidates←unshrink(u.rep,α)∪unshrink(v.rep,α)\text{candidates} \leftarrow \text{unshrink}(u.\text{rep}, \alpha) \cup \text{unshrink}(v.\text{rep}, \alpha)
    tmpSet←∅\text{tmpSet} \leftarrow \emptyset
    for i←1i \leftarrow 1 to cc do
        maxDist←0\text{maxDist} \leftarrow 0
        maxPoint←null\text{maxPoint} \leftarrow \text{null}
        for each point p∈candidatesp \in \text{candidates} do
            if i=1i = 1 then
                minDist←dist(p,w.mean)\text{minDist} \leftarrow \text{dist}(p, w.\text{mean})
            else
                minDist←min⁡q∈tmpSetdist(p,q)\text{minDist} \leftarrow \min_{q \in \text{tmpSet}} \text{dist}(p, q)
            end if
            if minDist≥maxDist\text{minDist} \ge \text{maxDist} then
                maxDist←minDist\text{maxDist} \leftarrow \text{minDist}
                maxPoint←p\text{maxPoint} \leftarrow p
            end if
        end for
        tmpSet←tmpSet∪{maxPoint}\text{tmpSet} \leftarrow \text{tmpSet} \cup \{\text{maxPoint}\}
    end for
    w.rep←∅w.\text{rep} \leftarrow \emptyset
    for each point p∈tmpSetp \in \text{tmpSet} do
        w.rep←w.rep∪{p+α⋅(w.mean−p)}w.\text{rep} \leftarrow w.\text{rep} \cup \{p + \alpha \cdot (w.\text{mean} - p)\}
    end for
    return ww
  4. Knowl 4 — Chernoff Bound for Minimum Sample Size in Random Sampling

    theoretical result

    Let NN be the total number of data points in a database, and let uu be a cluster containing ∣u∣|u| points. If a random sample of size ss is drawn uniformly without replacement, and ss satisfies:

    s≥fN+N∣u∣log⁡(1δ)+N∣u∣(log⁡(1δ))2+2f∣u∣log⁡(1δ)s \ge f N + \frac{N}{|u|} \log\left(\frac{1}{\delta}\right) + \frac{N}{|u|} \sqrt{\left(\log\left(\frac{1}{\delta}\right)\right)^2 + 2 f |u| \log\left(\frac{1}{\delta}\right)}

    where f∈[0,1]f \in [0, 1] is the minimum fraction of points of cluster uu required in the sample and δ∈(0,1]\delta \in (0, 1], then the probability that the sample contains fewer than f∣u∣f |u| points belonging to cluster uu is strictly less than δ\delta.

    If ∣umin⁡∣|u_{\min}| is the size of the smallest cluster of interest, substituting ∣umin⁡∣|u_{\min}| for ∣u∣|u| yields a minimum sample size smin⁡s_{\min}. For a data set with kk clusters each of size at least ∣umin⁡∣|u_{\min}|, drawing a sample of size smin⁡s_{\min} ensures that the probability of failing to capture at least f∣u∣f|u| points from any of the kk clusters is at most kδk\delta.

  5. Knowl 5 — Two-Pass Partitioning Scheme for Large-Scale Speedup

    model/method

    To cluster large samples of size ss that are computationally heavy under quadratic hierarchical clustering, CURE partitions the sample of size ss into pp disjoint partitions, each of size s/ps/p.

    1. Pass 1 (Partition Preclustering): CURE runs its hierarchical clustering on each partition individually until the number of clusters in each partition is reduced to sp⋅q\frac{s}{p \cdot q} for a constant q>1q > 1 (e.g., q=3q = 3). During this pass, individual points are merged into partial subclusters within their partition, without spanning cluster boundaries provided sp⋅q≥2k\frac{s}{p \cdot q} \ge 2k to 3k3k.
    2. Pass 2 (Global Clustering): The resulting sq\frac{s}{q} total partial clusters from all pp partitions are gathered and clustered in a second hierarchical pass until the target number of clusters kk is reached. In this pass, each partial cluster is represented solely by its representative points, keeping the memory footprint small.

    Partitioning reduces the asymptotic clustering time complexity from O(s2log⁡s)O(s^2 \log s) to: O(s2p(q−1q)log⁡(sp)+s2q2log⁡(sq))O\left(\frac{s^2}{p} \left(\frac{q-1}{q}\right) \log\left(\frac{s}{p}\right) + \frac{s^2}{q^2} \log\left(\frac{s}{q}\right)\right) This yields a theoretical speedup factor of approximately q−1pq+1q2\frac{q-1}{pq} + \frac{1}{q^2} relative to unpartitioned clustering.

  6. Knowl 6 — Two-Phase Outlier Elimination Mechanism

    model/method

    Because outliers are isolated and sparsely distributed, clusters of outliers grow much more slowly during agglomerative clustering than genuine clusters. CURE leverages this property to eliminate outliers in two phases:

    1. Phase 1 (Intermediate Pruning): Agglomerative clustering proceeds until the total number of remaining clusters drops below a specified fraction of the initial cluster count (a fraction of approximately 1/31/3 works well across data sets). At this trigger point, any cluster with very few points (e.g., 1 or 2 points) is classified as an outlier cluster and discarded.
    2. Phase 2 (Late-Stage Pruning): When the number of remaining clusters approaches the desired target count kk, remaining small clusters (e.g., containing ≤5\le 5 points) are identified and removed as outliers.

    Phase 1 removes isolated individual outliers early, while Phase 2 eliminates small outlier cliques that formed by chance sampling of nearby noise points.

  7. Knowl 7 — Disk Labeling via Multiple Nearest Representatives

    model/method

    After CURE discovers the final kk clusters on a representative sample in main memory, the remaining data points residing on disk are assigned cluster labels in a single scan.

    Each data point xx on disk is assigned to the cluster CiC_i (i∈{1,…,k}i \in \{1, \dots, k\}) that contains the representative point closest to xx: label(x)=arg⁡min⁡i∈{1,…,k}(min⁡p∈Ci.repdist(x,p))\text{label}(x) = \arg\min_{i \in \{1, \dots, k\}} \left( \min_{p \in C_i.\text{rep}} \text{dist}(x, p) \right)

    Unlike centroid-based labeling schemes that assign points based strictly on distance to a single cluster centroid (which implicitly assumes spherical Voronoi decision boundaries and splits non-spherical shapes), using multiple scattered representative points allows CURE to correctly partition non-spherical, elongated, and varying-sized clusters across the entire disk-resident database.

  8. Knowl 8 — Parameter Sensitivity and Clustering Quality of CURE

    empirical result

    On two-dimensional synthetic benchmark data containing complex geometries (one large circle, two small circles, two elongated ellipsoids connected by a chain of outliers, and random background noise):

    • Shrink Factor α\alpha: Values of α∈[0.2,0.7]\alpha \in [0.2, 0.7] consistently identify all true clusters correctly. When α≤0.1\alpha \le 0.1, the scattered points shrink insufficiently, causing CURE to degenerate to single-link/MST behavior and erroneously merge the two ellipsoids across the outlier chain. When α≥0.8\alpha \ge 0.8, representative points concentrate at cluster centroids, causing CURE to degenerate to centroid-based clustering (e.g., BIRCH), which splits the large circle and merges the two small circles.
    • Number of Representatives cc: Choosing c≥10c \ge 10 reliably captures non-spherical cluster boundaries. Choosing c≤5c \le 5 fails because representatives do not adequately cover cluster geometry, causing large clusters to be split.
    • Sample Size ss: For a dataset of N=100,000N = 100{,}000 points, a random sample of s=2500s = 2500 (2.5%2.5\% of data) is sufficient to accurately discover all cluster geometries, whereas sample sizes s≤2000s \le 2000 produce poor clustering quality.
  9. Knowl 9 — Scalability and Execution Time Comparison of CURE vs. BIRCH

    empirical result

    On a benchmark data set of 100 Gaussian clusters (k=100k = 100) where data size is scaled from N=100,000N = 100{,}000 to 500,000500{,}000 points (tested on a Sun Ultra-2/200 with 512 MB RAM):

    • Execution Time vs. Dataset Size: CURE's execution time remains nearly flat (increasing only slightly from ≈10\approx 10 seconds to ≈20\approx 20 seconds without partitioning) because its clustering operates on a fixed sample size (s=2500s = 2500), incurring only negligible additional sampling time (<2< 2 seconds). In contrast, BIRCH's execution time grows substantially with NN (from ≈30\approx 30 seconds at 100k100\text{k} to ≈80\approx 80 seconds at 500k500\text{k}) because its CF-tree preclustering scans the entire database.
    • Speedup via Partitioning: Increasing the number of partitions pp from 1 to 5 reduces CURE's execution time by more than 50%50\% across all tested dataset sizes while maintaining identical clustering quality.

Coverage note — None was omitted; all primary contributions—including the representative point model, hierarchical clustering algorithm, fast merge routine, Chernoff sampling bound, two-pass partitioning speedup, two-phase outlier elimination, disk labeling, and empirical evaluations—have been captured.

References

  1. 1.N. Beckmann, H.-P. Kriegel, R. Schneider, and B. Seeger. The R*-tree: an efficient and robust access method for points and rectangles. In Proc. of ACM SIGMOD, pages 322–331, Atlantic City, NJ, May 1990.
  2. 2.Thomas H. Cormen, Charles E. Leiserson, and Ronald L. Rivest. Introduction to Algorithms. The MIT Press, Massachusetts, 1990.
  3. 3.Martin Ester, Hans-Peter Kriegel, Jörg Sander, and Xiaowei Xu. A density-based algorithm for discovering clusters in large spatial database with noise. In Int’l Conference on Knowledge Discovery in Databases and Data Mining (KDD-96), Portland, Oregon, August 1996.
  4. 4.Martin Ester, Hans-Peter Kriegel, and Xiaowei Xu. A database interface for clustering in large spatial databases. In Int’l Conference on Knowledge Discovery in Databases and Data Mining (KDD-95), Montreal, Canada, August 1995.
  5. 5.Sudipto Guha, R. Rastogi, and K. Shim. CURE: A clustering algorithm for large databases. Technical report, Bell Laboratories, Murray Hill, 1997.
  6. 6.Anil K. Jain and Richard C. Dubes. Algorithms for Clustering Data. Prentice Hall, Englewood Cliffs, New Jersey, 1988.
  7. 7.R. Motwani and P. Raghavan. Randomized Algorithms. Cambridge University Press, 1995.
  8. 8.Raymond T. Ng and Jiawei Han. Efficient and effective clustering methods for spatial data mining. In Proc. of the VLDB Conference, Santiago, Chile, September 1994.
  9. 9.Clark F. Olson. Parallel algorithms for hierarchical clustering. Technical report, University of California at Berkeley, December 1993.
  10. 10.H. Samet. The Design and Analysis of Spatial Data Structures. Addison-Wesley, 1989.
  11. 11.Hanan Samet. The Design and Analysis of Spatial Data Structures. Addison-Wesley Publishing Company, Inc., New York, 1990.
  12. 12.T. Sellis, N. Roussopoulos, and C. Faloutsos. The R+ tree: a dynamic index for multi-dimensional objects. In Proc. 13th Int’l Conference on VLDB, pages 507–518, England, 1987.
  13. 13.Jeff Vitter. Random sampling with a reservoir. ACM Transactions on Mathematical Software, 11(1):37–57, 1985.
  14. 14.Tian Zhang, Raghu Ramakrishnan, and Miron Livny. Birch: An efficient data clustering method for very large databases. In Proceedings of the ACM SIGMOD Conference on Management of Data, pages 103–114, Montreal, Canada, June 1996.

Citation

MLA
Guha, S., et al. “CURE”. Proceedings of the 1998 ACM SIGMOD International Conference on Management of Data, 1998, pp. 73–84, https://doi.org/10.1145/276304.276312.
APA
Guha, S., Rastogi, R., & Shim, K. (1998). CURE. Proceedings of the 1998 ACM SIGMOD International Conference on Management of Data, 73–84. https://doi.org/10.1145/276304.276312
Chicago
Guha, S., R. Rastogi, and K. Shim. 1998. “CURE”. Proceedings of the 1998 ACM SIGMOD International Conference on Management of Data, 73–84. https://doi.org/10.1145/276304.276312.
Harvard
Guha, S., Rastogi, R. and Shim, K. (1998) “CURE”, Proceedings of the 1998 ACM SIGMOD international conference on Management of data. ACM, pp. 73–84. Available at: https://doi.org/10.1145/276304.276312.
Vancouver
1. Guha S, Rastogi R, Shim K (1998) CURE. In: Proceedings of the 1998 ACM SIGMOD international conference on Management of data. ACM, pp 73–84

BibTeX

@inproceedings{Guha_1998, series={SIGMOD/PODS98}, title={CURE: an efficient clustering algorithm for large databases}, url={http://dx.doi.org/10.1145/276304.276312}, DOI={10.1145/276304.276312}, booktitle={Proceedings of the 1998 ACM SIGMOD international conference on Management of data}, publisher={ACM}, author={Guha, Sudipto and Rastogi, Rajeev and Shim, Kyuseok}, year={1998}, month=June, pages={73–84}, collection={SIGMOD/PODS98} }
Metadata:Crossref

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF