Kirundi News Topic Classifier (AfroXLMR-base, fine-tuned)

Classifies a Kirundi (Ikirundi, run) news article into one of 10 topics: politics, sport, economy, health, education, entertainment, relationship, technology, environment, culture.

Data

The official KIRNEWS split leaks: all 923 test articles also occur in the training set. We pooled train+test, removed exact and near-duplicates, removed articles with conflicting labels and dropped classes with fewer than 25 unique articles (history, religion). This gives 1,742 articles, split stratified 70/15/15 (1,219 / 261 / 262).

Training

Fine-tuned for 8 epochs (best epoch by validation macro-F1: 6) with lr 3e-5, effective batch size 16, max length 512 subword tokens, class-weighted cross-entropy and frozen word embeddings (86M of 278M parameters trained). Seed 42, Apple M1 Pro (MPS).

Results

Evaluation set Accuracy Macro-F1
KIRNEWS held-out test (262 articles, 10 classes) 0.897 0.795
MasakhaNEWS-run (1,525 BBC Gahuza articles, 5 overlapping classes, out-of-distribution) 0.872 0.799

A TF-IDF + linear SVM baseline reaches 0.908 / 0.833 in-domain but drops to 0.801 / 0.722 out-of-distribution.

Limitations

  • Trained on ~1.2k articles from eight Burundian news websites. The rare classes (culture, environment, technology: 25–34 articles each) are unreliable.
  • The model is over-confident: wrong predictions still average 0.86 probability. The demo flags predictions below 0.9.
  • It always picks one of the 10 topics. Articles about other topics (e.g. religion, history) are usually labelled politics.
  • It is multilingual and will also classify English/French/Kinyarwanda text, but this is not validated.
  • AfroXLMR's adaptation corpus includes unlabelled KIRNEWS text (Alabi et al., 2022), which may make its in-domain test scores optimistic.

Usage

from transformers import pipeline
clf = pipeline("text-classification", model="ReneNtabana/kirundi-news-classifier")
clf("umukino w'umupira w'amaguru wahuje intamba mu rugamba na ...".lower())

Lower-case the text and normalise apostrophes (’ β†’ ') as during training.

References

  • Niyongabo, R. A., Hong, Q., Kreutzer, J., & Huang, L. (2020). KINNEWS and KIRNEWS: Benchmarking cross-lingual text classification for Kinyarwanda and Kirundi. COLING 2020.
  • Alabi, J. O., Adelani, D. I., Mosbach, M., & Klakow, D. (2022). Adapting pre-trained language models to African languages via multilingual adaptive fine-tuning. COLING 2022.
  • Adelani, D. I., et al. (2023). MasakhaNEWS: News topic classification for African languages. IJCNLP-AACL 2023.
Downloads last month
16
Safetensors
Model size
0.3B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for ReneNtabana/kirundi-news-classifier

Quantized
(5)
this model

Datasets used to train ReneNtabana/kirundi-news-classifier

Space using ReneNtabana/kirundi-news-classifier 1