BMC BioinformaticsBioinformaticsPeer-reviewed journal article
Distinguishing word identity and sequence context in DNA language models
Abstract
Transformer-based large language models (LLMs) are very suited for biological sequence data, because the structure of protein and nucleic acid sequences show many analogies to natural language. Complex relationships in biological sequence can be learned, although there may not be a clear concept of words, because they can be generated through tokenization. Training is subsequently performed for masked token prediction. With this strategy, the models learn both the token sequence identity and a larger sequence context. We developed a framework to interrogate what a model learns, which is both relevant for the interpretability of the model and to evaluate its potential for specific tasks. We used a DNA language model, which is trained on the human reference genome with a Bidirectional Encoder Representations from Transformers (BERT) model. In this model, tokens are defined with overlapping k-mers. To gain insight into the models learning, we interrogated how the model performs predictions, extracted token embeddings, and defined a fine-tuning benchmarking task to predict the next tokens of different sizes without overlaps. This task is very suited to evaluate different pretrained DNA language models, also called foundation models, since it does not interrogate specific genome biology, does not depend on the tokenization strategy, the size of the vocabulary, the dictionary, or the number of parameters used to train the model. Lastly, the task performs without leakage of information from token identity into the prediction task, which makes it particularly useful to evaluate the learning of sequence context. Through this assessment we discovered that the model with overlapping k-mers struggles to learn larger sequence context. Instead, the learned embeddings largely represent token sequence. Still, good performance is achieved for genome biology inspired fine-tuning tasks. Models with overlapping tokens may be used for tasks where a larger sequence context is of less relevance, but the token sequence directly represents the desired learning feature. This emphasizes the need to interrogate knowledge representation in biological large language models. Transparency is particularly important for biomedical use cases and an understanding of what the models are learning can be used to match the model to the desired task.
- organism: human
- assay: DNA methylation
- assay: whole-genome sequencing
- research focus: benchmarking
- research focus: gene regulatory network inference
- research focus: differential expression
- research focus: variant calling
- approach: transformer / foundation model
- approach: statistical model
- Citations
- 22
- FWCI
- 2.85
- Field percentile
- top 7%
Reproducibility ledger
Nobody has reported trying to reproduce this paper yet. Did you replicate an experiment or run the code? Your report saves the next lab a week.
Sign in to file a reproducibility report.
Related papers
- The human genome's vocabulary as proposed by the DNA language model GROVER
Melissa Sanabria, Jonas Hirsch, Anna R. Poetsch·bioRxiv·Jul 19, 2023
- Carbon: Decoding the Language of Life
Loubna Ben Allal, Qiuyi Li, … Leandro von Werra·bioRxiv·May 25, 2026
- genomicBERT: A Light-weight Foundation Model for Genome Analysis using Unigram Tokenization and Specialized DNA Vocabulary
Tyrone Chen, Naima Vahab, … Sonika Tyagi·bioRxiv·May 31, 2023
- BiRNA-BERT Allows Efficient RNA Language Modeling with Adaptive Tokenization
Md Toki Tahmid, Haz Sameen Shahgir, … Md. Shamsuzzoha Bayzid·Communications BiologyPeer-reviewed·Nov 20, 2025
- DNA-LLM2Vec: Architecture-Aware Task-Conditioned Adaptation of Decoder DNA Foundation Models
Yuan Liang, Ke Zhai, … Massimo Poesio·bioRxiv·Oct 14, 2026
- GENA-LM: A Family of Open-Source Foundational DNA Language Models for Long Sequences
Veniamin Fishman, Yuri Kuratov, … Mikhail Burtsev·Nucleic Acids ResearchPeer-reviewed·Dec 26, 2024