Uncovering Patient Narratives of Opioid Use and Recovery Using Large Language Models for Topic and Emotion Analysis of Social Media Discussions
Author(s)
Ashwin Kumar Rai, MS1, Victoria Ikoro, Phd2, Ariel Berger, MPH3, Devika Bhandary, Msc2, Andre Ng, Msc2, Firas Dabbous, Phd, MS4.
1Director of Data Science & Advanced Analytics, Thermo Fisher Scientific, Overland Park, KS, USA, 2Thermo Fisher Scientific, London, United Kingdom, 3Thermo Fisher Scientific, Wilmington, NC, USA, 4Thermo Fisher Scientific, Chicago, IL, USA.
1Director of Data Science & Advanced Analytics, Thermo Fisher Scientific, Overland Park, KS, USA, 2Thermo Fisher Scientific, London, United Kingdom, 3Thermo Fisher Scientific, Wilmington, NC, USA, 4Thermo Fisher Scientific, Chicago, IL, USA.
OBJECTIVES: Social media forums provide a valuable source of patient narratives that can be used for many things, including insights into opioid use, recovery, relapse, and emotional burden. However, these data are often unstructured and difficult to interpret at scale. We applied large language model (LLM)-based topic and emotion analyses to identify key themes and emotional patterns in opioid-related discussions.
METHODS: A dataset of over 5,000 opioid-related posts was collected from publicly available patient forums. Texts were transformed into semantic embeddings using pre-trained LLMs. For topic modeling, an unsupervised clustering approach grouped semantically similar texts into interpretable themes. Emotion classification was performed using an LLM trained to detect fine-grained emotion categories, including fear, sadness, relief, hope, and gratitude. Themes were reviewed for interpretability, and stratified by user engagement level and predominant emotional tone.
RESULTS: We identified >20 distinct themes, including withdrawal management, challenges with pain relief, relapse triggers, emotional support, and alternative therapies. Emotion analysis demonstrated that relapse- and isolation-related discussions were frequently characterized by fear, sadness, and anxiety; conversely, posts describing recovery milestones expressed hope and relief. Tapering-related themes often combined determination with apprehension. High-engagement users contributed to discussions reflecting both relapse and recovery, illustrating cyclical experiences over time.
CONCLUSIONS: Applying LLM-based topic and emotion modeling is a scalable methodology to distill unstructured patient narratives into interpretable insights . This methodology can therefore enhance understanding of patients' experiences, and highlights its ability to make sense of the complex emotional landscape associated with opioid use and recovery. Findings can inform tailored interventions and patient support resources, and guide policy decisions, ultimately improving health in this vulnerable population.
METHODS: A dataset of over 5,000 opioid-related posts was collected from publicly available patient forums. Texts were transformed into semantic embeddings using pre-trained LLMs. For topic modeling, an unsupervised clustering approach grouped semantically similar texts into interpretable themes. Emotion classification was performed using an LLM trained to detect fine-grained emotion categories, including fear, sadness, relief, hope, and gratitude. Themes were reviewed for interpretability, and stratified by user engagement level and predominant emotional tone.
RESULTS: We identified >20 distinct themes, including withdrawal management, challenges with pain relief, relapse triggers, emotional support, and alternative therapies. Emotion analysis demonstrated that relapse- and isolation-related discussions were frequently characterized by fear, sadness, and anxiety; conversely, posts describing recovery milestones expressed hope and relief. Tapering-related themes often combined determination with apprehension. High-engagement users contributed to discussions reflecting both relapse and recovery, illustrating cyclical experiences over time.
CONCLUSIONS: Applying LLM-based topic and emotion modeling is a scalable methodology to distill unstructured patient narratives into interpretable insights . This methodology can therefore enhance understanding of patients' experiences, and highlights its ability to make sense of the complex emotional landscape associated with opioid use and recovery. Findings can inform tailored interventions and patient support resources, and guide policy decisions, ultimately improving health in this vulnerable population.
Conference/Value in Health Info
2025-11, ISPOR Europe 2025, Glasgow, Scotland
Value in Health, Volume 28, Issue S2
Code
MSR208
Topic
Epidemiology & Public Health, Methodological & Statistical Research, Patient-Centered Research
Topic Subcategory
Artificial Intelligence, Machine Learning, Predictive Analytics
Disease
Mental Health (including addition), No Additional Disease & Conditions/Specialized Treatment Areas