Manuscript Offprint
arXiv:2610.28310Recommending Bacterial Cultivation Conditions from 16S rRNA
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Juntang Wang
Harvard University
USA
Runkun Guo
Boston University
USA
Hao Wu
Duke Kunshan University
China
Shixin Xu
Duke Kunshan University
China
Yihan Wang
Duke University
USA
Dongmian Zou
Duke Kunshan University
China
Abstract
Recommending bacterial cultivation conditions from sequence data is a challenging structured problem characterized by missing standardized benchmarks and limited use of sequence structure. To address this, we introduce DSNI, a benchmark of 65,023 bacterial strains with phylogeny-aware splits, pairing 16S rRNA sequences with four cultivation conditions (media, temperature, pH, oxygen). Exploiting the mosaic structure of 16S rRNA, where hypervariable regions support discrimination and conserved regions support primer design, we propose a Variability-Gated Encoder that learns position-dependent importance weights conditioned on biological features (region type, position, and local complexity). The gating module adds minimal overhead (1,280 parameters, <1%) while providing an explicit inductive bias valuable in low-data regimes. Experiments demonstrate that the learnable gate improves flat Transformers by 4.7% in joint accuracy and complements RNABERT, yielding 44.2% exact-match joint accuracy. The model also recovers 90.2% of ground-truth cultivation protocols within its top-25 recommendations, narrowing the exhaustive search space by approximately 60×.
1 Introduction
Leveraging domain structure to improve generalization in low-data regimes is a central challenge in representation learning. 16S ribosomal RNA [33] offers a compelling testbed for this challenge due to its distinctive mosaic structure: nine hyper-variable regions (V1–V9) carrying discriminative signals, interspersed with highly conserved segments [4]. While hyper-variable regions enable species-level discrimination and conserved regions support universal PCR primer design, prior work has largely treated 16S as a taxonomic marker rather than a predictor of bacterial phenotypes. We ask whether models can use 16S sequences to recommend cultivation conditions, including growth media, temperature, pH, and oxygen requirements, that microbiologists must empirically determine for novel organisms. This structured recommendation task presents three technical challenges: (1) scarce labeled data relative to sequence length, (2) severe class imbalance (89% mesophiles, 91% neutrophiles), and (3) output multiplicity (organisms may tolerate multiple conditions). These challenges motivate incorporating inductive bias: can we encode domain knowledge about sequence structure into neural architectures to improve sample efficiency?
Cultivation is essential for characterizing microbial diversity, yet more than 99% of microbial diversity remains uncultured, a phenomenon termed the “great plate count anomaly” [24, 30]. The primary barrier is the laborious trial-and-error process of identifying appropriate growth conditions for each
Equal contribution.
Corresponding author: dongmian.zou@dukekunshan.edu.cn.
Preprint.
novel organism[16, 19]. If cultivation conditions could be predicted from sequence data alone, this bottleneck could be substantially relieved, turning exhaustive screening into a targeted shortlist and opening sequence-guided cultivation as a concrete route toward studying the uncultured majority.
We hypothesize that 16S sequences correlate with cultivation requirements due to the phylogenetic conservation of metabolic traits [12, 20]. While 16S does not directly encode metabolic enzymes, its sequence reflects phylogenetic history that shapes phenotypic similarity. We frame the task as structured recommendation, using sequence-derived patterns to suggest plausible cultivation conditions. Validating this hypothesis requires: (i) a large-scale dataset pairing 16S with standardized cultivation metadata, and (ii) methods for learning cultivation-relevant representations. Currently, no such benchmark or dedicated method exists.
To address this gap, we introduce DSNI, a benchmark curated from DSMZ [25, 28] DSNI contains 65,023 strains, roughly the size of the closest comparable resource KOMODO [22]. To our knowledge, it is the first 16S benchmark that pairs sequences with all four primary cultivation conditions under a single standardized labeling scheme, providing a unified resource for sequence-based cultivation recommendation at scale. To support rigorous evaluation, DSNI uses phylogeny-aware splits that cluster sequences by taxonomic similarity. This protocol prevents information leakage from near-neighbor organisms and more realistically evaluates generalization to novel taxa.
Beyond DSNI, we propose a Variability-Gated Encoder: a lightweight gating mechanism (1,280 parameters, <1% overhead) that learns position-dependent importance weights conditioned on region type (V1–V9 vs. conserved), normalized position, and local sequence complexity. This allows the model to allocate representational capacity based on domain-informed features rather than hard-coding rules or relying solely on attention to discover these patterns. We benchmark our approach against flat encoders and pretrained models (RNABERT), using identical decoders and training budgets to isolate the gating effect and test whether domain-informed bias complements pretraining.
Our contributions are three-fold: (1) a 65,023-strain 16S benchmark with standardized four-condition labels and phylogeny-aware splits; (2) a lightweight Variability-Gated Encoder with biologically grounded inductive bias; (3) systematic experiments showing that gating improves joint accuracy by +4.7%, complements RNABERT to reach 44.2%, and achieves 90.2% top-25 protocol recall, reducing the candidate protocol space by .
Cultivation Condition Prediction. The most related prior work is KOMODO [22], which predicts growth media by collaborative filtering on phylogenetically similar strains and reports 83% accuracy on organism-media pairings under random train/test splits. However, random splits can place closely related strains in both train and test sets, leading to phylogenetic leakage. Under our genus-level splits, the corresponding GROWREC method achieves 46.3% media accuracy (Table 1). Other work predicts optimal growth temperature from genome features [26] or growth rates from codon usage [32], but they require complete genomes or rely on close phylogenetic references. To our knowledge, no standardized benchmark or task-specific model exists for predicting bacterial cultivation conditions directly from 16S rRNA sequences.
Sequence Representation Learning. Deep learning for nucleic acid sequences began with convolutional models for binding prediction [2] and has since evolved into pretrained foundation models, including DNABERT [14], Nucleotide Transformer [8], HyenaDNA [21], and RNA-specific models such as RNABERT [1], RNA-FM [5], and ERNIE-RNA [35]. These models provide strong baselines, but they lack task-specific inductive biases. Unlike Highway Networks [29] and Gated CNNs [9], where gates are learned from internal representations, our gating mechanism conditions on external biological features (region type and local complexity) and provides explicit inductive bias.
| Property | Value |
|---|---|
| Total sequences | 65,023 |
| Unique genera | 2,156 |
| Unique species | 11,847 |
| Sequence length (bp) | 1,089 ± 264 |
| GC content (%) | 54.2 ± 7.6 |
| Temperature range | 2–103°C |
| pH range | 1.0–11 |
| Media categories | 42 |
| Temperature | 3 classes |
| pH | 3 classes |
| Oxygen | 4 classes |
(a) Phylogenetic Distribution

(c) Oxygen Requirement
(b) Temperature Preference

