Medical Research

Machine Learning to Investigate Cannabis Use and Depression

Written by Sabina Pulone

Depression is a common mental disorder, having increased over the last few years especially among young adults. [1] Different methods to face depression are available, often including medicaments that can lead to unpleasant side effects (i.e., withdrawal) upon cessation. [2] Cannabis has been reported as a potential natural treatment for depression at certain doses [3], but the research and public health information about the relationship between cannabis use and depression are scarce and should be more investigated due to policy changes and increasing cannabis (and derivatives) potency over the last decades.

To explore health knowledge of individuals regarding this topic, research group Yadav et al [1] exploited social media platforms: even if data sets are extremely voluminous and varied, social media offers the possibility to indirectly monitor and get insights related to people using cannabis while being depressed. The method developed to collect information data is based on an end-to-end knowledge-infused deep learning framework (Gated-K-BERT). This is a transformer-based machine learning technique for natural language processing (NLP) capable of understanding the meaning of ambiguous phrases by analysing the surrounding text to establish the context.

To pinpoint terms related to cannabis and depression, the domain ontology considered is the one of drug abuse (Drug Abuse Ontology, DAO). By using a series of terms as domain-specific framework, including medical definitions, slang, and synonyms referring to cannabis and mental-health disorders, the analysis of sentences extracted from Twitter was performed successfully, extracting a specific dataset and model to label the relationship between cannabis and depression among the population. Successful examples included:

  • Classifying the word “for” as a positive treatment relationship: “I was forced to tell my family i have a medical for weed bc someone been ratting me out, try explaining medical marijuana for depression to a traditional thinking family, i wanna die.”
  • Interpreting causation via “making”: “me @ me when i realize weed is making me depressed but i keep smoking.”

Unsuccessful examples were classified as ambiguous and included:

  • Not interpreting the implied relationship: “depression is hitting insufferable levels rn and hot damn i could use some weed.”
  • Unable to classify the colloquial expression about dopamine: “me: wow i think im depressed i should really go to therapy: doesnt do any of that and instead uses weed to increase the dopamine in my brain.”


Even with the ambiguities, the model outperforms a “state-of-the-art algorithm in distinguishing depression as a result of cannabis use and cannabis use as a self-medication for depression.”

The proposed model of domain analysis should be integrated with targeted-user profiles and real-time monitoring for a more accurate and precise reason-effect relationship between cannabis and depression. The authors note a “future study” that aims to do just that.  Data sets gathered from social media sources can constitute a valuable information tool to track trends, public health knowledge, and exposure of the user to cannabis over time. [1]



[1] Yadav S, et al. When they say weed causes depression, but it’s your fav antidepressant: Knowledge-aware attention framework for relationship extraction. PLoS ONE. 2021;16(3): e0248299. [Journal Impact Factor = 3.24] [Times cited = 3 (Semantic Scholar)] [2] Henssler J, et al. Antidepressant withdrawal and rebound phenomena. Deutsches Aerzteblatt International. 2019;116(20):355-361. doi:10.3238/arztebl.2019.0355  [Journal Impact Factor = 5.594] [Times cited = 16 (Semantic Scholar)] [3] El-Alfy AT, et al. Antidepressant-like effect of Δ9-tetrahydrocannabinol and other cannabinoids isolated from Cannabis sativa L. Pharmacol Biochem Behav. 2010;95(4):434–442. doi:10.1016/j.pbb.2010.03.004 [Journal Impact Factor = 3.533] [Times cited = 155 (Semantic Scholar)]

Image: Markus Spiske, Pexels

About the author

Sabina Pulone

Leave a Comment