PhayaThaiBERT fine-tuned for Thai Skincare/Cosmetic Aspect-Based Sentiment Analysis
This model fine-tunes clicknext/phayathaibert for multi-aspect
sentiment analysis of Thai skincare and cosmetic product reviews. It
predicts sentiment (positive / negative / neutral / none)
independently for 10 aspects in a single forward pass: result/efficacy,
price/value, packaging, texture, color, scent, shipping, product packing,
seller service, and overall satisfaction.
Trained and evaluated as part of Performance Comparison of Fine-Tuned Thai BERT-based Models for Multi-Aspect Sentiment Analysis in Skincare and Cosmetic Reviews — a comparison against WangchanBERTa, ThaiBERT, and a Typhoon LLM baseline on the same task and dataset. PhayaThaiBERT achieved the best overall performance of the three fine-tuned models.
Dataset: JarBenjaporn/skincare-absa-thai (15,905 Thai reviews from Shopee, Watsons, Konvy)
Architecture: clicknext/phayathaibert encoder + 10 independent linear classification heads (one per aspect), trained jointly with averaged cross-entropy loss.
Hyperparameters & Experimental Setup
| Hyperparameter / Config | Tested Values / Details |
|---|---|
| Base Model Architecture | RoBERTa-base |
| Base Model Name | pthibert-base-th-cased |
| Max Sequence Length | 256 |
| Optimizer | AdamW |
| Learning Rate (LR) | 1e-5, 2e-5 |
| Batch Size | 16, 32 |
| Epochs | 3, 5, 7, 9, 11 |
| Dropout | 0.1 |
Best Config:
| Learning Rate | Epochs | Batch Size |
|---|---|---|
| 2e-5 | 11 | 16 |
Test set results:
| Metric | Value |
|---|---|
| Accuracy | 0.9412 |
| Macro F1 | 0.7941 |
| Macro Precision | 0.7743 |
| Macro Recall | 0.8171 |
| Cohen's Kappa | 0.8772 |
| Hamming Loss | 0.0588 |
Comparison across models (test set):
| Model | Accuracy | Macro F1 | Cohen's κ | Hamming Loss |
|---|---|---|---|---|
| PhayaThaiBERT | 0.9412 | 0.7941 | 0.8772 | 0.0588 |
| WangchanBERTa | 0.9354 | 0.7801 | 0.8659 | 0.0646 |
| ThaiBERT (this model) | 0.6907 | 0.382 | 0.3571 | 0.3093 |
| Typhoon v2.5 (LLM, no fine-tuning) | 0.9393* | 0.6679* | 0.7388 | 0.0607 |
*Typhoon numbers are macro-averaged across aspects from a separate few-shot prompting evaluation (8,123 matched reviews), not directly from the same train/test split — included for context, not a strict apples-to-apples comparison.
Architecture code / how to load: the custom MultiLabelBertForAspectSentiment
class is included in this repo (modeling_multilabel_bert.py). Trained
weight files are not hosted here due to storage constraints — see the
GitHub repo to reproduce training from the dataset.
Limitations: trained on e-commerce reviews from three Thai platforms; performance on other domains (e.g. formal product descriptions, other languages) is not evaluated. Aspect coverage is fixed to the 10 categories above.
Credits
Jarbenjaporn, Kronravee
Model tree for JarBenjaporn/phayathaibert-skincare-absa
Base model
clicknext/phayathaibert