atlas

Research map / Learning theory and algorithms / Clustering

Leaner transformers can easily learn to cluster

NeurIPS 2026 · Learning theory and algorithms › Clustering · approach: k-means++ seeding analysis

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Shows a leaner transformer (embedding d+ceil(log2 k), binary cluster indices) can exactly execute Lloyd's k-means, then trains it end-to-end with smoothed (softmax/sparsemax) min surrogates to learn single-step clustering, analyzing convergence, generalization, and cross-distribution transfer.

Problem

Transformers with embedding size d+k needed to express Lloyd's k-means have projection matrices quadratic in k; it is unclear how learnable such clustering algorithms are with a discrete, non-differentiable k-means objective.

Approach

Replace one-hot cluster-index embeddings with binary (ceil(log2 k)-bit) embeddings so a single attention layer with embedding dimension d+ceil(log2 k) still exactly emulates Lloyd's iteration, and train it with a smoothed min surrogate (softmax or sparsemax regularized min) whose gap to the true k-means loss controls generalization.

Key results

Surprising findings

Limitations

Experimental setup

Datasets: synthetic mixture-of-distributions clustering tasks (normal, cauchy, gumbel, laplace, lognormal)

Benchmarks: synthetic clustering tasks (in-distribution validation) multi-step clustering T=20 on shifted synthetic distributions

Metrics: k-means objective forward/backward time GPU memory usage

Baselines: Lloyd's algorithm (single step) one-hot embedding (d+k) no index embedding (d+0)

Builds on: Lloyd's algorithm transformers executing Lloyd's algorithm in-context (d+k embedding) sparsemax Adam

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy