Skip to content
Open access

A Multi-Stage Framework Combining Siamese Contrastive Learning and Domain-Adaptive BERT for Thai Lyrics Emotion Classification

Oct 2026 · ASEAN Journal of Scientific and Technological Reports · 0 citations · 13 references

TL;DR

A multi-stage deep learning pipeline for emotion classification in Thai song lyrics is proposed by integrating domain-adaptive language modeling and metric learning into a hybrid neural architecture, demonstrating robust, balanced performance across all emotion classes.

Abstract

Emotion recognition from song lyrics plays a crucial role in music information retrieval, recommendation systems, and affective computing. However, Thai song lyrics present unique linguistic challenges, including ambiguous word segmentation, figurative expressions, and culturally embedded meanings, which limit the effectiveness of existing multilingual and general-purpose language models. This study proposes a multi-stage deep learning pipeline for emotion classification in Thai song lyrics by integrating domain-adaptive language modeling and metric learning into a hybrid neural architecture. A balanced dataset of Thai song lyrics, comprising four primary emotional categories (Happy, Sadness, Anger, and Relaxed), was curated to include 12,000 balanced verse-level instances (3,000 samples per class) annotated using Russell's Circumplex Model of Affect. To enhance domain-specific representation learning, Domain-Adaptive Masked Language Modeling (MLM) was first applied to WangchanBERTa using a large corpus of Thai song lyrics. Subsequently, a Siamese Contrastive Learning framework incorporating a targeted hard-negative mining strategy was executed to optimize the geometric proximity of identical emotional states and untangle semantic overlaps between neighboring concepts (e.g., Happy vs. Relaxed). The adapted and contrastively-refined embeddings were subsequently processed by a hybrid architecture that combines a Bidirectional Long Short-Term Memory (BiLSTM) with an attention mechanism to capture long-range contextual dependencies and emotionally salient terms. To ensure rigorous evaluation validity and prevent data leakage, the pipeline was thoroughly evaluated using a stratified 5-fold cross-validation protocol. Experimental results demonstrate that the proposed approach significantly outperforms baseline models, including mBERT, XLM-RoBERTa, LaBSE, and the original WangchanBERTa. The proposed model achieves an overall accuracy of 96.24% and a macro-averaged F1-score of 0.9623, demonstrating robust, balanced performance across all emotion classes. These findings underscore the importance of domain adaptation, contrastive alignment, and hybrid architectures for effective emotion classification in low-resource, culturally nuanced languages such as Thai.

Read PDF

Similar papers

Open access Sep 2026

A contrastive learning framework with HuBERT for violin music emotion recognition

A CL-HuBERT (Contrastive Learning with HuBERT) framework that performs domain-adaptive continued pre-training of a HuBERT encoder via contrastive learning on unlabeled violin audio, followed by supervised fine-tuning for valence-arousal prediction achieves superior performance.

Xin-Yue Liu · 0 citations
Preprint Oct 2026

MERP: A Latent-Bottleneck Framework for Robust Multi-Modal Multi-Label Emotion Recognition

Multimodal multi-label emotion recognition is important for affect-aware systems, but models trained with complete text, visual, and acoustic streams often degrade sharply when some streams are unavailable at deployment. We address this train-test gap by learning a compact representation that preserves emotion-specific...

Chuang-Xin Zhao, Mei-Mei Zhang, Can-Ran Xiao et al. · 0 citations
Conference Aug 2026

Emotional Melody Generation Model Based on Multi-scale Attention LSTM

Aiming at the problems of ambiguous emotional representation and poor adaptability between melody details and overall structure in traditional melody generation models, this paper proposes a novel emotional melody generation model. Taking LSTM as the basic framework for extracting temporal features, a three-level multi...

Hailong Lyu · 0 citations
Open access Sep 2026

A Transformer-Based Approach with Data Augmentation for Multilabel Emotional Context Detection

A fine-tuned Robustly Optimized Bidirectional Encoder Representations from Transformers Approach (RoBERTa) is used to offer a Transformer-based model for identifying multilabel emotional context in textual data to balance emotion categories and enhance the model's capacity for generalization.

M. H. Hussein, Marem H. Abdulabas, A. T. Ali et al. · 0 citations
2026

ASER: Attribute-Serialized Emotion Recognition With Generative Multi-Task Learning

Speech emotion recognition (SER) is commonly formulated as direct utterance-to-label classification, leaving the acoustic and semantic evidence behind each prediction implicit. This letter proposes Attribute-Serialized Emotion Recognition (ASER), an attribute-serialized generative multi-task framework for SER, which or...

Ying-Ming Gao, Yi-Ming Gao, Rui-Xi Jiang et al. · 0 citations

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.