Manuscript Offprint
arXiv:2611.01207A Batched Hartigan's -Means Clustering
Abstract
Hartigan's -means algorithm has theoretical advantages over the standard Lloyd's variant, which has become synonymous with “-means”. Yet, Hartigan's algorithm is far slower in practice due to its inherently sequential calculations. We devise a Batched Hartigan's method that enables vectorized calculation by exploiting the triangle inequality to expose a set of parallel-safe updates and a smaller set of sequential updates. This makes Hartigan's method competitive with Lloyd's in execution speed for the first time.
1 Introduction
The -means algorithm has been a workhorse of machine learning for over 50 years [21], with the simple procedure originally proposed by Lloyd still the dominant version of the algorithm fundamentally in use continuously since its proposal [19] and first presented in 1957. Yet, another old variant of -means was proposed by Hartigan and Wong [14] has been consistently shown to be a theoretical Pareto improvement over the original Lloyd variant. As we will review soon, Hartigan and Wong's method (or Hartigan for short) converges to a strictly superior set of minima, in fewer epochs, with monotonically decreasing objective values in each iteration of the dataset. We posit that Hartigan's variant of -means has been neglected due to computational cost. Despite having theoretically fewer calculations to perform, the original algorithm is entirely sequential and thus eliminates almost all opportunities for efficient vectorized operations afforded by Basic Linear Algebra Subprograms (BLAS), the standard compiled routines for vectorized linear algebra available in every scientific computing environment [7, 8, 15]. Our implementation relies only on BLAS, specifically GEneral Matrix Multiply (GEMM), the level-3 BLAS operation computing , which achieves near-peak CPU throughput through cache blocking and single-instruction, multiple-data (SIMD) vectorization. We use GEMM for batch distance computation via the identity . Production BLAS uses the classical matrix-multiplication complexity: sub-cubic algorithms such as Strassen have large constants and weaker numerical stability and, to our knowledge, are not used in production BLAS. The advantage here is therefore constant-factor cache and SIMD efficiency, not a different asymptotic complexity.
By using the triangle inequality, we expose parallelism in the computation of Hartigan's algorithm that was not possible previously. Two key insights are required for our approach. First, in a modern system with large datasets and large , the maximum change on a per-item basis to a given centroid is small, which enables safely determining most cluster assignments in bulk operations. Second, that the random order normally used for Hartigan's algorithm is not a necessary condition for any of its desirable properties, and so bulk operations can re-order points into a “parallel” set and a smaller “sequential” set, allowing us to vectorize the implementation and significantly improve runtime.
The rest of this article is organized as follows. First, we will review the related work to our own in section 2, covering the theory motivating the use of Hartigan's algorithm, along with the development of triangle inequality and faster -means variants. Second, we will describe Hartigan-Wong's variation of -means in detail in section 3, and its inherently sequential design. This motivates our improved
40th Conference on Neural Information Processing Systems (NeurIPS 2026).
variant in section 4, where we use the triangle inequality to not just prune calculations, but expose batch calculations not previously available for efficient vectorization. Our results will show in section 5 that our Batched Hartigan algorithm maintains the same solution quality as the standard Hartigan algorithm, is usually 10× faster than previous implementations of Hartigan's algorithm, and is competitive with modern fast implementations of Lloyd's k-means algorithm. Finally, we will conclude in section 6.
Using the triangle inequality to prune out redundant calculations has been popular since the 90s [27]. Elkan's [10] and Hammerly's [11] are the most popular today that we include as comparisons for runtime evaluation. Many works have further proposed different strategies for enabling pruning and balancing distance calculations vs efficient calculation [2, 5, 6, 12, 28], but an exhaustive comparison is beyond our scope. Our work shows how to use these methods not just to avoid redundant calculations, but a novel approach of enabling vectorized calculations via the triangle inequality rather than sacrificing bulk calculation to prune.
Other work accelerated Lloyd's brute-force k-means algorithm have been developed using GPUs to leverage their efficacy in large batch calculations and obtain ≈ 100× speedups over the naive batch Lloyd on CPU [4, 17, 18, 20, 34]. However, very few have tried to use both a GPU and triangle-inequality based pruning, and results are far more modest with 3-8× speedup over the same CPU algorithm [31]. Better designing triangle-inequality pruning for effective GPU parallelization is still an open problem, and our results are not sufficient for GPU parallelism today — but it shows the potential path for future work in fast GPU clustering [24–26].
Table 1: Notation used throughout this article for the Batched Hartigan method.
| Symbol | Domain | Meaning |
|---|---|---|
| N | Batch size (points per GEMM) | |
| index set | Ordered set of selected point indices; positions are relabeled within the batch | |
| Centroid of cluster at batch start | ||
| Centroid of cluster after the -th item is processed | ||
| N | Size of cluster after the -th item | |
| Precomputed (from GEMM) | ||
| Cumulative drift bound for cluster after items | ||
| Lower/upper bounds on Hartigan cost (2) to cluster | ||
| Per-point upper/lower distance bounds (cross-batch screening) | ||
| Cumulative centroid displacement since the last batch touching point |
3 Hartigan-Wong K-Means
Let be the input data matrix with rows . We seek a partition of the index set into non-empty clusters that minimises the k-means objective
where , is the centroid of cluster .
3.1 Hartigan Weighted Distance
The key insight of Hartigan's method is that, when considering whether to reassign from its current cluster to a candidate cluster , one must account for the change in cluster sizes and the resulting shift of the centroids. This is captured by the Hartigan weighted distance [13]:
Algorithm 1 Hartigan's k-Means Clustering
Require: Data matrix with rows ; number of clusters ; initial partition (each ) and centroids .
1: repeat Repeat full data sweeps 2: for do 3: Let be the cluster index s.t. Evaluate every destination 4: for do 5: Equation 2 6: Apply a beneficial move 7: if and then Move 8: ; 9: Update and 10: until No centroids change 11: return
The weighting inflates the squared distance to the current cluster (penalising self-influence of on its own centroid), while deflates the squared distance to a candidate cluster (anticipating the centroid shift upon absorption of ). Algorithm 1 reassigns to whenever , the greedy move that maximally decreases the k-means objective (1) [33].
Despite its simplicity, three valuable properties have been proven using Hartigan's method: (1) Monotone decrease: Each accepted reassignment strictly decreases , so the algorithm terminates in finitely many steps. (2) No empty clusters: When distinct points exist, the output partition has no empty clusters [33]. (3) Strictly finer fixed points: The set of local optima of Hartigan's method is a (possibly strict) subset of those of Lloyd's method [33]. In high-dimensional, high-noise regimes, Lloyd's algorithm can become trapped at essentially every balanced partition, whereas Hartigan's algorithm provably avoids these spurious fixed points [16].
4 Fast Batched Hartigan-Wong
This section introduces the batched method and its components. For , write for the positive part of . In paired assignments, the + branch supplies the first target and the - branch supplies the second. Table 2 summarizes the state used by Algorithm 2 before the detailed definitions below.
Table 2: State used by Batched Hartigan.
| Symbol | Meaning and detailed definition |
|---|---|
| Batch-start squared distance, drift bound, and Hartigan-cost bounds; §4.1 | |
| Centroid and size of cluster after batch position ; §4.1 | |
| Current and limiting batch sizes; §4.3 | |
| Exponential moving average (EMA) state and batch-size inputs; §4.3 | |
| Ordered selected point indices & their relabeled batch positions ; §4.4 | |
| Cluster currently assigned to point ; §4.4 | |
| Cross-batch distance bounds and lazy drift state; §4.4 |
Standard Hartigan (Algorithm 1) is inherently sequential: each reassignment updates two centroids, and the next point's distances are evaluated against the updated state. This prevents the use of level-3 BLAS routines for the distance computation. Empirically, for and/or , the per-iteration cost of a Hartigan sweep exceeds that of a Lloyd E-step by a factor of , even though both perform distance evaluations, because Lloyd's distances are computed by a single highly-optimized matrix product (Table 5).
We propose Batched Hartigan, a framework that groups consecutive points into a batch, pre-computes all distances in one GEMM, and then processes the batch—using the triangle inequality to certify that precomputed distances remain valid despite ongoing centroid drift. The subsections that follow develop each component in turn: safe sequential processing (§4.1), parallel batch execution (§4.2), adaptive batch sizing (§4.3), and cross-batch pruning of stable points (§4.4). Algorithm 2 provides the high-level structure.
Throughout this section, the notation in Table 1 distinguishes quantities fixed at batch start from quantities updated after each item.
To re-assign points to new centroids/clusters, we must bound the distance between a centroid and its clusters potential locations . Because Hartigan weights the update by cluster size, this value is meaningfully in the clusters:
Algorithm 2 Batched Hartigan -Means
Require: Data matrix ; number of clusters ; smoothing parameter ; safety factor ; bounds ; initial partition (each ).
1: Initialise centroids , sizes for §4.1
2: Precompute for all reused across all batches
3: exponential moving average; §4.3
4: §4.3
5: Initialise per-point bounds , , , for all §4.4
6: for
7: §4.4
8: repeat Process epochs and batches
9: for each batch from BUILDBATCH() do Algorithm 6
10: and for all batch-start state
11: for all ,
12:
PARTIALPARALLELBATCH(, ) Alg. 4
Refresh cross-batch bounds
13: for each refresh bounds (§4.4)
14:
15: for batch position corresponding to dataset index do
16:
17:
18:
19:
Select the next batch size
20: and for all
21: §4.3
22: Algorithm 5
23: until No centroids change
24: return ,
bounded. To demonstrate, we must start by defining the drift in the clusters:
4.1 Safe Reassignment
Definition 4.1 (Cumulative drift bound). Let a batch begin with centroids , and let denote the centroid of cluster after each successive reassignment within the batch. The cumulative drift bound is . By the triangle inequality, . If cluster is not involved in any reassignment during steps , then .
This then allows us to define upper and lower-bounds on the Hartigan cost Equation 2. For brevity, paired signs use subtraction for the lower bound and addition for the upper bound. Since both and are nonnegative, the positive-part operator is redundant in the upper bound.
Lemma 4.1 (Distance bound propagation). Let be the precomputed squared distance. After items in the batch have been processed (with cumulative drift for cluster , Definition 4.1), where denotes the index of 's currently assigned cluster, the true squared distance and Hartigan cost satisfy: (i) Squared-distance bounds: By the triangle inequality applied to and Definition 4.1, is bounded above/below by . (ii) Hartigan cost bounds: Since the cluster sizes are tracked exactly, the Hartigan cost (2) is bounded above/below (defining and ): by for the current cluster
. The candidate cluster case for is instead bounded above/below by .
Proof sketch. Apply the triangle and reverse-triangle inequalities to the cumulative centroid displacement, then multiply by the positive Hartigan weights; see Appendix H.
With this in place, we can state the conditions under which we can safely perform Hartigan's clustering while using potentially stale centroid distances. Let denote the current cluster of . Using the Hartigan cost bounds from Lemma 4.1(ii), write
for the current-cluster bounds,
(3)
Definition 4.2 (Safe reassignment decision). Let . The reassignment decision for is safe if one of: (S1) Safe move: and for all , (the upper-bound cost of staying and the lower-bound cost of staying and all other candidates). (S2) Safe stay: for all (every candidate's lower-bound cost exceeds the upper-bound cost of staying). Otherwise the decision is ambiguous and requires exact recomputation.
In the Appendix Theorem H.1 we prove that this is exactly replicates Hartigan's algorithm under the same iteration order. However, we will later show a more useful result for re-ordering the items in a batch, and so deffer it's details.
Having defined the conditions of safe
Algorithm 3 SEQUENTIALBATCH: per-point processing with bounds
Require: Ordered set ; precomputed distances ; state after decisions.
Initialize within-batch state
1: Use and for a full sequential batch
2:
3: for do Process points in order
4: and let be item of
5: Set for all
6:
7: if then continue
Bound every Hartigan cost
8:
Lemma 4.1 for each candidate .
9: for , do
10:
11:
Apply S1, S2, or exact fallback
12: if and for all , then safe move (S1)
13:
14:
15: Update incrementally
16:
17:
18:
19: else if for all then safe stay (S2)
20: continue
21: else ambiguous: recompute exact distances
22: Compute exact for all
23: Evaluate exact Hartigan costs
24: Reassign if beneficial; update , and increment if a move occurs
25: return , and
updates, we combine them all into Algorithm 3 for safe sequential evaluation of all points, following directly from the prior Lemmas and definitions. Bounds on the Hartigan cost Equation 2 are calculated from an initial bulk computation, and only violating points need to be recomputed. The sequential kernel performs at most the arithmetic of a plain Hartigan sweep: once for the batch GEMM distances, , and at most once more for exact recomputation of ambiguous points. In practice, fewer than 5% of points require recomputation in steady state, so this overhead is small.
4.2 Simultaneous Execution
The sequential inner loop processes points in series, evaluating bounds one at a time. We now classify each point's tentative decision as safe—certifiable under worst-case drift bounds—or ambiguous. The safe majority is executed in a single parallel bulk update; the small ambiguous remainder is processed sequentially afterward, with drift initialized to the exact displacement produced by the safe execution.
Definition 4.3 (Tentative decisions and aggregate flow). Given precomputed distances and pre-batch sizes , the tentative decision for point b is the standard Hartigan comparison (Algorithm 1, lines 4–9) evaluated with exact distances and sizes . The aggregate flow for each cluster is , .
Once we have the tentative leave decisions L and join decisions J, we need to know that we can re-process the points in a safer order. Lemma 4.2 shows that these updates commute.
Lemma 4.2 (Commutativity of centroid updates). Let cluster have centroid and size . Suppose a set of points departs and a disjoint set arrives. Then the updated centroid is independent of the order in which the individual removals and insertions are applied.
Proof sketch. The final centroid is the final member sum divided by the final member count, both independent of update order; see Appendix H.
Given commutativity (Lemma 4.2), the final cluster state after executing a fixed set of moves is unique regardless of processing order. It remains to verify that every point's decision is also order-independent: does every point make the same reassignment choice whether it is processed first, last, or simultaneously with all others? To answer this we must bound the centroid drift and size variation that any one point might experience at an arbitrary intermediate step via Lemma 4.3.
Lemma 4.3 (Aggregate batch bounds). Let be a batch with tentative decisions and aggregate flow (Definition 4.3). Write , , . Here, “ touches ” means that either removes from (a leave counted by ) or adds to (a join counted by ). Assume for all . The aggregate drift bound is . Then at every intermediate step during sequential processing of in any order: (i) for all . (ii) The Hartigan cost of point (in cluster ) is bounded above by and below by , where with , and . (iii) For safe-move (S1) verification, directions reverse: and .
Proof sketch. Repeated triangle inequalities bound each centroid displacement, while the minimum possible cluster sizes bound the Hartigan weights; see Appendix H.
Given this, we can develop a stronger theoretical statement that the items within a batch do not need to be processed in the original order. It is possible to re-order the items within a batch, based on their
Algorithm 4 PARTIALPARALLELBATCH: safe/ambiguous partition execution
Require: Batch : precomputed distances ; batch-start centroids ; batch-start sizes .
Ensure: Updates and returns and .
Form tentative decisions in parallel
1: for in parallel do tentative decisions (Definition 4.3)
2: cluster of
3: standard Hartigan decision using and
Compute aggregate drift bounds
4: Compute for each Def. 4.3, Lemma 4.3
5: if for any then
6: return SEQUENTIALBATCH(, , , ) validity fails full sequential
7: for each Lemma 4.3
Partition safe and ambiguous points
8: for in parallel do per-point safety classification
9: Compute worst-case Hartigan cost bounds using Lemma 4.3
10: safe[b] satisfies (S1) or (S2)
11: ,
Execute the resulting partition
12: if then fast path: all safe
13: Execute bulk centroid update (Lemma 4.2) for all movers in
14: return drift from bulk update
15: else if then fallback: all ambiguous
16: return SEQUENTIALBATCH(, , , )
17: else mixed: safe first, then ambiguous
18: Execute bulk centroid update for movers in Lemma 4.2
19: Let be the resulting state
20: for all actual drift,
21: SEQUENTIALBATCH(, , , b_0 = |\mathcal{S}|\ Alg. 3
22: return total per-cluster drift
. Then at every intermediate step during sequential processing of in any order: (i) for all . (ii) The Hartigan cost of point (in cluster ) is bounded above by and below by , where with , and . (iii) For safe-move (S1) verification, directions reverse: and .
prunability. This allows us to re-order them for maximal compute efficacy, while still converging to a Hartigan fixed point solution:
Theorem 4.1 (Partial parallel batch correctness). Given a GEMM batch with tentative decisions , aggregate flow , satisfying for all , and aggregate drift bound (Lemma 4.3), partition the batch into and . Then: (a) The bulk centroid update restricted to movers in is correct: every move decreases . (b) Sequential processing of with drift initialised to is correct: each decision uses valid Hartigan cost bounds. (c) Every accepted move strictly decreases ; no cluster is emptied. The algorithm terminates at a Hartigan fixed point—the same characterisation as standard Hartigan (Algorithm 1).
Algorithm 2 calls PARTIALPARALLELBATCH (Algorithm 4) for each GEMM batch. The per-point safety classification is , and centroid updates cost per batch and across all batches in one epoch. Both are negligible compared to the GEMM. In the common case the vast majority of points are safe, and only a small ambiguous remainder requires sequential processing. In the limiting case where all points are safe (), the algorithm reduces to a single bulk update per batch; when all points are ambiguous (), it degrades gracefully to the sequential fallback.
At convergence, the algorithm arrives at a Hartigan fixed point (Theorem 4.1(c)), which inherits the guarantees of [33]: Hartigan fixed points are a strict subset of Lloyd fixed points. The balanced-partition traps identified by [16] cannot arise. The -then- reordering may yield different fixed points from the same initialisation, but decreases monotonically and every decreased move is individually optimal at the time it is made.
4.3 Adaptive Batch Size
The batch size controls the GEMM shape and determines how much centroid drift accumulates before distances are refreshed. Larger amortizes BLAS overhead better, but the aggregate drift bound (Lemma 4.3) grows with , loosening the safety bounds and increasing fallback to exact computation. The validity condition of Lemma 4.3 imposes a hard upper limit on the number of moves per batch. We thus use the constraints to inform the value of based on the frequency of updates , and then use a moving average to smoothly update our estimate of over time.
Constraint on . If the reassignment rate is (fraction of points that change cluster), a batch of points produces moves, each touching two clusters, so the expected per-cluster load is . The validity condition then requires where .
Batch-adaptive EMA. We maintain an exponential moving average (EMA) of the reassignment rate, updated after every batch at cost. Let be the observed rate; the EMA update is with and (pessimistic). The next batch size is where is a safety factor (default 0.5), is the minimum useful GEMM size, and is a cache-aware ceiling. Below ,
Algorithm 5 DETERMINEBATCHSIZE: EMA-adaptive batch sizing
Require: Current sizes ; observed reassignment rate ; EMA state ; smoothing parameter ; safety factor ; bounds .
Ensure: Updated and new batch size .
Update the reassignment-rate estimate
1: EMA update (§4.3)
Apply the drift-validity constraint
2:
3: return clamp(, ) batch size (§4.3)
Algorithm 6 BUILDBATCH: screen stable points and collect unsettled indices
Require: Batch size ; per-point bounds ; per-cluster drift ; global drift ; cluster sizes .
Ensure: Yields batches of unsettled point indices, each of size .
1: Initialize an empty batch
Scan and screen every point
2: for do
3: bounds from (§4.4)
4:
5: if then
6: continue screened — safe stay (§4.4)
7:
8: if then
9: yield
10:
11: if then Emit the final partial batch
12: yield remaining partial batch fixed allocation, dispatch, and thread-synchronization costs can exceed the arithmetic time. Fixing produces slowdown in Table 12; the practical 64-256 range balances GEMM efficiency against drift accumulation. Initially ; as decreases, grows until saturating at in later epochs.
4.4 Pruning Stable Points
Our final insight is that some points may be so stable as to make any distance calculations at all irrelevant. In later epochs most points are stable. By maintaining cheap per-point distance bounds across batches, we screen stable points before batch formation and exclude them from the GEMM entirely (following the Hamerly design [11]). For each point , denotes its currently assigned cluster. We maintain (upper bound to assigned centre) and (lower bound to nearest other centre), initialised to , .
To avoid bound updates per batch, we develop lazy drift tracking to maintain per-cluster cumulative drift and a global accumulator . When point 's bounds are set after a GEMM, we record and . The effective bounds at any later time are and , each costing , which is proven by Lemma 4.4.
Lemma 4.4 (Cross-batch bound validity). After any sequence of batches, and .
Proof sketch. Cumulative cluster drift preserves the upper bound, while the sum of per-batch maximum drifts preserves the lower bound; see Appendix H.
Point (in cluster ) is screened if: , where . This certifies (S2), preserving the guarantee of Theorem H.1.
However, the lazy updates can make the bound excessively “stale”, and must be refreshed. This refresh happens at two levels. After each batch with drifts : (1) : , . (2) : for each , , , , . All bounds carry over unchanged across epoch boundaries (warm-start).
5 Results
All experiments use -means++ initialization, (capped at ), and report the median over 10 independent trials. Within each trial, all algorithms receive identical externally selected -means++ initial centers. All runtimes are single-threaded wall-clock seconds on a Apple M4 Pro. Our results will show that: (1) Batched Hartigan maintains desirable empirical properties relative to the naive variant. (2) Our method is faster than the prior implementations of Hartigan's algorithm. (3) That our method is comparable to popular fast Lloyd's -means variants, making it viable for practitioners to explore, and validates our strategy of creating vectorizable computations via the triangle inequality.
Five algorithms will be compared in total: sequential Hartigan (Python with Numba JIT; Algorithm 1) and our Batched Hartigan (Algorithm 2). The Lloyd-family baselines are standard Lloyd (Python/NumPy) [19], Elkan (Cython via scikit-learn) [10], and Hamerly (C++) [11]. These will be evaluated on 12 datasets spanning and . Dataset dimensions and preprocessing are reported in Appendix D.
5.1 Fast Batched Hartigan Efficacy
First we validate that our Batched variant maintains desirable properties of Hartigan's method. Solution quality is measured by the sum of squared errors (SSE), the -means objective from (1), where denotes point 's assigned cluster. This starts with the convergence speed. Figure 1 shows the ratio of each algorithm's iteration count to Lloyd's -means. Both Hartigan variants converge in roughly half the epochs: the median Hartigan/Lloyd iteration ratio is 0.54, and the median Batched Hartigan/Lloyd ratio is 0.56.

Figure 1: Median iteration ratio relative to Lloyd across values. Both Hartigan variants converge in roughly half the epochs. This shows one advantage of Hartigan's method, and that our Batched variant maintains it in practice.
Hartigan's method converges to a superior solution set, though [32] noted the benefit was smaller when using -means++ style seeding. Still, we confirm this in our work adn validate the same quality of solution that is generally equal-or-better using our Batched Hartigan. Table 3 reports the ratio of each Hartigan variant's converged SSE to Elkan's. Values below 1 indicate lower (better) SSE of Hartigan. Both Hartigan and Batched Hartigan consistently match or improve on Elkan's SSE, with median ratios of 0.9999 and 0.9999 respectively. This confirms that Hartigan fixed points yield equal or better clusterings than Lloyd fixed points (the latter being shared by Elkan and Lloyd), and that Batched Hartigan preserves this advantage.
High-dimensional and sparse settings can produce larger differences between Lloyd and Hartigan fixed points [16]. Table 4 reports the best observed Batched Hartigan-to-Elkan inertia ratio over the tested values and trials.
Every dataset had at least one lower-inertia configuration; ratios ranged from 0.8201 to 0.9933, or 0.7–18.0% lower inertia. Improvement is not expected at every : very small or large can yield simpler optima for which Lloyd and Hartigan solutions coincide. Density and runtime results are reported in Appendix E.
5.2 Implementation Speed
We compare our Batched Hartigan against two alternative Hartigan implementations: the sequential Hartigan from [30] (C++ with Cython bindings; hartigan_cpp) and the implementation of Lederman et al. [16] (Python with Numba JIT; lederman). All three produce Hartigan fixed points; the difference is purely in per-epoch throughput.
Table 3: Median SSE ratio to Elkan across values. Ratio < 1: Hartigan achieves lower SSE than Elkan.
| Dataset | Hartigan / Elkan | Batched / Elkan |
| Letter | 0.9991 | 0.9988 |
| MAGIC Gamma | 1.0000 | 1.0000 |
| Sepsis | 1.0000 | 1.0000 |
| Shuttle | 0.9883 | 0.9883 |
| Superconductivity | 0.9999 | 0.9999 |
| aloi | 1.0000 | 1.0000 |
| cod-rna | 1.0000 | 1.0000 |
| connect-4 | 1.0000 | 1.0000 |
| covtype | 1.0000 | 1.0000 |
| mnist | 1.0000 | 1.0000 |
| phishing | 1.0000 | 1.0000 |
| skin-nonskin | 1.0000 | 1.0000 |
Table 4: Best observed sparse-data inertia ratio. Ratios are Batched Hartigan divided by Elkan; lower is better.
| Dataset | D | Inertia ratio | At k |
| breast-cancer | 10 | 0.9504 | 128 |
| leukemia | 7,129 | 0.9134 | 16 |
| duke | 7,129 | 0.8201 | 4 |
| bibtex | 1,836 | 0.9639 | 4 |
| sector | 55,197 | 0.9866 | 256 |
| news20 | 62,061 | 0.9030 | 8 |
| rcv1_multi | 47,236 | 0.9933 | 256 |
| E2006-tfidf | 150,360 | 0.9891 | 32 |
| scotus | 126,405 | 0.9775 | 256 |
| Wiki10-31K | 104,374 | 0.9845 | 256 |
| real-sim | 20,958 | 0.9794 | 256 |

Figure 2: Wall-clock time vs. per-epoch work volume (median across , single-threaded). Batched Hartigan's GEMM acceleration and triangle-inequality pruning yield orders-of-magnitude speedups at large scale.
Table 5 gives per-dataset wall times. Times are displayed directly in seconds.
Figure 2 plots wall-clock time against the per-epoch work volume (aggregated as the median across values per dataset). Batched Hartigan is fastest on every dataset except the two smallest, where GEMM overhead dominates. The gap widens with scale: on COV-TYPE (, ), Batched Hartigan is faster than hartigan.cpp and faster than lederman.
5.3 Runtime Comparison
We now compare Batched Hartigan to the accelerated Lloyd-family algorithms: Elkan [10] (scikit-learn's default), Hamerly [11] (C++ implementation of Drake and Hamerly [9]), and standard Lloyd [19] (our NumPy implementation). All run single-threaded.
Table 6 reports per-dataset median wall times. The corresponding per- results are reported in Appendix C. At high (e.g. MNIST, ; ALOI, ) Batched Hartigan is competitive with or faster than Elkan despite producing strictly better fixed points. At low , Hamerly's cheaper bound update gives it an edge. Lloyd is consistently the slowest. This demonstrates that our method is competitive with real-world -means implementations in speed for the first time, enabling further study and experimentation.
Table 5: Median wall time across values for three Hartigan implementations, in seconds.
| Dataset | Wall time (seconds) | ||
|---|---|---|---|
| Batched | C++ | Lederman | |
| phishing | 0.025 | 0.083 | 0.255 |
| MAGIC Gamma | 0.046 | 0.043 | 0.290 |
| Letter | 0.053 | 0.063 | 0.347 |
| Superconductivity | 0.031 | 0.289 | 0.547 |
| Shuttle | 0.192 | 0.170 | 0.248 |
| cod-rna | 0.055 | 0.344 | 0.433 |
| mnist | 1.041 | 18.581 | 54.534 |
| connect-4 | 0.381 | 3.837 | 8.879 |
| aloi | 0.503 | 7.871 | 12.934 |
| Sepsis | 0.029 | 0.193 | 0.102 |
| skin-nonskin | 0.177 | 0.632 | 0.868 |
| covtype | 1.853 | 31.704 | 61.330 |
| SUSY | 16.361 | 182.193 | 130.468 |
Table 6: Median wall time across values, in seconds.
| Dataset | Wall time (seconds) | |||
|---|---|---|---|---|
| Lloyd | Elkan | Hamerly | Batched H. | |
| phishing | 0.136 | 0.016 | 0.062 | 0.025 |
| MAGIC Gamma | 0.154 | 0.049 | 0.046 | 0.046 |
| Letter | 0.211 | 0.051 | 0.052 | 0.053 |
| Superconductivity | 0.215 | 0.018 | 0.088 | 0.031 |
| Shuttle | 0.135 | 0.029 | 0.051 | 0.192 |
| cod-rna | 0.301 | 0.036 | 0.029 | 0.055 |
| mnist | 18.392 | 1.293 | 14.842 | 1.041 |
| connect-4 | 4.188 | 0.323 | 2.082 | 0.381 |
| aloi | 9.740 | 0.580 | 2.710 | 0.503 |
| Sepsis | 0.061 | 0.016 | 0.011 | 0.029 |
| skin-nonskin | 0.586 | 0.086 | 0.077 | 0.177 |
| covtype | 30.495 | 2.503 | 4.269 | 1.853 |
| SUSY | — | 26.660 | 20.912 | 16.361 |
6 Conclusion
Slonim et al. [30] concluded “Hartigan’s algorithm is scarcely used in practice. Perhaps it is time for a change.”, and we elucidate the simple reason it did not happen: Hartigan’s method was slower than alternatives. Rather than using the triangle inequality to just prune calculations, we use it to enable vectorized calculations where none existed before.
References
[1] David Arthur and Sergei Vassilvitskii. k-means++: The Advantages of Careful Seeding. In Proceedings of the eighteenth annual ACM-SIAM symposium on Discrete algorithms, volume 8, pages 1027–1035, 2007. URL http://dl.acm.org/citation.cfm?id=1283494.
[2] Thomas Bottesch, K Markus, Markus Kaechele, and U N I Ulm. Speeding up k-means by approximating Euclidean distances via block vectors. In Proceedings of The 33rd International Conference on Machine Learning, pages 2578–2586, 2016.
[3] François Clément and Stefan Steinerberger. An effective variant of the Hartigan -means algorithm, April 2026. URL http://arxiv.org/abs/2604.21798. arXiv:2604.21798 [cs] version: 1.
[4] Michel B. Cordeiro and Wagner M. Nunan Zola. Parallel K-means on GPU using Warp-Centric Strategies. In 2024 IEEE 30th International Conference on Parallel and Distributed Systems (ICPADS), pages 720–727, October 2024. doi: 10.1109/ICPADS63350.2024.00098. URL https://ieeexplore.ieee.org/document/10763758. ISSN: 2690-5965.
[5] Ryan R Curtin. A Dual-Tree Algorithm for Fast k-means Clustering With Large k. In Proceedings of the 2017 SIAM International Conference on Data Mining, pages 300–308. Society for Industrial and Applied Mathematics, Philadelphia, PA, June 2017. doi: 10.1137/1.9781611974973.34. URL http://epubs.siam.org/doi/10.1137/1.9781611974973.34.
[6] Yufei Ding, Yue Zhao, Xipeng Shen, Madanlal Musuvathi, and Todd Mytkowicz. Yinyang K-means: A Drop-in Replacement of the Classic K-means with Consistent Speedup. In Proceedings of the 32Nd International Conference on International Conference on Machine Learning - Volume 37, pages 579–587. JMLR.org, 2015. URL http://dl.acm.org/citation.cfm?id=3045118.3045181. Series Title: ICML'15.
[7] J. J. Dongarra, Jeremy Du Croz, Sven Hammarling, and I. S. Duff. A set of level 3 basic linear algebra subprograms. ACM Trans. Math. Softw., 16(1):1–17, March 1990. ISSN 0098-3500. doi: 10.1145/77626.79170. URL https://dl.acm.org/doi/10.1145/77626.79170.
[8] Jack J. Dongarra, Jeremy Du Croz, Sven Hammarling, and Richard J. Hanson. Algorithm 656: an extended set of basic linear algebra subprograms: model implementation and test programs. ACM Trans. Math. Softw., 14(1):18–32, March 1988. ISSN 0098-3500. doi: 10.1145/42288.42292. URL https://dl.acm.org/doi/10.1145/42288.42292.
[9] Jonathan Drake and Greg Hamerly. Accelerated k-means with adaptive distance bounds. In OPT: Optimization for Machine Learning (NIPS Workshop), 2012.
[10] Charles Elkan. Using the triangle inequality to accelerate k-means. In Proceedings of the 20th International Conference on Machine Learning (ICML), pages 147–153, 2003.
[11] Greg Hamerly. Making k-means even faster. In Proceedings of the 2010 SIAM International Conference on Data Mining (SDM), pages 130–140, 2010.
[12] Greg Hamerly and Jonathan Drake. Accelerating Lloyd's Algorithm for k-Means Clustering. In Partitional Clustering Algorithms, pages 41–78. Springer International Publishing, 2015.
[13] J. A. Hartigan. Clustering Algorithms. John Wiley & Sons, 1975.
[14] J. A. Hartigan and M. A. Wong. Algorithm AS 136: A K-Means Clustering Algorithm. Journal of the Royal Statistical Society. Series C (Applied Statistics), 28(1):100–108, 1979. ISSN 0035-9254. doi: 10.2307/2346830. URL https://www.jstor.org/stable/2346830.
[15] C. L. Lawson, R. J. Hanson, D. R. Kincaid, and F. T. Krogh. Basic Linear Algebra Subprograms for Fortran Usage. ACM Trans. Math. Softw., 5(3):308–323, September 1979. ISSN 0098-3500. doi: 10.1145/355841.355847. URL https://dl.acm.org/doi/10.1145/355841.355847.
[16] Roy R. Lederman, Daniel Silva-Sánchez, Zhizhen Chen, Gilles Mordant, Ariel Balanov, and Tamir Bendory. The catastrophic failure of the k-means algorithm in high dimensions, and how Hartigan's algorithm avoids it. arXiv preprint arXiv:2602.09936, 2026.
[17] Mi Li, Eibe Frank, and Bernhard Pfahringer. Large scale K-means clustering using GPUs. Data Mining and Knowledge Discovery, 37(1):67–109, January 2023. ISSN 1573-756X. doi: 10.1007/s10618-022-00869-6. URL https://doi.org/10.1007/s10618-022-00869-6.
[18] You Li, Kaiyong Zhao, Xiaowen Chu, and Jiming Liu. Speeding up k-Means algorithm by GPUs. Journal of Computer and System Sciences, 79(2):216–229, March 2013. ISSN 0022-0000. doi: 10.1016/j.jcss.2012.05.004. URL https://www.sciencedirect.com/science/article/pii/S0022000012000992.
[19] Stuart P. Lloyd. Least squares quantization in PCM. volume 28, pages 129–137, 1982.
[20] Clemens Lutz, Sebastian Breß, Tilmann Rabl, Steffen Zeuch, and Volker Markl. Efficient k-means on GPUs. In Proceedings of the 14th International Workshop on Data Management on New Hardware, DAMON '18, pages 1–3, New York, NY, USA, June 2018. Association for Computing Machinery. ISBN 978-1-4503-5853-8. doi: 10.1145/3211922.3211925. URL https://dl.acm.org/doi/10.1145/3211922.3211925.
[21] J. MacQueen. Some methods for classification and analysis of multivariate observations. In Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, Volume 1: Statistics, volume 5.1, pages 281–298. University of California Press, January 1967. URL https://projecteuclid.org/ebooks/berkeley-symposium-on-mathematical-statistics-and-probability/Proceedings-of-the-Fifth-Berkeley-Symposium-on-Mathematical-Statistics-and/chapter/Some-methods-for-classification-and-analysis-of-multivariate-observations/bsmsp/1200512992.
[22] Bodo Manthey and Jesse van Rhijn. Worst-Case and Smoothed Analysis of the Hartigan-Wong Method for k-Means Clustering. In Olaf Beyersdorff, Mamadou Moustapha Kanté, Orna Kupferman, and Daniel Lokshanov, editors, 41st International Symposium on Theoretical Aspects of Computer Science (STACS 2024), volume 289 of Leibniz International Proceedings in Informatics (LIPIcs), pages 52:1–52:16, Dagstuhl, Germany, 2024. Schloss Dagstuhl – Leibniz-Zentrum für Informatik. ISBN 978-3-95977-311-9. doi: 10.4230/LIPIcs.STACS.2024.52. URL https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.STACS.2024.52.
[23] Frank Nielsen and Richard Nock. Further heuristics for -means: The merge-and-split heuristic and the -means, June 2014. URL http://arxiv.org/abs/1406.6314. arXiv:1406.6314 [cs].
[24] Corey J. Nolet, Victor Lafargue, Edward Raff, Thejaswi Nanditale, Tim Oates, John Zedlewski, and Joshua Patterson. Bringing UMAP Closer to the Speed of Light with GPU Acceleration. In The Thirty-Fifth AAAI Conference on Artificial Intelligence, 2021. URL http://arxiv.org/abs/2008.00325. arXiv: 2008.00325.
[25] Corey J. Nolet, Divye Gala, Edward Raff, Joe Eaton, Brad Rees, John Zedlewski, and Tim Oates. Semiring Primitives for Sparse Neighborhood Methods on the GPU. In MLSys Conference, 2022. URL http://arxiv.org/abs/2104.06357. arXiv: 2104.06357.
[26] Corey J. Nolet, Divye Gala, Alex Fender, Mahesh Doijade, Joe Eaton, Edward Raff, John Zedlewski, Brad Rees, and Tim Oates. cuSLINK: Single-Linkage Agglomerative Clustering on the GPU. In Danai Koutra, Claudia Plant, Manuel Gomez Rodriguez, Elena Baralis, and Francesco Bonchi, editors, Machine Learning and Knowledge Discovery in Databases: Research Track, volume 14169 of Lecture Notes in Computer Science, pages 711–726. Springer Nature Switzerland, Cham, 2023. ISBN 978-3-031-43411-2 978-3-031-43412-9. doi: 10.1007/978-3-031-43412-9_42. URL https://link.springer.com/10.1007/978-3-031-43412-9_42.
[27] Dan Pelleg and Andrew Moore. Accelerating Exact K-means Algorithms with Geometric Reasoning. In Proceedings of the Fifth ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 277–281, New York, NY, USA, 1999. ACM. ISBN 1-58113-143-7. doi: 10.1145/312129.312248. URL http://doi.acm.org/10.1145/312129.312248. Series Title: KDD '99.
[28] Steven J. Phillips. Acceleration of K-Means and Related Clustering Algorithms. In Proc. 4th Int. Workshop on Algorithm Engineering and Experiments (ALENEX 2002), pages 166–177, 2002. doi: 10.1007/3-540-45643-0_13. URL http://link.springer.com/10.1007/3-540-45643-0_13.
[29] Edward Raff. Exact Acceleration of K-Means ++ and K-Means. In Proceedings of the Thirtieth International Joint Conference on Artificial Intelligence, IJCAI-21, pages 2928–2935, 2021. doi: 10.24963/ijcai.2021/403. URL https://arxiv.org/abs/2105.02936.
[30] Noam Slonim, Ehud Aharoni, and Koby Crammer. Hartigan's K-means Versus Lloyd's K-means: Is It Time for a Change? In Proceedings of the Twenty-Third International Joint Conference on Artificial Intelligence, pages 1677–1684. AAAI Press, 2013. ISBN 978-1-57735-633-2. URL http://dl.acm.org/citation.cfm?id=2540128.2540369. Series Title: IJCAI '13.
[31] Colin Taylor and Michael Gowanlock. Accelerating the Yinyang K-Means Algorithm Using the GPU. In 2021 IEEE 37th International Conference on Data Engineering (ICDE), pages 1835–1840, April 2021. doi: 10.1109/ICDE51399.2021.00163. URL https://ieeexplore.ieee.org/abstract/document/9458604. ISSN: 2375-026X.
[32] Matus Telgarsky and Andrea Vattani. Hartigan's Method: k-means Clustering without Voronoi. In Yee Whye Teh and Mike Titterington, editors, Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, volume 9, pages 820–827, Chia Laguna Resort, Sardinia, Italy, 2010. JMLR Workshop and Conference Proceedings. URL http://proceedings.mlr.press/v9/telgarsky10a.html. Series Title: Proceedings of Machine Learning Research.
[33] Matus Telgarsky and Andrea Vattani. Hartigan's method: k-means clustering without Voronoi. In Proceedings of the 13th International Conference on Artificial Intelligence and Statistics (AISTATS), pages 820–827, 2010.
[34] Shuo Yang, Haocheng Xi, Yilong Zhao, Muyang Li, Xiaoze Fan, Jintao Zhang, Han Cai, Yujun Lin, Xiuyu Li, Kurt Keutzer, Song Han, Chenfeng Xu, and Ion Stoica. Flash-KMeans: Fast and Memory-Efficient Exact K-Means, April 2026. URL http://arxiv.org/abs/2603.09229. arXiv:2603.09229 [cs].
A Worked Example
This section follows one batch from screening through the exact fallback. The example uses two-dimensional observations divided among clusters. At the start of the batch, the cluster sizes and centroids are
The symbols denote the eight candidate observations considered for this batch of size ; they do not denote all observations. The other 46 observations determine the cluster sizes and centroids above but are omitted from the plots.
A.1 Step 1: Screen Stable Candidates
The screening step decides whether an observation needs any new distance calculation. Three candidates are already stable:
| candidate | coordinates | current cluster | |
|---|---|---|---|
| (1.70, 1.10) | (0.4, 3.5) | ||
| (5.20, 4.10) | (0.3, 3.1) | ||
| (8.10, 1.80) | (0.3, 3.0) |
Each satisfies , so the assigned centroid remains closer than any competing centroid under the stored cross-batch bounds. These three observations are skipped. The five remaining candidates enter the batch.
A.2 Step 2: Compute the Batch Distances
The active observations are stacked as the five rows of . One GEMM evaluates all squared distances:
Table 7 gives both the coordinates and the resulting rows of . The “current cluster” column records the assignment before this batch; it is not inferred from marker color or shape.
Table 7: The five active observations and the squared distances computed by one GEMM.
| Point | Coordinates | Current cluster | |||
|---|---|---|---|---|---|
| (2.40, 0.80) | 0.20 | 17.00 | 32.80 | ||
| (4.80, 4.40) | 19.40 | 0.20 | 16.00 | ||
| (7.60, 2.30) | 33.05 | 9.65 | 0.25 | ||
| (4.00, 4.00) | 13.00 | 1.00 | 20.00 | ||
| (3.25, 2.32) | 3.30 | 5.88 | 22.66 |
A.3 Step 3: Certify Safe Decisions
The S1/S2 tests combine the precomputed distances with the current cluster sizes and drift bounds. They certify four of the five active observations:
-
satisfy the safe-stay condition (S2): for each point, every candidate cluster's lower-bound Hartigan cost is at least the current cluster's upper-bound cost. Therefore they remain in , and , respectively.
-
satisfies the safe-move condition (S1): the upper-bound cost of moving to is below both the lower-bound cost of remaining in and the lower-bound cost of moving to any other candidate cluster. Therefore it moves from to .
-
is not certified by either test and is deferred to the sequential fallback.
The ambiguity of can be seen numerically. The move of permits centroid drifts and . Applying the Hartigan weights and the distance bounds from Lemma 4.1 gives
The intervals overlap on [4.13, 4.25]. Therefore the upper bound for staying is not below the lower bound for moving, so S2 cannot certify a stay; S1 also cannot certify a move.
Figure 3 visualizes Steps 1 and 3. In both panels, horizontal and vertical position are simply the observation's first and second feature values. Color and shape encode only the computational status stated in each legend, not cluster membership.
(a) Screening: eight candidates become five active points

(b) Certification: four safe decisions and one fallback

Figure 3: The eight candidate observations in the worked example. (a) Gray crosses are removed by cross-batch screening, while blue open circles proceed to the GEMM. (b) Green circles are certified S2 stays, the red star is the S1 move from to , and the orange diamond requires exact fallback. Black triangles are centroids in both panels. The axes give the two feature coordinates.
A.4 Step 4: Apply the Certified Move
The three S2 decisions leave their assignments unchanged. Applying the single S1 decision moves from to , so the sizes change from to . Both affected centroids must be updated:
This is the bulk-update result: the three certified stays require no change, and the one certified move updates only its source and destination clusters.
A.5 Step 5: Resolve the Ambiguous Point Exactly
The fallback now processes against the updated centroids and sizes. The exact squared distances are
Because currently belongs to , staying uses the removal weight . Moving to or uses the corresponding insertion weight. The exact Hartigan costs are therefore
The current-cluster cost 4.244 is the smallest, so the exact fallback keeps in . The batch is complete: three observations were screened before GEMM, four decisions were certified from the precomputed distances and bounds, and only one observation required exact sequential work.
B Visual Depiction of Batched Hartigan Bounds
Figure 4 illustrates the geometric interpretation of the Hartigan cost bounds and used for safe reassignment decisions. Each point has a precomputed distance to each centroid , but subsequent reassignments of other points cause centroids to drift by at most . The triangle inequality then bounds the true (unknown) distance within an interval, and the Hartigan weight converts these distance bounds into cost bounds. Geometrically, each cluster's possible Hartigan cost occupies an annular band centered on : the inner arc corresponds to and the outer arc to .
When the bands are well-separated, a decision can be made without recomputing exact distances: (S1) if the worst-case candidate cost is still below the best-case current cost, the point is safely moved; (S2) if the best-case cost of every candidate exceeds the worst-case current cost, the point safely stays. Large clusters produce narrower bands (the Hartigan weight approaches 1), making safe decisions more likely.

Figure 4: Geometric interpretation of Hartigan cost bounds. Dashed circles show centroid drift uncertainty (the true centroid lies somewhere inside). Colored bands show the range of possible values (Hartigan-weighted distance from ); inner arcs are , outer arcs are . The Hartigan weight shrinks bands for large clusters, making safe decisions more frequent. Left: so the point safely moves (worst-case candidate still better than best-case current). Right: for all , so the point safely stays (best-case candidate still worse than worst-case current).
C Per-k Runtime Results
This section reports the -dependence underlying the aggregate runtime comparison in subsection 5.3. We use the eight datasets with and complete Lloyd timings.
Figure 5 shows Batched Hartigan speedup relative to Lloyd for each dataset and .

Figure 5: Batched Hartigan speedup relative to Lloyd by dataset and . Color encodes log-base-two speedup; is parity and higher is faster.
Table 8 summarizes all three comparisons over the same datasets.
Table 8: Per- speedup relative to Lloyd. Entries are mean (minimum–maximum); higher is faster.
| Prior H. (C++) | Elkan | Batched H. (ours) | |
|---|---|---|---|
| 2 | 2.6 (0.3–4.6) | 12.8 (2.6–23.7) | 8.5 (1.2–21.3) |
| 4 | 2.3 (0.3–5.9) | 13.2 (4.0–23.4) | 10.6 (2.0–26.0) |
| 8 | 1.6 (0.5–3.1) | 12.0 (3.8–19.6) | 9.9 (0.8–21.9) |
| 16 | 0.9 (0.2–1.2) | 9.6 (2.8–16.8) | 9.4 (0.7–19.4) |
| 32 | 0.7 (0.3–1.2) | 8.6 (3.7–13.0) | 8.4 (1.2–17.2) |
| 64 | 0.6 (0.2–0.9) | 7.3 (4.5–11.4) | 6.5 (2.3–11.8) |
| 128 | 0.4 (0.1–1.2) | 6.0 (4.4–8.4) | 4.6 (3.0–6.9) |
Elkan and Batched Hartigan retain the same order of speedup at every . Mean prior C++ Hartigan speedup falls below Lloyd from onward.
D Dataset Characteristics
This section reports the input scales and preprocessing used in section 5. Table 9 lists all datasets in increasing order of .
Features were used at source scale without additional normalization. For UCI data, nonnumeric or entirely missing columns and rows containing missing feature values were removed. LIBSVM inputs were densified without rescaling.
E Sparse Results
This section reports the density and runtime context for the sparse-data quality results in subsection 5.1. We evaluated 11 LIBSVM datasets in CSR format using shared -means++ initializations, three trials, when , and at most 300 iterations.
Table 10 reports dataset scale, the best observed inertia ratio, and runtime at the corresponding .
Across all 213 configurations, runtime speedup ranged from to , with median ; Batched Hartigan was faster in 72 configurations. Quality and runtime gains therefore occur in different regimes.
Table 9: Dataset dimensions and total dense data elements.
| Dataset | N | D | N × D |
|---|---|---|---|
| phishing | 11,055 | 68 | 752K |
| MAGIC Gamma | 19,020 | 10 | 190K |
| Letter | 20,000 | 16 | 320K |
| Superconductivity | 21,263 | 81 | 1.7M |
| Shuttle | 58,000 | 7 | 406K |
| cod-rna | 59,535 | 8 | 476K |
| mnist | 60,000 | 780 | 46.8M |
| connect-4 | 67,557 | 126 | 8.5M |
| aloi | 108,000 | 128 | 13.8M |
| Sepsis | 110,341 | 3 | 331K |
| skin-nonskin | 245,057 | 3 | 735K |
| covtype | 581,012 | 54 | 31.4M |
| SUSY | 5,000,000 | 18 | 90M |
Table 10: Sparse benchmark results. The inertia ratio is Batched Hartigan divided by Elkan for the best observed trial. Runtime speedup is median Elkan time divided by median Batched Hartigan time over three trials at the selected k; values above one favor Batched Hartigan.
| Dataset | N | D | Density | k | Inertia ratio | Runtime speedup |
|---|---|---|---|---|---|---|
| breast-cancer | 683 | 10 | 1.0000 | 128 | 0.9504 | 1.51× |
| leukemia | 38 | 7,129 | 1.0000 | 16 | 0.9134 | 0.25× |
| duke | 44 | 7,129 | 1.0000 | 4 | 0.8201 | 0.29× |
| bibtex | 7,395 | 1,836 | 0.0374 | 4 | 0.9639 | 1.73× |
| sector | 6,412 | 55,197 | 0.0030 | 256 | 0.9866 | 1.57× |
| news20 | 15,935 | 62,061 | 0.0013 | 8 | 0.9030 | 0.10× |
| rcv1_multi | 15,564 | 47,236 | 0.0014 | 256 | 0.9933 | 1.83× |
| E2006-tfidf | 16,087 | 150,360 | 0.0083 | 32 | 0.9891 | 0.34× |
| scotus | 7,800 | 126,405 | 0.0107 | 256 | 0.9775 | 0.23× |
| Wiki10-31K | 20,762 | 104,374 | 0.0065 | 256 | 0.9845 | 0.28× |
| real-sim | 72,309 | 20,958 | 0.0024 | 256 | 0.9794 | 1.25× |
F Lloyd Refinement
This section evaluates Batched Hartigan initialized from a converged Lloyd solution. This refinement is valid because Hartigan fixed points form a subset of Lloyd fixed points [33].
For each dataset and selected k, we ran five shared k-means++ initializations. Elkan was run to a Lloyd fixed point; Batched Hartigan was run both from the original initialization and from Elkan's converged centers. Table 11 reports quality and refinement cost.
Table 11: Batched Hartigan as a Lloyd refinement. Direct is the best observed Batched-Hartigan-to-Elkan inertia ratio from the original three-trial sweep; Refine is the median ratio over five refinement trials. Overhead is the median of 100 .
| Dataset | N | D | Density | k | Direct | Refine | Overhead |
|---|---|---|---|---|---|---|---|
| breast-cancer | 683 | 10 | 1.0000 | 128 | 0.9504 | 0.9754 | 44.1% |
| leukemia | 38 | 7,129 | 1.0000 | 16 | 0.9134 | 0.9407 | 305.4% |
| duke | 44 | 7,129 | 1.0000 | 4 | 0.8201 | 0.9551 | 298.5% |
| bibtex | 7,395 | 1,836 | 0.0374 | 4 | 0.9639 | 0.9864 | 75.7% |
| sector | 6,412 | 55,197 | 0.0030 | 256 | 0.9866 | 0.9869 | 77.2% |
| news20 | 15,935 | 62,061 | 0.0013 | 8 | 0.9030 | 0.9305 | 493.8% |
| rcv1_multi | 15,564 | 47,236 | 0.0014 | 256 | 0.9933 | 0.9934 | 63.5% |
| E2006-tfidf | 16,087 | 150,360 | 0.0083 | 32 | 0.9891 | 1.0073 | 130.1% |
| scotus | 7,800 | 126,405 | 0.0107 | 256 | 0.9775 | 0.9801 | 392.9% |
| Wiki10-31K | 20,762 | 104,374 | 0.0065 | 256 | 0.9845 | 0.9917 | 362.7% |
| real-sim | 72,309 | 20,958 | 0.0024 | 256 | 0.9794 | 0.9843 | 81.6% |
Refinement lowered median inertia on 10 of 11 datasets, but its ratio was higher than the selected direct-start result in every row. Refinement added 44.1–493.8% of one Elkan run. We did not evaluate matched-budget independent Lloyd restarts, so these results do not establish a comparison with that strategy.
G Ablation Study
We conduct two ablation studies to validate the design of Batched Hartigan: (1) a component-removal study showing that each algorithmic component contributes meaningfully, and (2) a hyperparameter sensitivity study confirming that defaults are robust across diverse datasets. All experiments use single-threaded NumPy (no multi-core BLAS), tolerance , maximum 1000 iterations, and are averaged over 2 trials with shared -means++ initialization. Seven datasets are tested spanning to .
G.1 Component Removal
We test five ablated variants against the full Batched Hartigan algorithm:
-
No BuildBatch: Screening is disabled; all points are treated as unsettled every epoch, eliminating the savings from skipping converged points.
-
No Parallel: The bulk GEMM-based reassignment path is disabled; all unsettled points are processed by the sequential kernel with per-point cost.
-
No Sequential: The drift-aware sequential bounds (S1/S2) are disabled; ambiguous points are resolved by brute-force exact-distance Hartigan reassignment.
-
No Dynamic : Batch size is fixed at (no EMA-based adaptation).
-
No Dynamic : Batch size is fixed at .
Table 12 reports the wall-time ratio of each variant relative to the full algorithm (values >1 indicate slowdown). All variants converge to equivalent inertia (<0.01% difference), confirming that the components affect speed, not solution quality.
Table 12: Component ablation: wall-time ratio relative to full Batched Hartigan. Values >1 indicate slowdown. Bold marks the most impactful removal per row.
| Dataset | No Build | No Par. | No Seq. | No Dyn._max | No Dyn._min | |
|---|---|---|---|---|---|---|
| phishing | 8 | 1.48 | 0.71 | 0.97 | 0.95 | 5.10 |
| 32 | 1.26 | 0.80 | 1.05 | 1.00 | 3.63 | |
| Letter | 8 | 1.86 | 0.69 | 0.95 | 0.98 | 6.26 |
| 32 | 1.58 | 0.80 | 0.87 | 0.89 | 5.94 | |
| 128 | 2.00 | 0.92 | 1.00 | 1.03 | 3.47 | |
| mnist | 8 | 1.55 | 0.93 | 1.32 | 1.00 | 2.73 |
| 32 | 1.11 | 0.93 | 1.51 | 1.00 | 1.90 | |
| 128 | 1.34 | 1.05 | 1.53 | 1.01 | 1.42 | |
| connect-4 | 8 | 1.62 | 0.72 | 1.02 | 0.95 | 4.85 |
| 32 | 1.46 | 0.96 | 1.15 | 1.00 | 3.50 | |
| 128 | 1.43 | 0.84 | 1.21 | 1.01 | 1.97 | |
| aloi | 8 | 2.23 | 0.69 | 0.99 | 0.96 | 5.59 |
| 32 | 2.10 | 0.87 | 1.05 | 1.00 | 4.49 | |
| 128 | 1.20 | 0.68 | 1.07 | 1.00 | 2.29 | |
| covtype | 8 | 4.03 | 0.69 | 1.00 | 1.00 | 5.81 |
| 32 | 18.91 | 1.23 | 0.83 | 0.83 | 5.68 | |
| 128 | 10.90 | 0.67 | 0.76 | 1.02 | 3.11 | |
| SUSY | 8 | 3.12 | 0.87 | 1.02 | 1.00 | 8.13 |
| 32 | 9.55 | 1.27 | 0.99 | 1.00 | 8.93 | |
| 128 | 4.73 | 0.94 | 0.98 | 0.99 | 3.82 |
Screening (BuildBatch) is consistently important. Removing screening forces reprocessing of all points every epoch, producing slowdowns that grow with dataset size. On covtype (, ): slower; on SUSY (, ): slower. On large datasets most points are stable after early epochs, and screening correctly identifies them.
The parallel path is critical for large and large . Table 13 shows the fraction of non-screened point operations resolved by the parallel BLAS path versus those requiring sequential processing.
Table 13: Impact of removing the parallel path. Without it, all non-screened operations become sequential -per-point work, growing dramatically with and — up to on SUSY ().
| Dataset | % Parallel (full) | Seq. ops ratio | Iter. ratio | |
|---|---|---|---|---|
| phishing | 8 | 69.7% | ||
| 32 | 71.5% | |||
| Letter | 8 | 80.4% | ||
| 32 | 86.4% | |||
| 128 | 90.5% | |||
| mnist | 8 | 87.7% | ||
| 32 | 89.9% | |||
| 128 | 94.4% | |||
| connect-4 | 8 | 81.0% | ||
| 32 | 85.1% | |||
| 128 | 87.1% | |||
| aloi | 8 | 94.5% | ||
| 32 | 95.5% | |||
| 128 | 96.8% | |||
| covtype | 8 | 98.8% | ||
| 32 | 99.1% | |||
| 128 | 99.2% | |||
| SUSY | 8 | 99.8% | ||
| 32 | 99.9% | |||
| 128 | 99.9% |
Without the parallel path, the volume of sequential operations increases by orders of magnitude on large datasets: on covtype () and on SUSY (). The growth with is clear: at the full algorithm resolves of non-screened points via bulk BLAS, but removing this forces all of them into per-point sequential processing. On SUSY this translates directly to a wall-time slowdown even in single-threaded execution.
Observed pruning rates. After epoch 2, cross-batch screening removes 50–95% of points. Of the remainder, the parallel safety path certifies 70–99.9% (Table 13); the sequential fallback handles fewer than 5% of points in steady state.
Fixed small batch size is catastrophic. Setting produces slowdowns across all configurations due to excessive per-batch overhead. The largest impact is on SUSY ( at ). The adaptive EMA-based sizing avoids this failure mode automatically.
The sequential drift-aware bounds provide modest but consistent benefit. Removing the sequential kernel's S1/S2 bounds (brute-forcing ambiguous points) incurs overhead on high-dimensional data (mnist ), where recomputing exact distances is expensive. On lower-dimensional data the brute-force cost is negligible.
G.2 Hyperparameter Sensitivity
We vary each hyperparameter independently by above and below its default, holding all others constant. Table 14 reports the wall-time ratio relative to the default configuration.
Table 14: Hyperparameter sensitivity: wall-time ratio vs. default. Values near 1.0 indicate insensitivity. All configurations produce equivalent inertia (<0.01% variation).
| Parameter | Default | Swept values | Median time ratio (range across datasets) | ||
|---|---|---|---|---|---|
| 64 | 6, 64, 640 | 1.00 (0.99–1.02) | 1.00 | 1.00 (0.99–1.01) | |
| 4096 | 410, 4096, 40960 | 1.81 (0.65–2.75) | 1.00 | 1.08 (0.72–3.29) | |
| 0.1 | 0.01, 0.1, 1.0 | 1.00 (0.91–1.25) | 1.00 | 1.00 (0.96–1.02) | |
| 0.5 | 0.05, 0.5, 5.0 | 1.00 (0.82–1.44) | 1.00 | 1.00 (0.97–1.02) | |
Only has a meaningful impact: reducing it to 410 causes median slowdown (more batches per epoch), while increasing it to 40,960 produces mixed results—faster on large-N/low-D datasets but up to slower on high-D data (mnist ) due to oversized GEMM operations. The remaining parameters () are essentially inert: perturbations in either direction produce <5% median runtime variation. Combined with zero effect on solution quality, this confirms that users need not tune these parameters.
H Supporting Lemmas and Proofs
The following lemma is used throughout the proofs below.
Lemma H.1 (Center drift). Suppose point is reassigned from cluster (with ) to cluster . Let denote the centroids before the move. Then the centroids after the move satisfy and with changes and \|\mu'_j^* - \mu_{j^*}\| = \frac{\|\mathbf{x}_i - \mu_{j^*}\|}{n_j^* + 1} respectively.
Proof of Lemma H.1 (Center drift). For removal:
Taking norms gives the removal result. For insertion:
\mu'_j^* - \mu_{j^*} = \frac{n_j^* \mu_{j^*} + \mathbf{x}_i}{n_j^* + 1} - \mu_{j^*} = \frac{\mathbf{x}_i - \mu_{j^*}}{n_j^* + 1},giving the result of the Lemma.
Proof of Lemma 4.2 (Commutativity of centroid updates). Each incremental update preserves the invariant . After any permutation of the operations, the membership set is , whose member sum and cardinality are permutation-invariant.
Proof of Lemma 4.1 (Distance bound propagation). (i) By the triangle inequality, , and the reverse triangle inequality gives the lower bound. Squaring preserves order on . (ii) The Hartigan weights are positive, so multiplying by the appropriate weight preserves the inequalities.
Theorem H.1 (Correctness of Batched Hartigan). Consider standard Hartigan (Algorithm 1) processing points in a fixed order . Let Batched Hartigan process the same points in the same order, partitioned into contiguous batches of size at most . If Batched Hartigan makes a reassignment only under condition (S1) and skips a reassignment only under condition (S2), falling back to exact distance computation in all ambiguous cases, then the sequence of moves produced by Batched Hartigan is identical to that of standard Hartigan.
Proof of Theorem H.1 (Correctness of Batched Hartigan). By induction on the position in the processing order.
Base case. The first point in the first batch has for all j, so all bounds are exact and conditions (S1), (S2) reduce to the standard Hartigan comparison.
Inductive step. Suppose that through points , Batched Hartigan has produced the same moves as standard Hartigan. Then the cluster state (memberships, sizes, centroids) is identical at step b. For point b:
• The precomputed distances were computed with respect to .
• The cumulative drifts correctly bound by Definition 4.1.
• The sizes are tracked exactly.
If (S1) holds, the true Hartigan cost to is at most , which is strictly less than the lower bound on every other option. Exact Hartigan would also choose . If (S2) holds, the true cost to every candidate is at least , which exceeds the true cost of staying. Exact Hartigan would also keep the point. If neither holds, exact distances are recomputed, so the decision is trivially identical. In every case the move matches, the induction carries, and the cluster state remains synchronised.
Proof of Lemma 4.3 (Aggregate batch bounds). (i) Let denote the total drift of cluster after moves within the batch have been processed (in any order), with . We show for all .
Per-move drift. Suppose that at step a point is added to or removed from cluster . By Lemma H.1, the centroid shift is
where denotes for removal or for insertion (both since at most points leave cluster j).
Bounding the intermediate distance. The numerator involves the intermediate centroid , not the precomputed . By the triangle inequality:
Recurrence. Combining (4) and (5), and bounding the denominator below by :
Write . With the recurrence unrolls by induction to
where the second inequality holds because is largest for and (Lemma 4.3).
It remains to bound by . We use the elementary inequality
(8) where the first step is and the second follows from for (since and the value at is 1). Applying (8) to (7) with and :
Since only of the batch moves touch cluster and the recurrence is monotone in , the bound holds for every intermediate step.
(ii) During sequential processing, the size of cluster lies in . The Hartigan weight for the current cluster is , which is maximised when is smallest. The smallest possible size when processing point is , where excludes 's own tentative departure (which has not yet occurred when is evaluated), giving (Lemma 4.3(ii)). The candidate weight is minimised when is smallest, giving . Combining these weights with the squared-distance bounds from (i) yields the Hartigan cost bounds.
(iii) For safe-move verification, the worst-case directions reverse: we need the smallest current-cluster weight (maximise , giving ) and the largest candidate weight (maximise , giving ).
Proof of Lemma H.2 (Aggregate bounds with pre-existing drift). The argument follows the drift recurrence (6) from Lemma 4.3, but with a nonzero initial condition. Write and let denote the total drift from the GEMM centroids after moves within have been processed. Now (not zero).
The per-move drift bound (4) and intermediate distance bound (5) are unchanged, since they depend only on the triangle inequality and the current cluster size (which is at least ). The recurrence (6) therefore reads
with . Unrolling:
Applying the elementary bound from (8) with and :
Since is monotonically non-decreasing in and only moves touch cluster , the bound holds at every intermediate step. When , the expression reduces to from Lemma 4.3.
Lemma H.2 (Aggregate bounds with pre-existing drift). Let be a set of points with tentative decisions having aggregate flow , and batch quantities as in Lemma 4.3, computed with respect to sizes . Suppose . Write , , and assume . Then at every intermediate step, , where .
Proof of Theorem 4.1 (Partial parallel batch correctness). (a) Restricting the batch to gives reduced flow , , , and . The restricted drift bound therefore satisfies
Points in satisfy (S1) or (S2) under the larger bound , hence they also satisfy the conditions under . By Lemma 4.3, the drift at every intermediate step of a hypothetical sequential processing of remains within , so each decision is correct: the Hartigan cost strictly decreases. By Lemma 4.2, the bulk centroid update yields the same final state as any sequential ordering of 's movers.
(b) After executing 's bulk update, the actual per-cluster displacement from the GEMM reference is . This is an exact measurement (not a bound). Sequential processing of starting from this centroid state uses the SequentialBatch algorithm (Algorithm 3) with per-cluster drift initialised to . The drift at every subsequent step is bounded by Lemma H.2 (Lemma H.2). Each point in therefore evaluates Hartigan cost bounds that are valid—tighter than under —and makes the optimal reassignment decision or falls through to the exact-distance computation.
(c) Every accepted move (whether from or ) strictly decreases : moves from by part (a), and moves from because each sequential decision is a valid Hartigan move with respect to the current centroid state. Since is bounded below and strictly decreases with each accepted move, the algorithm terminates in a finite number of epochs.
At convergence, no points move, so and for all . Every point is in (all are safe stayers) and the partition satisfies: for every point in cluster , no single-point move to any cluster would decrease . This is exactly the Hartigan fixed-point condition.
Proof of Lemma 4.4 (Cross-batch bound validity). Let the bounds be set exactly after batch from a GEMM, with snapshots and .
Upper bound. By the triangle inequality, at any later batch :
where the second inequality uses the triangle inequality on the cumulative drift: .
Lower bound. For any cluster , the reverse triangle inequality gives . Taking the minimum over :
It remains to show . Expanding the left side:
where the inequality holds because for any non-negative (the sum of per-step maxima dominates the maximum of per-cluster sums). Therefore is a valid lower bound.
I GPU Speedup

Figure 6: GPU speedup after optimization (NVIDIA Tesla T4). Bars show mean speedup across 14 datasets (Letter Recognition, MAGIC Gamma Telescope, SUSY, Sepsis Survival, Skin Segmentation, Statlog Shuttle, Superconductivity, aloi, cod-rna, connect-4, covtype, mnist, phishing, skin-nonskin). Error bars indicate min-max range across datasets. Optimizations: (1) Persistent GPU memory: centers and cluster sizes remain on GPU across batches within each epoch, updated in-place; (2) GPU-resident distance computation: GEMM output () stays on GPU for downstream operations; (3) Vectorized tentative decisions: broadcast Hartigan weights to (), compute element-wise costs, parallel row-wise argmin on GPU instead of nested CPU loops; (4) GPU-accelerated S1/S2 safety checks: compute distance bounds on GPU, transfer only boolean mask ( bits) instead of intermediate matrices ( floats). Performance trends: For , fixed GPU overheads (kernel launch, synchronization, memory allocation) dominate, resulting in average speedup (19% slower). For , performance approaches parity (). For , the operations achieve high GPU occupancy and amortize fixed costs, yielding average speedup with best case on SUSY (). See Figure 7 for per-dataset breakdown.

Figure 7: Per-dataset GPU speedup breakdown (line plot). Six representative datasets shown across all values. Key observations: (1) Large datasets with high dimensionality benefit most: SUSY () achieves at ; covtype () achieves ; Skin Segmentation () achieves . (2) Small, low-dimensional datasets suffer: MAGIC Gamma () and Letter Recognition () show 50–60% slowdown for . (3) Pathological case: Statlog Shuttle () shows severe degradation ( at ), likely due to small batch sizes and poor GPU occupancy. (4) Crossover point: Most datasets achieve parity around and benefit at . This heterogeneity suggests adaptive backend selection: use CPU for small or small datasets, GPU for large with sufficient data.
NeurIPS Paper Checklist
1. Claims
Algorithm 7 Baseline GPU Batch Processing
Input: Batch , centers
GPU: Transfer , to GPU
GPU: Compute
Transfer:
CPU: Compute tentative assignments
for to do
for to do
Compute weighted distance
weighted distance
CPU: S1/S2 safety checks
CPU: Update centers, cluster sizes
Output: Updated centers, labels
Algorithm 8 Optimized GPU Batch Processing
Input: Batch , persistent
GPU: Transfer to GPU only
GPU: Compute [keep on GPU]
GPU: Vectorized tentative assignments
costs
GPU: S1/S2 safety checks (vectorized)
Transfer: Safety mask
CPU: Update centers, cluster sizes
Output: Updated centers, labels
Figure 8: Comparison of baseline and optimized GPU batch processing. Key changes (blue): (1) Keep distance matrix on GPU throughout processing; (2) Vectorize tentative decisions as parallel matrix operations instead of nested CPU loops; (3) Compute safety checks on GPU, transfer only boolean mask; (4) Persist centers on GPU across batches (not shown). Data transfer reduced from floats to bools. Speedup scales with because GPU parallelism increases while fixed overheads remain constant.
Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Answer: [Yes]
Justification: The abstract and introduction state the computational motivation, the Batched Hartigan contribution, and the main empirical claims. These claims are supported by the algorithmic development in Sections 4–5 and the appendix experiments.
2. Limitations
Question: Does the paper discuss the limitations of the work performed by the authors?
Answer: [Yes]
Justification: The paper discusses important limitations in Sections 4.3, 5.3, and 6, including the dependence on batch size, dimensionality, and the limited current benefit for multi-core/GPU-style parallelism.
3. Theory assumptions and proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?
Answer: [Yes]
Justification: The theoretical statements define their assumptions in Sections 4.1–4.4. Complete proofs for the stated lemmas and theorems are provided in Appendix H.
4. Experimental result reproducibility
Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?
Answer: [Yes]
Justification: The paper gives the algorithms, datasets, tested values, number of trials, initialization, and hardware in Section 5 and Appendix G.
5. Open access to data and code
Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?
Answer: [No]
Justification: The code will be released soon; the bureaucracy is expanding to meet the needs of the expanding bureaucracy. Sorry about that.
6. Experimental setting/details
Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer) necessary to understand the results?
Answer: [Yes]
Justification: Section 5 specifies the initialization, tested range, trial count, aggregation statistic, compared algorithms, dataset scale, and single-threaded hardware setting. Appendix G gives additional algorithm hyperparameters and ablation settings.
7. Experiment statistical significance
Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Answer: [No]
Justification: The main results report medians over independent trials but do not provide error bars, confidence intervals, or significance tests.
8. Experiments compute resources
Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Answer: [Yes]
Justification: Section 5 reports single-threaded wall-clock times on an Apple M4 Pro. No exotic compute is needed.
9. Code of ethics
Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines?
Answer: [Yes]
Justification: The work studies a clustering algorithm and evaluates it on benchmark datasets without human-subject experiments, high-risk model release, or privacy-sensitive data collection described in the paper. We are not aware of any aspect of the research that deviates from the NeurIPS Code of Ethics.
10. Broader impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [No]
Justification: We don't think anyone is concerned that clustering could lead to evil AGI.
11. Safeguards
Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pre-trained language models, image generators, or scraped datasets)?
Answer: [N/A]
Justification: The paper does not release high-risk pretrained models, image generators, scraped datasets, or other assets with a high risk of misuse. Therefore special release safeguards are not applicable.
12. Licenses for existing assets
Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Answer: [No]
Justification: The paper cites the algorithms and implementations used for comparison, but it does not explicitly state dataset/code package versions, licenses, or terms of use for all existing assets.
13. New assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer: [N/A]
Justification: Released code will be licensed at its Github repo.
14. Crowdsourcing and research with human subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?
Answer: [N/A]
Justification: The paper does not involve crowdsourcing experiments or research with human subjects. No participant instructions, screenshots, or compensation details are applicable.
15. Institutional review board (IRB) approvals or equivalent for research with human subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [N/A]
Justification: The paper does not involve crowdsourcing or research with human subjects. IRB or equivalent approval details are therefore not applicable.
16. Declaration of LLM usage
Question: Does the paper describe the usage of LLMs if it is an important, original, or non-standard component of the core methods in this research? Note that if the LLM is used only for writing, editing, or formatting purposes and does not impact the core methodology, scientific rigor, or originality of the research, declaration is not required.
Answer: [N/A]
Justification: The core method development does not use LLMs as an important, original, or non-standard research component. Any LLM use limited to writing, editing, or formatting would not require declaration under this checklist item.