Abstract
Modern biobanks are providing numerous high-resolution genomic sequences of diverse populations. In order to account for diverse and admixed populations, new algorithmic tools are needed in order to properly capture the genetic composition of populations. Here, we explore deep learning techniques, namely, variational autoencoders (VAEs), to process genomic data from a population perspective. We show the power of VAEs for a variety of tasks relating to the interpretation, compression, classification, and simulation of genomic data with several worldwide whole genome data sets from both humans and canids, and evaluate the performance of the proposed applications with and without ancestry conditioning. The unsupervised setting of autoencoders allows for the detection and learning of granular population structure and inferring of informative latent factors. The learned latent spaces of VAEs are able to capture and represent differentiated Gaussian-like clusters of samples with similar genetic composition on a fine scale from single nucleotide polymorphisms (SNPs), enabling applications in dimensionality reduction and data simulation. These individual genotype sequences can then be decomposed into latent representations and reconstruction errors (residuals), which provide a sparse representation useful for lossless compression. We show that different populations have differentiated compression ratios and classification accuracies. Additionally, we analyze the entropy of the SNP data, its effect on compression across populations, and its relation to historical migrations, and we show how to introduce autoencoders into existing compression pipelines.
Introduction
Modern biobanks are generating an unprecedented volume of high-dimensional genomic data. To analyze this information, geneticists primarily focus on Single Nucleotide Polymorphisms (SNPs). However, traditional statistical methods face significant hurdles. Standard compression algorithms often fail to exploit the unique, highly correlated structure of genomic sequences, leading to prohibitive storage costs. Furthermore, the industry-standard visualization tool, Principal Component Analysis (PCA), is limited by its linear nature and its assumption that SNPs are independent, thereby ignoring Linkage Disequilibrium (LD)—the natural correlation between neighboring genetic variants. Finally, existing genomic databases are heavily biased toward European ancestries, creating a "diversity gap" that necessitates new methods for simulating realistic, diverse genomes for research without compromising patient privacy.
Methods
To address these challenges, this research proposes the use of Variational Autoencoders (VAEs) as a versatile framework for population genetics. Unlike traditional linear models, VAEs use non-linear neural networks to learn complex patterns in genetic data.
Lossless Compression with VQ-VAE
For data compression, the authors developed a window-based Vector Quantized VAE (VQ-VAE). The encoder compresses SNP sequences into a discrete latent representation, while the decoder attempts to reconstruct the original sequence. Because the reconstruction is lossy, the system calculates a "residual"—the exact difference between the input and the reconstruction. By storing the highly compressed latent representation alongside this sparse residual, the pipeline achieves lossless compression when processed by standard bitstream coders.
Ancestry-Conditioned VAEs
To improve classification and simulation, the authors introduced Conditioned VAEs (C-VAE) and Overfitted VAEs (Y-VAE). These models explicitly incorporate ancestry labels into the learning process. For classification, a Bayesian-motivated objective assigns unknown samples to the ancestry that minimizes reconstruction error. For simulation, the conditioned decoder generates synthetic SNPs that preserve the specific allele frequencies and LD structures of target populations.
Key Results
The VAE-based approach demonstrated significant improvements over existing benchmarks across multiple domains:
- Compression Efficiency: On human Chromosome 22, the VQ-VAE pipeline achieved a ~22x compression factor, significantly outperforming standard Zstandard (~9.5x) and genomics-specific tools like Genozip (~17.7x).
- Classification Accuracy: The VAE latent space enabled an ancestry classification accuracy of 87.1%, a substantial improvement over the PCA-based baseline of 74.1%.
- Population Clustering: VAEs provided tighter and more distinct population clusters, achieving a Silhouette coefficient of 0.77 compared to PCA’s 0.69.
Key Insights and Ideas
One of the most compelling findings is the relationship between genomic entropy and human history. The authors calculated the "entropy" (variability) of SNPs across different groups and found that it closely mirrors the "Out of Africa" migration theory. African populations exhibit the highest genetic entropy, making them the hardest to compress. Conversely, populations that migrated furthest (such as Oceanian and Native American groups) experienced genetic bottlenecks, resulting in lower entropy and higher compressibility.
Furthermore, the non-linear nature of VAEs allows them to implicitly capture Linkage Disequilibrium. This enables the model to separate closely related sub-populations—such as the Mbuti and Biaka hunter-gatherers—that are often indistinguishable using linear PCA. The study also highlights that explicit conditioning is essential for generating realistic synthetic DNA; without it, models tend to produce a generic "average" human genome rather than population-specific variations.
Limitations and Future Work
Despite its strengths, the VAE approach has limitations. The non-linear latent space is less interpretable than PCA; distances in this space do not strictly correlate with genetic distance, which could lead to visual misinterpretations. Additionally, the current architecture is rigid, requiring a fixed set of SNPs as input. Future research may explore more flexible architectures, such as Transformers, to handle variable genetic loci and further improve the utility of deep learning in genomics.
Summary updated