Manuscript Offprint

arXiv:2608.22922

HelaBERT: Enhancing Sinhala Language Understanding with Dual Pooling Classification Head

Thisen Ekanayake, Nisansa de Silva

Abstract

We present HelaBERT, a family of two BERT-based masked language models pre-trained from scratch on approximately 1 billion tokens of Sinhala text sourced from MADLAD-400, CulturaX, and a custom corpus comprising news articles, Sinhala Wikipedia, and web crawl data. HelaBERT-Small (~23.3M parameters, 6 layers) and HelaBERT-Large (~110M parameters, 12 layers) both use a SentencePiece Unigram tokenizer (vocabulary size 32,000) tailored to Sinhala's agglutinative morphology and complex script. We evaluate both models on four downstream Sinhala text classification tasks: news category classification, news source classification, sentiment analysis, and writing style classification, using 5 independent seed runs with stratified 80/20 train/test splits. We additionally propose a dual pooling classification head and evaluate it systematically across all four tasks, finding consistent improvements on sentiment analysis and a moderate gain on news category classification for HelaBERT-Small, while the standard [CLS]-linear head remains competitive on news source classification, a headline-level task with short average input length. We release both models to support further research in Sinhala NLP.

1 Introduction

Sinhala is an Indo-Aryan language spoken by approximately 17 million people in Sri Lanka, characterized by a complex abugida script and rich agglutinative morphology. Despite its regional importance, Sinhala remains severely under-resourced in NLP: pre-trained language models, annotated corpora, and benchmarks are scarce. While multilingual models such as mBERT (Devlin et al., 2019) and XLM-R (Conneau et al., 2020) provide some coverage, they allocate limited capacity to low-resource languages, and dedicated monolingual models consistently outperform them on downstream tasks (Martin et al., 2020; Delobelle et al., 2020).

We introduce HelaBERT, a family of two BERT-based masked language models pre-trained from scratch on ∼\sim1 billion tokens of Sinhala text, using a SentencePiece Unigram tokenizer designed for Sinhala's agglutinative morphology and complex script. We fine-tune both models on four Sinhala text classification tasks — news category, news source, sentiment, and writing style — and compare against existing multilingual and monolingual baselines under a common evaluation protocol. Beyond the standard [CLS]-linear classification head, we propose a dual pooling head that lets the [CLS] token and the full token sequence attend to each other, and we analyze systematically when this richer interaction helps and when it does not. Our main contributions are:

  1. Two BERT-based models:

HelaBERT-Small and 🐦 HelaBERT_Large,

with a SentencePiece Unigram tokenizer

tailored to Sinhala morphology;

  1. A fine-tuning evaluation on four Sinhala classification benchmarks using 5 independent seed runs following the methodology of Dhananjaya et al. (2022), enabling direct comparison with SinBERT (Dhananjaya et al. (2022)) and other baselines; and

  2. A dual pooling classification head evaluated across all four tasks, yielding consistent gains on sentiment analysis (+3.9–5.6 macro- F1F_{1} points) and a moderate improvement on news category classification for HelaBERT-Small (+3.1 points), while demonstrating that the standard head remains competitive on very short-input tasks such as news source classification.

Section 2 situates HelaBERT relative to prior multilingual and Sinhala-specific models; Sections 3–5 describe pre-training and fine-tuning;

Section 6 compares HelaBERT against baselines; Section 7 introduces and analyzes the co-attention head; and Section 8 discusses broader implications and limitations.