Improve CanadianInvertebrates-ML dataset card: metadata, abstract, and sample usage
Browse filesThis PR updates the dataset card for `CanadianInvertebrates-ML` by:
- Updating `size_categories` to `1M<n<10M` to reflect the dataset's stated size of 1.5M DNA barcodes.
- Adding `text-classification` to `task_categories`, as the dataset is primarily designed for taxonomic identification, species classification, and genus identification tasks.
- Adding `library_name: transformers` to the metadata, as the dataset is used in conjunction with models from the `transformers` library.
- Adding a prominent link to the paper on Hugging Face Papers and including the paper's abstract for quick context.
- Populating the "Sample Usage" section with practical Python code demonstrating how to use the dataset with the associated BarcodeBERT model.
- Adding the Zenodo link to the "Dataset Sources" section as found in the associated GitHub repository.
@@ -1,48 +1,54 @@
|
|
1 |
-
---
|
2 |
-
|
3 |
-
|
4 |
-
-
|
5 |
-
size_categories:
|
6 |
-
-
|
7 |
-
|
8 |
-
|
9 |
-
-
|
10 |
-
-
|
11 |
-
|
12 |
-
-
|
13 |
-
-
|
14 |
-
-
|
15 |
-
-
|
16 |
-
-
|
17 |
-
-
|
18 |
-
|
19 |
-
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
-
|
30 |
-
-
|
31 |
-
|
32 |
-
-
|
33 |
-
|
|
|
|
|
34 |
|
35 |
# Dataset Card for CanadianInvertebrates-ML
|
36 |
|
37 |
Alternative names: InvertebratesCanada-ML, CanInv-ML, CanInv-1M, Canada-1.5M
|
38 |
|
|
|
|
|
|
|
|
|
39 |
|
40 |
### Overview
|
41 |
-
The CanadianInvertebrates-ML is a
|
42 |
|
43 |
### Citation
|
44 |
|
45 |
-
If you make use of this dataset
|
46 |
|
47 |
```
|
48 |
cite as:
|
@@ -75,15 +81,37 @@ Each specimen contains the following annotations:
|
|
75 |
- **Split and localization**
|
76 |
- `split`: Data partition label (e.g., pretrain, train, test, val, test_unseen)
|
77 |
|
78 |
-
### Sample
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
-
|
|
|
81 |
|
|
|
|
|
82 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
83 |
|
84 |
### Dataset Sources
|
85 |
|
86 |
- **GitHub:** https://github.com/bioscan-ml/BarcodeBERT
|
87 |
-
- **Zenodo:**
|
88 |
- **Kaggle:** ?
|
89 |
- **Paper:** https://arxiv.org/abs/2311.02401
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
+
license: cc-by-3.0
|
5 |
+
size_categories:
|
6 |
+
- 1M<n<10M
|
7 |
+
task_categories:
|
8 |
+
- feature-extraction
|
9 |
+
- text-classification
|
10 |
+
pretty_name: CanInv-ML
|
11 |
+
tags:
|
12 |
+
- DNA_barcode
|
13 |
+
- Taxonomy
|
14 |
+
- Biodiversity
|
15 |
+
- LLMs
|
16 |
+
- BERT
|
17 |
+
- Clustering
|
18 |
+
- Zero_shot_transfer_learning
|
19 |
+
- Insect
|
20 |
+
- Species
|
21 |
+
maintainers:
|
22 |
+
- https://huggingface.co/pmillana
|
23 |
+
author:
|
24 |
+
name: Pablo Millan Arias
|
25 |
+
github: https://github.com/millanp95
|
26 |
+
hf: https://huggingface.co/pmillana
|
27 |
+
dataset_loader_script: dataset.py
|
28 |
+
dataset_split_names:
|
29 |
+
- pretrain
|
30 |
+
- train
|
31 |
+
- validation
|
32 |
+
- test
|
33 |
+
- test_unseen
|
34 |
+
library_name: transformers
|
35 |
+
---
|
36 |
|
37 |
# Dataset Card for CanadianInvertebrates-ML
|
38 |
|
39 |
Alternative names: InvertebratesCanada-ML, CanInv-ML, CanInv-1M, Canada-1.5M
|
40 |
|
41 |
+
This dataset is used in the paper [BarcodeBERT: Transformers for Biodiversity Analysis](https://huggingface.co/papers/2311.02401).
|
42 |
+
|
43 |
+
## Paper Abstract
|
44 |
+
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 this https URL .
|
45 |
|
46 |
### Overview
|
47 |
+
The CanadianInvertebrates-ML is a machine learning-ready dataset derived from the raw DNA barcodes published in [deWaard et. al, 2019](https://www.nature.com/articles/s41597-019-0320-2). The data is specifically designed and curated for different machine learning tasks in biodiversity analysis: species classification, genus identification of novel species, and BIN reconstruction.
|
48 |
|
49 |
### Citation
|
50 |
|
51 |
+
If you make use of this dataset and/or its code repository, please cite the following paper:
|
52 |
|
53 |
```
|
54 |
cite as:
|
|
|
81 |
- **Split and localization**
|
82 |
- `split`: Data partition label (e.g., pretrain, train, test, val, test_unseen)
|
83 |
|
84 |
+
### Sample Usage
|
85 |
+
|
86 |
+
To use this dataset with the BarcodeBERT model, you can follow the example from the associated GitHub repository:
|
87 |
+
|
88 |
+
```python
|
89 |
+
from transformers import AutoTokenizer, AutoModel
|
90 |
+
|
91 |
+
# Load the tokenizer
|
92 |
+
tokenizer = AutoTokenizer.from_pretrained(
|
93 |
+
"bioscan-ml/BarcodeBERT", trust_remote_code=True
|
94 |
+
)
|
95 |
|
96 |
+
# Load the model
|
97 |
+
model = AutoModel.from_pretrained("bioscan-ml/BarcodeBERT", trust_remote_code=True)
|
98 |
|
99 |
+
# Sample sequence
|
100 |
+
dna_seq = "ACGCGCTGACGCATCAGCATACGA"
|
101 |
|
102 |
+
# Tokenize
|
103 |
+
input_seq = tokenizer(dna_seq, return_tensors="pt")["input_ids"]
|
104 |
+
|
105 |
+
# Pass through the model
|
106 |
+
output = model(input_seq.unsqueeze(0))["hidden_states"][-1]
|
107 |
+
|
108 |
+
# Compute Global Average Pooling
|
109 |
+
features = output.mean(1)
|
110 |
+
```
|
111 |
|
112 |
### Dataset Sources
|
113 |
|
114 |
- **GitHub:** https://github.com/bioscan-ml/BarcodeBERT
|
115 |
+
- **Zenodo:** https://doi.org/10.5281/zenodo.15650124
|
116 |
- **Kaggle:** ?
|
117 |
- **Paper:** https://arxiv.org/abs/2311.02401
|