Submitted:
08 April 2026
Posted:
09 April 2026
You are already at the latest version
Abstract

Keywords:
1. Introduction
- 1.
- A lightweight hybrid framework integrating WangchanBERTa with CNN for Thai sentiment analysis, balancing performance and computational efficiency.
- 2.
- A systematic analysis of CNN kernel size configurations for sentiment feature extraction, providing new insights into their impact across sentiment categories.
- 3.
- Empirical improvement over the state-of-the-art, achieving a 4.94% increase in macro-average F1-score on the WISESIGHT benchmark.
- 4.
- Demonstration of an effective combination of contextualized embeddings (global features) and local feature extraction for handling short, noisy, and imbalanced Thai social media texts.
2. Related Work
3. Materials and Methods
3.1. The WISESIGHT Dataset
3.2. Pre-Processing
| Number of messages | Training | Validation | Testing |
|---|---|---|---|
| Total | 47,180 | 5,164 | 5,812 |
| #Neutral | 11,795 | 1,291 | 1,453 |
| #Negative | 11,795 | 1,291 | 1,453 |
| #Positive | 11,795 | 1,291 | 1,453 |
| #Question | 11,795 | 1,291 | 1,453 |
3.3. WangchanBERTa
3.4. Modeling
3.5. Evaluation
4. Results and Discussion
4.1. Performance on the WISESIGHT Dataset
4.2. Performance on the Balanced WISESIGHT Dataset
5. Conclusions
Acknowledgments
References
- Pasupa, K.; Seneewong Na Ayutthaya, T. Hybrid Deep Learning Models for Thai Sentiment Analysis. Cogn Comput 2022, 14, 167–193. [Google Scholar] [CrossRef]
- Devlin, J.; Chang, M.-W.; Lee, K.; Toutanova, K. BERT: Pre-training of Deep Bidirectional Transformers. arXiv 2018. [Google Scholar] [CrossRef]
- Wu, S.; Dredze, M. Beto, Bentz, Becas: The Surprising Cross-Lingual Effectiveness of BERT. arXiv 2019. [Google Scholar] [CrossRef]
- Zhuang, L.; Wayne, L.; Ya, S.; Jun, Z. A Robustly Optimized BERT Pre-training Approach with Post-training. In Proceedings of the 20th Chinese National Conference on Computational Linguistics, Huhhot, China, 2021; pp. 471–484. [Google Scholar] [CrossRef]
- Lan, Z.; Chen, M.; Goodman, S.; Gimpel, K.; Sharma, P.; Soricut, R. ALBERT: A Lite BERT for Self-supervised Learning of Language Representations. arXiv 2019. [Google Scholar] [CrossRef]
- Conneau, A.; Khandelwal, K.; Goyal, N.; Chaudhary, V.; Wenzek, G.; Guzmán, F.; Grave, E.; Ott, M.; Zettlemoyer, L.; Stoyanov, V. Unsupervised Cross-lingual Representation Learning at Scale. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics Online 2020, 8440–8451. [Google Scholar] [CrossRef]
- Clark, K.; Luong, M.-T.; Le, Q.; Manning, C. ELECTRA: Pre-training Text Encoders as Discriminators. arXiv 2020. [Google Scholar] [CrossRef]
- Gurgurov, D.; Bäumel, T.; Anikina, T. Multilingual Large Language Models and Curse of Multilinguality. arXiv 2024. [Google Scholar] [CrossRef]
- Chang, T.A.; Arnett, C.; Tu, Z.; Bergen, B. K When Is Multilinguality a Curse? Language Modeling for 250 Languages. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Miami, Florida, USA, 2024; pp. 4074–4096. [Google Scholar] [CrossRef]
- Blevins, T.; Limisiewicz, T.; Gururangan, S.; Li, M.; Gonen, H.; Smith, N.A.; Zettlemoyer, L. Breaking the Curse of Multilinguality with Cross-lingual Expert Language Models. In Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Miami, Florida, USA, 2024; pp. 10822–10837. [Google Scholar] [CrossRef]
- Zhao, Z.; Aletras, N. Comparing Explanation Faithfulness between Multilingual and Monolingual Fine-tuned Language Models. In Proceedings of the 2024 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Mexico City, Mexico, 2024; Volume 1, pp. 3226–3244. [Google Scholar] [CrossRef]
- Lowphansirikul, L.; Polpanumas, C.; Jantrakulchai, N.; Nutanong, S. WangchanBERTa: Pretraining transformer-based Thai Language Models. arXiv 2021. [Google Scholar] [CrossRef]
- Suraratchai, K.; Phoomvuthisarn, S. Thai Language Sentiment Analysis with a Hybrid Method on WangchanBERTa-CNN-BiLSTM. Journal of Information Science and Technology (JIST). 2024, 14, 1–11. Available online: https://ph02.tci-thaijo.org/index.php/JIST/article/view/253881 (accessed on 9 Febuary 2026).
- Phienthrakul, T.; Kijsirikul, B.; Takamura, H.; Okumura, M. Sentiment Classification with Support Vector Machines and Multiple Kernel Functions. In Neural Information Processing. ICONIP 2009; Lecture Notes in Computer Science; Leung, C.S., Lee, M., Chan, J.H., Eds.; Springer: Berlin, Heidelberg, 2009; vol 5864, pp. 583–592. [Google Scholar] [CrossRef]
- Lertsuksakda, R.; Netisopakul, P.; Pasupa, K. Thai sentiment terms construction using Hourglass of Emotions. 2014 6th International Conference on Knowledge and Smart Technology (KST), Chon Buri, Thailand, 2014; pp. 46–50. [Google Scholar] [CrossRef]
- Chirawichitchai, N. Emotion classification of Thai text using machine learning techniques. 2014 11th International Joint Conference on Computer Science and Software Engineering (JCSSE), Chon Buri, Thailand, 2014; pp. 91–96. [Google Scholar] [CrossRef]
- Chirawichitchai, N. Developing Term Weighting Scheme Based on Term Occurrence Ratio for Sentiment Analysis. In Information Science and Applications. Lecture Notes in Electrical Engineering; Kim, K., Ed.; Springer: Berlin, Heidelberg, 2015; vol 339. [Google Scholar] [CrossRef]
- Pasupa, K.; Netisopakul, P.; Lertsuksakda, R. Sentiment analysis of Thai children stories. Artif Life Robotics 2016, 21, 357–364. [Google Scholar] [CrossRef]
- Netisopakul, P.; Pasupa, K.; Lertsuksakda, R. Hypothesis testing based on observation from Thai sentiment classification. Artif Life Robotics 2017, 22, 184–190. [Google Scholar] [CrossRef]
- Haruechaiyasak, C.; Palingoon, P.; Trakultaweekoon, K. S-Sense: A Sentiment Analysis Framework for Social Media Monitoring. Information Technology Journal KMUTNB 2018, 14, 11–22. [Google Scholar]
- Porntrakoon, P.; Moemeng, C. Thai Sentiment Analysis for Consumer’s Review in Multiple Dimensions Using Sentiment Compensation Technique (SenseComp). 2018 15th International Conference on Electrical Engineering/Electronics, Computer, Telecommunications and Information Technology (ECTI-CON), Chiang Rai, Thailand, 2018; pp. 25–28. [Google Scholar] [CrossRef]
- Tesmuang, R.; Chirawichitchai, N. Sentiment Analysis of Thai Online Product Reviews using Genetic Algorithms with Support Vector Machine. Progress in Applied Science and Technology 2020, 10(2), 7–13. Available online: https://ph02.tci-thaijo.org/index.php/past/article/view/241933 (accessed on 5 Febuary 2026).
- Vateekul, P.; Koomsubha, T. A study of sentiment analysis using deep learning techniques on Thai Twitter data. 13th International Joint Conference on Computer Science and Software Engineering (JCSSE), Khon Kaen, Thailand, 2016. [Google Scholar] [CrossRef]
- Pasupa, K.; Seneewong Na Ayutthaya, T. Thai sentiment analysis with deep learning techniques: A comparative study based on word embedding, POS-tag, and sentic features. Sustainable Cities and Society 2019, 50, 101615. [Google Scholar] [CrossRef]
- Thong-iad, K.; Netisopakul, P. Comparison of Thai Sentence Sentiment Tagging Methods Using Thai Sentiment Resource. In Recent Advances in Information and Communication Technology 2019; Advances in Intelligent Systems and Computing; Boonyopakorn, P., Meesad, P., Sodsee, S., Unger, H., Eds.; Springer: Cham, 2019; vol 936, pp. 89–98. [Google Scholar] [CrossRef]
- Jitboonyapinit, C.; Maneerat, P.; Chirawichitchai, N. Sentiment Analysis on Thai Social Media Using Convolutional Neural Networks and Long Short-Term Memory. INTERNATIONAL SCIENTIFIC JOURNAL OF ENGINEERING AND TECHNOLOGY (ISJET) 2023, 7, 74–80. Available online: https://ph02.tci-thaijo.org/index.php/isjet/article/view/246935. (accessed on 9 Febuary 2026).
- Khamphakdee, N.; Seresangtakul, P. An Efficient Deep Learning for Thai Sentiment Analysis. Data 2023, 8, 90. [Google Scholar] [CrossRef]
- Nokkaew, M.; Nongpong, K.; Yeophantong, T.; Ploykitikoon, P.; Arjharn, W.; Siritaratiwat, A.; Narkglom, S.; Wongsinlatam, W.; Remsungnen, T.; Namvong, A.; Surawanitkun, C. Analyzing online public opinion on Thailand-China high-speed train and Laos-China railway mega-projects using advanced machine learning for sentiment analysis. Social Network Analysis and Mining 2023, 14(1), 15. [Google Scholar] [CrossRef]
- Satjathanakul, J.; Siriborvornratanakul, T. Sentiment analysis in product reviews in Thai language. Int. J. Inf. Technol. 2025, 17, 1979–1985. [Google Scholar] [CrossRef]
- Emphan, C.; Tiamkaew, E.; Khruahong, S. Enhancing the Performance of Sentiment Analysis Models Using GridSearchCV: A Case Study on Electric Vehicles in Thailand. Journal of Applied Informatics and Technology (JIT) 2026, 8, 260631. [Google Scholar] [CrossRef]
- Suriyawongkul, A.; Chuangsuwanich, E.; Chormai, P.; Chantarapratin, N.; Prasertsom, P.; Sawatphol, J.; Yamada, N.; Rutherford, A.; Polpanumas, C.; Udomcharoenchaikit, C. PyThaiNLP/Wisesight Sentiment Corpus with Word Tokenization Label. Zenodo 2024. [Google Scholar] [CrossRef]
- Kim, Y. Convolutional Neural Networks for Sentence Classification. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), Doha, Qatar, 2014; pp. 1746–1751. [Google Scholar]
- Minaee, S.; Kalchbrenner, N.; Cambria, E.; Nikzad, N.; Chenaghlu, M.; Gao, J. Deep Learning-based Text Classification: A Compre-hensive Review. ACM Computing Surveys (CSUR) 2021, 54, 1–40. [Google Scholar] [CrossRef]
- Kalchbrenner, N.; Grefenstette, E.; Blunsom, P. A Convolutional Neural Network for Modelling Sentences. In 52nd Annual Meeting of the Association for Computational Linguistics, ACL 2014 - Proceedings of the Conference, 2014. [Google Scholar] [CrossRef]











