Learning Strand-Equivariant Tokenizations of DNA with MirrorDNA
N. Datta, S. Shatabda, M. S. Bayzid, M. S. Rahman
Key points
From the paper's conclusion- The authors introduced MirrorDNA, a compact DNA language model with a learned tokenizer that guarantees mirror-symmetric token boundaries across reverse-complement sequences, regardless of its learned parameters.
- Counting only predictions that are correct on both strands, MirrorDNA more than doubles the MCC of NT-v2, DNABERT-2 and HyenaDNA. It also stays accurate on inputs sixteen times longer than those it was trained on.
- The model can give identical answers on both strands when the label does not depend on the strand, and can still tell the strands apart when it does, which no strand-blind model can learn.
Abstract
DNA has two strands, and for most regulatory label prediction tasks a sequence and its reverse complement should get same answer. Yet DNA language models are tokenized, trained and tested on one strand at a time. We show that this makes them inconsistent. BPE and $k$-mer tokenizers split 92--100\% of transcription-factor motifs differently on the two strands, and NT-v2, DNABERT-2 and HyenaDNA change 25-31\% of their predictions when the test sequences are reverse-complemented. We introduce {\model}, a compact DNA language model with a learned tokenizer that guarantees mirror-symmetric token boundaries across reverse-complement sequences, regardless of its learned parameters. We prove that this symmetry holds through the whole model. As a result, the same model can give identical answers on both strands when the label does not depend on the strand, and can still tell the strands apart when it does, which no strand-blind model can learn. Counting only predictions that are correct on both strands, \model\ more than doubles the MCC of NT-v2, DNABERT-2 and HyenaDNA. With 2.3M parameters, it is more accurate than the Caduceus models trained on the same data, and not significantly different from NT-v2 (98M parameters) on Genomic Benchmarks or from DNABERT-2 (117M) on the Nucleotide Transformer tasks. It also stays accurate on inputs sixteen times longer than those it was trained on. The same model trained with reverse-complement augmentation instead still changes about one prediction in ten with the strand, unless its outputs are averaged over both strands. Without any annotation, the tokenizer learns to keep the splice-donor signal \texttt{AGGT} in a single token. Code: https://github.com/NIRJHOR-DATTA/MirrorDNA.
Read the paper
Discussion · 1
Science Skim's AI key points, plus readers' public thoughts
- The authors introduced MirrorDNA, a compact DNA language model with a learned tokenizer that guarantees mirror-symmetric token boundaries across reverse-complement sequences, regardless of its learned parameters.
- Counting only predictions that are correct on both strands, MirrorDNA more than doubles the MCC of NT-v2, DNABERT-2 and HyenaDNA. It also stays accurate on inputs sixteen times longer than those it was trained on.
- The model can give identical answers on both strands when the label does not depend on the strand, and can still tell the strands apart when it does, which no strand-blind model can learn.
Readers' thoughts
No reader thoughts yet.
Related papers
- Motif-Vocab: StatisticallyCalibrated Transcription-Factor-Identity Tokenization forGenomic Language ModelsarXiv · 2026
- DNA-LLM2Vec: Architecture-Aware Task-Conditioned Adaptation of Decoder DNA Foundation ModelsbioRxiv · 2026
- BiRNA-BERT allows efficient RNA language modeling with adaptive tokenizationCommunications Biology · 2025
- Joint protein-DNA language modeling enables prediction and engineering of DNA recognition specificitybioRxiv · 2026
- CPDD: Adapting an autoregressive DNA language model for bidirectional phage genome modelingbioRxiv · 2026
- ModBERT: a DNA modification and genetic variant-aware DNA large language modelbioRxiv · 2026