Computational Analysis of the Adaptive Causal Relationships Between Cannabis, Anxiety and Sleep

  • Merijn van Leeuwen
  • Kirsten Wolthuis
  • Jan TreurEmail author
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 12137)


In this paper an adaptive computational temporal-causal network model is presented to analyse the dynamic and adaptive relationships between cannabis usage, anxiety and sleep. The model has been used to simulate different well-known scenarios varying from intermittent usage to longer periods of usage interrupted by attempts to quit and to constant usage based on full addiction. It is described how the model has been verified and validated by empirical information from the literature.

1 Introduction

In this paper an adaptive network model is used to show how an adolescent turns to cannabis (a synonym to marijuana) in an attempt to ease his or her anxiety and associated negative emotions. These processes involve emotional regulation, but also habit formation and addiction. The following short scenario depicts how an individual may find temporary relief in cannabis or marijuana usage, but ends up with higher levels of anxiety than at baseline:

An adolescent is experiencing anxiety in his daily life and struggles to cope with the difficulties it brings, leading to negative emotions which further fuel his anxiety. He remembers cannabis advocates promoting the stress-relieving effects of cannabis and decides to give it a try. Cannabis seems to instantly relieve his stress, reducing his negative emotions. This positive effect on his emotions causes him to develop a usage habit over time. However, the impact cannabis has on his sleep quality gradually leads to a further increase in his anxiety and consequently his negative emotions. Besides, his friends and those around him start to express their discontent with his new habit and his reduced interest in social activities, while the negative effects cannabis has on his cognition lead to forgetfulness and reduced performance. Together, these two factors cause stressful events, increasing his anxiety.

The literature shows that cannabis usage may provide an instant relief of anxiety symptoms, making many individuals seek this desirable effect [2, 6]. Despite the initial benefits of self-treating with cannabis, its usage poses two major implications for sleep architecture. This refers to the different phases of sleep an individual goes through. The relative proportions of sleep phases within the sleep architecture determine the sleep quality an individual is getting [4].

First, cannabis has been shown as bringing about reductions in Rapid-Eye Movement (REM) sleep, both acutely and long-term [8, 16]. Secondly, acute usage causes a temporary increase in the restorative Slow Wave Sleep (SWS) during the first 4 days of usage [1]. After 4 days, time spent in SWS phase gradually reduces until it is significantly below baseline levels after about 8 days [1]. These disruptions of normal sleep architecture may negatively affect the anxiety for which cannabis use was started in the first place. Disrupted sleep has been associated with a wide range of mental and physical health problems and impairments in daily life [5, 17]. Particularly the gradual buildup of sleep deprivation over a longer period of time has been associated with an increase in anxiety [9, 13]. Thus, the alterations of sleep architecture induced by cannabis usage may indirectly lead to higher levels in anxiety. Besides this mediation of the relationship between cannabis usage and anxiety by sleep deprivation, other factors associated with cannabis usage may also cause an increase in anxiety.

The first factor could be fear of being caught with illegal possession of cannabis, as a consequence of cannabis being illegal in many parts over the world. Second, its daily usage is often associated with a certain stigma, even in the Netherlands. In turn, being stigmatized is a known stressor [11]. Satterlund et al. [15] found this specific stigma and the associated stress in a study among Californian medical cannabis users. Third, cannabis usage reduces motivation among users by, among other factors, blunting the dopamine system [21]. This reduced motivation may translate into an unwillingness to pursue previously valued goals or (social) activities, making the person seem uninterested. Finally, marijuana usage is known to negatively affect cognitive performance [3, 14, 22], which may be noticed by colleagues or reflected in academic performance. Stress over academic performance is known to induce anxiety among college students [12]. Combined, these factors may increase a cannabis users’ stress levels which, in turn, increases anxiety [10]. Finally, the anxiety response to stressful events increases over time as the frequency increases, termed priming [20].

