Papers › DNABERT-2: Efficient Foundation Model and Benchmark For Multi-Species Genome

DNABERT-2: Efficient Foundation Model and Benchmark For Multi-Species Genome

26 Jun 2023arXiv:2306.15006archive 2025-07-28

Zhihan Zhou, Yanrong Ji, Weijian Li, Pratik Dutta, Ramana Davuluri, Han Liu

Decoding the linguistic intricacies of the genome is a crucial problem in biology, and pre-trained foundational models such as DNABERT and Nucleotide Transformer have made significant strides in this area. Existing works have largely hinged on k-mer, fixed-length permutations of A, T, C, and G, as the token of the genome language due to its simplicity. However, we argue that the computation and sample inefficiencies introduced by k-mer tokenization are primary obstacles in developing large genome foundational models. We provide conceptual and empirical insights into genome tokenization, building on which we propose to replace k-mer tokenization with Byte Pair Encoding (BPE), a statistics-based data compression algorithm that constructs tokens by iteratively merging the most frequent co-occurring genome segment in the corpus. We demonstrate that BPE not only overcomes the limitations of k-mer tokenization but also benefits from the computational efficiency of non-overlapping tokenization. Based on these insights, we introduce DNABERT-2, a refined genome foundation model that adapts an efficient tokenizer and employs multiple strategies to overcome input length constraints, reduce time and memory expenditure, and enhance model capability. Furthermore, we identify the absence of a comprehensive and standardized benchmark for genome understanding as another significant impediment to fair comparative analysis. In response, we propose the Genome Understanding Evaluation (GUE), a comprehensive multi-species genome classification dataset that amalgamates $36$ distinct datasets across $9$ tasks, with input lengths ranging from $70$ to $10000$. Through comprehensive experiments on the GUE benchmark, we demonstrate that DNABERT-2 achieves comparable performance to the state-of-the-art model with 21 × fewer parameters and approximately 92 × less GPU time in pre-training.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2306.15006")

Code

Syntology Ran 8 of 23 code samples harvested from 2 repositories linked to this paper; 15 have no recorded run. Of those that ran: 1 ran · honoured contract; 3 ran · our draft was wrong; 1 ran · fixture could not drive it; 3 ran with no contract checked.

By repository: community (archive-listed): 23 samples from 2 repositories, 8 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

magics-lab/dnabert_2 officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
zhihan1996/dnabert_2 officialmentioned in papermentioned on GitHubpytorchApache-2.0 report
frederikkemarin/bend mentioned on GitHubpytorchBSD-3-Clause report
jerryji1993/dnabert mentioned on GitHubpytorchApache-2.0 report
jimmylihui/OpenGenome mentioned on GitHubpytorch report
jimmylihui/genbench mentioned on GitHubpytorchApache-2.0 report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

23 samples harvested; 8 ran; 1 honoured the contract we drafted; 15 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · honoured contract
3ran · our draft was wrong
1ran · fixture could not drive it
3ran
15unverified

Licence: 0 of the 23 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 2 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

swish jerryji1993/dnabert/src/transformers/activations.py community (archive-listed) ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 0f786c407fb1ee4c · report
BertGatedLinearUnitMLP frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) ran · metamorphic tier: invariant fingerprinted BSD-3-Clause (permissive) · f1c7f50e43f8c65f · report
BertPooler frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) ran · metamorphic tier: invariant fingerprinted BSD-3-Clause (permissive) · 82086191fd1b0dae · report
BertPredictionHeadTransform frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) ran · metamorphic tier: invariant fingerprinted BSD-3-Clause (permissive) · 4c10b29b9932aaac · report
gelu_new jerryji1993/dnabert/src/transformers/activations.py community (archive-listed) ran · honoured contract fingerprinted Apache-2.0 (permissive) · 77601724cad03f95 · report
pad_input frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) ran · fixture could not drive it BSD-3-Clause (permissive) · dbf4ecb6112f8eef · report
unpad_input frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) ran · our draft was wrong fingerprinted BSD-3-Clause (permissive) · e819e759304fc70a · report
unpad_input_only frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) ran · our draft was wrong fingerprinted BSD-3-Clause (permissive) · 9c99ec96528c0f00 · report
BertEmbeddings frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) unverified BSD-3-Clause (permissive) · 48ac189cd4db0ad9 · report
BertEncoder frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) unverified BSD-3-Clause (permissive) · 3386604c83d5235b · report
BertLMPredictionHead frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) unverified BSD-3-Clause (permissive) · 810c58679e40ef3e · report
BertLayer frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) unverified BSD-3-Clause (permissive) · f82f6d515d78b9fa · report
BertModel frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) unverified BSD-3-Clause (permissive) · f90d502733dc3fc8 · report
BertOnlyMLMHead frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) unverified BSD-3-Clause (permissive) · d72aad474f62da31 · report
BertUnpadAttention frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) unverified BSD-3-Clause (permissive) · ce7a1b8194d588f0 · report
BertUnpadSelfAttention frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) unverified BSD-3-Clause (permissive) · 6957915768d8a616 · report
DNABert2Embedder frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) unverified BSD-3-Clause (permissive) · c4e9c025a630c701 · report
IndexFirstAxis frederikkemarin/bend/bend/utils/embedders.py community (archive-listed) unverified BSD-3-Clause (permissive) · 2f4b4de6eea982fe · report
contiguous_regions jerryji1993/dnabert/motif/motif_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 0e02bf4a27dbaf92 · report
get_activation jerryji1993/dnabert/src/transformers/activations.py community (archive-listed) unverified Apache-2.0 (permissive) · c91ea05b2f9c818a · report
kmer2seq jerryji1993/dnabert/motif/motif_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 2f94f1febf69f788 · report
mutate jerryji1993/dnabert/SNP/mutate_seqs.py community (archive-listed) unverified Apache-2.0 (permissive) · 97526e4fc5605ed7 · report
seq2kmer jerryji1993/dnabert/motif/motif_utils.py community (archive-listed) unverified Apache-2.0 (permissive) · 86ed11d1b2a6f597 · report

Tasks

Computational EfficiencyCore Promoter DetectionCovid Variant PredictionDNA analysisData CompressionEpigenetic Marks PredictionGenome UnderstandingPromoter DetectionSplice Site PredictionTranscription Factor Binding Site PredictionTranscription Factor Binding Site Prediction (Human)Transcription Factor Binding Site Prediction (Mouse)

1 archive task tag without a task page not shown.

Datasets

Introduced by this paper, per the archive.

GUE

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Core Promoter Detection GUE DNABERT-2-117M MCC 70.52 #1 of 1 Archive leaderboard report
Covid Variant Prediction GUE DNABERT-2-117M Avg F1 71.02 #1 of 1 Archive leaderboard report
Epigenetic Marks Prediction GUE DNABERT-2-117M MCC 55.98 #1 of 1 Archive leaderboard report
Promoter Detection GUE DNABERT-2-117M MCC 84.21 #1 of 1 Archive leaderboard report
Splice Site Prediction GUE DNABERT-2-117M MCC 84.99 #1 of 1 Archive leaderboard report
Transcription Factor Binding Site Prediction (Human) GUE DNABERT-2-117M MCC 70.10 #1 of 1 Archive leaderboard report
Transcription Factor Binding Site Prediction (Mouse) GUE DNABERT-2-117M MCC 67.99 #1 of 1 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionBPEDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxTransformer

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections