Temporal foundation model unveils ancient Hepatitis B virus evolution

Ji Qi, Bing Sun, Yonghao Liu, Xiaoming Xiao, Mi Zhou, Alexander Herbig, Chen Yang, Xiaosong Han, Yinqiu Cui, Renchu GuanbioRxiv 2025 · DOI

TL;DR

Researchers have developed ViraChron, a novel temporal foundation model that leverages multi-scale time encoding to reconstruct and analyze ancient Hepatitis B virus (HBV) genomes. This breakthrough significantly improves the accuracy and speed of ancient DNA analysis, enabling a deeper understanding of viral evolution and its historical interactions with human populations.

What Problem Does This Paper Address?

Studying the evolutionary history of viruses like Hepatitis B virus (HBV) is crucial for understanding their long-term co-evolution with hosts and predicting future outbreaks. However, ancient viral DNA is often scarce, fragmented, and incomplete, posing significant challenges for traditional genomic analysis methods. This data gap hinders our ability to reconstruct evolutionary pathways, identify key genetic changes, and understand how viruses adapt over time. Existing genomic language models struggle with the unique characteristics of ancient DNA, such as temporal context dependency and potential damage patterns, making it difficult to accurately infer missing genetic information.

Methods

The core innovation is ViraChron, a sequence-based generative foundational model that integrates multi-scale temporal encoding. This means ViraChron doesn't just look at the DNA sequence itself, but also explicitly incorporates information about when the sample was collected.

Here's a breakdown of the key methodological aspects:

  • Temporal Encoding: Discrete time information (e.g., sample age) is transformed into high-dimensional time-series tensors. This temporal information is then injected into the sequence embeddings.
  • Foundation Model Architecture: ViraChron builds upon the "Evo" model, a known architecture for genomic sequence analysis.
  • Sequence Imputation: The model is designed to accurately "fill in the gaps" in fragmented ancient DNA sequences.
  • Fine-tuning Strategy: A parallel fine-tuning approach using both ancient and modern HBV data is employed to prevent the model from being biased towards only one type of data.
  • Validation: The model's performance is rigorously validated using sequence identity analysis, phylogenetic analysis, and Bayesian skyline analysis.

Datasets

  • Training Data: 7,804 complete and high-confidence HBV genome sequences from NCBI, comprising both ancient and modern samples.
  • Newly Acquired Data: 7 new ancient HBV genomes from specific archaeological sites (Tiantaijie, Derestuj, Meiziyuan, Yelvyuzhi, Shihuyao) were recovered and analyzed in this study. These new genomes, along with previously published ancient HBV sequences, were used for model evaluation.

Key Insights and Ideas

  • Temporal Context is Crucial for Ancient DNA: ViraChron demonstrates that explicitly incorporating temporal information significantly enhances the model's ability to understand and reconstruct ancient genomic data, which is often overlooked by standard models.
  • HBV Evolution is Driven by Adaptive Mutations: The model identified fixed mutations specific to HBV genotype A, suggesting that these mutations conferred survival advantages and were ultimately selected for by natural selection.
  • Ancient DNA Analysis Can Be Dramatically Accelerated: ViraChron drastically reduces the time and resources needed for ancient genome reconstruction, making large-scale historical genomic studies more feasible.
  • Co-evolutionary Dynamics Revealed: The study sheds light on how historical events, like wars and migrations, facilitated the exchange and transmission of different HBV genotypes, leading to complex co-evolutionary patterns with human populations.

Key Results

  • High Accuracy in Sequence Completion: ViraChron achieved significantly higher accuracy in completing ancient HBV sequences compared to baseline models.
  • Speedup: The model reduced data acquisition time from approximately 80 hours to just 5.4 minutes per HBV genome, representing an 889- to 1000-times increase in speed.
  • Reliable Imputation: The model successfully imputed missing regions in ancient HBV sequences, with biological plausibility confirmed by Bayesian skyline analysis. For example, the imputed DA45 sequence showed only two discrepancies compared to its high-quality counterpart.
  • Identification of New Ancient Genomes: The study provided reliable, high-quality genomic data for 7 new ancient HBV genomes.
  • Phylogenetic Stability: Imputation did not significantly alter phylogenetic relationships, with weighted Robinson-Foulds distances showing minimal impact.
  • Insights into HBV Transmission: The study identified the coexistence of genotypes B and D at specific archaeological sites, linking it to historical population movements and interactions.

Limitations and Future Work

  • Limitations of Ancient DNA: The paper acknowledges the inherent challenges of ancient DNA, such as sample fragmentation and damage patterns, which can still introduce uncertainties. Rigorous validation steps were taken to mitigate these issues, such as critically assessing mutations for typical ancient DNA damage patterns.
  • Future Work: The authors anticipate that with the emergence of more high-quality ancient DNA data, the performance of ViraChron will continue to improve, further advancing our understanding of viral evolution. The model's ability to handle temporal information could be extended to other ancient pathogen studies.

Summary updated

Abstract

ABSTRACT Since ancient hepatitis B virus (HBV) sequencing data are scarce and incomplete, the evolutionary dynamics of HBV have long remained enigmatic. This data gap hinders a comprehensive understanding of HBV genetic variations, evolutionary trajectories, and host interactions in different historical periods, preventing insight into its long-standing co-evolutionary relationship with humans. In this study, we developed a sequence-based generative foundational model, ViraChron (Viral Chronology Foundation Model), that integrates multi-scale temporal information to compensate for the lack of ancient HBV data. We confirmed the robustness of our model through sequence identity, phylogenetic, and recombination analyses. ViraChron enabled the identification of fixed mutations specific to HBV genotype A, demonstrating that HBV acquires survival advantages through mutations that are ultimately fixed by natural selection. Our model outperforms the original baseline in terms of sequence completion, achieving significantly higher accuracy. The model significantly reduced data acquisition time from 80 hours to 5.4 minutes per HBV genome, providing reliable, high-quality data for 7 new HBV genomes from specific archeological sites. ViraChron overcomes previous limitations, obtaining high-quality genomic data from samples over ten thousand years old, thereby facilitating a systematic understanding of viral evolution and its biological characteristics.
BibTeX
@misc{qi2025temporal,
  author = {Ji Qi and Bing Sun and Yonghao Liu and Xiaoming Xiao and Mi Zhou and Alexander Herbig and Chen Yang and Xiaosong Han and Yinqiu Cui and Renchu Guan},
  title = {{Temporal foundation model unveils ancient Hepatitis B virus evolution}},
  year = {2025},
  doi = {10.1101/2025.07.09.663843},
  howpublished = {bioRxiv},
}
Figure