BiRNA-BERT allows efficient RNA language modeling with adaptive tokenization

Transformer-based models have achieved remarkable success in biological sequence modeling, yet their application to RNA remains constrained by sequence length limitations. Existing RNA language models often truncate inputs, discarding distal nucleotide context crucial for full-length tasks. Additionally, advanced NLP tokenization methods do not directly apply to biological sequences, where nucleotide-level resolution is essential for tasks like secondary structure prediction. To address these challenges, we introduce BiRNA-BERT, a 117M-parameter Transformer encoder trained on 36 million non-coding RNA sequences. At its core is an adaptive dual-tokenization framework that combines nucleotide-level (NUC) encoding for fine-grained structural tasks with byte-pair encoding (BPE) for efficient long-sequence processing. BiRNA-BERT dynamically selects tokenization based on input length, enabling it to process arbitrarily long sequences without truncation. We demonstrate state-of-the-art performance across tasks ranging from short-sequence classification to long-context modeling and fine-grained nucleotide level RNA structural prediction. Our information-theoretic analysis reveals the trade-offs between BPE compression and NUC tokenization, which we again validate empirically. Finally, BiRNA-BERT achieves strong intrinsic language modeling performance-measured by perplexity and token recovery-while remaining more compact than existing RNA models. The code and model weights are available at https://github.com/buetnlpbio/BiRNA-BERT .

Authors

Institutions

Publication Details

Journal
Communications Biology
Published
2025-11-20
DOI
https://doi.org/10.1038/s42003-025-08982-0
Citations
3
Primary Topic
RNA and protein synthesis mechanisms
Type
article
Field-Weighted Citation Impact
2.42

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

BiRNA-BERT allows efficient RNA language modeling with adaptive tokenization

Haz Sameen Shahgir, Parvez Mahbub, Md Toki Tahmid, Yue Dong et al.
3 citations
Communications Biology
RNA and protein synthesis mechanisms
2.42
article

BiRNA-BERT allows efficient RNA language modeling with adaptive tokenization

Haz Sameen Shahgir, Parvez Mahbub, Md Toki Tahmid, Yue Dong, Md. Shamsuzzoha Bayzid
article en
3 citations

Abstract

Transformer-based models have achieved remarkable success in biological sequence modeling, yet their application to RNA remains constrained by sequence length limitations. Existing RNA language models often truncate inputs, discarding distal nucleotide context crucial for full-length tasks. Additionally, advanced NLP tokenization methods do not directly apply to biological sequences, where nucleotide-level resolution is essential for tasks like secondary structure prediction. To address these challenges, we introduce BiRNA-BERT, a 117M-parameter Transformer encoder trained on 36 million non-coding RNA sequences. At its core is an adaptive dual-tokenization framework that combines nucleotide-level (NUC) encoding for fine-grained structural tasks with byte-pair encoding (BPE) for efficient long-sequence processing. BiRNA-BERT dynamically selects tokenization based on input length, enabling it to process arbitrarily long sequences without truncation. We demonstrate state-of-the-art performance across tasks ranging from short-sequence classification to long-context modeling and fine-grained nucleotide level RNA structural prediction. Our information-theoretic analysis reveals the trade-offs between BPE compression and NUC tokenization, which we again validate empirically. Finally, BiRNA-BERT achieves strong intrinsic language modeling performance-measured by perplexity and token recovery-while remaining more compact than existing RNA models. The code and model weights are available at https://github.com/buetnlpbio/BiRNA-BERT .

Communications BiologyVol. 8(1)
University of California, Riverside (US), Bangladesh University of Engineering and Technology (BD), University of Maryland, College Park (US)
University of Engineering and Technology, Lahore, Bangladesh University of Engineering and Technology
Openalex Percentile: Top 10%
RNA and protein synthesis mechanisms
2.42
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.