An adaptive network model of the role of the microbiome-gut-brain axis in insomnia

This paper presents an adaptive network model simulating the role of the gut microbiome for triggering bio- logical mechanisms that alter the circadian cycle, mood and insomnia via the microbiome-gut-brain axis. Simulation graphs provide insight into how these immune and endocrine pathways interact with each other when the levels of the probiotics, Lactobacillus and Bifidobacteria, and pathogenic bacteria were altered. Varying these factors in simulations produced different outcomes for insomnia and sleep deprivation.


Introduction
Gut dysbiosis has been shown to worsen depression, anxiety, and insomnia; over 50 % of patients with irritable bowel syndrome (IBS) suffer from these neuropsychiatric disorders (Li et al., 2018). This highlights the importance of regulated intestinal microbiota as this can help manage these conditions (Smith et al., 2019).
Insomnia is the most common sleep disorder in which the individual has difficulty falling or staying asleep (Roth, 2007). Many factors influence the onset of this disorder including genetics, biochemistry, and various neuroendocrine, immune, and psychosocial factors (Kang et al., 2022). The gastrointestinal microbiome has been evidenced to affect insomnia (Li et al., 2018). Prebiotics, probiotics, synbiotics and faecal microbiota transplantation are treatments that address gut dysbiosis and may be useful for treating neuropsychiatric disorders like insomnia (Kang et al., 2022).
The circadian clock is a 24-hour biological rhythm in the brain that follows the solar day through light-dark cycles. Evidence shows the negative impact a dysregulated circadian clock can have on depression and sleep disorders (Walker et al., 2020). The gut microbiome has been shown to influence transcription of circadian genes, in turn influencing the circadian clock of the host. Therefore, maintaining a healthy gut microbiota is important for regulating host circadian rhythm. This relationship is bidirectional because the composition and metabolism of the microbiome is affected by the circadian rhythm and sleep cycles (Li et al., 2018). The adaptive network model introduced here summarises the role of the microbiome-gut-brain-axis on the production of insomnia-related hormones: serotonin, melatonin, and cortisol, via the regulation of clock gene transcription, to govern circadian rhythm (Li et al., 2018). Useful insight into the intestinal microbiomes' effect on insomnia was provided by comparing the simulation graphs altering the presence/ absence of probiotic bacterial genera, Lactobacillus and Bifidobacteria, and pathogenic bacteria on insomnia and sleep deprivation.