(d) Top Media Categories
Figure 1: DSNI benchmark statistics and label distributions. Left: summary statistics for 65,023 strains. Right: phylogenetic, temperature, oxygen, and media distributions. DSNI is dominated by Proteobacteria and Firmicutes, shows strong mesophilic bias, and has long-tailed media categories.
3 The DSNI Benchmark
We introduce DSNI (DSMZ and NIH Integrated), a curated benchmark for recommending bacterial cultivation conditions from 16S rRNA sequences. DSNI integrates records from DSMZ and NIH/NCBI resources and provides standardized labels for growth media, temperature, pH, and oxygen requirements. We use 16S as input because it is broadly recoverable across taxa and environments, making the benchmark applicable to organisms for which complete genome data is unavailable (Appendix A.3 provides a quantitative comparison with genome features).
3.1 Data Sources and Processing
Data Sources. DSNI integrates records from DSMZ [25] and NIH/NCBI resources [27]. DSMZ provides curated bacterial strain records with detailed cultivation protocols, while NIH/NCBI resources provide 16S sequences in GenBank and cultivation data from associated repositories, including BEI Resources. We cross-reference strain identifiers to link sequences with cultivation conditions.
Database Construction. The combined records comprise six relational tables (STRAINS, MEDIA, SOLUTIONS, INGREDIENTS, STEPS, GAS) capturing taxonomic information, cultivation protocols, and precise media compositions. We flatten this schema into supervised sequence-condition pairs. Full schema details and entity-relationship diagrams are provided in Appendix A.1.
Quality Control and Deduplication. Sequences are quality-filtered (500–1,500 bp, <1% ambiguous bases, SILVA-aligned [23]) and dereplicated at the 97% OTU threshold [34], retaining the entry with the most complete metadata per cluster; full pipeline in Appendix A.4.
3.2 Label Standardization and Dataset Statistics
Label Standardization. Growth media names varied across sources, such as “Tryptic Soy Agar”, “TSA”, and “Trypticase Soy Agar”. We standardized media through rule-based synonym matching and expert curation, with canonical categories defined by base composition, such as peptone-based, blood-based, and minimal-salts media. This preserved biologically meaningful distinctions, including aerobic versus anaerobic variants, while collapsing trivial naming differences. Rare media with fewer than 10 occurrences were grouped into an “Other” category. For continuous cultivation conditions, raw temperatures span 2°C to 103°C and pH values span 1.0 to 11. We discretize temperature into psychrophilic (T < 20°C), mesophilic (20°C ≤ T ≤ 45°C), and thermophilic (T > 45°C); pH into acidophilic (pH < 6), neutrophilic (6 ≤ pH ≤ 8), and alkaliphilic (pH > 8). Oxygen requirements are standardized into obligate aerobe, facultative anaerobe, microaerophile, and obligate anaerobe.
Dataset Statistics Figure 1 summarizes key statistics and the label distributions. The dataset exhibits class imbalance characteristic of cultured bacterial collections. Raw temperature values cluster heavily in the 20–40°C range, reflecting the predominance of mesophilic organisms; after binning, mesophiles constitute 89% of samples, with psychrophiles (6%) and thermophiles (5%, including rare hyperthermophilic bacteria from extreme environments) as minority classes. Similarly, raw pH values concentrate between 6 and 8, yielding 91% neutrophiles after discretization. Most organisms are facultative anaerobes (44%) or obligate aerobes (36%), with microaerophiles (12%) and obligate anaerobes (8%) less represented. Media categories follow a long-tail distribution: the top 5 media (including Tryptic Soy, Brain Heart Infusion, and Nutrient Agar variants) account for 51% of samples, while 19 media categories have fewer than 100 examples each. This imbalance motivates class-weighted losses and macro-averaged evaluation metrics.
3.3 Phylogeny-Aware Splits
To evaluate generalization to novel taxa, we construct splits at the genus level. Using NCBI Taxonomy, we ensure all sequences from a given genus exclusively in one split (train, validation, or test), preventing models from memorizing genus-specific signatures. We first sort genera by size, then greedily assign each genus to minimize deviation from the target proportions (70%/15%/15%) while preserving stratification over the four label distributions. The final splits contain 1,509/324/323 genera and 45,516/9,754/9,753 sequences for train/validation/test. This procedure helps maintain representation of minority classes in validation and test sets.
3.4 Task Definition and Evaluation Metrics
We frame cultivation condition recommendation as a multi-task classification problem. Given a 16S rRNA sequence where and denotes the sequence length, the goal is to predict : media category (42 classes), temperature preference (psychrophile/mesophile/thermophile), pH preference (acidophile/neutrophile/alkaliphile), and oxygen requirement (aerobe/facultative/microaerophile/anaerobe).
While we formalize this as a multi-task classification problem for learning, the underlying task is better understood as structured recommendation rather than causal prediction. Models should learn to suggest plausible conditions from sequence-derived patterns in the training data. We note that cultivation conditions are interdependent. For example, thermophilic organisms often require specialized media formulations, motivating treating the four outputs jointly rather than as independent predictions. Multiple valid cultivation protocols may exist for a given organism. When source records indicate multiple valid media for a single strain, we retain only the primary recommended medium (typically the first listed in DSMZ protocols or the most frequently cited in NCBI records) as the ground-truth label. This single-label formulation simplifies training, while top-k metrics account for near-miss predictions on alternative valid media.
Per-Task Accuracy. For each task (media, temperature, pH, oxygen), we report top-1 accuracy on the test set. This provides an interpretable measure of how often the model's most confident prediction matches the ground truth. For media prediction, where multiple valid cultivation media may support growth of the same organism, we additionally report top-3 accuracy to credit near-miss predictions.
Macro-F1 Score. Given the severe class imbalance in DSNI, we report macro-averaged F1 scores that weight each class equally regardless of frequency. This ensures that rare but biologically important classes contribute to the overall metric, following standard practice for imbalanced classification.
Joint Accuracy. We report the fraction of test examples where all four condition predictions are correct. This stringent metric measures the model's ability to produce coherent cultivation protocols, reflecting the reality that a single incorrect condition can lead to culture failure. Joint accuracy penalizes models that perform well on individual tasks but fail to capture inter-task correlations.
4 Variability-Gated Encoder
We propose a Variability-Gated Encoder that incorporates biologically motivated inductive bias. The key insight is that hypervariable regions (V1–V9) provide species-level discrimination, while conserved regions reflect evolutionary constraints. Rather than hard-coding region weights or relying solely on attention to infer positional importance from limited data, we introduce a learnable gating

