The Silhouette Score measures how similar a patient is to its own cluster compared to other clusters, producing a value between -1 and 1. A score near 1 indicates a patient is well-matched to its own cluster and poorly matched to neighboring clusters, signifying optimal stratification. Scores near 0 suggest overlapping clusters, while negative values indicate a patient may have been assigned to the wrong group. The metric is calculated as (b - a) / max(a, b), where a is the mean intra-cluster distance and b is the mean nearest-cluster distance.
Glossary
Silhouette Score

What is Silhouette Score?
The Silhouette Score is an internal cluster validation metric that quantifies how well each data point fits within its assigned cluster, providing a measure of cluster cohesion and separation for evaluating patient stratification quality.
In patient stratification, the Silhouette Score serves as a critical diagnostic tool for selecting the optimal number of clusters (k) and comparing different algorithmic approaches such as K-Means, hierarchical clustering, or Gaussian Mixture Models. By averaging individual silhouette coefficients across all patients, data scientists obtain a global assessment of clustering validity. However, the score assumes spherical cluster shapes and may undervalue density-based groupings identified by algorithms like DBSCAN, necessitating complementary validation with cluster stability analysis and domain expertise.
Key Characteristics of the Silhouette Score
The Silhouette Score provides a quantitative measure of cluster cohesion and separation, essential for validating patient stratification quality in unsupervised learning pipelines.
Definition and Range
The Silhouette Score measures how similar a patient is to its own cluster compared to other clusters. It ranges from -1 to 1, where:
- +1: The patient is well-matched to its own cluster and poorly matched to neighboring clusters
- 0: The patient is on or very close to the decision boundary between two clusters
- -1: The patient is likely assigned to the wrong cluster
The score for a single data point i is calculated as:
s(i) = (b(i) - a(i)) / max{a(i), b(i)}
where a(i) is the mean intra-cluster distance and b(i) is the mean nearest-cluster distance.
Interpreting Cluster Quality
The average Silhouette Score across all patients provides a global assessment of clustering validity:
- 0.71–1.00: A strong structure has been found; clusters are well-separated and cohesive
- 0.51–0.70: A reasonable structure has been found; clusters are moderately distinct
- 0.26–0.50: The structure is weak and could be artificial; consider alternative algorithms
- < 0.25: No substantial structure has been found; the data likely lacks natural groupings
In clinical contexts, a score below 0.50 typically warrants revisiting feature selection or the number of clusters k.
Silhouette Plot Visualization
A Silhouette Plot displays each patient's individual score as a horizontal bar, grouped by cluster assignment. Key visual diagnostics include:
- Cluster thickness: Proportional to cluster size; uniform thickness across clusters is desirable
- Individual bar length: Longer bars indicate better fit; negative bars signal misclassification
- Average score line: A vertical dashed line showing the overall mean, enabling quick quality assessment
This visualization is standard practice in clinical data science for presenting stratification results to non-technical stakeholders, as it intuitively reveals cluster overlap.
Determining Optimal k
The Silhouette Score is a primary heuristic for selecting the optimal number of clusters k in algorithms like K-Means and Hierarchical Clustering. The process involves:
- Computing the average Silhouette Score for a range of k values (e.g., 2 to 10)
- Selecting the k that maximizes the average score
- Avoiding k values that produce clusters with below-average individual scores
This method is preferred over the Elbow Method when cluster shapes are non-spherical, as it accounts for both cohesion and separation rather than just within-cluster variance.
Limitations in Clinical Data
Despite its utility, the Silhouette Score has notable limitations in patient stratification:
- Assumes convex clusters: Performs poorly with complex, non-convex disease trajectories identified by DBSCAN or HDBSCAN
- Distance metric sensitivity: Euclidean distance may not capture clinical similarity; Manhattan or cosine distances often yield different scores
- High-dimensional degradation: In genomic datasets with thousands of features, distance measures become less meaningful due to the curse of dimensionality
- Ignores clinical utility: A mathematically optimal score does not guarantee clinically actionable subgroups
Always pair the Silhouette Score with clinical outcome validation and domain expert review.
Comparison with Other Metrics
The Silhouette Score is often used alongside complementary validation metrics:
- Davies-Bouldin Index: Measures the average similarity between each cluster and its most similar one; lower values indicate better partitioning
- Calinski-Harabasz Index: Ratio of between-cluster dispersion to within-cluster dispersion; higher values are better
- Dunn Index: Ratio of minimum inter-cluster distance to maximum intra-cluster distance
Unlike these alternatives, the Silhouette Score provides per-sample diagnostics, making it uniquely valuable for identifying individual patients who are poorly classified and may represent transitional disease states.
Frequently Asked Questions
Clear answers to common questions about interpreting and applying the Silhouette Score for robust patient subgroup discovery.
The Silhouette Score is an internal cluster validation metric that measures how similar a patient is to its own cluster compared to other clusters, producing a value ranging from -1 to 1. For each data point i, the calculation involves two distances: a(i), the mean intra-cluster distance (average dissimilarity to all other members of the same cluster), and b(i), the mean nearest-cluster distance (average dissimilarity to all members of the closest neighboring cluster). The silhouette coefficient for that point is s(i) = (b(i) - a(i)) / max{a(i), b(i)}. A score near +1 indicates the patient is well-matched to its own cluster and poorly matched to neighboring clusters, signifying a robust stratification. A score near 0 suggests the point lies on or very close to the decision boundary between two clusters, while negative values indicate the patient may have been assigned to the wrong cluster entirely. The overall cluster quality is assessed by averaging s(i) across all patients.
Silhouette Score vs. Other Cluster Validation Metrics
A technical comparison of the Silhouette Score against other common internal cluster validation indices used for assessing patient stratification quality without ground truth labels.
| Metric | Silhouette Score | Davies-Bouldin Index | Calinski-Harabasz Index | Dunn Index |
|---|---|---|---|---|
Core Measurement | Cohesion vs. Separation | Cluster Similarity Ratio | Between/Within Variance Ratio | Min Inter / Max Intra Distance |
Optimal Value | Near +1 | Near 0 | Maximum | Maximum |
Range | -1 to 1 | 0 to ∞ | 0 to ∞ | 0 to ∞ |
Sensitivity to Cluster Shape | Prefers convex clusters | Prefers convex clusters | Prefers convex clusters | Handles arbitrary shapes |
Sensitivity to Noise | Moderate | Low | High | High |
Computational Complexity | O(n²) | O(n log n) | O(n log n) | O(n²) |
Handles Varying Density | ||||
Per-Sample Score Available |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Master the Silhouette Score by understanding its role within the broader ecosystem of clustering algorithms, stability metrics, and patient stratification techniques.
Cluster Stability Analysis
A validation framework that assesses the robustness of patient clusters by measuring their reproducibility under data perturbation or resampling. While the Silhouette Score measures internal cohesion, stability analysis ensures the discovered subgroups are not artifacts of a specific algorithm run.
- Uses bootstrapping or subsampling to generate multiple clusterings
- Calculates metrics like the Jaccard coefficient or Adjusted Rand Index between runs
- Essential for convincing clinicians that a molecular taxonomy is reliable
Davies-Bouldin Index
An alternative internal validation metric that evaluates the average similarity between each cluster and its most similar counterpart. Lower values indicate better partitioning.
- Defined as the ratio of within-cluster scatter to between-cluster separation
- Unlike the Silhouette Score, it does not rely on pairwise distances for all points, making it computationally lighter on massive datasets
- Often used in conjunction with the Silhouette Score to provide a multi-faceted validation
Calinski-Harabasz Index
Also known as the Variance Ratio Criterion, this index evaluates cluster validity based on the ratio of between-cluster dispersion to within-cluster dispersion. Higher scores indicate dense, well-separated clusters.
- Computationally efficient compared to the Silhouette Score
- Tends to favor convex, spherical clusters, making it a good partner metric for K-Means and Gaussian Mixture Models
- Useful for quickly scanning a wide range of potential cluster counts (k)
Gap Statistic
A statistical method for determining the optimal number of clusters by comparing the total within-cluster variation for different k values against a null reference distribution of the data.
- Generates a reference dataset with no obvious clustering using uniform distribution sampling
- The optimal k is the smallest value where the gap statistic falls within one standard deviation of the gap at k+1
- Provides a formal hypothesis testing framework, unlike the heuristic interpretation of the Silhouette Score
Consensus Clustering
A resampling-based methodology that aggregates results from multiple clustering runs to identify robust and stable patient subgroups. It provides a consensus matrix showing how frequently pairs of patients are assigned to the same cluster.
- Directly addresses the instability that a single Silhouette Score calculation might mask
- Visualized via a consensus matrix heatmap and empirical cumulative distribution function plots
- Widely used in cancer genomics to define molecular subtypes from noisy high-dimensional data
DBSCAN & HDBSCAN
Density-based algorithms that define clusters as areas of high density separated by areas of low density. They naturally handle noise and do not require pre-specifying the number of clusters.
- DBSCAN uses a fixed density threshold, while HDBSCAN varies it to find clusters of differing densities
- The Silhouette Score can be applied to the resulting non-spherical clusters, but the Density-Based Clustering Validation (DBCV) index is often more appropriate
- Critical for identifying rare disease endotypes that appear as small, dense islands in the data

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us