Background literature
The gastrointestinal microbiome is the population of microorganisms living there. This microflora plays a crucial role in many physiological processes; however, many of these mechanisms remain underexplored (Kang et al., 2022). The gut microbiome affects the digestive, metabolic and the immune system whilst regulating sleep and mental conditions by aiding in digestion, nutrient uptake, regulation of gene expression, immune system development and the microbial synthesis of essential vitamins (Kaur, 2019). The influence of the microbiome on physiological processes of the gut can alter physiological mechanisms in related brain centres via the gut-brain axis. The gastrointestinal tract communicates with emotional and cognitive brain centres, bidirectionally, along the gut-brain axis by utilising neurotransmitters, hormones, cytokines, and humoral factors (Carabotti et al., 2015). Changes in the composition of the microbiome can create dysbiosis that is linked to many diseases including neuropsychiatric disorders such as depression, anxiety, and insomnia (Li et al., 2018;Wallen et al., 2020).
There are three pathways that form the gut-brain axis, which the microbiota can influence: the immunoregulatory pathway, neuroendocrine pathway, and the vagus nerve pathway. Microbiota interact with the immune cells in the immunoregulatory pathway to influence levels of cytokines, cytokinetic reaction factors and prostaglandin E2. The neuroendocrine pathway is how the enteroendocrine cells affect the hypothalamic-pituitary-adrenal (HPA) axis and the central nervous system (CNS) by regulating tryptophan availability, cortisol and serotonin secretion. Tryptophan is an essential amino acid precursor for the biosynthesis of both serotonin and melatonin and is mainly sourced from the diet, different species living in the gut alter the availability of this molecule for host metabolism (Gao, 2019). The vagus nerve pathway is activated when sensory neurons of the myenteric plexus are stimulated by contact with these microorganisms. Sensory neurons have synaptic connections to motor neurons controlling GI tract motility as well as gut hormone secretion. The vagus nerve connects the intestinal nervous system to the brain. Having a high concentration of pathogenic bacteria in the microbiome can lead to an excess of neurotoxic metabolites entering the CNS via the vagus nerve. This impacts on sleep cycles and stress response (Li et al., 2018). Ingesting probiotics has been shown to improve the levels of beneficial microorganisms that compose a healthy gut microbiome. Lactobacillus and Bifidobacteria are beneficial bacterial communities that modulate host immune response and compete with other intestinal microorganisms to regulate microflora diversity (Bravo et al., 2011), (Desbonnet et al., 2008), (Cryan & Dinan, 2012).
Toxins and antibiotics can trigger gut immune cells to secrete proinflammatory cytokines which can lead to greater gut permeability and an environment that encourages gut dysbiosis. Higher levels of gut permeability allow more pathogenic bacteria, and/or their toxins, to escape into the bloodstream causing damage around the body, including in the brain (Rude et al., 2019). Sleep difficulty from circadian misalignment can subsequently be attributed to this inflammatory response (Li et al., 2018). The HPA axis coordinates the stress response via production and regulation of the stress hormone cortisol (Thau & Sharma, 2019). High levels of inflammatory cytokines trigger corticotropin-releasing factor (CRF) to be released by the hypothalamus subsequently causing adrenocorticotropic hormone (ACTH) to be released from the pituitary gland and ending with cortisol being secreted from adrenal glands (Carabotti et al., 2015). Cortisol is the main stress hormone in the body. The toxic metabolites that escape into the bloodstream can trigger the HPA axis to increase production of cortisol and therefore misalign the circadian rhythm making insomnia worse. Higher levels of cortisol have been linked to sleep disorders (Hackett et al., 2020).
Melatonin is the main sleep regulating hormone as it helps modulate circadian rhythm due to it only being synthesised in response to darkness (Poza, 2020). The sleep-wake cycle becomes synchronised to this night-day rhythm (Suni & Dimitriu, 2009). The suprachiasmatic nucleus (SCN), in the hypothalamus, regulates the release of melatonin from the pineal gland and this then activates the G-protein coupled melatonin receptors MT(1) and MT(2) to regulate the sleep cycle (Dubocovich, 2007). Serotonin is also a chemical, acting as both neurotransmitter and hormone, that plays a key role in mood and sleep among many other physiological functions. Low levels of this molecule have been linked to neuropsychiatric disorders like depression and insomnia (Vashadze, 2007). A regulated serotonergic system ensures sleep, and the homoeostatic response to sleep deprivation, functions healthily (Oikonomou, 2019). In high concentrations it is associated with promoting wakefulness, whilst sleep mechanisms become downregulated, such as those promoting REM sleep (Watson, 2010). Serotonin, unlike melatonin, is produced primarily in the day, this is then used to synthesise melatonin at night. Therefore, low abundance of serotonin can subsequently decrease levels of melatonin which may dysregulate the circadian rhythm and worsen insomnia. Furthermore, stress has the effect of reducing serotonin production so insomnia sufferers should try to avoid unnecessary stress (Hurd, 2022).
There is not enough evidence to suggest that ingesting melatonin as a dietary supplement is effective in promoting healthy sleep for patients with insomnia. The safety, both short and long-term, regarding this is also still being researched for unwanted side effects (National Center for Complementary and Integrative Health) (Suni & Dimitriu, 2009). Drugs already on the market for treating insomnia include benzodiazepines and non-benzodiazepines; however, the side effects and tolerance/ dependence issues that come with using these drugs on the long term imply that a better solution is needed (Cunnington et al., 2013). The relationship between serotonin and melatonin is delicately balanced to ensure a healthy sleep cycle. Perhaps increasing melatonin levels could be more effectively and safely achieved by using a probiotic treatment that increases melatonin synthesis in a more regulated way than by taking melatonin promoting drugs/supplements directly, as there would be more physiological pathways involved to modulate the melatonin synthesis. This could also mean fewer side effects. Further research would need to be done into the exact mechanisms for how the microbiome-gut-brain axis affects insomnia for a tailored probiotic treatment to be developed that is as effective, or more effective, than current drugs on the market (Kang et al., 2022) (Sen, 2021).
To conclude, it is important to ensure a healthy gut microbiome for patients with neuropsychiatric disorders, such as insomnia, as good intestinal microbiota can help regulate sleep (Li et al., 2018). Simulating alterations of the different biological mechanisms behind the interactions, between the intestinal microbiota, nervous and immune systems, provides greater understanding for these neuropsychiatric disorders so more effective treatments can be made.

