A BERT-based multi-task model to classify whether a Tweet is a Disaster or not and also to classify the Sentiment of the Tweet.
Developed and trained a BERT-based multi-task model to classify tweets whether they refer to a real disaster or not. The multi-task model leverages a separete tweet dataset with sentiment labels to help in the disaster classification task. This is achieved by utilizing a neural network architecture with two heads, one for disaster classification (Task 1) and one for sentiment classification (Task 2). A weighted loss (utilizes adversarial training), which weights and sums the losses of the two classification tasks is ultimately used during back propagation to incorporate sentiment information during training. The weights of the loss function are tuned using Bayesian Optimization which maximizes the F1 score of Task 1.
This repository also includes two alternative strategies in predicting disaster tweets but results are not reported.
- Disaster Tweets Prediction Competition
Labels: 1, if tweet is about a real disater, 0 otherwise - Twitter Tweets Sentiment Dataset
Labels: Negative, Neutral or Positive Sentiment
Minimizing separate loss functions for Task 1 and Task 2 during training.
| Task | F1 Score | Accuracy |
|---|---|---|
| 1. Disaster Classification | 75.83% | 77.60% |
| 2. Sentiment Classification | 61.00% | 59.53% |
Confusion Matrix for Task 1
Confusion Matrix for Task 2
Minimizing a combined weighted loss,
| Task | F1 Score | Accuracy |
|---|---|---|
| 1. Disaster Classification | 70.94% | 79.77% |
| 2. Sentiment Classification | 62.00% | 62.90% |
Confusion Matrix for Task 1
Confusion Matrix for Task 2
Same method as Method 2, but both lambdas tuned using Bayesian Optimization by optimizing the model's disaster classification F1 score (Task 1) which yielded
After tuning, inference was made on unlabeled test tweets and predictions were submitted to the Disaster Tweets Prediction Competition.
| Task | F1 Score |
|---|---|
| Disaster Classification | 80.00% |
- Bhargav Sagiraju
- Xuan Wen
- Jiaqi Hu



