A Comprehensive Analysis of Transformer-Deep Neural Network Models in Twitter Disaster Detection
Abstract
:1. Introduction
Social Media and Disaster Detection
- -
- We explore, implement, and compare the transformer-based embedding techniques, including the base model and its simpler variants, in detecting disaster using a real-life Twitter dataset;
- -
- We implement the various transformers with several well-known NN models, and identify the best/optimal combination in detecting disasters via Twitter.
2. Related Work
3. Materials and Method
3.1. Twitter Dataset
3.2. Data Pre-Processing
3.3. Contextual Word Embedding (Transformers)
3.4. Disaster Modeling
3.5. Evaluation and Experiments
4. Results and Discussion
5. Conclusions, Limitation and Future Direction
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- DiCarlo, M.F.; Berglund, E.Z. Connected communities improve hazard response: An agent-based model of social media behaviors during hurricanes. Sustain. Cities Soc. 2021, 69, 102836. [Google Scholar] [CrossRef]
- Roy, P.K.; Kumar, A.; Singh, J.P.; Dwivedi, Y.K.; Rana, N.P.; Raman, R. Disaster related social media content processing for sustainable cities. Sustain. Cities Soc. 2021, 75, 103363. [Google Scholar] [CrossRef]
- Rhodan, M. Please Send Help: Hurricane Harvey Victims Turn to Twitter and Facebook. 2017. Available online: http://time.com/4921961/hurricane-harvey-twitter-facebook-social-media/ (accessed on 13 February 2022).
- Son, J.; Lee, H.K.; Jin, S.; Lee, J. Content features of tweets for effective communication during disasters: A media synchronicity theory perspective. Int. J. Inf. Manag. 2019, 45, 56–68. [Google Scholar] [CrossRef]
- Zhai, W.; Peng, Z.R.; Yuan, F. Examine the effects of neighborhood equity on disaster situational awareness: Harness machine learning and geotagged Twitter data. Int. J. Disaster Risk Reduct. 2021, 48, 101611. [Google Scholar] [CrossRef]
- Karimiziarani, M.; Jafarzadegan, K.; Abbaszadeh, P.; Shao, W.; Moradkhani, H. Hazard risk awareness and disaster management: Extracting the information content of twitter data. Sustain. Cities Soc. 2022, 77, 103577. [Google Scholar] [CrossRef]
- Robertson, B.W.; Johnson, M.; Murthy, D.; Smith, W.R.; Stephes, K.K. Using a combination of human insights and ‘deep learning’ for real-time disaster communication. Prog. Disaster Sci. 2019, 2, 100030. [Google Scholar] [CrossRef]
- Song, G.; Huang, D.A. Sentiment-Aware Contextual Model for Real-Time Disaster Prediction Using Twitter Data. Future Internet 2021, 13, 163. [Google Scholar] [CrossRef]
- Chanda, A.K. Efficacy of BERT embeddings on predicting disaster from Twitter data. arXiv 2021, arXiv:2108.10698. [Google Scholar]
- Chen, Z.; Lim, S. Social media data-based typhoon disaster assessment. Int. J. Disaster Risk Reduct. 2021, 64, 102482. [Google Scholar] [CrossRef]
- Resch, B.; Usländer, F.; Havas, C. Combining machine-learning topic models and spatiotemporal analysis of social media data for disaster footprint and damage assessment. Cartogr. Geogr. Inf. Sci. 2018, 45, 362–376. [Google Scholar] [CrossRef] [Green Version]
- Ragini, J.R.; Anand, P.R.; Bhaskar, V. Big data analytics for disaster response and recovery through sentiment analysis. Int. J. Inf. Manag. 2018, 42, 13–24. [Google Scholar] [CrossRef]
- Neppalli, V.K.; Caragea, C.; Squicciarini, A.; Tapia, A.; Stehle, S. Sentiment analysis during hurricane sandy in emergency response. Int. J. Disaster Risk Reduct. 2017, 21, 213–222. [Google Scholar] [CrossRef] [Green Version]
- Malla, S.; Alphonse, P. COVID-19 outbreak: An ensemble pre-trained deep learning model for detecting informative tweets. Appl. Soft Comput. 2021, 107, 107495. [Google Scholar] [CrossRef]
- Nazer, T.H.; Morstatter, F.; Dani, H.; Liu, H. Finding requests in social media for disaster relief. In Proceedings of the 2016 IEEE/ACM International Conference on Advances in Social Networks Analysis and Mining (ASONAM), San Francisco, CA, USA, 18–21 August 2016; pp. 1410–1413. [Google Scholar]
- Alam, F.; Ofli, F.; Imran, M. Descriptive and visual summaries of disaster events using artificial intelligence techniques: Case studies of Hurricanes Harvey, Irma, and Maria. Behav. Inf. Technol. 2019, 39, 288–318. [Google Scholar] [CrossRef]
- Basu, M.; Shandilya, A.; Khosla, P.; Ghosh, K.; Ghosh, S. Extracting resource needs and availabilities from microblogs for aiding post-disaster relief operations. IEEE Trans. Comput. Soc. Syst. 2019, 6, 604–618. [Google Scholar] [CrossRef]
- Mohanty, S.D.; Biggers, B.; Ahmed, S.S.; Pourebrahim, N.; Goldstein, E.B.; Bunch, R.; Chi, G.; Sadri, F.; McCoy, T.; Cosby, A. A multi-modal approach towards mining social media data during natural disasters—A case study of Hurricane Irma. Int. J. Disaster Risk Reduct. 2021, 54, 102032. [Google Scholar] [CrossRef]
- Yu, M.; Huang, Q.; Qin, H.; Scheele, C.; Yang, C. Deep learning for real-time social media text classification for situation awareness–using hurricanes sandy, harvey, and irma as case studies. Int. J. Digit. Earth 2019, 12, 1230–1247. [Google Scholar] [CrossRef]
- Kumar, A.; Singh, J.P. Location reference identification from tweets during emergencies: A deep learning approach. Int. J. Disaster Risk Reduct. 2019, 33, 365–375. [Google Scholar] [CrossRef] [Green Version]
- Kumar, A.; Singh, J.P.; Dwivedi, Y.K.; Rana, N.P. A deep multi-modal neural network for informative twitter content classification during emergencies. Ann. Oper. Res. 2020, 1–32. [Google Scholar] [CrossRef]
- Madichetty, S.; Muthukumarasamy, S.; Jayadev, P. Multi-modal classification of twitter data during disasters for humanitarian response. J. Ambient. Intell. Humaniz. Comput. 2021, 12, 10223–10237. [Google Scholar] [CrossRef]
- Naaz, S.; Ul-Abedin, Z.; Rizvi, D.R. Sequence Classification of Tweets with Transfer Learning via BERT in the Field of Disaster Management. EAI Endorsed Trans. Scalable Inf. Syst. 2021, 8, e8. [Google Scholar] [CrossRef]
- Wang, Z.; Zhu, T.; Mai, S. Disaster Detector on Twitter Using Bidirectional Encoder Representation from Transformers with Keyword Position Information. In Proceedings of the 2020 IEEE 2nd International Conference on Civil Aviation Safety and Information Technology, Weihai, China, 14–16 October 2020; pp. 474–477. [Google Scholar]
- Deb, S.; Chanda, A.K. Comparative analysis of contextual and context-free embeddings in disaster prediction from Twitter data. Mach. Learn. Appl. 2022, 7, 100253. [Google Scholar] [CrossRef]
- Qui, X.; Sun, T.; Xu, Y.; Shao, Y.; Huang, X. Pre-trained Models for Natural Language Processing: A Survey. arXiv 2021, arXiv:2003.08271. [Google Scholar]
- Behl, S.; Rao, A.; Aggarwal, S.; Chadha, S.; Pannu, H.S. Twitter for disaster relief through sentiment analysis for COVID-19 and natural hazard crises. Int. J. Disaster Risk Reduct. 2021, 55, 102101. [Google Scholar] [CrossRef]
- Devlin, J.; Chang, M.-W.; Lee, K.; Toutanova, K. BERT: Pre-Training of Deep Bidirectional Transformers for BERT: Pre-training of Deep Bidirectional Transformers for; NAACL-HLT 2019; Association for Computational Linguistics: Minneapolis, MI, USA, 2019; pp. 4171–4186. [Google Scholar]
- Maharani, W. Sentiment Analysis during Jakarta Flood for Emergency Responses and Situational Awareness in Disaster Management using BERT. In Proceedings of the 2020 8th International Conference on Information and Communication Technology (ICoICT), Yogyakarta, Indonesia, 24–26 June 2020; pp. 1–5. [Google Scholar]
- Clark, K.; Luong, M.T.; Le, Q.V.; Manning, C.D. ELECTRA: Pre-training Text Encoders as Discriminators Rather Than Generators. arXiv 2020, arXiv:2003.10555. [Google Scholar]
- Bhuvaneswari, A.; Thomas, J.T.J.; Kesavan, P. Embedded Bi-directional GRU and LSTM Learning Models to Predict Disasters on Twitter Data. Procedia Comput. Sci. 2019, 165, 511–516. [Google Scholar] [CrossRef]
- Abadi, M.; Ashish, A.; Barham, P.; Eugene, B.; Chen, Z.; Davis, A.; Dean, J. TensorFlow: TN_BERT. 2021. Available online: https://tfhub.dev/google/tn_bert/1 (accessed on 28 December 2021).
- Shazeer, N.; Lan, Z.Z.; Cheng, Y.; Ding, N.; Hou, L. Talking Heads Attention. arXiv 2020, arXiv:2003.02436v1. [Google Scholar]
- Zhao, Y.; Ren, S.; Kurthscde, J. Synchronization of coupled memristive competitive BAM neural networks with different time scales. Neurocomputing 2021, 427, 110–117. [Google Scholar] [CrossRef]
- Alqatawna, A.; Álvarez, A.M.R.; García-Moreno, S.S.C. Comparison of Multivariate Regression Models and Artificial Neural Networks for Prediction Highway Traffic Accidents in Spain: A Case Study. Transp. Res. Procedia 2021, 58, 277–284. [Google Scholar] [CrossRef]
- Bre, F.; Gimenez, J.; Fachinotti, V. Prediction of wind pressure coefficients on building surfaces using Artificial Neural Networks. Energy Build. 2018, 158, 1429–1441. [Google Scholar] [CrossRef]
- Zhang, L.; Wang, S.; Liu, B. Deep learning for sentiment analysis: A survey. WIREs Data Min. Knowl. Discov. 2018, 8, e1253. [Google Scholar] [CrossRef] [Green Version]
- Jang, B.; Kim, M.; Harerimana, G.; Kang, S.-U.; Kim, J. Bi-LSTM Model to Increase Accuracy in Text Classification: Combining Word2vec CNN and Attention Mechanism. Appl. Sci. 2020, 10, 5841. [Google Scholar] [CrossRef]
References | Disaster | Algorithm | Word Embedding | F-Score (%) |
---|---|---|---|---|
[19] | Hurricane | CNN | Word2Vec | 80 |
[20] | Earthquake | CNN | Bag-of-words, GloVe | 96 |
[21] | Hurricane, wildfire, earthquake, flood | LSTM, CNN | GloVe | 93 |
[31] | 26 disasters | LSTM, bi-directional GRU | WordNet | 79–82 |
[2] | Hurricane, flood, wildfire | CNN | GloVe, FastText | 71 |
[27] | Earthquake | MLP | Word2vec | 85 |
[24] | Earthquake, wildfire, flood | CNN | BERT, DenseNet | 66–88 |
[8] | General (i.e., flood, fire, earthquake) | Bi-LSTM–CNN | SentiBERT | 92.7 |
[23] | 26 disasters | LSTM, CNN | BERT | 71.86 |
[9] | General (i.e., flood, fire, earthquake) | Bi-LSTM | BERT | 83.16 |
[14] | COVID-19 related disaster | - | RoBERTa, BERTweet, CT-BERT | 91 |
Original Tweets | Label |
---|---|
Our Deeds are the Reason of this #earthquake May ALLAH Forgive us all | 1 |
#Flood in Bago Myanmar #We arrived Bago | 1 |
Forest fire near La Ronge Sask. Canada | 1 |
I love fruits | 0 |
My car is so fast | 0 |
Summer is lovely | 0 |
Models | Setup | Parameters |
---|---|---|
NN | Layers | 3 (Neurons = 32) |
Dropout rate | 0.1 * | |
Activation Function | ReLU (Hidden) & Sigmoid (Output) | |
CNN | Layers | 3 (Filters = 256; Kernel: 3–5) |
Dropout rate | 0.3 | |
Activation Function | ReLU (Hidden) & Sigmoid (Output) | |
LSTM | Layers | 3 (Neuron = 256) |
Dropout rate | 0.3 | |
Activation Function | Tanh (Hidden) & Sigmoid (Output) | |
Bi-LSTM | Layers | LSTM(units = 128, activation = “tanh”) Dense (units = 64, activation = “ReLU”) Dense(units = 1, activation = “sigmoid”) |
Dropout rate | 0.3 | |
Activation Function | Tanh (LSTM), ReLU & Sigmoid |
Characteristics | n |
---|---|
Total training data | 6090 |
Total positive data (or disaster tweets) | 2617 |
Total unique words | 27,083 |
Total unique words with frequency >1 | 7253 |
Avg. length of tweets | 14.9 |
Median length of tweets | 15.0 |
Maximum length of tweets | 31 |
Minimum length of tweets | 1 |
Model | Transformers | Accuracy | Precision | Recall | F-Score | AUC |
---|---|---|---|---|---|---|
NN | 0.82 | 0.83 | 0.73 | 0.78 | 0.86 | |
0.82 | 0.81 | 0.76 | 0.78 | 0.88 | ||
ELECTRA | 0.83 | 0.80 | 0.79 | 0.79 | 0.89 | |
TN-BERT | 0.82 | 0.87 | 0.69 | 0.77 | 0.88 | |
BERT Expert | 0.83 | 0.81 | 0.77 | 0.79 | 0.89 | |
Talking Head | 0.83 | 0.86 | 0.71 | 0.78 | 0.88 | |
LSTM | 0.82 | 0.88 | 0.67 | 0.76 | 0.88 | |
0.81 | 0.87 | 0.67 | 0.76 | 0.88 | ||
ELECTRA | 0.83 | 0.85 | 0.74 | 0.79 | 0.89 | |
TN-BERT | 0.82 | 0.88 | 0.67 | 0.76 | 0.87 | |
BERT Expert | 0.81 | 0.76 | 0.81 | 0.79 | 0.89 | |
Talking Head | 0.82 | 0.84 | 0.72 | 0.77 | 0.88 | |
CNN | 0.83 | 0.89 | 0.68 | 0.77 | 0.88 | |
0.79 | 0.72 | 0.83 | 0.77 | 0.88 | ||
ELECTRA | 0.82 | 0.78 | 0.82 | 0.80 | 0.89 | |
TN-BERT | 0.82 | 0.92 | 0.64 | 0.75 | 0.87 | |
BERT Expert | 0.84 | 0.91 | 0.69 | 0.78 | 0.89 | |
Talking Head | 0.83 | 0.87 | 0.72 | 0.79 | 0.88 | |
BiLSTM | 0.83 | 0.87 | 0.70 | 0.78 | 0.88 | |
0.80 | 0.79 | 0.74 | 0.76 | 0.88 | ||
ELECTRA | 0.82 | 0.79 | 0.81 | 0.80 | 0.90 | |
TN-BERT | 0.83 | 0.84 | 0.74 | 0.79 | 0.88 | |
BERT Expert | 0.81 | 0.75 | 0.83 | 0.79 | 0.89 | |
Talking Head | 0.84 | 0.87 | 0.74 | 0.80 | 0.89 |
Sample Tweets | Prediction | True Label | |
---|---|---|---|
Talking Head | ELECTRA | ||
The summer program I worked for went the city pool we had to evacuate because one of my kids left a surprise. @jimmyfallon #WorstSummerJob | 1 | 0 | 0 |
You are the avalanche. One world away. My make believing. While I’m wide awake. | 0 | 0 | 0 |
Dorman 917-033 Ignition Knock (Detonation) Sensor Connector http://t.co/WxCes39ZTe http://t.co/PyGKSSSCFR | 0 | 0 | 1 |
Christian Attacked by Muslims at the Temple Mount after Waving Israeli Flag via Pamela Geller-… http://t.co/wGWiQmICL1 | 1 | 1 | 1 |
70 Years After Atomic Bombs Japan Still Struggles With War Past: The anniversary of the devastation wrought b… http://t.co/vFCtrzaOk2 | 1 | 1 | 1 |
You are equally as scared cause this somehow started to heal you fill your wounds that you once thought were permanent. | 0 | 0 | 0 |
@abcnews UK scandal of 2009 caused major upheaval to Parliamentary expenses with subsequent sackings and prison. What are we waiting for? | 0 | 0 | 0 |
Expect gusty winds heavy downpours and lightning moving northeast toward VA now. http://t.co/jyxafD4knK | 1 | 1 | 1 |
August 5: Your daily horoscope: A relationship upheaval over the next few months may be disruptive but in the… http://t.co/gk4uNPZNhN | 0 | 0 | 0 |
@BattleRoyaleMod when they die they just get teleported into somewhere middle of ocean and stays trapped in there unless they decides 2/6 | 0 | 0 | 0 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Balakrishnan, V.; Shi, Z.; Law, C.L.; Lim, R.; Teh, L.L.; Fan, Y.; Periasamy, J. A Comprehensive Analysis of Transformer-Deep Neural Network Models in Twitter Disaster Detection. Mathematics 2022, 10, 4664. https://doi.org/10.3390/math10244664
Balakrishnan V, Shi Z, Law CL, Lim R, Teh LL, Fan Y, Periasamy J. A Comprehensive Analysis of Transformer-Deep Neural Network Models in Twitter Disaster Detection. Mathematics. 2022; 10(24):4664. https://doi.org/10.3390/math10244664
Chicago/Turabian StyleBalakrishnan, Vimala, Zhongliang Shi, Chuan Liang Law, Regine Lim, Lee Leng Teh, Yue Fan, and Jeyarani Periasamy. 2022. "A Comprehensive Analysis of Transformer-Deep Neural Network Models in Twitter Disaster Detection" Mathematics 10, no. 24: 4664. https://doi.org/10.3390/math10244664
APA StyleBalakrishnan, V., Shi, Z., Law, C. L., Lim, R., Teh, L. L., Fan, Y., & Periasamy, J. (2022). A Comprehensive Analysis of Transformer-Deep Neural Network Models in Twitter Disaster Detection. Mathematics, 10(24), 4664. https://doi.org/10.3390/math10244664