In the next section, scenarios like the one depicted above are modeled by an adaptive temporal-causal network model [18, 19]. Section 3 shows simulations for three variants of this scenario corresponding to patterns known from the empirical literature, while Sects. 4 and 5 show verification by analysis and validation using parameter tuning, respectively.

2 The Adaptive Computational Network Model

In this section, first the Network-Oriented Modeling approach used is described, after which the specific introduced network model for dynamics and adaptation of the interaction between marijuana usage, anxiety and sleep quality is presented.

2.1 Network-Oriented Modeling for the Design of Adaptive Networks

The adaptive computational network model is based on the Network-Oriented Modelling approach based on reified temporal-causal networks described [19]. The network structure characteristics used are as follows. A full specification of a network model provides a complete overview of their values in so-called role matrix format.
  • Connectivity: The strength of a connection from state X to Y is represented by weight ωX,Y

  • Aggregation: The aggregation of multiple impacts on state Y by combination function cY(..).

  • Timing: The timing of the effect of the impact on state Y by speed factor ηY

Given initial values for the states, these network characteristics fully define the dynamics of the network. For each state Y, its (real number) value at time point t is denoted by Y(t). Each of the network structure characteristics can be made adaptive by adding extra states for them to the network, called reification states [19]: states WX,Y for ωX,Y, states CY for cY(..), and states HY for ηY; for specific models such reification states can be given names that are more informative in the context of the particular application. Such reification states get their own network structure characteristics to define their (adaptive) dynamics and are depicted in a higher level plane, as shown by the upper plane in blue in Fig. 1. For example, using this, the adaptation principle called Hebbian learning [7], considered as a form of plasticity of the brain in cognitive neuroscience (“neurons that fire together, wire together”) can be modeled.

A dedicated software environment (implemented in Matlab) is available by which the conceptual design of an adaptive network model is automatically transformed into a numerical representation of the model that can be used for simulation; this is based on the following type of (hidden) difference of differential equation defined in terms of the above network characteristics:
$$ \begin{aligned} & Y(t\, + \,\Delta t)\, = \,Y(t)\, + \,{\varvec{\upeta}}_{Y} \text{[}{\mathbf{aggimpact}}_{Y} (t) - Y(t)]\,\Delta t\;{\text{or}}\;{\text{d}}Y\left( t \right)/{\text{d}}t\, = {\varvec{\upeta}}_{Y} [{\mathbf{aggimpact}}_{Y} (t) - Y(t)] \\ & {\text{with}}\;{\mathbf{aggimpact}}_{Y} (t)\, = \,{\mathbf{c}}_{Y} ({\varvec{\upomega}}_{X_{1},Y} X_{ 1} (t), \ldots ,{\varvec{\upomega}}_{X_{k},Y} X_{k} (t)) \\ \end{aligned} $$
where the Xi are all states from which state Y has incoming connections. Different combination functions are available in a library that can be used to specify the effect of the impact on a state (see [18, 19]). The following three of them are used here:
  • the advanced logistic sum combination function with steepness σ and threshold τ
    $$ {\mathbf{alogistic}}_{{\upsigma,\uptau}} (V_{ 1} , \, \ldots ,V_{k} )\, = \,\left[ {\frac{1}{{1 + {\text{e}}^{{{ - {\varvec{\upsigma}}}} \left( {V_{1} + \ldots + V_{k} - {\varvec{\uptau}}} \right)}}} - \frac{1}{{1 + {\text{e}}^{{{\varvec{\upsigma \uptau }}}} )}}} \right]\left( {1 + {\text{e}}^{{{-\varvec{\upsigma \uptau }}}} } \right) $$
  • the Hebbian learning combination function hebbμ(..)
    $$ \mathbf{hebb}_{\upmu }({V_{\rm{1}}},{V_{2}},W)\, = \,{V_{1}}{V_{2}}\left( {{\rm{1}} - W} \right)\, + \upmu {W} $$
    with μ the persistence parameter, where V1 stands for X(t), V2 for Y(t) and W for WX,Y(t), where X and Y are the two connected states
  • the complementary identity combination function compid(..)
    $$ {\mathbf{compid}}(V)\, = \, 1- V $$