Figure 2: Architecture of the variability-gated encoder. The input 16S rRNA sequence is embedded with positional encodings, then modulated by a lightweight gating layer (dashed box) that computes position-wise importance weights. The gate conditions on biological features: region tags indicating hypervariable (V1–V9) vs. conserved positions, positional encoding, local GC content, and Shannon entropy. Gated embeddings are processed by a Transformer encoder, and a [CLS] token representation feeds four task-specific heads for media, temperature, pH, and oxygen requirement predictions.
layer conditioned on externally computed biological features. This provides an explicit inductive bias: the model is told which features may matter, but learns how they matter through end-to-end training.
To handle the 1,500 bp span of 16S rRNA sequences, we employ a Transformer backbone for long-range sequence modeling. The proposed gate adds position-wise importance conditioned on biological features that attention cannot directly encode, which is valuable in low-data regimes. The module is efficient, adding only 1,280 parameters (<1% overhead), and is consistent with prior evidence that gating can complement attention [8].
4.1 Architecture Overview
Our model consists of four main components (Figure 2):
Embedding Layer. Nucleotides are embedded into dimensions with sinusoidal positional encodings: . where denotes the nucleotide at position and denotes the sinusoidal positional encoding.
Variability Gating Layer. To encode the known structure of 16S sequences into the learned representations, we apply gating before the main encoder. This design allows the model to allocate representational capacity within embeddings rather than modifying attention patterns post-hoc. The gating mechanism modulates each position's representation based on biological features:
where is a learned gate vector and denotes element-wise multiplication.
Transformer Encoder. The gated embeddings are processed by a standard Transformer encoder with N layers of multi-head self-attention and feed-forward networks:
Task-Specific Heads. For each task , a separate linear head predicts , where is the final [CLS] embedding.
4.2 Gating Mechanism
The gating layer is the core contribution of our architecture. It computes position-wise importance weights conditioned on three types of features:
Region Tags. We annotate each sequence position with a binary indicator distinguishing between hypervariable regions (V1–V9) and conserved regions. To determine region boundaries, sequences are aligned to the SILVA SSU Ref NR 138.1 database [23] using the SINA aligner (v1.7.2). This process provides position-wise mappings to the reference alignment where V-region boundaries are pre-annotated. Formally, let indicate the hypervariable status for position .
Local Sequence Complexity. We compute two local complexity measures in a sliding window of size w centered at each position:
• GC content: , where is the indicator function.
• Shannon entropy: , where is the local frequency of base .
Gate Computation. The gate vector at each position is computed by a single linear layer:
where is the region tag, is the normalized position (with the sequence length), and , are local complexity measures. The gate is then:
where is the sigmoid function, ensuring gate values lie in , and , . The gate operates token-wise: each position receives an independent gate vector computed from its local features. With , the gate network adds parameters (<1% of total model size). We intentionally keep the module low-capacity to prevent overfitting, thereby forcing the model to leverage the provided biological features rather than learning arbitrary gating patterns.
Interpretation. Functionally, a gate value approaching 1 preserves the original embedding, while values near 0 suppress the representation. By conditioning on region tags and complexity features, the model can learn which positions carry informative signal for cultivation prediction. Importantly, this constitutes a soft inductive bias: the model is encouraged but not forced to weight regions differently, and the final gating pattern is learned from data.
4.3 Training Objective
We train the model using a multi-task objective that combines cross-entropy losses for each prediction task, , where for task the model outputs logits , denotes the predicted probability vector, and is the one-hot ground-truth label. The per-task cross-entropy loss is , and are task-specific weights.
Loss Weighting. To handle class imbalance, we use inverse-frequency class weights computed on the training split. For task and class with count , we set and apply to the cross-entropy term. Task weights balance contributions across tasks with numbers of classes.
Regularization. We apply dropout to the Transformer layers and add an L2 penalty on the gate network parameters to encourage sparse, interpretable gating patterns.
5 Experiments
5.1 Baselines and Implementation
We benchmark against a diverse set of methods spanning traditional ML, similarity-based retrieval, deep learning, and pretrained models. To isolate the gating effect, all neural methods share identical classification heads, losses, and early stopping criteria, with only the encoder changed. Models trained from scratch use 100 epochs, while RNABERT fine-tuning uses 50 epochs due to faster convergence.
Traditional ML. k-mer + RF/XGBoost: Extract k-mer frequencies ( , 1,344 features) and train Random Forest [3] or XGBoost [6] classifiers independently for each task. Tests whether compositional features suffice.
Similarity-Based. GROWREC [22]: Predicts by majority vote among phylogenetically nearest neighbors. k-NN (Sequence): Predicts by majority vote among nearest neighbors using normalized Levenshtein distance to account for variable sequence lengths.
Deep Learning. CNN: Stacked convolutions with global pooling [18]; captures local motifs but limited long-range dependencies. Transformer (Flat): Standard encoder [31] with learned positional embeddings; serves as the “no inductive bias” baseline.
Pretrained. RNABERT [1]: Fine-tuned pretrained RNA model.
Implementation. Our Transformer uses layers, , 8 attention heads, and a 1,280-parameter gate (4-dim biological features 256-dim gate; complexity window). For
Table 1: Main results on the DSNI test set. Best in bold, second-best underlined; mean ± std over 5 seeds. Params = trainable parameters in millions.
| Method | Params | Media Acc. | Temp. Acc. | pH Acc. | Acc. | Joint Acc. |
|---|---|---|---|---|---|---|
| Traditional ML | ||||||
| -mer + RF | — | |||||
| -mer + XGBoost | — | |||||
| Phylogenetic / Similarity-Based | ||||||
| GROWREC | — | |||||
| -NN (Sequence) | — | |||||
| Deep Learning (No Pretraining) | ||||||
| CNN Encoder | 2.1M | |||||
| Transformer (Flat) | 4.8M | |||||
| Transformer + Gating | 4.8M | |||||
| Pretrained Models | ||||||
| RNABERT | 120M | |||||
| RNABERT + Gating | 120M | |||||
RNABERT, we fine-tune the public 440-token checkpoint with center-cropped inputs and randomly initialized task heads. All models train with AdamW + linear warmup, select the checkpoint with best validation joint accuracy, and report mean over 5 seeds. Full hyperparameters in Appendix B.
5.2 Main Results
Table 1 presents the main benchmark results on DSNI. We report mean ± std over 5 random seeds. Paired bootstrap confidence intervals with 10,000 resamples and McNemar's tests on prediction-level outcomes (reported in Appendix C.7) show that all gating-induced gains are statistically significant (p < 0.001). The results support five observations.
(1) Learned representations outperform phylogenetic matching: Transformer+Gating exceeds GROWREC by +6.3% media accuracy and +12.6% joint accuracy.
(2) Gating improves flat encoders: +4.3% media, +2.9% ; region tags alone contribute +3.3%.
(3) Inductive bias and pretraining are complementary: While Transformer+Gating (41.5%) outperforms RNABERT (39.7%), the combined RNABERT+Gating yields the best results (44.2%).
(4) Media Prediction is the most challenging task: 42 classes with multiple valid answers. Top-3 accuracy (crediting any of the top-3 predictions matching ground truth) reaches 71.2% for Transformer+Gating, 68.4% for flat Transformer, and 74.8% for RNABERT+Gating.
(5) Inductive bias improves sample efficiency: the gating advantage is largest at low data (+8.4% at 5% training data; Section 5.3), suggesting that explicit bias complements data-driven learning.
Joint Accuracy in Practical Context. While the strict 44.2% exact-match joint accuracy may appear modest, it underestimates practical utility: 76.3% of test strains have at least 3 of 4 conditions correct (4/4: 44.2%; 3/4: 32.1%), and 93.1% have at least 2 of 4 correct (Section C.5). This indicates that many errors are partial rather than completely incorrect protocols. Per-task top-1 accuracies further show that media, with 42 long-tailed classes and multiple plausible alternatives, is the dominant bottleneck, while temperature, pH, and oxygen each exceed 82% top-1.
5.3 Low-Data Performance
To test whether inductive bias helps in low-data regimes, we train on data subsets (5%–100%) and evaluate on the full test set (Figure 3). The gating advantage is largest at 5% data (+8.4% joint accuracy: 26.7% vs. 18.3%) and decreases to +4.7% at full data. RNABERT + Gating achieves 33.1% at 5% data, approaching flat Transformer's full-data performance (36.8%). This pattern suggests that inductive bias is most valuable when data is insufficient for the model to discover relevant patterns independently. As training data increases, the flat encoder gradually exploits sequence structure and narrows the gap, but explicit bias provides a head start that persists even at full data.
Joint Accuracy (%)

