Inferensys

Glossary

Highly Variable Gene Selection

A feature selection method that identifies the most informative genes with high cell-to-cell variation in expression, reducing dimensionality while preserving the dominant biological signal in single-cell data.
Data engineer managing feature store on laptop, feature definitions visible, casual data engineering session.
FEATURE SELECTION

What is Highly Variable Gene Selection?

A critical dimensionality reduction preprocessing step in single-cell analysis that identifies genes with the greatest cell-to-cell expression variance to capture dominant biological signals while filtering out technical noise.

Highly Variable Gene Selection (HVG selection) is a feature selection method that identifies the most informative genes exhibiting significant cell-to-cell variation in expression, reducing the dimensionality of single-cell transcriptomic data while preserving the dominant biological signal. By modeling the relationship between mean expression and variance, HVG selection distinguishes genes whose variability exceeds technical noise expectations, typically retaining 1,000–5,000 genes for downstream analysis.

This selection is foundational to workflows in Seurat, Scanpy, and other single-cell frameworks, where the chosen highly variable genes drive principal component analysis (PCA), graph-based clustering, and trajectory inference. Without HVG selection, computational resources are wasted on stochastically expressed or uniformly low-abundance genes, while genuine biological heterogeneity—driven by cell type, cell cycle, or developmental state—remains obscured by the curse of dimensionality.

FEATURE SELECTION

Key Characteristics of HVG Selection

Highly Variable Gene (HVG) selection is a critical dimensionality reduction step that identifies genes with the greatest cell-to-cell expression variance, preserving the dominant biological signal while filtering out stochastic noise.

01

Mean-Variance Relationship Modeling

HVG selection corrects for the inherent dependency between a gene's mean expression and its variance. In single-cell data, highly expressed genes naturally show higher absolute variance. Methods like variance-stabilizing transformation (VST) or deviance-based models fit a non-linear curve to this relationship, then select genes that deviate significantly above the expected variance for their expression level. This prevents the selection of highly expressed but uninformative housekeeping genes.

02

Biological vs. Technical Variance

The core objective is to isolate biological heterogeneity from technical noise. Technical variation arises from:

  • Sampling noise: Low capture efficiency in droplet-based systems
  • Amplification bias: Uneven PCR amplification across transcripts
  • Dropout events: Genes with zero counts due to failed detection

HVG methods model the expected technical variance and select genes where observed variance exceeds this baseline, enriching for genuine biological signal.

03

Common Selection Algorithms

Three dominant approaches are implemented in standard workflows:

  • Seurat v3/v5 VST: Applies variance-stabilizing transformation, bins genes by mean expression, and selects top variance within each bin. Returns 2,000 HVGs by default.
  • scran modelGeneVar: Fits a gamma-Poisson GLM to decompose total variance into biological and technical components, selecting genes with positive biological variance.
  • Scanpy highly_variable_genes: Implements both dispersion-based (normalized variance over mean) and Pearson residual methods for HVG identification.
04

Impact on Downstream Analysis

HVG selection directly shapes the latent space used for clustering and visualization:

  • PCA input: Only HVGs are used for principal component computation, ensuring PCs capture biological rather than technical variation.
  • Graph construction: K-nearest neighbor graphs built on HVG-derived PCs produce more biologically coherent Leiden clusters.
  • UMAP/t-SNE: Dimensionality reduction embeddings reflect true cell-type relationships when built from HVG-filtered data.
  • Marker gene discovery: Differential expression testing on HVGs reduces multiple-testing burden and enriches for discriminative features.
05

Selection Thresholds and Sparsity

The number of HVGs selected is a critical hyperparameter:

  • Default range: 1,000–5,000 genes, typically 2,000 for 10x Genomics data
  • Too few HVGs: Risk excluding rare cell-type-specific genes and subtle biological gradients
  • Too many HVGs: Introduce noise, dilute biological signal in PCA, and increase computational cost
  • Sparsity consideration: In highly sparse datasets (e.g., Smart-seq2 with low dropout), dispersion-based methods may require adjusted thresholds to avoid selecting genes driven by zero-inflation artifacts.
06

Flavor Variants and Normalization Dependencies

HVG selection behavior depends critically on upstream normalization:

  • Seurat 'vst': Operates on log-normalized data; robust for UMI-based technologies
  • Seurat 'mean.var.plot': Legacy dispersion-based method on normalized data
  • Scanpy 'seurat_v3': Expects raw counts and applies the count-based VST internally
  • Pearson residuals: Applied to raw counts with regularized negative binomial regression, bypassing explicit normalization

Choosing the wrong flavor for your normalization state produces misleading variance estimates and suboptimal gene sets.

HIGHLY VARIABLE GENE SELECTION

Frequently Asked Questions

Clear, technically precise answers to the most common questions about identifying and leveraging the most informative genes in single-cell transcriptomic data.

Highly variable gene (HVG) selection is a feature selection method that identifies a subset of genes exhibiting the greatest cell-to-cell variation in expression, which is used to reduce the dimensionality of single-cell RNA-seq data while preserving the dominant biological signal. It is critical because the vast majority of genes in a typical single-cell dataset are either unexpressed or show minimal variation, contributing only noise. By restricting downstream analyses like Principal Component Analysis (PCA) and clustering to the top 1,000–5,000 HVGs, you dramatically reduce computational overhead, mitigate the 'curse of dimensionality,' and ensure that the primary axes of variation are driven by meaningful biological heterogeneity rather than technical noise or stochastic dropout. The core assumption is that the genes with the highest variance are the most likely to define distinct cell types and states.

Prasad Kumkar

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.