NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

DeepADEMiner: a deep learning pharmacovigilance pipeline for extraction and normalization of adverse drug event mentions on Twitter

Arjun Magge, Elena Tutubalina, Zulfat Miftahutdinov, Ilseyar Alimova, Anne Dirkson, Suzan Verberne, Davy Weissenbacher, Graciela Gonzalez-HernandezJ. Am. Medical Informatics Assoc 2021 · DOI

Abstract

Objective: Research on pharmacovigilance from social media data has focused on mining adverse drug effects (ADEs) using annotated datasets, with publications generally focusing on one of three tasks: (i) ADE classification, (ii) named entity recognition (NER) for identifying the span of an ADE mentions, and (iii) ADE mention normalization to standardized vocabularies. While the common goal of such systems is to detect ADE signals that can be used to inform public policy, it has been impeded largely by limited end-to-end solutions to the three tasks for large-scale analysis of social media reports for different drugs. Materials and Methods: We present a dataset for training and evaluation of ADE pipelines where the ADE distribution is closer to the average 'natural balance' with ADEs present in about 7% of the Tweets. The deep learning architecture involves an ADE extraction pipeline with individual components for all three tasks. Results: The system presented achieved a classification performance of F1 = 0.63, span detection performance of F1 = 0.44 and an end-to-end entity resolution performance of F1 = 0.34 on the presented dataset. Discussion: The performance of the models continue to highlight multiple challenges when deploying pharmacovigilance systems that use social media data. We discuss the implications of such models in the downstream tasks of signal detection and suggest future enhancements. Conclusion: Mining ADEs from Twitter posts using a pipeline architecture requires the different components to be trained and tuned based on input data imbalance in order to ensure optimal performance on the end-to-end resolution task.

Introduction

Pharmacovigilance—the monitoring of drug safety post-licensing—is increasingly leveraging social media as an early-warning system. However, mining Twitter for Adverse Drug Effects (ADEs) presents significant technical hurdles. Most existing research treats ADE detection as three isolated tasks: classification (identifying if a tweet mentions an ADE), Named Entity Recognition (NER) (identifying the specific text span), and normalization (mapping the text to a standard medical code like MedDRA).

A critical gap in current research is the reliance on artificially balanced datasets (often 50% ADE prevalence). In real-world Twitter streams, ADEs appear in only about 7% of drug-related posts. This "natural imbalance" causes models optimized in laboratory settings to fail in deployment. DeepADEMiner addresses this by providing an end-to-end pipeline evaluated on realistic, imbalanced data.

Methods: The DeepADEMiner Pipeline

The authors propose a three-stage deep learning architecture designed to filter and process noisy social media data:

  1. ADE Classifier: A binary classifier based on RoBERTa acts as a high-pass filter. It identifies tweets likely to contain ADEs and discards the rest. To mitigate class imbalance, the authors employed varying loss weights and under-sampling during training.
  2. ADE Span Extractor (NER): For tweets flagged by the classifier, a Bi-directional RNN with GRU units and a Conditional Random Field (CRF) layer identifies the specific text span of the ADE. The system was tested with various embeddings, including GloVe, FastText, and BERT.
  3. ADE Normalizer: This component maps extracted text (e.g., "feeling like a zombie") to a standardized MedDRA Preferred Term (PT).
The DeepADEMiner end-to-end pipeline architecture showing the flow from raw tweets to normalized medical codes.

Data Augmentation and Ontology Expansion

Because social media users use informal language, the normalizer must recognize terms absent from formal medical training sets. The authors significantly boosted training data by linking MedDRA terms to synonyms from the UMLS (Unified Medical Language System) thesaurus. This expanded the training instances from approximately 2,300 to over 265,000, enabling the model to normalize "unseen" ADEs with 49.7% accuracy.

The strategy for expanding training data by incorporating MedDRA lower-level terms and UMLS synonyms.

Key Results and Insights

The pipeline was evaluated on the HLP-ADE-v1 dataset, which reflects the 7% "natural balance" of Twitter:

  • Classification: Achieved an F1-score of 0.63.
  • Span Extraction (NER): Achieved an F1-score of 0.44, with BERT-based embeddings significantly outperforming traditional methods.
  • End-to-End Resolution: The full pipeline (extracting a span and correctly normalizing it) achieved an F1-score of 0.34.
  • Normalization Accuracy: The BERT-based semi-supervised approach reached an overall accuracy of 0.612.

Research insights revealed a "false sense of security" in traditional NER training; models trained only on positive ADE data performed poorly on real-world data. The best NER performance occurred when the training set maintained a 1:1 to 2:1 ratio of negative-to-positive tweets. Furthermore, despite the power of modern NER models, an initial classification filter remains essential to reduce the noise inherent in raw social media feeds.

Discussion and Future Work

The end-to-end F1-score of 0.34 underscores the persistent difficulty of this task. Current limitations include the assumption of causality; the model may incorrectly link a drug and a symptom mentioned in the same tweet even if they are unrelated. Future work will focus on relation extraction to confirm these links and further data augmentation to bridge the gap between social media slang and formal medical terminology. Ultimately, DeepADEMiner demonstrates that successful pharmacovigilance on social media requires a pipeline specifically tuned for natural data imbalance.

Summary updated

BibTeX
@article{magge2021deepademiner,
  author = {Arjun Magge and Elena Tutubalina and Zulfat Miftahutdinov and Ilseyar Alimova and Anne Dirkson and Suzan Verberne and Davy Weissenbacher and Graciela Gonzalez-Hernandez},
  title = {{DeepADEMiner: a deep learning pharmacovigilance pipeline for extraction and normalization of adverse drug event mentions on Twitter}},
  journal = {J. Am. Medical Informatics Assoc.},
  year = {2021},
  doi = {10.1093/jamia/ocab114},
}

Loading related content...

Figure