[Paper Review] Detecting Adverse Drug Reactions from Twitter through Domain-Specific Preprocessing and BERT Ensembling
This paper proposes a BERT-based ensemble model with domain-specific preprocessing to improve adverse drug reaction (ADR) detection in Twitter. By fine-tuning BERT LARGE, BioBERT, and ClinicalBERT, applying a custom preprocessor (including drug normalization), and using max-prediction ensembling, the model achieves state-of-the-art F1-score (0.6681) and recall (0.7700), outperforming all SMM4H 2019 submissions and post-evaluation entries.
The automation of adverse drug reaction (ADR) detection in social media would revolutionize the practice of pharmacovigilance, supporting drug regulators, the pharmaceutical industry and the general public in ensuring the safety of the drugs prescribed in daily practice. Following from the published proceedings of the Social Media Mining for Health (SMM4H) Applications Workshop & Shared Task in August 2019, we aimed to develop a deep learning model to classify ADRs within Twitter tweets that contain drug mentions. Our approach involved fine-tuning $BERT_{LARGE}$ and two domain-specific BERT implementations, $BioBERT$ and $Bio + clinicalBERT$, applying a domain-specific preprocessor, and developing a max-prediction ensembling approach. Our final model resulted in state-of-the-art performance on both $F_1$-score (0.6681) and recall (0.7700) outperforming all models submitted in SMM4H 2019 and during post-evaluation to date.
Motivation & Objective
- To improve adverse drug reaction (ADR) detection in social media, particularly on Twitter, where ADR mentions are rare and often obscured by informal language.
- To address the challenge of low recall in ADR detection by prioritizing recall over precision, given the public health value of identifying all true ADRs.
- To enhance model performance through domain-specific preprocessing, especially drug name normalization, and ensembling multiple BERT variants.
- To demonstrate that simple preprocessing techniques can significantly boost performance even when using state-of-the-art BERT models.
- To provide a robust, high-recall solution for real-time pharmacovigilance using social media data.
Proposed method
- Fine-tuned three BERT-based models: BERT LARGE (uncased), BioBERT (pretrained on biomedical corpora), and ClinicalBERT (fine-tuned from BioBERT on clinical notes).
- Applied a domain-specific preprocessor that anonymizes URLs and handles, removes hashtags, lowercases text, and normalizes drug brand names to generic names.
- Used a five-fold cross-validation strategy with early stopping and learning rate scheduling to train each model.
- Implemented an ensemble strategy combining 5 independently trained models per BERT variant via averaging, followed by max-prediction ensembling across the three model types to maximize recall.
- Selected a fixed threshold of 0.5 for classification to avoid overfitting, despite initial experiments suggesting lower thresholds might improve metrics.
- Evaluated models using standard NLP metrics, with a focus on F1-score and recall, given the task's emphasis on identifying all true ADRs.
Experimental results
Research questions
- RQ1Can domain-specific preprocessing, particularly drug name normalization, improve ADR detection performance in social media text?
- RQ2Does ensembling multiple BERT variants—general domain, biomedical, and clinical—yield better performance than individual models on ADR classification?
- RQ3Can a simple preprocessor outperform more complex retraining strategies in terms of recall and F1-score for ADR detection?
- RQ4How does model variance affect performance when fine-tuning BERT on small, imbalanced datasets like the SMM4H 2019 corpus?
- RQ5To what extent does drug normalization enhance tokenization and representation learning in BERT models for ADR detection?
Key findings
- The final ensemble model achieved an F1-score of 0.6681 and recall of 0.7700, outperforming all models submitted during the SMM4H 2019 shared task and all subsequent entries on the evaluation platform as of March 21, 2020.
- The drug normalizer was the most impactful preprocessor component, improving F1-score and recall by 2.4% to 10.9% for BioBERT and ClinicalBERT, due to better tokenization of generic drug names.
- The BERT LARGE model with the same preprocessor matched the performance of the SMM4H 2019 winning team’s model, which retrained BERT on a 1.5M tweet corpus, demonstrating the value of preprocessing alone.
- Ensembling 5 independently trained models per BERT variant via averaging reduced variance and improved robustness, addressing the inherent instability of fine-tuning BERT on small datasets.
- The standard deviation of model predictions remained around 0.01 across runs, indicating persistent variance due to data scarcity and class imbalance, a known challenge in BERT fine-tuning.
- Max-prediction ensembling across the three model types (BERT LARGE, BioBERT, ClinicalBERT) effectively captured complementary predictions, maximizing recall without sacrificing precision.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.