BarcodeBERT: Transformers for Biodiversity Analysis

Pablo Millan Arias, Niousha Sadjadi, Monireh Safari, ZeMing Gong, Austin T. Wang +7 more
11/4/2023
cs.LG

Official code: bioscan-ml/BIOSCAN-5M (24 stars, last commit 2026-02-25). 1 more implementation below.

Abstract

In the global challenge of understanding and characterizing biodiversity, short species-specific genomic sequences known as DNA barcodes play a critical role, enabling fine-grained comparisons among organisms within the same kingdom of life. Although machine learning algorithms specifically designed for the analysis of DNA barcodes are becoming more popular, most existing methodologies rely on generic supervised training algorithms. We introduce BarcodeBERT, a family of models tailored to biodiversity analysis and trained exclusively on data from a reference library of 1.5M invertebrate DNA barcodes. We compared the performance of BarcodeBERT on taxonomic identification tasks against a spectrum of machine learning approaches including supervised training of classical neural architectures and fine-tuning of general DNA foundation models. Our self-supervised pretraining strategies on domain-specific data outperform fine-tuned foundation models, especially in identification tasks involving lower taxa such as genera and species. We also compared BarcodeBERT with BLAST, one of the most widely used bioinformatics tools for sequence searching, and found that our method matched BLAST's performance in species-level classification while being 55 times faster. Our analysis of masking and tokenization strategies also provides practical guidance for building customized DNA language models, emphasizing the importance of aligning model training strategies with dataset characteristics and domain knowledge. The code repository is available at https://github.com/bioscan-ml/BarcodeBERT.

View on arXivView PDF

Code Implementations(2)

A multimodal dataset of 5M insect specimens for biodiversity research.

241PythonApr 12, 20247 months agoNOASSERTION
MIT

A transformer model for DNA barcode representation learning and taxonomic classification.

186HTML, ShellFeb 16, 20235 months agoMIT

Similar Papers

Cite this paper

@article{arias2023barcodebert,
  title  = {BarcodeBERT: Transformers for Biodiversity Analysis},
  author = {Pablo Millan Arias and Niousha Sadjadi and Monireh Safari and ZeMing Gong and Austin T. Wang and Joakim Bruslund Haurum and Iuliia Zarubiieva and Dirk Steinke and Lila Kari and Angel X. Chang and Scott C. Lowe and Graham W. Taylor},
  year   = {2023},
  eprint = {2311.02401},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2311.02401v3}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2311.02401.svg)](https://codeofpaper.com/paper/2311.02401)

Discussion