Research
Predicting Microbial Interactions Using Graph Neural Networks
Overview Research area: Machine learning applied to microbial ecology; specifically graph representation learning for predicting interspecies interactions. Technical level: Intermediate (assumes famil
- arXiv
- 2511.02038
- Published
- 2025-11-03
- Authors
- Elham Gholamzadeh, Kajal Singla, Nico Scherf
AI summary
Overview
- Research area: Machine learning applied to microbial ecology; specifically graph representation learning for predicting interspecies interactions.
- Technical level: Intermediate (assumes familiarity with graph neural networks, node/edge classification, and standard supervised learning metrics).
- Scope: The paper evaluates whether an edge-graph-based GraphSAGE model can predict the sign of microbial pairwise interactions, and can extend that prediction to mutualism, competition, and parasitism, using a large kChip-derived co-culture dataset.
What This Paper Is About
Predicting whether two microbial species help or harm each other is difficult because exhaustive pairwise co-culture experiments grow exponentially with the number of species. The authors ask whether a graph neural network, trained on monoculture growth, phylogeny, and metabolic features alongside a large set of measured interactions, can predict the direction of an interaction and generalize to species-condition combinations that were not directly measured. Their goal is to beat conventional machine learning baselines (kNN and XGBoost), which previously reported an F1-score of 72.76% on this prediction task.
Key Contributions
- A framework that reframes microbial interaction prediction as an edge-centric learning problem: each measured interaction (a species pair under a specific carbon condition) becomes a node in a derived edge graph, so message passing operates over interactions rather than over species alone.
- An edge-graph construction rule connecting two interaction-nodes when their corresponding experiments share a species and an experimental condition, which lets the model share information across separate co-culture experiments.
- A two-layer GraphSAGE implementation (built with the Deep Graph Library) using 13 input features and mean aggregation, trained for sign prediction of both one-way and two-way interactions.
- An extension from binary sign prediction (positive/negative) to three-way interaction typing: mutualism (+,+), competition (-,-), and parasitism (+,-), benchmarked against XGBoost.
Main Findings
- One-way prediction, GraphSAGE vs. baselines: GraphSAGE reached accuracy 0.9528, sensitivity 0.7392, precision 0.8822, and F1-score 0.8044. k-Nearest Neighbors scored 0.8593, 0.6613, 0.6613, and 0.6613. XGBoost scored 0.8835, 0.8017, 0.7276, and 0.7276.
- Headline improvement: The reported F1-score of 80.44% is described as significantly outperforming the comparable XGBoost result of 72.76%.
- Class imbalance noted: Positive interactions appear rare in both models for one-way sign prediction, which is why the paper treats F1-score as the more informative metric than accuracy.
- Two-way prediction, GraphSAGE: Mutualism precision 0.611, recall 0.333, F1 0.431; competition precision 0.855, recall 0.933, F1 0.893; parasitism precision 0.707, recall 0.663, F1 0.684; overall accuracy 0.811.
- Two-way prediction, XGBoost: Mutualism precision 0.430, recall 0.440, F1 0.430; competition precision 0.880, recall 0.920, F1 0.900; parasitism precision 0.640, recall 0.570, F1 0.600; overall accuracy 0.780.
- Where each model wins: The edge-graph model outperformed XGBoost on mutualism (F1 43.1% vs. 43.0%) and parasitism (F1 68.4% vs. 60.0%), while XGBoost was slightly better at predicting competition (F1 90.0% vs. 89.3%).
- Competition dominates predictions: Competition (-,-) was the most frequently identified interaction type at 57.39% of two-way predictions.
- Mutualism is the hard case: Mutualistic interactions (+,+) were frequently misclassified as parasitism (+,-) at 20.21%, and only 3.48% were classified as mutualism, which the authors partly attribute to mutualistic cases being underrepresented in the dataset.
Methodology in Plain English
The researchers started from a dataset of over 7,500 pairwise interactions among 20 species from two taxonomic groups, co-cultured across 40 distinct carbon conditions, primarily drawn from the work of Nestor et al. and Kehe et al. using the kChip nanodroplet screening platform. For each species they assembled 13 features: monoculture growth yields (including 24-hour measurements), a metabolic dissimilarity term based on the Euclidean distance between monoculture growth profiles, four principal components of metabolic profiles capturing 90% of the variation, and two principal components of phylogenetic embeddings per species capturing 95% of the variance.
Instead of treating species as the units to classify, they built a graph in which nodes represent species under a shared condition and edges represent measured interactions. They then converted this into an edge graph: every interaction edge became a new node, and two new nodes were connected if their original experiments shared a species and a condition. This means the model learns from relationships between experiments rather than only from species traits.
They trained a two-layer GraphSAGE model with mean aggregation and ReLU activation using PyTorch and the Deep Graph Library, optimizing cross-entropy loss with the Adam optimizer at a learning rate of 1×10⁻². The data was split 80% for training and 20% for testing, and training ran for 300 epochs. All experiments ran on the RAVEN HPC system with Intel Xeon IceLake-SP processors and NVIDIA A100 GPU nodes connected via NVLink. Performance was measured with accuracy, sensitivity (recall), precision, and F1-score.
Why This Matters
Microbial communities underpin environmental, agricultural, and human health outcomes, and the paper argues that exhaustively mapping their interactions experimentally becomes impractical as species counts grow. A model that predicts interaction direction from cheap features could reduce the search space for experiments that identify key positive interactions driving community function.
Real-world applications the paper points to:
- Clean-up of contaminated water, soil, and air using designed microbial communities.
- Capture of renewable resources such as energy (biogas and H2), chemicals (short-chain acids), and water.
- Environmental conservation and crop health through better management of ecological communities.
- Human health applications where microbial community structure affects outcomes.
Industry relevance: The method targets biotechnology and environmental engineering workflows where designing or steering a microbial consortium is the product, and it connects to any domain with directional relationships between entities — the authors explicitly note the approach could transfer to other ecological systems, epidemiological networks, or any network with diverse, directional links.
Future Directions
- Testing whether models trained under controlled laboratory conditions generalize to natural environments, which the authors flag as unclear.
- Incorporating higher-order interactions beyond pairwise effects, for example through Topological Deep Learning (TDL), since the current model cannot capture effects influenced by additional species.
- Improving computational efficiency, because graph neural networks are computationally intensive and required HPC resources, which the authors note could limit reproducibility.
- Developing lightweight methods for resource-limited settings, and exploring better ways to structure the graphs to encode experimental information more effectively.
- Reducing dependence on the availability and quality of input features such as monoculture growth yield.
Target Audience
Microbial ecologists and computational biologists interested in data-driven prediction of community dynamics; machine learning researchers working on graph representation learning and edge-centric or dual-graph formulations; and biotechnology or environmental engineering practitioners interested in designing microbial consortia. Readers need some background in graph neural networks and standard classification metrics to follow the modeling details, but the ecological framing is accessible without deep microbiology expertise.
Authors’ abstract
Predicting interspecies interactions is a key challenge in microbial ecology, as these interactions are critical to determining the structure and activity of microbial communities. In this work, we used data on monoculture growth capabilities, interactions with other species, and phylogeny to predict a negative or positive effect of interactions. More precisely, we used one of the largest available pairwise interaction datasets to train our models, comprising over 7,500 interactions be- tween 20 species from two taxonomic groups co-cultured under 40 distinct carbon conditions, with a primary focus on the work of Nestor et al.[28 ]. In this work, we propose Graph Neural Networks (GNNs) as a powerful classifier to predict the direction of the effect. We construct edge-graphs of pairwise microbial interactions in order to leverage shared information across individual co-culture experiments, and use GNNs to predict modes of interaction. Our model can not only predict binary interactions (positive/negative) but also classify more complex interaction types such as mutualism, competition, and parasitism. Our initial results were encouraging, achieving an F1-score of 80.44%. This significantly outperforms comparable methods in the literature, including conventional Extreme Gradient Boosting (XGBoost) models, which reported an F1-score of 72.76%.