| Number of messages | Training | Validation | Testing |
|---|---|---|---|
| Total | 21,628 | 2,404 | 2,671 |
| #Neutral | 11,795 | 1,291 | 1,453 |
| #Negative | 5,491 | 637 | 683 |
| #Positive | 3,866 | 434 | 478 |
| #Question | 476 | 42 | 57 |
| Avg. Words | 27.21 | 27.18 | 27.12 |
| Avg. Chars | 89.82 | 89.50 | 90.36 |
| Model | Acc | Negative | Neutral | Positive | Question | Macro | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | ||
| BiLSTM-CNN [1] | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | N/A | 55.21 |
| Parallel Hybrid [13] | 73.64 | 76.62 | 76.85 | 76.74 | 74.53 | 83.49 | 78.76 | 65.53 | 43.56 | 52.33 | 51.46 | 36.87 | 42.96 | 67.04 | 60.19 | 62.70 |
| WangchanBERTa-BiLSTM | 73.12 | 76.21 | 83.02 | 79.47 | 77.71 | 76.53 | 77.12 | 57.28 | 51.05 | 53.98 | 42.84 | 52.63 | 47.24 | 63.51 | 65.81 | 64.45 |
| WangchanBERTa-BiGRU | 72.00 | 76.91 | 78.04 | 77.47 | 75.70 | 77.84 | 76.76 | 55.77 | 48.54 | 51.90 | 39.71 | 47.37 | 43.20 | 62.02 | 62.95 | 62.33 |
| WangchanBERTa-CNN [1,2,3] | 74.77 | 79.44 | 78.62 | 79.03 | 76.28 | 82.30 | 79.13 | 62.47 | 50.84 | 56.06 | 55.26 | 36.84 | 44.21 | 68.36 | 62.15 | 64.62 |
| WangchanBERTa-CNN [2,3,4] | 74.73 | 76.79 | 83.89 | 79.64 | 76.75 | 81.35 | 78.98 | 65.94 | 44.56 | 53.18 | 53.85 | 49.12 | 51.38 | 68.08 | 64.73 | 65.80 |
| WangchanBERTa-CNN [3,4,5] | 73.79 | 77.19 | 81.21 | 79.17 | 77.06 | 79.08 | 78.06 | 62.67 | 49.16 | 55.10 | 37.21 | 56.14 | 44.76 | 63.53 | 66.41 | 64.27 |
| WangchanBERTa-CNN [1,2,3,4] | 73.38 | 78.99 | 78.17 | 78.59 | 75.35 | 81.42 | 78.27 | 58.58 | 46.44 | 51.81 | 45.65 | 36.84 | 40.78 | 64.64 | 60.72 | 62.36 |
| Model | Acc | Negative | Neutral | Positive | Question | Macro | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | ||
| WangchanBERTa-CNN+Single-head Attention | 72.71 | 76.64 | 80.23 | 78.40 | 77.83 | 76.12 | 76.97 | 54.51 | 54.39 | 54.45 | 48.28 | 49.12 | 48.70 | 64.31 | 64.97 | 64.63 |
| WangchanBERTa-CNN+Multi-head Attention | 68.74 | 75.24 | 69.40 | 72.20 | 68.42 | 83.96 | 75.40 | 58.08 | 24.06 | 34.02 | 45.00 | 47.37 | 46.15 | 61.69 | 56.20 | 56.95 |
| WangchanBERTa-CNN+SE Block | 70.65 | 68.60 | 84.77 | 75.83 | 71.00 | 83.90 | 76.91 | 80.91 | 18.62 | 30.27 | 0.00 | 0.00 | 0.00 | 55.13 | 46.82 | 45.75 |
| Gate Fusion | 69.82 | 72.09 | 73.35 | 72.71 | 71.03 | 81.49 | 75.90 | 59.35 | 34.52 | 43.65 | 48.39 | 26.32 | 34.09 | 62.71 | 53.92 | 56.59 |
| Hybrid Model | 73.27 | 75.40 | 82.58 | 78.83 | 75.65 | 79.77 | 77.65 | 61.61 | 43.31 | 50.86 | 49.09 | 47.73 | 48.21 | 65.44 | 63.25 | 63.89 |
| Model | Acc | Negative | Neutral | Positive | Question | Macro | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | P | R | F1 | ||
| WangchanBERTa-BiLSTM (original) | 73.12 | 76.21 | 83.02 | 79.47 | 77.71 | 76.53 | 77.12 | 57.28 | 51.05 | 53.98 | 42.84 | 52.63 | 47.24 | 63.51 | 65.81 | 64.45 |
| WangchanBERTa-BiLSTM (balancing) | 93.52 | 94.16 | 95.32 | 94.74 | 92.55 | 83.77 | 87.94 | 89.02 | 95.39 | 92.10 | 98.50 | 99.59 | 99.04 | 93.56 | 93.52 | 93.45 |
| Improvement (%) | +27.90 | +23.55 | +14.82 | +19.21 | +19.10 | +9.46 | +14.03 | +55.41 | +86.86 | +70.62 | +129.93 | +89.23 | +109.65 | +47.32 | +42.11 | +45.00 |
| WangchanBERTa-CNN [1,2,3] (original) | 74.77 | 79.44 | 78.62 | 79.03 | 76.28 | 82.30 | 79.13 | 62.47 | 50.84 | 56.06 | 55.26 | 36.84 | 44.21 | 68.36 | 62.15 | 64.62 |
| WangchanBERTa-CNN [1,2,3] (balancing) | 93.82 | 93.47 | 95.53 | 94.49 | 92.33 | 84.39 | 88.18 | 91.38 | 95.46 | 93.37 | 98.11 | 100.00 | 99.05 | 93.82 | 93.84 | 93.77 |
| Improvement (%) | +25.48 | +17.66 | +21.51 | +19.56 | +21.04 | +2.54 | +11.44 | +46.28 | +87.77 | +66.55 | +77.54 | +171.44 | +124.04 | +37.24 | +50.99 | +45.11 |
| WangchanBERTa-CNN [2,3,4] (original) | 74.73 | 76.79 | 83.89 | 79.64 | 76.75 | 81.35 | 78.98 | 65.94 | 44.56 | 53.18 | 53.85 | 49.12 | 51.38 | 68.08 | 64.73 | 65.80 |
| WangchanBERTa-CNN [2,3,4] (balancing) | 94.14 | 94.50 | 94.50 | 94.50 | 89.91 | 88.24 | 89.07 | 93.68 | 93.81 | 93.75 | 98.31 | 100.00 | 99.15 | 94.10 | 94.14 | 94.11 |
| Improvement (%) | +25.97 | +23.06 | +12.65 | +18.66 | +17.15 | +8.47 | +12.78 | +42.07 | +110.53 | +76.29 | +82.56 | +103.58 | +92.97 | +38.22 | +45.43 | +43.02 |
| WangchanBERTa-CNN [3,4,5] (original) | 73.79 | 77.19 | 81.21 | 79.17 | 77.06 | 79.08 | 78.06 | 62.67 | 49.16 | 55.10 | 37.21 | 56.14 | 44.76 | 63.53 | 66.41 | 64.27 |
| WangchanBERTa-CNN [3,4,5] (balancing) | 93.84 | 93.47 | 95.53 | 94.49 | 92.33 | 84.39 | 88.18 | 91.38 | 95.46 | 93.37 | 98.11 | 100.00 | 99.05 | 93.82 | 93.84 | 93.84 |
| Improvement (%) | +27.17 | +21.09 | +17.63 | +19.35 | +19.82 | +6.71 | +12.96 | +45.81 | +94.18 | +69.46 | +163.67 | +78.13 | +121.29 | +47.68 | +41.30 | +46.01 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 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 (http://creativecommons.org/licenses/by/4.0/).