Model Decides How to Tokenize: Adaptive DNA Sequence Tokenization with MxDNA
Lifeng Qiao, Peng Ye, Yuchen Ren, Weiqiang Bai, Chaoqi Liang, Xinzhu Ma, Nanqing Dong, Wanli Ouyang
TL;DR
MxDNA introduces a learnable DNA tokenization mechanism that optimizes token units during pretraining, addressing the unique properties of genomic sequences. By integrating a sparse Mixture of Convolution Experts with deformable convolution and cross-attention, the model discovers tokenization that can be discontinuous, overlapping, and ambiguous, while maintaining alignment with input resolution. Empirically, MxDNA achieves state-of-the-art performance on Genomic and Nucleotide Transformer Benchmarks with less pretraining data and demonstrates token-level genomic functional capture through visualization analyses. The approach provides a new perspective on DNA tokenization with potential broad applications and biological insights, albeit with limitations in direct biological validation and long-range task evaluation.
Abstract
Foundation models have made significant strides in understanding the genomic language of DNA sequences. However, previous models typically adopt the tokenization methods designed for natural language, which are unsuitable for DNA sequences due to their unique characteristics. In addition, the optimal approach to tokenize DNA remains largely under-explored, and may not be intuitively understood by humans even if discovered. To address these challenges, we introduce MxDNA, a novel framework where the model autonomously learns an effective DNA tokenization strategy through gradient decent. MxDNA employs a sparse Mixture of Convolution Experts coupled with a deformable convolution to model the tokenization process, with the discontinuous, overlapping, and ambiguous nature of meaningful genomic segments explicitly considered. On Nucleotide Transformer Benchmarks and Genomic Benchmarks, MxDNA demonstrates superior performance to existing methods with less pretraining data and time, highlighting its effectiveness. Finally, we show that MxDNA learns unique tokenization strategy distinct to those of previous methods and captures genomic functionalities at a token level during self-supervised pretraining. Our MxDNA aims to provide a new perspective on DNA tokenization, potentially offering broad applications in various domains and yielding profound insights.
