An Explainable Knowledge Graph-Driven Approach to Decipher the Link Between Brain Disorders and the Gut Microbiome
Paper: BioRxiv
GNN-GBA (Graph Neural Network - Gut-Brain Axis) is a novel explainable AI framework that leverages knowledge graphs and graph neural networks to investigate and explain the complex relationships between the gut microbiome and brain disorders. This repository contains the implementation of our approach, which combines:
- Knowledge Graph: MGBAGraph: A Multi-relational biomedical knowledge graph connecting microbes, metabolites, and brain disorders
- Graph Neural Networks: GNN-GBA: A GraphSAGE-based GNN architecture for learning predictive relationships
- Explainability: Path-based explanations that reveal mechanistic connections between gut microbiota and brain disorders
Note: All experiments reported in our paper were conducted on a machine with 64 CPU cores, a single A100 GPU, and 64GB RAM.
-
Clone the repository
git clone https://github.com/naafey-aamer/GNN-GBA.git cd GNN-GBA -
Create a virtual environment (recommended)
python3.10 -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install required packages
pip install -r requirements.txt
The knowledge graph contains multi-relational connections between microbes, metabolites, genes, proteins, and brain disorders extracted from multiple biomedical databases.
Download the knowledge graph:
- Download from:
https://dfkide-my.sharepoint.com/:u:/g/personal/naaa01_dfki_de/IQB0c4v-AXS3QJJe3q_XaqNeAbB19EDmIkV2utpsCBTqJv0?e=XEYMjl - Unzip the downloaded file (~1.06GB) into the root directory of this repository:
unzip MGBAGraph1.zip -d ./
The repository includes two CSV files with lists of brain disorders:
brain_disorders/neurological_disorders_sample.csv: Contains 10 diseases for testing and experimentationbrain_disorders/neurological_disorders.csv: Complete list of brain disorders used in the full analysis
The train-GNN-GBA.py script trains the Graph Neural Network model on the Knowledge Graph.
python train-GNN-GBA.pyThe find_paths.py script discovers connecting paths between gut microbes and brain disorders in the knowledge graph.
Features:
- Parallel processing across multiple CPU cores
- Configurable path length and maximum number of paths
- Timeout mechanism to prevent infinite searches
- JSON and text output formats
Quick Start (Sample Dataset):
python find_paths.pyImportant Configuration:
By default, the script is configured to use the sample dataset (10 diseases) for ease of testing:
# In find_paths.py
csv_file_path = "brain_disorders/neurological_disorders_sample.csv" # Sample (10 diseases)For full analysis, modify the script to use the complete dataset:
csv_file_path = "brain_disorders/neurological_disorders.csv" # Full datasetKey Parameters:
edge_file_path = "MGMGraph/filtered_edge_list.txt" # Knowledge graph
csv_file_path = "brain_disorders/neurological_disorders_ranked_sample.csv" # Disease list
output_dir = "disease_microbe_paths_latest" # Output directory
max_paths = 10 # Maximum paths per microbe-disease pair
timeout_seconds = 100 # Timeout per path search
num_cpus = min(30, mp.cpu_count()) # Number of parallel processesThe GNN-GBA-Explainer.py script generates explainable predictions by scoring the discovered paths.
Prerequisites:
- Completed path discovery (
find_paths.py) - Trained GNN-GBA model (
train-GNN-GBA.py)
python GNN-GBA-Explainer.pyThe Baselines.py script reproduces the baseline model results for comparison.
python Baselines.pyIf you use this code or find our work helpful, please cite our paper:
@article {Aamer2025.12.11.693657,
author = {Aamer, Naafey and Asim, Muhammad Nabeel and Vollmer, Sebastian and Dengel, Andreas},
title = {An Explainable Knowledge Graph-Driven Approach to Decipher the Link Between Brain Disorders and the Gut Microbiome},
elocation-id = {2025.12.11.693657},
year = {2025},
doi = {10.64898/2025.12.11.693657},
publisher = {Cold Spring Harbor Laboratory},
abstract = {Motivation The communication between the gut microbiome and the brain, known as the microbiome-gut-brain axis (MGBA), is emerging as a critical factor in neurological and psychiatric disorders. This communication involves complex pathways including neural, hormonal, and immune interactions that enable gut microbes to modulate brain function and behavior. However, the specific mechanisms through which gut microbes influence brain function remain poorly understood, and existing computational efforts to understand these mechanisms are simplistic or have limited scope.Results This work presents a comprehensive approach for understanding these mechanisms by elucidating the cascade of interactions that allows gut microbes to influence brain disorders. By using a large curated biomedical knowledge graph, we train GNN-GBA, an explainable graph neural network, to learn the complex biological interactions between the gut microbiome and the brain. GNN-GBA is then used to extract the mechanistic pathways through which the gut microbiome can influence brain disorders. The network successfully identified pathways for 103 brain disorders, and we show that these pathways are consistent with existing literature.Availability An interactive dashboard to explore thousands of potential mechanisms through which the gut microbiome can influence brain diseases is available at https://sds-genetic-interaction-analysis.opendfki.de/gutbrain/.Contact naafey.aamer{at}cs.rptu.deCompeting Interest StatementThe authors have declared no competing interest.},
URL = {https://www.biorxiv.org/content/early/2025/12/30/2025.12.11.693657},
eprint = {https://www.biorxiv.org/content/early/2025/12/30/2025.12.11.693657.full.pdf},
journal = {bioRxiv}
}This project is licensed under the MIT License - see the LICENSE file for details.
For questions, issues, or collaboration opportunities, please:
- Open an issue on GitHub
- Contact: [naafey.aamer@dfki.de]