VQDNA: Unleashing the Power of Vector Quantization for Multi-Species Genomic Sequence Modeling

Siyuan Li, Zedong Wang, Zicheng Liu, Di Wu, Cheng Tan, Jiangbin Zheng, Yufei Huang, Stan Z. Li · DOI

Abstract

Traditional genomic sequence modeling relies on rigid, hand-crafted tokenization methods like k-mers or Byte Pair Encoding (BPE), which often fail to capture the complex, multi-scale biological patterns inherent in DNA. We present VQDNA, a framework that utilizes Vector Quantization to learn a discriminative "biological vocabulary" directly from genomic data. By incorporating Hierarchical Residual Quantization (HRQ), VQDNA effectively models both coarse and fine-grained genomic features. Our results demonstrate that VQDNA (110M parameters) achieves state-of-the-art performance across 32 downstream tasks, significantly outperforming massive models with up to 2.5 billion parameters.

Introduction

The "alphabet" of genomics consists of only four bases: A, T, C, and G. To process these sequences, researchers typically group nucleotides using fixed-length sliding windows (k-mers) or statistical frequency (BPE). However, these methods are biologically agnostic and struggle to capture discriminative motifs or multi-scale structures like local binding sites and global chromatin organization. VQDNA addresses these limitations by treating genome tokenization as a learnable vocabulary problem rather than a static pre-processing step.

Methods

VQDNA employs a Vector Quantized Variational Autoencoder (VQ-VAE) to map DNA segments into a continuous latent space, which is then "quantized" by matching segments to the closest entry in a learnable codebook. To handle the multi-scale nature of genomic data, the authors introduce Hierarchical Residual Quantization (HRQ). HRQ utilizes a hierarchy of codebooks where lower layers capture high-level semantics and higher layers refine these into fine-grained details, ensuring the model preserves subtle genetic variations.

The training process follows a three-stage pipeline:

  1. Stage 1: DNA Tokenization. The VQ-tokenizer is trained to reconstruct sequences, forcing the codebook to learn meaningful genomic patterns.
  2. Stage 2: Masked Code Modeling. A Transformer encoder is pre-trained on the learned tokens using a masked modeling objective (similar to BERT).
  3. Stage 3: Fine-tuning. The model is adapted to specific downstream tasks using Parameter-Efficient Fine-Tuning (LoRA).
The three-stage VQDNA pipeline: DNA tokenization, Masked Code Modeling, and Fine-tuning with LoRA.

Results

VQDNA was pre-trained on a massive multi-species database containing 32.49 billion bases from 135 diverse species. Evaluation on the GUE (Genome Understanding Evaluation) benchmark and species classification tasks revealed several key findings:

  • State-of-the-Art Performance: VQDNA achieved the highest average rank across 32 tasks compared to all existing genome language models.
  • Parameter Efficiency: With only 110M parameters, VQDNA consistently outperformed the 2.5B parameter Nucleotide Transformer (NT-2500M). This suggests that the quality of data representation is more critical than raw model scale.
  • Long-Range Modeling: VQDNA maintained high accuracy (99.46%) on species classification tasks with sequences up to 32k base pairs, surpassing specialized long-context models like HyenaDNA.
  • Biological Grounding: Visualizations of the learned vocabulary showed that the model naturally clustered SARS-CoV-2 variants by their Pango lineages (Alpha, Delta, Omicron) without explicit supervision, "discovering" biological relationships.
Performance vs. Parameters (M) across various genomic tasks. VQDNA (HRQ) consistently outperforms larger models like Nucleotide Transformer (NT).

Discussion and Conclusion

The success of VQDNA suggests a paradigm shift in genomic modeling from increasing parameter scale to improving representation quality. By moving beyond rigid k-mers to a learnable, hierarchical vocabulary, VQDNA captures the multi-scale functional essence of DNA more effectively than previous methods. While the three-stage pipeline introduces initial setup complexity, the resulting efficiency and accuracy gains are substantial. Future work remains to explore the application of this hierarchical quantized vocabulary to generative genomic design, such as the creation of synthetic promoters and regulatory elements.

Summary updated

BibTeX
@inproceedings{li2024vqdna,
  author = {Siyuan Li and Zedong Wang and Zicheng Liu and Di Wu and Cheng Tan and Jiangbin Zheng and Yufei Huang and Stan Z. Li},
  title = {{VQDNA: Unleashing the Power of Vector Quantization for Multi-Species Genomic Sequence Modeling}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=BOunbuapcv},
}
Figure