ahmed-moustafa commited on
Commit
6df2a29
·
verified ·
1 Parent(s): f542637

Add V4 (515F/806R) checkpoint: model weights, config variant, and model card

Browse files
Files changed (3) hide show
  1. README.md +107 -46
  2. config.json +115 -1
  3. deeptaxa-v4-v1.pt +3 -0
README.md CHANGED
@@ -9,6 +9,7 @@ tags:
9
  - 16s-rrna
10
  - full-length-16s
11
  - v3-v4-amplicon
 
12
  - illumina
13
  datasets:
14
  - systems-genomics-lab/greengenes
@@ -90,13 +91,47 @@ model-index:
90
  - type: f1
91
  value: 0.8592
92
  name: Species F1 (weighted)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
  ---
94
 
95
  # DeepTaxa: Hierarchical 16S rRNA Taxonomy Classification
96
 
97
  DeepTaxa is a deep learning model for hierarchical taxonomy classification of 16S rRNA gene sequences. The architecture couples a convolutional branch, which captures local k-mer motifs, with a BERT-style transformer, which captures long-range context. Both branches operate over tokens produced by the [DNABERT-2](https://huggingface.co/zhihan1996/DNABERT-2-117M) byte-pair encoder. Predictions are generated jointly for all seven standard taxonomic ranks: domain, phylum, class, order, family, genus, and species.
98
 
99
- Two checkpoints are released here: one trained on full-length 16S sequences and one trained on V3-V4 amplicons.
100
 
101
  ## Checkpoint selection
102
 
@@ -104,6 +139,7 @@ Two checkpoints are released here: one trained on full-length 16S sequences and
104
  |---|---|---|
105
  | Sanger 27F/1492R, PacBio HiFi 16S, Oxford Nanopore long-read 16S, full-length reference lookup | Full-length v1 | `deeptaxa-full-length-v1.pt` |
106
  | Illumina paired-end V3-V4 with 341F/805R primers | V3-V4 v1 | `deeptaxa-v3v4-v1.pt` |
 
107
 
108
  ## Released checkpoints
109
 
@@ -111,63 +147,64 @@ Two checkpoints are released here: one trained on full-length 16S sequences and
111
  |---|---|---:|---:|---:|---:|
112
  | Full-length v1 | 277,336 full-length 16S sequences (approximately 1,500 bp) from [Greengenes2](https://greengenes2.ucsd.edu/) | 92.88% | 92.03% | 0.0251 | 76.4 M |
113
  | V3-V4 v1 | 273,003 in-silico V3-V4 extractions (approximately 420 bp) from Greengenes2 | 87.55% | 85.92% | 0.0278 | 75.8 M |
 
114
 
115
- Species-level metrics above are single-seed (seed 42) test-set values for the published checkpoints. Across three seeds (42, 123, 456) the full-length checkpoint achieves species accuracy of 92.96% +/- 0.07 pp and species F1 of 92.12% +/- 0.08 pp, indicating high reproducibility.
116
 
117
- Both checkpoints are inference-only. Optimizer and scheduler state have been removed to reduce file size; resuming training from these checkpoints is not supported.
118
 
119
  ## Architecture
120
 
121
- The full-length and V3-V4 checkpoints share the canonical SMALL HybridCNNBERT configuration. Both were updated in April 2026 to this smaller, faster architecture: the full-length checkpoint matched or beat its prior numbers at every taxonomic rank with roughly 32% fewer parameters; the V3-V4 checkpoint achieved equivalent species-level performance (Acc 87.55% vs 87.52%, F1 85.92% vs 85.79%) at roughly 24% fewer parameters.
122
-
123
- | Component | Full-length v1 | V3-V4 v1 |
124
- |---|---|---|
125
- | `tokenizer_name` | `zhihan1996/DNABERT-2-117M` | `zhihan1996/DNABERT-2-117M` |
126
- | `max_length` | 512 (tokens) | 512 (tokens) |
127
- | `embed_dim` | 896 | 896 |
128
- | `num_filters` | 256 | 256 |
129
- | `kernel_sizes` | `[3, 5, 7]` | `[3, 5, 7]` |
130
- | `num_conv_layers` | 1 | 1 |
131
- | `hidden_size` | 896 | 896 |
132
- | `num_hidden_layers` | 4 | 4 |
133
- | `num_attention_heads` | 7 | 7 |
134
- | `intermediate_size` | 3584 | 3584 |
135
- | `hidden_dropout_prob` | 0.20 | 0.20 |
136
 
137
  ## Test-set performance
138
 
139
- Both checkpoints were evaluated on their respective held-out Greengenes2 2024.09 test splits. Numbers below are seed 42 test-set values for the published checkpoints.
140
 
141
- | Rank | Full-length Acc | Full-length F1 | V3-V4 Acc | V3-V4 F1 |
142
- |---------|---------------:|---------------:|----------:|---------:|
143
- | Domain | 99.99% | 99.99% | 99.99% | 99.99% |
144
- | Phylum | 99.68% | 99.67% | 99.68% | 99.66% |
145
- | Class | 99.63% | 99.59% | 99.64% | 99.60% |
146
- | Order | 99.09% | 98.99% | 98.99% | 98.88% |
147
- | Family | 98.61% | 98.41% | 98.41% | 98.19% |
148
- | Genus | 96.93% | 96.51% | 95.27% | 94.73% |
149
- | Species | 92.88% | 92.03% | 87.55% | 85.92% |
150
 
151
 
152
  ## Training configuration
153
 
154
- | Parameter | Full-length v1 | V3-V4 v1 |
155
- |---|---|---|
156
- | Training data | Greengenes2 2024.09 training set (277,336 full-length sequences, approximately 1,500 bp) | In-silico V3-V4 extractions from the same training set (273,003 amplicons) |
157
- | Test data | Greengenes2 2024.09 test split (69,335 full-length sequences) | V3-V4 extractions from the test split (68,282 amplicons) |
158
- | Extraction primers | N/A | 341F `CCTACGGGNGGCWGCAG` and 805R `GACTACHVGGGTATCTAATCC` |
159
- | Label space (species) | 16,909 | 8,347 |
160
- | Label space (domain / phylum / class / order / family / genus) | 2 / 129 / 349 / 997 / 2,250 / 7,287 | 2 / 115 / 270 / 709 / 1,528 / 4,529 |
161
- | Total parameters | 76,365,205 | 75,813,550 |
162
- | Learning rate | 5e-4 | 5e-4 |
163
- | Batch size | 64 | 64 |
164
- | Weight decay | 1e-2 | 1e-2 |
165
- | Epochs | 10 | 10 |
166
- | Loss | Cross-entropy with uniform per-rank weights | Cross-entropy with uniform per-rank weights |
167
- | Optimizer | AdamW (beta1 = 0.9, beta2 = 0.999) | AdamW (beta1 = 0.9, beta2 = 0.999) |
168
- | Learning rate schedule | Linear warm-up over 10% of steps, followed by linear decay | Linear warm-up over 10% of steps, followed by linear decay |
169
- | Seed | 42 | 42 |
170
- | Hardware | NVIDIA GeForce RTX 4090 | NVIDIA GeForce RTX 4090 |
171
 
172
  ## Usage
173
 
@@ -180,6 +217,9 @@ wget https://huggingface.co/systems-genomics-lab/deeptaxa/resolve/main/deeptaxa-
180
  # V3-V4 checkpoint
181
  wget https://huggingface.co/systems-genomics-lab/deeptaxa/resolve/main/deeptaxa-v3v4-v1.pt
182
 
 
 
 
183
  # Or clone the full repository
184
  git clone https://huggingface.co/systems-genomics-lab/deeptaxa
185
  ```
@@ -200,6 +240,12 @@ v3v4_ckpt = hf_hub_download(
200
  repo_id="systems-genomics-lab/deeptaxa",
201
  filename="deeptaxa-v3v4-v1.pt",
202
  )
 
 
 
 
 
 
203
  ```
204
 
205
  ### Install DeepTaxa and run predictions
@@ -218,9 +264,15 @@ deeptaxa predict \
218
  --fasta-file your_v3v4_amplicons.fna.gz \
219
  --checkpoint deeptaxa-v3v4-v1.pt \
220
  --output-dir predictions/
 
 
 
 
 
 
221
  ```
222
 
223
- Input preparation for V3-V4 amplicons: the input FASTA file should contain V3-V4 sequences that have already been demultiplexed and primer-trimmed by an upstream tool such as [DADA2](https://benjjneb.github.io/dada2/), [cutadapt](https://cutadapt.readthedocs.io/), or [QIIME2](https://qiime2.org/). The V3-V4 checkpoint was trained on in-silico primer extractions, which approximate merged paired-end amplicons. Paired-end reads should therefore be merged into consensus amplicons prior to prediction, or the forward read alone may be provided.
224
 
225
  Full usage documentation and analysis notebooks are available in the [GitHub repository](https://github.com/systems-genomics-lab/deeptaxa).
226
 
@@ -243,6 +295,13 @@ Limitations specific to the V3-V4 checkpoint:
243
  - The label space contains 8,347 species. Those for which no V3-V4 amplicon could be extracted during training are absent and cannot be predicted.
244
  - Primer specificity: the model was trained on 341F/805R extractions. Sequences amplified with other V3-V4 primers, such as 357F or 338F, or with substantially different region boundaries may yield degraded predictions.
245
 
 
 
 
 
 
 
 
246
  ## Citation
247
 
248
  ```bibtex
@@ -277,4 +336,6 @@ For support, please open an issue on the [GitHub repository](https://github.com/
277
 
278
  ## Version history
279
 
 
 
280
  v1 (April 2026). Initial release of the full-length and V3-V4 checkpoints. Both were updated in late April 2026 to the canonical SMALL HybridCNNBERT architecture (76.4 M and 75.8 M parameters respectively; kernels 3/5/7, 256 filters, 4 transformer layers, 7 attention heads, 3584 FFN intermediate, 896 hidden, dropout 0.20). The full-length update (v1.1) matched or beat the prior full-length numbers at every taxonomic rank with roughly 32% fewer parameters and roughly half the training time. The V3-V4 update (v1.2) achieved equivalent species-level performance (Acc 87.55% vs 87.52%, F1 85.92% vs 85.79%) at roughly 24% fewer parameters, harmonizing the two checkpoints under the same architecture. Users who downloaded either checkpoint before the corresponding update may see different SHA-256 hashes; re-downloading retrieves the updated file.
 
9
  - 16s-rrna
10
  - full-length-16s
11
  - v3-v4-amplicon
12
+ - v4-amplicon
13
  - illumina
14
  datasets:
15
  - systems-genomics-lab/greengenes
 
91
  - type: f1
92
  value: 0.8592
93
  name: Species F1 (weighted)
94
+ - name: "DeepTaxa Hybrid CNN-BERT: V4 Amplicon (v1)"
95
+ results:
96
+ - task:
97
+ type: classification
98
+ name: Hierarchical Taxonomy Classification
99
+ dataset:
100
+ type: systems-genomics-lab/greengenes
101
+ name: Greengenes2 (2024-09, in-silico V4 extractions)
102
+ split: test
103
+ metrics:
104
+ - type: accuracy
105
+ value: 0.9998
106
+ name: Domain Accuracy
107
+ - type: accuracy
108
+ value: 0.9959
109
+ name: Phylum Accuracy
110
+ - type: accuracy
111
+ value: 0.9954
112
+ name: Class Accuracy
113
+ - type: accuracy
114
+ value: 0.9877
115
+ name: Order Accuracy
116
+ - type: accuracy
117
+ value: 0.9810
118
+ name: Family Accuracy
119
+ - type: accuracy
120
+ value: 0.9346
121
+ name: Genus Accuracy
122
+ - type: accuracy
123
+ value: 0.8284
124
+ name: Species Accuracy
125
+ - type: f1
126
+ value: 0.8016
127
+ name: Species F1 (weighted)
128
  ---
129
 
130
  # DeepTaxa: Hierarchical 16S rRNA Taxonomy Classification
131
 
132
  DeepTaxa is a deep learning model for hierarchical taxonomy classification of 16S rRNA gene sequences. The architecture couples a convolutional branch, which captures local k-mer motifs, with a BERT-style transformer, which captures long-range context. Both branches operate over tokens produced by the [DNABERT-2](https://huggingface.co/zhihan1996/DNABERT-2-117M) byte-pair encoder. Predictions are generated jointly for all seven standard taxonomic ranks: domain, phylum, class, order, family, genus, and species.
133
 
134
+ Three checkpoints are released here: one trained on full-length 16S sequences, one trained on V3-V4 amplicons, and one trained on the shorter V4 amplicon.
135
 
136
  ## Checkpoint selection
137
 
 
139
  |---|---|---|
140
  | Sanger 27F/1492R, PacBio HiFi 16S, Oxford Nanopore long-read 16S, full-length reference lookup | Full-length v1 | `deeptaxa-full-length-v1.pt` |
141
  | Illumina paired-end V3-V4 with 341F/805R primers | V3-V4 v1 | `deeptaxa-v3v4-v1.pt` |
142
+ | Illumina paired-end V4 with 515F/806R primers | V4 v1 | `deeptaxa-v4-v1.pt` |
143
 
144
  ## Released checkpoints
145
 
 
147
  |---|---|---:|---:|---:|---:|
148
  | Full-length v1 | 277,336 full-length 16S sequences (approximately 1,500 bp) from [Greengenes2](https://greengenes2.ucsd.edu/) | 92.88% | 92.03% | 0.0251 | 76.4 M |
149
  | V3-V4 v1 | 273,003 in-silico V3-V4 extractions (approximately 420 bp) from Greengenes2 | 87.55% | 85.92% | 0.0278 | 75.8 M |
150
+ | V4 v1 | 274,509 in-silico V4 extractions (approximately 253 bp) from Greengenes2 | 82.84% | 80.16% | 0.0256 | 76.4 M |
151
 
152
+ Species-level metrics above are single-seed (seed 42) test-set values for the published checkpoints. Across three seeds (42, 123, 456) the full-length checkpoint achieves species accuracy of 92.96% +/- 0.07 pp and species F1 of 92.12% +/- 0.08 pp, indicating high reproducibility. The V3-V4 and V4 checkpoints are released as single-seed (seed 42) models.
153
 
154
+ All three checkpoints are inference-only. Optimizer and scheduler state have been removed to reduce file size; resuming training from these checkpoints is not supported.
155
 
156
  ## Architecture
157
 
158
+ The full-length, V3-V4, and V4 checkpoints share the canonical compact HybridCNNBERT configuration. The full-length and V3-V4 checkpoints were updated in April 2026 to this smaller, faster architecture: the full-length checkpoint matched or beat its prior numbers at every taxonomic rank with roughly 32% fewer parameters; the V3-V4 checkpoint achieved equivalent species-level performance (Acc 87.55% vs 87.52%, F1 85.92% vs 85.79%) at roughly 24% fewer parameters. The V4 checkpoint (added June 2026) was trained from scratch in this same configuration on in-silico V4 amplicons.
159
+
160
+ | Component | Full-length v1 | V3-V4 v1 | V4 v1 |
161
+ |---|---|---|---|
162
+ | `tokenizer_name` | `zhihan1996/DNABERT-2-117M` | `zhihan1996/DNABERT-2-117M` | `zhihan1996/DNABERT-2-117M` |
163
+ | `max_length` | 512 (tokens) | 512 (tokens) | 512 (tokens) |
164
+ | `embed_dim` | 896 | 896 | 896 |
165
+ | `num_filters` | 256 | 256 | 256 |
166
+ | `kernel_sizes` | `[3, 5, 7]` | `[3, 5, 7]` | `[3, 5, 7]` |
167
+ | `num_conv_layers` | 1 | 1 | 1 |
168
+ | `hidden_size` | 896 | 896 | 896 |
169
+ | `num_hidden_layers` | 4 | 4 | 4 |
170
+ | `num_attention_heads` | 7 | 7 | 7 |
171
+ | `intermediate_size` | 3584 | 3584 | 3584 |
172
+ | `hidden_dropout_prob` | 0.20 | 0.20 | 0.20 |
173
 
174
  ## Test-set performance
175
 
176
+ All three checkpoints were evaluated on their respective held-out Greengenes2 2024.09 test splits. Numbers below are seed 42 test-set values for the published checkpoints.
177
 
178
+ | Rank | Full-length Acc | Full-length F1 | V3-V4 Acc | V3-V4 F1 | V4 Acc | V4 F1 |
179
+ |---------|---------------:|---------------:|----------:|---------:|-------:|------:|
180
+ | Domain | 99.99% | 99.99% | 99.99% | 99.99% | 99.98% | 99.98% |
181
+ | Phylum | 99.68% | 99.67% | 99.68% | 99.66% | 99.59% | 99.57% |
182
+ | Class | 99.63% | 99.59% | 99.64% | 99.60% | 99.54% | 99.49% |
183
+ | Order | 99.09% | 98.99% | 98.99% | 98.88% | 98.77% | 98.67% |
184
+ | Family | 98.61% | 98.41% | 98.41% | 98.19% | 98.10% | 97.88% |
185
+ | Genus | 96.93% | 96.51% | 95.27% | 94.73% | 93.46% | 92.65% |
186
+ | Species | 92.88% | 92.03% | 87.55% | 85.92% | 82.84% | 80.16% |
187
 
188
 
189
  ## Training configuration
190
 
191
+ | Parameter | Full-length v1 | V3-V4 v1 | V4 v1 |
192
+ |---|---|---|---|
193
+ | Training data | Greengenes2 2024.09 training set (277,336 full-length sequences, approximately 1,500 bp) | In-silico V3-V4 extractions from the same training set (273,003 amplicons) | In-silico V4 extractions from the same training set (274,509 amplicons) |
194
+ | Test data | Greengenes2 2024.09 test split (69,335 full-length sequences) | V3-V4 extractions from the test split (68,282 amplicons) | V4 extractions from the test split (68,668 amplicons) |
195
+ | Extraction primers | N/A | 341F `CCTACGGGNGGCWGCAG` and 805R `GACTACHVGGGTATCTAATCC` | 515F `GTGYCAGCMGCCGCGGTAA` and 806R `GGACTACNVGGGTWTCTAAT` |
196
+ | Label space (species) | 16,909 | 8,347 | 16,909 |
197
+ | Label space (domain / phylum / class / order / family / genus) | 2 / 129 / 349 / 997 / 2,250 / 7,287 | 2 / 115 / 270 / 709 / 1,528 / 4,529 | 2 / 129 / 349 / 997 / 2,250 / 7,287 |
198
+ | Total parameters | 76,365,205 | 75,813,550 | 76,365,205 |
199
+ | Learning rate | 5e-4 | 5e-4 | 5e-4 |
200
+ | Batch size | 64 | 64 | 64 |
201
+ | Weight decay | 1e-2 | 1e-2 | 1e-2 |
202
+ | Epochs | 10 | 10 | 10 |
203
+ | Loss | Cross-entropy with uniform per-rank weights | Cross-entropy with uniform per-rank weights | Cross-entropy with uniform per-rank weights |
204
+ | Optimizer | AdamW (beta1 = 0.9, beta2 = 0.999) | AdamW (beta1 = 0.9, beta2 = 0.999) | AdamW (beta1 = 0.9, beta2 = 0.999) |
205
+ | Learning rate schedule | Linear warm-up over 10% of steps, followed by linear decay | Linear warm-up over 10% of steps, followed by linear decay | Linear warm-up over 10% of steps, followed by linear decay |
206
+ | Seed | 42 | 42 | 42 |
207
+ | Hardware | NVIDIA GeForce RTX 4090 | NVIDIA GeForce RTX 4090 | NVIDIA A40 |
208
 
209
  ## Usage
210
 
 
217
  # V3-V4 checkpoint
218
  wget https://huggingface.co/systems-genomics-lab/deeptaxa/resolve/main/deeptaxa-v3v4-v1.pt
219
 
220
+ # V4 checkpoint
221
+ wget https://huggingface.co/systems-genomics-lab/deeptaxa/resolve/main/deeptaxa-v4-v1.pt
222
+
223
  # Or clone the full repository
224
  git clone https://huggingface.co/systems-genomics-lab/deeptaxa
225
  ```
 
240
  repo_id="systems-genomics-lab/deeptaxa",
241
  filename="deeptaxa-v3v4-v1.pt",
242
  )
243
+
244
+ # V4
245
+ v4_ckpt = hf_hub_download(
246
+ repo_id="systems-genomics-lab/deeptaxa",
247
+ filename="deeptaxa-v4-v1.pt",
248
+ )
249
  ```
250
 
251
  ### Install DeepTaxa and run predictions
 
264
  --fasta-file your_v3v4_amplicons.fna.gz \
265
  --checkpoint deeptaxa-v3v4-v1.pt \
266
  --output-dir predictions/
267
+
268
+ # V4 amplicons (Illumina, already demultiplexed and primer-trimmed)
269
+ deeptaxa predict \
270
+ --fasta-file your_v4_amplicons.fna.gz \
271
+ --checkpoint deeptaxa-v4-v1.pt \
272
+ --output-dir predictions/
273
  ```
274
 
275
+ Input preparation for amplicon checkpoints: the input FASTA file should contain region-matched sequences that have already been demultiplexed and primer-trimmed by an upstream tool such as [DADA2](https://benjjneb.github.io/dada2/), [cutadapt](https://cutadapt.readthedocs.io/), or [QIIME2](https://qiime2.org/). The V3-V4 and V4 checkpoints were trained on in-silico primer extractions (341F/805R and 515F/806R respectively), which approximate merged paired-end amplicons. Paired-end reads should therefore be merged into consensus amplicons prior to prediction, or the forward read alone may be provided.
276
 
277
  Full usage documentation and analysis notebooks are available in the [GitHub repository](https://github.com/systems-genomics-lab/deeptaxa).
278
 
 
295
  - The label space contains 8,347 species. Those for which no V3-V4 amplicon could be extracted during training are absent and cannot be predicted.
296
  - Primer specificity: the model was trained on 341F/805R extractions. Sequences amplified with other V3-V4 primers, such as 357F or 338F, or with substantially different region boundaries may yield degraded predictions.
297
 
298
+ Limitations specific to the V4 checkpoint:
299
+
300
+ - Species-level accuracy is approximately 82.8%. The approximately 253 bp V4 region carries less taxonomic information than V3-V4 or the full 16S gene, so species-level calls should be read together with their confidence scores.
301
+ - The label space contains 16,909 species (the same as the full-length checkpoint), retained because V4 amplicons were extracted at 99.0% yield. Species for which no V4 amplicon could be extracted during training are absent and cannot be predicted.
302
+ - Primer specificity: the model was trained on 515F/806R extractions. Sequences amplified with other V4 primers or with substantially different region boundaries may yield degraded predictions.
303
+ - The V4 checkpoint is released as a single-seed (seed 42) model; no cross-seed standard deviation is reported for it.
304
+
305
  ## Citation
306
 
307
  ```bibtex
 
336
 
337
  ## Version history
338
 
339
+ v1 (June 2026). Added the V4 checkpoint (`deeptaxa-v4-v1.pt`), trained from scratch in the canonical compact HybridCNNBERT configuration on 274,509 in-silico V4 extractions (515F/806R, approximately 253 bp) from Greengenes2 2024.09. Single-seed (seed 42); species accuracy 82.84%, F1 80.16%, ECE 0.0256. The V4 amplicon was extracted at 99.0% yield, so the checkpoint keeps the full 16,909-species label space and matches the full-length parameter count (76.4 M).
340
+
341
  v1 (April 2026). Initial release of the full-length and V3-V4 checkpoints. Both were updated in late April 2026 to the canonical SMALL HybridCNNBERT architecture (76.4 M and 75.8 M parameters respectively; kernels 3/5/7, 256 filters, 4 transformer layers, 7 attention heads, 3584 FFN intermediate, 896 hidden, dropout 0.20). The full-length update (v1.1) matched or beat the prior full-length numbers at every taxonomic rank with roughly 32% fewer parameters and roughly half the training time. The V3-V4 update (v1.2) achieved equivalent species-level performance (Acc 87.55% vs 87.52%, F1 85.92% vs 85.79%) at roughly 24% fewer parameters, harmonizing the two checkpoints under the same architecture. Users who downloaded either checkpoint before the corresponding update may see different SHA-256 hashes; re-downloading retrieves the updated file.
config.json CHANGED
@@ -283,6 +283,120 @@
283
  }
284
  },
285
  "derived_from": "Canonical SMALL HybridCNNBERT hyperparameters (matching the full-length v1.1 release), applied from scratch to in-silico V3-V4 extractions from Greengenes2 2024.09. Updated in v1.2 in place over the prior LARGE Optuna v3v4 release: under identical evaluation the SMALL configuration achieves equivalent species-level performance (seed-42 Acc 87.55 vs 87.52, F1 85.92 vs 85.79) at roughly 24 percent fewer parameters."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
286
  }
287
  }
288
- }
 
