Public Sentiment Classification on Megathrust Issues in Social Media Using BERT Algorithm


  • Candra Kus Khoiri Wicaksono Telkom University, Bandung, Indonesia
  • Putu Harry Gunawan * Mail Telkom University, Bandung, Indonesia
  • (*) Corresponding Author
Keywords: Sentiment Analysis; Megathrust Earthquake; Social Media; IndoBERT

Abstract

In recent years, the threat of megathrust earthquakes has intensified concern among scientists and the public, especially in seismically active countries like Indonesia. As people increasingly turn to social media to express fears and opinions about such disasters, these platforms offer a rich, real-time resource for gauging public sentiment. This study introduces a sentiment-classification system built on IndoBERT, an Indonesian-language adaptation of the renowned BERT architecture. Our model was trained on a custom-labeled dataset of social-media posts categorized as positive, negative, or neutral. Preprocessing involved tokenizing the text, truncating or padding inputs to 64 tokens, and converting sentiment labels into PyTorch tensor format to facilitate efficient training. We fine-tuned the IndoBERT model using the AdamW optimizer with a learning rate of 1e-5, a dropout rate of 0.1, and early stopping criteria to guard against overfitting, training for a maximum of seven epochs. Notably, the IndoBERT classifier achieved a validation accuracy of 93.33% on a hold-out test set representing 20% of the data, with this peak occurring in the very first epoch. This rapid convergence likely reflects both the strong pretrained language representations inherent in IndoBERT and the specific characteristics of the dataset. While early stopping effectively prevented overfitting, the immediate peak suggests that the model required minimal additional fine-tuning to adapt to this sentiment classification task. These findings demonstrate that advanced natural-language-processing tools like IndoBERT can reliably interpret sentiment in the context of sensitive topics and have the potential to be integrated into disaster-response frameworks, equipping officials with timely, data-driven insights into public opinion and concerns during emergencies.

Downloads

Download data is not yet available.

References

S. G. Prakoso, A. A. Wijaya, dan F. A. Al Putra, “Indonesia’s Disaster Resilience Against Volcanic Eruption: Lessons From Yogyakarta,” KnE Social Sciences, vol. 7, no. 5, 2022, doi: 10.18502/kss.v7i5.10544.

F. Aftab et al., “A Comprehensive Survey on Sentiment Analysis Techniques,” International Journal of Technology, vol. 14, no. 6, 2023, doi: 10.14716/ijtech.v14i6.6632.

K. P. Gunasekaran, “Exploring Sentiment Analysis Techniques in Natural Language Processing: A Comprehensive Review,” arXiv preprint arXiv:2305.14842, 2023, doi: 10.48550/arXiv.2305.14842.

M. Shahbazi dan D. Bunker, “Social Media Trust: Fighting Misinformation in the Time of Crisis,” International Journal of Information Management, vol. 77, 2024, doi: 10.1016/j.ijinfomgt.2024.102780.

K. Nemkul, “Use of Bidirectional Encoder Representations From Transformers (BERT) and Robustly Optimized BERT Pretraining Approach (RoBERTa) for Nepali News Classification,” Tribhuvan University Journal, vol. 39, no. 1, 2024, doi: 10.3126/tuj.v39i1.66679.

A. F. Hidayatullah, R. A. Apong, D. T. C. Lai, dan A. Qazi, “Pre‑Trained Language Model for Code‑Mixed Text in Indonesian, Javanese, and English Using Transformer,” Social Network Analysis and Mining, vol. 15, no. 1, 2025, doi: 10.1007/s13278‑025‑01444‑9.

M. Mozafari, R. Farahbakhsh, dan N. Crespi, “A BERT‑Based Transfer Learning Approach for Hate Speech Detection in Online Social Media,” arXiv preprint arXiv:1910.12574, 2019, doi: 10.48550/arXiv.1910.12574.

X. Li, Y. Lei, dan S. Ji, “BERT‑ and BiLSTM‑Based Sentiment Analysis of Online Chinese Buzzwords,” Future Internet, vol. 14, no. 11, 2022, doi: 10.3390/fi14110332.

