Skip to main content
Log in

BERT-based chinese text classification for emergency management with a novel loss function

  • Published:
Applied Intelligence Aims and scope Submit manuscript

Abstract

This paper proposes an automatic Chinese text categorization method for solving the emergency event report classification problem. Since the bidirectional encoder representations from transformers (BERT) has achieved great success in the natural language processing domain, it is employed to derive emergency text features in this study. To overcome the data imbalance problem in the distribution of emergency event categories, a novel loss function is proposed to improve the performance of the BERT-based model. Meanwhile, in order to avoid the negative impacts of the extreme learning rate, the Adabound optimization algorithm that achieves a gradual smooth transition from Adam optimizer to stochastic gradient descent optimizer is employed to learn the parameters of the model. The feasibility and competitiveness of the proposed method are validated on both imbalanced and balanced datasets. Furthermore, the generic BERT, BERT ensemble LSTM-BERT (BERT-LB), Attention-based BiLSTM fused CNN with gating mechanism (ABLG-CNN), TextRCNN, Att-BLSTM, and DPCNN are used as benchmarks on these two datasets. Meanwhile, sampling methods, including random sampling, ADASYN, synthetic minority over-sampling techniques (SMOTE), and Borderline-SMOTE, are employed to verify the performance of the proposed loss function on the imbalance dataset. Compared with benchmarking methods, the proposed method has achieved the best performance in terms of accuracy, weighted average precision, weighted average recall, and weighted average F1 values. Therefore, it is promising to employ the proposed method for real applications in smart emergency management systems.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6

Similar content being viewed by others

