KFU NLP Team at SMM4H 2019 Tasks: Want to Extract Adverse Drugs Reactions from Tweets? BERT to The Rescue

Zulfat Miftahutdinov, Ilseyar Alimova, Elena Tutubalina

Abstract

This paper summarizes the KFU NLP team's approach to the Social Media Mining for Health (SMM4H) 2019 shared tasks. The team leveraged BERT and BioBERT architectures to address the challenges of identifying, extracting, and normalizing Adverse Drug Reactions (ADRs) in informal Twitter data. Their results demonstrate that transformer-based models significantly outperform traditional recurrent neural networks (RNNs) and support-vector machines (SVMs), securing top rankings in multiple tasks and establishing a new benchmark for social media pharmacovigilance.

Introduction

Public health researchers are increasingly utilizing social media as a "real-time" sensor for drug safety, a field known as pharmacovigilance. However, Twitter is a notoriously noisy and chaotic data source. Users rarely employ formal medical terminology; instead, they use slang, emojis, and idiosyncratic descriptions (e.g., "felt like a zombie" instead of "somnolence"). The KFU NLP team addressed three specific challenges from the SMM4H 2019 competition: ADR classification, Named Entity Recognition (NER) of ADR spans, and normalization of those spans to the MedDRA (Medical Dictionary for Regulatory Activities) database.

Methods

The core of the team's methodology was the application of BERT (Bidirectional Encoder Representations from Transformers) and its domain-specific variant, BioBERT.

  • Classification (Task 1): The team utilized a standard BERT model where the final representation was fed into a logistic regression classifier. This was compared against a baseline SVM model using bag-of-words and specialized ADR lexicons.
  • NER (Task 2): The team experimented with BioBERT combined with a Conditional Random Field (CRF) layer. To mitigate the instability of deep learning models on small datasets, they employed an ensemble of ten BioBERT-CRF models with a simple voting scheme.
  • Normalization (Task 3): This was treated as a classification problem. After extracting an ADR mention, it was converted into a vector via BERT, and a softmax layer predicted the most likely MedDRA code from hundreds of possibilities.

Data and the Long-Tail Challenge

The primary data consisted of English tweets provided by the SMM4H organizers. Task 1 involved over 25,000 tweets, though only 9% contained ADRs, creating a significant class imbalance. Task 3 highlighted a "long-tail" problem: the mapping of informal phrases to 489 distinct MedDRA codes.

Distribution of MedDRA codes in the SMM4H dataset, illustrating the long-tail challenge.

As shown in the distribution above, over 400 codes occurred fewer than five times in the dataset, making it extremely difficult for models to learn rare reactions. To bolster performance, the team incorporated external datasets like CADEC and TwADR-L to help the models bridge the gap between social media language and formal medical terms.

Key Results and Insights

The KFU NLP team's BERT-based approach dominated the competition leaderboard. In Task 1, they achieved an F1-score of 57.38%, outperforming the average of 43 submissions by over 7%.

Performance comparison for Task 1 (ADR Classification) between BERT, SVM, and the competition average.

The team also secured first place in Task 2 and Task 3, with "relaxed" F1-scores of 65.8% and 43.2%, respectively. A key insight was that BERT’s ability to process context bidirectionally allowed it to better handle the nuances and sarcasm of informal language compared to linear models like LSTMs. Furthermore, BioBERT’s pre-training on biomedical literature provided a consistent edge in recognizing medical concepts.

Conclusion

The success of the KFU NLP team underscores the transformative impact of pre-trained transformer models in specialized NLP tasks. Despite these gains, hurdles remain, particularly regarding data imbalance and the propagation of errors in multi-stage pipelines. Future research will focus on end-to-end architectures and the use of broader contextual information to disambiguate vague ADR mentions in social media.

Summary updated

BibTeX
@inproceedings{miftahutdinov2019kfu,
  author = {Zulfat Miftahutdinov and Ilseyar Alimova and Elena Tutubalina},
  title = {{KFU NLP Team at SMM4H 2019 Tasks: Want to Extract Adverse Drugs Reactions from Tweets? BERT to The Rescue}},
  booktitle = {SMM4H @ ACL},
  year = {2019},
  doi = {10.18653/v1/w19-3207},
}
Figure