283
  }
284
  },
285
  "derived_from": "Canonical SMALL HybridCNNBERT hyperparameters (matching the full-length v1.1 release), applied from scratch to in-silico V3-V4 extractions from Greengenes2 2024.09. Updated in v1.2 in place over the prior LARGE Optuna v3v4 release: under identical evaluation the SMALL configuration achieves equivalent species-level performance (seed-42 Acc 87.55 vs 87.52, F1 85.92 vs 85.79) at roughly 24 percent fewer parameters."
286
+ },
287
+ "v4": {
288
+ "checkpoint_file": "deeptaxa-v4-v1.pt",
289
+ "architecture": {
290
+ "max_length": 512,
291
+ "embed_dim": 896,
292
+ "num_filters": 256,
293
+ "kernel_sizes": [
294
+ 3,
295
+ 5,
296
+ 7
297
+ ],
298
+ "num_conv_layers": 1,
299
+ "hidden_size": 896,
300
+ "num_hidden_layers": 4,
301
+ "num_attention_heads": 7,
302
+ "intermediate_size": 3584,
303
+ "hidden_dropout_prob": 0.2
304
+ },
305
+ "training_hyperparameters": {
306
+ "learning_rate": 0.0005,
307
+ "batch_size": 64,
308
+ "epochs": 10,
309
+ "loss_function": "cross_entropy",
310
+ "level_weights": [
311
+ 1.0,
312
+ 1.0,
313
+ 1.0,
314
+ 1.0,
315
+ 1.0,
316
+ 1.0,
317
+ 1.0
318
+ ],
319
+ "optimizer": "AdamW",
320
+ "optimizer_params": {
321
+ "lr": 0.0005,
322
+ "betas": [
323
+ 0.9,
324
+ 0.999
325
+ ],
326
+ "weight_decay": 0.01
327
+ },
328
+ "scheduler_warmup_ratio": 0.1,
329
+ "seed": 42
330
+ },
331
+ "total_parameters": 76365205,
332
+ "training_date": "2026-06-28",
333
+ "training_hardware": "NVIDIA A40",
334
+ "training_dataset": {
335
+ "name": "Greengenes2 2024.09 (in-silico V4 extractions)",
336
+ "train_amplicons": 274509,
337
+ "test_amplicons": 68668,
338
+ "extraction_yield_train": 0.99,
339
+ "extraction_yield_test": 0.99,
340
+ "forward_primer": "GTGYCAGCMGCCGCGGTAA",
341
+ "reverse_primer": "GGACTACNVGGGTWTCTAAT",
342
+ "primer_name_forward": "515F",
343
+ "primer_name_reverse": "806R",
344
+ "max_primer_mismatches": 2,
345
+ "amplicon_length_median_bp": 253,
346
+ "amplicon_length_mean_bp": 253,
347
+ "amplicon_length_range_bp": [
348
+ 76,
349
+ 1669
350
+ ]
351
+ },
352
+ "taxonomic_levels": {
353
+ "domain": 2,
354
+ "phylum": 129,
355
+ "class": 349,
356
+ "order": 997,
357
+ "family": 2250,
358
+ "genus": 7287,
359
+ "species": 16909
360
+ },
361
+ "test_metrics": {
362
+ "_note": "Single-seed test-set metrics for the published checkpoint (seed 42).",
363
+ "domain": {
364
+ "accuracy": 0.9998,
365
+ "f1_score": 0.9998,
366
+ "ece": 0.0002
367
+ },
368
+ "phylum": {
369
+ "accuracy": 0.9959,
370
+ "f1_score": 0.9957,
371
+ "ece": 0.0025
372
+ },
373
+ "class": {
374
+ "accuracy": 0.9954,
375
+ "f1_score": 0.9949,
376
+ "ece": 0.0024
377
+ },
378
+ "order": {
379
+ "accuracy": 0.9877,
380
+ "f1_score": 0.9867,
381
+ "ece": 0.0058
382
+ },
383
+ "family": {
384
+ "accuracy": 0.981,
385
+ "f1_score": 0.9788,
386
+ "ece": 0.0076
387
+ },
388
+ "genus": {
389
+ "accuracy": 0.9346,
390
+ "f1_score": 0.9265,
391
+ "ece": 0.0172
392
+ },
393
+ "species": {
394
+ "accuracy": 0.8284,
395
+ "f1_score": 0.8016,
396
+ "ece": 0.0256
397
+ }
398
+ },
399
+ "derived_from": "Canonical compact HybridCNNBERT hyperparameters (matching the full-length v1 release), applied from scratch to in-silico V4 extractions from Greengenes2 2024.09. The approximately 253 bp V4 amplicon (515F/806R) was extracted at 99.0 percent yield, which retains the full 16,909-species vocabulary, so the checkpoint matches the full-length parameter count (76.4 M)."
400
  }
401
  }
402
+ }
deeptaxa-v4-v1.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:193d802bc7e0297da794a0c480d63770c1f06af60bcedf3a800419e2046767f3
3
+ size 306429554