Skip to content

StochasticGutBrainModel is a computational simulation framework that explores the complex interactions between the gut microbiome, metabolites, hormones, and neural signaling in the gut-brain axis

License

Notifications You must be signed in to change notification settings

Wondermongering/StochasticGutBrainModel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

StochasticGutBrainModel

StochasticGutBrainModel is a computational simulation framework that explores the complex interactions between the gut microbiome, metabolites, hormones, and neural signaling in the gut-brain axis

A Stochastic Model of Gut-Brain Axis Dynamics with Microbiome Interactions

Project Description

StochasticGutBrainModel is a computational biology hobby project that simulates the complex interactions between gut microbes, metabolites, and host physiology using stochastic differential equations. This model integrates Lotka-Volterra dynamics for microbial communities with host hormonal signaling and neural feedback, revealing how diet, antibiotics, and stress can trigger critical transitions in both microbiome composition and metabolic function. Unlike deterministic approaches, this stochastic framework captures the inherent randomness of biological systems, exposing emergent phenomena like bistability, hysteresis, and early warning signals before system collapse. The project includes visualization tools for exploring bacterial community dynamics, metabolite production, and host responses over time. Created by a curious enthusiast (not a professional researcher), this project demonstrates how computational modeling can generate insights into the gut-brain axis and potentially inspire new questions about host-microbiome relationships. The model is not intended for clinical applications but serves as an educational exploration of complex biological systems.

StochasticGutBrainModel is a computational simulation framework that explores the complex interactions between the gut microbiome, metabolites, hormones, and neural signaling in the gut-brain axis. Unlike deterministic models, this project incorporates stochastic dynamics to capture the inherent randomness and noise in biological systems, revealing emergent behaviors and critical transitions that might be missed by traditional approaches.

This model simulates:

  • Gut hormonal signaling (GLP-1, Ghrelin) and their effect on energy homeostasis
  • Bacterial community dynamics using Lotka-Volterra equations for interspecies competition/cooperation
  • Microbial metabolite production (SCFAs: Butyrate, Propionate, Acetate)
  • Neural signaling via the vagus nerve
  • External perturbations like dietary changes, antibiotics, and stress
  • Critical transitions and bistability in both host and microbial systems

This is a hobby project created out of curiosity and interest in complex biological systems. The model is not intended to make clinical predictions but rather to explore theoretical dynamics and generate hypotheses about the gut-brain axis.

Dependencies

The model requires the following Python packages:

numpy
matplotlib
scipy
pandas

Optional (for network visualization):

networkx

Installation

  1. Clone this repository:
git clone https://github.com/Bashpoet/StochasticGutBrainModel.git
cd StochasticGutBrainModel
  1. Install dependencies:
pip install numpy matplotlib scipy pandas networkx

Model Structure & Assumptions

The model consists of coupled stochastic differential equations (SDEs) representing:

  1. Host Systems:

    • Hormonal dynamics (GLP-1, ghrelin)
    • Vagal nerve signaling
    • Energy homeostasis
  2. Microbiome Systems:

    • Bacterial community dynamics using Lotka-Volterra equations
    • Species interactions (competition, facilitation)
    • Metabolite production and degradation
  3. Environmental Perturbations:

    • Dietary inputs (fiber, protein, fat)
    • Antibiotic treatments
    • Stress responses

Key assumptions:

  • Multiplicative noise in biological variables (noise scales with concentration)
  • Non-linear feedback mechanisms that can create bistability
  • Species-specific production of microbial metabolites
  • Simplified representation of diet composition effects on bacterial growth

Usage Examples

Basic Simulation

# Create model with specified parameters
model = StochasticGutBrainModel({
    'fiber_intake': 0.6,
    'sigma_bacteria': 0.05
})

# Run simulation
t, y = model.simulate_sde(t_span=(0, 200), dt=0.05, seed=42)

# Visualize results
fig = model.visualize_simulation(t, y, title="Baseline Gut-Brain Dynamics")
plt.show()

Antibiotic Perturbation Experiment

# Simulate antibiotic treatment
abx_results = model.simulate_antibiotic_perturbation(
    antibiotic_start=50,
    antibiotic_duration=30,
    recovery_duration=150,
    antibiotic_strength=0.8
)

# Visualize results
fig = model.visualize_antibiotic_experiment(abx_results)
plt.show()

Dietary Shift Experiment

# Simulate dietary changes
diet_results = model.simulate_diet_shifts([
    {'time': 0, 'fiber': 0.2, 'protein': 0.6, 'fat': 0.7},   # Low-fiber, high-fat diet
    {'time': 100, 'fiber': 0.8, 'protein': 0.3, 'fat': 0.2}, # High-fiber, low-fat diet
    {'time': 200, 'fiber': 0.5, 'protein': 0.5, 'fat': 0.5}  # Balanced diet
], duration=100)

# Visualize results
fig = model.visualize_diet_experiment(diet_results)
plt.show()

Disclaimer

This is a hobby project created by an enthusiast with an interest in complex biological systems and computational modeling. It is not intended to be used for medical purposes or to make clinical predictions. The model is based on theoretical principles and simplified representations of biological systems.

I am not a professional researcher in this field, just a curious individual exploring these concepts with the help of computational tools and large language models. The code and underlying model should be considered speculative and for educational purposes only.

Feedback, suggestions, and contributions are welcome!

Acknowledgments

This project was inspired by:

  • Recent research on the gut-brain axis and microbiome dynamics
  • Mathematical models of ecological communities
  • Stochastic modeling techniques in systems biology
  • The power of computational exploration to understand complex systems

Special thanks to the scientific Python ecosystem (NumPy, SciPy, Matplotlib, Pandas) and to Claude Sonnet 3.7 and Gemini 2.0 Pro for assistance with code development and refinement.

Contact

If you have questions or suggestions, please open an issue on this repository.


"All models are wrong, but some are useful." - George Box

Releases

No releases published

Packages

No packages published

Languages