2.2 The Introduced Adaptive Computational Network Model

The adaptive temporal-causal network model introduced here is depicted graphically in Fig. 1. Table 1 provides an overview of the states. A state X8 with complementary identity function was used to model the relaxing effect that marijuana has on anxiety. Thus, marijuana usage V leads to an effect of 1 − V which is then propagated to lower anxiety state X1. A similar state with a complementary identity function was used for SWS, so that there is a delay in onset of decreased SWS as described in the literature.
Fig. 1.

Graphical conceptual representation of the introduced adaptive network model

Table 1.

Overview of states within the network model

The reification states represent the habit formation of cannabis usage (by Hebbian learning) HF (state X10 or \( \textbf{W}_{{X_{7}},{X_{1}}} \)) and the priming of anxiety P (state X11 or \( \textbf{W}_{{X_{2}},{X_{3}}} \)). This priming refers to developing a more sensitive and increased anxiety response to stressful events over time.

As can be seen in Fig. 1, affected by Stressful events X7, Anxiety X1 leads to Negative emotions X2 which trigger Marijuana usage X3. This leads to a relaxation effect X8 which decreases Anxiety X1 and in turn Negative emotions X2. However, Marijuana usage X3 after a while also leads to Bad SWS sleep X5 and Bad REM sleep X4, together making Bad sleeping quality X6, which in turn increases Anxiety.

Moreover, Marijuana usage X3 and Bad sleep quality also contribute to Stressful events X7. So, there are a number of cycles in this causal model, which gives it nontrivial basic dynamics. In addition, also adaptive dynamics occurs in the form of Habit formation X10 and Priming X11 that model forms of Hebbian learning by which the causal connections to Marijuana usage X3 and Anxiety X1 are strengthened. For simulations the chosen combination functions for the different states were as follows:

The specification of the adaptive network model by role matrices [19] can be found at In Sect. 3 the behaviour for three different scenarios (describing patterns well-known from empirical literature) will be explored.

3 Simulation Experiments

Three scenarios were simulated using the dedicated modeling environment. The scenarios are cyclical use (Scenario A); more substantial usage with occasionally a failed quit attempt (Scenario B); and constant usage in an equilibrium state where the person does not stop using marijuana (Scenario C).

3.1 Scenario A: Cyclic Usage

This first scenario shows cyclical behaviour that does not reach an equilibrium. The cyclical behaviour simulates a person who decides to use marijuana, but then soon afterwards again decides to stop using it; however, due to high anxiety that occurs after stopping, the person starts using again, and this pattern repeats itself indefinitely. Settings for most of the network characteristics by role matrices [19] can be found in Table 2, in particular for role matrices mb (matrix for base connections), mcw (matrix for connection weights) and ms (matrix for speed factors). Each row in such a role matrix indicates for a given state the states (in red cells) or constant values (in green cells) that affect this state for the given role. For example, in mb the row for the anxiety state X1 indicates that this state is affected from the base role by states X2, X6, X7 and X8. In role matrix mcw it is indicated that X1 is affected from the connection weight role by 0.1, 0.1, 0.1, and 1, respectively, and in matrix ms it is indicated it is affected from the speed factor role by 0.4. For the adaptive cases, in role matrix mcw it is indicated that X1 is affected from the connection weight role for its third incoming connection by X11, and similarly X3 is affected from the connection weight role for its incoming connection by X10.
Table 2.

Role matrices mb, mcw and ms for Scenario A

The simulation of this scenario is shown in the graphs in Figs. 2 and 3. In Fig. 2, it is visible that the states X5, X6, and X7 for Bad sleep and Stressful events reach an equilibrium state. State X5 (bad SWS sleep) takes a longer time to reach an equilibrium because the slow wave sleep becomes worse the longer marijuana is used. State X6 and X7 also reached an equilibrium, since they were influenced by the bad SWS sleep.
Fig. 2.

