Vir2vec: A Genome-Wide Viral Embedding
Year: 2025
Type: preprint
Abstract: Genomic language models (gLMs) are powerful numerical surrogates for DNA, but existing architectures focus primarily on human DNA or limited viral sets, and no dedicated benchmark exists for viral genome understanding. Here we introduce Vir2vec (17M–422M parameters), decoder-only gLMs continually pretrained on a curated pan-viral corpus of 565,747 complete genomes across 295 species. We also present the viral Genome Understanding Evaluation (vGUE), a benchmark probing viral representations across broad organism discrimination, evolutionary signatures, intra-genus separation, variant subtyping, and host tropism. Evaluated as frozen feature extractors under nested cross-validation, Vir2vec achieves top balanced accuracy across 5 of 7 vGUE tasks, outperforming human-trained (Mistral-DNA), viral-specific (ModernBERT-virus), and broad biological foundation (Evo-1) model. Furthermore, Vir2vec displays robust zero-shot generalization to unseen viral families. Finally, we introduce an argmax-routed SHAP explainability framework that projects feature attributions directly onto single-codon coordinates, correctly isolating key receptor-binding domain mutations driving mouse host adaptation. Vir2vec and vGUE provide a foundation for viral surveillance and discovery pipelines. Key Messages We present Vir2vec, a family of decoder-only viral genomic language models (17M, 138M, and 422M parameters) obtained via continual pretraining of Mistral-DNA on a curated pan-viral corpus (565,747 complete genomes across 295 species), generating fixed-length 4,096-dimensional embeddings for whole genomes and reads. We introduce vGUE, a dedicated evaluation suite for viral genomic foundation models spanning five biological dimensions: broad organism-level distinctions, genome-wide evolutionary fingerprints, intra-genus separation, lineage/subtype typing, and phenotypic context signal detection. Under a unified, leakage-controlled evaluation protocol (frozen embeddings plus shallow classifiers under nested cross-validation), Vir2vec consistently outperforms human-trained (Mistral-DNA), viral-centric (ModernBERT-virus), and 7B-parameter prokaryotic/phage (Evo-1) baselines across genome-wide viral tasks. Pretraining data ablations demonstrate robust zero-shot out-of-distribution generalization to unseen viral taxa ( > 97% balanced accuracy on completely held-out Enterovirus A and Picornaviridae ), confirming that Vir2vec internalizes universal viral sequence syntax. We introduce an argmax-routed SHAP explainability framework that projects latent feature attributions back to single-codon resolution, validating that the model autonomously pinpoints key receptor-binding domain mutations (such as codon N501 in SARS-CoV-2) driving host adaptation. Context-truncated short reads (150-bp) and subtle intra-host tissue tropisms remain primary performance bottlenecks, while compact Vir2vec scale variants (17M and 138M) capture nearly the entire pan-viral latent manifold, offering lightweight options for resource-constrained edge deployment.
Language: English
Subfield: Molecular Biology
Domain: Life Sciences
Open Access status: green
Funder: National Institutes of Health
OpenAlex ID: W4417303333
