SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.08777 · 2024

DNABERT-S: Pioneering Species Differentiation with Species-Aware DNA Embeddings

arXiv · PDF · Open in the Atlas

Code that ran

We lifted 8 functions out of this paper's own repositories and ran 5 of them in a sandbox. "Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results.

RepositoryRoleRan
magics-lab/dnabert_s canonical 5 of 8
FunctionStatusWhere it lives
calculate_dna2vec_embedding Ran magics-lab/dnabert_s/evaluate/utils.py
pointer only (licence: NONE) · get_code("4c6615f651e7fa5d")
calculate_tnf Ran magics-lab/dnabert_s/evaluate/utils.py
pointer only (licence: NONE) · get_code("db3a01b5cffc5ea6")
init_to_zero Ran magics-lab/dnabert_s/evaluate/model_codes/flash_attn_triton.py
pointer only (licence: NONE) · get_code("1586b639a5abd0b0")
mixup Ran magics-lab/dnabert_s/train/pretrain/DNABERT2_MIX/bert_layers.py
pointer only (licence: NONE) · get_code("5f366b4c543ed2a8")
unpad_input_only Ran magics-lab/dnabert_s/evaluate/model_codes/bert_padding.py
pointer only (licence: NONE) · get_code("a41fa8c40b551ec1")
get_embedding Not yet run magics-lab/dnabert_s/evaluate/utils.py
pointer only (licence: NONE) · get_code("5d9845f2b2705963")
pad_input Not yet run magics-lab/dnabert_s/evaluate/model_codes/bert_padding.py
pointer only (licence: NONE) · get_code("b166dc11d0f54137")
unpad_input Not yet run magics-lab/dnabert_s/evaluate/model_codes/bert_padding.py
pointer only (licence: NONE) · get_code("ee341a843ab02d5f")

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

We introduce DNABERT-S, a tailored genome model that develops species-aware embeddings to naturally cluster and segregate DNA sequences of different species in the embedding space. Differentiating species from genomic sequences (i.e., DNA and RNA) is vital yet challenging, since many real-world species remain uncharacterized, lacking known genomes for reference. Embedding-based methods are therefore used to differentiate species in an unsupervised manner. DNABERT-S builds upon a pre-trained genome foundation model named DNABERT-2. To encourage effective embeddings to error-prone long-read DNA sequences, we introduce Manifold Instance Mixup (MI-Mix), a contrastive objective that mixes the hidden representations of DNA sequences at randomly selected layers and trains the model to recognize and differentiate these mixed proportions at the output layer. We further enhance it with the proposed Curriculum Contrastive Learning (C$^2$LR) strategy. Empirical results on 23 diverse datasets show DNABERT-S's effectiveness, especially in realistic label-scarce scenarios. For example, it identifies twice more species from a mixture of unlabeled genomic sequences, doubles the Adjusted Rand Index (ARI) in species clustering, and outperforms the top baseline's performance in 10-shot species classification with just a 2-shot training. Model, codes, and data are publicly available at \url{https://github.com/MAGICS-LAB/DNABERT_S}.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2402.08777")
get_code_for_paper("2402.08777")
have("2402.08777")

Connect an agent — have() is free.