Cyclic usage behaviour for the base states

Fig. 3.

Cyclic usage behaviour for the reification states modeling adaptation.

The other four states do not reach an equilibrium, but showed the cyclical behaviour that was expected. It is interesting to see that the first use led to a lower increase in anxiety in comparison to the use of marijuana after the first time. The behaviour of the habit formation (state X10) and primig (state X11) are shown in Fig. 3. It is visible that the Habit formation fluctuates around 0.6, while the Priming fluctuates around 0.85. These adaptive states both did not reach an equilibrium, since their incoming states showed the fluctuating behaviour.

3.2 Scenario B: Occasional Failed Quit Attempts

In this scenario, a user starts using marijuana and uses it for some time, which reduces his/her anxiety. However, after some time the user decides to stop using because his anxiety levels are higher than at baseline. The user makes a quit attempt that does not succeed because his/her anxiety increases too much. The user then again decides to start using again until a new (failed) quit attempt. Table 3 specifies the role matrices mcw and ms for this scenario.
Table 3.

Role matrices mcw and ms for Scenario B

Figures 4 and 5 show the results from the simulation. In Fig. 4 it is visible that again the states X5, X6, and X7 reach an equilibrium because of the behaviour of state X5 (bad SWS sleep). The other states, in comparison to their behaviour in Scenario A, have longer stationary time periods, which only decrease during the quit attempt. It is also noticeable that the quit attempts are short and that the user starts using again within a couple of days. Figure 5 shows that the habit formation and priming increase fast in the beginning. After they reached their highest value, they start to fluctuate because of the failed quit attempts made by the user.
Fig. 4.

Recurring quitting behaviour for the base states.

Fig. 5.

Recurring quitting behaviour for the reification states modeling adaptation.

3.3 Scenario C: Equilibrium Addiction State

Scenario C depicts a constant increase in usage. After a time, all states reach an equilibrium, meaning that the habit of using cannabis has solidified, the individual is constantly having bad sleep quality and higher anxiety levels than at baseline. This represents a cannabis user who might fear quitting his habit, and craves the initial relaxing effects it gave him. Table 4 specifies the role matrices mcw and ms for this scenario.
Table 4.

Role matrices mcw and ms for Scenario C

Figures 6 and 7 show the behaviour of the states over time.
Fig. 6.

Equilibrium addiction for the base states.

Fig. 7.

Equilibrium addiction for the reification states modeling adaptation

4 Verification and Validation of the Computational Model

In this section it is shown how the model was verified by mathematical analysis and how it was validated using empirically based data and parameter tuning.

4.1 Verification of the Model by Mathematical Analysis

To verify the model, the above Scenario B was analysed, representing a user who uses fairly constantly but also occasionally attempts to quit, albeit unsuccessfully. For a number of selected stationary points, the difference between the aggregated impact and the state value assigned was calculated, following [18], Ch 12. According to Eq. (1), theoretically this difference should be 0 in a stationary point, and in practice it should be close to 0. The formulas used were dependent upon the combination function utilized for the concerning state. The deviations found are significantly small (see Table 5, last row), meaning that there were no notable errors within the network model which would require attention.
Table 5.

Verification of the model by mathematical analysis of stationary points

4.2 Validation of the Model by Parameter Tuning

For the following five states empirically based values were used for the tuning: Marijuana usage (X3), Bad REM sleep (X4), Bad Slow-Wave Sleep (X5), Stressful events (X7), Habit formation (X10). Table 6 shows the time points and the corresponding empirical values for which the model was tuned for these five states. These empirical data simulate a case in which the user increasingly uses more cannabis over time, reflected by the gradual increase among all values (similar to Scenario B in Sect. 3). Bad Slow-Wave-Sleep sets in after 4 days, as described in the literature. As this literature only provides qualitative indications which had to be hand-mapped onto numbers, the precision of these empirical data cannot be expected to be perfect.
Table 6.

Empirically based values used for parameter tuning

Time points states










































