HViLM (Human Virome Language Model) is a genomic foundation model adapted to virus sequences through continued pre-training of DNABERT-2. HViLM-base was trained on approximately 5 million non-redundant virus-derived sequence fragments from the from VIRION (Zenodo deposit), representing approximately 9,000 virus species across 45+ families.
The architecture and tokenizer remain those of DNABERT-2; continued pre-training updates the model weights using a masked-language-modeling objective on the virus-focused corpus.
Preprint: HViLM: A Foundation Model for Viral Genomics Enables Prediction of Pathogenicity, Transmissibility, and Host Tropism
bioRxiv 2026.03.18.712700
Authors: Pratik Dutta, Jack Vaska, Pallavi Surana, Rekha Sathian, Max Chao, Zhihan Zhou, Han Liu, and Ramana V. Davuluri
Code: github.com/duttaprat/HViLM
HViLM-base is the continued-pretrained foundation model. Official task-specific models fine-tuned on HVUE are released as standalone checkpoints:
| Resource | Purpose |
|---|---|
| HViLM-base | Continued-pretrained foundation model / sequence representations |
| HViLM-Patho | Pathogenicity classification |
| HViLM-R0 | Transmissibility classification |
| HViLM-Tropism | Human host-tropism classification |
| HVUE | Leakage-controlled benchmark |
The complete project is also grouped in the HViLM: Human Virome Language Model collection on the duttaprat Collections page.
HViLM-base is derived from DNABERT-2 (117M parameters).
| Property | Value |
|---|---|
| Architecture | MosaicBERT / DNABERT-2 |
| Parameters | ~117M |
| Hidden size | 768 |
| Transformer layers | 12 |
| Attention heads | 12 |
| Tokenization | Byte Pair Encoding (BPE) |
| Positional method | ALiBi |
| Continued-pretraining objective | Masked Language Modeling |
| Pretraining fragment length | 1000 nt |
| Final virus-focused corpus | ~5M non-redundant fragments |
| Redundancy reduction | MMseqs2 clustering at 80% identity / 80% coverage |
| Optimizer | AdamW |
| Learning rate | 5e-5 |
| Training | 10 epochs |
| Hardware | 4 × NVIDIA A100 GPUs |
| Approximate training time | 72 hours |
| Held-out MLM accuracy | 94.2% |
Sequence-length note: HViLM uses BPE tokenization, so nucleotide length and model-token length are not equivalent. The continued-pretraining corpus used 1000-nt sequence fragments; downstream configurations are described by nucleotide length in HVUE.
import torch
from transformers import AutoTokenizer, AutoModel
model_id = "duttaprat/HViLM-base"
tokenizer = AutoTokenizer.from_pretrained(
model_id,
trust_remote_code=True,
)
model = AutoModel.from_pretrained(
model_id,
trust_remote_code=True,
)
sequence = "ATGCGTACGTTAGCCGATCGATTACGCGTACGTAGCTAGCTAGCT"
inputs = tokenizer(
sequence,
return_tensors="pt",
truncation=True,
padding=True,
)
with torch.no_grad():
outputs = model(**inputs)
token_embeddings = outputs.last_hidden_state
print(token_embeddings.shape)
For sequence-level representations, pooling strategy should be chosen according to the downstream task rather than treated as a fixed property of HViLM-base.
If the goal is one of the three HVUE tasks, users can load the corresponding task model directly; HViLM-base does not need to be loaded separately.
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_id = "duttaprat/HViLM-Patho"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForSequenceClassification.from_pretrained(
model_id,
trust_remote_code=True,
)
Labels:
0 → NON_PATHOGENIC1 → PATHOGENICUse:
duttaprat/HViLM-R0
Labels:
0 → R0_LT_11 → R0_GE_1These label names are retained for checkpoint compatibility. The task is a binary classification of documented sustained human transmission capacity, informed by reported R₀ values rather than predicting R₀ itself.
Use:
duttaprat/HViLM-Tropism
Labels:
0 → NON_HUMAN_TROPIC1 → HUMAN_TROPICSee the individual model cards for full usage examples and task-specific limitations.
HVUE is the current evaluation benchmark for HViLM.
The benchmark was reconstructed to reduce supervised train-test leakage using the following ordering:
HVUE includes:
Across the benchmark, configurations evaluate different sequence lengths (500, 1000, and 2000 nt where applicable), sequence-similarity stringencies, and temporal generalization where reliable collection-date metadata are available.
The primary results below use the standard 1000-nt configuration for each task.
| Task | HVUE configuration | Accuracy | F1 | MCC | Official model |
|---|---|---|---|---|---|
| Pathogenicity | standard_capped_1000bp |
92.39 | 91.32 | 83.10 | HViLM-Patho |
| Transmissibility | standard_capped_1000bp |
87.50 | 86.16 | 72.66 | HViLM-R0 |
| Host Tropism | standard_95_1000bp |
96.49 | 74.49 | 48.99 | HViLM-Tropism |
The directory/configuration identifiers retain bp for release stability; manuscript and descriptive text use nt for nucleotide sequence length.
Under leakage-controlled evaluation, the effect of virus-focused continued pre-training is task dependent:
These results support a specific conclusion: virus-focused continued pre-training provides its clearest benefit on the more challenging Host Tropism task, while gains on Pathogenicity and Transmissibility are smaller.
For complete baseline comparisons, hard-split evaluations, temporal evaluations, and sequence-length analyses, see the HViLM GitHub repository and HVUE.
HViLM-base was trained using virus sequences associated with the VIRION resource.
Processing included:
The corpus spans approximately 9,000 virus species and 45+ virus families across the Baltimore classification groups.
Attention-guided analyses associated with the HViLM study identified candidate sequence motifs in pathogenic coronavirus sequences, including motifs with similarity to vertebrate transcription-factor binding motifs such as IRF1, FOXQ1, and ZNF354A.
These observations are hypothesis-generating. Sequence similarity between virus motifs and host transcription-factor binding motifs does not by itself establish molecular mimicry, causal regulation, immune evasion, or another biological mechanism. Experimental validation and additional controls are required for mechanistic interpretation.
If you use HViLM in your research, please cite:
@article{dutta2026hvilm,
title={HViLM: A foundation model for viral genomics enables multi-task prediction of pathogenicity, transmissibility, and host tropism},
author={Dutta, Pratik and Vaska, Jack and Surana, Pallavi and Sathian, Rekha and Chao, Max and Zhou, Zhihan and Liu, Han and Davuluri, Ramana V},
journal={bioRxiv},
pages={2026--03},
year={2026},
publisher={Cold Spring Harbor Laboratory}
}
If you use DNABERT-2 directly or build on its architecture, please also cite the DNABERT-2 publication.
HViLM builds on DNABERT-2 by Zhou et al. Continued-pretraining data were derived from the from VIRION (Zenodo deposit) maintained by the Viral Emergence Research Initiative (Verena).
HViLM-base is released under the Apache License 2.0.
HViLM is a research model for computational biology. It should not be used as the sole basis for clinical, diagnostic, epidemiological, biosurveillance, or public-health decisions. Model outputs should be interpreted alongside appropriate biological evidence and expert assessment.