NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Transformer Model for Genome Sequence Analysis

Noah Hurmer, Xiao-Yin To, Martin Binder, Hüseyin Anil Gündüz, Philipp C. Münch, René Mreches, Alice C McHardy, Bernd Bischl, Mina RezaeiLMRL @ NeurIPS 2022

TL;DR

This paper adapts the powerful BERT language model for analyzing viral genome sequences, demonstrating its effectiveness in a semi-supervised learning setting. By leveraging large amounts of unlabeled genomic data, their "GenomeNet-BERT" approach achieves superior performance in classifying viral genomes compared to existing methods, especially when labeled data is scarce.

What Problem Does This Paper Address?

Analyzing genomic data is crucial for understanding life, but it's often hampered by a lack of labeled data. Obtaining labeled genomic data requires expensive and time-consuming laboratory experiments. While high-throughput sequencing has made vast amounts of unlabeled genomic data available, effectively utilizing this data for downstream tasks like classification remains a challenge. This paper aims to bridge this gap by applying representation learning techniques, specifically adapting the Transformer-based BERT model, which has shown great success in natural language processing, to the domain of genome sequence analysis.

Methods

The core of this work involves adapting the BERT architecture, specifically building upon DNABERT, for genome sequence analysis. The authors introduce "GenomeNet-BERT," which utilizes a Transformer Encoder with 12 layers.

Key methodological aspects include:

  • K-mer Tokenization: Instead of words, DNA sequences are broken down into "k-mers" (sequences of k nucleotides). The paper explores different k-mer sizes and strides, with a focus on 6-mers.
  • Pretext Tasks: Similar to BERT's masked language modeling, GenomeNet-BERT uses a masked k-mer prediction task. Unlike standard BERT, the "next sentence prediction" task is omitted.
  • Pretraining Strategies: The paper investigates different pretraining setups, including variations in masking strategies (e.g., masking 6 consecutive tokens vs. 8 consecutive tokens) and tokenization strides (e.g., stride 1 vs. stride 3).
  • Semi-Supervised Learning: The primary focus is on leveraging unlabeled data for pretraining, followed by fine-tuning on a smaller labeled dataset for a specific downstream task (virus classification).
  • Hyperparameter Optimization (HPO): A scaled-down framework was used to find optimal learning rates, masking percentages, and weight decay.

Datasets

  • Training Data: Unlabeled viral genome sequences were downloaded from GenBank [Sayers et al., 2019]. This dataset comprised approximately 40,000 FASTA files, with about 1 billion nucleotides for bacteriophages and 0.5 billion for other viruses.
  • Evaluation Data: The models were evaluated on a binary classification task: identifying whether a read-level sequence excerpt belongs to a bacteriophage or another type of virus.
  • Label Scarcity Scenarios: The evaluation was conducted under various label availability scenarios: 1%, 10%, and a very sparse 0.1% of labeled data.

Key Insights and Ideas

  • BERT's Transferability: The success of BERT in natural language processing extends remarkably well to biological sequences, demonstrating that similar underlying principles of learning contextual representations apply across domains.
  • Value of Unlabeled Data: The paper strongly reinforces the idea that large amounts of unlabeled genomic data can be effectively used for representation learning, significantly boosting performance in downstream tasks, especially when labeled data is scarce.
  • K-mer Tokenization Nuances: The choice of k-mer size, stride, and masking strategy during pretraining has a tangible impact on model performance, with longer sequences benefiting from different tokenization approaches (e.g., stride 3).
  • Resource Intensity: While powerful, Transformer models like GenomeNet-BERT are computationally intensive, requiring significant resources for pretraining.

Key Results

  • Superior Performance: GenomeNet-BERT models consistently outperformed the "self-genomenet" baseline and, in most cases, the strictly supervised baseline across all label availability scenarios and sequence lengths.
  • Impact of Label Scarcity: The performance gap between GenomeNet-BERT and the supervised baseline widened as the amount of labeled data decreased, highlighting the advantage of semi-supervised learning.
  • Low Label Scenario Success: At the 0.1% label scenario, GenomeNet-BERT showed impressive accuracy, outperforming self-genomenet by approximately 16% (150NT) and 20% (1000NT) in recall.
  • Base Model Advantage: The "base" GenomeNet-BERT model (following the original DNABERT setup) performed best on average.
  • Stride 3 Efficiency: While the stride 3 variant was less accurate on shorter sequences (150NT), it achieved comparable accuracy on longer sequences (1000NT) with significantly lower resource requirements for pretraining and fine-tuning.

Limitations and Future Work

  • Computational Cost: The authors acknowledge that Transformer-Encoder models are "very resource and training time intensive."
  • Overprediction: An interesting observation was that all models tended to overpredict the bacteriophage class. The authors suggest this might be due to the models learning to classify noisier input sequences as phages, as these could be more diverse in short excerpts.
  • Future Work: The authors suggest that for a more definitive evaluation, it's necessary to investigate the model's performance on a higher number of more diverse downstream tasks. They also note that the HPO performed on a "bert-small" configuration could potentially be improved by using the full BERT model. The paper also briefly mentions that using proteins corresponding to coding DNA could be an alternative, but this would not cover non-coding DNA.

Summary updated

BibTeX
@inproceedings{hurmer2022transformer,
  author = {Noah Hurmer and Xiao-Yin To and Martin Binder and Hüseyin Anil Gündüz and Philipp C. Münch and René Mreches and Alice C McHardy and Bernd Bischl and Mina Rezaei},
  title = {{Transformer Model for Genome Sequence Analysis}},
  booktitle = {LMRL @ NeurIPS},
  year = {2022},
  url = {https://openreview.net/forum?id=xwn3ywFknri},
}
Figure