Eureka-CIOL@DravidianLangTech 2025: Using Customized BERTs for Sentiment Analysis of Tamil Political Comments

Enjamamul Haque Eram, Ashraf Ahmed, Sabrina Afroz Mitu, Azmine Toushik Wasi2025 · DOI

Abstract

Sentiment analysis on social media platforms plays a crucial role in understanding public opinion and the decision-making process on political matters. As a significant number of individuals express their views on social media, analyzing these opinions is essential for monitoring political trends and assessing voter sentiment. However, sentiment analysis for low-resource languages, such as Tamil, presents considerable challenges due to the limited availability of annotated datasets and linguistic complexities. To address this gap, we utilize a novel dataset encompassing seven sentiment classes, offering a unique opportunity to explore sentiment variations in Tamil political discourse. In this study, we evaluate multiple pre-trained models from the Hugging Face library and experiment with various hyperparameter configurations to optimize model performance. Our findings aim to contribute to the development of more effective sentiment analysis tools tailored for low-resource languages, ultimately empowering Tamil-speaking communities by providing deeper insights into their political sentiments.

Introduction

While sentiment analysis is a mature field for English, it remains a frontier for low-resource languages like Tamil. Tamil presents unique hurdles: it has a complex agglutinative structure, diverse dialects, and a lack of large-scale annotated datasets. When this task is applied to the political arena, the difficulty increases significantly. Political comments on platforms like X (formerly Twitter) are often riddled with sarcasm, code-mixing (mixing Tamil and English), and highly nuanced viewpoints. Standard rule-based NLP often fails in these contexts. This research aims to bridge the gap by developing a robust transformer-based pipeline specifically for Tamil political sentiment.

Methodology

The Eureka-CIOL team employed a "Customized BERT" approach. Rather than building a model from scratch, they leveraged BBMCSM (cardiffnlp/bert-base-multilingual-cased-sentiment-multilingual), a version of BERT already fine-tuned for multilingual sentiment tasks.

Architecture of the customized BERT pipeline for Tamil sentiment analysis.

The customization focused on the architecture and the training regime:

  • Classification Head: A multi-layer head was added, consisting of a pre-classifier, a dropout layer (to prevent overfitting), and a final classifier.
  • Hyperparameter Search: The core experimentation involved varying the hidden dimensions (ranging from 512 to 1536) and dropout rates (0.3 vs. 0.4).
  • Training Specifics: The team used the Adam optimizer with a learning rate of 0.001, a batch size of 32, and trained for 50 epochs.

Datasets

The study utilized a novel dataset specifically curated for the Political Multiclass Sentiment Analysis of Tamil shared task. The dataset consists of 4,352 training samples, 544 validation samples, and 544 test samples. Unlike simple binary sentiment analysis, this dataset uses seven granular classes: Substantiated, Sarcastic, Opinionated, Positive, Negative, Neutral, and None of the above. A major challenge identified was significant class imbalance; for instance, "Opinionated" samples (1,361) vastly outnumber "None of the above" (171) in the training set.

Key Insights and Experimental Results

The researchers found that model capacity and regularization were critical to performance. Larger hidden dimensions (e.g., 1536, 786) were significantly more robust, maintaining better generalization even when dropout was applied. This suggests that higher-capacity models are better at capturing the subtle nuances of Tamil political rhetoric.

Performance metrics across different hidden dimensions and dropout rates.

Key observations from the experimental results include:

  • The Dropout "Sweet Spot": A dropout rate of 0.3 was found to be most effective. Increasing it to 0.4 led to underfitting, particularly in smaller architectures.
  • The Generalization Gap: There was a stark contrast between training performance (up to 79.8% accuracy) and validation performance (~33-34%). This underscores the difficulty of generalizing sentiment in low-resource, high-sarcasm environments where models can easily memorize training patterns that do not translate to unseen data.

Conclusion

The best-performing model utilized hidden dimensions of 1536 and 786 with a 0.3 dropout rate, achieving a Macro F1 score of 0.3187 on the official test set. This result placed the team 4th overall in the competition, surpassing the mean and median scores of all participating teams (0.2769).

Future work will address current limitations, such as computational constraints and data imbalance, by exploring data augmentation techniques and parameter-efficient fine-tuning (PEFT) methods. Additionally, domain-specific pre-training on massive amounts of raw Tamil text is expected to yield further improvements in capturing political sentiment.

Summary updated

Abstract

Sentiment analysis on social media platforms plays a crucial role in understanding public opinion and the decision-making process on political matters.As a significant number of individuals express their views on social media, analyzing these opinions is essential for monitoring political trends and assessing voter sentiment.However, sentiment analysis for lowresource languages, such as Tamil, presents considerable challenges due to the limited availability of annotated datasets and linguistic complexities.To address this gap, we utilize a novel dataset encompassing seven sentiment classes, offering a unique opportunity to explore sentiment variations in Tamil political discourse.In this study, we evaluate multiple pre-trained models from the Hugging Face library and experiment with various hyperparameter configurations to optimize model performance.Our findings aim to contribute to the development of more effective sentiment analysis tools tailored for low-resource languages, ultimately empowering Tamil-speaking communities by providing deeper insights into their political sentiments.Our full experimental codebase is publicly available at: ciol-researchlab/NAACL25-Eureka-Sentiment-Analysis-Tamil
BibTeX
@misc{eram2025eureka,
  author = {Enjamamul Haque Eram and Ashraf Ahmed and Sabrina Afroz Mitu and Azmine Toushik Wasi},
  title = {{Eureka-CIOL@DravidianLangTech 2025: Using Customized BERTs for Sentiment Analysis of Tamil Political Comments}},
  year = {2025},
  doi = {10.18653/v1/2025.dravidianlangtech-1.2},
}
Figure