Skip to main content
Computational and Structural Biotechnology Journal logoLink to Computational and Structural Biotechnology Journal
. 2025 Oct 14;27:5194–5206. doi: 10.1016/j.csbj.2025.10.014

Explainable rule-based prediction of cultivation media for microbes

Petr Máša a, Tomáš Kliegr a, Marcin P Joachimiak b,
PMCID: PMC12670597  PMID: 41340887

Graphical Abstract

graphic file with name ga1.jpg

Keywords: Microbial informatics, Rule-based classifier, Explainable methods, Feature importance, Large language models, Culturomics

Abstract

Knowledge of microbial growth preferences remains dispersed—often confined to research articles or human experts—making new experiment design heavily reliant on manual expertise and literature searches. While previous computational efforts have explored media prediction through phylogenetic similarity or leveraged genomic data for trait modeling, they often produce predictions whose underlying biological rationale is not transparent or rely on biased features (e.g., incomplete genome annotations). To address this need for greater interpretability, we used the recently introduced KG-Microbe knowledge graph, a harmonized resource of microbial organismal traits and other properties, to explain growth media preferences. We employed explainable methods by developing a simple, rule-based classifier from these traits and compared its performance and interpretative power to that of a high-performing black-box model. While the black-box model showed slightly higher overall predictive performance, the transparency of the rule-based system and its ability to generate verifiable, biologically plausible rules make it a more sustainable and insightful framework. To explore feature importance, we applied SHAP to the black-box model and compared the results with a rule-based feature-importance method. Finally, leveraging the resulting rule set—together with insights from a large language model (LLM) and domain expertise—we propose strategies to advance microbial research.

Code, models, and results are available at https://github.com/culturebotai/microbe-rules.

1. Introduction

Identifying microbial growth preferences is important for experimental characterization and model-organism development, and it supports downstream applications such as biomanufacturing and infectious-disease mitigation. Currently, knowledge about microbes is scattered and unstandardized, and much of it still exists only as human expert knowledge. Furthermore, when designing experiments to collect new data such as testing laboratory growth conditions for new environmental isolates, there is a shortage of structured and standardized information. As a result, this type of work often requires manual literature searches and reading along with expert guidance. Using recently standardized microbial knowledge, we trained both explainable and black-box machine-learning models to predict preferences for two of the most widely used growth media. We based this work on the KG-Microbe knowledge graph (KG), which harmonizes microbial complex and genomic traits in a unified data resource. This KG provides both training data and target-class pairings, allowing us to train different models within a single, unified data context. Our approach yielded explainable models, and the biological insights we gained inform the context and associated knowledge about these microbes and the relationships between their complex traits and growth preferences. We also compare the trade-off between model explainability and performance. For post-hoc explanations, we use two different feature-importance methods, and their comparison reveals an agreement with subject-matter experts despite methodological differences. We provide key insights into understanding relationships between growth medium preference and properties of microbial organisms. This work increases the available knowledge for microbes and facilitates the design and execution of microbial growth experiments.

1.1. Prior work and limitations

Predicting optimal cultivation conditions for diverse microbes remains a significant hurdle, with current knowledge often fragmented or embedded in complex models. While earlier work by Oberhardt et al. (2015) introduced GROWREC, a system predicting organism-media pairings based on phylogenetic similarity with a reported 74 %–83 % accuracy for new in vitro experiments [1], relying solely on phylogeny can be limiting. Phylogenetic approaches may not fully explain the specific biological traits driving media preferences beyond general relatedness and can face challenges in fair model training and taxonomic ambiguities [1].

More recent approaches have leveraged genomic information. For instance, Li et al. (2023) demonstrated that statistical models using gene content (KEGG Orthologs) can predict carbon utilization, outperforming constraint-based models, particularly when employing biochemically-informed feature selection or large datasets to overcome phylogenetic distance limitations [2]. Barnum et al. (2024) focused on predicting physicochemical conditions (oxygen, temperature, salinity, pH) using annotation-free genome features like amino acid frequencies, thereby reducing reliance on functional gene annotations and improving robustness for novel taxa [3]. Koblitz et al. (2024) also utilized machine learning with protein family (Pfam) inventories from high-quality BacDive datasets to predict various physiological properties, contributing significantly to available data [4]. While these genome-centric methods are powerful, the use of features derived from genome annotations can be susceptible to biases from extant functional classifications or errors or gaps in gene prediction and annotation, potentially complicating the interpretation of direct causal links to media preferences. Furthermore, these models, while often highly accurate, may not always yield readily interpretable rules that explain why specific media are suitable based on an organism’s traits.

Separately, Herbst et al. (2024) introduced Multi-Attribute Subset Selection (MASS), a method using mixed integer linear programming to identify the most informative experimental conditions for predicting other phenotypes within a given dataset, such as determining which carbon source fermentation patterns best predict other phenotypes [5]. This approach is valuable for optimizing experimental design but does not focus on de novo prediction of specific cultivation media for uncharacterized microbes based on their organismal traits in an explainable, rule-based manner.

While this section focuses on works most directly contextualizing our approach, a broader survey of various computational methods for microbial growth and phenotype prediction, detailing their diverse inputs, features, and methodologies, is provided in Appendix Table B.13. More recently, methods have been developed to predict chemical concentrations and media composition [6], [7]. However, these advances usually apply to a small group of organisms—or even a single species (e.g., often E. coli)—and thus have limited taxonomic range (see Table B.13). We emphasize the distinction between methods that attempt to predict a quantitative value like growth rates [8], [9], [10], [11] versus methods that predict categorical media or other growth preferences. However, training data for quantitative models are currently very limited, and it is unclear how data from different sources can be combined effectively. Here, we therefore use the largest available dataset for bacterial media preferences.

1.2. Interpretability in microbial growth prediction: explainable rules vs. post-hoc explanations

Machine learning encompasses a spectrum of methods, ranging from those that are inherently interpretable by design to complex “black-box” models [12], [13]. Interpretable models, such as those based on association rules or decision trees [14], provide predictions based on transparent patterns, allowing for the analysis of feature relationships and their impact on outcomes. This transparency is particularly valuable in scientific domains like microbial cultivation, where understanding the underlying biological drivers of phenomena such as media preference is a primary goal.

Conversely, black-box models, while often achieving high predictive accuracy on complex datasets, operate with internal mechanisms that are not readily understandable by humans. Their opacity necessitates the use of post-hoc explanation techniques to gain insights into their decision-making processes [13]. Among these, the SHAP (SHapley Additive exPlanations) method has become a widely adopted approach for estimating feature importance by assessing the contribution of each feature to the model’s predictions [15].

However, the reliance on post-hoc explanations for black-box models in some decision-making contexts, such as scientific discovery, has been questioned. Arguments have been made for prioritizing inherently interpretable models, especially when the stakes are high and true understanding is important [16]. Motivated by this ongoing discussion, our work explores both paradigms.

The two most widely used machine learning methods with intrinsic explainability are decision trees and decision rules. We employ decision rules as the white-box model in our work. Decision rules offer superior interpretability compared to decision trees such as C4.5 [17] as their structure is more concise and avoids the repetition of conditions common in tree-based models. For this reason, we use decision rules to represent white-box models. Conversely, ensembles of decision trees rank among the top-performing classifiers [18] and are thus chosen to represent black-box methods. Although individual trees within the ensemble are interpretable, the ensemble as a whole lacks transparency.

We develop an interpretable rule-based classifier for microbial media prediction and compare its performance and the insights it offers against a state-of-the-art black-box ensemble decision tree model (CatBoost) accompanied by SHAP-based feature importance.

