KinyaEmbed: Contrastive Sentence Embeddings for Kinyarwanda via Multi-Stage Curriculum Training
Organizations: Barclays · Carnegie Mellon University
Abstract
We present KinyaEmbed, the first dedicated sentence embedding model for Kinyarwanda, a morphologically rich Bantu language spoken by over 12 million people in Rwanda. Existing multilingual embedding models such as LaBSE, mE5-large, and OpenAI text-embedding-3-large perform poorly on Kinyarwanda due to severe under-representation in their pre-training corpora. KinyaEmbed is built on KinyaBERT-large and trained via a four-stage curriculum using MultipleNegativesRankingLoss (MNRL): Stage 1 leverages ~18,000 paraphrase pairs from the Official Gazette of Rwanda with three temperature scales; Stage 2 fine-tunes on 715 NLLB-translated MNLI triplets for entailment structure; Stage 3 aligns representations using English-Kinyarwanda OPUS-100 translation pairs; Stage 4 refines with 2,936 high-quality pairs filtered from KinyaCOMET at quality threshold 0.8. We evaluate on SemRel2024-rw and introduce Wiki-RW-STS, a new contamination-free Kinyarwanda STS benchmark of 300 pairs derived from Kinyarwanda Wikipedia. A seven-checkpoint ensemble (all5+23A*2, with the final stage double-weighted) achieves Spearman \r{ho}=0.7298 on SemRel2024-rw, surpassing mE5-large by 20.9% and OpenAI text-embedding-3-large by 41.0%. KinyaEmbed also achieves the best document clustering silhouette score (0.2146) across all evaluated models. All checkpoints, the KinyaCOMET filtered pairs, and the Wiki-RW-STS benchmark are publicly available.
Figures & tables
| Stage | Data | Pairs | Scale | Batch | Epochs |
| 1 Gazette | Monolingual | 18,000 | 30/35/40 | 64 | 5 |
| 2 MNLI | Triplets | 715 | 35 | 64 | 3 |
| 3 OPUS-100 | Cross-lingual | 50,000 | 20 | 32 | 2 |
| 4 KinyaCOMET | Cross-lingual | 2,936 | 20 | 32 | 2 |
| Optimizer: AdamW, LR , warmup 10% | |||||
| Loss: MultipleNegativesRankingLoss (MNRL) | |||||
| Model | SemRel | OPUS | FLORES |
|---|---|---|---|
| Spear. | P@1 | P@1 | |
| LaBSE | 0.4535 | 0.2090 | 0.9975 |
| mE5-large | 0.6039 | 0.1168 | 0.9783 |
| mE5-large-instruct | 0.5975 | ||
| BGE-M3 | 0.5523 | ||
| AfriE5-instruct | 0.6037 | 0.1219 | 0.9946 |
| Model | Spearman | AUC |
|---|---|---|
| KinyaEmbed (ours) | 0.6005 | 0.8946 |
| mE5-large-instruct | 0.5531 | 0.8880 |
| AfriE5-instruct | 0.5391 | 0.8846 |
| mE5-large | 0.5337 | 0.8725 |
| OpenAI text-emb-3-large | 0.5319 | 0.8877 |
| BGE-M3 | 0.4877 | 0.8429 |
| Model | IR | Clustering | Cls | |
|---|---|---|---|---|
| P@1 | Sil. | DB | Acc | |
| mE5-large-instruct | 0.9833 | 0.1073 | 3.5408 | 0.5278 |
| BGE-M3 | 0.9767 | 0.1086 | 3.4885 | 0.6111 |
| mE5-large | 0.9600 | 0.0794 | 3.8722 | 0.5278 |
| OpenAI text-emb-3 | 0.9400 | 0.0846 | 3.8679 | 0.6944 |
| AfriE5-instruct | 0.9133 | 0.1104 | 3.5749 | 0.5556 |
| Configuration | STS | FLORES P@1 |
|---|---|---|
| KinyaBERT-large (no fine-tuning) | 0.3801 | 0.1502 |
| sc35 (Stage 1) | 0.7391 | 0.2708 |
| step22A (Stage 3) | 0.7127 | 0.2910 |
| all5 (without step23A) | 0.7395 | 0.2851 |
| all5+23A 2 (ours) | 0.7298 | 0.3587 |
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
| Checkpoint | Stage | SemRel | OPUS | FLORES | Wiki-RW |
|---|---|---|---|---|---|
| Spear. | P@1 | P@1 | Spear. | ||
| KinyaBERT-large | base | 0.380 | 0.032 | 0.150 | 0.241 |
| sc30 | 1 | 0.739 | 0.058 | 0.271 | 0.572 |
| sc35 | 1 | 0.739 | 0.062 | 0.271 | 0.592 |
| sc40 | 1 | 0.736 | 0.055 | 0.268 | 0.581 |
| v12 | 2 | 0.734 | 0.065 | 0.279 | 0.598 |
Sentence Embeddings
Sentence embeddings map sentences to vectors for semantic similarity, retrieval, clustering, and downstream language tasks.
See all 34 papersEmbedding Initialization for Unseen Low-resource Languages in Multilingual NMT: A Case Study on Limbum-English Translation
SkMTEB: Slovak Massive Text Embedding Benchmark and Model Adaptation
e5-sk-small (45M parameters) and e5-sk-large (365M) by applying vocabulary trimming and fine-tuning to Multilingual E5 models. Despite size reductions of up to 62%, our open-source models achieve competitive performance with proprietary APIs while remaining locally deployable for semantic search and retrieval-augmented generation (RAG). We release the benchmark, models, datasets, and code openly, hoping our approach offers a replicable path for other under-resourced languages.