BERTE: High-precision hierarchical classification of transposable elements by a transfer learning method with BERT pre-trained model and convolutional neural network

Yiqi Chen, Yang Qi, Yingfu Wu, Fuhao Zhang, Xingyu Liao, Xuequn ShangbioRxiv 2024

TL;DR

This paper introduces BERTE, a novel method for precisely classifying transposable elements (TEs) in a hierarchical manner. By combining the power of BERT's attention mechanisms for feature extraction with a convolutional neural network (CNN) for classification, BERTE significantly improves accuracy and efficiency compared to existing methods, even on imbalanced datasets.

What Problem Does This Paper Address?

Transposable elements (TEs) are crucial components of genomes, influencing evolution and gene regulation, and are implicated in diseases. Accurately classifying these mobile genetic sequences is vital for understanding their roles. However, existing TE classification tools often struggle with effectively extracting sequence features, leading to suboptimal performance, especially in hierarchical classification (classifying TEs at multiple levels like class, order, and superfamily). This limitation hinders our ability to fully grasp the complexity and impact of TEs.

Methods

BERTE employs a two-pronged approach for feature extraction and classification:

  • BERT for Attentional Features: The authors leverage a pre-trained BERT model, a powerful natural language processing tool, to extract "attentional features" from TE sequences. This involves treating DNA sequences as a form of language, allowing BERT's multi-head self-attention mechanism to capture contextual relationships and important sequence patterns.
  • Cumulative k-mer Frequencies for Enhanced Features: In addition to BERT's features, BERTE incorporates "cumulative k-mer frequency" features. This involves calculating the frequencies of multiple k-mer lengths (4-mer, 5-mer, and 6-mer) and concatenating them. This strategy aims to capture different scales of sequence motifs.
  • CNN for Hierarchical Classification: These two sets of features (attentional and k-mer) are then concatenated to form the final input for a parallel Convolutional Neural Network (CNN). The CNN, known for its effectiveness in high-dimensional feature transformation, is used to perform the hierarchical classification of TEs. The authors implemented a top-down hierarchical structure, training separate models for each classification level.

Datasets

The study utilized a comprehensive dataset compiled from twelve public TE repositories, covering plants, animals, and fungi. This resulted in a final dataset of 932,944 TE sequences across 315 species, which the authors claim is the most extensive dataset for TE classification to date. The dataset was pre-processed to remove redundancy and short sequences, and then split into training (80%), validation (10%), and testing (10%) sets.

Key Insights and Ideas

  • DNA as Language: The paper reinforces the idea that DNA sequences can be effectively treated as a form of natural language, allowing NLP models like BERT to extract meaningful biological information.
  • Hybrid Features are Key: Combining BERT's attention-based features with traditional k-mer frequency features significantly boosts classification performance, suggesting that a multi-faceted feature representation is more powerful than relying on a single approach.
  • Hierarchical Classification Matters: The top-down hierarchical classification strategy, with separate models for each level, proved more accurate and computationally efficient than a single, all-encompassing model.
  • BERT's Attention is Powerful: The attention weights from BERT layers, particularly the last layer, demonstrate BERT's ability to learn informative representations that aid in distinguishing between different TE types.

Key Results

BERTE demonstrated superior performance compared to state-of-the-art methods like DeepTE and TERL across various evaluation metrics.

  • Improved F1-scores: BERTE achieved up to a 21% improvement in F1-score at different classification levels.
  • High Accuracy: BERTE and DeepTE achieved over 90% accuracy in most models, significantly outperforming TERL.
  • Strong Performance on Imbalanced Data: BERTE showed notable success in handling imbalanced datasets, particularly in the LTR category, where it achieved higher F1-scores for minority classes (Bel-Pao and ERV) compared to DeepTE.
  • Efficiency: The CNN classifier, a component of BERTE, was found to be more efficient than other popular deep learning classifiers, running significantly faster.

Limitations and Future Work

  • Imbalanced Data Handling: While BERTE performs well on imbalanced datasets, the authors acknowledge that there is still room for improvement, as indicated by a drop-off in performance for minority classes.
  • Generalizability: The proposed model could potentially be applied to analyze other biological sequences with certain adjustments, suggesting a broader applicability beyond TE classification.
  • Computational Resources: While BERTE is more efficient than some methods, the paper notes that TEclass2, another deep learning method, requires substantial graphical memory (e.g., an A100 with 80GB), implying that replicating such models can be resource-intensive. BERTE's approach of using smaller BERT models and parallel CNNs might mitigate this.

Summary updated

Abstract

Abstract Transposable Elements (TEs) are abundant repeat sequences found in living organisms. They play a pivotal role in biological evolution and gene regulation and are intimately linked to human diseases. Existing TE classification tools can classify classes, orders, and superfamilies concurrently, but they often struggle to effectively extract sequence features. This limitation frequently results in subpar classification results, especially in hierarchical classification. To tackle this problem, we introduced BERTE, a tool for TE hierarchical classification. BERTE encoded TE sequences into distinctive features that consisted of both attentional and cumulative k-mer frequency information. By leveraging the multi-head self-attention mechanism of the pre-trained BERT model, BERTE transformed sequences into attentional features. Additionally, we calculated multiple k-mer frequency vectors and concatenate them to form cumulative features. Following feature extraction, a parallel Convolutional Neural Network (CNN) model was employed as an efficient sequence classifier, capitalizing on its capability for high-dimensional feature transformation. We evaluated BERTE’s performance on filtered datasets collected from 12 eukaryotic databases. Experimental results demonstrated that BERTE could improve the F1-score at different levels by up to 21% compared to current state-of-the-art methods. Furthermore, the results indicated that not only could BERT better characterize TE sequences in feature extraction, but also that CNN was more efficient than other popular deep learning classifiers. In general, BERTE classifies TE sequences with greater precision. BERTE is available at https://github.com/yiqichen-2000/BERTE .
BibTeX
@misc{chen2024berte,
  author = {Yiqi Chen and Yang Qi and Yingfu Wu and Fuhao Zhang and Xingyu Liao and Xuequn Shang},
  title = {{BERTE: High-precision hierarchical classification of transposable elements by a transfer learning method with BERT pre-trained model and convolutional neural network}},
  year = {2024},
  doi = {10.1101/2024.01.28.577612},
  howpublished = {bioRxiv},
}
Figure