Figure 3: Few-shot learning curves for joint accuracy across training set sizes. Shaded regions indicate standard deviation over 3 random seeds. Gating improves performance most strongly in the low-data regime, and RNABERT+Gating performs best across data sizes.
| Top-k | Joint recall |
|---|---|
| k = 1 | 44.2% |
| k = 5 | 67.8% |
| k = 10 | 78.3% |
| k = 20 | 87.1% |
| k = 25 | 90.2% |
| Exhaustive (1,512) | 100% |
Table 2: Joint protocol recall vs. shortlist size (RN-ABERT+Gating). Exhaustive screening requires enumerating 1,512 protocols.
| Configuration | Joint Acc. |
|---|---|
| Full model (all features) | |
| - Region tags | |
| - Position encoding | |
| - GC content | |
| - Shannon entropy | |
| Learned gating (no bio. features) | |
| No gating (Flat Transformer) |
Table 3: Ablation on gating components: joint accuracy on the DSNI test set.
5.4 Robustness and Practical Utility
We further characterize DSNI and our model along three axes: phylogenetic leakage, generalization across phylogenetic distance, and the model's utility as a search-space reducer for wet-lab cultivation.
Quantifying Phylogenetic Leakage. To measure how much apparent predictability comes from phylogenetic memorization, we re-evaluated three encoder families under random splits and our genus-aware splits while holding all other settings fixed. Joint accuracy drops by 20.1–21.4 pp across all three encoders (See Appendix C.6). This substantial drop shows that random splits can strongly inflate cultivation-prediction performance and motivates phylogeny-aware evaluation.
Generalization vs. Phylogenetic Distance. We stratify the test set by 16S identity to the nearest training-set genus. The advantage of RNABERT+Gating over the phylogenetic-matching baseline GROWREC widens with distance, from +13.7 pp at >90% identity to +16.8 pp at <80% (See Appendix C.3). This pattern is inconsistent with pure nearest-neighbor matching and suggests that the encoder learns sequence-level signals that remain useful when close training relatives are unavailable.
Top-k Recall as a Screening Tool. Microbiologists typically screen a shortlist rather than commit to a single protocol, so we also evaluate the model as a search-space reducer (Table 2). Testing the top-25 ranked joint protocols recovers 90.2% of ground-truth protocols, compared to exhaustive combinations. This reduces the candidate set by while retaining high recall.
Functional-Equivalence Audit of Media Errors. A manual audit of 200 top-1 media errors finds that 58% occur between functionally related media, as detailed in Appendix C.4. This suggests that exact-match media accuracy may underestimate practical recommendation quality.
5.5 Ablation Studies
We ablate the gating components to quantify their individual contributions (Table 3).
Feature Contributions. Removing region tags causes the largest drop ( ), indicating that the hypervariable/conserved distinction is the most informative gating feature. Position contributes , while complexity features contribute (GC) and (Shannon). The “Learned gating (no bio. features)” configuration replaces the biological feature vector with a learned lookup table over 32 position bins, allowing the model to learn position-dependent gating without explicit biological annotations. It achieves 38.6%, better than no gating (36.8%) but worse than full model (41.5%), showing that biologically informed conditioning provides more than a gating regularizer.
Learned Gating Patterns. Figure 4 visualizes average gate activation across 16S positions. For each position i, we average gate value across embedding dimensions and test sequences aligned to the same reference position. Because the gate bias is initialized at with small random weights, initial activations are near 0.5 (sigmoid of zero), so deviations reflect learned position-dependent modulation. The learned profile assigns higher weights to hypervariable regions, especially V3 and V4, which are known to provide strong species-level discrimination [4]. Conserved regions receive lower gate values, consistent with their more limited usefulness for recommending cultivation conditions.
Gate Activation