I. Indra dan N. Aliza, “Detecting Disaster Trending Topics on Indonesian Tweets Using BNgram,” MATRIK: Jurnal Manajemen, Teknik Informatika dan Rekayasa Komputer, vol. 23, no. 1, 2023, doi: 10.30812/matrik.v23i1.3308.

E. S. N. Aulia, E. Saepudin, Qoriah, Ernawati, S. Khoiri, dan S. K. Azhari, “From Tweet to Tremor: Enhancing Megathrust Disaster Monitoring and Early Warning Systems in Social Media,” E3S Web of Conferences, vol. 604, 2025, doi: 10.1051/e3sconf/202560404006.

A. Ulinuha, E. Majid, dan R. Nuari, “Performance Comparison of BERT Metrics and Classical Machine Learning Models (SVM, Naive Bayes) for Sentiment Analysis,” INOVTEK Polbeng – Seri Informatika, vol. 10, no. 2, 2025, doi: 10.35314/wmh3rg23.

F. Koto, A. Rahimi, J. H. Lau, dan T. Baldwin, “IndoLEM and IndoBERT: A Benchmark Dataset and Pre‑Trained Language Model for Indonesian NLP,” arXiv preprint arXiv:2011.00677, 2020, doi: 10.48550/arXiv.2011.00677.

M. Di Cristofaro, “Data Interference: Emojis, Homoglyphs, and Issues of Data Fidelity in Corpora and Their Results,” arXiv preprint arXiv:2507.01764, 2025, doi: 10.48550/arXiv.2507.01764.

Ö. Agrali, H. Sökün, dan E. Karaarslan, “Twitter Data Analysis: Izmir Earthquake Case,” arXiv preprint arXiv:2212.01453, 2022, doi: 10.48550/arXiv:2212.01453.

J. Camacho‑Collados and M. T. Pilehvar, "On The Role Of Text Preprocessing In Neural Network Architectures: An Evaluation Study On Text Categorization And Sentiment Analysis," Proceedings Of The 2018 EMNLP Workshop BlackboxNLP, vol. W18, no. 5406, 2018, doi: 10.18653/v1/W18‑5406.

F. Koto, A. Rahimi, J. H. Lau, and T. Baldwin, "IndoLEM And IndoBERT: A Benchmark Dataset And Pre‑Trained Language Model For Indonesian NLP," Proceedings Of The 28th International Conference On Computational Linguistics, vol. 2020, no. 66, 2020, doi: 10.18653/v1/2020.coling‑main.66.

J. Devlin, M.‑W. Chang, K. Lee, and K. Toutanova, "BERT: Pre‑Training Of Deep Bidirectional Transformers For Language Understanding," Proceedings Of The 2019 Conference Of The North American Chapter Of The Association For Computational Linguistics: Human Language Technologies, vol. 1, no. 1423, 2019, doi: 10.18653/v1/N19‑1423.

Y. Liu, M. Ott, N. Goyal, et al., "RoBERTa: A Robustly Optimized BERT Pretraining Approach," International Conference On Learning Representations, vol. 8, 2020, doi: 10.48550/arXiv.1907.11692.

C. Goutte and E. Gaussier, "A Probabilistic Interpretation Of Precision, Recall And F‑Score, With Implication For Evaluation," Lecture Notes In Computer Science, vol. 3408, no. 25, 2005, doi: 10.1007/978‑3‑540‑31865‑1_25.

D. M. W. Powers, "Evaluation: From Precision, Recall And F‑Measure To ROC, Informedness, Markedness & Correlation," Journal Of Machine Learning Technologies, vol. 2, no. 1, 2011, doi: 10.9735/2229‑3981.


Bila bermanfaat silahkan share artikel ini

Berikan Komentar Anda terhadap artikel Public Sentiment Classification on Megathrust Issues in Social Media Using BERT Algorithm

Dimensions Badge
Article History
Submitted: 2025-07-15
Published: 2025-09-04
Abstract View: 25 times
PDF Download: 47 times
How to Cite
Wicaksono, C. K. K., & Gunawan, P. H. (2025). Public Sentiment Classification on Megathrust Issues in Social Media Using BERT Algorithm. Building of Informatics, Technology and Science (BITS), 7(2), 1214-1221. https://doi.org/10.47065/bits.v7i2.8016
Section
Articles