References

  1. Li X, Pu W, Zhao X (2019) Agent action diagram: toward a model for emergency management system. Simul Model Pract Theory 94:66–99

    Article  Google Scholar 

  2. De Nicola A, Melchiori M, Villani ML (2019) Creative design of emergency management scenarios driven by semantics: an application to smart cities. Inform Syst 81:21–48

    Article  Google Scholar 

  3. Yu F, Fan B, Li X (2020) Improving emergency preparedness to cascading disasters: A case-driven risk ontology modelling. Journal of Contingencies and Crisis Management p 28

  4. Yao K, Zhang L, Luo T, Wu Y (2018) Deep reinforcement learning for extractive document summarization. Neurocomputing 284(APR.5):52–62

    Article  Google Scholar 

  5. Singh SP et al (2017) Machine translation using deep learning: An overview, pp 162–167

  6. Semberecki P, Maciejewski H (2017) Deep learning methods for subject text classification of articles, pp 357–360

  7. Devlin J, Chang M-W, Lee K, Toutanova K (2018) Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv:1810.04805

  8. Mikolov T, Sutskever I, Chen K, Corrado GS, Dean J (2013) Distributed representations of words and phrases and their compositionality, pp 3111–3119

  9. Mikolov T, Chen K, Corrado G, Dean J (2013) Efficient estimation of word representations in vector space. arXiv:1301.3781

  10. Kim Y (2014) Convolutional neural networks for sentence classification. Eprint Arxiv

  11. Liu P, Qiu X, Huang X (2016) Recurrent neural network for text classification with multi-task learning

  12. Lai S, Xu L, Liu K, Zhao J (2015) Recurrent convolutional neural networks for text classification, AAAI’15, pp 2267–2273 (AAAI Press)

  13. Zhou P, Shi W, Tian J, Qi Z, Xu B (2016) Attention-based bidirectional long short-term memory networks for relation classification, pp 207–212 (Association for Computational Linguistics)

  14. Johnson R, Zhang T (2017) Deep pyramid convolutional neural networks for text categorization, pp 562–570 (Association for Computational Linguistics)

  15. Li Y, Sun G, Zhu Y (2010) Data imbalance problem in text classification, pp 301–305 (IEEE)

  16. Chawla NV, Bowyer KW, Hall LO, Kegelmeyer WP (2002) Smote: synthetic minority over-sampling technique. J Artif Intel Res 16:321–357

    Article  MATH  Google Scholar 

  17. Raghuwanshi BS, Shukla S (2020) Smote based class-specific extreme learning machine for imbalanced learning. Knowl Based Syst 187:104814

    Article  Google Scholar 

  18. Liu B, Tsoumakas G (2020) Dealing with class imbalance in classifier chains via random undersampling. Knowl Based Syst 192:105292

    Article  Google Scholar 

  19. Li M, Xiong A, Wang L, Deng S, Ye J (2020) Aco resampling: Enhancing the performance of oversampling methods for class imbalance classification. Knowl Based Syst, p 105818

  20. Cao C, Wang Z (2018) Imcstacking: Cost-sensitive stacking learning with feature inverse mapping for imbalanced problems. Knowl Based Syst 150:27–37

    Article  Google Scholar 

  21. Shi G, Feng C, Xu W, Liao L, Huang H (2020) Penalized multiple distribution selection method for imbalanced data classification. Knowl Based Syst, p 105833

  22. Fernando K, Ruwani M, Tsokos CP (2021) Dynamically weighted balanced loss: class imbalanced learning and confidence calibration of deep neural networks. IEEE Transactions on Neural Networks and Learning Systems

  23. Vaswani A et al (2017) Attention is all you need, pp 5998–6008

  24. Wu Y et al (2016) Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv:1609.08144

  25. Lin T-Y, Goyal P, Girshick R, He K, Dollár P (2017) Focal loss for dense object detection, pp 2980–2988

  26. Keskar NS, Socher R (2017) Improving generalization performance by switching from adam to sgd. arXiv:1712.07628

  27. Wilson AC, Roelofs R, Stern M, Srebro N, Recht B (2017) The marginal value of adaptive gradient methods in machine learning, pp 4148–4158

  28. Luo L, Xiong Y, Liu Y, Sun X (2019) Adaptive gradient methods with dynamic bound of learning rate (New Orleans, Louisiana)

  29. Liu J, Xia C, Li X, Yan H, Liu T (2020) A bert-based ensemble model for chinese news topic prediction, BDE 2020, pp 18–23 (Association for Computing Machinery, New York, NY USA)

  30. Deng J, Cheng L, Wang Z (2021) Attention-based bilstm fused cnn with gating mechanism model for chinese long text classification. Comput Speech Lang 68:101182

    Article  Google Scholar 

  31. Sun M, Li J, Guo Z, Yu Z, Zheng Y, Si X, Liu Z (2016) Thuctc: an efficient chinese text classifier. GitHub Repository

  32. Moreo A, Esuli A, Sebastiani F (2016) Distributional random oversampling for imbalanced text classification, pp 805–808

  33. Feng H, Dan T, Wang W, Gui R, Liu J, Li Y (2021) A combination of resampling method and machine learning for text classification on imbalanced data, pp 3–17 (springer)

  34. Rupapara V, Rustam F, Shahzad HF, Mehmood A, Ashraf I, Choi GS (2021) Impact of SMOTE on imbalanced text features for toxic comments classification using RVVC model. IEEE Access 9:78621–78634

    Article  Google Scholar 

  35. Han H, Wang W-Y, Mao B-H (2005) Borderline-SMOTE: a new over-sampling method in imbalanced data sets learning, pp 878–887 (Springer)

Download references

Acknowledgements

This work was supported in part by the Guangdong Basic and Applied Basic Research Foundation under Grant 2020A1515110431, in part by Scientific and Technological Innovation Foundation of Foshan under Grant BK22BF009, and in part by the National Nature Science and Foundation of China under Grant 62002016.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Long Wang.

Additional information

Publisher’s note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Wang, Z., Wang, L., Huang, C. et al. BERT-based chinese text classification for emergency management with a novel loss function. Appl Intell 53, 10417–10428 (2023). https://doi.org/10.1007/s10489-022-03946-x

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10489-022-03946-x

Keywords

Navigation