Network-oriented modelling for adaptive networks
In order to model the processes by which the gut microbiome affects sleep quality, we used the network-orienting modelling approach for adaptive causal networks described in (Treur, 2020) and (Treur, 2016). The proposed causal network model focusses on the effects of the presence of probiotics in the gut microbiome and how it affects a person's stress response and ability to sleep. The connections shown in the model are based on the gut-brain axis, with a specific emphasis on the hypothalamic-pituitaryadrenal axis, or HPA axis, and the immunoregulatory response. The network-oriented modelling approach used is based on the following characteristics (Treur, 2020):  • Connectivity: If within the network a state X has a connection to state Y, the strength of the connection, or connection weight, is denoted by some ω X,Y ∈ [− 1, 1].
• Aggregation: To determine how causal impacts onto a state are aggregated, each state Y has a combination function c Y (..). • Timing: To determine how quickly a state changes its value based on causal impact, each state Y has a speed factor η Y ≥ 0.
This network can be defined by a series of role matrices, which for the introduced model can be found in Appendix 1, and it can also be conceptualised through diagrams (see Fig. 1). In addition, every state has an initial value, which can also be found in Appendix 1. Using the characteristics listed above, the model follows this numerical difference equation to simulate all states Y given their values at time t: Fig. 2.1.  Fig. 2.2.Fig. 3.1.Fig. 3.2.Fig. 4.1.Fig. 4.2.
In our model, our chosen time step Δt = 0.5, and our selected combination functions from the available library used in the base-level network are as follows in Table 1: To more accurately reflect the adaptive processes that characterises neural activity in the brain, our model includes two levels of selfmodelling. In the higher levels, characteristics from the (sub)networks in lower levels are represented by states in higher levels through a process called network reification (Treur, 2020). In this way, it is not only the values of states that change over time, but also each of the network characteristics. In our model, we have.
• a base network at the base-level (lower plane in Fig. 1) • a first-order adaptation model at the first-order reification (selfmodel) level that changes characteristics of the base-level network (middle plane if Fig. 1) • a second-order adaptation model at the second-order reification (self-model) level that changes characteristics of the first-order reification level (upper plane in Fig. 1).
In our adaptive network model, we use the following reification (or    self-model) states: • Connectivity: For states X and Y, the reification state W X,Y is used to represent the connection weight ω X,Y of a connection from X to Y.
• Timing: For a state Y, the reification state H Y is used to represent the speed factor η Y of Y. Similar to our base-level states, the reification states can be defined by role matrices and initial values, which can be found in Appendix 1. Our reification states also have combination functions to define how their inputs are aggregated. These combination functions are listed below in Table 2.

The adaptive network model for the gut-brain axis, probiotics, and insomnia
Using the adaptive network modelling approach described in (Treur, 2020), we developed a second-order adaptive network model to model

Table 1
The basic combination functions from the library used in the base-level network model.