The parameter tuning by Simulated Annealing was applied to 56 parameters (for all nonadaptive network characteristics and initial values, represented by the values in the role matrices), with minimum value 0 and a maximum value of [50, 1] for all logistic function parameter values σ and τ; for the rest of the parameters the value interval was [0, 1]. The five lowest RMSE values found are 0.202517, 0.235468, 0.236067, 0.252116, 0.253504. Given the imprecision of the data, this may not be worse than to be expected. The first option was used for the parameters for the final simulation. This final simulation is compared to the empirical data per state in Fig. 8.

In the graphs, the red line represents the simulated data and the black points represent the empirical data. The first state that is compared is state X3. It is visible in this graph that the simulated data lies a bit higher than the empirical data.

It is visible that for X4 the simulated data has got a high initial value, which does not correspond with the empirical data. Except for the first two points of the empirical data, the tuned model and empirical data have the same shape, so that part of the tuning did work out. For X5, the initial value of the simulation is again set higher than is expected from the empirical data. Furthermore, the form of the simulated data does not follow the empirical data well. So, for the tuning for this state there is room for improvement.

The comparison between the empirical data and the tuned model for state X7 is good, since the tuned data follows the empirical data and the empirical data lies around the simulated data. For state X10, the empirical data was not chosen that well and therefore the simulated tuned data does not fit the empirical data. The tuned model shows a habit formation that does not rise above 0.7, which was not what was expected. This is an aspect that needs to be improved for future models.
Fig. 8.

Comparison between the empirical data (black) and the simulated data (black) for states X3 (Marijuana usage), X4 (Bad REM sleep), X5 (Bad Slow-Wave Sleep), X7 (Stressful events), X10 (Habit formation)

5 Discussion

