Detecting Medication Mentions in Social Media Data Using Large Language Models
Lopez-Garcia, G.; Xu, D.; Gonzalez-Hernandez, G.
Show abstract
The automatic extraction of medication mentions from social media data is critical for pharmacovigilance and public health monitoring. In this study, we present an end-to-end generative approach based on instruction-tuned large language models (LLMs) for medication mention extraction from Twitter. Reformulating the task as a text-to-text generation problem, our models achieve state-of-the-art results on both fine-grained span extraction and coarse-grained tweet-level classification, surpassing traditional sequence labeling baselines and previous best-performing systems. We demonstrate that fine-tuning Flan-T5 models enables efficient and accurate extraction while simplifying the architecture by eliminating complex multi-stage pipelines. Additionally, we show that lexicon-based filtering further improves performance by reducing false positives. Our models are publicly available, providing high-performing and efficient tools for large-scale pharmacological analysis of social media data.
Matching journals
The top 5 journals account for 50% of the predicted probability mass.