- Rating
- 4
- Clarity
- 3
- Confidence
- 4
- Originality
- 2
- Quality
- 3
- Significance
- 3
Read review
Summary
The paper introduces Flash-KMeans, an exact GPU implementation of Lloyd k-means designed around memory and synchronization bottlenecks. It combines FlashAssign, which avoids materializing the N x K distance matrix via fused online argmin, with Sort-Inverse Update, which reduces atomic contention through sorted segment-level centroid reductions, plus out-of-core streaming and compile-time heuristics. Experiments report substantiareport substantial kernel and end-to-end speedups over GPU baselines, including scaling to one billion points.
Strengths and weaknesses
Strengths:
- The paper emphasizes that GPU k-means pe The paper emphasizes that GPU k-means performance is often limited less by FLOP count than by memory movement and atomic-write behavior. The profiling discussion, including the very low effective bandwidth of the contended update stage, gives the design a concrete systems motivation.
- The two main kernel ideas are technically sound and well matched to the diagnosed bottlenecks. FlashAssign is a natural IO-aware fusion of distance computation and argmin, and Sort-Inverse Update is a sensible way to trade irregular scatter atomics for more regular segmented reductions.
- The experiments covers many relevant shape regimes by sweeping N, K, d, and batch size, and compares against several widely used GPU baselines. The kernel-level breakdown is especially useful because it separately validates the assignment and update optimizations rather than relying only on aggregate end-to-end speedups.
Weaknesses:
- Both core ideas are fairly direct applications of established GPU systems patterns. FlashAssign is online argmin via IO-aware tiling, which is a simplified case of FlashAttention's online softmax (argmin needs no rescaling/normalization). Sort-Inverse Update is the classic sort-then-segmented-reduce pattern that is standard practice for replacing scatter atomics in GPU computing, and the paper itself cites prior work (e.g., [29,30]) that transforms irregular atomic writes into sort+segmented reductions. The contribution is therefore primarily a well-executed engineering synthesis rather than a new idea. This makes the work feel closer in scope to a systems/MLSys contribution than to a core NeurIPS algorithmic contribution.
- Baseline fairness is insufficiently documented, and some comparisons are hard to interpret. It is not stated whether all methods run the same number of iterations, the same numerical precision (fp32 vs tf32/fp16), the same convergence criterion, and whether index-build / one-time setup costs (e.g., FAISS) are excluded from per-iteration latency.
- The motivation centers on online k-means inside LLM and video pipelines (KV-cache compression, semantic dedup, token merging), but all evaluation is synthetic micro benchmarking on random shapes. There is no demonstration that the kernel speedup translates into measurable improvement in any of the cited real workloads, which weakens the significance argument.
- There are writing issues (e.g., 'bes baselines' on line 290 should be 'best baselines'), and the abstract/conclusion headline numbers (200x, 33x) are not always tied to a specific figure, making them hard to locate and verify.
Questions
- For the headline comparisons (especially FAISS >200x and cuML 33x), can you confirm that all methods use the same number of Lloyd iterations, the same numerical precision (fp32 vs tf32/fp16), the same convergence/init, and that one-time index-build or setup costs are excluded from per-iteration latency? A table making these settings explicit would help. What explains the >200x gap vs FAISS specifically? 2. How many repetitions were run, and how were warm-up, outliers, and run-to-run variance handled? Could you add error bars (or report median with inter-quantile range) for the key speedup figures?
- Can you provide an end-to-end accounting that includes the per-iteration argsort and the sorted gather of features, and show how the 6.3x holds across regimes (small K with long segments vs large K with short segments, and large N where the sort itself becomes bandwidth-bound)?
- Can you show that the kernel speedup yields a measurable improvement in at least one of the motivating workloads (e.g., KV-cache compression or semantic dedup), rather than only on synthetic shapes?
Limitations
Not fully. The paper includes a short limitations discussion about specialized accelerators such as TPUs and Trainium, and the checklist discusses some compute and reproducibility items. However, several important limitations should be explicitly addressed in the paper: the per-iteration argsort overhead and regimes where it may be less favorable; the absence of timing variance; and the lack of validation in the downstream workloads used as motivation.
Paper formatting concerns
No major formatting or anonymity concerns noticed. Minor typo: 'bes baselines' (Sec. 6 line 290) should read 'best baselines'.
Final justification
The rebuttal substantially resolves my concerns about baseline fairness, reproducibility, full-path accounting, and transfer to real workloads through matched FP32 settings, repeated measurements with variance, complete sorting/gathering costs, and new end-to-end experiments. The remaining limitation is conceptual novelty, since the methods primarily combine established GPU primitives through careful systems engineering, and the headline speedups require precise qualification by setting. I therefore give strong positive weight to the improved empirical evidence but retain some reservation about novelty, and maintain my score of 4 (Borderline Accept).
Weakness 1
We agree with the reviewer that online argmin and sort-then-segmented-reduce are established primitives. However, as our comparison with cuVS demonstrates, simply applying these primitives is insufficient to break the K-Means memory bottleneck. Although cuVS has proposed the fusedL2NN primitive for assignment, it does not deliver the corresponding speedup because its reduction state still round-trips through global memory under per-row locks. On the update side, no existing library ships a sort-based path; cuVS still uses an element-wise atomic scatter. Our core contribution is the execution architecture around these reductions—where their state lives, what interface the two stages share, and how the schedule adapts across (N, K, D, batch, architecture).
This architectural difference translates to substantial empirical gains: cuVS's fused assignment kernel runs 4–5× slower than FlashAssign at matched FP32 shapes—slower even than an unfused GEMM-then-argmin pipeline. On the update side, argsort is 24.5% of the optimized FP32 path, and the fully accounted Sort-Inverse update is still 4.23× faster (Question 3).
Regarding venue fit, just as FlashAttention (NeurIPS 2022) revealed that IO-awareness is critical for softmax, our work demonstrates that for K-Means, avoiding materialization is insufficient if the reduction state still round-trips to HBM. K-Means today is a high-frequency online primitive in KV-cache compression, semantic dedup, and token merging. The practical significance of this specific execution design is evidenced by its ongoing adoption: cuVS's maintainers have publicly made replacing their existing fused implementation with this execution design a P0-priority roadmap item; specifics are shared with the AC in a confidential comment because the reference would compromise anonymity.
Weakness 2
Thank you for raising this concern. All latency comparisons use FP32, the same data, and the same fixed number of Lloyd iterations. End-to-end measurements include the complete public API, including random initialization and per-call setup for all methods. Per-iteration and kernel measurements use identical pre-set centroids and exclude one-time setup. This choice does not drive the result: stripping initialization and setup still leaves ~19× at fixed iteration counts, and removing batching leaves a 5–7× per-iteration gap (Reviewer LLwd, Question 1). In the separate 100-trial convergence study, both methods use the same stopping criterion and converge in all trials, averaging 24.19 and 24.79 iterations for PyTorch Lloyd and Flash-KMeans. The mean paired final-WCSS gap is 1.91×10⁻⁴. We will make these settings explicit.
Weakness 3 & Question 4
Yes. We ran controlled engine swaps in three real K-Means consumers: everything in each pipeline is held fixed—same data, same initial centroids (cuVS run with
init_method="Array"), same iteration counts, FP32—and only the K-Means engine is switched between Flash-KMeans and cuVS. Output quality is identical (final inertia on SIFT1M: 44,441.8 versus 44,443.2; H100):Two observations. The PQ row is structural: cuVS exposes no batched interface, so the m=16 sub-quantizers must be trained as 16 sequential fits, whereas Flash-KMeans trains them in a single batched call—the batched design pays off directly inside a standard build recipe. The video row is one of the motivating workloads: semantic clustering runs at every denoising step, so over a 50-step generation the clustering stage alone costs about 2 s with Flash-KMeans versus about 14 s with cuVS. We will include end-to-end pipeline measurements in the revision.
The table uses the matched-initialization protocol, which is conservative: with cuVS's default initialization path (k-means++), the IVF-Flat build slowdown grows to ~30× (3.26 s versus 108 ms on SIFT1M).
Weakness 4
Thank you for catching these issues. We will correct the typo and tie each headline speedup to its corresponding figure and setting in the camera-ready version.
Question 1
Thank you for requesting clarification. We use the following protocol for the headline comparisons:
We will add this protocol table to the revision. Stripping initialization and per-call setup still leaves ~19× at fixed iteration counts (Reviewer LLwd, Question 1).
On FAISS specifically, we profiled GPU
faiss.Kmeansat B=1, N=8M, K=1024, and D=128 in FP32, with subsampling disabled and matched initial centroids. FAISS takes 712 ms per iteration versus 12.4 ms for a complete Flash-KMeans iteration—57× at fixed iteration counts. Its own statistics attribute 82% to generic 1-NN search, which materializes distance tiles, performs top-k, and re-streams the host-resident dataset; the remaining 18% is CPU centroid updates and transfers. The bridge from 57× to the >200× headline is native batching and per-call index setup; we will document it at the exact headline setting.Question 2
Thank you for the suggestion. We report the mean ± standard deviation over 50 timed runs after 10 warm-up runs. Measurement order is rotated across methods, and no samples are removed as outliers.
The end-to-end coefficient of variation is 0.12% for the standard implementation and 1.33% for Flash-KMeans. We will add these variance statistics to the revision.
Question 3
Thank you for the suggestion. We profiled the complete update path on an NVIDIA H200 at B=1, N=2²⁵ (33M), K=4096, and D=128 under FP32 precision. Results are mean ± standard deviation over 50 runs after 10 warm-up runs.
Thus, the fully accounted FP32 update speedup is 4.23×. Argsort contributes 24.5% at this large N and does not erase the benefit. Indexed gathering and localized reduction are fused in our Triton kernel and are therefore reported together. The controlled sweep from Reviewer LLwd, Question 3 is reproduced below:
At fixed K=1K and D=128, the Update speedup rises from 3.63× to 5.22× to 6.28× as N/K increases from 1024 to 4096 to 16384. We will include this detailed analysis in the paper.