Notation
Formula Parameters Carrying capacity κ Table 2 The basic combination functions from the library used for the first-and second-order of the network.  the gut microbiome's effect on insomnia and sleep deprivation. Fig. 1 depicts a graphical representation of this model. The white boxes represent states on the base level of the model, the ones in blue represent reification states on the first-order adaptation level, and the ones in green represent reification states on the second adaptation level. Arrows in black represent connections with positive connection weights, and arrows in red represent connections with negative connection weights. Arrows in blue represent connections from the base level to the first level, and arrows in green represent connections from the base level to the second level. Lastly, arrows in pink represent changes to the network characteristics of states on lower levels of the network model. Table 3 lists out the names and descriptions of each of our states. Our model integrates multiple pathways in the gut-brain axis. Specifically, we focus our model on the HPA axis and the immunoregulatory pathway. These pathways connect the gut microbiome with specific neurotransmitters that directly impact one's sleep quality. Because neurotransmitters are transmitted through adaptive neural pathways, we have selected all of the connections related to the three neurotransmitters in the model (cortisol, serotonin, and melatonin) to have adaptive connection weights. Furthermore, since it is assumed that these connections get stronger over time in an accelerating manner, our W-states that indicate connection reification are also connected to H-states, which influence timing of them. Since immune cells also exhibit immunological memory, we have also included adaptivity in our simulation of an immune response. In addition, to reflect the adaptivity of the stress response, our connection between the external stressor and the stress response has also been made adaptive.
On the base level, four states are independent states with no incoming influences: LAC, BIF, BBG, and EXTSTR (X 1 , X 2 , X 3 , and X 20 , respectively). Because X 1 , X 2 , and X 3 are bacteria, we decided to model bacterial growth over time using the bounded growth combination function for the classical Verhulst (1838) model, so the population of bacteria in the system steadily increases over time until it reaches the carrying capacity κ of 0.9. State X 20 remains constant and uses the identity combination function, as we wanted to observe the influence of the gut microbiome on the sleep quality of an individual experiencing some external stressor. For all other states (except W-states) with only one incoming influence, we used the identity combination function, and all states with multiple incoming influences use the advanced logistic sum combination function. To model adaptivity, all W-states use the Hebbian learning combination function.
We modelled two pathways of the HPA axis. The first pathway is triggered by X 1 , or the presence of Lactobacillus, which is detected by the enteroendocrine cells in the intestines, X 8 , which in turn triggers the HPA axis X 9 , and it results in reduced cortisol production, X 10 . The second pathway is triggered by X 2 , or the presence of Bifidobacteria, which again is detected by the enteroendocrine cells in the intestines X 12 , which in turn triggers the HPA axis X 13 , resulting in serotonin production X 14 . State X 2 also incidentally increases the value of X 17 , tryptophan availability, which allows for more melatonin production X 18 , which helps the brain better regulate clock genes X 19 , and reduce insomnia X 15 , and sleep deprivation X 16 .
We also modelled the immunoregulatory pathway. Through X 3 , the presence of bad bacteria in the gut, immune cells in the gut X 4 , that detect the bacteria trigger the release of inflammatory cytokines X 5 . Inflammation in the gut causes the spaces between intestine cells to widen, increasing gut permeability X 6 , which allows more bad bacteria to move into the blood X 7 . Unwanted bacteria in the blood also triggers the HPA axis X 9 , that results in the production of cortisol X 10 .
The neurotransmitters in this model play a special role in regulating insomnia and sleep deprivation. Cortisol increases insomnia, whereas melatonin and serotonin improve the brain's ability to regulate clock genes. Clock gene regulation in turn downregulates insomnia.

Simulated scenarios of the second-order adaptive network model
In this section, we will describe in detail which specific scenarios we decided to model in the dedicated software environment in MATLAB with respect to our domain, our intended expectations from the simulations we ran and our final inferences from the graphs generated. For the sake of simplicity, we ignore the first-and second-order adaptive states for the purpose of analysis.
Scenario 1: Low levels of probiotics, high levels of bad bacteria in gut. X 1 LAC Lactobacillus presence in gut initial value set to 0 X 2 BIF Bifidobacteria presence in gut initial value set to 0 X 3 BBG Bad bacteria presence in gut initial value set to 1 In the first simulation, we intended to look at the effects produced on the system's state of insomnia X 15 and its corresponding effect felt as sleep deprivation X 16 in the scenario of imbalance of bacteria such that we have no probiotics such as the cortisol-regulating Lactobacillus or the serotonin-regulating Bifidobacteria present in the gastrointestinal tract, but we do have bad/pathogenic bacteria such as Clostridium perfringens, Staphylococcus, or Escherichia coli, etc. that release toxins and/or trigger disease. This is what we term 'dysbiosis'. As expected, we can see the X 4 state, the immune cell response, to increase to bring the level of BBG down. This, in turn, increases the cytokine response, our X 5 state, till the BBG state is brought under control. This causes gut permeability to increase [X 6 state], leaking the bad bacteria into the bloodstream [X 7 state]. EEC1 is not activated [X 8 state] as there is no LAC, and the first HPA axis [X 9 state] is only triggered by the bad bacteria that are now present in the bloodstream, leading to its role in increasing cortisol production [X 10 state]. On rising, however, this cortisol now acts on the stress levels which show a rapid peak in the beginning of our graph [X 11 state], augmenting the perceived effect of stress further. The EEC2, the second HPA axis regulated by the EEC2 and the pertaining serotonin generation [X 12 , X 13 and X 14 states respectively] remain at zero throughout, due to BIF being absent. The most important states to note here are, however, the X 15 insomnia and the X 16 sleep deprivation states which show an upward trend till the end, as can be predicted in the absence of probiotic regulation. Tryptophan availability [X 17 state], melatonin production [X 18 state] and clock gene regulation [X 19 state] are all low as HPA2 is inactive. External stressor [X 20 state] is set to 1 throughout our time of simulation.