Figure 4: Average gate activation across 16S rRNA sequence positions. Shaded regions indicate hypervariable regions (V1–V9); the model learns to assign higher gate values to these regions, particularly V3 and V4 which provide the finest species-level discrimination. Conserved regions receive lower weights (near the 0.5 baseline), consistent with their limited discriminative power for cultivation prediction.
Truncation Control for the RNABERT Comparison. To rule out that the gain from adding gating to RNABERT is an artifact of RNABERT's 440-token input cap, we retrain the from-scratch encoders under the same center crop (Appendix C.9). Center-cropping costs 3.4 pp of joint accuracy on the from-scratch encoders, but under matched inputs, gating still improves both the flat Transformer (+4.8 pp) and RNABERT (+4.5 pp). Thus, the gain is not driven by input length.
6 Discussion
Limitations. Our work learns correlations useful for recommendation, not biological mechanisms. Limitations include label noise in source databases, information loss from media standardization, and dataset bias toward easily cultured organisms, whereas the uncultured majority spans diverse habitats from soil to extreme environments [11]. The learned gating patterns (preference for V3/V4) align with their utility for species discrimination but reflect what the model finds useful, not causality.
Practical Workflow. Our model should not be viewed as a single-shot cultivation oracle. Its value lies in narrowing the experimental search space. A tiered workflow could use confidence-thresholded predictions (joint score >0.35: 62.8% accuracy on 41% of strains) for direct prescription and top-k screening for the remainder, meaningfully reducing the dominant cost in cultivating novel organisms [16].
Future Directions. DSNI enables research in multi-modal integration (e.g., combining 16S with genome features for the strain subset where genomes are available), uncertainty quantification for calibrated confidence under top-k screening, active learning to feed wet-lab outcomes back into the model, and transfer to other culture collections.
7 Conclusion
We introduced DSNI, a 65,023-strain 16S benchmark with phylogeny-aware splits, and a Variability-Gated Encoder whose domain-informed inductive bias complements large-scale pretraining. Beyond the headline numbers, the combined system narrows the cultivation search space by through top-k screening, providing a tangible step toward sequence-guided cultivation of the uncultured majority. The dataset, code, and trained models are available at https://anonymous.4open.science/r/3B8F.
References
[1] Manato Akiyama and Yasubumi Sakakibara. Informative RNA base embedding for RNA structural alignment and clustering by deep representation learning. NAR Genomics and Bioinformatics, 4(1):lqac012, January 2022. ISSN 2631-9268. doi: 10.1093/nargab/lqac012.
[2] Babak Alipanahi, Andrew Delong, Matthew T Weirauch, and Brendan J Frey. Predicting the sequence specificities of DNA- and RNA-binding proteins by deep learning. Nature Biotechnology, 33(8):831–838, August 2015. ISSN 1087-0156, 1546-1696. doi: 10.1038/nbt.3300.
[3] Leo Breiman. Random Forests. Machine Learning, 45(1):5–32, October 2001. ISSN 0885-6125, 1573-0565. doi: 10.1023/A:1010933404324.
[4] Soumitesh Chakravorty, Danica Helb, Michele Burday, Nancy Connell, and David Alland. A detailed analysis of 16S ribosomal RNA gene segments for the diagnosis of pathogenic bacteria. Journal of Microbiological Methods, 69(2):330–339, May 2007. ISSN 01677012. doi:10.1016/j.mimet.2007.02.005.
[5] Jiayang Chen, Zhihang Hu, Siqi Sun, Qingxiong Tan, Yixuan Wang, Qinze Yu, Licheng Zong, Liang Hong, Jin Xiao, Tao Shen, Irwin King, and Yu Li. Interpretable RNA Foundation Model from Unannotated Data for Highly Accurate RNA Structure and Function Predictions, August 2022.
[6] Tianqi Chen and Carlos Guestrin. XGBoost: A Scalable Tree Boosting System. In Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 785–794, August 2016. doi: 10.1145/2939672.2939785.
[7] James R. Cole, Qiong Wang, Jordan A. Fish, Benli Chai, Donna M. McGarrell, Yanni Sun, C. Titus Brown, Andrea Porras-Alfaro, Cheryl R. Kuske, and James M. Tiedje. Ribosomal Database Project: Data and tools for high throughput rRNA analysis. Nucleic Acids Research, 42(D1):D633–D642, January 2014. ISSN 0305-1048, 1362-4962. doi: 10.1093/nar/gkt1244.
[8] Hugo Dalla-Torre, Liam Gonzalez, Javier Mendoza-Revilla, Nicolas Lopez Carranza, Adam Henryk Grzywaczewski, Francesco Oteri, Christian Dallago, Evan Trop, Bernardo P. De Almeida, Hassan Sirelkhatim, Guillaume Richard, Marcin Skwark, Karim Beguir, Marie Lopez, and Thomas Pierrot. Nucleotide Transformer: Building and evaluating robust foundation models for human genomics. Nature Methods, 22(2):287–297, February 2025. ISSN 1548-7091, 1548-7105. doi: 10.1038/s41592-024-02523-z.
[9] Yann N. Dauphin, Angela Fan, Michael Auli, and David Grangier. Language Modeling with Gated Convolutional Networks. In Proceedings of the 34th International Conference on Machine Learning, pages 933–941. PMLR, July 2017.
[10] T. Z. DeSantis, P. Hugenholtz, N. Larsen, M. Rojas, E. L. Brodie, K. Keller, T. Huber, D. Dalevi, P. Hu, and G. L. Andersen. Greengenes, a Chimera-Checked 16S rRNA Gene Database and Workbench Compatible with ARB. Applied and Environmental Microbiology, 72(7):5069–5072, July 2006. ISSN 0099-2240, 1098-5336. doi: 10.1128/AEM.03006-05.
[11] Noah Fierer, Mya Breitbart, James Nulton, Peter Salamon, Catherine Lozupone, Ryan Jones, Michael Robeson, Robert A. Edwards, Ben Felts, Steve Rayhawk, Rob Knight, Forest Rohwer, and Robert B. Jackson. Metagenomic and Small-Subunit rRNA Analyses Reveal the
Genetic Diversity of Bacteria, Archaea, Fungi, and Viruses in Soil. Applied and Environmental Microbiology, 73(21):7059–7066, November 2007. ISSN 0099-2240, 1098-5336. doi:10.1128/AEM.00358-07.
[12] Marta Goberna and Miguel Verdú. Predicting microbial traits with phylogenies. The ISME Journal, 10(4):959–967, April 2016. ISSN 1751-7362, 1751-7370. doi: 10.1038/ismej.2015.171.
[13] J. Michael Janda and Sharon L. Abbott. 16S rRNA Gene Sequencing for Bacterial Identification in the Diagnostic Laboratory: Pluses, Perils, and Pitfalls. Journal of Clinical Microbiology, 45(9):2761–2764, September 2007. ISSN 0095-1137, 1098-660X. doi: 10.1128/JCM.01228-07.
[14] Yanrong Ji, Zhihan Zhou, Han Liu, and Ramana V Davuluri. DNABERT: Pre-trained Bidirectional Encoder Representations from Transformers model for DNA-language in genome. Bioinformatics, 37(15):2112–2120, August 2021. ISSN 1367-4803, 1367-4811. doi:10.1093/bioinformatics/btab083.
[15] Jethro S. Johnson, Daniel J. Spakowicz, Bo-Young Hong, Lauren M. Petersen, Patrick Demkowicz, Lei Chen, Shana R. Leopold, Blake M. Hanson, Hanako O. Agresta, Mark Gerstein, Erica Sodergren, and George M. Weinstock. Evaluation of 16S rRNA gene sequencing for species and strain-level microbiome analysis. Nature Communications, 10(1):5029, November 2019. ISSN 2041-1723. doi: 10.1038/s41467-019-13036-1.
[16] Jean-Christophe Lagier, Grégory Dubourg, Matthieu Million, Frédéric Cadoret, Melhem Bilen, Florence Fenollar, Anthony Levasseur, Jean-Marc Rolain, Pierre-Edouard Fournier, and Didier Raoult. Culturing the human microbiota and culturomics. Nature Reviews Microbiology, 16(9):540–550, September 2018. ISSN 1740-1526, 1740-1534. doi: 10.1038/s41579-018-0041-0.
[17] Morgan G I Langille, Jesse Zaneveld, J Gregory Caporaso, Daniel McDonald, Dan Knights, Joshua A Reyes, Jose C Clemente, Deron E Burkepile, Rebecca L Vega Thurber, Rob Knight, Robert G Beiko, and Curtis Huttenhower. Predictive functional profiling of microbial communities using 16S rRNA marker gene sequences. Nature Biotechnology, 31(9):814–821, September 2013. ISSN 1087-0156, 1546-1696. doi: 10.1038/nbt.2676.
[18] Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, November 1998. ISSN 00189219. doi: 10.1109/5.726791.
[19] William H. Lewis, Guillaume Tahon, Patricia Geesink, Diana Z. Sousa, and Thijs J. G. Ettema. Innovations to culturing the uncultured microbial majority. Nature Reviews Microbiology, 19(4):225–240, April 2021. ISSN 1740-1526, 1740-1534. doi: 10.1038/s41579-020-00458-8.
[20] Jennifer B. H. Martiny, Stuart E. Jones, Jay T. Lennon, and Adam C. Martiny. Microbiomes in light of traits: A phylogenetic perspective. Science, 350(6261):aac9323, November 2015. ISSN 0036-8075, 1095-9203. doi: 10.1126/science.aac9323.
[21] Eric Nguyen, Michael Poli, Marjan Faizi, Armin Thomas, Callum Birch-Sykes, Michael Wornow, Aman Patel, Clayton Rabideau, Stefano Massaroli, Yoshua Bengio, Stefano Ermon, Stephen A. Baccus, and Chris Ré. HyenaDNA: Long-Range Genomic Sequence Modeling at Single Nucleotide Resolution. ArXiv, page arXiv:2306.15794v2, November 2023. ISSN 2331-8422.
[22] Matthew A. Oberhardt, Raphy Zarecki, Sabine Gronow, Elke Lang, Hans-Peter Klenk, Uri Gophna, and Eytan Ruppin. Harnessing the landscape of microbial culture media to predict new organism–media pairings. Nature Communications, 6(1):8493, October 2015. ISSN 2041-1723. doi: 10.1038/ncomms9493.
[23] Christian Quast, Elmar Pruesse, Pelin Yilmaz, Jan Gerken, Timmy Schweer, Pablo Yarza, Jörg Peplies, and Frank Oliver Glöckner. The SILVA ribosomal RNA gene database project: Improved data processing and web-based tools. Nucleic Acids Research, 41(D1):D590–D596, November 2012. ISSN 0305-1048, 1362-4962. doi: 10.1093/nar/gks1219.
[24] Michael S. Rappé and Stephen J. Giovannoni. The Uncultured Microbial Majority. Annual Review of Microbiology, 57(1):369–394, October 2003. ISSN 0066-4227, 1545-3251. doi:10.1146/annurev.micro.57.030502.090759.
[25] Lorenz Christian Reimer, Joaquim Sardà Carbasse, Julia Koblitz, Christian Ebeling, Adam Podstawka, and Jörg Overmann. Bac Dive in 2022: The knowledge base for standardized bacterial and archaeal data. Nucleic Acids Research, 50(D1):D741–D746, January 2022. ISSN 0305-1048, 1362-4962. doi: 10.1093/nar/gkab961.
[26] David B Sauer and Da-Neng Wang. Predicting the optimal growth temperatures of prokaryotes using only genome derived features. Bioinformatics, 35(18):3224–3231, September 2019. ISSN 1367-4803, 1367-4811. doi: 10.1093/bioinformatics/btz059.
[27] Eric W Sayers, Jeffrey Beck, Evan E Bolton, J Rodney Brister, Jessica Chan, Ryan Connor, Michael Feldgarden, Anna M Fine, Kathryn Funk, Jinna Hoffman, Sivakumar Kannan, Christopher Kelly, William Klimke, Sunghwan Kim, Stacy Lathrop, Aron Marchler-Bauer, Terence D Murphy, Chris O'Sullivan, Erin Schmieder, Yuriy Skripchenko, Adam Stine, Francoise Thibaud-Nissen, Jiyao Wang, Jian Ye, Erin Zellers, Valerie A Schneider, and Kim D Pruitt. Database resources of the National Center for Biotechnology Information in 2025. Nucleic Acids Research, 53(D1):D20–D29, January 2025. ISSN 0305-1048, 1362-4962. doi:10.1093/nar/gkae979.
[28] Isabel Schober, Julia Koblitz, Joaquim Sardà Carbasse, Christian Ebeling, Marvin Leon Schmidt, Adam Podstawka, Rohit Gupta, Vinodh Ilangovan, Javad Chamanara, Jörg Overmann, and Lorenz Christian Reimer. Bac Dive in 2025: The core database for prokaryotic strain data. Nucleic Acids Research, 53(D1):D748–D756, January 2025. ISSN 0305-1048, 1362-4962. doi:10.1093/nar/gkae959.
[29] Rupesh Kumar Srivastava, Klaus Greff, and Jürgen Schmidhuber. Highway Networks, November 2015.
[30] James T. Staley and Allan Konopka. MEASUREMENT OF IN SITU ACTIVITIES OF NON-PHOTOSYNTHETIC MICROORGANISMS IN AQUATIC AND TERRESTRIAL HABITATS. Annual Review of Microbiology, 39(1):321–346, October 1985. ISSN 0066-4227, 1545-3251. doi: 10.1146/annurev.mi.39.100185.001541.
[31] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is All you Need. In Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
[32] J. L. Weissman, Shengwei Hou, and Jed A. Fuhrman. Estimating maximal microbial growth rates from cultures, metagenomes, and single cells via codon usage patterns. Proceedings of the National Academy of Sciences, 118(12):e2016810118, March 2021. ISSN 0027-8424, 1091-6490. doi: 10.1073/pnas.2016810118.
[33] Carl R. Woese and George E. Fox. Phylogenetic structure of the prokaryotic domain: The primary kingdoms. Proceedings of the National Academy of Sciences, 74(11):5088–5090, November 1977. ISSN 0027-8424, 1091-6490. doi: 10.1073/pnas.74.11.5088.
[34] Pablo Yarza, Pelin Yilmaz, Elmar Pruesse, Frank Oliver Glöckner, Wolfgang Ludwig, Karl-Heinz Schleifer, William B. Whitman, Jean Euzéby, Rudolf Amann, and Ramon Rosselló-Móra. Uniting the classification of cultured and uncultured bacteria and archaea using 16S rRNA gene sequences. Nature Reviews Microbiology, 12(9):635–645, September 2014. ISSN 1740-1526, 1740-1534. doi: 10.1038/nrmicro3330.
[35] Weijie Yin, Zhaoyu Zhang, Shuo Zhang, Liang He, Ruiyang Zhang, Rui Jiang, Gan Liu, Jingyi Wang, Xuegong Zhang, Tao Qin, and Zhen Xie. ERNIE-RNA: An RNA language model with structure-enhanced representations. Nature Communications, 16(1):10076, November 2025. ISSN 2041-1723. doi: 10.1038/s41467-025-64972-0.
A Additional Dataset Details
A.1 Database Schema
The DSNI database comprises six interconnected tables, illustrated in Figure 5.

