K-Means as the Zero-Temperature Limit of Normalized RBF Assignments: Rates, Trajectories, and Exact Recovery with Entmax
Organizations: School of Engineering and Sciences, Tecnológico de Monterrey, Monterrey, Mexico · School of Engineering and Sciences, Tecnológico de Monterrey, Guadalajara, Mexico
Abstract
K-Means is usually treated as a discrete procedure outside gradient-based learning, whereas normalized radial basis function (RBF) layers are smooth. We make precise the sense in which K-Means is the zero-temperature limit of such a layer. Relaxing the K-Means assignments to the simplex with a Shannon entropy penalty yields the normalized Gaussian RBF responsibilities and a reduced objective with , so -converges to the K-Means distortion . We keep four levels of statement apart. For the objective, minimal values and minimizers converge, and above the critical temperature all centroids at the mean form a strict local minimizer. For optimization, alternating minimization is a preconditioned gradient method on whose hard limit is Lloyd's algorithm. For one update, under a margin , the soft centroid map approaches Lloyd's at rate . For fixed points and trajectories, every nondegenerate Lloyd fixed point has a nearby soft local minimizer, and soft iterates keep Lloyd's partitions while Lloyd's path keeps a margin. With the Tsallis entropy of order 3/2, Entmax-1.5 recovers the hard assignments, the Lloyd update and, along a path with margin, Lloyd's trajectory exactly for , a sharp threshold. Experiments on sixteen datasets confirm every bound, rate and threshold, and the trajectory statements at the edge of their hypotheses. As a differentiable K-Means term, shows the predicted effects: its gradients do not vanish at low temperature, its closed-form centroid update needs no learning rate, a fixed temperature crosses the critical one as representations contract, and soft responsibilities keep a vector-quantized codebook in use.
Figures & tables
| Level | Shannon entropy (Softmax) | Tsallis entropy of order (Entmax-1.5) |
|---|---|---|
| Objective | , hence -convergence (Thm. 4 ); gap under a margin (Prop. 8 ) | , gap at most ; for (Props. 6 , 7 , 8 ) |
| Optimization | alternating update preconditioned gradient step (EM); descent, whole-sequence convergence (Thm. 13 ) | descent with sufficient decrease (Prop. 15 ) |
| One update | with explicit constants (Thm. 18 ) | for , sharp (Cor. 21 ) |
| Fixed points | unique soft fixed point within of each nondegenerate Lloyd fixed point (Thm. 24 ) | Lloyd fixed points with margin are fixed points |
| Trajectories | same partitions as Lloyd while its iterates keep a margin (Thm. 25 ) | identical iterates while Lloyd’s keep a margin (Cor. 26 ) |
| Dataset | Regime | Parameters |
|---|---|---|
| Gaussian blobs | Separated Euclidean clusters | std |
| Two moons | Nonlinear manifold | noise |
| Spiral | Nonconvex polar structure | radius , noise |
| Circles | Radial separation | factor , noise |
| Separation | Isotropic blobs, set gap | std , |
| Blobs, -dim. | Isotropic blobs in dim. | std , centers , |
| Method | Iter. | Conv. % | ms/iter. | Mono. % | Suff. % | % | % | |
|---|---|---|---|---|---|---|---|---|
| Lloyd | – | – | – | – | ||||
| Alt. Softmax | ||||||||
| GD on | – | |||||||
| Alt. Entmax | – |
| Method | MNIST | Fashion-MNIST | USPS | CIFAR-10 | STL-10 | Var. |
| AE + K-Means | ||||||
| DEC | ||||||
| IDEC | ||||||
| DCN (hard) | ||||||
| (ours) |
| Assignment | Update | MSE | Perplexity | Used |
|---|---|---|---|---|
| Hard | Gradient | |||
| Hard + reset | Gradient | |||
| Hard | Closed form | |||
| Hard + reset | Closed form | |||
| Softmax | Gradient | |||
| Softmax | Closed form |
| Time to the fixed point | Time per iteration (GPU) | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Iter. | scikit-learn | FAISS | Lloyd (GPU) | Lloyd | Softmax | Entmax | |||
Appendix figures & tables12 assets
Supplementary material from the paper’s appendix.
Appendix
| Dataset | Adm./ | (med.) | (min) | (med.) | (med.) | |||
|---|---|---|---|---|---|---|---|---|
| Blobs | 300 | 2 | 3 | 200/200 | ||||
| Moons | 300 | 2 | 2 | 200/200 | ||||
| Spiral | 300 | 2 | 3 | 200/200 | ||||
| Circles | 300 | 2 | 2 | 200/200 | ||||
| Separation, | 300 | 2 | 3 | 200/200 | ||||
| Separation, | 300 | 2 | 3 | 200/200 |
| Dataset | Slope | Slope | Slope | Runs | Checks | Id. viol. | Id. |
|---|---|---|---|---|---|---|---|
| Blobs | [0.000] | [0.000] | [0.000] | 200 | 0 | ||
| Moons | [0.000] | [0.000] | [0.000] | 200 | 0 | ||
| Spiral | [0.000] | [0.013] | [0.005] | 200 | 0 | ||
| Circles | [0.000] | [0.018] | [0.010] | 200 | 0 | ||
| Separation, | [0.000] | [0.031] | [0.009] | 200 | 0 | ||
| Separation, | [0.000] | [0.005] | [0.008] | 200 | 0 |
| Iterations (median) | GD | to Lloyd (median) | ||||||
|---|---|---|---|---|---|---|---|---|
| Dataset | Lloyd | Softmax | GD | Entmax | conv. % | Softmax | GD | Entmax |
| Blobs | ||||||||
| Moons | ||||||||
| Spiral | ||||||||
| Circles | ||||||||
| Separation, | ||||||||
| Same path (%) | Same end (%) | |||||
|---|---|---|---|---|---|---|
| Dataset | Softmax | Entmax | GD | Softmax | Entmax | GD |
| Blobs | ||||||
| Moons | ||||||
| Spiral | ||||||
| Circles | ||||||
| Separation, | ||||||
| Better/worse than Lloyd (%) | Best found (%) | ||||||
|---|---|---|---|---|---|---|---|
| Dataset | DA-Soft. | DA-Ent. | EM-GMM | Lloyd | DA-Soft. | DA-Ent. | EM-GMM |
| Blobs | |||||||
| Moons | |||||||
| Spiral | |||||||
| Circles | |||||||
| Separation, | |||||||
| Slope | Slope | ||||
|---|---|---|---|---|---|
| Dataset | Runs | Mean (sd) | 95% CI of median | Mean (sd) | 95% CI of median |
| Blobs | 200 | (4e-16) | (0.0005) | ||
| Moons | 200 | (2e-16) | (2e-16) | ||
| Spiral | 200 | (2e-06) | (0.004) | ||
| Circles | 200 | (3e-14) | (0.007) | ||
| Separation, | 200 | (3e-14) | (0.005) | ||
| Alt. Softmax | Alt. Entmax | GD on | DA-Softmax | |||||
|---|---|---|---|---|---|---|---|---|
| Dataset | L/H | L/H | L/H | L/H | ||||
| Blobs | ||||||||
| Moons | ||||||||
| Spiral | ||||||||
| Circles | ||||||||
| Separation, | ||||||||
| MNIST | Fashion-MNIST | USPS | CIFAR-10 | STL-10 | ||||||
| Method | NMI | ARI | NMI | ARI | NMI | ARI | NMI | ARI | NMI | ARI |
| AE + K-Means | ||||||||||
| DEC | ||||||||||
| IDEC | ||||||||||
| DCN (hard) | ||||||||||
| Quantity | Reported | Seeds 1–5 | |
|---|---|---|---|
| Smallest fraction satisfying a bound check | |||
| Entmax identification violations ( ) | |||
| Median slope of (range over datasets) | |||
| Median slope of (range over datasets) | |||
| Gradient descent converged (%) | |||
| Alt. Softmax: lower / higher than Lloyd (%) | / | / | / |
| MNIST | USPS | CIFAR-10 | |||||||
| Weight (relative temperature ) | |||||||||
| Method | |||||||||
| IDEC | |||||||||
| DCN (hard) | |||||||||
| (ours) | |||||||||
| Method | Centroid learning rate | MNIST | USPS | CIFAR-10 |
|---|---|---|---|---|
| , closed form | – | |||
| , closed form | – | |||
| DEC | ||||
| DEC | ||||
| DEC | ||||
| IDEC |
| Assignment | Update | MSE | Used | MSE | Used | MSE | Used |
|---|---|---|---|---|---|---|---|
| Hard | Gradient | ||||||
| Hard | Closed form | ||||||
| Softmax | Gradient | ||||||
| Softmax | Closed form | ||||||
| Entmax-1.5 | Gradient | ||||||
Clustering
Clustering groups data points by shared structure, developing methods to discover, validate, and interpret groups across diverse data and constraints.
See all 345 papers