Cluster Marker Coherence (CMC)
- Cluster Marker Coherence (CMC) is a metric that quantifies the average detection of canonical marker genes in cell clusters, reflecting biological fidelity.
- It aggregates per-cell marker detection into both unweighted and size-weighted global scores, offering precise insights into cluster coherence.
- CMC is used in spatial transcriptomics to benchmark dimensionality reduction methods and optimize marker-based clustering through MER-guided reassignment.
Cluster Marker Coherence (CMC) is a biologically motivated clustering evaluation measure introduced in the spatial transcriptomics benchmarking study "Benchmarking Dimensionality Reduction Techniques for Spatial Transcriptomics" (Mahmud et al., 12 Sep 2025). It quantifies, for each cluster, the average fraction of that cluster’s canonical marker genes detected in its member cells, and then aggregates this quantity across clusters. In the benchmark, CMC is used alongside reconstruction error, explained variance, cluster cohesion, and Marker Exclusion Rate (MER) to evaluate dimensionality reduction methods on a cholangiocarcinoma Xenium dataset. Its intended role is to assess biological fidelity rather than purely geometric separation, and the study reports both an unweighted and a size-weighted variant.
1. Formal definition and notation
The benchmark defines CMC on a normalized cell-by-gene expression matrix , where is the number of cells and is the number of genes (Mahmud et al., 12 Sep 2025). Let denote the number of clusters obtained by Leiden clustering at resolution , let be the number of cells in cluster , and let be the set of canonical marker genes for cluster , with cardinality . If 0 is the preprocessed expression value of gene 1 in cell 2, then the per-cluster marker detection fraction is
3
Two global variants are reported. The unweighted mean across clusters is
4
and the size-weighted mean across clusters is
5
Because 6 is a fraction of detected markers per cell averaged over cells in a cluster, the benchmark states that 7. Consequently, both 8 and 9 also lie in 0. Larger values indicate that cells in a cluster consistently express that cluster’s canonical marker genes; values near 1 denote highly coherent marker expression within clusters, whereas values near 2 denote poor marker expression.
2. Inputs, preprocessing, and computational workflow
CMC is computed from expression only; spatial coordinates are not directly used, and the study explicitly notes that spatially augmented algorithms are excluded from this analysis (Mahmud et al., 12 Sep 2025). The expression counts are normalized per cell to a total of 10,000 and then log-transformed as 3. The indicator in the CMC definition uses the simple detection threshold 4 after this preprocessing, so the metric operates on presence or absence in the log-normalized layer.
The required inputs are cluster labels, marker sets, and the preprocessed matrix. Clusters are obtained in a low-dimensional embedding 5 using Leiden clustering, with the resolution parameter 6 systematically varied in 7. The marker sets 8 are canonical, curated marker gene sets for each biological cell type or cluster in the cholangiocarcinoma Xenium assay, which measures 480 genes. The computational procedure is explicit: obtain clusters 9 in the chosen embedding; define marker sets 0; compute, for each cell in each cluster, the fraction of positive markers; average these fractions within each cluster to obtain 1; and finally aggregate either as 2 or 3.
The paper also provides a concrete worked example. If one cluster has 4 cells and 5 markers, with binary detection patterns 6, 7, and 8, then the per-cell fractions are 9, 0, and 1, and the cluster-level value is
2
This example makes explicit that CMC is a cell-level detection summary aggregated to the cluster level before any global averaging.
3. Biological interpretation and relation to other evaluation criteria
The benchmark characterizes CMC as a measure of the biological coherence of clusters with respect to known marker genes (Mahmud et al., 12 Sep 2025). High CMC indicates within-cluster consistency of canonical markers and, therefore, biologically faithful clusters. The central interpretive point is that CMC does not ask whether clusters are geometrically compact in an embedding, but whether cells assigned to the same cluster actually express the markers expected for that cluster.
This distinguishes CMC from several conventional metrics used in the same benchmark. Cluster cohesion metrics such as Silhouette and DBI are geometric and distance-based; they can be high even if clusters are not biologically well-defined. Reconstruction error and explained variance assess how well a dimensionality reduction method reconstructs the full expression matrix, but they do not directly address biological interpretability. Marker enrichment methods such as GSEA evaluate over-representation of marker sets at the cluster level, whereas CMC quantifies cell-level marker presence as the fraction detected per cell rather than aggregate statistical enrichment.
| Metric family | Primary focus | Contrast with CMC |
|---|---|---|
| Cluster cohesion | Geometric separation in embedding space | Can be high without biologically faithful marker expression |
| Reconstruction error / explained variance | Fidelity to the full expression matrix | Does not directly measure biological interpretability |
| Marker enrichment | Cluster-level over-representation of marker sets | CMC quantifies cell-level marker presence |
The benchmark’s RAW baseline makes this distinction especially clear. No reduction yields CMC in the range 3–4 but poor geometric cohesion, with Silhouette 5. This underscores the specific claim that high CMC alone is not sufficient for good clustering quality. A plausible implication is that CMC is best interpreted as one axis in a multi-objective evaluation rather than as a standalone criterion.
4. Marker Exclusion Rate and MER-guided reassignment
CMC is closely coupled in the benchmark to Marker Exclusion Rate (MER), which is defined using marker-based reassignment logic (Mahmud et al., 12 Sep 2025). For each cell 6, the best-matching cluster is defined by summed marker expression,
7
With 8 the current cluster label and 9 the set of all marker-positive cells, MER is
0
The study also tracks marker-zero cells (MZC), defined as
1
The MER-guided reassignment algorithm reassigns a cell whose assigned cluster does not maximize its marker expression, subject to a small margin 2 and the requirement that 3. The rule is: if 4 and 5, set 6; otherwise retain 7. The benchmark states that this procedure consistently increases CMC, because cells are relabeled to clusters whose markers they truly express.
Representative Pareto-optimal configurations after MER-guided reassignment show MER driven to 8 and CMC increased across methods:
| Method / configuration | CMC before | CMC after |
|---|---|---|
| PCA (9, 0) | 0.819 | 0.866 |
| NMF (1, 2) | 0.841 | 0.901 |
| VAE (3, 4) | 0.763 | 0.862 |
| AE (5, 6) | 0.729 | 0.819 |
| PCA+NMF (10,10; 7) | 0.846 | 0.863 |
| VAE+NMF (5,5; 8) | 0.779 | 0.848 |
The abstract summarizes these gains as “CMC scores improving by up to 12% on average.” In the benchmark’s interpretation, MER-guided reassignment improves biological fidelity across all methods by aligning labels with marker expression.
5. Behavior across dimensionality reduction methods and hyperparameters
CMC is evaluated under a systematic hyperparameter sweep over latent dimension 9 and Leiden resolution 0 (Mahmud et al., 12 Sep 2025). The benchmark studies PCA, NMF, autoencoder (AE), VAE, and two hybrid embeddings, with Pareto analysis used to characterize trade-offs among geometric clustering quality, reconstruction fidelity, and biological coherence.
Method-specific Pareto-point ranges reported for CMC reveal distinct performance profiles. PCA shows CMC between approximately 1 and 2, with one cited example at 3, 4 yielding 5. NMF shows approximately 6–7 and is reported to excel in marker enrichment, mapping well to known cell types. AE shows approximately 8–9, described as a middle ground with some denoising benefits but typically lower coherence before MER. VAE shows approximately 0–1 and is described as balancing reconstruction and clustering metrics with moderate coherence. The hybrids PCA+NMF and VAE+NMF reach approximately 2–3 and are said to capture complementary strengths, combining good cohesion with improved biological coherence.
The empirical dataset consists of 191,125 single cells across 40 TMA cores and 480 target genes. Within this setting, the reported Pareto fronts show trade-offs between geometric clustering quality and biological coherence expressed as CMC multiplied by enrichment. VAE often occupies upper-right Pareto points; NMF consistently yields high enrichment and competitive CMC; PCA provides strong cohesion but lower enrichment and MER is often higher. These reported patterns suggest that CMC is sensitive both to the embedding geometry induced by dimensionality reduction and to the extent to which that geometry preserves marker-defined cell identities.
6. Optimization strategies in practice
The benchmark provides explicit practical guidance for optimizing CMC in spatial transcriptomics workflows (Mahmud et al., 12 Sep 2025). To prioritize biological coherence, defined there as higher CMC and enrichment, it recommends favoring NMF or hybrid embeddings such as PCA+NMF or VAE+NMF. For balanced performance and tighter clusters with respectable CMC, it reports that VAE often sits on Pareto fronts and recommends lower latent dimensions, for example 4–5, together with moderate 6 to avoid overfragmentation. PCA is described as yielding high cohesion but often requiring MER-guided reassignment to achieve competitive CMC.
Hyperparameter selection is framed as a multi-objective exercise. The study recommends exploring 7 from 5 to 40 and 8 from 0.1 to 1.2, and selecting Pareto-optimal settings that balance Silhouette or DBI against CMC multiplied by enrichment. It further advises avoiding overly high 9, because fragmentation can reduce 0 by diluting marker sets across small clusters. MER-guided reassignment is presented not as an optional refinement but as a systematic post-processing step: compute MER, apply reassignment with a small 1 margin to prevent unstable flips, and use the post-MER configuration as the biologically better-aligned solution.
The case study in the benchmark gives concrete marker contexts in which coherence increases after reassignment. Clusters enriched for cholangiocyte markers (ANXA4, AQP1, CLU, CDH6, DCDC2), macrophage markers (PSAP, CTSB, MS4A7, C1QC, CD68), stromal or mesenchymal markers (SPARC, VIM, COL4A2, MGP, TIMP3), and lymphoid markers (CXCR4, IL7R, TRBC2, TRAC, CD3E) showed higher coherence after MER reassignment, reflected by increased fraction of marker-positive cells.
7. Limitations, edge cases, and scope conditions
The benchmark identifies several limitations and edge cases for CMC (Mahmud et al., 12 Sep 2025). If a marker set 2 is small or contains genes with ubiquitous expression, 3 may be inflated or otherwise non-informative. The suggested mitigation is to complement CMC with enrichment scores and MER-guided refinement; the discussion also mentions marker-weight overrides that can down-weight housekeeping genes. Highly heterogeneous clusters lower 4 by mixing cells that lack cluster markers, so the study recommends adjusting 5 to avoid over- or under-segmentation and applying MER reassignment to reassign misclustered cells.
The detection rule 6 is described as simple and robust, but the paper notes that it may be sensitive to low-level noise. Threshold tuning, which was not explored in the benchmark, or requiring multiple markers per cell could reduce false positives. The pipeline used in the study nevertheless fixes the rule to normalized 7 counts with a 8 threshold. Batch effects are another scope condition: the study did not perform explicit batch correction because QC indicated minimal technical variation, but it states that in settings with stronger batch effects, CMC can be confounded and batch correction should be adopted before computing CMC.
Finally, CMC intentionally ignores spatial coordinates. In a spatial transcriptomics setting, this makes it a pure expression-based coherence metric rather than a spatially aware one. The benchmark notes that, in tissues where spatial neighborhoods define identities, adding spatial constraints is future work and may further improve coherence. This suggests that CMC is best understood as a marker-grounded expression criterion within a broader evaluation stack, especially when spatial context contributes substantially to cell identity.