---
title: Clustering Guided METric (CMET)
url: https://www.emergentmind.com/topics/clustering-guided-metric-cmet
type: topic
---

# Clustering Guided METric (CMET)

Searching arXiv for the CMET paper and closely related clustering-guided metric work.
Clustering Guided METric (CMET) is an embedding-quality metric proposed for quantifying how faithfully a transformed representation preserves the structure of the original data. It is introduced as a pair of scores, \(CMET_L\) and \(CMET_G\), measuring local and global shape preservation capability, respectively, and is motivated by the practical difficulty of determining whether an embedding retains local and global structure without incurring the high time and space complexity of all-pairs distance- or co-ranking-based measures [2507.04840]. CMET is “clustering guided” because both scores are computed after partitioning the dataset into clusters, using those clusters as a compact structural surrogate for the original geometry rather than relying on full pairwise comparisons [2507.04840].

## 1. Definition and scope

CMET is defined for an original dataset \(\mathbf{X}_{n \times p} = \{\mathbf{x}_i\}_{i=1}^n\) and a transformed embedding \(\mathbf{X}'_{n \times q} = \{\mathbf{x}'_i\}_{i=1}^n\). The method allows either class labels or cluster labels \(\mathbf{y}\) to guide the computation: in a supervised setting, true labels may be used directly if they correspond to separable classes; in an unsupervised setting, the paper uses Agglomerative clustering to generate the partition [2507.04840]. After clustering, the same cluster assignments are imposed on the embedding, so CMET evaluates whether the geometric relations induced by the original-space grouping are preserved after transformation rather than reclustering independently in the embedded space [2507.04840].

The method distinguishes two structural regimes. Local structure preservation concerns whether points remain similarly positioned relative to the center of the cluster they belong to. Global structure preservation concerns whether the relative arrangement of clusters or regions is retained after transformation [2507.04840]. The paper does not define a single merged scalar score; instead it recommends interpreting the pair \((CMET_L, CMET_G)\) jointly [2507.04840].

This makes CMET an embedding-evaluation metric rather than a clustering algorithm or a metric-learning procedure in the conventional Mahalanobis or deep embedding sense. A plausible implication is that CMET is best understood as an intrinsic structural comparator between an original representation and a transformed one, with clustering used as a compression device for structural information.

## 2. Mathematical formulation