For our rule-based approach, we quantify feature importance using Association Rule Analysis (ARA) values, a method that directly assesses the strength and direction of the association between a feature (literal ψ) and an outcome (media preference ϕ) within a given rule ψϕ. The ARA method is based on lift, a common measure of rule interestingness that quantifies how the probability of a rule’s consequent (outcome) increases given the presence of its antecedent (condition). The ARA value is defined as:

ARA(ψ)={P(ϕ|ψ)P(ϕ)if P(ϕ|ψ)P(ϕ)1,P(ϕ)P(ϕ|ψ)otherwise. (1)

An ARA value greater than 1 corresponds to the lift measure, indicating a positive relationship; for instance, +3.6 signifies that the presence of feature ψ means the probability of outcome ϕ is 3.6 times higher. Conversely, an ARA value less than 1 (e.g., −5.0, where the original ratio P(ϕ)P(ϕ|ψ) was 5.0) indicates that ψ decreases the probability of ϕ by a factor of 5.0. These ARA values are computed directly from the training dataset, providing a transparent measure of feature importance within the context of the data itself [19]. This allows for a direct comparison with feature importances derived from SHAP for the black-box model, enabling a deeper evaluation of different interpretability strategies in our study.

1.3. Scope of this study

While prior research has explored quantitative predictions of microbial growth, a significant gap persists in understanding the underlying biological rationale that determines why certain microbes prefer specific cultivation media. This study directly addresses this gap by focusing on deriving explainable biological insights. To this end, we leverage the recently introduced KG-Microbe knowledge graph, a comprehensive resource that harmonizes a wide array of standardized organismal traits and other microbial properties [20]. This structured dataset provides a unique opportunity to move beyond correlation-based predictions toward a more mechanistic understanding.

Despite advances in related work discussed in Section 1.1, a gap remains in the availability of transparent, rule-based models that can predict media preferences by leveraging a broad spectrum of harmonized organismal traits beyond direct genomic features or phylogeny alone. There is a specific need for systems that not only predict suitable media but also provide clear, human-understandable explanations for these predictions, linking specific microbial characteristics to media requirements. This work aims to address this gap by utilizing the KG-Microbe knowledge graph, which integrates diverse organismal traits [20], to develop an explainable rule-based classifier for media prediction, thereby enhancing our understanding of the underlying biological principles.

2. Methodology

Our investigation centers on two of the most frequently represented media within KG-Microbe, which include common and some complex media ingredients: DSMZ GYM Streptomyces (Medium 65) and DSMZ Marine Broth (Medium 514), as detailed in Table 1 and their key components in Table 2.

Table 1.

Description of frequently used media (Medium 65 and Medium 514).

Medium id Medium name General description Reference
65 DSMZ GYM Streptomyces General purpose medium for cultivation of Streptomyces and related actinobacteria. DSMZ Medium 65
514 DSMZ Marine Broth Nutrient-rich medium designed for the cultivation of heterotrophic marine bacteria. DSMZ Medium 514

Table 2.

Key components of media 65 (DSMZ GYM Streptomyces) and 514 (DSMZ marine broth).

Medium 65 (DSMZ GYM Streptomyces)
Compound Amount
Glucose 4.00 g
Yeast extract 4.00 g
Malt extract 10.00 g
CaCO3 (if req.) 2.00 g
Agar 20.00 g
Distilled water 1000.00 mL

Medium 514 (DSMZ marine broth)
Compound Amount

Bacto peptone 5.00 g
Yeast extract (Bacto) 1.00 g
Fe(III) citrate 0.10 g
NaCl 19.45 g
MgCl2 (anhydrous) 5.90 g
Na2SO4 3.24 g
CaCl2 1.80 g
KCl 0.55 g
NaHCO3 0.16 g
KBr 0.08 g
SrCl2 34.00 mg
H3BO3 22.00 mg
Na-silicate 4.00 mg
NaF 2.40 mg
(NH4)NO3 1.60 mg
Na2HPO4 8.00 mg
Distilled water 1000.00 mL

This focus on well-characterized media with a substantial number of associated taxa (each having over 2000 training examples) is important for building reliable and interpretable models. To ensure better explainability, particularly for our rule-based approach, we frame the prediction task as a binary classification for each medium. We acknowledge that the broader taxa-media landscape is characterized by high imbalance, with a few popular media dominating the available data, and that many media are simply variants of a base formulation; however, the two media selected for this study are distinct and unrelated. Note that the methodology can be extended to other cultivation media, provided they are represented by an adequate number of occurrences for robust quantitative analysis. For sparsely represented media, supplementary data from new experiments or through computational feature generation would be necessary.

Methodologically, we pursue a dual-track approach:

  • 1.

    We develop an inherently explainable rule-based classifier to predict media preference, aiming to extract transparent rules that link organismal traits to media suitability.

  • 2.

    We train a state-of-the-art black-box model (CatBoost) and employ post-hoc explanation techniques (SHAP values) to identify its key predictive features.

A core objective is to compare these two approaches, not only in terms of predictive performance (accuracy, F1-score, etc.) but also regarding the nature, stability, and biological plausibility of the explanations they provide. The simplified workflow of this study is shown in Fig. 1. Ultimately, we aim to interpret the knowledge captured by the trained models, particularly the rules generated by the explainable method, to advance our understanding of microbial cultivation requirements.

Fig. 1.

Fig. 1

The simplified workflow of the analysis.

2.1. Input dataset

The foundation of this study is the KG-Microbe-Core knowledge graph, a data resource from the KG-Microbe framework detailed in [20]. KG-Microbe-Core serves as a harmonized knowledge resource, integrating diverse, curated information on microbial organismal traits, including phenotypes such as environmental growth conditions, metabolic capabilities, morphology, and ecological roles, sourced from established resources like BacDive, Madin et al., and MediaDive [20].

The dataset used in this work was based on a pre-release of KG-Microbe.1 For our predictive models, features were derived from the rich set of edges within KG-Microbe-Core that represent these organismal traits and their associations with specific microbial taxa. The feature engineering process involved constructing a feature table equivalent to a graph adjacency matrix, capturing these trait associations for the subset of taxa that had known media pairings. We did not use a correlation filter for feature selection because the data was limited, the (binary) data values were very sparse, and features were expected to have very different but unknown a priori feature importance.

2.2. Choice of target media and problem formulation

Consistent with the scope outlined previously, our analysis specifically targeted two well-represented cultivation media: DSMZ GYM Streptomyces (Medium 65) and DSMZ Marine Broth (Medium 514). These media were selected due to the substantial number of training examples available, drawing information as integrated into KG-Microbe-Core from resources like DSMZ via MediaDive [20].

A multi-class modeling approach was initially considered but ultimately rejected in favor of binary classification to enhance interpretability. We note that our binary classification approach also faces a highly imbalanced baseline (e.g., the majority class “Not Medium 514" constitutes 88.7% of the data), meaning accuracy is not an informative metric.

To achieve greater interpretability, we opted for a binary classification framework. In this framework (e.g., “Medium 65” vs. “Not Medium 65”), the majority class is the large, heterogeneous negative case (“Not Medium 65”). This structure fundamentally improves interpretability by forcing the model to overcome a default “do not predict” stance. Instead of defaulting to the most common outcome, the model is challenged to find specific rules that justify making a rare positive prediction. This approach prioritizes precision (high reliability when a prediction is made) over recall (identifying every possible case), allowing for the discovery of robust and easily explainable biological associations. A performance illustrating the resulting trade-off—where binary models achieve substantially higher precision but potentially lower F1-scores (as seen with Medium 514) is presented in Table 3. When considering stratification at the taxon rank of family, we trained a CatBoost multiclass model. When stratified by family, it had precision and recall of 60 % and 82 % for Medium 514 and 39 % and 90 % for Medium 65. For taxon rank of genus, it achieved 59 % and 80 % for Medium 514 and 43 % and 87 % for Medium 65. These results are broadly similar to the splits without taxonomic stratification (random splits).

Table 3.

Comparison of binary and multiclass CatBoost models for Medium 65 and 514.

Medium 65
Medium 514
Binary Multiclass Binary Multiclass
Precision 85 % 48 % 72 % 61 %
Recall 58 % 90 % 48 % 79 %
F1-score 69 % 63 % 57 % 69 %

To summarize, we proceeded with binary classification models for the main analysis using random splits, assuming the negligible impact of stratification observed in the multiclass experiments would hold.

2.3. Data preparation

To ensure the quality and relevance of features for model training, the initial feature set was subjected to a filtering pipeline. This process involved:

  • 1.

    Eliminating features that were present in only a single taxon or, conversely, taxa associated with only a single feature within our selected dataset, as these provide limited discriminatory power.

  • 2.

    Removing redundant features by identifying and retaining only one representative from any set of features that shared an identical binary data pattern across all taxa.

To prevent leakage and bias, we did not include any media ingredients as features for model training, since encoding all of the ingredients for a medium as features for a taxon effectively represents the media; we did retain organismal substrate-utilization annotations (e.g., CHEBI terms such as agar/agarose utilization) because they reflect microbial traits rather than medium composition. We should also note that the model can learn correlations that may reflect curatorial practices (e.g., researchers use marine broth for microbes isolated from marine environments). Note also that this practice is common and founded on strong biological principles. The isolation source serves as a powerful proxy for a suite of unmeasured physiological traits (e.g., osmotolerance, specific ion requirements) that are essential for survival in a given niche.

2.4. Data partitioning

For the main analysis (binary models, both rule-based and black-box), we utilized a consistent data partitioning strategy: 70 % for training, 20 % for validation, and 10 % for testing, though this validation set was not used for the final main models (which were evaluated on the test set). This split was applied uniformly for both binary models (Medium 65 vs. Others, Medium 514 vs. Others) and is used for both the explainable rule-based models and the black-box models to ensure a fair comparison. Detailed statistics of this data split, including the context of the numerous “Other media” which have lower frequencies, are provided in Table 4.

Table 4.

Train-validation-test (70 %/20 %/10 %) split for the KG-microbe dataset. Counts are shown for the most frequent target media, GYM Streptomyces medium (Medium 65) and Marine Broth medium (Medium 514), as well as the aggregate of “other media”.

GYM Streptomyces medium (Medium 65) Marine Broth medium (Medium 514) Other media Total dataset
Training set 2381 2043 13,593 18,017
Validation set 684 586 3903 5173
Test set 337 289 1923 2549
Total dataset size 3402 2918 19,419 25,739

To validate the use of random splitting, we performed supportive experiments (as mentioned in Section 2.2) using taxonomic stratification on the multiclass model. Training data were partitioned into training (70 %), validation (20 %), and test (10 %) sets using group-based stratification, where each bacterial taxon was first assigned to its corresponding taxonomic group at either the family or genus rank by traversing the NCBI Taxonomy hierarchy in KG-Microbe. Entire taxonomic groups were kept together within a single data partition, ensuring that closely related taxa (e.g., strains or species within the same family/genus) were never split across training and test sets. This approach prevents the model from learning species-specific patterns that could artificially inflate performance when related organisms appear in both training and evaluation sets. For family-level stratification, taxa were grouped by their ancestral family node (or the lowest available rank if the family was not annotated), while genus-level stratification used the immediate parent genus. The group-based splitting algorithm iteratively assigned complete taxonomic groups to partitions by selecting the split with the largest proportional deficit from its target size, maintaining approximate balance across splits while preserving taxonomic integrity.

2.5. Deriving explainable rules: theory and classifier design

Association rules offer a powerful avenue for building interpretable machine learning models. Our methodology leverages enhanced association rules, specifically those aligned with the GUHA method (General Unary Hypotheses Automaton), which is rooted in mathematical logic and facilitates the discovery of diverse data patterns [21]. In its simplest form, an association rule is an implicative statement, If X then Y, typically evaluated by its support (the absolute support is Count(X and Y), the number of records for which the rule is valid), confidence (its predictive accuracy given X), and lift (its interestingness beyond baseline probabilities). For instance, a key rule identified in our study predicting suitability for Medium 514 is:

If assay:API_20NE_PNPG & isolation_source:marineMedium=514(Support: 91, Confidence: 86.67 %, Lift: 7.64)

This rule can be interpreted as follows: “For microbes that exhibit a positive result for the assay API_20NE_PNPG AND originate from a “marine” isolation source, they are predicted to be suitable for cultivation in Medium 514.” This specific association was observed for 91 microbes in our training dataset (support). Among these instances, 86.67 % indeed showed preference for Medium 514 (confidence). Moreover, the lift value of 7.64 signifies that microbes meeting these conditions are over 7.6 times more likely to grow in Medium 514 than would be expected based on the overall prevalence of Medium 514 usage in the dataset, highlighting a strong positive association.

Key metrics for evaluating such rules include confidence and lift. The confidence of a rule If X then Y is formally defined as the conditional probability according to Eq. 2:

confidence=P(Y|X)=P(YX)P(X) (2)

While high confidence is desirable, it can favor rules predicting commonly occurring classes, which can be prevalent in diverse microbial datasets. To address this, and to identify rules that signify truly predictive relationships rather than mere co-occurrence with frequent outcomes, the lift measure is used. Lift quantifies how much more likely Y is to occur when X is present, compared to the overall probability of Y in the entire dataset. It is defined according to Eq. 3:

lift=P(Y|X)P(Y) (3)

A high lift value (typically >1) suggests a more interesting and potentially more biologically significant association, which is especially important in navigating the complexities and potential imbalances of microbial trait data. For binary variables, we use the abbreviation ¬X for the literal X(0) (i.e., attribute X has value 0) to simplify rule notation.

Our approach to building an interpretable classifier is inspired by Classification Based on Associations (CBA) techniques, which typically use a set of high-confidence and high-support rules. However, for our specific goal of extracting robust and biologically meaningful insights from the KG-Microbe dataset, our “CBA-like” classifier incorporates several modifications. A central distinction is our rule ranking and selection strategy. We employed CleverMiner for mining an initial comprehensive rule set [21], [22], [23]. Subsequently, these rules are ranked using a composite rule quality indicator that explicitly combines lift, support, and confidence. The inclusion of lift is particularly important because it measures how much more frequently two traits or preferences occur together than would be expected if they were statistically independent. This helps to distinguish genuine associations from coincidental ones, especially when certain microbial traits or media preferences are very common or very rare in the dataset.

The construction of our CBA-like classifier then proceeds as follows:

  • 1.

    Rule Generation and Ranking: Candidate rules, mined using CleverMiner [21], [22], [23], are ranked by a composite quality indicator balancing lift, support, and confidence. This prioritizes rules that the ranking metric deems as informative and reliable.

  • 2.

    Iterative Classifier Building: Ranked rules are iteratively selected if they cover a minimum number of new data instances. This creates a concise model, manages rule overlaps, and maintains individual rule intelligibility, aiming for a limited set of high-quality rules [24].

  • 3.

    Prediction and Fallback: The first matching rule in the ordered list predicts for a new instance; a fallback is used if no rule applies.

To obtain rule sets of varying lengths, we used additional rule mining settings based on filtering by additional rule quality and rule set robustness metrics. (The details can be found in the project repository referenced from the Data and code availability section).

This design ensures each rule is an independent, interpretable unit, unlike more complex tree-based models, and offers potential for generalization beyond binary classification.

2.6. Benchmark black-box model: gradient boosted trees

To establish a performance benchmark for our explainable rule-based models, we employed a state-of-the-art black-box approach using gradient boosted decision trees. Specifically, we utilized the CatBoost library [25] to train binary classification models for predicting microbial media preferences. The primary purpose of this CatBoost model was to provide a reference for the predictive accuracy achievable with a powerful, yet less interpretable, algorithm.

For our primary benchmark model training, we set the number of iterations to 100, resulting in an ensemble of 100 decision trees, with each tree having a maximum of 64 leaves.2 As noted earlier, CatBoost supports multi-class classification. Initial explorations revealed that the high number of media categories and the low relative frequency of many of them led to suboptimal performance. Consequently, we focused on developing two separate binary classification models, one for each of the most common media (Medium 65 vs. Others, and Medium 514 vs. Others). This binary approach, which aligns with our goal of prioritizing precision and interpretability (as discussed in Section 2.2), allowed for a direct and fair comparison with the binary explainable rule-based models developed in this study.

2.7. Interpretation through feature importance analysis

Beyond predictive performance, a primary goal of this study is to understand which organismal traits are most influential in determining microbial media preferences. Identifying these key features is instrumental for gaining biological insights, validating the relationships learned by our models, and potentially guiding future experimental design. Given our comparative approach employing two distinct modeling paradigms—a black-box gradient boosted tree model and an inherently explainable rule-based system—we correspondingly utilize two different methodologies to assess feature importance.

Our investigation into feature importance seeks to address two main questions:

  • 1.

    What are the most significant organismal traits (features) associated with growth in the selected media?

  • 2.

    How do the feature importance rankings and the nature of insights derived from the black-box model’s post-hoc explanation compare with those from the directly interpretable rule-based model, particularly in terms of their stability and biological relevance?

The following subsections detail the specific methods used for feature importance analysis for each model type.

2.7.1. CatBoost model feature importance via SHAP values

To interpret the benchmark black-box CatBoost models, we employed the SHAP (SHapley Additive exPlanations) method [15]. SHAP is a widely recognized game-theoretic approach that explains the output of any machine learning model by computing the contribution of each feature to a specific prediction [12], [14]. It estimates the importance of an individual attribute by evaluating the marginal contribution of that feature across all possible feature coalitions. For our analysis, we utilized the absolute SHAP values to quantify the overall impact of each feature on the model’s predictions, allowing us to identify traits that strongly influence the determination of media suitability, irrespective of whether their influence is positive or negative.

2.7.2. Rule-based model feature importance via ARA values

For the interpretable rule-based model, feature importance was assessed using the ARA (Association Rule Analysis) values, as defined in Eq. (1). The ARA method provides a direct measure of how the presence (or absence) of a single organismal trait (feature ψ) alters the probability of an outcome (media preference ϕ), effectively treating each individual feature as the antecedent of a simple rule predicting the media. This approach leverages the concept of lift for positive associations, quantifying the true probability change.

Specifically, we calculated ARA values for individual features by considering each feature as an antecedent ψ in a rule ψϕ, where ϕ is the preference for a given medium. These ARA values are computed directly on the training dataset, thereby reflecting the inherent statistical importance of each feature concerning media preference as present in the data itself [19]. This provides a transparent, data-centric statistic that directly reflects a feature’s observed impact, which we then compare against the model-dependent SHAP values derived from the CatBoost model.

2.7.3. Key differences in SHAP and ARA values

Conceptually, SHAP and ARA assess feature importance differently. SHAP estimates a feature’s contribution to a specific model’s prediction by considering its marginal effect across all possible feature combinations within that trained model. ARA, conversely, quantifies the statistical relationship between an individual feature and the outcome directly from the data, akin to assessing the strength of a simple rule where the feature is the antecedent. This distinction has implications for interpretation; for instance, if multiple correlated features are each strongly associated with the outcome, ARA will identify all of them as important. SHAP, in such scenarios, might distribute importance among them or assign lower importance if features are substitutable within the model.

3. Results

3.1. Comparative analysis of interpretable and black-box model performance

This section presents a comparative evaluation of predictive performance and model complexity between the developed explainable rule-based (RB) classifiers and the CatBoost (CB) black-box models for Medium 65 and Medium 514. For both RB and CB approaches, we explored models of varying complexities—specifically, different rule set sizes for RB models and varying numbers of trees (controlled by iteration parameters: 1, 5, and 100, denoted -1I, -5I, -100I respectively, with each tree having a maximum of 64 leaves) for CB ensembles. This strategy was adopted to investigate the established principle that while predictive accuracy often scales with model complexity, this typically occurs at the expense of interpretability. Our aim was to identify configurations where explainable models could offer a favorable balance between these aspects. A key objective of this analysis was to identify high-confidence predictive rules. By design, the methodology prioritizes precision (the reliability of a rule when it applies) over recall (the coverage of all positive instances). This deliberate trade-off ensures that any discovered patterns are highly reliable and interpretable.

Performance metrics, including F1-score, accuracy, precision, and recall, are detailed in Table 5 for Medium 65 and Table 6 for Medium 514.

Table 5.

Ablation study: model complexity vs predictive performance for Medium 65.

Rule-based models
CatBoost
RB-65-1 RB-65-2 CB-65-1I CB-65-5I CB-65-100I
Rules included 6 67 1 × 64 5 × 64 100 × 64
F1-score 46 % 55 % 45 % 60 % 69 %
Accuracy 91 % 91 % 90 % 92 % 93 %
Precision 94 % 90 % 79 % 86 % 85 %
Recall 31 % 39 % 32 % 46 % 58 %

Table 6.

Ablation study: model complexity vs predictive performance for Medium 514.

Rule-based models
CatBoost
RB-514-1 RB-514-2 RB-514-3 CB-514-1I CB-514-5I CB-514-100I
Rules included 11 34 101 1 × 64 5 × 64 100 × 64
F1-score 52 % 56 % 46 % 15 % 35 % 57 %
Accuracy 90 % 90 % 91 % 89 % 90 % 92 %
Precision 54 % 55 % 71 % 71 % 63 % 72 %
Recall 51 % 57 % 34 % 9 % 25 % 48 %

Performance Evaluation for Medium 65 (Table 5): For Medium 65, the RB-65-1 model, which is based on only six rules, achieved a precision of 94 %, an accuracy of 91 % and an F1-score of 46 %. The CatBoost model CB-65-100I (100 trees) achieved 85 % precision, 93 % accuracy and a 69 % F1-score. Thus, a small, interpretable rule set captured key relationships with substantially higher precision. The F1-score was notably lower, reflecting the trade-off between simplicity and predictive power for this medium. Increasing the rule-based model’s complexity from 6 to 67 rules (RB-65-2) resulted in an accuracy of 91 % and an F1-score of 55 %, demonstrating a scaling of performance with model size while the model remained directly interpretable and the accuracy gain was modest for a notable increase in rule count.

Performance Evaluation for Medium 514 (Table 6): The evaluation for Medium 514 also showed the performance of the explainable rule-based approach as model complexity was varied. The RB-514-1 model, using 11 rules, yielded a precision of 54 %, an accuracy of 90 % and an F1-score of 52 %. This is a highly transparent option, though its precision is lower than the 72 % of the most complex CatBoost model (CB-514-100I, which achieved 92 % accuracy). Notably, this compact rule-based model performed better than CatBoost models trained with fewer iterations: CB-514-1I (1 iteration) yielded 71 % precision, 89 % accuracy and a 15 % F1-score, while CB-514-5I (5 iterations) achieved 63 % precision 90 % accuracy and a 35 % F1-score. It is acknowledged that CatBoost is primarily optimized for predictive power rather than for direct interpretability with minimal iterations; this specific comparison illustrates the performance spectrum. The largest rule-based model evaluated for this medium, RB-514-3 (101 rules), also maintained competitive performance with the precision of 71% and an accuracy of 91 %. This precision was competitive with the 72 % precision of the CB-514-100I model (92 % accuracy), showing that the interpretable model remained competitive while still offering a degree of interpretability not available in the CatBoost model.

Collectively, these results show that the explainable rule-based models achieved competitive precision, which can exceed CatBoost models. The rule-based models offer transparent outputs, and the specific rules for models RB-65-1 and RB-514-1 are detailed in Table 7, Table 8. Note that while the performance evaluation was conducted for both CatBoost and the rule-based models on test data, the rule confidence and support for individual rules, as shown in Table 7, Table 8, are computed during training, which is a standard approach in association rule learning analysis.

Table 7.

Rules forming the basis of the RB-65-1 model. Rule confidence and support are reported for training data.

# Rule Confidence Support
1 ¬(CHEBI:4853) & production:antibiotic_compound medium=65 95.87 % 325
2 ¬(CHEBI:17632) & production:antibiotic_compound medium=65 94.62 % 334
3 ¬(assay:API_coryne_URE) & production:antibiotic_compound medium=65 94.37 % 335
4 ¬(EC:1.11.1.6) & assay:API_zym_alpha-Mannosidase medium=65 94.80 % 237
5 ¬(CHEBI:17634) & assay:API_zym_alpha-Mannosidase medium=65 93.21 % 261
6 ¬(CHEBI:17634) & assay:API_20E_URE medium=65 94.58 % 192

Table 8.

Rules forming the basis of the RB-514-1 model. Rule confidence and support are reported for training data.

# Rule Confidence Support
1 assay:API_20NE_PNPG & isolation_source:marine medium=514 86.67 % 91
2 EC:1.9.3.1 & ENVO:00002149 medium=514 81.16 % 125
3 ENVO:00002149 & isolation_source:marine medium=514 77.77 % 175
4 isolation_source:marine & temp_range:very_low medium=514 77.77 % 147
5 isolation_source:marine & temp_range:low medium=514 74.22 % 216
6 EC:1.9.3.1 & isolation_source:marine medium=514 66.06 % 442
7 isolation_source:marine & ¬(oxygen:anaerobe) medium=514 59.46 % 867
8 NaCl_opt:mid & gram_stain:negative medium=514 69.83 % 125
9 EC:1.9.3.1 & NaCl_range:high medium=514 66.92 % 174
10 isolation_source:marine & temperature:mesophilic medium=514 57.36 % 736
11 isolation_source:mollusca & temperature:mesophilic medium=514 69.42 % 84

The inclusion of models with larger rule sets serves to illustrate the relationship between model complexity and predictive performance on this specific dataset. The results indicate that simpler models offer a more favorable balance, providing better interpretability with strong predictive precision.

3.2. Assessing model agreement on a high-confidence subset

Following the general performance comparison, this section examines the concordance between the simplest rule-based model for Medium 65 (RB-65-1) and the CatBoost (CB) models. The RB-65-1 model, by design, identifies a specific subset of data instances where its rules predict preference for Medium 65 with high confidence.

The RB-65-1 model identified 109 such high-confidence cases from the test set (N = 2549). The performance of RB-65-1 and various CB model configurations on this specific subset is detailed in Table 9.

Table 9.

Model performance on the high-confidence subset for medium 65 identified by RB-65-1 (109 cases where RB-65-1 rules apply).

Model Correctly scored (instances) Accuracy (%)
RB-65-1 103 94 %
CB-65-100I 101 93 %
CB-65-5I 94 86 %
CB-65-1I 81 74 %

As indicated in Table 9, the RB-65-1 classifier, relying on its explicit rules, demonstrated the highest accuracy (94 %) on this data subset where it was most confident. This performance surpassed that of all evaluated CatBoost models on these specific instances, including the most complex CB-65-100I (93 %). This observation highlights that even a very simple, transparent classifier for Medium 65, which is composed of high-confidence rules, can achieve high reliability and superior performance within its well-defined domain of applicability.

Regarding the overlap in specific predictions, an analysis of the intersection between the instances confidently predicted by RB-65-1 and those by the CB-65-100I model revealed substantial agreement. Of 105 taxa commonly identified by both models within this subset, 100 were correctly classified by both, indicating a strong consensus on these particular cases.

In summary, this focused analysis demonstrates that the simple rule-based classifier (RB-65-1) effectively identifies a subset of instances for which it can make highly accurate predictions, achieving approximately 1 % higher accuracy than the best-performing CatBoost model on these specific cases.

However, this 94.50 % accuracy on the high-confidence subset must be interpreted with caution. This subset was, by definition, pre-selected based on where the RB-65-1 model’s rules applied, making it an inherently biased selection; this comparison therefore does not serve as a balanced benchmark against the CatBoost model.

3.3. Feature importance analysis and method stability

To comprehensively identify the organismal traits most influential in predicting media preferences, this study employed two distinct feature importance methodologies: SHAP (SHapley Additive exPlanations) for the CatBoost black-box models, and Association Rule Analysis (ARA) values in the context of the explainable rule-based approach. The motivation for using both also stemmed from their hypothesized complementary perspectives on feature evaluation.

Our empirical investigation into feature importance began by assessing SHAP values for the CatBoost model, focusing initially on Medium 65 to evaluate their stability. Features with the highest mean absolute SHAP values on the training set were identified, and their corresponding SHAP values on the test set were calculated (Table 10). These were also compared with their ARA values (comparison shown in Fig. 2 upper right).

Table 10.

Top 10 features for medium 65 according to mean absolute SHAP values on the training set, with their corresponding SHAP values on the test set. SHAP values are scaled (multiplied by 1000).

Rank Feature id Feature name SHAP train (× 1000) SHAP test (× 1000)
1 isolation_source:soil isolation_source:soil 226.53 223.61
2 cell_shape:rod cell_shape:rod 208.95 204.81
3 oxygen:anaerobe oxygen:anaerobe 188.41 192.96
4 EC:1.9.3.1 cytochrome-c oxidase 137.06 135.86
5 gram_stain:negative gram_stain:negative 131.50 127.39
6 sporulation:spore_forming sporulation:spore_forming 120.78 113.13
7 temperature:mesophilic temperature:mesophilic 102.23 99.13
8 gc:high gc:high 71.22 68.73
9 motility:motile motility:motile 68.63 67.81
10 gram_stain:positive gram_stain:positive 65.44 64.38

Fig. 2.

Fig. 2

Upper charts illustrate the SHAP Values for Medium 65 — left is a comparison of absolute SHAP values on the test and train set, and right is a comparison of SHAP and ARA values. Bottom charts show the alignment of ARA values on the test and train set. Left shows values for Medium 514 and right values for Medium 65. The charts include only ARA values that are positive both in train and test sets and have support> 10 on train set.

A visual comparison, presented in Fig. 2 (upper left), revealed that SHAP values for the top-ranked training set features are consistent. The Pearson correlation between SHAP values on the training and test sets was exceptionally high at>0.99 for both Medium 514 and Medium 65.

While SHAP values demonstrated high stability between training and test sets, the correspondence between model-derived SHAP values and the data-derived ARA values was limited (Fig. 2, upper right).

Given the focus on rule-based explanations, ARA values were subsequently adopted as the primary measure for robust feature importance determination for both Medium 65 and Medium 514. ARA values were calculated for features on both the training and test sets. For interpretative purposes, we focused on features exhibiting positive ARA values, indicating a positive association with preference for a given medium. The most influential features for Medium 514, which proved more readily interpretable, are presented in Table 11; results for Medium 65 are provided in Appendix Table A.12.

Table 11.

Top 12 features by positive ARA associated with Medium 514 (train set, min support> 10), plus selected features appearing in the discovered rules. “N/A" indicates feature absence in the test split. Ontology names used for some IDs.

Rank Feature ARA value (train) ARA value (test)
1 isolation_source:dinoflagellate 7.462 8.820
2 isolation_source:tunicata 7.236 7.056
3 isolation_source:echinodermata 6.563 8.820
4 isolation_source:cnidaria-corals 6.201 7.718
5 ENVO:00002149 (sea water) 6.199 5.733
6 CHEBI:2509 (agar) 6.135 4.410
7 isolation_source:red-algae 6.034 8.820
8 isolation_source:green-algae 5.990 N/A
9 isolation_source:mollusca 5.280 4.837
10 ENVO:02500019 (alga) 5.226 N/A
11 isolation_source:surface-water 4.899 4.961
12 salinity:moderately_halophilic 4.842 N/A

Selected other features
24 isolation_source:marine 4.397 4.428
25 NaCl_opt:mid 4.320 3.661
185 gram_stain:negative 1.802 1.678
350 ¬(oxygen:anaerobe) 1.195 1.229
404 temperature:mesophilic 1.004 1.025

The Pearson correlation between ARA training and test values was 0.86. This high degree of consistency confirmed the reliability of ARA as a data-centric measure of feature importance for this study, leading to its adoption for subsequent interpretation of feature relevance.

4. Discussion

4.1. Understanding SHAP value limitations when used with correlated microbial traits

The observed stability of SHAP values in this study does not mean they can be unconditionally relied upon for comprehensive feature attribution. Post-hoc explanation methods like SHAP are known to face challenges, such as a tendency to produce sparse results, which suggests limitations in their attribution. Several interconnected factors likely contribute to this phenomenon.

A primary consideration is SHAP’s inherent sensitivity to adversarial data [26] and specifically multicollinearity [27]. Standard Shapley value calculations often assume feature independence, an assumption that is frequently violated in real-world datasets, especially in biological contexts. The KG-Microbe dataset contains features that are often interlinked and correlated by design because of their underlying biological dependencies.

Furthermore, the specific characteristics of the training data used in this study—namely its sparse, binary nature and the inclusion of heterogeneous traits with potentially varying biological relevance that were not known a priori—may exacerbate the difficulties for SHAP. To avoid premature loss of information, all non-identical features were retained during preprocessing. In datasets with such properties, especially when coupled with complex ensemble models like CatBoost, post-hoc explanation methods such as SHAP can inadvertently emphasize minor contributors.

These findings align with broader discussions in the machine learning literature concerning the limitations of post-hoc explanations for “black-box” models, particularly when applied to datasets with complex dependency structures among features. They underscore the arguments for prioritizing inherently interpretable models, or for employing more direct, data-centric feature importance measures like the ARA values used here, when feasible and when transparency is a key objective. As demonstrated in the preceding sections of this paper, the adoption of explainable rule-based models provided stable and directly interpretable insights into feature relevance.

4.2. Methodology of rule interpretation: the interplay of domain expertise and LLM assistance

The biological interpretation of the rules and key features identified by the explainable approach was primarily undertaken by M. P. Joachimiak, a co-author of the present study. His role as a principal lead and developer of the KG-Microbe project and knowledge graph–which forms the foundation of this work–was central to an interpretation grounded in a detailed understanding of microbial taxa, their harmonized traits, and relevant biochemical pathways and other relevant knowledge. While Large Language Models (LLMs) were explored for their potential in this interpretative process, their contribution was ultimately supportive. This was mainly because the highly specialized nature of the subject matter, particularly the nuanced details of microbial characteristics and their interplay within the KG-Microbe framework, extended beyond the current domain-specific knowledge capabilities of these LLMs. We used LLMs (OpenAI GPT o1 pro mode with DeepResearch, Claude Sonnet 4, and Claude Opus 4 with Research) to enumerate and describe the complex media ingredients and interpret rules and top feature sets. Interpretation prompts included media ingredient lists, including for complex ingredients like yeast extract. Complete prompts and LLM result tables are provided as part of the Supplementary Material (referenced in the Data and Code Availability section). In addition, LLM-assisted literature searches allowed us to cover a large volume of publications and also informed the analysis. Citations and citation links were validated manually.

LLM assistance was used to explore and articulate potential biological interpretations from the rule sets and feature importance tables generated by the rule-based classifiers for Medium 65 and Medium 514. LLMs from OpenAI and Anthropic were provided with these outputs—including top rule tables, important features identified via Association Rule Analysis (ARA), and relevant media ingredient information sourced from MediaDive—along with custom-designed prompts (see Methods). This analytical step was exclusively applied to the outputs of the rule-based models, due to their inherently explainable structure, and was not used for the interpretation of the CatBoost (black-box) models. The complete set of prompts provided to the LLM and the corresponding raw outputs are documented in the Supplementary Information (see Data and Code Availability section). We note that all insights or interpretations suggested by the LLM were critically reviewed, validated against existing domain knowledge, and refined by the authors. The final interpretations, discussions, and conclusions presented in this manuscript are solely the work and responsibility of the authors.

Our research workflow incorporated Large Language Models (LLMs) in an assistive capacity. To mitigate the risk of incorporating factual inaccuracies (e.g., hallucination of facts, particularly on specific technical topics), we required citations, including multiple aligned data (e.g., tables of corresponding columns, related columns such as manuscript title and DOI), and their use in the context of the analysis was limited to drafting the interpretation of rules and features and all results were reviewed.

4.3. Interpretation of explainable model outputs: rules and feature significance

After establishing competitive performance and ARA stability, we interpret the rules and key features identified by the explainable models. It is important to note that during feature engineering, redundant features (those with identical data patterns across taxa) were removed prior to training; the interpretations below thus refer to the unique features retained in the final models. Citations for the inferred relationships below are provided in tables in the project code and data repository referenced in the Data and Code Availability section.

Insights for Medium 514 (Marine Broth): The rule set for Medium 514 (detailed in Table 8) primarily highlights organismal traits consistent with adaptation to a marine environment. Prominent themes include: heterotrophic metabolism on general organic nutrients (Bacto peptone, Yeast extract) supported by marine-associated divalent cations (MgCl2, CaCl2) for membrane and enzymatic cofactor functions, isolation from marine-derived sources (e.g., specific marine organisms or general marine environments), and salinity tolerance (moderately halophilic organisms), which are biologically plausible requirements for thriving in marine ionic strength conditions (specific media ingredients including NaCl 19.45 g/L plus additional seawater-like ions such as MgCl2, CaCl2, KCl, Na2SO4, KBr, SrCl2, H3BO3, Na-silicate, NaF, NaHCO3). The top three rules in this model directly emphasize these themes. Additional rules (i.e., rules 4, 5, and 10) may incorporate temperature or other environmental preferences beyond the top features analyzed here. Collectively, the dominant features in this model point toward adaptation to marine environments: isolation from seawater and algal settings, association with marine invertebrate hosts (tunicata, echinodermata, cnidaria-corals, mollusca), and tolerance for elevated salinity (moderate halophiles).

Further insights are derived from the ARA values for features positively associated with Medium 514 (Table 11). This analysis revealed a pattern, where the model abstracted information from various specific marine host organisms, grouping them under broader labels like “sea water” and “marine” environments. Specific marine organism associations included isolation sources from dinoflagellates, tunicates, echinoderms, cnidaria-corals, and molluscs, reflecting the diverse marine microbiomes supported by this medium. The ENVO “sea water" feature set particularly emphasizes the importance of trace marine elements (KBr, SrCl2, H3BO3) that mimic seawater composition for essential cofactor functions and pH buffering. Additional features highlight algae-associated bacterial communities (alga, red-algae, green-algae, dinoflagellate), with Fe(III) citrate included in the medium formulation potentially supporting bacteria involved in algal-bacterial interactions and biogeochemical cycling. These were complemented by salinity tolerance features (“moderately_halophilic”), reflecting organisms adapted to marine ionic strength from NaCl plus MgCl2 and CaCl2. The medium’s divalent cations (Mg2+, Ca2+) provide membrane and enzymatic cofactor support for marine organisms. The presence of agar utilization trait (CHEBI:2509/agar) indicates taxa associated with agarose-rich environments; note this is a taxon trait, not a media ingredient feature. Finally, we note that the model utilized three of the four available physical growth preference categories (salinity, temperature), with pH and oxygen not emerging as a dominant distinguishing feature from this analysis.

Insights for Medium 65 (GYM Streptomyces Medium): In contrast, the rules generated for Medium 65 (Table 7) present a more biochemically nuanced profile, often framed as negations of certain traits (i.e., absent features being predictive). For example, rules 1–3 link antibiotic-producing organisms to the absence of specific chemical or enzymatic capabilities, suggesting distinct metabolic profiles for microbes thriving on this medium. This avoidance of esculin degradation allows antibiotic producers to preserve energy for secondary metabolism rather than competing for β-glucosidase substrates. Rules 4–6 indicate particular carbon and nitrogen utilization strategies. Rule 4 specifically highlights oxidoreductase-independent mannosidase activity, indicating alternative energy pathways using malt-derived mannans and oligosaccharides rather than conventional redox reactions. Rules 5–6, for instance, indicate glucose-independent specialized enzymes where mannosidase/urease producers utilize complex malt oligosaccharides (e.g., maltotriose, dextrins) over simple glucose. Similarly, the preference for organic nitrogen over nitrate aligns with reliance on complex peptides and amino acids from yeast extract. Complex peptides and amino acids from yeast extract may better support antibiotic biosynthesis than inorganic nitrate reduction. The top important features (Appendix Table A.12) include an enzymatic profile which reveals a comprehensive suite of hydrolytic activities: glycosidase enzymes (α-mannosidase, α-galactosidase, N-acetyl-β-glucosaminidase, β-glucosidase, β-galactosidase) for processing complex carbohydrates including dextrins and β-glucans from malt extract, and mannans and glycoproteins from yeast extract; protease enzymes (α-chymotrypsin, trypsin, cystine arylamidase) for peptide hydrolysis, and lipase for lipid metabolism. Notably, “API zym” assays show α-chymotrypsin, trypsin, and cystine arylamidase for peptide hydrolysis, and lipase for lipid metabolism from fatty acids in yeast and malt extracts. These activities, combined with nitrogen metabolism capabilities (tryptophanase, urease), suggest organisms adapted to decomposing complex organic matter. The prevalence of straw-isolated organisms further indicates adaptation to lignocellulosic environments, where CaCO3 provides pH buffering essential for maintaining optimal conditions for antibiotic biosynthesis. Urease activity (API_20E_URE) appears as a positive predictor in the rules and ARA table for Medium 65, while a complementary rule based on the API Coryne panel favors the absence of urease; these patterns indicate context-dependent nitrogen handling rather than a total absence of urease.

Together, these rules suggest that Medium 65 is preferred by antibiotic-producing organisms with versatile enzymatic capabilities, adapted to rich media containing complex carbon substrates and organic nitrogen sources, potentially originating from plant-associated environments. The medium composition supports organisms suited to complex media with over 50 compounds and macromolecule types from yeast/malt extracts, avoiding simple substrate competition. The medium’s B-vitamins (especially B3, B5, B6) and trace metals (Fe, Zn, Mn) specifically support polyketide/peptide antibiotic pathways characteristic of Streptomyces. The analysis of ARA values for Medium 65 (Appendix Table A.12) complements this, showing that this type of model required fewer rules than for Medium 514. Furthermore, only a few features exhibited high positive ARA values, with many important distinguishing characteristics being represented by negations, reinforcing the nuanced, exclusionary nature of the predictive logic for this medium.

This detailed interpretation of rules and features, made possible by the inherent transparency of the rule-based system and the stability of the ARA-derived importance scores, exemplifies the direct biological insights achievable with this modeling approach, offering a valuable alternative to more opaque methods.

4.4. Future work

Looking ahead, future work will focus on extending this framework through AMIE++-based relational rule learning using the RDFRules system [28], which is designed to operate directly on graph-structured data represented in RDF. Unlike the propositional rule-learning approach used in this study, which treats features as flat, independent attributes, relational rule learning can leverage the rich, interconnected structure of the knowledge graph to capture more nuanced and multi-relational patterns. By learning Horn clauses—a form of logic-based rule that can express relationships among multiple entities and their properties—this approach may offer improved interpretability and generalizability, especially in domains where biological phenomena are inherently relational. Another direction for future work includes focusing on other media and different validation methods, such as an external test data hold-out.

5. Conclusion

This study focused on the prediction of microbial cultivation media, a long-standing challenge in microbiology, by employing and evaluating an explainable rule-learning approach based on the KG-Microbe knowledge graph. We aimed to provide a transparent alternative to conventional “black-box” models, focusing on both predictive performance and the generation of biologically interpretable insights.

A key contribution of this work is the application of rule-learning methodologies in this specific microbiological domain. Our findings demonstrate that these explainable models, which generate explicit rules linking organismal traits to media preferences, achieve predictive performance nearly comparable to those of sophisticated black-box models like CatBoost. This near-parity in performance is significant, as it suggests that the pursuit of interpretability does not necessarily require a substantial sacrifice in predictive power.

The generalizability of this approach is conditional on the availability of data, with the two growth media discussed having the most taxa examples (in KG-Microbe). However, we showed that information about the isolation source can lead to highly important features and this data is generally available for microbial taxa. Enzyme assay data and growth preference measurements are also of high value, but this data type requires dedicated experiments and funding — our results confirm that these data are valuable in downstream applications, further justifying experimental efforts.

Furthermore, this study raised a salient methodological question regarding feature importance attribution. Our preliminary assessment suggested that while SHAP values were stable, their ability to provide reliable feature importance insights for our specific sparse, correlated microbial data was not clear. Given these considerations, this study relied instead on the data-derived ARA values from our rule-based system, which provided a stable and dependable foundation for our interpretations. This approach, however, highlights a significant area for future work: a systematic, direct comparison between SHAP and ARA is needed to validate their respective strengths and limitations for this type of complex biological data.

These observations resonate with broader discussions in machine learning, notably the call for caution when applying black-box models to high-stakes decisions. In microbiology, predictions guiding cultivation experiments represent such high stakes, involving considerable investments in time and resources for wet-lab validation. In this context, the transparency offered by rule-based models becomes particularly valuable, providing researchers with a clearer understanding of the factors driving predictions and fostering greater confidence in experimental design.

Our exploration also included the use of Large Language Models (LLMs) to assist in the generation of ingredient lists for complex media and the interpretation of the generated rules and feature lists. While human domain expertise remained essential in this study, the supportive role of LLMs indicates a promising avenue for future research by unlocking access to large volumes of literature often containing unstandardized terminology. As LLMs continue to evolve, their integration with structured biological knowledge could further enhance the accessibility and depth of insights derived from explainable rule sets, making complex biological relationships more understandable.

In summary, building rule-based classifiers on rich microbial knowledge graphs is a promising approach for predicting microbial media preferences. This method provides interpretable models that remain competitive on key performance metrics when compared to black-box techniques. They not only facilitate a deeper understanding of microbial physiology and preferences but also hold the potential to guide more efficient and targeted experimental strategies in microbiology.

CRediT authorship contribution statement

Petr Máša: Writing – original draft, Visualization, Software, Methodology, Formal analysis. Tomáš Kliegr: Writing – review & editing, Validation, Supervision, Methodology, Conceptualization. Marcin P Joachimiak: Writing – review & editing, Supervision, Project administration, Methodology, Funding acquisition, Formal analysis, Conceptualization.

Materials availability

This study did not generate any new materials.

Data and code availability

Data are available in the KG-Microbe project, see https://zenodo.org/records/15106978. Code is available on GitHub, see https://github.com/culturebotai/microbe-rules. The reported results are based on development data snapshot and software versions used. Minor variations may arise from differences in library dependencies or slight data updates.

Declaration of AI-assisted technologies in the writing process

During preparation, the authors used LLMs (OpenAI GPT o1-pro mode with DeepResearch; Claude Sonnet 4; Claude Opus 4 with Research; Google Gemini; ChatGPT) to improve readability and to draft interpretations of rules and feature lists. Table content—including citations and links—was reviewed manually. Full prompts and results are provided in the project repository (see Data and Code Availability). The authors reviewed and edited all LLM-generated text.

Declaration of competing interest

The authors declare the following financial interests/personal relationships that may be considered as potential competing interests:

Acknowledgements

This work was supported in part by the Director, Office of Science, Office of Basic Energy Sciences, of the U.S. Department of Energy, Contract No. DE-AC0205CH11231. This article is partly based upon work from COST Action CA23147 GOBLIN — Global Network on Large-Scale, Cross-domain and Multilingual Open Knowledge Graphs, supported by COST (European Cooperation in Science and Technology, https://www.cost.eu). The authors would also like to thank FIS VSE for long-term support of research activities (IP400040).

Footnotes

2

We also experimented with a significantly smaller and larger number of iterations. However, a larger number of iterations yielded only marginal improvements in performance while potentially increasing the risk of overfitting given our feature-to-observation ratio. Thus, the 100-iteration model was retained as a robust baseline.

Appendix A. Detailed results for feature importance

This appendix provides expanded ARA results for Medium 65. See Table A.12 for top features with positive ARA values on train and test splits.

Table A.12.

Top 15 ARA features according to positive ARA values for Medium 65 (train set, min support> 10), plus selected relevant features appearing in discovered rules. “N/A" indicates feature absence in the test split.

# Feature ARA (Train) ARA (Test)
1 production:antibiotic_compound 7.028 7.2147
2 assay:API_zym_alpha-Mannosidase 6.867 6.9335
3 isolation_source:straw 6.148 3.7819
4 assay:API_zym_Lipase 6.137 5.6729
5 assay:API_zym_alpha-Chymotrypsin 6.017 6.5833
6 assay:API_zym_Cystine arylamidase 5.824 6.1367
7 assay:API_20E_TDA Trp 5.763 6.3032
8 assay:API_zym_alpha-Galactosidase 5.719 5.9807
9 assay:API_zym_N-acetyl-beta-glucosaminidase 5.607 5.4161
10 assay:API_zym_beta-Glucosidase 5.591 5.5009
11 assay:API_zym_Trypsin 5.521 5.5397
12 assay:API_zym_beta-Galactosidase 5.477 5.6244
15 assay:API_20E_Urease 5.088 5.6728

Additional selected features
187 ¬(EC:1.11.1.6) 1.176 1.191
190 ¬(CHEBI:17634/d-glucose) 1.150 1.139
201 ¬(CHEBI:4853/esculin A) 1.074 1.038
206 ¬(CHEBI:17632/nitrate) 1.054 1.035
224 ¬(assay:API coryne URE) 1.001 1.004

Appendix B. Methodological comparison

  • This appendix expands the comparison of computational methods for microbial growth prediction, including inputs, scope, and explainability Table B.13.

    Table B.13.

    Expanded comparison of computational microbial growth prediction methods.
    Method name Input data Organism/taxonomy range Prediction target Methodology core Method explainability Key performance/results
    Masa et al. (this work) KG-Microbe; Binary (65/514 vs. Other) Bacteria and Archaea Growth media Rule-based classifier Full (transparent rules) 90 %–91 % accuracy (binary)
    Masa et al. (this work) KG-Microbe; Binary (65/514 vs. Other) Bacteria and Archaea Growth media Gradient Boosted Decision Trees (CatBoost) Black-box (SHAP for post-hoc) 92 %–93 % accuracy (binary)
    GrowREC [1] KOMODO+16S; DSMZ taxa-media pairs Microbes in the DSMZ collection (23,000 strains) Growth media Phylogeny-based collaborative filtering Partial (neighbors + media) 74 %–83 % accuracy (multiclass)
    MASS [5] Matrices of growth or fermentation phenotypes Microbial species (general) N/A (experimental design optimization) Mixed Integer Linear Programming High A feature selection method
    CoPTR [11] Metagenomic sequencing reads, reference genomes Bacteria Growth rate Max. likelihood estimation of Peak-to-Trough Ratio (PTR) Moderate (biological principle of replication) Pearson r>0.99 vs original on simulations
    Phydon [10] Genomes, phylogenetic tree 111,349 Bacteria and Archaea (GTDB) Growth rate Combined regression (CUB + phylogeny) with adaptive weighting Partial (CUB mechanism + phylogeny context) 31 % MSE reduction vs gRodon
    Amino Acid Freq. Models [3] Genome sequences (15.6 k microbes) 85,205 sequenced Bacteria and Archaea Oxygen, temp, salinity, pH ML models Partial (biophysical link of AA comp. to environment) Oxygen: 92 % bal. acc.; Temp: R2=0.73; Salinity: R2=0.81
    MOMENT [9] GEM, enzyme kcat values, MWs, GPRs Escherichia coli Growth rate LP integrating enzyme kinetics into FBA High (mechanistic, biochemical parameters) E. coli growth rate: Pearson r=0.468; Fluxes: r=0.76
    DGrowthR [8] Time-series OD data, metadata Three large-scale bacterial growth datasets Metabolic flux and growth rate Gaussian Process regression for curve fitting Moderate (GP flexible, interpretable params) Robust parameter extraction; statistical comparison (p-values)
    Predicting chemicals for growth [7] 1336 temporal growth records (225 media) Escherichia coli Chemical component concentrations Decision tree learning High (decision trees identify factors) Identified priority of chemicals: NH4+ & Fe3+> glucose
    Gene-chemical interplay [6] 14,000 growth profiles (115 E. coli strains) 115 Escherichia coli strains Gene-chemical interactions High-throughput growth assays; ML data analysis Moderate to High Glucose pivotal in hierarchical gene-chemical networks

References

Associated Data

This section collects any data citations, data availability statements, or supplementary materials included in this article.

Data Availability Statement

Data are available in the KG-Microbe project, see https://zenodo.org/records/15106978. Code is available on GitHub, see https://github.com/culturebotai/microbe-rules. The reported results are based on development data snapshot and software versions used. Minor variations may arise from differences in library dependencies or slight data updates.


Articles from Computational and Structural Biotechnology Journal are provided here courtesy of AAAS Science Partner Journal Program

RESOURCES