Benchmarking BERT-based Models for Sentence-level Topic Classification in Nepali Language
Organizations: Information and Language Processing Research Lab, Kathmandu University, Kavre, Nepal
Abstract
Transformer-based models such as BERT have significantly advanced Natural Language Processing (NLP) across many languages. However, Nepali, a low-resource language written in Devanagari script, remains relatively underexplored. This study benchmarks multilingual, Indic, Hindi, and Nepali BERT variants to evaluate their effectiveness in Nepali topic classification. Ten pre-trained models, including mBERT, XLM-R, MuRIL, DevBERT, HindiBERT, IndicBERT, and NepBERTa, were fine-tuned and tested on the balanced Nepali dataset containing 25,006 sentences across five conceptual domains and the performance was evaluated using accuracy, weighted precision, recall, F1-score, and AUROC metrics. The results reveal that Indic models, particularly MuRIL-large, achieved the highest F1-score of 90.60%, outperforming multilingual and monolingual models. NepBERTa also performed competitively with an F1-score of 88.26%. Overall, these findings establish a robust baseline for future document-level classification and broader Nepali NLP applications.
Figures & tables
| Code | Category | Sentences | Percentage (%) |
|---|---|---|---|
| D1A | Agriculture | 5,012 | 20.04 |
| D2H | Health | 4,999 | 19.99 |
| D3E | Education & Technology | 4,999 | 19.99 |
| D4C | Culture & Tourism | 4,998 | 19.99 |
| D5G | General Communication | 4,998 | 19.99 |
| Total | 25,006 | 100.0 |
| Model | #Params | Training Time (min) | Accuracy (%) | Precision (%) | Recall (%) | AUROC | F1-Score (%) |
|---|---|---|---|---|---|---|---|
| MuRIL (base) | 110M | 49.60 | 89.68 | 89.62 | 89.68 | 0.977 | 89.62 |
| MuRIL (large) | 304M | 65.75 | 90.56 | 90.68 | 90.56 | 0.984 | 90.60 |
| DevBERT | 110M | 51.98 | 90.08 | 90.11 | 90.08 | 0.978 | 90.06 |
| IndicBERT | 110M | 29.77 | 80.57 | 80.93 | 80.57 | 0.948 | 80.66 |
| HindiBERT | 110M | 49.45 | 89.68 | 89.65 | 89.68 | 0.975 | 89.63 |
| mBERT | 177M | 44.68 | 87.84 | 87.75 | 87.84 | 0.970 | 87.78 |
| Model | F1-score (D1A) (%) | F1-score (D2H) (%) | F1-score (D3E) (%) | F1-score (D4C) (%) | F1-score (D5G) (%) |
|---|---|---|---|---|---|
| MuRIL (base) | 92.06 | 87.17 | 91.13 | 94.53 | 82.35 |
| MuRIL (large) | 93.18 | 88.87 | 91.03 | 94.86 | 84.37 |
| DevBERT | 92.04 | 87.76 | 91.91 | 93.96 | 83.88 |
| HindiBERT | 92.53 | 87.41 | 90.91 | 94.31 | 82.03 |
| mBERT | 90.06 | 85.51 | 88.24 | 94.73 | 79.51 |
| XLM-RoBERTa | 91.33 | 87.61 | 90.53 | 94.59 | 83.63 |