Highly Variable Genes (HVG) are identified by modeling the relationship between a gene's mean expression and its variance or dispersion. Genes whose observed variance substantially exceeds the expected technical variance at a given expression level are designated as HVGs. This selection step is critical in single-cell RNA-seq analysis because it filters out stochastically noisy or uniformly expressed genes, retaining those that capture the dominant axes of biological heterogeneity.
Glossary
Highly Variable Genes (HVG)

What is Highly Variable Genes (HVG)?
Highly Variable Genes (HVG) are genes that exhibit significantly greater expression variance across a population of single cells than is attributable to technical noise, and they are selected as the most informative features for downstream dimensionality reduction and clustering.
The typical workflow involves fitting a loess regression or gamma generalized linear model to the mean-variance trend, then ranking genes by their standardized residuals or dispersion z-scores. The top 2,000 to 5,000 HVGs are commonly used as input for Principal Component Analysis (PCA). By restricting analysis to HVGs, computational load is drastically reduced while preserving the biological signal necessary for accurate cell type annotation and trajectory inference.
Key Characteristics of HVG Selection
Highly Variable Genes (HVGs) are selected based on their biological signal-to-noise ratio. The following characteristics define the computational heuristics used to distinguish meaningful variation from technical noise in single-cell data.
Mean-Variance Relationship
HVG selection explicitly models the dependency between gene expression mean and variance. In scRNA-seq, variance naturally increases with mean expression due to Poisson sampling noise. Algorithms fit a loess regression or gamma-Poisson GLM to the log(variance) vs log(mean) trend. Genes with positive residuals—variance significantly exceeding the fitted trend—are flagged as HVGs. This prevents the selection of highly expressed but uninformative housekeeping genes.
Standardized Variance Metrics
To rank genes, methods compute a standardized variance that corrects for the mean-dependence. Common approaches include:
- vst (Variance Stabilizing Transformation): Applies a transformation to render variance independent of mean, then ranks by transformed variance.
- dispersion (cv2): Uses the squared coefficient of variation, comparing observed dispersion to the expected sampling noise.
- deviance: Calculates the deviance of a fitted null model, capturing excess variability beyond technical expectations.
Binning for Local Robustness
To avoid global trend distortions, genes are binned by average expression into equal-frequency groups. Within each bin, the median absolute deviation (MAD) or z-score of variance is calculated. This local normalization ensures that HVG selection is not biased toward high-expression regimes. A gene is selected if its variance exceeds a threshold (e.g., z-score > 0.5) relative to its local bin neighbors.
Top-N Selection Heuristic
Most workflows select a fixed number of top HVGs (e.g., top 2,000 or top 5,000) rather than using a strict statistical cutoff. This heuristic balances computational tractability with biological signal retention. Selecting too few genes risks missing rare cell-type markers; selecting too many introduces noise that degrades Principal Component Analysis (PCA) and graph-based clustering performance.
Batch-Aware Selection
In multi-sample studies, naive HVG selection can capture batch effects rather than biology. Advanced methods like scran or Seurat's SelectIntegrationFeatures identify genes that are highly variable consistently across batches. This involves ranking genes by variance within each batch independently, then selecting those with high median rank across all batches, ensuring the selected features represent robust biological heterogeneity.
Flavor Variants: Seurat vs. Scanpy
Different toolkits implement distinct HVG strategies:
- Seurat v5: Defaults to
vst, selecting 2,000 features by default. It fits a loess curve to log(variance) vs log(mean) and ranks by standardized variance. - Scanpy: Offers
seurat,seurat_v3, andcell_rangerflavors. Theseurat_v3method uses a count-based gamma-Poisson model without log-transformation, directly estimating dispersion parameters. - scran: Models technical noise using spike-in RNA or by decomposing variance into biological and technical components via a mixed-effects model.
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.
Frequently Asked Questions
Clear, technical answers to the most common questions about Highly Variable Genes and their role in single-cell analysis.
Highly Variable Genes (HVG) are genes that exhibit significantly greater expression variance across individual cells than would be expected from technical noise alone. They are identified by modeling the relationship between the mean expression level and the variance (or coefficient of variation) for every gene in a count matrix. Genes whose observed variance substantially exceeds the predicted technical variance—often calculated using a loess regression or a negative binomial model—are selected. This feature selection step filters out stochastically noisy or uniformly expressed housekeeping genes, retaining the biologically informative features that drive cellular heterogeneity for downstream dimensionality reduction and clustering.
Related Terms
Understanding Highly Variable Genes requires familiarity with the preprocessing steps that precede feature selection and the downstream analyses that depend on it.
Normalization
The process of scaling raw count data to adjust for differences in sequencing depth and capture efficiency between cells. Without proper normalization, the variance calculated during HVG selection would be dominated by technical artifacts rather than biological heterogeneity. Common methods include library-size normalization (counts per million) and more sophisticated approaches like SCTransform, which uses regularized negative binomial regression to stabilize variance while preserving biological signal.
Batch Effect
Non-biological systematic variation introduced by technical factors like different experimental runs, reagents, or sequencing lanes. If uncorrected, batch effects can dominate the variance structure, causing HVG selection to identify batch-specific genes rather than biologically informative features. This is why HVG selection is often performed after data integration or within individual batches before merging.
Dimensionality Reduction
The mathematical transformation of high-dimensional single-cell data into a lower-dimensional space, and the primary consumer of HVG selection. By restricting analysis to the top 2,000–5,000 most variable genes, Principal Component Analysis (PCA) can focus on the axes of greatest biological variation. This compressed representation then feeds into t-SNE or UMAP for visualization and graph-based clustering for cell type discovery.
Count Matrix
A sparse numerical matrix where rows represent genes and columns represent cell barcodes, storing the number of transcripts detected per gene in each cell. HVG selection operates directly on this matrix after quality control (QC) filtering. The sparsity of single-cell data—where over 90% of entries are zeros due to dropout events—necessitates variance-stabilizing transformations before meaningful HVG identification can occur.

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