In conclusion, the introduced adaptive network model was able to show behaviour that well suits three different nontrivial dynamic and adaptive patterns that are well-known from the empirical literature. Only qualitative empirical information was available, which had to be approximated by numerical data in order to apply parameter tuning by Simulated Annealing. The obtained empirical data is approximated by the model somewhat different than the best hand-tuned simulation. Improving these empirical data could improve the tuned simulation. This could be attained by doing more research into the relationships between the different states and also quantifying these relationships. Furthermore, not tuning the initial values may also already lead to a more realistic simulation. The initial values the tuning came up with are not realistic; for example, the sleep quality improves first before it becomes worse because the initial value was set by the tuning at a high value.


  1. 1.
    Barratt, E.S., Beaver, W., White, R.: The effects of marijuana on human sleep patterns. Biol. Psychiatry 8, 47–54 (1974)Google Scholar
  2. 2.
    Buckner, J.D., Schmidt, N.B.: Social anxiety disorder and marijuana use problems: the mediating role of marijuana effect expectancies. Depress. Anxiety 26(9), 864–870 (2009). Scholar
  3. 3.
    Dahlgren, M.K., Sagar, K.A., Racine, M.T., Dreman, M.W., Gruber, S.A.: Marijuana use predicts cognitive performance on tasks of executive function. J. Stud. Alcohol Drugs 77(2), 298–308 (2016). Scholar
  4. 4.
    Deatherage, J.R., Roden, R.D., Zouhary, K.: Normal sleep architecture. Seminar. Orthodont. 15(2), 86–87 (2009). Scholar
  5. 5.
    Fairholme, C.P., Manber, R.: Sleep, emotions, and emotion regulation: an overview. In: Babson, K.A., Feldner, A. (eds.) Sleep and Affect: Assessment, Theory, and Clinical Implications, Chap. 3, pp. 45–61. Academic Press, San Diego (2015).
  6. 6.
    Glodosky, N.C., Cuttler, C.: Motives matter: cannabis use motives moderate the associations between stress and negative affect. Addict. Behav. 102, 106188 (2019). Scholar
  7. 7.
    Hebb, D.O.: The Organization of Behavior: A Neuropsychological Theory. Wiley, London (1949)Google Scholar
  8. 8.
    Jacobus, J., Bava, S., Cohen-Zion, M., Mahmood, O., Tapert, S.F.: Functional consequences of marijuana use in adolescents. Pharmacol. Biochem. Behav. 92(4), 559–565 (2009). Scholar
  9. 9.
    Kahn-Greene, E.T., Killgore, D.B., Kamimori, G.H., Balkin, T.J., Killgore, W.D.S.: The effects of sleep deprivation on symptoms of psychopathology in healthy adults. Sleep Med. 8(3), 215–221 (2007). Scholar
  10. 10.
    Kurebayashi, L.F.S., Do Prado, J.M., Da Silva, M.J.P.: Correlations between stress and anxiety levels in nursing students. J. Nurs. Educ. Pract. 2(3), 128 (2012)Google Scholar
  11. 11.
    Link, B.G., Phelan, J.C.: Stigma and its public health implications. Lancet 367(9509), 528–529 (2006)CrossRefGoogle Scholar
  12. 12.
    Misra, R., Mckean, M.: College students’academic stress and its relation to their anxiety, time management, and leisure satisfaction. Am. J. Health Stud. 16, 41–51 (2000)Google Scholar
  13. 13.
    Pires, G.N., Bezerra, A.G., Tufik, S., Andersen, M.L.: Effects of acute sleep deprivation on state anxiety levels: a systematic review and meta-analysis. Sleep Med. 24, 109–118 (2016). Scholar
  14. 14.
    Pope Jr., H.G., Gruber, A.J., Hudson, J.I., Huestis, M.A., Yurgelun-Todd, D.: Neuropsychological performance in long-term cannabis users. Arch. Gen. Psychiatry 58(10), 909–915 (2001). Scholar
  15. 15.
    Satterlund, T.D., Lee, J.P., Moore, R.S.: Stigma among California’s medical marijuana patients. J. Psychoact. Drugs 47(1), 10–17 (2015). Scholar
  16. 16.
    Schierenbeck, T., Riemann, D., Berger, M., Hornyak, M.: Effect of illicit recreational drugs upon sleep: cocaine, ecstasy and marijuana. Sleep Med. Rev. 12(5), 381–389 (2008). Scholar
  17. 17.
    Strine, T.W., Chapman, D.P.: Associations of frequent sleep insufficiency with health-related quality of life and health behaviors. Sleep Med. 6(1), 23–27 (2005). Scholar
  18. 18.
    Treur, J.: Network-Oriented Modeling: Addressing Complexity of Cognitive, Affective and Social Interactions. Springer Publishers, Heidelberg (2016). Scholar
  19. 19.
    Treur, J.: Network-Oriented Modeling for Adaptive Networks: Designing Higher-Order Adaptive Biological, Mental and Social Network Models. Springer Publishers, Heidelberg (2020). Scholar
  20. 20.
    Vytal, K.E., Overstreet, C., Charney, D.R., Robinson, O.J., Grillon, C.: Sustained anxiety increases amygdala-dorsomedial prefrontal coupling: a mechanism for maintaining an anxious state in healthy adults. J. Psychiatry Neurosci. 39(5), 321–329 (2014). Scholar
  21. 21.
    Volkow, N.D., et al.: Effects of cannabis use on human behavior, including cognition, motivation, and psychosis: a review. JAMA Psychiatry 73(3), 292–297 (2016). Scholar
  22. 22.
    Wadsworth, E.J.K., Moss, S.C., Simpson, S.A., Smith, A.P.: Cannabis use, cognitive performance and mood in a sample of workers. J. Psychopharmacol. 20(1), 14–23 (2005). Scholar

Copyright information

© Springer Nature Switzerland AG 2020

Authors and Affiliations

  • Merijn van Leeuwen
    • 1
  • Kirsten Wolthuis
    • 1
  • Jan Treur
    • 1
    Email author
  1. 1.Social AI GroupVrije Universiteit AmsterdamAmsterdamThe Netherlands

Personalised recommendations