Average Silhouette Width (ASW) is a metric that quantifies batch correction quality by calculating the mean silhouette coefficient for all data points, where a high cell-type ASW and a low batch ASW indicates successful integration. The silhouette coefficient measures how similar a point is to its own cluster compared to other clusters, ranging from -1 (incorrect clustering) to 1 (perfect separation).
Glossary
Average Silhouette Width (ASW)

What is Average Silhouette Width (ASW)?
A quantitative metric for evaluating the success of batch-effect correction by measuring the balance between biological cluster cohesion and batch label mixing.
In integration evaluation, ASW is computed twice: once on cell-type labels to confirm biological signal preservation, and once on batch labels to verify technical variation removal. An ideal correction yields a cell-type ASW approaching 1.0 and a batch ASW near 0.0, indicating that neighborhoods are defined by biology rather than experimental origin.
Key Characteristics of ASW for Integration
Average Silhouette Width (ASW) quantifies batch correction quality by measuring the balance between biological cluster cohesion and batch label dispersion. A successful integration is defined by a high cell-type ASW and a low batch ASW.
The Silhouette Score Foundation
The metric is based on the classic Silhouette coefficient, which measures how similar a data point is to its own cluster compared to other clusters. For a single cell i, the score is calculated as (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. The score ranges from -1 (incorrect clustering) to +1 (perfectly compact and separated).
Cell-Type ASW (cASW)
To assess biological conservation, the ASW is calculated using cell-type labels as the cluster identity. A high average score (approaching 1.0) indicates that cells of the same type remain tightly grouped after integration, regardless of which batch they originated from. This confirms that the correction algorithm did not erase true biological variance.
Batch ASW (bASW)
To assess batch mixing, the ASW is calculated using batch labels as the cluster identity. An ideal correction results in a score near 0 or negative, indicating that batch labels are randomly distributed and do not form distinct clusters. A score of 1.0 represents a complete failure where batches remain perfectly separated.
The 1 - bASW Transformation
For intuitive scaling, the batch mixing score is often transformed to 1 - absolute(bASW) . This normalizes the metric so that 0 indicates pure batch separation and 1 indicates perfect mixing. This transformation allows for direct averaging with the cell-type ASW to produce a single, unified integration score.
Local vs. Global Assessment
Unlike global divergence metrics, ASW operates on the local neighborhood structure. It penalizes scenarios where batch effects create artificial sub-clusters within a true cell type. This makes it sensitive to the 'kissing cell' problem, where two batches form distinct but adjacent groups that global metrics might incorrectly classify as well-mixed.
Computational Considerations
Calculating the full pairwise distance matrix for ASW scales quadratically with cell count, making it computationally intensive for million-cell atlases. Common optimizations include:
- Using a random subsample of cells
- Calculating distances on a PCA or scVI latent space rather than the full gene expression matrix
- Using approximate nearest neighbors to estimate the nearest-cluster distance
ASW vs. Other Batch Correction Metrics
A comparison of Average Silhouette Width with other quantitative metrics used to evaluate the success of batch effect correction in single-cell and high-dimensional data integration.
| Feature | ASW | kBET | LISI | Entropy of Mixing |
|---|---|---|---|---|
Primary Measurement | Cohesion vs. separation | Local batch label distribution | Effective diversity in neighborhood | Randomness of batch labels |
Core Statistical Approach | Silhouette coefficient | Chi-squared test | Inverse Simpson's index | Shannon entropy |
Evaluates Cell-Type Preservation | ||||
Evaluates Batch Mixing | ||||
Requires Cell-Type Labels | ||||
Optimal Score | Batch ASW = 0, Cell-type ASW = 1 | Acceptance rate = 1.0 | iLISI = N batches, cLISI = N cell types | High entropy value |
Sensitivity to Neighborhood Size (k) | Low | High | High | High |
Penalizes Overcorrection |
Frequently Asked Questions
Clarifying the application and interpretation of the Average Silhouette Width metric for evaluating single-cell data integration and batch correction.
The Average Silhouette Width (ASW) is a cluster cohesion and separation metric adapted for single-cell data integration to quantify the success of batch correction. In this context, it is computed in two distinct ways: the cell-type ASW measures how well cells of the same biological type cluster together in the integrated embedding, with a score near 1.0 indicating tight, well-separated clusters. Conversely, the batch ASW measures how well cells are grouped by their experimental batch label; a score near 0 indicates that batch labels are randomly distributed and not forming distinct clusters, which is the desired outcome after successful integration. The ideal result is a high cell-type ASW and a low batch ASW, demonstrating that the correction preserved biological signal while removing technical variation.
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
Average Silhouette Width is part of a broader toolkit of quantitative metrics used to evaluate the success of batch correction. These complementary scores assess different aspects of data integration, from local mixing to global structure preservation.
Local Inverse Simpson's Index (LISI)
A complementary diversity score computed for each cell's local neighborhood. Integration LISI (iLISI) measures the effective number of batches present, where a higher value indicates better mixing. Cell-type LISI (cLISI) measures the effective number of cell types, where a lower value indicates better biological signal preservation. Used alongside ASW to provide a dual perspective on integration quality.
k-nearest Neighbor Batch Effect Test (kBET)
A quantitative metric that evaluates batch mixing by comparing the local batch label distribution in a k-nearest neighbor graph to the global batch distribution. A perfect mix yields a chi-squared test acceptance rate near 1.0. Unlike ASW, kBET provides a formal statistical test with a p-value, making it suitable for regulatory submissions.
Entropy of Batch Mixing
An information-theoretic metric that quantifies the randomness of batch labels within a defined local neighborhood of cells. High entropy indicates a well-mixed, successfully integrated dataset free of local batch clustering. This metric directly measures the uniformity of batch distribution without requiring cluster labels, unlike ASW.
Overcorrection Assessment
The process of evaluating whether a batch correction method has removed true biological variation alongside technical noise. Key indicators include:
- Preservation of known cell-type clusters
- Variance explained by biological covariates
- Maintenance of marker gene expression patterns ASW is a primary tool for this assessment, with cell-type ASW measuring biological preservation.
Maximum Mean Discrepancy (MMD)
A kernel-based statistical test used as a loss function in deep learning to measure the distance between two probability distributions. In batch correction, MMD enables the alignment of latent feature distributions from different batches. It provides a distribution-level metric that complements ASW's cluster-level assessment, particularly useful for evaluating deep learning integration methods like scVI and DANN.
Principal Component Analysis (PCA) Visualization
A dimensionality reduction technique used to visually inspect batch correction results. By coloring cells by batch label and cell type in PCA space, researchers can qualitatively assess integration before computing quantitative metrics like ASW. Effective correction shows overlapping batch distributions while maintaining distinct cell-type clusters.

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