Figure 5: Entity-relationship diagram of the DSNI database schema. The central STRAINS table contains 16S rRNA sequences and cultivation conditions, linked to MEDIA through a many-to-many relationship. Media compositions are decomposed into SOLUTIONS and INGREDIENTS, while preparation protocols are captured in STEPS. Atmospheric requirements are stored in the GAS table.
• STRAINS: Core table containing strain identifiers, taxonomic information (genus, species), 16S rRNA sequences, and links to cultivation conditions. This is the primary table from which we derive our dataset.
• MEDIA: Defined growth media with unique identifiers and standardized names. We normalize media names across sources to create 42 canonical categories.
• SOLUTIONS: Component solutions used in media preparation (e.g., trace element solutions, vitamin mixtures).
• INGREDIENTS: Individual chemical compounds with concentrations and units, enabling fine-grained media composition analysis.
• STEPS: Preparation instructions for complex media, preserving protocol details for reproducibility.
• GAS: Atmospheric requirements (oxygen levels, supplementation), from which we derive the four oxygen requirement categories.
Table 4 provides detailed field descriptions for key tables.
A.2 Comparison with Prior Cultivation-Prediction Resources
Table 5 situates DSNI against the two closest publicly accessible resources for cultivation prediction. KOMODO [22] provides organism-media pairings under random splits but covers media only; MediaDB is a curated catalog of media compositions without train/test infrastructure. DSNI is roughly the size of KOMODO, is the first such resource to pair sequences with all four primary cultivation conditions under a single standardized labeling scheme, and is the first to provide phylogeny-aware splits.
Table 4: Key fields in the DSNI database schema.
| Table | Field | Description |
|---|---|---|
| STRAINS | strain_id | Unique identifier (DSM/BEI number) |
| genus | Taxonomic genus assignment | |
| species | Species epithet | |
| sequence_16s | Full or partial 16S rRNA sequence | |
| opt_temp | Optimal growth temperature (°C) | |
| opt_ph | Optimal growth pH | |
| oxygen_req | Oxygen requirement category | |
| MEDIA | media_id | Unique media identifier |
| media_name | Standardized media name | |
| category | One of 42 normalized categories | |
| GAS | atmosphere | Atmospheric composition description |
| o2_percent | Oxygen percentage (0–21%) | |
| co2_percent | percentage if supplemented |
Table 5: Cultivation-prediction benchmarks. DSNI is the largest resource and the only one to provide genus-aware splits and standardized labels for all four primary conditions.
| Resource | Organisms | Labels | Split strategy |
|---|---|---|---|
| KOMODO [22] | ~18K pairs | Media only | Random |
| MediaDB | ~800 orgs. | Media composition | None (catalog) |
| DSNI (ours) | 65,023 strains | 4 conditions | Genus-aware |
A.3 Choice of 16S as Input
Our choice of 16S rRNA as the model input is driven by accessibility rather than a claim of informational superiority over genome-scale features. As of early 2026, NCBI hosts more than 2.5 million 16S rRNA gene records for bacterial taxa, whereas RefSeq contains roughly 450K complete prokaryotic genome assemblies ( 18% coverage). For uncultured organisms detected via environmental metagenomics, 16S amplicon sequences are often the only molecular data available. Among the 8.2K DSNI strains for which we could locate matching genome assemblies, genome-feature classifiers in the style of Sauer and Wang [26] achieve only marginally higher temperature accuracy (+2.1 pp) yet are inapplicable to the remaining 86% of strains. We therefore position DSNI as a foundation benchmark whose 16S input maximizes coverage, while leaving genome-augmented multi-modal extensions to future work.
ML-based recommendation also fills a complementary niche relative to existing wet-lab cultivation strategies (Table 6): traditional trial-and-error scales poorly with the diversity of the uncultured majority, culturomics requires expensive multi-condition screening campaigns, and dilution-to-extinction targets only a narrow physiological regime. A 16S-conditioned recommender provides instant, organism-agnostic ranked shortlists that complement these approaches by reducing their search space rather than replacing them.
Table 6: Wet-lab cultivation methods vs. DSNI-based ML recommendation. ML provides instant, organism-agnostic ranked shortlists that complement rather than replace wet-lab methods.
| Method | Input | Throughput | Coverage | Limitation |
|---|---|---|---|---|
| Trial-and-error | Isolate | 50–200 cond./org. | Single organism | Slow, expensive |
| Culturomics [16] | Fecal/env. sample | ~200 cond./run | Broad, untargeted | 5–30% success |
| Dilution-to-extinction | Liquid sample | Low | Specialized | Low-nutrient only |
| DSNI (ML) | 16S only | Instant | Any 16S-tagged org. | Needs validation |
A.4 Quality Control and Deduplication Pipeline
We retained sequences between 500 and 1,500 bp, capturing partial and near-full-length 16S amplicons while excluding short fragments and potential chimeras. We also removed sequences with ambiguous bases, eliminated exact duplicates, and aligned them to the SILVA reference [23] to verify gene identity. To prevent data leakage, we clustered sequences at identity, the standard OTU threshold for species-level grouping [34]. Within each cluster, we retained the entry with the most complete metadata across media, temperature, pH, and oxygen, breaking ties in favor of DSMZ records.
B Implementation Details
B.1 Hyperparameters
Table 7 summarizes the hyperparameters used for all models in our experiments.
Table 7: Hyperparameters for all models. Values were selected via grid search on the validation set.
| Hyperparameter | Transformer | RNABERT |
|---|---|---|
| Hidden dimension | 256 | 768 (fixed) |
| Number of layers | 6 | 12 (fixed) |
| Attention heads | 8 | 12 (fixed) |
| Feed-forward dim | 1024 | 3072 (fixed) |
| Dropout | 0.1 | 0.1 |
| Gating Layer | ||
| Gate input dim | 4 | 4 |
| Complexity window | 21 | 21 |
| Gate dropout | 0.05 | 0.05 |
| Training | ||
| Learning rate | ||
| Weight decay | 0.01 | 0.01 |
| Batch size | 32 | 16 |
| Epochs | 100 | 50 |
| Warmup ratio | 0.1 | 0.1 |
| Loss Weights | ||
| Media | 1.0 | 1.0 |
| Temperature | 0.5 | 0.5 |
| pH | 0.5 | 0.5 |
| Oxygen | 0.75 | 0.75 |
B.2 Training Schedule
All models use AdamW with linear warmup over the first 10% of steps. Learning rates are for scratch models and for RNABERT fine-tuning; weight decay is 0.01 throughout. Batch size is 32 (16 for RNABERT due to memory). Models trained from scratch use 100 epochs and RNABERT fine-tuning uses 50 epochs due to faster convergence. We select the checkpoint with best validation joint accuracy and report mean over 5 seeds.
B.3 Computational Resources
Training is performed on NVIDIA A100 GPUs. The gated Transformer trains in approximately 8 hours; the flat Transformer baseline requires 7 hours. RNABERT fine-tuning takes approximately 12 hours due to the larger model size. Traditional ML baselines (RF, XGBoost) train in under 30 minutes on CPU.
B.4 Traditional ML Baselines
For -mer features, we extract frequency vectors for , yielding dimensional feature vectors. We apply L2 normalization to account for varying sequence lengths.
Random Forest: 500 trees, max depth 30, min samples per leaf 5, class-weighted for imbalance.
XGBoost: 500 boosting rounds, max depth 8, learning rate 0.1, subsample 0.8, colsample by tree 0.8.
B.5 Gating Mechanism Design Choices
Multiplicative gating vs. alternatives. The gate computes position-wise importance before attention by element-wise scaling of the embedding . We considered two alternatives that condition on the same biological feature vector (region tag, position, GC, entropy):
-
Concatenation: append to the input embedding . This adds capacity but does not modulate existing representations, leaving attention to discover any position-dependent emphasis from data.
-
Attention bias: add a learned bias to the attention logits. This modulates pairwise interaction scores but cannot suppress a position's embedding before that interaction occurs.
Multiplicative gating uniquely combines (i) explicit position-wise suppression/amplification, (ii) integration of the bias prior to attention so that all downstream layers operate on the modulated representation, and (iii) low capacity (1,280 parameters) that forces the module to leverage the supplied features rather than memorize position-conditional patterns. The ablation in Table 3 provides a controlled probe: “Learned gating (no bio. features)” replaces with a learned 32-bin position embedding while retaining the multiplicative form. It scores 38.6% vs. 41.5% for the full model and 36.8% for no gating, showing that the multiplicative mechanism alone contributes 1.8 pp of regularization but the bulk of the gain (+2.9 pp) comes from the biological conditioning features.
Independent heads vs. structured decoder. Although cultivation conditions are interdependent (e.g., thermophilic organisms prefer specialized media), our four task-specific heads are conditionally independent given the shared [CLS] representation. To verify that this design does not discard usable structure, we estimate the empirical mutual information (MI) between every pair of labels on the training split (Table 8). Pairwise MI is at most 0.34 bits, corresponding to of the entropy of the source label. Inter-task structure is therefore moderate. We choose independent heads for two reasons: (i) isolability—per-task accuracy and ablation deltas can be cleanly attributed to the shared encoder rather than to a structured decoder confound; (ii) label-noise resilience—given the heterogeneous, partly hand-curated source metadata, cascading dependencies through a structured decoder risk amplifying label noise on rare classes (psychrophiles, alkaliphiles, microaerophiles).
Table 8: Empirical mutual information MI(A; B) between cultivation-condition label pairs on the training split. MI/H(A) measures how much of A's entropy is explained by B.
| MI(A; B) | |||
|---|---|---|---|
| Media Temperature | 4.61 | 4.38 | 0.23 |
| Media Oxygen | 4.61 | 4.27 | 0.34 |
| Temperature pH | 0.61 | 0.57 | 0.04 |
C Additional Experiments
C.1 Per-Class Performance
Table 9 reports F1 scores broken down by class for the temperature and pH prediction tasks, highlighting performance on minority classes. Gating delivers its largest gains on rare classes: psychrophiles improve by +6.4 F1, thermophiles by +6.8, acidophiles by +7.6, and alkaliphiles by +7.6 (all relative to the flat Transformer), confirming that the inductive bias is most useful exactly where data-driven discovery is unreliable.
Table 10 drills further into the media task, where the long tail dominates difficulty. Per-class F1 for RNABERT+Gating drops by roughly an order of magnitude between the most common categories () and the long-tail rare media (), explaining why media is the bottleneck of joint accuracy despite competitive top-1 numbers on the other three tasks.
C.2 Macro-F1 Results
Table 11 reports macro-averaged F1 scores across all methods, complementing the accuracy metrics in the main text.
Table 9: Per-class F1 scores for temperature and pH prediction. Transformer+Gating model shows improved performance on minority classes (psychrophile, thermophile, acidophile, alkaliphile).
| Media category | Flat Trans. | +Gating | RNABERT+Gating |
|---|---|---|---|
| Temperature | |||
| Psychrophile (6%) | 52.3 | 58.7 | 61.2 |
| Mesophile (89%) | 94.2 | 95.1 | 95.8 |
| Thermophile (5%) | 48.6 | 55.4 | 58.9 |
| pH | |||
| Acidophile (4%) | 45.2 | 52.8 | 56.3 |
| Neutrophile (91%) | 95.8 | 96.4 | 97.1 |
| Alkaliphile (5%) | 41.7 | 49.3 | 53.6 |
Table 10: Per-class F1 scores for the media task (RNABERT+Gating), illustrating the long-tail collapse. Sample counts are training-set frequencies.
| Media category | # samples | F1 |
|---|---|---|
| TSA (most common) | 8,247 | 68.4 |
| BHI | 5,182 | 61.7 |
| Nutrient Agar | 4,891 | 59.3 |
| Marine Agar | 3,256 | 52.8 |
| Acidic mineral (tail) | 47 | 12.3 |
| Methanogen medium (tail) | 31 | 8.7 |
Table 11: Macro-F1 scores on the DSNI test set. Macro-averaging weights all classes equally, emphasizing performance on rare classes.
| Method | Media | Temp. | pH | |
|---|---|---|---|---|
| -mer + RF | 28.4 | 62.3 | 58.7 | 54.2 |
| -mer + XGBoost | 31.2 | 65.1 | 61.4 | 57.8 |
| CNN Encoder | 34.6 | 67.8 | 63.2 | 60.4 |
| Transformer (Flat) | 38.2 | 71.5 | 66.8 | 64.1 |
| Transformer + Gating | 43.7 | 76.2 | 72.4 | 69.8 |
| RNABERT | 41.8 | 74.6 | 70.9 | 68.2 |
| RNABERT + Gating | 46.2 | 78.4 | 75.1 | 72.5 |
The gating mechanism provides consistent improvements in macro-F1 (+5.5% on average over flat Transformer), with the largest gains on media prediction where class imbalance is most severe.
C.3 Generalization vs. Phylogenetic Distance
Table 12 reports joint accuracy stratified by 16S identity to the nearest training-set genus. RNABERT+Gating's advantage over GROWREC widens with phylogenetic distance, evidence the encoder learns sequence-level signals beyond nearest-neighbor matching.
Table 12: Joint accuracy stratified by 16S identity to the nearest training-set genus. RNABERT+Gating outperforms the phylogenetic-matching baseline GROWREC by an increasing margin at greater phylogenetic distances.
| Distance to nearest training genus | RNABERT+Gating | GROWREC | ||
|---|---|---|---|---|
| Close (>90% 16S identity) | 3,180 | 52.1% | 38.4% | +13.7 pp |
| Medium (80–90%) | 4,130 | 43.8% | 27.6% | +16.2 pp |
| Distant (<80%) | 2,443 | 33.1% | 16.3% | +16.8 pp |
C.4 Functional-Equivalence Audit of Media Errors
Top-1 media accuracy underestimates utility because many “incorrect” media are functionally interchangeable. A manual audit of 200 top-1 media errors finds that 58% are between functionally related formulations: 31% are functionally equivalent (e.g., TSA vs. Trypticase Soy), and 27% are within the same media superclass. The exact-match metric therefore systematically underestimates the practical recommendation quality of the model.
C.5 Joint Accuracy Breakdown
Table 13 reports the distribution of correctly predicted conditions for RNABERT+Gating on the DSNI test set. Although exact 4-of-4 matches occur on 44.2% of strains, 76.3% of strains receive at least 3-of-4 conditions correct, so a typical experimentalist need only adjust at most one condition relative to the model's top-1 protocol.
Table 13: Distribution of correctly predicted conditions for RNABERT+Gating on the DSNI test set.
| # conditions correct | % of test strains | Cumulative |
|---|---|---|
| 4/4 (exact match) | 44.2% | 44.2% |
| 3/4 | 32.1% | 76.3% |
| 2/4 | 16.8% | 93.1% |
| ≤1/4 | 6.9% | 100% |
Table 14 further reports per-task top- accuracies for RNABERT+Gating, supporting the tiered top- workflow described in Section 6. Even on the long-tail media task, the correct medium falls within the top 5 predictions for 82% of strains; for temperature and pH, top-2 already covers more than 98% of strains.
Table 14: Per-task top- accuracy for RNABERT+Gating. “—” indicates that exceeds the number of classes for that task.
| Task | Classes | Top-1 | Top-2 | Top-3 | Top-5 |
|---|---|---|---|---|---|
| Media | 42 | 54.8% | 66.3% | 74.8% | 82.1% |
| Temperature | 3 | 92.1% | 98.4% | — | — |
| pH | 3 | 93.5% | 98.8% | — | — |
| Oxygen | 4 | 82.7% | 93.2% | 97.1% | — |
C.6 Phylogenetic Leakage Quantification
Table 15 reports joint accuracy under random vs. genus-aware splits across three encoder families.
Table 15: Effect of split strategy on joint accuracy. Random splits inflate apparent predictability by ~20 pp across encoders.
| Split strategy | Flat Trans. | Trans.+Gating | RNABERT+Gating |
|---|---|---|---|
| Random split | 58.2% | 61.7% | 64.3% |
| Genus-aware (ours) | 36.8% | 41.5% | 44.2% |
| Inflation | +21.4 pp | +20.2 pp | +20.1 pp |
C.7 Statistical Significance Details
Table 16 reports paired bootstrap confidence intervals and McNemar's test for the three key gating-induced comparisons. CIs are computed over 10,000 resamples of the test set; McNemar's test is performed on prediction-level outcomes pooled across 5 seeds.
Table 16: Statistical significance of the gating-induced improvements in joint accuracy.
| Comparison | Δ Joint Acc. | 95% Bootstrap CI | McNemar |
|---|---|---|---|
| Transformer+Gating vs. Flat Transformer | +4.7% | < 0.001 | |
| RNABERT+Gating vs. RNABERT | +4.5% | < 0.001 | |
| RNABERT+Gating vs. Flat Transformer | +7.4% | < 0.001 |
C.8 Confusion Analysis
Common prediction errors reveal biologically interpretable patterns:
- Media: Errors often occur between related media (e.g., TSA vs. Nutrient Agar), suggesting the model captures functional similarity.
- Temperature: Psychrophile–mesophile boundary (20°C) causes most confusion, as organisms near this threshold may grow in both ranges.
- Oxygen: Facultative anaerobes are most often confused with obligate aerobes, reflecting the metabolic flexibility of these organisms.
C.9 RNABERT Truncation Control
RNABERT is restricted to a 440-token input window, while the average DSNI sequence is bp. To rule out that the gating gain on top of RNABERT is an artifact of input length, we apply the same 440-token center crop to the from-scratch encoders and re-train (Table 17). Three observations follow: (i) center-cropping costs the from-scratch encoders pp of joint accuracy, confirming that distal positions carry useful signal; (ii) under matched 440-token inputs, gating still improves the flat Transformer (+4.8 pp) and RNABERT (+4.5 pp) by comparable margins, so the gating gain is not a length artifact; (iii) RNABERT's pretraining partially compensates for the truncation, recovering above the full-length flat Transformer despite seeing less of the average sequence.
Table 17: RNABERT truncation control: joint accuracy under matched 440-token center cropping. Gating gains are preserved under matched inputs.
| Method | Full length | 440-token crop | (crop) |
|---|---|---|---|
| Flat Transformer | 36.8% | 33.4% | -3.4 pp |
| Transformer+Gating | 41.5% | 38.2% | -3.3 pp |
| RNABERT (fixed 440) | — | 39.7% | — |
| RNABERT+Gating (fixed 440) | — | 44.2% | — |