X1
LAC Lactobacillus presence in gut initial value set to 1 X2 BIF Bifidobacteria presence in gut initial value set to 1 X3 BBG Bad bacteria presence in gut initial value set to 0 In the second simulation, we do the opposite of our first. We set the initial values of our two good bacteria to 1 and of the bad bacteria to 0. Our intention with the first two cases here is to look at how the two different categories of bacteria present in the gut behave irrespective of each other's presence. This case is what a healthy state would look like in the most ideal situation. In this simulation, LAC and BIF, our probiotic bacteria, are represented with the help of the bounded growth function while BBG is absent. Due to the absence of bad bacteria in the gut, no immune or cytokine response is generated [X 4 and X 5 states, respectively]. Moreover, the situation of gut permeability [X 6 state] or that of bad bacteria leaking into the bloodstream [X 7 state] does not arise.
The first HPA axis [X 9 state] is triggered by LAC through EEC1 [X 8 state] which has a negative impact on it, thereby keeping it to a low. Cortisol production shows a dip due to this but due to the constant (=1) presence of external stressor factor [X 20 state], it rises again in the end. We see that the body stress levels [X 11

Discussion
In this section, we discuss ideas for developing extended versions of our model, its present limitations, and a general conclusion for our domain in brief.
• Bacteria in competition: negative mutual connections Good and bad bacteria could be modelled to compete for food and resources to grow and proliferate in the same home environment [gut], which then could have implications for the mood and sleep of the person.
• Holistic view and real-world implications Our approach delved deeper into the biological principles of the gutbrain axis as our approach was to observe the effects of the levels and the combinations of the levels of specific bacteria present in the gastrointestinal tract. A more holistic and practical consideration could be given to explicitly perceived states such as jet lag, eating disorders, night shifts etc. and their consequential effects on the circadian rhythm and pertaining probiotic regulation (Goetzinger et al., 2021).
• state where all the 3 bacteria are active and interacting We had 0-0-1, 1-1-0, and 0-0-0 initial values to start our simulations for the levels of Lactobacillus, Bifidobacterium and the pathogenic bacteria respectively but we did not have a scenario where all three strains are simultaneously present, active and interacting in the gut microbiome -which would be a case of a person infected with the pathogens but also having the usual probiotics.

• Different external stressor values
We could additionally alter the values of the external stressor and change its speed factors as an everlasting stress input is not typical. Tuning could be used to this end.
• Opportunistic bacteria Apart from good and bad bacteria, we could model another strain called 'opportunistic bacteria' that lays dormant in the gut until the immune system of the body reaches a state low enough for it to switch to pathogen mode and secrete toxins like the BBG.
Mentioned above are some areas that further research can be done into, in this domain. But otherwise, our model suffices as both a simplified and organised effort into modelling bacteria present in the gut microbiome and their role on the overall mood, sleep-wake cycles, circadian rhythm and any resultant sleep disorders in the person such as insomnia.

Declaration of Competing Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

Data availability
Data will be made available on request.

Appendix. Role matrices and initial values
Note: Values shaded in yellow indicate adaptivity for that particular characteristic.