Transformer-Based Topic Modeling: Characterizing Cannabis Product Adverse Experiences Self-Reported as Requiring Medical Attention on Reddit
Tim Ken Mackey, Matthew C Nali, Meng Zhen Larsen, Zhuoran Li, Cassandra L Taylor, Beverly Wolpert, Catharine Trice

TL;DR
This study analyzes self-reported cannabis-related adverse experiences on Reddit to identify patterns and common issues requiring medical attention.
Contribution
The paper introduces a transformer-based algorithm for characterizing cannabis adverse experiences on social media.
Findings
A total of 1177 self-reported cannabis adverse experiences requiring medical attention were identified.
The study combines keyword filtering and inductive content coding to categorize these experiences.
The findings highlight the potential of social media as a source for understanding cannabis-related health issues.
Abstract
This study uses keyword filtering, a transformer-based algorithm, and inductive content coding to identify and characterize cannabis adverse experiences as discussed on the social media platform Reddit and reports a total of 1177 self-reported adverse experiences requiring medical attention.
Genes, proteins, chemicals, diseases, species, mutations and cell lines named across the full text — each resolved to its canonical identifier and authoritative record.
Click any figure to enlarge with its caption.
Figure 1| Post and comment type/intent of use | Adverse Experiences Self-Reported as Requiring Medical Attention (AE SRRMA)a | ||||
|
| Hospitalization (n=533), n | Health care professional visit (n=70), n | Emergency room visit (n=569), n | Urgent care (n=5), n | Proportion of platform AE SRRMA posts (N=1177), n (%) |
| Medical | 1 | 0 | 4 | 0 | 5 (0.42) |
| Recreational | 513 | 66 | 530 | 5 | 1114 (94.65) |
| Therapeutic | 15 | 4 | 23 | 0 | 42 (3.57) |
| Unintended | 0 | 0 | 4 | 0 | 4 (0.34) |
| Unknown | 4 | 0 | 8 | 0 | 12 (1.02) |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsMental Health via Writing · Misinformation and Its Impacts · Hate Speech and Cyberbullying Detection
Introduction
Cannabis is one of the most frequently used intoxicating substances in the United States [1]. Changing policies and attitudes have increased cannabis use, yet safety profiles for different cannabis-derived products (CDPs) (eg, products containing tetrahydrocannabinols, cannabidiol, or cannabinoids derived from cannabis) are not well understood. Studies have examined internet and social media data for health concerns among cannabis users, including for adverse health outcomes [2-8]. However, no study has specifically characterized the types of adverse experiences requiring medical attention, as self-reported online. We aimed to use a transformer-based algorithm to identify and characterize adverse experiences self-reported as requiring medical attention (SRRMA) on Reddit.
Methods
For this observational retrospective study, we collected user-generated posts and comments from 27 subreddits(/r/) related to cannabis use (Figure 1; Multimedia Appendix 1). A set of keywords for adverse experiences SRRMA was used for data mining and manual coding to generate a sample of “signal” Reddit data (ie, posts about cannabis product adverse experiences requiring medical attention: hospitalization, or visiting a health care professional, emergency room, or urgent care). This initial sample of SRMMA prelabeled “signal” was joined with data from the full Reddit data corpus.
Summary of the study methodology, including data collection, data processing/filtering, BERT (bidirectional encoder representations from transformers) analysis, and results (signal data): (1) data collection for cannabis-related subreddits (both posts and comments); (2) keyword filtering for adverse experience self-reported as requiring medical attention (AE SRRMA)-related signals; (3) separation of sample of “signals” for general adverse experiences (GAE) self-reported as not requiring medical attention and AE SRRMA; (4) use of BERT topic model (k=5, 10, 15, 20) after data filtering with a sample of AE SRRMA keywords and labeled AE SRRMA data joined with the unlabeled dataset to analyze the full corpus of Reddit posts and comments; (5) selection of BERT topic clusters with the highest yield of prelabeled signals for AE SRRMA that were manually annotated to identify additional AE SRRMA signals (process repeated to achieve higher thematic saturation); newly identified signals were joined with the unlabeled dataset for the next round of BERT topic modeling; and (6) AE SRRMA signal identification from Reddit posts and comments summarized in this publication.
Natural language processing was applied to cluster Reddit posts and comments for further manual annotation. We used the bidirectional encoder representations from transformers (BERT) topic model with the Python (version 3.7) package BERTopic (version 0.6.0), which is a pretrained, self-supervised transformer-based algorithm that embeds texts, extracts topics, and then clusters texts.
BERT was used to cluster groups of nonlabeled data with SRRMA prelabeled signal data into k topic clusters, where the value of k is determined according to the dataset size (5≤k≥20). In each generated cluster, we calculated the percentages of SRRMA prelabeled signal data in that topic cluster to estimate how well that cluster was related to our SRRMA prelabeled data (% of potential SRRMA prelabeled signal data in a cluster that could be appended to the SRRMA prelabeled dataset = amount of SRRMA prelabeled training signal data in a cluster/amount of total data in a cluster). The higher the percentage, the more likely the uncoded data were related to our SRRMA prelabeled topic. Cluster selection was determined based on the highest percentages. The new signals were then added to our coded signal pool for the next iteration of BERT modeling: we filtered the uncoded dataset with the keywords repeatedly, combined the filtered uncoded data with all prelabeled signal data, and then performed the next iteration of BERT to find the best clusters to manually annotate for identifying additional signals. Posts and comments from these clusters were extracted, and an inductive coding approach was used to label and characterize cannabis-related adverse experiences and adverse experiences that met the SRRMA criteria. Human ethics and consent to participate were not applicable, as all information was from the public domain and did not involve user interaction, and any identifiable information was aggregated and removed from the results.
Results
We collected 1,795,478 Reddit posts/comments. After BERT and coding, 1177 posts/comments comprising 1542 user-generated mentions of SRRMA adverse experiences for cannabis products were detected between July 2017 and December 2022 (Table 1). Coders (TKM, MN, MZ) achieved a high intercoder reliability score (κ=0.90). From the 27 subreddits, the top 10 SRRMA adverse experiences were vomiting (284/1542, 18.42%), nausea (171/1542, 11.09%), panic attack (122/1542, 7.91%), abdominal/stomach pain (96/1542, 6.23%), concern over elevated heart rate (92/1542, 5.97%), anxiety (60/1542, 3.89%), chest pain (53/1542, 3.44%), general complaints of sickness (31/1542, 2.01%), symptoms attributed to Cannabinoid Hyperemesis Syndrome (30/1542, 1.95%), and paranoia (30/1542, 1.95%). Additionally, 108 (9.18%) SRRMAs mentioned a CDP but not a specific adverse experience. SRRMA adverse experiences included users self-reporting seeking medical attention with visits/admissions to hospitals (533/1177, 45.28%), emergency rooms (569/1177, 48.34%), health care professionals (70/1177, 5.95%), and urgent care (5/1177, 0.43%).
For cannabis product use characteristics with an SRRMA, most (988/1177, 83.94%) were inhalation (eg, inhaler, joint, vape) followed by ingestion (59/1177, 5.01%; eg, edibles) products. For users reporting intent of use (ie, post and comment), 94.65% (1114/1177) were adult use (ie, recreational), followed by 3.57% (42/1177) therapeutic (ie, for health benefit), 1.02% (12/1177) unknown, 0.42% (5/1177) medical (ie, from a medical dispensary), and 0.34% (4/1177) unintentional use. A subset of users reported co-use with other substances, specifically tobacco and nicotine products (n=7), prescription medications (eg, alprazolam, antidepressants, n=22), illicit drugs (eg, lysergic acid diethylamide, cocaine, n=5), and dual use with other cannabinoids (eg, general tetrahydrocannabinol use, cannabidiol, delta 8, n=12).
Discussion
We identified 1177 Reddit user-generated posts that described CDP SRMMA adverse experiences. Results are similar to those of a study analyzing 28,630 cannabis exposures/cases reported to state poison control centers from 2017 to 2019 that found CDP concentrates, vaporized liquids, and edibles documented with “moderate or greater” medical outcomes (ie, effects usually requiring a form of medical treatment) [9]. Studies using transformer-based and large language models also found similar reports of adverse experiences by Reddit users but only coded for generalized adverse health outcomes [7] or only reviewed a single subreddit (r/delta8) [8,9]. Our study builds on the methodology of these prior studies by using a transformer-based algorithm “seeded” with prelabeled signal data to find additional unlabeled data—an approach similar to a few-shot learning approach but without formal model training.
Study limitations include terms not inclusive of all cannabis safety-related experiences and lack of cross-validation of users’ self-reports (eg, lack of validation with clinical data). Further, social media data are not representative of all cannabis use behavior, and what cannabis products may have led to adverse experiences (eg, contaminated/adulterated products or products not from licensed dispensaries) were unclear (eg, we observed more Reddit discussions on adult-use cannabis [ie, recreational] than on medical cannabis use, which may limit generalizability). Though exploratory, study results may be used in conjunction with other cannabis-related adverse experience surveillance data (eg, National Poison Data System and FDA MedWatch [6]) and can provide important context to adverse experiences that result in medical attention for purposes of helping consumers and clinicians better understand potential cannabis risks.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1U.S. Centers for Disease Control and Prevention Cannabis facts and stats Data and Statistics 20253072026-01-27 https://www.cdc.gov/cannabis/data-research/facts-stats/?CDC_A Aref_Val=https://www.cdc.gov/marijuana/data-statistics.htm
- 2Meacham MC Paul MJ Ramo DE Understanding emerging forms of cannabis use through an online cannabis community: an analysis of relative post volume and subjective highness ratings Drug Alcohol Depend 20180701188364369 10.1016/j.drugalcdep.2018.03.04129883950 S 0376-8716(18)30242-429883950 PMC 6692176 · doi ↗ · pubmed ↗
- 3Allem J Majmundar A Dormanesh A Donaldson SI Identifying health-related discussions of cannabis use on Twitter by using a medical dictionary: content analysis of tweets JMIR Form Res 2022022562 e 35027 10.2196/3502735212637 v 6i 2e 3502735212637 PMC 8917433 · doi ↗ · pubmed ↗
- 4Hallinan CM Khademi Habibabadi S Conway M Bonomo YA Social media discourse and internet search queries on cannabis as a medicine: a systematic scoping review P Lo S One 2023181 e 0269143 10.1371/journal.pone.026914336662832 PONE-D-22-1396536662832 PMC 9858862 · doi ↗ · pubmed ↗
- 5Dilley JA Graves JM Brooks-Russell A Whitehill JM Liebelt EL Trends and characteristics of manufactured cannabis product and cannabis plant product exposures reported to US poison control centers, 2017-2019 JAMA Netw Open 2021050345 e 2110925 10.1001/jamanetworkopen.2021.1092534028553278006834028553 PMC 8144922 · doi ↗ · pubmed ↗
- 6Smith BP Hoots B De Padilla L Roehler DR Holland KM Bowen DA Sumner SA Using transformer-based topic modeling to examine discussions of delta-8 tetrahydrocannabinol: content analysis J Med Internet Res 2023122125 e 49469 10.2196/4946938127427 v 25i 1e 4946938127427 PMC 10767625 · doi ↗ · pubmed ↗
- 7Leas EC Ayers JW Desai N Dredze M Hogarth M Smith DM Using large language models to support content analysis: a case study of Chat GPT for adverse event detection J Med Internet Res 2024050226 e 52499 10.2196/5249938696245 v 26i 1e 5249938696245 PMC 11099800 · doi ↗ · pubmed ↗
- 8Hines MC Harinstein LM Kortepeter CM Reporting adverse events for cannabis to the FDAN Engl J Med 202001023821989810.1056/nejmc 191346031875515 · doi ↗ · pubmed ↗
