Graph-Guided k-Means Clustering
- Graph-guided k-means clustering is a family of methods that integrates graph topology to refine centroid updates and assignments for non-Euclidean and manifold-structured data.
- It fuses techniques from kernel, spectral, and Laplacian formulations to capture local geometry and optimize clustering through continuous relaxations and discrete assignments.
- Recent advances focus on jointly learning graphs with cluster labels and incorporating acceleration methods to boost scalability and robustness on large complex datasets.
Graph-guided k-means clustering denotes a family of clustering methods in which graph structure guides the assignment, embedding, centroid update, or relation-extraction stages of k-means. Across the literature, the guiding graph may be an affinity graph over samples, a graph of pairwise cluster overlaps, a k-nearest-neighbor graph used to restrict centroid comparisons, a Laplacian defined on a lattice or manifold, a p-dual road-network graph, or the graph domain in which the clustered objects themselves are graphs (Lyu et al., 23 Sep 2025, Bauman et al., 2017, Deng et al., 2017, Tao et al., 2020, 0912.4598). The resulting formulations range from kernel and spectral relaxations of k-means to PageRank-based representative selection, centroid-free graph embedding, Laplacian-regularized soft assignments, and exact or approximate discrete optimization (Hajij et al., 2020, Li et al., 2024, Wang et al., 2014, Han et al., 2019).
1. Core concept and problem setting
Standard k-means partitions a dataset into clusters by minimizing the within-cluster sum of squares,
and returns hard assignments together with cluster centroids (Bauman et al., 2017). In its classical form, the method has no explicit notion of graph structure, manifold geometry, inter-cluster relations, or non-Euclidean similarity. Several later formulations therefore introduce a graph as an explicit computational and statistical object.
In graph-guided variants, the graph can intervene at different levels. An affinity graph over samples can define a Laplacian regularizer or a spectral embedding; a graph of clusters can represent pairwise overlaps after clustering; a k-nearest-neighbor graph can reduce the set of centroids considered during assignment; and a graph domain can replace Euclidean vectors altogether, so that centroids become graph means or central nodes rather than arithmetic averages (Lyu et al., 23 Sep 2025, Bauman et al., 2017, Deng et al., 2017, 0912.4598). This suggests that “graph-guided k-means” is best understood as a methodological family rather than a single algorithmic template.
A recurring motivation is that Euclidean centroid updates can be suboptimal when data lie on low-dimensional manifolds or have non-Euclidean structure. The graph then serves either as a proxy for local geometry, as a constraint on feasible partitions, or as an efficiency device. In some formulations the graph is fixed before clustering; in others it is learned jointly with assignments; in still others it is recovered from the clustering itself (Lyu et al., 23 Sep 2025, Kang et al., 2020).
2. Kernel, spectral, and Laplacian formulations
A central line of work treats graph-based clustering as a relaxation of kernel -means. With similarity matrix and normalized assignment matrix , kernel -means admits the maximization form
together with the equivalent Frobenius formulation under the same constraints (Lyu et al., 23 Sep 2025). “Graph-based Clustering Revisited: A Relaxation of Kernel -Means Perspective” identifies spectral clustering, symmetric NMF, and doubly stochastic normalization as relaxations that drop different subsets of the low-rank, nonnegative, doubly stochastic, and orthonormal constraints. On that basis it proposes LoRD, which keeps low-rank, nonnegativity, and doubly stochasticity while relaxing orthonormality, and B-LoRD, which adds block-diagonal regularization through . The same work proves an equivalence between orthogonality and block diagonality under the doubly stochastic constraint, linearizes the doubly stochastic condition through a class-prior parameter 0, and derives a globally convergent projected gradient descent algorithm (Lyu et al., 23 Sep 2025).
Spectral graph partitioning supplies an older and closely related route. “Graph partitioning advance clustering technique” constructs the unnormalized Laplacian 1, computes the Fiedler vector 2 associated with the second smallest eigenvalue, and partitions by the sign of 3; for 4, it motivates the standard spectral 5-means pipeline in which one clusters the rows of the first 6 nontrivial eigenvectors (Madhulatha, 2012). “Spectral concentration and greedy 7-clustering” studies the normalized Laplacian 8, uses the embedding
9
and proves recovery guarantees for strong partitions under a spectral-gap condition, while also showing a near-linear-time greedy alternative to spectral 0-means (Dey et al., 2014).
Laplacian regularization can also be combined directly with centroid learning. “The Laplacian K-modes algorithm for clustering” optimizes
1
where 2 is a simplex-constrained soft assignment matrix and 3 contains Gaussian data-centroid affinities (Wang et al., 2014). The 4-step is a convex quadratic program, while the 5-step is a mean-shift update that makes each centroid a mode of a cluster density estimate. This yields valid patterns as centroids and supports highly nonconvex or manifold-structured clusters (Wang et al., 2014).
3. Jointly learning the graph and the labels
A major development in graph-guided k-means is the move from fixed graphs to jointly optimized graphs and assignments. “Structured Graph Learning for Clustering and Semi-supervised Classification” learns an affinity matrix 6 by combining a global self-expressiveness term with an adaptive-neighbor term, while enforcing a Laplacian rank condition so that the learned graph has exactly 7 connected components if there are 8 clusters (Kang et al., 2020). The paper shows that, when 9 is large enough to enforce the rank condition and 0, its objective reduces to the sum of a kernel 1-means objective in feature space and a standard 2-means objective in input space. In that sense, the learned graph acts as a structural device that makes the spectral embedding “3-means friendly” (Kang et al., 2020).
“Unified Spectral Clustering with Optimal Graph” makes a similar critique of the standard three-step pipeline of graph construction, continuous label learning, and k-means discretization (Kang et al., 2017). It jointly learns the similarity matrix 4, the spectral embedding 5, the discrete indicator 6, and an orthogonal rotation 7, while driving the bottom 8 eigenvalues of the Laplacian toward zero so that the similarity graph has exact 9 connected components. Its multiple-kernel extension learns a convex combination of kernels rather than fixing one a priori (Kang et al., 2017). “Discrete Optimal Graph Clustering” pushes this line further by explicitly optimizing a discrete label matrix 0 and replacing post hoc k-means discretization with a discrete transformation 1, together with an adaptive robust prediction module for unseen data (Han et al., 2019). Both works treat k-means sensitivity in the discretization stage as a central weakness of older graph-based clustering pipelines (Kang et al., 2017, Han et al., 2019).
A related but distinct formulation appears in “Self-Supervised Graph Embedding Clustering,” which proves that standard k-means can be written in centroid-free graph form through 2, then uses this observation to build a one-step self-supervised graph embedding framework (Li et al., 2024). In that framework, labels generated in low-dimensional space determine similarities between neighbors, and maximizing the 3-norm of 4 is shown to maintain class balance and enforce discrete labels. The two main variants, Our-LPP and Our-MFA, alternate between solving for a projection 5 and updating the assignment matrix 6 row by row (Li et al., 2024).
Deep graph representation learning brings the same theme into neural models. “Embedding Graph Auto-Encoder for Graph Clustering” proves that relaxed 7-means obtains an optimal partition in the inner-products used space under non-negativity and spectral-dominance assumptions, then implements this view through a GCN-based encoder and dual decoders (Zhang et al., 2020). One decoder reconstructs the adjacency by 8; the other optimizes the relaxed 9-means objective 0. The model alternates between updating encoder parameters and updating 1 via the relaxed 2-means solver, so that graph reconstruction and clustering are learned simultaneously (Zhang et al., 2020).
4. Graphs of cluster relations, constrained spaces, and non-Euclidean domains
Not all graph-guided formulations use the graph to regularize assignments. In “Discovering the Graph Structure in the Clustering Results,” pairwise overlapping k-means modifies the assignment rule so that each point may belong to one or two clusters and then derives a graph of inter-cluster relations from the resulting overlaps (Bauman et al., 2017). Its objective is
3
with 4 controlling the overlap level. The relative overlap 5 and 6 are linked exactly by
7
and an edge between clusters 8 and 9 is created when 0 (Bauman et al., 2017). The resulting graph is intended to capture structural connectivity that centroid distances may miss.
A more application-specific graph appears in “Graph Based Multi-layer K-means++ (G-MLKM) for Sensory Pattern Analysis in Constrained Spaces,” where targets move on a road network and each observation is only a velocity-time pair 1 (Tao et al., 2020). The method first performs multi-layer k-means++ locally on each segment, then constructs a p-dual graph whose nodes are segment endpoints 2 and 3 and whose edges connect outgoing to incoming endpoints across intersections. Intersection-level pairing is performed after time alignment to a virtual reference, followed by error detection and Hungarian correction. The paper reports that, with 4 and 5, MLKM with error correction achieves 6 average accuracy versus 7 without error correction, and that full G-MLKM with error correction reaches 8 average accuracy versus 9 without error correction for 0 and 1 (Tao et al., 2020).
Graph-guided k-means can also mean replacing Euclidean centroids with graph-central representatives. “PageRank and The K-Means Clustering Algorithm” generalizes Lloyd’s procedure to directed and undirected graphs by assigning nodes through graph-distance Voronoi cells and then updating each cluster representative to the node with highest PageRank in the induced subgraph (Hajij et al., 2020). The paper emphasizes that this applies when there is no canonical arithmetic centroid, and it allows other centrality measures such as eigenvector, Katz, closeness, harmonic, or betweenness centrality in place of PageRank. It also states that the method does not introduce a scalar objective analogous to Euclidean sum-of-squares and does not provide a proven global potential function (Hajij et al., 2020).
5. Optimization, acceleration, and scalability
Several graph-guided methods are motivated as much by computational efficiency as by statistical structure. For LoRD and B-LoRD, the quadratic doubly stochastic constraint 2 is replaced by the linear convex constraints 3 and 4, and the projected gradient step
5
is implemented with a Dykstra-style projection onto nonnegativity and affine constraints (Lyu et al., 23 Sep 2025). For dense 6, the per-iteration cost is 7; for sparse 8-NN graphs with 9, the total per-iteration cost becomes 0, with memory 1 for 2 and 3 for 4 (Lyu et al., 23 Sep 2025).
“Fast 5-means based on KNN Graph” uses an approximate k-nearest-neighbor graph to make the assignment cost independent of the total number of clusters (Deng et al., 2017). For each point 6, the candidate centroid set 7 is restricted to the clusters occupied by its 8 nearest neighbors, so the assignment cost drops from 9 to 0, with 1. The graph itself is refined by repeatedly clustering the data into many small clusters and performing local exhaustive neighbor updates within those clusters. On 10 million 512-dimensional data, the method takes only 5.2 hours to produce 1 million clusters, whereas traditional k-means is estimated to take 3 years for the same scale (Deng et al., 2017).
Acceleration has also been developed for clustering when the objects are graphs. “Elkan’s k-Means for Graphs” defines a permutation-invariant metric
2
uses subgradient-based sample-mean computation for graph centroids, and adapts Elkan’s triangle-inequality pruning through upper and lower bounds on graph distances (0912.4598). The pruning conditions use inequalities such as 3 and 4 to avoid unnecessary graph-distance evaluations. On the Fingerprint dataset with 5, the paper reports 6 per-iteration and 7 total speedup, while on Molecules with 8 it reports approximately 9, indicating that acceleration depends strongly on the presence of cluster structure (0912.4598).
6. Emerging reinterpretations, empirical patterns, and limitations
Recent work extends the graph-guided k-means perspective into reasoning systems. “Clustering as Reasoning: A 00-Means Interpretation of Chain-of-Thought Graph Learning” proves a formal correspondence between a Transformer block and soft 01-means assignment/update dynamics on text-attributed graphs (Xie et al., 24 May 2026). Under a specific parameterization with centroid tokens and attention masking, the attention weights become
02
which exactly matches soft 03-means assignments. The framework then combines structure-grounded neighbors, semantic neighbors, a Semantic Discriminating Prompt, and a CondNet gating mechanism; its alignment theorem states that the semantic-structural misalignment score satisfies 04, with 05 (Xie et al., 24 May 2026).
A common misconception is that graph-guided k-means is synonymous with spectral clustering followed by k-means. Several formulations instead learn the graph jointly with the partition, replace post hoc k-means discretization with Procrustes-type or explicitly discrete optimization, or eliminate explicit centroids altogether (Kang et al., 2017, Han et al., 2019, Li et al., 2024). Another misconception is that graph guidance always improves robustness. The literature repeatedly notes sensitivity to graph construction, neighborhood size, bandwidth parameters, and cluster imbalance. LoRD and B-LoRD share sensitivity to graph construction and may struggle when 06 is extremely noisy or when class priors are highly skewed and 07 is badly mismatched without tuning 08; the self-supervised graph embedding framework states that the 09-based balance mechanism may be undesirable for intrinsically imbalanced data (Lyu et al., 23 Sep 2025, Li et al., 2024).
Taken together, these works suggest three durable themes. First, graph guidance is used either to encode geometry, to learn a partition-compatible similarity, to recover relations between clusters, or to accelerate search. Second, the strongest recent formulations tend to narrow the gap between continuous relaxations and discrete assignments by enforcing low-rank, connected-component, orthogonality, or one-hot structure more explicitly. Third, there is no single privileged graph object: the relevant graph may be over samples, centroids, clusters, road segments, text-attributed nodes, or graphs themselves. In that broad sense, graph-guided k-means is less a single algorithm than a unifying viewpoint on how relational structure can reshape the classical assignment-and-update paradigm.