Public sentiment analysis regarding government policies, particularly in niche sectors like Halal tourism, often faces significant computational challenges due to data scarcity and severe class imbalance. Traditional augmentation methods, such as Synthetic Minority Over-sampling Technique (SMOTE) applied to raw text or TF-IDF vectors, often degrade semantic integrity, while standard fine-tuning of pre-trained models like IndoBERT tends to bias predictions toward majority classes. To address these limitations, this study proposes IndoBERT-LSS (Latent Space Sampling), a novel decoupled two-stage deep learning framework. The first stage employs a Representation Learning approach integrating an Attention-Pooling mechanism with Supervised Contrastive Loss (SupCon) to enforce compact intra-class clustering in the embedding space. The second stage introduces a Latent Space Sampling strategy, where SMOTE is applied to the extracted high-dimensional embeddings rather than the raw text, followed by a final classification using a Multi-Layer Perceptron. Validated on a dataset of 1,051 textual responses regarding Halal tourism in Pariaman, Indonesia, the proposed model achieved an accuracy of 93.84% and a macro F1-score of 0.94. Notably, the model demonstrated exceptional robustness in identifying minority classes, achieving a 0.99 F1-score for neutral sentiments. These results conclude that decoupling representation learning from feature balancing in the latent space significantly enhances model performance on imbalanced short-text datasets compared to standard fine-tuning baselines.
Copyrights © 2026