bioRxiv2026
Genomic language models (gLMs) trained on large volumes of nucleotide sequences are becoming an alternative to classical methods in metagenomic analysis, particularly for studying genomic "dark matter". In this work, we investigate the ability of four gLMs (DNABERT-2, DNABERT-S, ViraLM, and Evo2-7B) to generate taxonomically informative vector representations of short viral genome fragments. We constructed a balanced reference dataset of viruses based on the ICTV Virus Metadata Resource and compared the representations generated by gLMs with conventional k-mer profiles and MinHash sketches using clustering and neighborhood-based metrics (adjusted Rand index (ARI), precision@k, and CROSS precision@k). On the reference dataset, three of the four gLMs outperformed the 4-mer profile in terms of ARI and precision@5 under the same evaluation protocol. The best performance was generally achieved by intermediate model layers. Conventional k-mer profiles consistently outperformed MinHash sketches. We further evaluated the methods on two viral orders (egoviruses and mriyaviruses) absent from the reference dataset, with model layers and k-mer lengths selected exclusively on the reference dataset. DNABERT-S showed the most consistently strong performance across these two orders, ranking first on mriyaviruses and second on egoviruses, while k-mer profiles with Jensen-Shannon distance remained competitive. We also observed the consistency of representations between forward fragments and their reverse complements. Overall, the best-performing gLMs surpassed conventional baselines, although their advantage depended on the dataset and evaluation metric. The consistently strong performance of DNABERT-S suggests a potential benefit of contrastive fine-tuning and indicates that larger models are not necessarily more effective for generating taxonomically informative representations.