For notational convenience, samples are re-indexed by cluster as \(\{\mathbf{z}_{j(k)}\}\) in the original space and \(\{\mathbf{z}'_{j(k)}\}\) in the transformed space, where \(k = 1,\dots,c\) indexes clusters and \(j(k)=1,\dots,m(k)\) indexes points within cluster \(k\), with \(n=\sum_{k=1}^c m(k)\) [2507.04840]. For each cluster \(k\), the method defines \(\boldsymbol{\mu}_k\) and \(\boldsymbol{\mu}'_k\) as the medians of the cluster in the original and transformed spaces, respectively [2507.04840].

The cluster extents are
\[
r_k = \begin{cases}
\underset{j(k)}{\max} \|\mathbf{z}_{j(k)}-\boldsymbol{\mu}_{k}\| & \text{if } \exists \ j(k): \|\mathbf{z}_{j(k)}-\boldsymbol{\mu}_{k}\| > 0, \\
1 & \text{otherwise,}
\end{cases}
\]
and
\[
r_k' = \begin{cases}
\underset{j(k)}{\max} \|\mathbf{z}_{j(k)}'-\boldsymbol{\mu}_{k}'\| & \text{if } \exists \ j(k): \|\mathbf{z}_{j(k)}'-\boldsymbol{\mu}_{k}'\| > 0, \\
1 & \text{otherwise.}
\end{cases}
\]
These define normalized within-cluster distances
\[
d_i = \frac{\|\mathbf{z}_{j(k)}-\boldsymbol{\mu}_k\|}{r_k}, \qquad
d_i' = \frac{\|\mathbf{z}_{j(k)}'-\boldsymbol{\mu}_k'\|}{r_k'}.
\]
The local score is then
\[
CMET_L = 1- \frac{\| \mathbf{d}-\mathbf{d}^{'}\|}{\sqrt{n}}.
\]
The paper proves \(CMET_L \in [0,1]\) as Corollary 1 by observing that each \(d_i,d_i' \in [0,1]\), hence \(\|\mathbf{d}-\mathbf{d}'\| \le \sqrt{n}\) [2507.04840].

For the global score, the paper augments the set of cluster medians with the median of the full dataset, setting \(\boldsymbol{\mu}_{c+1}=\boldsymbol{\mu}\) and \(\boldsymbol{\mu}_{c+1}'=\boldsymbol{\mu}'\) [2507.04840]. It then forms normalized pairwise distance matrices among these \(c+1\) representatives:
\[
\mathbf{\Gamma}=\{\gamma_{kl}\}_{(c+1)\times (c+1)}
\]
and
\[
\mathbf{\Gamma}^{'}=\{\gamma_{kl}^{'}\}_{(c+1)\times (c+1)},
\]
where each matrix is normalized by its maximum entry, or set to the zero matrix if all representative distances vanish [2507.04840]. The global score is
\[
CMET_G = 1-\frac{\|\mathbf{\Gamma}-\mathbf{\Gamma}^{'}\|_F}{\sqrt{c(c+1)}}.
\]
The paper proves \(CMET_G \in [0,1]\) as Corollary 2 using the fact that the non-diagonal normalized entries lie in \([0,1]\), so the Frobenius norm difference is bounded by \(\sqrt{c(c+1)}\) [2507.04840].

## 3. Clustering-guided computation

In unsupervised CMET, the first step is to partition the original dataset into \(c\) clusters using Agglomerative clustering [2507.04840]. Those original-space labels are then transferred to the embedding, and all subsequent computations are performed relative to the resulting cluster medians and cluster extents [2507.04840]. The use of medians rather than means is part of the method’s formal definition [2507.04840].

The local score evaluates whether each sample preserves its normalized distance from its own cluster median. This is not a \(k\)-nearest-neighbor overlap criterion. Instead, it encodes local geometry as cluster-internal radial organization [2507.04840]. The global score evaluates whether the coarse arrangement of cluster representatives, plus the whole-dataset median, is preserved after transformation [2507.04840]. This yields a compact summary of large-scale geometry whose size depends on the number of clusters \(c\), not the number of points \(n\) [2507.04840].

A practical consequence of this design is that CMET separates local and global structural fidelity explicitly. High \(CMET_L\) with low \(CMET_G\) indicates that clusters retain internal organization but their large-scale arrangement changes. High \(CMET_G\) with low \(CMET_L\) indicates that coarse cluster placement is preserved while within-cluster organization is distorted. High values of both indicate strong preservation of both local and global structure [2507.04840].

## 4. Computational profile and scalability

CMET is motivated in part by the high computational and memory cost of existing metrics based on \(n \times n\) distance matrices or co-ranking matrices [2507.04840]. The paper states that Agglomerative clustering has complexity
\[
\mathcal{O}(n^2 \log n),
\]
and, once clustering is fixed, the remaining computations reduce to cluster medians, cluster radii, normalized point-to-median distances, and pairwise distances among \(c+1\) representatives [2507.04840].

The central computational claim is therefore not that clustering disappears, but that the metric itself avoids full all-pairs comparisons in its definition. Local structure is compressed into one scalar per point, and global structure into a \((c+1)\times(c+1)\) matrix [2507.04840]. In supervised mode, clustering can be skipped entirely by using class labels directly, reducing cost further [2507.04840].

This design is presented as a practical advantage over Trustworthiness, Continuity, and LCMC. On MNIST and Fashion-MNIST, the authors report that they could not compute several baseline metrics with their available computational resources, whereas CMET remained computable in significantly less time [2507.04840]. The paper treats this as one of its strongest practical results.

## 5. Empirical evaluation

The empirical study covers eight datasets: four synthetic datasets (Olympics, WorldMap, Shape, Swiss Roll), two biological datasets (Jurkat, Zeisel), and two image datasets (MNIST, FMNIST) [2507.04840]. It also studies transformed synthetic datasets obtained by the map
\[
(x, y) \rightarrow (x+y, x-y, xy, x^{2} , y^{2} , x^2y, xy^{2} , x^{3} , y^{3} ),
\]
creating “2-9-2” settings in which two-dimensional synthetic data are lifted to nine dimensions and reduced back to two [2507.04840].

The dimensionality-reduction methods evaluated are PCA, SVD, ICA, ISOMAP, FA, NMF, LLE, LDA, TSNE, FITSNE, KPCA, UMAP, PHATE, and IVIS [2507.04840]. CMET is compared directly with Trustworthiness, Continuity, and LCMC [2507.04840].

On synthetic datasets, the paper argues that CMET aligns well with visual assessment while also distinguishing local and global preservation separately. For example, on Olympics, WorldMap, and Shape, methods such as NMF, PCA, SVD, ICA, and KPCA receive high scores when they visually preserve the original patterns, while other methods that deform or invert structure receive lower scores [2507.04840]. On Swiss Roll, PCA, ICA, and FA are described as strong in global recovery, whereas SVD and NMF preserve local band structure; CMET is reported to reflect these differences through separate \(CMET_L\) and \(CMET_G\) scores [2507.04840].

On biological datasets, the paper reports that nonlinear methods such as UMAP, FITSNE, IVIS, and TSNE often perform better in global shape preservation, while several linear methods remain competitive for local structure on specific datasets [2507.04840]. On image datasets, especially MNIST and FMNIST, CMET is emphasized primarily as a feasible large-scale metric where alternative methods became computationally impractical [2507.04840].

## 6. Relation to prior work and interpretation

CMET is positioned against several families of embedding-quality measures: distance-matrix correlation, ranking and co-ranking methods, Trustworthiness and Continuity, LCMC, MEQA, and NIEQA [2507.04840]. Its novelty lies in replacing all-pairs structural comparison with a cluster-guided summary based on sample-to-cluster-median normalized distances for local structure and cluster-median-to-cluster-median normalized distances for global structure [2507.04840].

Within the broader literature, “Learning to Link” formulates supervised clustering-aware metric selection over convex combinations of base distances and linkage rules, optimizing empirical clustering loss relative to ground-truth partitions rather than proxy pairwise objectives [1907.00533]. That work is a conceptual precursor in the sense that the metric is chosen because it improves clustering outcomes [1907.00533]. By contrast, CMET does not learn a metric used for clustering; it evaluates how well an embedding preserves structure once a clustering scaffold has been fixed [2507.04840].

A different strand is represented by “Deep Metric Learning via Facility Location,” which inserts a clustering-quality notion into a structured deep metric learning objective through facility location and an NMI-based margin [1612.01213]. CMET is substantially narrower in scope: it is not an end-to-end training loss and does not optimize representation parameters [2507.04840]. Likewise, the 2018 paper on a “cluster score” based on feature-by-cluster contingency tables proposes a method-agnostic clustering evaluation metric, but it does not introduce the acronym CMET and is concerned with cluster health, model selection, and noisy-variable diagnosis rather than embedding preservation [1810.03419].

These comparisons suggest that CMET belongs to the family of clustering-guided evaluation methods rather than clustering-guided metric-learning methods. Its distinctive contribution is to use clustering as a structural surrogate for comparing original and transformed spaces.

## 7. Limitations and use conditions

CMET inherits dependence on the clustering step. In unsupervised mode, the metric depends on the partition produced by Agglomerative clustering; if that clustering does not reflect meaningful structure, the resulting scores may be less informative [2507.04840]. The number of clusters is the principal hyper-parameter, and the paper notes that it plays a critical role because clustering determines the structural scaffold used by both \(CMET_L\) and \(CMET_G\) [2507.04840].

The sensitivity analysis examines five equidistant cluster counts around the number of labels and reports that CMET is generally not highly sensitive across most datasets, though image datasets are identified as exceptions [2507.04840]. The relative ranking of dimensionality-reduction methods often remains stable even when the cluster number changes, although some monotonic trends are observed in \(CMET_L\) or \(CMET_G\) depending on the dataset [2507.04840]. The paper also notes that very small cluster counts weaken the interpretability of the global score: if the dataset has exactly one cluster, \(CMET_G=1\) by definition, and with two clusters the global score tends to be high and less informative [2507.04840].

Another limitation is definitional rather than computational. “Local” in CMET means preservation of cluster-relative normalized radial positions, not nearest-neighbor exactness. Consequently, CMET can disagree with neighborhood-overlap measures such as Trustworthiness because it formalizes a different notion of local structure [2507.04840]. This is a feature of the method rather than a contradiction, but it constrains interpretation.

Overall, CMET is best characterized as a low-cost, cluster-summary metric for embedding evaluation, with \(CMET_L\) targeting within-cluster local preservation and \(CMET_G\) targeting between-cluster global preservation [2507.04840]. Its strongest claims are empirical and computational: bounded scores in \([0,1]\), applicability in both supervised and unsupervised settings, favorable behavior across synthetic, biological, and image data, and practical feasibility on large datasets where several baseline metrics became difficult to compute [2507.04840].

Source: https://www.emergentmind.com/topics/clustering-guided-metric-cmet