arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2507.15087cs.CLcs.AI
收藏

基于Transformer的基因序列建模编码方案评估

Evaluation of Coding Schemes for Transformer-based Gene Sequence Modeling

University of Science and Technology of China(科学技术大学);University of Washington(华盛顿大学)

Chenlei Gong, Yuanhe Tian, Lei Mao, Yan Song

AI总结:

本文系统比较了k-mer切分、BPE分词及三种位置编码在DNA Transformer中的效果,发现BPE整体性能更高更稳定,RoPE擅长周期性基序与长序列外推,并指出12层为较优深度。

摘要:

目前,许多研究将DNA序列视为一种特殊类型的语言,并利用Transformer对其进行建模。这些研究采用固定长度的k-mer切分和BPE子词分词方法,但缺乏系统性的评估来确定哪种方法更优。我们比较了k=1、3、4、5、6的k-mer切分、一个包含4,096个token的BPE词表,以及三种位置编码方法——正弦位置编码、AliBi和RoPE。每种配置分别在3、6、12和24层的Transformer编码器中从头开始训练,并在GUE基准数据集上进行评估。总体而言,BPE通过将频繁出现的基序压缩为可变长度的token、缩短序列长度并提升模型泛化能力,在各任务上取得了更高且更稳定的性能。RoPE在捕捉周期性基序和外推到长序列方面表现出色,而AliBi在由局部依赖驱动的任务上也表现良好。在深度方面,我们观察到当层数从3增加到12时性能有显著提升,而在24层时仅有边际改进或轻微过拟合。本研究为DNA Transformer模型中的分词和位置编码设计提供了实用指导。

英文摘要:

Currently, many studies view DNA sequences as a special type of language and utilize Transformers to model them. These studies use fixed-length k-mer segmentation and BPE subword tokenization but lack a systematic evaluation to determine which is superior. We compare k-mer segmentation with k=1,3,4,5,6, a 4,096-token BPE vocabulary, and three positional encoding methods-sinusoidal, AliBi, and RoPE. Each configuration is trained from scratch in 3, 6, 12, and 24-layer Transformer encoders and evaluated on GUE benchmark dataset. In general, BPE delivers higher and more stable performance across tasks by compressing frequent motifs into variable-length tokens, reducing sequence length, and improving model generalization. RoPE excels at capturing periodic motifs and extrapolating to long sequences, while AliBi also performs well on tasks driven by local dependencies. In terms of depth, we observe significant gains when increasing layers from 3 to 12, with only marginal improvements or slight overfitting at 24 layers. This study provides practical guidance for designing tokenization and positional encoding in DNA Transformer models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