Enhancing Thai Sentiment Analysis with WangchanBERTa and Instance-Class-Aware Dynamic Kernel Selection

Read full text
Authors: Panida Songram, Suchart Khummanee, Jirapond Muangprathub, Khanabhorn Kawattikul
Cited by: 1
References: 19

Abstract

Thai sentiment analysis on social media remains challenging due to the lack of explicit word boundaries, informal expressions, code-mixing, short text length, and severe class imbalance, particularly in the WISESIGHT benchmark dataset. Although transformer-based models such as WangchanBERTa provide strong contextual representations for Thai language processing, conventional hybrid architectures using fixed convolutional kernels may fail to capture diverse local semantic patterns across different sentiment classes. To address this limitation, this study proposes WangchanBERTa with Instance-Class-Aware Dynamic Kernel Selection (WangchanBERTa-IC-DKS), a novel hybrid framework that integrates contextualized embeddings with multi-kernel convolutional neural networks and dynamic kernel selection at both the instance and class levels. The proposed model adaptively determines kernel importance according to sentence semantics and class-specific sentiment characteristics, enabling more effective local feature extraction and improved minority-class recognition. Experiments were conducted on the WISESIGHT sentiment benchmark using four kernel candidates: [2, 3, 4], [3, 4, 5], [2, 3, 4, 5], and [1, 2, 3, 4, 5]. The kernel candidate [2, 3, 4, 5] achieves the best performance, with a mean macro-F1 of 63.93% averaged across three independent runs using different random seeds. Ablation studies further show that combining both class-aware and instance-aware dynamic kernel selection improves balanced classification performance compared with fixed multi-kernel CNN baselines. The proposed model also outperforms the previous state-of-the-art Parallel Hybrid model by 1.23 percentage points on the WISESIGHT dataset and by 1.36 percentage points on the 40 Thai children’s tales dataset. These findings demonstrate that dynamic kernel selection is more effective than fixed convolutional kernels across the two evaluated Thai sentiment benchmarks, particularly for short, noisy, and imbalanced Thai texts.

Fields of Study & Subjects

Sentiment Analysis and Opinion Mining Text and Document Classification Technologies Topic Modeling

Publication details

Journal / source
Applied Sciences
Publisher
MDPI AG
Volume
16
Issue
11
Pages
5310–5310
Publication date
25 May 2026
Language
EN