Mini-batch kernel $k$-means
Ben Jourdan, Gregory Schwartzman
NeurIPS 2026
Abstract. We present the first mini-batch kernel -means algorithm, offering an order of magnitude improvement in running time compared to the full batch algorithm. A single iteration of our algorithm takes time, significantly faster than the time required by the full batch kernel -means, where is the dataset size and is the batch size. Extensive experiments demonstrate that our algorithm consistently achieves a 10-100x speedup with minimal loss in quality, addressing the slow runtime that has limited kernel -means adoption in practice. We further complement these results with a theoretical analysis under an early stopping condition, proving that with a batch size of , the algorithm terminates in iterations with high probability (assuming without loss of generality the kernel is normalized), where is a termination threshold. Our analysis holds for any reasonable center initialization, and when using -means++ initialization, the algorithm achieves an approximation ratio of in expectation. Taking and , the algorithm terminates in iterations, with each iteration running in time.
Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.
Claim this paperedit · history
NeurIPS 2026
Accept (poster) · 3 reviews · OpenReview
Updated 25 Nov 2026, 03:42 UTC.
- Decision
- Accept (poster)
Read decision
Meta-review
This paper introduces the first mini-batch algorithm for kernel -means allowing a speedup in practice of over an order of magnitude compared, which overcomes one of the main criticisms of kernel -means. The method is backed by theoretical analysis and shows competitive runtime and clustering accuracy on real-world datasets.
The strengths of the paper as pointed out by the reviewers are: originality and novelty on applying mini-batch optimization to kernel -means, theoretical guarantees and methods are appreciated, the writeup conveys the main intuition of the algorithm nicely and the experiments are spot on to demonstrate the promised speedups.
However, the reviewers point out a few points on confusion and suggestions for improvement. Notably, but not limited to:
- Reviewer 8JWS commented that the error tolerance parameter () and its dependence on make the complexity analysis a bit unintuitive, and suggest a way of simplifying the analysis. In their rebuttal, the authors incorporated the reviewer's suggestion regarding on-the-fly kernel normalization (setting ) and provided explicit overall time complexity bounds in terms of and .
- Reviewer hCyZ points out some difficulties in following Lemma 4.1, that not all claims of Theorem 1.1 are addressed, and raises some questions to the authors. The authors addressed the reviewer's concerns by (i) providing a detailed and expanded proof for Lemma 4.1 that tightened the dependence on the logarithmic term from quadratic to linear, (ii) explicitly mapping the proofs for all three claims of Theorem 1.1 in the appendix, and (iii) clarifying the use of the kernel trick for center updates.
Final justification
The paper presents a valuable algorithmic contribution to scalable kernel -means clustering. The reviewers unanimously recommend acceptance, and the authors have committed to incorporating all discussed clarifications into the camera-ready version. I recommend acceptance as a poster.
Read meta-review
Meta-review
This paper introduces the first mini-batch algorithm for kernel -means allowing a speedup in practice of over an order of magnitude compared, which overcomes one of the main criticisms of kernel -means. The method is backed by theoretical analysis and shows competitive runtime and clustering accuracy on real-world datasets.
The strengths of the paper as pointed out by the reviewers are: originality and novelty on applying mini-batch optimization to kernel -means, theoretical guarantees and methods are appreciated, the writeup conveys the main intuition of the algorithm nicely and the experiments are spot on to demonstrate the promised speedups.
However, the reviewers point out a few points on confusion and suggestions for improvement. Notably, but not limited to:
- Reviewer 8JWS commented that the error tolerance parameter () and its dependence on make the complexity analysis a bit unintuitive, and suggest a way of simplifying the analysis. In their rebuttal, the authors incorporated the reviewer's suggestion regarding on-the-fly kernel normalization (setting ) and provided explicit overall time complexity bounds in terms of and .
- Reviewer hCyZ points out some difficulties in following Lemma 4.1, that not all claims of Theorem 1.1 are addressed, and raises some questions to the authors. The authors addressed the reviewer's concerns by (i) providing a detailed and expanded proof for Lemma 4.1 that tightened the dependence on the logarithmic term from quadratic to linear, (ii) explicitly mapping the proofs for all three claims of Theorem 1.1 in the appendix, and (iii) clarifying the use of the kernel trick for center updates.
Final justification
The paper presents a valuable algorithmic contribution to scalable kernel -means clustering. The reviewers unanimously recommend acceptance, and the authors have committed to incorporating all discussed clarifications into the camera-ready version. I recommend acceptance as a poster.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 4/4
- Clarity
- 4/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
This paper introduces a new method of applying the mini-batch k-means algorithm to kernelized k-means. To save computation, it proposes a way of truncating which points are consideration if they were used in batches too far in the past. The paper gives theoretical and experimental results.
Strengths and weaknesses
-
The examples in figure 2 are not highly compelling. The image segmentations are fairly noisy, and it's unclear how many clusters are being used.
-
There has been work to accelerate kernel k-means with distance bounds (using triangle inequalities to bound how center movements affect point-center distances), and I think that that work could possibly combine with mini-batch k-means. It would be good to mention this as well.
-
Line 61: "Applying the mini-batch approach for kernel k-means is even more difficult because the assumption that cluster centers are always the mean of some subset of X in feature space no longer holds." -- this is an incorrect, or at least misleading, statement. The centers are the mean of some subset of X that has been mapped to the feature space H.
-
"This is a considerable speedup compared to the best known quadratic update time." This is true because b < n, but it is not because of the derivation (which is how the sentence reads). The asymptotic complexity of O(n(b+k)) is really no different than the standard quadratic formulation. In other words, if b = n, then they have the same asymptotic complexity of O(n^2).
-
Line 202: "from i to i-t" -- it feels more natural to me to use increasing order, so "from i-t to i" would read better.
-
Line 203: "It is the case that ... <= \tau + b" -- this is not obvious to me.
-
The proof of Lemma 4.1 is unclear:
- what allows the first equality?
- explain why the product (inside the norm) is upper-bounded by e^{-\sum}
- it's not clear at all why \sqrt{\tau / b} is greater than or equal to \ln(28\gamma / \epsilon).
- the second-to-last quantity has \ln(\epsilon / 28 \gamma), which could be misinterpreted as \ln((\epsilon / 28) \gamma). Extra parentheses would help here.
-
Somehow I read almost the entire paper before I realized that the proposed algorithm is keeping explicit representations for the cluster centers in the feature space (rather than employing the kernel trick). This point is made around line 61, but that point is much too subtle (and I disagreed with it the first time I read it, so I thought that the claim was incorrect). The point needs to be justified and emphasized. Further, it becomes unclear how something like an infinite-dimensional feature space (e.g. with a Gaussian kernel) could be used with the proposed formulation without the kernel trick.
The proposed algorithm can be implemented via the kernel trick. Suppose that c represents the previous center, and c' represents the center of mass based on a new batch. Then ||x - a*c - (1-a)c'||^2 can be written using only inner products between x, the points that comprise c, and the points that comprise c'. And the proposed algorithm could still truncate "old" points (those whose contribution disappears) in much the same way (by pruning the members of the old "c"). This would permit the algorithm to use the kernel trick exclusively.
-
The paper defines f_x(C), but never uses it in the paper (only in the appendix).
-
There are 3 claims given in Theorem 1.1, but after reading the paper only the first claim appears to be addressed in the paper (but not proven). The second claim is not addressed within the paper itself (it is in the appendix). The third claim is never supported in either.
-
There is no conclusion section in the paper.
-
The paper claims that the algorithm halts in O(1) iterations, but does not provide an experimental evaluation of that claim (all experiments run for a fixed number of iterations).
Questions
The key question I have is about whether the proposed algorithm actually uses the kernel trick, or instead keeps explicit centers in the feature space. The exposition of the paper leaves this unclear to me.
Limitations
The primary limitation of this paper is how effectively it can communicate the correctness of the proposed method, as well as the method with clarity enough to replicate the work (see my comments earlier about being uncertain about use of the kernel trick).
Final justification
I have considered the rebuttals from the authors, especially the clarifications on the kernel trick and the proof of Lemma 4.1.
Formatting concerns
Typo on line 127: "The authors do not"
1 comment
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 3/4
- Significance
- 3/4
- Originality
- 4/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The authors provided the first mini-batch kernel k means algorithm. While preserving performances similar to the regular kernel k means algorithm, the authors' method is significantly faster. The authors also provided theoretical guarantees and experiments on 4 real datasets to illustrate the accuracy and speed of their method.
Strengths and weaknesses
One strength of the paper is its originality. I was not able to find other papers that combined mini-batch and kernel k means. Regarding fundamental papers in each area, I think the authors properly cited the fundamental work in mini-batch k means, Sculley 2010 Web-scale k-means clustering, and also the fundamental work in kernel k means, Dhillon 2004 Kernel k-means, Spectral Clustering and Normalized Cuts.
Another strength of the paper is its significance. I think the authors did a great job in providing Figure 1 to illustrate the need to kernel k-means (as otherwise Sculley 2010 would be sufficient for practical purposes), and also providing Figure 2 to show their method’s improvement over the standard kernel k-means.
The paper also described most of the intuition of the algorithms well, for example on line 180. This significantly increased clarity and made it a lot easier to grasp the main ideas of the two algorithms.
I don’t think the paper has any significant weaknesses. I do have some suggestions that might be worth considering:
On line 201, when considering truncating the centers, there is the important parameter . Line 209 showed that when is sufficiently large theoretical guarantees hold, and also in the Discussion on line 258 it was said that even small values of works. What would be a good value of tau in practical situations, or equivalently, how should we determine the value of tau given a dataset? (for example, how was the value 50 selected on line 265)? It looks from line 230 that should be a lot smaller than b.
The batch size b is an input on line 172, and Algorithm 1 and Algorithm 2. How is the batch size, b, determined in practice? And how will the value of b affect computational speed or result accuracy?
On line 181, it might be helpful to define (even though the reader might already inferred what it is).
On line 185, second from last line, the inner product can be commutative only when both inputs are real numbers right? (which should be the case here)
On line 186, it is claimed that “Furthermore, it is possible to use dynamic programming to update the center”. I think it would be really helpful to give an intuition of the dynamic programming algorithm here.
Some algebra in this paper is above my current level. For example I was not able to fully understand the proof on line 213, or where the value 28 came from on line 212.
To the best of my knowledge, I did not find significant errors in Algorithm 1 and Algorithm 2, as well as the computational time of on line 230.
Questions
On lines 254 and 255, would it be possible if you can be a bit more detailed on what accuracy scores are here? For example does accuracy here means how well the clustering result matched the actual label, or does it mean something else?
On top of page 9, in the plot mnist_784, it seems that by using -minibatch kernel, the ARI, NMI, ACC criterion showed the mini-batch version actually outperformed the regular kernel version. Could you please provide some insight on how an algorithm using a subset of the data can actually outperform an algorithm using the entire dataset?
Limitations
I did not find the authors directly discussing the limitations. I want to ask if there could be a possible (maybe uncommon) situation where mini-batch kernel k means could lead to poor results compared regular kernel k means? In addition, would there be a situation where only regular kernel k means could be used (and mini-batch kernel k means cannot be used)? Thank you.
Final justification
Thank you to the authors for their response on my comments.
I would like to keep my rating of 5: Accept.
The authors addressed many of my questions, including the one on the selection of the value of , which could be for a future study. The authors also agreed to modifications (for example agreed to clarify on line 181 and adding a note on the Hungarian algorithm on lines 254,255).
I might be missing something here but did not fully understand the reason why "using mini-batches can allow us to escape bad local minima". It would be really helpful for the authors to elaborate a bit more on this point (this is a question regarding the top of page 9, in the mnist_784 plot, the ARI, NMI, and ACC criteria appear to show that the mini-batch kernel version outperformed the regular kernel version). However, I still think the current paper (with the modifications the authors mentioned) is a good paper.
Formatting concerns
I did not find formatting concerns.
4 comments
Rebuttal
Thank you for the positive evaluation and constructive feedback.
Reviewer comment: What would be a good value of in practical situations, or, equivalently, how should we determine the value of for a given dataset?
This is an excellent question. We don't really know and this would be an interesting topic for future work. If we had to guess, it may be because many clusters in real world kernel spaces follow the low dimensional manifold hypothesis: only a few points are needed to accurately represent them.
Reviewer comment: How is the batch size, , determined in practice? How does the value of affect computational speed and result accuracy?
This value is also determined by trial and error in practice. For example, the default batch size in mini-batch k-means in sklearn was 100 for a long time and recently increased to 1000. Larger b is slower but usually more accurate.
Reviewer comment: On line 181, it might be helpful to define .
We will define it in the text.
Reviewer comment: On line 186, it is claimed that “Furthermore, it is possible to use dynamic programming to update the center.” I think it would be helpful to give some intuition for the dynamic-programming algorithm here.
We will add some intuition to the main body.
Reviewer comment: Some algebra in this paper is above my current level. For example, I was not able to fully understand the proof on line 213 or where the value 28 on line 212 came from.
As reviewer hCyZ also noticed, clarity can be improved here. Please see our response to hCyZ which contains a detailed version of the proof which we will add to the final version. This version also reduces the quadratic dependence on the log in to linear.
Reviewer comment: On lines 254 and 255, would it be possible to provide more detail about what the accuracy scores represent? For example, does accuracy measure how well the clustering result matches the ground-truth labels?
We will add more details. We use the Hungarian algorithm to match the labels generated by the algorithm to the true labels in a way that maximizes accuracy.
Reviewer comment: At the top of page 9, in the
mnist_784plot, the ARI, NMI, and ACC criteria appear to show that the mini-batch kernel version outperformed the regular kernel version. Could you provide some insight into how an algorithm using a subset of the data can outperform an algorithm using the entire dataset?
In full-batch (kernel) k-means we are only guaranteed to reach a local minimum. Using mini-batches can allow us to escape bad local minima.
Reviewer comment: I want to ask if there could be a possible (maybe uncommon) situation where mini-batch kernel k means could lead to poor results compared regular kernel k means? In addition, would there be a situation where only regular kernel k means could be used (and mini-batch kernel k means cannot be used)?
We will add a section on limitations. If tau and the batch size are set inappropriately, then performance can suffer. We think the only place you would want to avoid using mini-batch kernel -Means is when the problem is so tiny that full batch kernel -Means can be run quickly.
Dear authors,
Thank you for addressing my comments. They clarified most of my questions.
I might be missing something here but did not fully understand the reason why "using mini-batches can allow us to escape bad local minima". It would be really helpful for you to elaborate a bit more on this point (this is a question regarding the top of page 9, in the mnist_784 plot, the ARI, NMI, and ACC criteria appear to show that the mini-batch kernel version outperformed the regular kernel version). However, I still think the current paper (with the modifications you mentioned) is a good paper.
We are glad that we managed to address most of your concerns. Unlike full-batch (kernel) -means, mini-batch updates are stochastic and need not decrease the objective on the full dataset at every iteration. This noise can cause them to converge to a different, sometimes better, local minimum. This is a plausible explanation for the MNIST result.
Consider a one-dimensional dataset with ten points at −0.49, ten points at 0.49, and one point at 1. The ground-truth assigns the points at −0.49 to the first cluster and the points at 0.49 together with the outlier at 1 to the second cluster. Initialize the two centers at 0 and 1. In full-batch k-means, all points at −0.49 and 0.49 are assigned to the center at 0, while the point at 1 is assigned to the other center. The updated centers therefore remain at 0 and 1, so this suboptimal clustering is stable.
With mini-batches, however, a batch may omit the point at 1 and contain slightly more points at −0.49 than at 0.49. This moves the first center slightly to the left. Once it moves below −0.02, the points at 0.49 become closer to the second center, which then moves from 1 toward 0.49. The algorithm can thus recover the ground-truth clustering by separating the negative and positive points.
Ok I see. Thank you for providing this helpful example.
- Rating
- 5/6
- Confidence
- 4/5
- Quality
- 3/4
- Clarity
- 4/4
- Significance
- 3/4
- Originality
- 3/4
- Contribution type
- general
- Ethical concerns
- NO or VERY MINOR ethics concerns only
Read review
Summary
The manuscript presents mini batch based training algorithm for kernel k-means, whose running time with a fixed error tolerance has only logarithmic dependence on the number of data. The running time and clustering results are shown to be competitive with prior work.
Strengths and weaknesses
The content is clearly written. The presented running time complexities are typical for mini batch based training algorithms but the proposed truncation technique to algorithmically achieve them for the kernelized version is an original contribution that makes the manuscript worth publising. As the main weakness regarding clarity and significance, I was left missing the complexity considerations from the error tolerance point of view and the error tolerance parameter's calibration (see the questions part).
Questions
To me, it appears that the presentation of the main time complexity and convergence results is unnecessarily complicated, because the stopping threshold parameter epsilon's range of sensible values depends on the value of gamma, the maximum value of the feature vector's norm in the kernel induced feature space. This also made it cumbersome to analyze some of the results' practical details. The running time's only logarithmic dependence on the number of data given a fixed epsilon is nice of course but the narrative mostly evades the runtime's dependence on epsilon relative to its range of sensible values, which I feel to be at least as important for practitioners.
To fix this, one can in most practical cases calculate an empirical estimate of gamma from data such that with a high probability bounds the feature space norm of a large majority of the data, and use a redefined kernel function K(x,y)= 1/2*1/gamma <phi(x),phi(y)> with 1/2 ensuring that the range of sensible epsilon values is restricted within range (0,1) by Lemma B.2. This would get rid of the gamma parameter from the math and the results almost throughout the article's main content, which would make it far more intuitive for both the method's users and the readers of the article in general.
My main questions regarding the above suggestion are whether the above modification could be done as suggested and how the runtime's dependence as a function of e.g. 1/epsilon or -log(epsilon) compares with related work, when epsilon is calibrated to be within its range of sensible values?
Limitations
yes
Final justification
The authors have resolved everything I raised, so the article is acceptable.
Formatting concerns
No concerns.
3 comments
Rebuttal
Thank you for the positive evaluation and constructive feedback. This is a great suggestion, and we would be happy to implement it in the final version of the paper. Please see the details below, and let us know if we have missed anything.
Let the input kernel be with feature map , and let
We compute using diagonal kernel evaluations and normalize the kernel as follows:
Since , this gives
The corresponding feature map is therefore
Because this transformation simply scales the data, it does not otherwise affect the execution of the algorithm, provided that is interpreted as an early-stopping threshold in the normalized feature space. Once is known, the factor can be applied to each kernel evaluation on the fly. Thus, we never normalize the full kernel matrix and do not incur an normalization cost.
This gives , and the stated bounds follow by substituting .
Let denote the batch size and the stopping time. The resulting batch-size bound is
For , this becomes $ b=\Omega\left(k\epsilon^{-2}\log\left(\frac{n}{\epsilon}\right)\right). $
Similarly, the stopping-time bound is $ t=O\left(\gamma^2\epsilon^{-1}\right), $ which becomes $ t=O\left(\epsilon^{-1}\right) $ when .
Each iteration takes $ O\left(kb^2\log^2\left(\frac{\gamma}{\epsilon}\right)\right) $ time. For , this becomes $ O\left(kb^2\log^2\left(\frac{1}{\epsilon}\right)\right). $
We can apply the same normalization to the result of Schwartzman (2023). The analysis of Schwartzman (2023) uses a union bound over the dimension , so it retains a factor of even after normalization. Our martingale-based analysis is tighter and recovers the same bounds as for our kernel -means algorithms:
Acknowledgment of Rebuttal
Dear authors, thank you for confirming this. I can most likely increase my score. Could you please still consider writing explicitly how the overall running time i.e. the number of required iterations multiplied by the time required by a single iteration behaves (when epsilon is calibrated to be between 0 and 1) in terms of fraction F=1/epsilon and its logarithm LF=log_2 (1/epsilon), as these would be more intuitive for the end users. While the former would tell the overall running time cost as a function of shrinking error tolerance, the latter would indicate even more intuitively how much more running time is needed if one wants to, say, cut the termination threshold in half.
Sorry for not including this in our original rebuttal. We agree that stating the complete dependence on will make the result more useful and intuitive, and will add this in the final version of the paper.
From the previous comment we have the sufficient batch size and iteration bound as
The truncation parameter is given asymptotically below (the dependence on the logarithm is now linear after tightening Lemma 4.1 - see response to reviewer hCyZ)
The time required by one iteration is therefore
Plugging in , the per-iteration runtime becomes
Multiplying this by the stopping-time bound gives the overall runtime
From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.
Loading the discussion…
Rebuttal
Thank you for the positive evaluation and constructive feedback.
We would be happy to remove this figure if that is the consensus of the reviewers. In previous iterations, we were advised to include a qualitative demonstration of the difference between k-means and kernel k-means. The number of clusters shown in the figure was taken from the number of ground-truth clusters.
We would be happy to reference this work. Are you referring to Section 5 of Kernel k-means, Spectral Clustering and Normalized Cuts?
You are correct for full-batch kernel k-means and for the initial centers of mini-batch kernel k-means when using k-means++ initialization. However, after the mini-batch updates begin, the learning-rate-weighted centers are not generally equal to the unweighted mean of a subset of the input points. Instead, each center moves only part of the way towards the corresponding batch mean.
We will revise the wording to make clear that the speedup comes from operating in the regime b≪n, rather than from the algebraic derivation alone. In the regime established by Theorem 1.1, b grows only logarithmically with n. Thus, the case b=n is not the regime targeted by our theoretical result.
We will change this.
This is by the definition of Qij to be the smallest set of consecutive t indices up to i such that cluster j had at least tau points assigned. The upper bound follows because to achieve at least tau points we may include up to an extra b points in the sum (that is bij≤b for all i,j). For example, assume both b=10 and τ=20, then for some i it might be the case that bij=10 and bi−1j=9 and then the sum contains also bi−2j which is at most 10.
You are right that the proof should be clearer. We provide a detailed proof at the end of this rebuttal and will add it to the final version of the paper. The revised proof also reduces the dependence of τ on the logarithmic term from quadratic to linear.
We will add the parentheses.
We're not quite sure what you mean. We only store the linear combination coefficients for each centre, and don't try to represent points in feature space explicitly; this makes implementing our algorithm straightforward with the kernel trick. I think we are agreeing on the same thing but please elaborate if we are wrong.
We will move this definition to the appendix.
All three claims are proved, but you are right that their locations are not identified clearly:
We will make these references explicit in the final version of the paper.
We will add a conclusion section.
We thought running each algorithm for 200 iterations would be the fairest and most intuitive approach as this was almost certainly long enough for each method to converge. We did consider using early stopping for comparison instead, but controlling the effect of early stopping across the full batch and mini-batch algorithms with various batch sizes is not obvious. If you have a specific experimental evaluation in mind, we will be happy to add it.
Expanded proof of Lemma 4.1
Lemma 4.1. Setting $ \tau=\left\lceil b\ln\left(\frac{28\gamma}{\epsilon}\right)\right\rceil$, it holds that, for every i∈N and j∈[k],
Proof. Recall that Qij is the shortest consecutive suffix of iterations ending at iteration i during which at least τ points were assigned to cluster j. Thus, minQij is the earliest iteration retained in the truncated center. If minQij=1, then the truncated center equals the full center by definition, and the claim follows immediately. We therefore consider the remaining case, in which
At each iteration ℓ, the center update is $ \mathcal{C}_{\ell+1}^j=(1-\alpha_\ell^j)\mathcal{C}_\ell^j+\alpha_\ell^j\operatorname{cm}(B_\ell^j). $ Starting from Ci+1j, we repeatedly substitute the update rule backwards through the iterations in Qij, stopping at minQij. This gives
The first term is the contribution of the center from before the retained updates. The truncated center discards exactly this term and retains the sum:
Therefore, the identical sums cancel when the two centers are subtracted:
Using 1−x≤e−x, we obtain
Here, the inequality 1−x≤e−x is applied to each x=αℓj.
For every ℓ, we have
Since 0≤bℓj/b≤1, it follows that
Therefore,
The second-to-last inequality follows from the definition of Qij, and the last follows from $\tau=\left\lceil b\ln\left(\frac{28\gamma}{\epsilon}\right)\right\rceil. $ Finally, CminQijj is a convex combination of points in X, so its norm is at most γ. Therefore,